Posts

jquery - Syntax error with datepicker -

datepicker working selecting date not saving database. trying several options show in code below still not working. code give me error. how format f.text_field? <div class="form-group"> <label class="control-label col-sm-5" for="time_stop">job date:</label> <div class="col-sm-7"> <%= f.text_field :jobdate, :id => @appointment.jobdate, "data-provide" => 'datepicker', @appointment.jobdate, class: "form-control" %> </div> <script> $(function() { $( "#jobdate" ).datepicker(); }); </script> </div> the error message: /home/ubuntu/workspace/agss/app/views/appointments/_form.html.erb:95: syntax error, unexpected ',', expecting => ...epicker', @appointment.jobdate, class: "form-control" );@out... ... ^ the order of parame...

java - How to extract rar file (AppEngineFile) in Google App Engine -

my application requires extracting rar file in google app engine. can extract rar file using this library supports java.io.file , not support appenginefile. can not find solution solve problem. have ideas ? thanks in advance the junrar library says takes inputstream, not file. you may want try uploading rar files blobstore instead of reading filesystem. can use blobstoreinputstream read data unrar. note since can't write filesystem, you'll need store unpacked data blobstore or datastore.

timezone - Programatically configure Windows Mobile to use an NTP server -

on windows ce, ntp settings stored under [hkey_local_machine\services\timesvc] , can programmatically changed if needed. that key not seem exist on windows mobile, , not find information on how make exact same thing on platform. resources seem discussing windows ce. how programmatically tell windows mobile use ntp server? not sure if helps, on windows desktop / server, at: hkey_local_machine\system\currentcontrolset\services\w32time\parameters\ntpserver

html - Inspect hovered element in Chrome? -

i trying view, through chrome's developer tools, how tooltips structured on site. however, when hovered on item, when "inspect element", nothing shows tooltip in html. know can set style :hover , still can't see html or css of tooltip. any ideas? i found trick twitter bootstrap tooltips. if open dev tools (f12) on monitor, hover on element bring tooltip, right click if select 'inspect element'. leaving context menu open, move focus on dev tools. html tooltip should show next element tooltip in html. can @ if element. if go chrome html disappears aware of. kind of weird way worked me figured share it.

c# - Decouple Windows event loop from DirectX Rendering loop -

is there way decouple windows event loop directx rendering loop when rendering directx , sharpdx via .net? that means want rendering continues when resize window example. yes, need make separate thread windows loop events. you can use systems.threading library. remember rendering should in main thread, create thread windows events, work.

java - Android Studio Theme rendering problems -

this image problem http://imgur.com/uud3its i have tried solutions in other posts , still rendering problems themes in android studio. its quite popular issue novice. there many possibilities of failure not render ui layouts. first , foremost solution resolve going android studio's default recommendations. if still fails resolve need go manual solution. (1.) incompatible api support issue : -- ref same snapshot, there little droid icon number 23(in case). represents latest supporting api. may select lower api no current number (i.e. 22, 21, etc.) , let system render ui layout. if success may again update latest api number (i.e. 23) 2.) there possibilities of inappropriate reference related activity java file/other resources. if submit code 1 able give specific solution problem. cheers! ** update 1 : ** if require try these solutions too. -> not syntax error; means can run app. after launched app on simulator/handset; come de...

C infinite do while loop -

this simple program class prompts user length of or shower in minutes (as positive integer, re-prompting needed) , prints equivalent number of bottles of water (as integer). it assumes shower uses 1.5 gallons of water per minute (192 oz) , plastic bottle size of 16 oz my do-while loop rejects negative numbers , 0, however, if input text such "foo" when prompted length of shower in minutes, program runs infinite loop, forever running loop , printing "how long shower(in minutes)?:" any ideas how refine while condition avoid this? #include <stdio.h> int min_to_bottles(int *n); int main(void) { int minutes; int bottles; { printf("how long shower(in minutes)?:"); scanf("%i", &minutes); } while (minutes < 1); bottles = min_to_bottles(&minutes); printf("equivalent of bottles used per shower is: %i\n", bottles); } int min_to_bottles(int *n) { int bottles; ...