Posts

ios - How to add an image for each customized annotation on MapView? -

ios - How to add an image for each customized annotation on MapView? - i have class of picture contains latitude , longitude , image of each location. want add together them annotation mapview , show image instead of pin locations. i have customized annotation is: @interface annotation : mkannotationview <mkannotation> @property (nonatomic,assign) cllocationcoordinate2d coordinate; @property (nonatomic,copy) nsstring *title; @property (nonatomic,copy) nsstring *subtitle; @property (nonatomic,retain) uiimage *image; @end and @implementation annotation @synthesize title,subtitle,coordinate,image; @end now in main code trying this: cllocationcoordinate2d location; annotation *myann; for(pictures *pic in picturesfromdb) { myann = [[annotation alloc] init]; location.latitude = [pic.langt doublevalue]; location.longitude = [pic.longt doublevalue]; myann.coordinate = location; myann.title = pic.descript; myann.image = [uiimage imagewithdata:pic.ima...

json - multidimensional key-pair array with json_decode (Clickbank IPN v.6.0) -

json - multidimensional key-pair array with json_decode (Clickbank IPN v.6.0) - this illustration of instant payment notification (ipn) receive clickbank: $decrypted = {"transactiontime":"2014-10-06t14:49:00-07:00","receipt":"********","transactiontype":"test","vendor":"comclub","role":"vendor","totalaccountamount":1.00,"paymentmethod":"visa","totalorderamount":1.00,"totaltaxamount":0.00,"totalshippingamount":0.00,"currency":"usd","lineitems":[{"itemno":"1","producttitle":"a passed in title","shippable":false,"recurring":false,"accountamount":1.00}],"customer":{"shipping":{"firstname":"test","lastname":"user","fullname":"test user","email...

Powershell script to check IP connection and delete IP address lease -

Powershell script to check IP connection and delete IP address lease - i looking powershell script check ip connection , delete ip address lease if connection false. here have far. if (test-connection -computername 10.5.5.100 -count 1 -quiet) -eq false {netsh dhcp server \\computername scope 10.15.1.0 delete lease 10.15.1.100} if (test-connection -computername 10.5.5.100 -count 1 -quiet -eq false) {netsh dhcp server \\computername scope 10.15.1.0 delete lease 10.15.1.100} i thinking syntax wrong here can't quite figure out. on 2008 server. bonus: using check scope , addresses not in utilize want remove them. alter lease time less not policy have come way. if there way go 10.5.5.100 through 10.5.5.254 removing ips not active great. just do: if (test-connection -computername 10.5.5.100 -count 1 -quiet) {} else {netsh dhcp server \\computername scope 10.15.1.0 delete lease 10.15.1.100} or if want save result of test: $live = test-connection -computernam...

java - nested for loop prime checker -

java - nested for loop prime checker - here code im kinda new programming way goal of programme out set primes numbers between 0 , user inputted value, each on own line import java.util.scanner; import java.math.*; public class sforprime{ public static void main (string[] args){ double box = 0; double boxxx = 0; int po = 0; int blub = 0; int no = 1; scanner scan = new scanner (system.in); system.out.println("input cieling number"); box = scan.nextint(); boxxx = math.sqrt(box); (int batman = (int)box; batman >= 0; batman--){ if (no == 1){ no = 0; } else if (po == 0){ system.out.println(blub); po = 0; } blub = batman; (int mot = (int)boxxx; mot >= 2; mot--){ if (po == 1 ){ } else if (box%mot == 0){ po++; } } if (po == 0){ system.out.println(blub); } } } } what ends happening doesn...

javascript - Is it possible to run a function that is '2-deep' within another function? -

javascript - Is it possible to run a function that is '2-deep' within another function? - i need execute function window.onload event. function want run lies within function's function. know can run function function by function1(){ function2(); } function2(){ ...a process... } but since cannot run window.onload event within 'overall' function needs @ 'top layer'. tried doing didn't work think want do. <script> function(){ function1(){ ..some stuff.. } function2(){ function1(); } } window.onload = function2; </script> i cannot run function1 window.onload event bound object onclick event. any suggestions how can solve this?? you should study , larn different javascript patterns allow construction code in predictable manner. http://addyosmani.com/resources/essentialjsdesignpatterns/book/ fantastic resource , show things need know. each pattern details implementation, ...

c# - Unable to display contents of Session to ASPX page -

c# - Unable to display contents of Session to ASPX page - so have piece of code which, when user logs in, take username , set session, called username. (for sake of simplicity i've set test string in there useremail.username) else { session["username"] = "test"; response.redirect("default.aspx"); } as far can tell, chunk of code works, 1 time user logs in redirected default.aspx. have piece of code (in master page's code behind on page_load) makes 1 panel visible if session not null, works, meaning there stored in session: if (session["username"] != null) { pnlloggedin.visible = visible; } however when seek display in front end of text: <h3>welcome <h3> so "welcome [username]" can't. don't know code. i've tried creating public string called getusername , calling that, i've tried puttin...

excel - VBA Mis-Match Error 13 -

excel - VBA Mis-Match Error 13 - i'm relatively new vba, wrote sub parse csv info contained in single cell , homecoming pieces of info other cells in spreadsheet. relatively simple code can't find error. err 13 mismatch on line moods = application.index(fullarray, 0, 3) help appreciated. private sub parsecsv() 'parse "notes" column , homecoming moods/keywords apropriate cells dim csv string dim fullarray variant dim lrow long dim keywords variant dim moods variant dim long lrow = activesheet().range("bl" & activesheet().rows.count).end(xlup).row = 3 lrow csv = activesheet.range("bl" & i) fullarray = split(csv, chr(10)) moods = application.index(fullarray, 0, 3) keywords = application.index(fullarray, 0, 2) activesheet.range("cd" & i).value = moods activesheet.range("ce" & i).value = keywords nex...