Posts

javascript - D3.js: Stop transitions being interrupted? -

i'm working d3.js. i've got transitions working nicely, have 1 problem: if second transition starts before first 1 ends, this jsfiddle demonstrating problem: http://jsfiddle.net/kqxhj/11/ it works fine of time - cdg , lax appended , removed data changes - if click button twice in rapid succession, you'll notice new elements don't appear. this meat of code: function update(data) { var g = vis.selectall("g.airport").data(data, function(d) { return d.name; }); var genter = g.enter().append("g") .attr("class", function(d) { return "airport " + d.name; }); // perform various updates , transitions... [...] // remove exited elements. g.exit().transition() .duration(1000) .attr("transform", "translate(0," + 1.5*h + ")"); g.exit().transition().delay(1000) .remove(); } d3.select('#clickme').on("click", function() { update(curr...

ios - UIImageView touch handling -

i have image view background image. seeking in place on image view touches enabled. started this: - (id)initwithtouchpoint:(cgrect )point { self = [super init]; if (self) { touchframe = point; [self setaccessibilityframe:touchframe]; } return self; } /* // override drawrect: if perform custom drawing. // empty implementation adversely affects performance during animation. - (void)drawrect:(cgrect)rect { // drawing code } */ -(bool)canresignfirstresponder{ return yes; } -(void)touchesbegan:(nsset *)touches withevent:(uievent *)event{ uitouch *touch = [[event alltouches] anyobject]; cgpoint touchlocation = [touch locationinview:self]; if (cgrectcontainspoint(touchframe, touchlocation)) { //[self setuserinteractionenabled:no]; }else{ //[self setuserinteractionenabled:yes]; } dlog(@"touchesbegan @ x : %f y : %f",touchlocation.x,touchlocation.y); } -(void)touchesmoved:(nsset *)touches wit...

delphi - ssl httpserver throwing 'Access violation at address 00000000. Read of address 00000000' error -

this code throwing 'access violation @ address 00000000. read of address 00000000' error in runtime. i'm trying server accept ssl requests having real trouble. i have ssleay32.dll & libeay32.dll saved in debug folder. appreciated: serveriohandler := tidserveriohandlersslopenssl.create; serveriohandler.ssloptions.method := sslvsslv23; serveriohandler.ssloptions.mode := sslmclient; serveriohandler.ssloptions.verifymode := []; serveriohandler.ssloptions.verifydepth := 0; server:=tidhttpserver.create; server.iohandler := serveriohandler; server.defaultport:=port; server.bindings.defaultport:=port; server.onquerysslport(8092, newbool); //this line throws error server.autostartsession:=true; server.oncommandget:=idhttpserver1commandget; server.sessiontimeout:=360; server.active:=true; the reason why error onquerysslport event , haven't assigned handler for. the point of onquerysslport you should write method , assign pro...

could not find artifact while running maven build in jenkins -

while building maven application in jenkins following error [error] artifact: com.envoisolutions.sxc:sxc-runtime:jar:0.7.3-osgi has no file. org.apache.maven.artifact.resolver.artifactnotfoundexception: not find artifact com.envoisolutions.sxc:sxc-runtime:jar:0.7.3-osgi in central (http://repo.maven.apache.org/maven2) org.apache.maven.artifact.resolver.artifactnotfoundexception: not find artifact xpp3:xpp3_min:jar:1.1.3.4.o-osgi in central (http://repo.maven.apache.org/maven2) try downloading file manually project website. then, install using command: mvn install:install-file -dgroupid=xpp3 -dartifactid=xpp3_min -dversion=1.1.3.4.o-osgi -dpackaging=jar -dfile=/path/to/file alternatively, if host own repository can deploy file there: mvn deploy:deploy-file -dgroupid=xpp3 -dartifactid=xpp3_min -dversion=1.1.3.4.o-osgi -dpackaging=jar -dfile=/path/to/file -durl=[url] -drepositoryid=[id] xpp3:xpp3_min:jar:1.1.3.4.o-osgi specified remote repositories: central ...

LinkedIn API using asp.NET -

i'm making social platform university in asp.net. need integrate linkedin api in site fetch profiles, current work , other relevant information. profiles should of people associated university. don't know how use/integrate linkedin api. have read https://developer.linkedin.com/documents/profile-api , http://developer.linkedin.com/documents/linkedin-api-resource-map not understand how use it. please guide me how use/integrate it.

asp.net - How can I count number of data members at runtime in C#? -

this question has answer here: how list of properties of class? 9 answers i have following class in c#. how can count number of data members @ runtime? public static class abc { public static string a; public static string b; public static string c; } bascially, have iterate each datamember , pass function 1 one assign value. thats why need this. if not possible, there other way same here 1 way it: var count = typeof(abc).getfields().length; each element of array returned getfields corresponds data member. in addition getting count, can further examine each field - name, check type , on. can use fieldinfo objects and/or set fields of target class. demo on ideone.

audio - Android playing Music in Background -

i have activity code below: public class player extends activity implements oncompletionlistener, onpreparedlistener, onerrorlistener, onbufferingupdatelistener, musicfocusable { private boolean playstate = false; private string station = "http://38.101.19.5:9157"; public static final float duck_volume = 0.1f; private string artistname = null; private string trackname = null; private textview artist; private textview track; private textview status; private button play; enum audiofocus { nofocusnoduck, // don't have audio focus, , can't duck nofocuscanduck, // don't have focus, can play @ low volume // ("ducking") focused // have full audio focus } private audiofocus maudiofocus = audiofocus.nofocusnoduck; private mediaplayer mplayer = null; private androidshoutcastlib shoutcast; private audiomanager maudiomanager; audiofocushelper ...