Posts

java - intellisense in eclipse error -

i use eclipse version: 3.4.2 build id: m20090211-1700 problem have when use intellisense error pops out problems during content assist org.eclipse.jdt.ui.java.typecompletionproposalcomputer' plug-in did not complete normally. execution took long return computecontextinformation() operation is there fix it? thanks check, in window > preferences > java > editor > content assist > advanced if there unusual item checked. let java , template proposals checked , apply... maybe 'cause of 1 of other code completion tools.

Why would the return type for a function be specified when it is called in C? -

possible duplicate: need prefixing function (void)… hi, i working c code , author has used syntax unfamiliar with. following call function: (void) msleep(&gactivationcount, null, puser, "com_apple_dts_kext_kauthorama.removelistener", &onesecond); it appear author casting return void or stating function prototype (i because can't resolve function it's prototype), says return value. isn't equivalent to: msleep(&gactivationcount, null, puser, com_apple_dts_kext_kauthorama.removelistener", &onesecond); thanks, scott this old (and extremely eyesore) trick explicitly mark intention ignore return value of function, lint , compilers issue warning. forget ever saw it. on modern compilers, have go out of way turn on warning, , (such gcc) offer extensions flag specific functions ignoring return value dangerous.

core data - "_Unwind_Resume" called upon dead simple fetch request -

i'm trying port on core data code on test mac os application iphone app. set helper method manage of code fetches, , works great on mac os, error on iphone: detected attempt call symbol in system libraries not present on iphone: _unwind_resume called function -[nssqladapter _newselectstatementwithfetchrequest:ignoreinheritance:] in image coredata. here code calls helper method: // authors , title works nsarray *bookinfofetchresults = [self getentitiesbyname:koc_cd_objectkey_bookinfo usingpredicatevalue:@"contentroot.bookinfo.bookauthors > \"\"" withsubstitutionvariables:[nsdictionary dictionarywithobjectsandkeys:nil] inmodel:model andcontext:context sortbyattribute:nil]; int thisresult = 0; int lastresult = [bookinfof...

NServiceBus: Message handler types not loading correctly when configuring via code -

after changing subscriber2 project in pubsub sample, getting error when message received subscriber: error nservicebus.unicast.transport.msmq.msmqtransport [(null)] <(null)> - not extract message data. system.typeloadexception: not handle type 'mymessages.eventmessage'. i changed endpointconfig.cs file this: using nservicebus; namespace subscriber2 { public class endpointconfig : iconfigurethisendpoint, asa_server, iwantcustominitialization { public void init() { configure.with(new[] { typeof(eventmessagehandler), typeof(nservicebus.unicast.transport.completionmessage) }) .defaultbuilder() .xmlserializer() .unicastbus() .donotautosubscribe(); } } } does know why doesn't work? you did not specify message type in list. if use overload of with() have supply types. recommend pointing specific assembly instead , letting nsb s...

Using Ruby, how do I convert all array values to a given type? -

i need convert fixnums strings. solution is: arr.map {|a| a.to_s} is there better way? arr.map(&:to_s) this uses spiffy new feature in ruby >= 1.8.7, "symbol proc" shortcut , , equivalent code in question.

programming a client to send a HTTP request message to a server with a UDP connection in Java -

i need client send http request message server don't know how in udp, using http 1.1 it needs have specific word in method field, specific name in url field , specific integer in version field. so if wanted send http request message had "inform" in method field, "host1" in url field , 40000 in version field, how this? this have doesn't use http, don't know how change it. bufferedreader infromuser = new bufferedreader(new inputstreamreader(system.in)); datagramsocket clientsocket = new datagramsocket(); inetaddress ipaddress = inetaddress.getbyname("this-pc"); byte[] senddata = new byte[128]; byte[] receivedata = new byte[128]; system.out.println("enter:"); string request ="inform "; string sentence = infromuser.readline(); // request.concat("/r/n"); request.concat(sentence); // request.concat("/r/n"); send...

android - Animation BEFORE activity change -

i'm trying simple, can't understand why it's not working. i'm trying is: when touch imageview, show animation on it. , then, when animation ends start new activity. instead, happens new activity starts right away , animation not shown. here animation xml: <rotate android:interpolator="@android:anim/decelerate_interpolator" android:fromdegrees="-45" android:todegrees="-10" android:pivotx="90%" android:pivoty="10%" android:repeatcount="3" android:fillafter="false" android:duration="10000" /> and code use call it: public void oncreate( bundle savedinstancestate ) { final imageview ib = (imageview)this.findviewbyid( r.id.photo ); ib.setonclicklistener( new onclicklistener( ) { @override public void onclick( view v ) { animation hang_fall = animationutils.loadanimation( curriculum.this, r.anim.hang_fall )...