Posts

Featured post

objective c - iPhone - application displays a blank screen when loaded on a real device (sometimes) -

i have iphone application runs fine on simulator , runs fine on real device when connected mac , attached xcode debugger. i can close app , open again no problem. however when remove device mac usb , try use application tries load , gets stuck on blank black screen. other times load , if press home button , launch app again launches fine. the device setup debugging , place app on running on xcode, problem? need change apps settings run on device without issue release version or along lines? edit: i have additional info seems reproduce everytime. it happens if push app background pressing home button, leave device lying there around 5 minutes , when click on icon launch app again see app split second , black screen

http - My application on Glassfish 3.1 won't perform client authentication -

i have application consuming soap service uses transport-level authentication. trying move application tomcat glassfish 3.1. unfortunately, glassfish seems reticent perform client authentication needed soap service. ssl stacktrace results in message "uknown_ca". i have glassfish server configured use keystore contains each of 3 entrust certificates in auth chain (stored -trustcacerts) having imported soap destination server's certificate too. i have tried several from-scratch rebuilds of glassfish server , resorted trying tomcat server's keystore file no luck. does know going on, or else how glassfish provide me more useful information regarding handshake , keystores involved (beyond -djava.net.ssl.debug flag). a co-worker of mine came solution. points andrew. the destination turned out sending unknown_ca message, did not understand ca of key glassfish sending during authentication process. removing jvm argument -dcom.sun.enterprise.security.ht...

javascript - Calling jquery plugin functions on JS callback -

i've searched answer question haven't had success. using audio.js plugin audio playback , stream files with: // within index.html.erb audio.load($('.track_info a', clicked_node).attr('data-src')); audio.play(); when placed in script block on html page, works perfectly. problem i'm having involved attempting call audio plugin through js callback. nothing happens when following: // callback.js.erb audio.load('<%= "#{@song.sample_url}" %>'); audio.play(); even when wrap with: $.getscript('/javascripts/audio.js', function(){ alert("successfully loaded audio."); )}; any ideas? p.s. - other jquery within callback.js.erb work properly. try this: $.getscript('/javascripts/audio.js', function(){ audio.load('<%= @song.sample_url %>'); audio.play(); )};

c - Binary matrix vector multiplication -

i want multiply 8x8 binary matrix represented unsigned 64 bit integer 8 bit vector represented unsigned char. however, due other issues matrix must be ordered columns, ergo there's no easy matching of bytes easy multiplication. any idea how speed such calculation? every operation counts need billions of such calculations made. the multiplications made on 2 element field (f-2). with matrix , vector representation, helps matrix multiplication way: (col 1 ... col 8 ) * (v 1 ... v 8 ) t = col 1 * v 1 + ... + col 8 * v 8 where matrix = (col 1 ... col 8 ) and column vector v = (v 1 ... v 8 ) t thinking further, can multiplications @ once if inflate 8-bit vector 64-bit vector repeating every bit 8 times , calculating p = & v_inflated . thing left then, addition (i.e. xor) of products. a simple approach xoring products is. uint64_t p = calculated products text above; uint64_t sum = 0; for( int = 8; i; --i ) { sum ^= p & 0xff; p >> ...

xml - Oracle - Automate Export/Unload of Data -

oracle sql developer has option export contents of query result various formats (csv/fixed width/excel/xml). there way automate it? if not, free tools available let me automate exports same formats sql developer capable of exporting to? i don't know of way automate sql developer exports, no. however, it's easy enough generate csv and/or fixed width files pl/sql (using utl_file package). tom kyte has example of programs generate csv or fixed width files using either pl/sql or pro*c. either can relatively automated using favorite scheduler. xml outputs can automated in same way depending on how control need on xml generated. if need valid xml , don't care format of xml, can using dbms_xmlgen package (this example straight documentation). declare qryctx dbms_xmlgen.ctxhandle; result clob; begin qryctx := dbms_xmlgen.newcontext('select * hr.employees'); -- set row header employee dbms_xmlgen.setrowtag(qryctx, 'employee'); -...

ios - UIButton - text truncated -

i've created wide uibutton interface builder (xcode 4), added in dummy 5 character title (e.g. click) , changed title text programmatically later. odd thing width of title text seems remain same so, if use longer piece of text (e.g. "now click here"), appears this: "n...e" any idea what's going on? update: if use long line of text in ib it's centred. however, once i've programmatically-changed text appears left-aligned! you need use uibutton method settitle:forstate: [self.mybutton settitle:@"correct new title" forstate:uicontrolstatenormal]; as correctly update size , position of buttons label. setting title self.mybutton.titlelabel.text = @"wrong new title"; not.

shell - sh: How do I avoid clobbering numbered file descriptors? -

when have exec 3>>file # file descriptor 3 points file [ $dryrun ] && exec 3>&1 # or possibly stdout echo "running">&3 exec 3>&- # , closed i'm worried file descriptor 3 may have pointed outside of function in question. how can handle this? is there builtin next_available_fd ? is there way duplicate fd3 variable, dup once function done? and should worry threading , concurrent writes fd3 in case? i'm in sh, maybe bash/ksh/zsh has answer this? instead of using exec redirect file descriptor within function, can (with bash, haven't tried other shells) do: foo() { test $dryrun && exec 3>&1 echo running >&3 } 3>>file foo more_commands in setup, "running" go either file or original stdout depending on $dryrun, , more_commands have fd 3 before foo called.