msanread(addr, uintptr(len));
set(addr, value);
static void Main(string[] args) { addr[] listOfAddr = new addr[addr.MAX]; List <String> names = new List <string>(); List <String> streets = new List <string>(); List <String> cities = new List <string>(); List <String> states = new List <string>(); List <String> zipcodes = new List <string>(); names.Add("Bob"); names.Add("Bill"); names.Add("Ed"); names.Add("Wally"); names.Add("George"); streets.Add("123 Elm St."); streets.Add("456 Main St."); streets.Add("986 Skidmore Rd."); streets.Add("568 Lakeside Terrace"); streets.Add("9863 Waldorf Ave."); cities.Add("Houston"); cities.Add("New Orleans"); cities.Add("Tampa"); cities.Add("Atlanta"); cities.Add("Richmond"); states.Add("Texas"); states.Add("Louisana"); states.Add("Florida"); states.Add("Georgia"); states.Add("Virginia"); zipcodes.Add("23464"); zipcodes.Add("34654"); zipcodes.Add("34646"); zipcodes.Add("56848"); zipcodes.Add("86534"); for (int i = 0; i < listOfAddr.Length; i++) { listOfAddr[i].name = names[i]; listOfAddr[i].street = streets[i]; listOfAddr[i].city = cities[i]; listOfAddr[i].state = states[i]; listOfAddr[i].zipcode = zipcodes[i]; } for (int i = 0; i < listOfAddr.Length; i++) { Console.WriteLine("{0} {1} {2} {3}, {4} {5}", i, listOfAddr[i].name, listOfAddr[i].street, listOfAddr[i].city, listOfAddr[i].state, listOfAddr[i].zipcode); } Console.WriteLine("\n\n"); Dictionary <string, int> animalsAtTheZoo = new Dictionary <string, int>(); animalsAtTheZoo.Add("raccoon", 4); animalsAtTheZoo.Add("bear", 5); animalsAtTheZoo.Add("tiger", 3); animalsAtTheZoo.Add("elephant", 2); animalsAtTheZoo.Add("giraffe", 3); animalsAtTheZoo.Add("zebra", 6); animalsAtTheZoo.Add("lion", 5); animalsAtTheZoo.Add("bat", 34); animalsAtTheZoo.Add("iguana", 21); animalsAtTheZoo.Add("otter", 12); animalsAtTheZoo.Add("alligator", 8); List <String> animals = animalsAtTheZoo.Keys.ToList(); int counter = 0; while (counter < animalsAtTheZoo.Count) { Console.WriteLine("{0} {1}", animals[counter], animalsAtTheZoo[animals[counter]]); counter++; } Console.WriteLine("There are {0} bats at the zoo.", animalsAtTheZoo["bat"]); animalsAtTheZoo.Remove("zebra"); animalsAtTheZoo.Add("zebra", 5); Console.WriteLine("There are {0} zebras at the zoo.", animalsAtTheZoo["zebra"]); }
set => Poke(addr, value);
public RippleWalletUBC(String addr, String pv) => ChangeWalletUBC(addr, pv).Wait();
public static UpdateResponse UpdateBookingDetails(string propCode, BookingViewModel model) { var webAddr = "https://chartswebintf-fra.chartspms.com.au/json/execute?un=charteuhh&pw=hh246eu"; var httpWebRequest = (HttpWebRequest)WebRequest.Create(webAddr); httpWebRequest.ContentType = "text/json"; httpWebRequest.Method = "POST"; JavaScriptSerializer js = new JavaScriptSerializer(); login logdetails = new login(); logdetails.user = "******"; logdetails.pasw = ""; propIdent requestdata = new propIdent(); requestdata.mesg = "ResvUpdate"; requestdata.propcode = propCode; requestdata.login = logdetails; Update jsonupdate = new Update(); guest g = new guest(); g.salu = model.salu; g.naml = model.lastName; g.namf = model.firstName; g.comp = model.company; g.emai = model.email; g.cell = model.cellnumber; g.phon = model.phonenumber; g.secu = model.secu; addr a = new addr(); a.line1 = model.address1; a.line2 = model.address2; a.city = model.city; a.posc = model.postcode; a.stat = model.state; a.cnty = model.country; g.addr = a; stay s = new stay(); s.arrt = model.timearrival; s.paym = model.paym; if (model.cardNumber != null) { s.card = new Card(); s.card.auth = model.cardHolder; s.card.numb = model.cardNumber; s.card.expy = model.cardEndDate; } List <exflds> ext = new List <exflds>(); if (model.gender != null) { exflds e = new exflds(); e.numb = 65; e.value = model.gender; ext.Add(e); } //if (ext.Count > 0) //{ // s.exflds = ext.ToArray(); //} //if (false) { //List<exflds> ext = new List<exflds>(); if (model.document != null) { exflds e = new exflds(); e.numb = 74; e.value = model.document; ext.Add(e); } if (model.idtype != null) { exflds n = new exflds(); n.numb = 75; n.value = model.idtype; ext.Add(n); } if (model.secu != null) { exflds n = new exflds(); n.numb = 76; n.value = model.secu; ext.Add(n); } if (ext.Count > 0) { s.exflds = ext.ToArray(); } //} jsonupdate.ident = requestdata; jsonupdate.indx = model.index; jsonupdate.guest = g; jsonupdate.stay = s; Update[] sendarray = { jsonupdate }; jsonUpdateModel array = new jsonUpdateModel(); array.requests = sendarray; string json = JsonConvert.SerializeObject(array); using (StreamWriter streamWriter = new StreamWriter(httpWebRequest.GetRequestStream())) { streamWriter.Write(json); streamWriter.Flush(); } HttpWebResponse httpResponse = (HttpWebResponse)httpWebRequest.GetResponse(); StreamReader streamReader = new StreamReader(httpResponse.GetResponseStream()); string result = streamReader.ReadToEnd(); //in result is the end data. jsonUpdateResponseModel response = JsonConvert.DeserializeObject <jsonUpdateResponseModel>(result); UpdateResponse data = response.responses[0]; return(data); }
from data in GetMemOrRegData(addr, w)