diff --git "a/test_predictions.txt" "b/test_predictions.txt" new file mode 100644--- /dev/null +++ "b/test_predictions.txt" @@ -0,0 +1,46009 @@ +I O +am O +using O +custom O +adapter B-Application +which O +I O +use O +for O +my O +ListView B-Class +. O +After O +creating O +ArrayList B-Class +I O +have O +the O +following O +code O +in O +my O +app O +: O +However O +, O +when O +I O +try O +to O +click O +on O +the O +checkbox B-Class +, O +nothing O +happens O +. O +So O +I O +have O +to O +manage O +toggling O +checkbox B-Class +state O +manually O +. O +Then O +it O +works O +. O +( O +before O +that O +I O +have O +to O +remove O +setChoiceMode B-Function +method O +call O +) O +So O +what O +could O +be O +the O +problem O +? O +Why O +there O +is O +no O +effect O +? O +my O +R.layout.listview_item_text.xml B-File_Name +In O +my O +adapter B-Application +I O +inflate O +checkbox B-Class +layout B-Variable +with O +the O +following O +code O +: O + +listview_item_checkbox.xml B-File_Name +I O +believe O +that O +you O +have O +to O +use O +a O +widget B-Class +that O +implements O +Checkable B-Class +. O +Try O +with O +android.R.layout.simple_list_item_multiple_choice B-Function +. O +If O +you O +need O +two O +lines O +then O +implement O +something O +similar O +. O +Instead O +of O +your O +code O +: O +Try O +something O +like O +this O +: O +If O +you O +can O +- O +improve O +yur O +code O +( O +create O +CheckableFrameLayout B-Class +as O +parent O +layout O +of O +your O +List B-Class +Item I-Class +) O +. O +ListView B-Class +keep O +BooleanSparseArray B-Data_Type +of O +checked O +positions O +( O +you O +can O +get O +it O +with O +method O +getCheckedItemPositions()) B-Function +. O +In O +code O +( O +grepcode O +) O +it O +set B-Function +View B-Variable +checked I-Function + +or O +not O +by O +itself O +only O +if O +View B-Class +is O +implementing O +Checkable B-Class +. O +If O +create B-Function +CheckableFrameLayout B-Class +and O +sat O +as O +main O +parent O +, O +you O +do O +not O +have O +to O +handle O +these O +cases O +in O +the O +adapter B-Application +. O +I O +am O +running O +this O +on O +a O +mac B-Device +and O +it O +compiles O +in O +the O +terminal B-Application +but O +after O +i O +type O +in O +java B-Language +Lab9 I-Application +it O +does O +n't O +do O +anything O +. O +Below O +is O +exactly O +what O +i O +put O +into O +the O +terminal B-Application +//compiles O +but O +does O +not O +run O +The O +program O +is O +waiting O +for O +your O +input O +. O +Add O +a O +prompt O +: O +i O +'m O +developing O +a O +android B-Operating_System +application O +which O +will O +detect O +traffic O +jams O +and O +map O +on O +openstreetmaps.in B-Application + +navigating O +between O +my O +current O +location O +and O +the O +destination O +if O +a O +traffic O +jam O +is O +detected O +the O +application O +should O +suggest O +all O +the O +other O +alternative O +routes.how O +can O +i O +get O +these O +alternative O +routes O +from O +openstreetmaps B-Website +. O +A1 B-Value +- O +alternative O +route O +1 O +, O +A2 B-Value +- O +alternative O +route O +2 O +Some O +of O +the O +online O +routers O +for O +OSM B-Device +have O +an O +avoid O +areas O +feature O +. O +GraphHopper B-Library +allows O +you O +to O +make O +the O +routing O +influenced O +by O +traffic O +information O +. O +I O +'ve O +blogged O +recently O +about O +it O +here O +. O +Or O +you O +can O +just O +block O +certain O +streets O +with O +the O +blocking O +weighting O +described O +here O +. O +I O +need O +to O +design O +a O + +database O +for O +storing O +skills O +for O +a O +person O +, O +a O +person O +can O +have O +none O +, O +one O +or O +several O +skills O +, O +what O +is O +a O +good O +way O +to O +store O +it O +when O +it O +comes O +to O +easy O +modification O +of O +skill O +and O +fast O +search O +? O +I O +have O +been O +thinking O +1 O +. O +use O +a O +bit B-Data_Structure +array B-Data_Structure +, O +each O +bit B-Data_Structure +position O +represents O +a O +skill O +, O +2 O +. O +a O +relation O +table B-Data_Structure +that O +each O +row B-Data_Structure +link O +a O +person O +to O +a O +SKILL B-Variable +3 O +. O +each O +skill O +as O +a O +field O +in O +the O +table B-Data_Structure +of O +the O +person O +Any O +other O +suggestion O +or O +what O +should O +I O +aim O +for O +? O +It O +'s O +a O +clasic O +many O +to O +many O +relationship O +so O +I O +would O +suggest O +a O +persons O +table B-Data_Structure +, O +skills O +table B-Data_Structure +and O + +a O +personToSkill B-Variable +table B-Data_Structure +. O +You O +other O +suggested O +solutions O +might O +be O +tempting O +at O +first O +, O +but O +they O +are O +both O +a O +maitnence O +hell O +. O +First O +, O +we O +need O +a O +persons B-Class +table B-Data_Structure +( O +all O +code O +examples O +use O +MySQL B-Application +syntax O +) O +: O +And O +pretend O +this O +is O +the O +data O +in O +the O +table B-Data_Structure +: O +Then O +we O +need O +a O +skills B-Variable +table B-Data_Structure +to O +hold O +all O +known O +skills O +: O +Finally O +we O +need O +a O +table B-Data_Structure +that O +associates O +a O +person B-Variable +with O +a O +skill B-Variable +: O +The O +primary B-Variable +key I-Variable +is O +defined O +so O +that O +no O +person O +can O +be O +associated O +with O +the O +same O +skill B-Variable +more O +than O +once O +and O +both O +columns B-Data_Structure +are O +foreign B-Variable +key I-Variable +to O +their O +respective O +tables B-Data_Structure +. O +Assume O +the O + +data O +below O +: O +This O +data O +would O +indicate O +that O +John B-User_Name +Doe I-User_Name +, O +Benny O +Hill O +and O +Linus B-Website +Torvalds O +all O +have O +the O +skill O +" O +Swimming O +" O +. O +Benny O +Hill O +and O +Donald B-User_Name +Knuth O +are O +both O +pilots O +. O +Linus B-User_Name +Torvalds I-User_Name +created O +a O +kernel O +. O +And O +Donald B-User_Name +Knuth O +is O +a O +writer O +. O +None O +of O +the O +persons O +are O +an O +Astronaut B-Website +.. O +. O +I O +am O +using O +an O +alarm B-Class +manager I-Application +and O +I O +have O +n't O +been O +able O +to O +maintain O +the O +alarms B-Device +when O +the O +system O +reboots O +so O +, O +I O +have O +read O +that O +I O +should O +use O +a O +boot B-Class +receiver I-Class +which O +extends O +broadcastReceiver B-Class +but O +I O +want O +to O +know O +the O + +exact O +difference O +between O +the O +receiver B-Class +itself O +and O +the O +boot B-Class +receiver I-Class +. O +The O +onReceive B-Function +method O +of O +my O +broadcastReceiver B-Class +actually O +takes O +me O +to O +a O +new O +activity B-Class +using O +an O +intent B-Class +should O +i O +use O +this O +code O +and O +paste O +it O +in O +the O +onReceive B-Function +of O +the O +bootReceiver B-Class +? O +or O +what O +exactly O +should O +I O +write O +in O +the O +bootReceiver B-Class +? O +I O +am O +very O +confused O +about O +this O +point O +because O +I O +have O +multiple O +alarms O +and O +I O +have O +given O +each O +one O +a O +unique O +requestCode B-Variable +. O +There O +is O +no O +separate O +entity O +" O +Boot B-Class +Receiver I-Class +" O +in O +Android B-Operating_System +. O +Boot B-Class +receiver I-Class +is O +just O +broadcast B-Class +receiver I-Class +which O +responds O +to O +intent B-Class +with O +action O + +android.intent.action.BOOT_COMPLETED B-Class +. O +I O +believe O +you O +will O +need O +to O +do O +couple O +of O +things O +: O +Create O +a O +class O +which O +will O +inherit O +from O +BroadcastReceiver B-Class +Add O +it O +to O +Manifest B-File_Name +and O +add O +info O +that O +it O +should O +handle O +android.intent.action.BOOT_COMPLETED B-Class +in O +onReceive B-Function +code O +read O +all O +your O +alarms O +from O +persistent O +storage O +and O +set O +them O +again O +( O +so O +, O +they O +will O +be O +set O +again O +after O +each O +reboot O +) O +. O +P.S O +. O +I O +recommend O +to O +read O +through O +: O +http://developer.android.com/reference/android/content/BroadcastReceiver.html O +I O + +am O +practicing O +for O +Java B-Language +fresher O +interview O +coding O +examples O +. O +I O +am O +trying O +to O +write O +a O +program O +to O +find O +duplicate O +numbers O +between O +1 B-Value +to O +N B-Variable +, O +where O +N B-Variable +is O +given O +by O +the O +user O +along O +with O +the O +numbers O +themselves O +. O +Here O +is O +the O +code O +: O +But O +I O +am O +getting O +following O +error O +in O +Eclipse B-Application +Neon I-Application +: O +What O +is O +wrong O +? O +Why O +the O +JVM B-Application +heap I-Error_Name +space I-Error_Name +error O +? O +Code O +compiles O +and O +runs O +fine O +. O +DataInputStream O +is O +for O +binary B-Data_Type +not O +text B-Data_Type +. O +When O +you O +type O +4 O +bytes O +, O +this O +is O +turned O +into O +a O +32-bit O +int B-Data_Type +value O +e.g O +. O +5 B-Value +, O +\n B-Value +, O +\n B-Value +, O + +\n B-Value +is O +about O +900 O +million O +which O +is O +why O +it O +complains O +about O +memory O +when O +you O +create O +the O +array B-Data_Structure +. O +You O +can O +check O +this O +by O +stepping O +through O +the O +code O +in O +your O +debugger B-Application +. O +What O +you O +need O +is O +text O +input O +, O +try O +using O +Try O +using O +a O +Scanner B-Class +for O +your O +class O +instead O +. O +Here O +'s O +a O +basic O +example O +: O +I O +'m O +scrapping O +through O +a O +website O +to O +get O +product O +informations O +to O +be O +used O +on O +my O +web O +app O +. O +An O +example O +of O +a O +product O +attributes O +are O +My O +plan O +is O +to O +store O +all O +of O +the O +products O +' O +information O +on O +my O +server B-Application +and O +call O +them O +from O +my O +web O +app O +. O +Is O +it O +smart O +move O +to O +store O +img B-File_Type +files O +to O +my O +server/link B-Application + +them O +on O +mysql B-Application +DB I-Application +then O +call O +it O +from O +the O +web O +or O +will O +it O +be O +fast O +enough O +to O +just O +call O +the O +img B-HTML_XML_Tag +on O +my O +web O +app O +using O +the O +original O +img B-HTML_XML_Tag +src B-HTML_XML_Tag +url O +( O +from O +the O +original O +website O +) O +It O +depends O +on O +the O +performance O +of O +your O +setup O +compared O +to O +theirs O +for O +any O +given O +user O +depending O +on O +where O +they O +are O +on O +the O +planet O +. O +I O +think O +it O +'s O +safe O +to O +assume O +that O +any O +differences O +would O +be O +marginal O +assuming O +you O +are O +serving O +up O +the O +same-sized O +image B-User_Interface_Element +. O +However O +, O +the O +original O +website O +might O +not O +like O +it O +if O +you O +are O +hot O +linking O +to O +their O +images B-User_Interface_Element +. O +Also O +if O +they O +change O +their O +filenames O +or O +images B-User_Interface_Element +your O +links O +will O + +break O +. O +I O +'ve O +custom O +list B-Class +view I-Class +layout O +. O +The O +items O +in O +list B-Variable +are O +going O +to O +be O +5 O +or O +more O +. O +If O +more O +than O +say O +, O +5-10 O +items O +are O +there O +in O +list B-Variable +, O +it O +looks O +good O +. O +But O +if O +there O +are O +say O +only O +5 O +items O +, O +then O +blank O +space O +appears O +below O +list B-Data_Structure +on O +devices O +larger O +in O +height O +. O +This O +does O +not O +look O +good O +. O +following O +is O +my O +list B-User_Interface_Element +row I-User_Interface_Element +layout O +- O +And O +listview B-Class +- O +What O +I O +desire O +is O +, O +if O +height B-Variable +of O +device O +is O +larger O +then O +I O +want O +list B-Variable +to O +take O +complete O +height B-Variable +by O +scaling O +height B-Variable +of O +each O +row B-User_Interface_Element +in O +way O +that O +it O +should O +display O +all O +items O +w/o O +scroll O +. O +If O +items O +are O +more O + +then O +scroll B-User_Interface_Element +should O +appear O +. O +How O +can O +I O +set O +this O +up O +? O +Update O +I O +can O +opt-in O +for O +a O +solution O +where O +I O +'d O +check O +how O +many O +items O +are O +going O +to O +be O +there O +in O +list B-Data_Structure +before O +and O +if O +they O +are O +less O +than O +5-6 B-Value +, O +I O +'d O +choose O +a O +different O +layout O +consisting O +of O +LinearLayout B-Class +or O +something O +that O +would O +fill O +up O +the O +blank O +space O +. O +But O +I O +ca O +n't O +figure O +out O +the O +structure O +I O +need O +to O +choose O +for O +such O +LinearLayout B-Class +. O +Should O +I O +choose O +5-6 B-Value +LinearLayout B-Class +below O +one O +another O +or O +a O +single O +with O +iteration O +? O +Well O +, O +in O +my O +view O +if O +I O +need O +to O +implement O +such O +a O +function O + +, O +I O +'ll O +do O +like O +below O +: O +check O +if O +there O +exist O +blank O +you O +dont O +want(blankHeight=(ListViewHeight-count*rowHeight)>0) O +heightToPlus B-Code_Block += I-Code_Block +blankHeight/count I-Code_Block +then O +you O +can O +set O +the O +height B-Variable +of O +each O +row O +to O +rowHeight+heightToPlus B-Variable +every O +height B-Variable +can O +be O +get O +by O +getHeight B-Function +and O +also O +can O +be O +set O +by O +setHeight B-Function +, O +they O +'re O +method O +of O +view O +. O +So O +i O +think O +it O +not O +hard O +to O +implement O +.. O +. O +Is O +there O +a O +way O +to O +show O +the O +error O +message O +of O +customValidator O +without O +POSTBACK B-Class +? O +I O +have O +used O +both O +requiredFieldValidator B-Class +and O +customValidator O +. O +The O +fomer O +can O +be O +inline O + +and O +can O +show O +error O +message O +without O +postback O +. O +Is O +this O +possible O +for O +customValidator O +? O +Option O +1 O +: O +Whenever O +I O +create O +a O +custom O +validator B-Class +, O +I O +try O +to O +create O +a O +server B-Application +and O +client B-Application +side O +validation O +methods O +to O +validate O +. O +creating O +a O +client B-Application +side O +method O +will O +avoid O +unnecessary O +postback O +. O +As O +a O +safety O +measure O +, O +server B-Application +side O +method O +should O +be O +present O +. O +Example O +: O +Option O +2 O +: O +It O +is O +not O +always O +possible O +to O +build O +a O +client B-Application +side O +validation O +method O +. O +There O +you O +can O +use O +update B-Class +panel I-Class +to O +hide O +those O +postbacks O +. O +you O +can O +use O +Update B-Class +Panel I-Class +ajax I-Class +to O +this O +action O +without O +postback O +. O +I O +am O +trying O +to O +install O +homebrew B-Application + +according O +to O +the O +guidelines O +described O +in O +here O +. O +I O +have O +curl B-Library +and O +rvm B-Library +, O +and O +want O +to O +install O +rails B-Library +1.9.3 B-Version +on O +my O +lion B-Application +1.7.4 B-Version +with O +Xcode B-Application +4.3.2 B-Version +and O +with O +developer O +command B-Application +line I-Application +tools O +installed O +. O +It O +seems O +I O +will O +need O +libksba B-Library +, O +which O +requires O +me O +to O +use O +to O +command O +brew I-Application +install O +libksba B-Library +. O +So O +I O +will O +need O +Home B-Application +Brew I-Application +. O +I O +follow O +the O +instructions O +and O +use O +/usr/bin/ruby B-Code_Block +-e I-Code_Block +" I-Code_Block +$ I-Code_Block +( I-Code_Block +/usr/bin/curl B-Code_Block +-fsSL I-Code_Block + +https://raw.github.com/mxcl/homebrew/master/Library/Contributions/install_homebrew.rb O +) O +" O +which O +outputs O +the O +following O +: O +So O +this O +means O +basically O +that O +brew B-Language +was O +not O +installed O +right O +. O +Do O +I O +have O +to O +change O +the O +path O +at O +which O +it O +is O +looking O +for O +? O +I O +used O +to O +have O +MacPorts B-Device +in O +, O +which O +I O +completely O +erased O +so O +there O +should O +be O +no O +conflicts O +there O +. O +Please O +help O +!! O +! O +Thanks O +a O +lot O +! O +It O +'s O +an O +awesome O +community O +. O +UPDATE O +: O +I O +time O +machined O +back O +a O +year O +because O +I O +thought O +I O +did O +something O +critically O +wrong O +. O +Now O +I O +still O +have O +an O + +issue O +installing O +, O +but O +it O +seems O +a O +bit O +more O +common O +. O +I O +installed O +homebrew B-Application +using O +Any O +command O +of O +" O +brew B-Code_Block +" O +gives O +me O +this O +error O +: O +Any O +suggestions O +? O +Thank O +you O +all O +! O +I O +had O +the O +same O +problem O +as O +mentioned O +in O +my O +comment O +above O +. O +To O +resolve O +it O +I O +ended O +up O +having O +to O +restore O +my O +default O +system O +ruby B-Language +. O +I O +am O +on O +SnowLeopard B-Operating_System +- B-Version +OSX I-Operating_System +10.6.8 B-Version +, O +so O +your O +resources O +may O +vary O +, O +but O +what O +I O +did O +was O +: O +uninstall O +xcode B-Code_Block +: O +sudo B-Code_Block +/Developer/Library/uninstall I-Code_Block +-devtools I-Code_Block +--mode I-Code_Block += I-Code_Block +all I-Code_Block +rsync I-Code_Block +or O +copy B-Code_Block + +/System/Library/Frameworks/Ruby.framework B-File_Name +from O +another O +machine O +running O +10.6.8 B-Version +You O +also O +need O +the O +ruby B-Language +executables O +in O +/usr/bin B-File_Name +to O +point O +to O +the O +system O +Ruby B-Language +: O +/usr/bin/{erb,gem,irb,rdoc,ri,ruby,testrb} B-Code_Block +these O +are O +just O +symlinks O +to O +/System/Library/Frameworks/Ruby.framework B-File_Name +erb I-File_Name +-> O +../../System/Library/Frameworks/Ruby.framework/Versions/Current/usr/bin/erb B-File_Name +so O +I O +re-symlinked O +them O +, O +for O +example O +from O +/usr/bin B-File_Name +: O +sudo B-Code_Block +ln I-Code_Block +-s I-Code_Block + +../../System/Library/Frameworks/Ruby.framework/Versions/Current/usr/bin/erb I-File_Name +./erb I-File_Name +the O +brew B-Code_Block +executable O +currently O +uses O +/usr/bin/ruby B-File_Name +so O +that O +needs O +to O +be O +there O +in O +the O +least O +I O +hear O +future O +versions O +of O +brew B-Library +will O +point O +directly O +at O +the O +system O +ruby B-Language +on O +the O +/System/Library/Frameworks/Ruby.framework B-File_Name +path O +, O +so O +symlinking O +ruby B-Language +to O +a O +custom O +install O +is O +a O +bad O +idea O +At O +this O +point O +brew B-Application +commands O +worked O +again O +and O +ostruct B-Application +( O +part O +of O +ruby B-Language +standard O +lib O +) O +was O +again O +found O +. O +I O +went O +ahead O +and O +added O +xcode B-Application +back O +in O +and O +worked O +through O +some O +minor O +' O + +brew I-Application +doctor O +' O +errors O +. O +I O +have O +now O +replaced O +all O +my O +old O +macports B-Device +packages O +with O +homebrew B-Application +packages O +and O +its O +such O +an O +improvement O +! O +I O +have O +a O +dictionary B-Data_Structure +with O +5000 O +keys O +who O +'s O +values O +are O +lists B-Data_Structure +, O +I O +need O +to O +determine O +quickly O +the O +length O +of O +the O +longest O +string B-Data_Type +for O +a O +given O +index O +in O +all O +of O +the O +dictionary B-Data_Structure +values O +expected O +output O +: O +5 O +, O +because O +of O +all O +of O +the O +values O +at O +index O +1 B-Value +( O +' O +defg I-Code_Block +' O +and O +' B-Value +klmno'` I-Value +, O +the O +latter O +is O +the O +longest O +) O +. O +You O +need O +to O +use O +a O +generator O +expression O +to O +extract O +the O +right O +index O +: O +If O +all O +you O +need O +is O +the O +length O +, O + +not O +the O +string B-Data_Type +itself O +, O +you O +may O +as O +well O +get O +the O +length O +in O +the O +generator O +expression O +: O +Demo O +: O +You O +ca O +n't O +escape O +having O +to O +iterate O +over O +all O +values O +in O +the O +dictionary B-Data_Structure +however O +. O +First O +, O +extract O +all O +the O +strings B-Data_Type +of O +interest O +with O +a O +list B-Data_Structure +comprehension O +: O +Next O +, O +take O +max B-Variable +over O +the O +lens O +of O +the O +strings B-Data_Type +: O +I O +got O +some O +strange O +behaviour O +using O +grails B-Library +2.3.x B-Version +and O +async B-Class +. O +I O +'m O +doing O +some O +test O +with O +this O +code O +: O +but O +in O +my O +log O +i O +got O +: O +In O +fact O +the O +tasks O +( O +and O +onError B-Function +closure O +) O +are O +executed O +, O +but O +onComplete B-Function +is O +not O +( O + +off O +course O +) O +! O +! O +what O +am O +i O +doing O +wrong O +? O +except O +for O +the O +Thread.sleep() B-Function +is O +pratically O +code O +taken O +from O +doc O +: O +http://grails.org/doc/latest/guide/async.html O +Is O +Thread.sleep() B-Function +not O +compatible O +with O +GPars B-Class +for O +some O +reason O +? O +The O +problem O +is O +that O +onComplete B-Function +does O +not O +block O +. O +The O +request/action O +does O +finish O +before O +your O +tasks O +and O +list B-Data_Structure +goes O +out O +of O +scope O +. O +You O +need O +to O +use O +waitAll() B-Function +to O +wait O +for O +all O +tasks O +to O +finish O +before O +the O +action O +returns O +. O +Easiest O +is O +to O +replace O +the O +onComplete B-Function +with O +list.get() B-Function +is O + +implemented O +by O +calling O +waitAll() B-Function +. O +Whenever O +I O +go O +into O +the O +tab O +TroubleShooting->Logs O +and O +Trace->Server O +I O +get O +the O +general O +properties O +section O +in O +which O +there O +'s O +only O +a O +link O +of O +Change B-Variable +Log I-Variable +Details O +Level O +. O +I O +'ve O +changed O +the O +tracing O +inside O +to O +reflect O +for O +my O +apps O +. O +But O +beyond O +this O +option O +I O +'m O +not O +able O +to O +see O +the O +log B-File_Type +files O +inside O +WAS B-Application +. O +We O +have O +WAS B-Application +on O +Z/OS B-Operating_System +and O +I O +'m O +able O +to O +view O +logs B-File_Type +on O +the O +mainframe O +. O +Is O +there O +any O +file O +or O +script O +that O +we O +need O +to O +run O +to O +enable O +JVM B-Application +logs O +? O +On O +AIX B-Operating_System +, O +linux B-Operating_System +and O +Windows B-Operating_System +, O +when O + +I O +go O +TroubleShooting O +-> O +Logs O +and O +Trace O +-> O +Server O +, O +I O +get O +several O +links O +in O +general O +properties O +section O +, O +one O +of O +which O +is O +' O +Diagnostic O +Trace O +' O +through O +which O +I O +can O +enable/disable O +tracing O +and O +configure O +where O +the O +log B-File_Type +files O +shall O +be O +located O +at O +, O +their O +sizes O +, O +rollover O +settings O +etc O +. O +The O +fact O +that O +you O +do O +n't O +see O +this O +link O +either O +suggests O +this O +is O +something O +z/OS B-Application +specific O +, O +or O +you O +do O +n't O +have O +privileges O +to O +perform O +runtime O +operations O +. O +You O +may O +check O +if O +you O +'re O +logging O +in O +with O +a O +user O +that O +is O +in O +Administrators O +group O +( O +you O +may O + +check O +you O +user O +at O +Users O +and O +Groups O +-> O +Administrative O +User O +Roles O +) O +. O +There O +are O +two O +tabs B-User_Interface_Element +at O +the O +screen B-Device +that O +you O +change O +trace O +options O +, O +namely O +' O +configuration O +' O +and O +' O +runtime O +' O +. O +If O +you O +are O +making O +changes O +at O +configuration O +tab B-User_Interface_Element +, O +you O +have O +to O +recycle O +the O +server B-Application +for O +trace B-Variable +string B-Data_Type +to O +become O +active O +. O +You O +may O +try O +using O +Runtime O +tab B-User_Interface_Element +if O +you O +have O +n't O +done O +so O +. O +You O +may O +try O +enabling O +trace O +using O +wsadmin B-Application +as O +in O + +http://pic.dhe.ibm.com/infocenter/wasinfo/v6r1/index.jsp?topic=%2Fcom.ibm.websphere.express.doc%2Finfo%2Fexp%2Fae%2Ftxml_profiletrace.html O +turn O +on O +trace O +( O +putting O +your O +own O +trace O +string B-Data_Type +) O +turn O +off O +trace O +I O +got O +a O + B-HTML_XML_Tag +and O +want O +to O +use O +today B-Value +'s O +date O +as O +placeholder O +. O +My O +attempt O +is O +to O +use O +OmniFaces B-Library +#{now} B-Code_Block +in O +combination O +with O +a:placeholder O +for O + +this O +: O +Where O +someproperty O +is O +a O +java.util.date B-Data_Type +. O +This O +is O +working O +so O +far O +, O +but O +I O +want O +to O +format O +the O +date O +like O +dd.MM.yyyy B-Value +HH:mm I-Value +. O +How O +can O +I O +achieve O +this O +? O +Use O +of:formatDate() O +function O +in O +EL O +: O +Or O +if O +you O +'d O +like O +to O +reuse O +calendar B-User_Interface_Element +component O +'s O +own O +pattern O +attribute O +: O +See O +also O +: O +What O +exactly O +is O +#{component} B-Variable +in O +EL O +? O +I O +'m O +hoping O +someone O +can O +point O +me O +in O +the O +right O +direction O +; O +I O +think O +I O +'m O +getting O +close O +but O +I O +'ve O +never O +done O +threading O +and O +keep O +getting O +stuck O +on O +syntax/concepts O +. O +The O +first O +part O +I O + +believe O +is O +working O +, O +however O +I O +have O +a O +lovely O +WPF B-Error_Name +error O +regarding O +the O +owner O +of O +the O +thread O +. O +I O +know O +somehow O +I O +'ve O +got O +get O +at O +the O +thread O +with O +Dispatcher B-Class +or O +BackGroundWorker B-Class +but O +time O +is O +getting O +short O +- O +I O +'m O +hitting O +too O +many O +walls O +to O +solve O +it O +alone O +tonight O +. O +Here O +is O +the O +part O +I O +'m O +failing O +at O +: O +Now O +this O +next O +bit O +, O +I O +believe O +is O +either O +A O +) O +Working O +or O +B O +) O +fooling O +me O +as O +I O +'ve O +yet O +to O +prove O +it O +:) O +. O +Finally O +the O +exact O +error O +is O +The O +calling O +thread O +cannot O +access O +this O +object O +because O +a O +different O +thread O +owns O +it O + +. O +I O +'m O +going O +to O +be O +tackling O +this O +again O +in O +a O +couple O +of O +hours O +once O +I O +'ve O +had O +chance O +to O +eat O +and O +read O +, O +again O +. O +However O +if O +anyone O +can O +tell O +me O +what O +the O +glaring O +silliness O +that O +I O +'ve O +not O +quite O +got O +my O +head O +around O +, O +I O +'d O +be O +rather O +grateful O +! O +! O +The O +context O +is O +an O +Entity B-Library +Framework I-Library +5 B-Version +ObservableCollection B-Class +with O +child O +navigation O +filtered O +properties-I O +do O +n't O +think O +the O +code O +quite O +says O +it O +:) O +. O +Thank O +you O +:) O +. O +As O +requested O +, O +the O +exception B-Class +I O +get O +. O +This O +occurrs O +in O +the O +repository O +code O +. O +The O +Thread O +stuff O +is O +a O + +red O +herring O +. O +InnerException O +: O +This O +is O +the O +entire O +exception B-Class +and O +it O +occurs O +here O +: O +I O +'ve O +been O +through O +the O +articles O +last O +night O +, O +whilst O +I O +understand O +it O +a O +little O +better O +now O +I O +'m O +still O +struggling O +to O +apply O +it O +to O +the O +repository O +class O +. O +This O +is O +usually O +a O +combination O +of O +syntax O +confusion O +and O +not O +quite O +getting O +it O +on O +my O +part O +. O +I O +'ve O +a O +feeling O +that O +I O +should O +be O +able O +to O +split O +out O +part O +of O +the O +operation O +in O +the O +getfiltered O +residents O +into O +an O +await B-Function +task O +but O +have O +n't O +managed O +to O +figure O +it O +out O +just O +yet O +. O +Today O +'s O +job O +- O +if O +entity B-Application +framework O +can O +be O + +used O +this O +way O +! O +Hello O +to O +every O +Wordpress B-Application +genius I-Application +, O +I O +have O +a O +question O +and O +you O +might O +help O +. O +I O +'ve O +created O +a O +single-page O +site O +with O +Bootstrap B-Library +and O +uploaded O +it O +as O +a O +template O +to O +Wordpress B-Application +. O +Now O +I O +would O +like O +to O +edit O +some O +parts O +of O +the O +site O +( O +mostly O +some O +text O +) O +in O +the O +Wordpress B-Application +CMS I-Application +instead O +of O +rewriting O +the O +HTML B-File_Type +file O +. O +Does O +anyone O +know O +how O +to O +do O +it O +or O +know O +a O +detailed O +tutorial O +? O +I O +have O +spent O +ages O +googling O +it O +but O +no O +success O +so O +far O +. O +Thank O +you O +for O +any O +advice O +and O +have O +peaceful O +holidays O +! O +I O +'m O +attempting O +to O +build O +a O + +nested O +relationship O +using O +Django B-Library +Rest I-Library +Framework I-Library +3.0 B-Version +. O +I O +'ve O +created O +my O +serializers B-Class +and O +have O +attempted O +to O +override O +the O +create() B-Function +function O +. O +My O +models O +are O +defined O +as O +follows O +: O +As O +you O +'ll O +note O +, O +I O +can O +have O +multiple O +prices B-Class +for O +my O +items O +. O +My O +serializers B-Class +are O +defined O +as O +follows O +: O +When O +I O +try O +and O +POST O +a O +new O +item O +: O +I O +get O +the O +following O +error O +: O +Presumably O +because O +the O +Price B-Class +serializer I-Class +has O +no O +idea O +what O +the O +ID B-Variable +of O +the O +new O +item O +is O +. O +I O +'ve O +tried O +overriding O +this O +functionality O +in O +the O +create() B-Function +function O +of O +my O +serializer B-Class +, O +but O +it O +appears O + +as O +though O +the O +serializer B-Class +'s O +validation O +is O +being O +hit O +before O +I O +have O +the O +opportunity O +to O +create O +the O +item O +and O +associate O +it O +with O +the O +price B-Variable +. O +So O +- O +How O +do O +I O +create O +a O +new O +item O +, O +get O +the O +item O +ID B-Variable +, O +and O +then O +create O +each O +of O +the O +new O +prices B-Variable +? O +The O +problem O +is O +that O +your O +PriceSerializer B-Class +is O +looking O +for O +the O +item O +key O +because O +it O +is O +specified O +on O +the O +Price B-Class +model O +. O +This O +is O +n't O +immediately O +obvious O +because O +you O +are O +using O +Meta.exclude B-Variable +instead O +of O +Meta.fields B-Variable +. O +Is O +the O +same O +as O +writing O +Which O +makes O +it O +very O +clear O +what O +your O +issue O +is O +. O +Because O +your O +item O +field O +on O +the O +model O +does O +not O +have O +empty O + += I-Code_Block +True I-Code_Block +( O +or O +null B-Code_Block += I-Code_Block +True I-Code_Block +) O +set O +, O +Django B-Library +REST I-Library +Framework O +automatically O +generates O +it O +as O +a O +PrimaryKeyRelatedField B-Class +with O +required B-Code_Block += I-Code_Block +True I-Code_Block +. O +This O +is O +why O +you O +are O +getting O +the O +This O +field O +is O +required B-Error_Name +is I-Error_Name +required I-Error_Name +error O +, O +because O +Django B-Library +REST I-Library +Framework I-Library +cannot O +automatically O +detect O +that O +it O +is O +coming O +from O +a O +parent O +serializer B-Class +which O +already O +has O +that O +field O +. O +You O +can O +get O +around O +this O +by O +removing O +the O +field O +from O +the O +serializer B-Class +, O +as O +it O +does O +n't O +appear O +to O +ever O +be O +needed O +. O +This O +will O +no O +longer O +display O +the O +item O +field O +though O +, O +but O +I O +suspect O +this O +is O + +n't O +actually O +an O +issue O +for O +you O +. O +I O +want O +to O +wrap O +particular O +lines O +in O +a O +text O +mass O +with O + B-Code_Block +First O +line O +in O +the O +text O +All O +lines O +with O +a O +previous O +empty O +line O +( O +eg O +two O +newlines O +before O +) O +I O +'m O +using O +preg_replace B-Function +with O +php B-Language +, O +but O +I O +'m O +really O +shitty O +with O +regex B-Library +. O +Good O +tutorials O +are O +appreciated O +. O +In O +HTML B-Language +( O +I O +'m O +assuming O +that O +'s O +the O +context O +) O +there O +is O +no O +such O +thing O +as O +" O +lines O +" O +in O +regards O +to O +source O +code O +, O +since O +it O +'s O +not O +really O +possible O +reliable O +to O +determinate O +how O +a O +text O +wraps O +( O +unless O +you O +do O +all O +the O + +wrapping O +yourself O +with O +
B-HTML_XML_Tag +or O +
 B-HTML_XML_Tag
+) O
+. O
+However O
+there O
+is O
+the O
+CSS B-Language
+pseudo-element O
+:first-line O
+that O
+will O
+let O
+you O
+format O
+the O
+first O
+line O
+of O
+an O
+element O
+( O
+for O
+example O
+a O
+paragraph O
+) O
+: O
+Try O
+for O
+example O
+, O
+http://www.ideone.com/1pTwD O
+. O
+I O
+have O
+an O
+app O
+with O
+a O
+lot O
+of O
+data O
+( O
+including O
+NSMutableArrays B-Class
+, O
+NSNumbers B-Class
+, O
+various O
+custom O
+classes O
+) O
+that O
+uses O
+NSCoding B-Library
+protocol O
+presently O
+. O
+However O
+, O
+I O
+would O
+like O
+to O
+implement O
+an O
+incremental O
+saving O
+system O
+, O
+to O
+save O
+time O
+during O
+the O
+" O
+saving O
+process O
+" O
+. O
+The O
+loading O
+time O
+is O
+
+not O
+important O
+. O
+Is O
+there O
+any O
+existing O
+container O
+that O
+checks O
+its O
+members O
+for O
+" O
+dirty B-Variable
+" O
+and O
+only O
+updates O
+those O
+values O
+when O
+writing O
+to O
+file O
+; O
+or O
+better O
+yet O
+, O
+a O
+protocol O
+that O
+can O
+be O
+implemented O
+to O
+do O
+the O
+same O
+; O
+or O
+any O
+other O
+simple O
+, O
+available O
+way O
+of O
+doing O
+this O
+? O
+For O
+large O
+amount O
+of O
+data O
+its O
+better O
+to O
+change O
+data O
+model O
+to O
+Core B-Class
+Data I-Class
+. O
+Otherwise O
+, O
+you O
+may O
+want O
+to O
+save O
+changes O
+after O
+specific O
+events O
+, O
+or O
+, O
+bad O
+solution O
+is O
+to O
+use O
+NSTimer B-Class
+, O
+to O
+save O
+all O
+data O
+every O
+time O
+you O
+want O
+to O
+. O
+How O
+do O
+I O
+execute O
+bulk O
+operations O
+with O
+the O
+new O
+Mongocxx B-Library
+driver O
+? O
+The O
+driver O
+manual O
+
+is O
+horrible O
+. O
+And O
+there O
+are O
+no O
+examples O
+anywhere O
+!! O
+! O
+Relevant O
+class O
+: O
+http://mongodb.github.io/mongo-cxx-driver/api/mongocxx-3.1.1/classmongocxx_1_1bulk__write.html O
+I O
+can O
+create O
+an O
+operation O
+using O
+bulk_write::bulk_write() B-Function
+and O
+add O
+queries O
+using O
+bulk_write::append() B-Function
+. O
+But O
+I O
+am O
+confused O
+as O
+to O
+how O
+to O
+execute O
+it O
+. O
+It O
+'s O
+terrible O
+that O
+they O
+do O
+n't O
+provide O
+similar O
+functions O
+like O
+the O
+mongo B-Application
+shell I-Application
+. O
+Ex O
+: O
+
+https://docs.mongodb.com/manual/reference/method/Bulk/ O
+Create O
+a O
+bulk_write B-Function
+instance O
+, O
+then O
+populate O
+it O
+with O
+write O
+operations O
+and O
+finally O
+submit O
+it O
+to O
+Mongo B-Application
+collection O
+using O
+this O
+method O
+: O
+I O
+'m O
+trying O
+to O
+install O
+Google B-Library
+Maps I-Library
+v2 O
+libraries O
+into O
+my O
+local O
+Maven B-Library
+repository O
+using O
+maven-android-sdk-deployer B-Application
+according O
+to O
+the O
+manual O
+on O
+that O
+page O
+. O
+When O
+I O
+run O
+mvn B-Code_Block
+install I-Code_Block
+-P I-Code_Block
+4.1 I-Code_Block
+, O
+I O
+get O
+following O
+error O
+: O
+There O
+is O
+actually O
+no O
+appcompat O
+directory O
+in O
+C:\Program B-File_Name
+Files I-File_Name
+
+\adt-bundle-windows-x86\adt-bundle-windows-x86\sdk\extras\android\support\v7 I-Output_Block
+. O
+I O
+suppose O
+that O
+I O
+need O
+to O
+install O
+some O
+packag O
+using O
+the O
+Android B-Application
+SDK I-Application
+Manager I-Application
+. O
+Which O
+package O
+( O
+name O
+, O
+version O
+) O
+should O
+I O
+install O
+in O
+order O
+to O
+fix O
+this O
+issue O
+? O
+In O
+order O
+for O
+that O
+command O
+to O
+work O
+, O
+it O
+is O
+necessary O
+to O
+install O
+all O
+" O
+Extras O
+" O
+in O
+the O
+Android B-Application
+SDK I-Application
+manager I-Application
+. O
+I O
+check O
+the O
+connection O
+and O
+the O
+correct O
+link O
+before O
+the O
+asynctask O
+, O
+but O
+sometimes O
+the O
+application O
+crash O
+, O
+for O
+do O
+it O
+on O
+the O
+UI O
+thread O
+i O
+
+think O
+. O
+If O
+i O
+put O
+the O
+code O
+on O
+the O
+AsyncTask B-Class
+the O
+application O
+always O
+crash O
+. O
+Any O
+solution O
+? O
+On O
+the O
+onCreate B-Function
+method O
+: O
+Try O
+this O
+, O
+check O
+net O
+connection O
+inside O
+doInBackground B-Function
+. O
+Your O
+question O
+is O
+very O
+vague O
+! O
+Yet O
+: O
+In O
+newer O
+androids O
+, O
+you O
+can O
+not O
+execute O
+this O
+line O
+on O
+the O
+UI O
+thread O
+: O
+so O
+a O
+simple O
+solution O
+would O
+be O
+to O
+add O
+everything O
+inside O
+a O
+new O
+Thread B-Class
+: O
+However O
+, O
+your O
+code O
+has O
+some O
+blocks O
+to O
+show O
+a O
+dialog B-User_Interface_Element
+( O
+guessing O
+) O
+like O
+this O
+: O
+These O
+function O
+should O
+be O
+done O
+on O
+the O
+UI O
+thread O
+. O
+So O
+use O
+a O
+handler O
+: O
+Then O
+inside O
+your O
+code O
+use O
+: O
+Finally O
+, O
+this O
+is O
+a O
+fix O
+. O
+
+The O
+real O
+solution O
+would O
+be O
+for O
+you O
+to O
+post O
+the O
+AsyncTask B-Class
+anyway O
+and O
+handle O
+errors O
+or O
+success O
+in O
+the O
+onPostExecute() B-Function
+I O
+'m O
+a O
+total O
+newbie O
+when O
+it O
+comes O
+to O
+using O
+Terminal B-Class
+, O
+so O
+I O
+do O
+n't O
+really O
+understand O
+what O
+'s O
+happening O
+here O
+when O
+I O
+try O
+to O
+upgrade O
+my O
+ruby B-Language
+version O
+( O
+1.8.7 B-Version
+) O
+with O
+rvm B-Library
+on O
+a O
+Mac B-Operating_System
+OS I-Operating_System
+X I-Operating_System
+10.7.3 B-Version
+. O
+When O
+I O
+input O
+I O
+get O
+this O
+What O
+does O
+this O
+mean O
+? O
+And O
+how O
+can O
+I O
+proceed O
+with O
+the O
+installation O
+of O
+the O
+latest O
+version O
+? O
+The O
+current O
+rvm B-Library
+command O
+outputs O
+the O
+name O
+of O
+the O
+currently O
+active O
+installation O
+
+of O
+Ruby B-Language
+; O
+in O
+this O
+case O
+, O
+it O
+'s O
+using O
+your O
+system O
+'s O
+pre-installed O
+Ruby B-Language
+( O
+1.8.7 B-Version
+) O
+. O
+Try O
+this O
+: O
+I O
+'m O
+making O
+a O
+program O
+to O
+generate O
+code O
+for O
+me O
+, O
+and O
+I O
+'m O
+fashioning O
+the O
+UI O
+after O
+Game B-Application
+Maker I-Application
+due O
+to O
+how O
+easy O
+the O
+interface O
+is O
+. O
+It O
+has O
+a O
+SplitContainer B-Class
+with O
+Panel1 B-Class
+containing O
+a O
+TreeView B-Class
+and O
+Panel2 B-Class
+containing O
+an O
+arbitrary O
+amount O
+of O
+self-contained O
+windows B-Device
+( O
+real O
+windows B-Operating_System
+, O
+not O
+some O
+hacky O
+workaround O
+) O
+. O
+I O
+wanted O
+to O
+use O
+user-controls O
+to O
+store O
+the O
+controls O
+I O
+use O
+to O
+modify O
+things O
+, O
+but O
+I O
+ca O
+n't O
+figure O
+out O
+any O
+way O
+
+to O
+put O
+it O
+in O
+a O
+window B-User_Interface_Element
+inside O
+the O
+splitContainer B-Variable
+'s O
+Panel2 B-Class
+. O
+Can O
+anyone O
+help O
+me O
+? O
+Here O
+'s O
+a O
+good O
+example O
+: O
+http://i.stack.imgur.com/CG6kO.png O
+Those O
+two O
+sprite B-User_Interface_Element
+property O
+windows B-User_Interface_Element
+are O
+what O
+I O
+'m O
+trying O
+to O
+do O
+. O
+I O
+did O
+similar O
+thing O
+once O
+, O
+and O
+for O
+that O
+reason O
+, O
+I O
+have O
+ReplaceControl B-Function
+method O
+, O
+which O
+I O
+paste O
+below O
+: O
+Only O
+thing O
+left O
+to O
+do O
+is O
+to O
+create O
+some O
+control O
+manually O
+on O
+the O
+form B-User_Interface_Element
+, O
+as O
+the O
+placeholder O
+for O
+your O
+Form B-Class
+. O
+Use O
+label B-User_Interface_Element
+, O
+for O
+example O
+. O
+From O
+How O
+to O
+implement O
+a-form-inside-a-form O
+with O
+runtime O
+
+embedded O
+forms O
+switching O
+? O
+Put O
+it O
+into O
+the O
+Panel2 B-Class
+'s O
+Control B-Class
+collection O
+via O
+the O
+Add() B-Function
+method O
+, O
+apply O
+coordinates O
+, O
+anchor O
+and O
+docking O
+programmaticaly O
+. O
+This O
+may O
+be O
+very O
+basic O
+but O
+i O
+am O
+looking O
+for O
+the O
+simplest O
+way O
+to O
+get O
+the O
+left O
+digit O
+of O
+a O
+number O
+, O
+and O
+the O
+right O
+digit O
+. O
+so O
+54 B-Value
+will O
+give O
+me O
+two O
+integers B-Data_Type
+, O
+int B-Value
+a I-Code_Block
+= I-Code_Block
+5 I-Value
+, O
+and O
+int B-Value
+b I-Code_Block
+= I-Code_Block
+4 I-Value
+. O
+Try O
+Basic O
+stuff O
+For O
+iharob O
+satisfaction O
+Try O
+this O
+notice O
+that O
+this O
+works O
+for O
+any O
+number O
+of O
+digits O
+. O
+Context O
+In O
+a O
+C# B-Language
+Windows B-Library
+Forms I-Library
+application O
+for O
+Win7 B-Operating_System
+we O
+host O
+an O
+ActiveX B-Library
+control O
+. O
+So O
+far O
+
+, O
+so O
+good O
+. O
+Need O
+: O
+prevent O
+ActiveX B-Class
+to O
+receive O
+mouse B-Device
+events O
+Actually O
+, O
+the O
+ActiveX B-Class
+has O
+too O
+much O
+functionality O
+. O
+It O
+is O
+not O
+very O
+customizable O
+to O
+turn O
+off O
+features O
+we O
+do O
+n't O
+need O
+. O
+It O
+would O
+be O
+nice O
+if O
+we O
+just O
+prevented O
+it O
+from O
+receiving O
+mouse B-Device
+events O
+. O
+The O
+ideal O
+would O
+be O
+to O
+just O
+treat O
+events O
+as O
+if O
+the O
+ActiveX B-Class
+was O
+not O
+there O
+, O
+that O
+is O
+the O
+mouse B-Device
+clicks O
+go O
+right O
+through O
+to O
+the O
+underlying O
+( O
+or O
+containing O
+) O
+Control B-Class
+. O
+But O
+if O
+we O
+just O
+prevent O
+the O
+ActiveX B-Class
+from O
+getting O
+events O
+that O
+would O
+be O
+okay O
+with O
+us O
+. O
+Search O
+before O
+you O
+ask O
+Some O
+answers O
+
+to O
+previous O
+questions O
+mention O
+to O
+protected O
+override O
+void B-Function
+WndProc I-Function
+( I-Code_Block
+ref I-Code_Block
+Message I-Code_Block
+m I-Code_Block
+) I-Code_Block
+, O
+e.g O
+. O
+c# B-Language
+- O
+Pass-through O
+mouse B-Device
+events O
+to O
+parent O
+control O
+- O
+Stack O
+Overflow O
+Other O
+mentions O
+to O
+implement O
+IMessageFilters B-Class
+, O
+e.g O
+. O
+: O
+winforms B-Library
+- O
+C# B-Language
+Application-Wide O
+Left O
+Mouse B-Class
+Click I-Class
+Event I-Class
+- O
+Stack O
+Overflow O
+winforms B-Library
+- O
+Handling O
+a O
+click O
+event O
+anywhere O
+inside O
+a O
+panel B-User_Interface_Element
+in O
+C# B-Language
+- O
+Stack B-Error_Name
+Overflow O
+winforms B-Library
+- O
+C# B-Language
+Application-Wide O
+Left O
+Mouse B-Class
+Click I-Class
+Event I-Class
+- O
+Stack O
+Overflow I-Error_Name
+Capturing O
+Mouse B-Class
+Events I-Class
+from O
+every O
+component O
+on O
+C# B-Language
+WInForm B-Library
+- O
+Stack B-Error_Name
+Overflow I-Error_Name
+
+Experiment O
+: O
+ActiveX B-Library
+still O
+gets O
+events O
+I O
+have O
+fairly O
+extensively O
+tried O
+both O
+override O
+WndProc B-Function
+and O
+IMessageFilter B-Function
+ways O
+, O
+filtering O
+( O
+opt-in O
+and O
+opt-out O
+) O
+a O
+number O
+of O
+events O
+. O
+In O
+some O
+cases O
+I O
+can O
+prevent O
+events O
+to O
+reach O
+native O
+C# B-Language
+controls O
+, O
+but O
+the O
+ActiveX B-Library
+still O
+got O
+its O
+share O
+. O
+Filtering O
+too O
+much O
+, O
+prevented O
+controls O
+and O
+ActiveX B-Library
+to O
+paint O
+, O
+or O
+even O
+application O
+to O
+draw O
+properly O
+or O
+caused O
+crash O
+on O
+exit O
+. O
+This O
+can O
+be O
+averted O
+by O
+selecting O
+opt-in O
+or O
+opt-out O
+options O
+carefully O
+. O
+Is O
+there O
+another O
+
+way O
+? O
+Is O
+there O
+another O
+way O
+from O
+C# B-Language
+/.NET B-Library
+to O
+host O
+an O
+ActiveX B-Class
+Control I-Class
+while O
+preventing O
+it O
+from O
+getting O
+mouse B-Device
+events O
+? O
+Perhaps O
+at O
+application O
+start O
+time O
+? O
+Try O
+to O
+do O
+a O
+EnableWindow(hand,FALSE) B-Function
+on O
+the O
+uppermost O
+hwnd O
+of O
+the O
+ActiveX B-Class
+Control I-Class
+after O
+has O
+been O
+created O
+. O
+See O
+Using O
+Window B-Variable
+Handle B-Variable
+to O
+disable O
+Mouse B-Device
+clicks O
+using O
+c# B-Language
+how O
+to O
+do O
+this O
+in O
+c# B-Language
+. O
+I O
+'m O
+new O
+to O
+google B-Library
+maps I-Library
+api I-Library
+, O
+i O
+have O
+some O
+POLYGONS B-Variable
+and O
+POLYINES B-Class
+. O
+i O
+'m O
+trying O
+to O
+show O
+both O
+( O
+polygon B-User_Interface_Element
+and O
+polyline B-User_Interface_Element
+) O
+in O
+google B-Library
+maps I-Library
+api I-Library
+. O
+I O
+'m O
+tried O
+something O
+
+, O
+but O
+not O
+able O
+not O
+show O
+both O
+polygons B-User_Interface_Element
+and O
+polyline B-User_Interface_Element
+, O
+only O
+polygons B-User_Interface_Element
+is O
+showing O
+, O
+how O
+to O
+show O
+both O
+Polygons B-User_Interface_Element
+and O
+polylines.I B-User_Interface_Element
+have O
+a O
+Json B-File_Type
+that O
+json B-File_Type
+have O
+source O
+polygon B-User_Interface_Element
+or O
+polyline B-User_Interface_Element
+, O
+that O
+source O
+based O
+i O
+'m O
+showing O
+here.sorry O
+for O
+my O
+english O
+. O
+Hopefully O
+someone O
+can O
+kindly O
+let O
+me O
+know O
+where O
+I O
+am O
+failing O
+. O
+Here O
+is O
+my O
+code O
+.Demo O
+A O
+google.maps.PolylineOptions B-Class
+object O
+does O
+n't O
+have O
+a O
+paths B-Variable
+property O
+, O
+that O
+is O
+only O
+valid O
+for O
+a O
+google.maps.PolygonOptions B-Class
+object O
+. O
+Change O
+: O
+To O
+: O
+proof O
+of O
+concept O
+fiddle B-Application
+code O
+
+snippet O
+: O
+Page B-User_Interface_Element
+is O
+refreshed O
+every O
+5 O
+seconds O
+. O
+Images B-User_Interface_Element
+that O
+received O
+from O
+.php B-File_Type
+file O
+are O
+appended O
+to O
+some O
+
  • O +elements O +. O +Here O +is O +the O +code O +: O +Everything O +works O +as O +expected O +. O +But O +when O +reloadImages() B-Function +is O +called O +, O +Images B-User_Interface_Element +are O +flickering O +during O +the O +reload O +. O +How O +to O +prevent O +this O +flicker O +? O +Preload B-Function +Images I-Function +? O +Help O +me O +address O +the O +flickering O +. O +you O +could O +use O +the O +folowing O +mechanism O +of O +preload B-Function +and O +callback O +( O +is'n O +tested O +actually O +) O +You O +can O +use O +https://github.com/desandro/imagesloaded O +plugin O +to O +load O +images B-User_Interface_Element +into O +display B-Code_Block +: I-Code_Block +none I-Code_Block +; I-Code_Block +div B-HTML_XML_Tag +and O + +then O +move O +them O +to O +your O +destionation O +on O +callback O +. O +I O +am O +using O +Ghost B-Application +Blogging I-Application +Platform I-Application +, O +and O +when O +I O +insert O +a O +image B-User_Interface_Element +it O +automatically O +wraps O +a O +image B-User_Interface_Element +in O +a O +p B-HTML_XML_Tag +tag O +. O +I O +have O +a O +max-width B-Variable +setup O +for O +the O +container B-User_Interface_Element +wrapping O +the O +p B-HTML_XML_Tag +tag O +and O +the O +img B-HTML_XML_Tag +. O +I O +want O +the O +img B-HTML_XML_Tag +to O +be O +larger O +than O +the O +container B-User_Interface_Element +. O +I O +can O +set O +a O +width B-Variable +for O +the O +img B-HTML_XML_Tag +which O +is O +larger O +with O +width B-Code_Block +: I-Code_Block +62rem I-Code_Block +; I-Code_Block +However O +it O +no O +longer O +is O +responsive O +vs O +width B-Code_Block +: I-Code_Block +100% I-Code_Block +; I-Code_Block +I O +want O +the O +img B-HTML_XML_Tag +to O +resize O +as O +I O +resize O +the O +browser B-Application +, O +I O +was O +hoping O +to O +do O +it O +without O +media O +queries O +but O + +if O +necessary O +I O +will O +do O +so O +. O +I O +am O +already O +changing O +the O +size O +of O +all O +the O +p B-HTML_XML_Tag +tags O +so O +that O +my O +blockquote O +is O +the O +size O +of O +the O +container O +section O +, O +and O +I O +want O +my O +image B-User_Interface_Element +to O +do O +the O +same O +, O +but O +it O +is O +just O +the O +size O +of O +the O +p B-HTML_XML_Tag +tag O +. O +My O +main O +concern O +is O +making O +the O +img B-HTML_XML_Tag +responsive O +and O +larger O +, O +I O +can O +already O +make O +it O +larger O +on O +its O +own O +with O +a O +specified O +width B-Variable +, O +but O +it O +no O +longer O +stays O +responsive O +. O +Thanks O +in O +advance O +. O +CODE B-Language +HTML B-Language +CSS B-Language +You O +are O +setting O +100% B-Value +width I-Code_Block +too O +image B-User_Interface_Element +, O +but O +also O +giving O +it O +borders O +. O +This O +causes O +problem O +. O +You O +need O +to O + +subtract O +amount O +of O +border B-User_Interface_Element +from O +image B-User_Interface_Element +. O +Try O +: O +Fiddle B-Application +here O +. O +I O +do O +n't O +think O +you O +should O +have O +a O +div B-HTML_XML_Tag +of O +a O +certain O +size O +and O +and O +then O +an O +element O +within O +that O +which O +then O +breaks O +out O +of O +the O +div B-HTML_XML_Tag +because O +you O +'ve O +set O +it O +to O +be O +larger O +then O +the O +.container B-HTML_XML_Tag +First O +thing O +I O +would O +do O +is O +reorganize O +the O +way O +that O +container B-User_Interface_Element +works O +. O +Here O +is O +a O +FIDDLE O +of O +some O +basic O +html B-Language +to O +reference O +. O +The O +second O +thing O +I O +would O +do O +- O +is O +ask O +a O +more O +targeted O +question O +about O +removing O +the O +automatic O +p B-HTML_XML_Tag +tag O +from O +the O +image B-User_Interface_Element +in O +a O +ghost O +forum O +( O +assuming O +they O +exist O +by O +now O +) O +. O +In O +WordPress B-Application +this O + +happens O +by O +default O +as O +well O +. O +It O +looks O +something O +like O +this O +with O +a O +function O +running O +a O +regular O +expression O +search O +and O +replace O +. O +I O +bet O +there O +is O +something O +like O +this O +for O +ghost B-Application +, O +or O +there O +will O +be O +really O +really O +soon O +- O +because O +it O +'s O +a O +huge O +pain O +- O +and O +almost O +no O +one O +actually O +puts O +images B-User_Interface_Element +inline O +anymore O +. O +And O +if O +they O +did O +, O +they O +would O +want O +to O +control O +when O +this O +happens O +. O +Good O +luck O +! O +I O +hope O +to O +play O +with O +Ghost B-Application +soon O +and O +I O +bet O +this O +will O +be O +the O +first O +problem O +I O +run O +into O +as O +well O +. O +I O +have O +a O +route O +defined O +in O +node/express B-Library +that O +has O +a O +res.render B-Function +On O +rendering O +this O +index O +page B-User_Interface_Element +, O + +I O +want O +to O +capture O +this O +req.user B-Variable +as O +a O +$scope B-Variable +object O +in O +the O +angular B-Library +controller O +on O +the O +front O +end O +. O +How O +can O +this O +be O +done O +? O +Please O +provide O +code O +snippets O +with O +the O +answer O +. O +To O +accomplish O +this O +, O +you O +first O +need O +to O +add O +a O +line O +in O +JADE B-Library +to O +create O +a O +global B-Data_Type +javascript B-Language +object O +that O +will O +hold O +the O +user O +value O +, O +i.e O +. O +Now O +in O +your O +controller O +just O +do O +this O +I O +have O +done O +this O +for O +a O +few O +projects O +. O +Aaron B-User_Name +I O +'m O +trying O +to O +set O +up O +a O +delegate O +that O +has O +a O +lineedit O +with O +suggestions O +that O +are O +read O +from O +a O +model O +. O +So O +, O +I O +tried O +passing O +the O +model O +that O + +delegate O +should O +read O +the O +information O +from O +, O +this O +is O +not O +working O +since O +after O +the O +delgate O +is O +constructed O +, O +the O +model O +that O +the O +QCompleter B-Class +is O +looking O +at O +does O +n't O +not O +show O +the O +external O +modifications O +made O +to O +recived_model B-Variable +. O +So O +it O +does O +only O +work O +making O +the O +right O +suggestions O +when O +the O +recived_model B-Variable +has O +n't O +changed O +.. O +. O +Considering O +that O +the O +delegates O +is O +being O +used O +to O +modify O +the O +contents O +of O +recived_model B-Variable +. O +I O +think O +there O +should O +be O +a O +way O +to O +access O +the O +data O +of O +the O +column B-Data_Structure +I O +want O +the O +completer B-Class +to O +get O +suggestions O +from O +. O +I O +think O +this O +could O +be O +done O +using O +a O +" B-Code_Block +for I-Code_Block + +" O +and O +the O +data B-Function +function O +to O +set O +up O +a O +new O +QStringList B-Class +that O +constains O +only O +the O +information O +from O +the O +column B-Data_Structure +that O +I O +wanted O +the O +completer O +to O +use O +as O +suggestions O +. O +But O +this O +show O +be O +redone O +any O +time O +other O +item O +in O +the O +view O +is O +accessed O +. O +I O +'m O +same O +as O +start O +, O +no O +idea O +how O +to O +achieve O +this O +. O +Here O +is O +my O +code O +.. O +. O +Hope O +you O +can O +help O +: O +and O +the O +implementation O +: O +. O +. O +. O +ModelWithoutDuplicatesProxy B-Class +Implementation O +: O +There O +it O +is O +the O +code O +of O +the O +duplicates B-Class +deleter O +. O +From O +reading O +the O +documentation O +, O +you O +can O +dynamically O +theme O +Drupal B-Language +blocks O +and O + +nodes O +by O +adding O +template O +files O +: O +" B-File_Name +page-node-1.tpl B-File_Name +" O +or O +" O +block-modulename-2.tpl B-File_Name +" O +. O +How O +do O +i O +know O +the O +delta O +value O +( O +in O +this O +case O +1 O +or O +2) O +to O +create O +a O +template O +file O +for O +node O +or O +block B-User_Interface_Element +? O +Do O +these O +delta O +values O +keep O +changing O +? O +What O +assigns O +these O +delta O +values O +and O +when O +? O +Go O +to O +admin/build/block B-File_Name +, O +then O +move O +cursor B-User_Interface_Element +over O +any O +' O +configure O +' O +link O +in O +the O +block B-HTML_XML_Tag +list I-User_Interface_Element +. O +You O +'ll O +see O +for O +example O +' O +admin/build/block/configure/views/news B-Code_Block +-block_2 I-Code_Block +' O +path O +. O +It O + +means O +this O +block O +provided O +by O +' O +Views B-Library +' O +module O +and O +has O +delta O +' O +news-block_2 B-Code_Block +' O +No O +Modules O +I O +'m O +having O +an O +issue O +with O +Gulp B-Library +I O +just O +simply O +want O +to O +process O +sass B-File_Type +files O +, O +optimize O +images B-User_Interface_Element +and O +watch O +changes O +on O +said O +sass B-File_Type +files O +. O +For O +some O +reason O +it O +does O +run O +the O +sass B-Library +and O +imagemin B-Application +tasks O +correctly O +but O +then O +it O +tries O +to O +watch O +and O +after O +several O +seconds O +it O +jus O +exits O +gulp B-Application +and O +I O +'m O +back O +a O +command B-Application +line I-Application +like O +if O +I O +manually O +stopped O +the O +tasks O +. O +I O +do O +n't O +get O +any O +errors O +or O +warnings O +it O +just O +ends O +. O +This O +is O +the O + +gulpfile.js B-File_Name +: O +On O +command B-Application +line I-Application +this O +is O +all O +I O +see O +: O +Then O +after O +approx O +. O +20secs O +it O +exits O +gulp B-Library +, O +I O +tried O +looking O +everywhere O +and O +use O +other O +post O +fixes O +and O +no O +luck O +. O +I O +have O +website O +in O +asp.net B-Website +and O +have O +its O +mobile B-Device +version O +as O +well O +. O +I O +want O +that O +if O +user O +types O +this O +in O +mobile B-Device +: O +http://example.com/ViewVacancy.aspx?ID=8674 O +then O +he O +is O +directed O +to O +: O +http://m.example.com/vacancy.aspx?name=8674 O +I O +have O +written O +following O +code O +: O +It O +is O +working O +when O +user O +types O + +http://example.com O +so O +user O +is O +redirected O +to O +: O +http://m.example.com O +but O +when O +user O +types O +: O +http://example.com/viewvacancy.aspx?id=8674 O +It O +is O +not O +redirected O +to O +: O +http://m.example.com/vacancy.aspx?name=8674 O +Please O +suggest O +solution O +to O +it O +. O +The O +problem O +is O +String.Replace() B-Function +I O +'m O +trying O +to O +get O +the O +hang O +of O +using O +ajax B-Library +loads O +( O +mostly O +via O +jquery B-Library +) O +to O +make O +my O +site O +more O +efficient O +. O +Wondering O +if O +anyone O +can O +provide O +any O +suggestions O +re O +" O +best O +practices O + +" O +for O +using O +ajax B-Library +? O +Is O +there O +a O +way O +to O +simplify O +a O +script O +for O +multiple O +ajax B-Function +calls O +? O +For O +example O +, O +I O +currently O +have O +the O +working O +script O +: O +The O +script O +just O +gets O +longer O +and O +longer O +with O +each O +additional O +function O +. O +Is O +there O +a O +simpler O +, O +more O +efficient O +way O +to O +write O +this O +script O +to O +cover O +multiple O +load O +scripts O +? O +Also O +, O +should O +I O +be O +using O +ajax B-Library +loads O +to O +replace O +the O +majority O +of O +actual O +links O +? O +Assuming O +that O +the O +id B-Variable +matches O +the O +file O +name O +the O +script O +can O +be O +simplified O +to O +: O +This O +script O +simply O +specifies O +each O +id B-Variable +in O +a O +single O +selector O +that O +separates O +each O +id B-Variable +with O +a O +comma B-Value +. O +This O + +will O +calls O +the O +click O +function O +to O +be O +fired O +for O +each O +element O +. O +With O +the O +anonymous O +function O +attached O +to O +the O +click O +event O +, O +the O +id B-Variable +of O +each O +element O +is O +obtained O +and O +concatenated O +to O +create O +the O +file O +name O +which O +is O +then O +passed O +to O +the O +load B-Function +function O +. O +If O +the O +id B-Variable +does O +n't O +always O +match O +the O +element O +you O +could O +use O +the O +following O +approach O +. O +Here O +is O +a O +suggestion O +, O +since O +the O +code O +you O +posted O +seems O +to O +have O +a O +pattern O +between O +the O +id B-Variable +and O +the O +filename O +: O +This O +suggestion O +uses O +.on() B-Function +and O +you O +just O +need O +to O +add O +a O +commonParentElementHere O +, O +a O +id B-Variable +or O +a O +class O +of O +the O +common O +parent O +of O +those O + +elements O +. O +Another O +option O +is O +to O +use O +a O +class O +on O +all O +elements O +that O +should O +be O +clickable O +, O +and O +then O +use O +the O +code O +passing O +the O +id B-Variable +to O +the O +html B-File_Type +file O +name O +, O +like O +: O +Question O +I O +have O +is O +I O +am O +trying O +to O +update O +my O +gui B-Application +with O +a O +timer O +( O +this O +works O +and O +changes O +the O +image B-User_Interface_Element +for O +mypic O +but O +, O +it O +will O +not O +update O +mytext O +label I-User_Interface_Element +for O +some O +weird O +reason O +any O +help O +would O +be O +very O +much O +appreciated O +! O +* O +I O +should O +add O +that O +mytext O +is O +n't O +showing O +up O +at O +all O +on O +my O +gui B-Application +since O +introducing O +the O +timer O +... O +but O +mypic O +does O +??? O +? O +UPDATE O +with O +suggestions O +still O +is O +n't O +working. O + +. O +Here O +'s O +a O +working O +solution O +which O +you O +can O +tailor O +to O +your O +use O +. O +The O +cause O +seemed O +to O +be O +the O +way O +you O +had O +tried O +to O +display O +the O +Components B-Class +rather O +than O +the O +code O +in O +your O +action B-Class +listener I-Class +. O +Your O +approach O +was O +just O +replacing O +myText O +with O +myPic O +when O +you O +initially O +set O +up O +the O +JFrame B-Class +. O +Instead O +you O +need O +to O +use O +a O +layout B-Class +manager I-Class +. O +The O +example O +I O +'ve O +given O +is O +with O +overlaying O +using O +JLayeredPane B-Class +. O +You O +may O +wish O +to O +use O +a O +layout B-Class +manager I-Class +instead O +if O +this O +is O +not O +the O +desired O +outcome O +, O +see O +the O +Oracle O +Tutorial O +on O +using O +layout O +managers I-Class +. O +Widget B-Class +class O +Weather B-Class +class O + +for O +demonstration O +purposes O +I O +have O +a O +project O +in O +React B-Application +where O +I O +'m O +trying O +to O +structure O +my O +database O +using O +Firebase B-Application +. O +I O +want O +to O +create O +a O +reference O +for O +a O +child O +node O +, O +but O +I O +keep O +getting O +' B-Output_Block +TypeError B-Error_Name +: I-Output_Block +messagesRef.child B-Code_Block +is I-Output_Block +not I-Output_Block +a I-Output_Block +function I-Output_Block +' O +and O +the O +code O +errors O +out O +on O +line O +3 O +. O +Below O +is O +my O +code O +for O +the O +references O +: O +Am O +I O +making O +these O +references O +correctly O +? O +I O +followed O +the O +Firebase B-Application +documentation O +to O +a O +tee O +and O +I O +ca O +n't O +find O +a O +solution O +. O +I O +believe O +the O +issue O +is O +that O +var B-Code_Block +messagesRef I-Code_Block += I-Code_Block + +firebase.database().ref('messages').limitToLast(30) B-Code_Block +; I-Code_Block +is O +of O +type O +firebase.database.Query B-Class +and O +not O +of O +type O +firebase.database.Reference B-Class +The O +method O +child O +can O +only O +be O +called O +on O +Reference O +type O +objects O +, O +so O +instead O +you O +could O +use O +var B-Code_Block +messagesRef I-Code_Block += I-Code_Block +firebase.database().ref('messages/users').limitToLast(30) I-Code_Block +; I-Code_Block +This O +is O +assuming O +your O +database O +structure O +is O +like O +this O +: O +How O +can O +i O +use O +" O +Plain O +C O +" O +to O +program O +Arduino B-Device +without O +using O +the O +" O +Processing O +programming O +language O +" O +? O +I O +want O +to O +improve O +my O +C B-Language +programming O +skills O +by O +using O +it O +with O + +Arduino B-Application +for O +embedded O +systems O +. O +I O +have O +very O +limited O +ability O +to O +code O +in O +C++ B-Language +, O +and O +I O +would O +love O +to O +write O +my O +own O +Arduino B-Application +Library I-Application +using O +" O +C B-Value +" O +, O +to O +avoid O +using O +classes O +and O +OOP O +. O +Processing O +looks O +like O +Java B-Language +to O +me O +, O +and O +i O +want O +to O +use O +" O +C B-Language +pointers B-Data_Type +" O +to O +gain O +more O +practical O +knowledge O +. O +The O +thing O +is O +that O +Arduino B-Application +does O +n't O +use O +Processing O +. O +Processing O +is O +( O +was O +? O +) O +a O +separate O +programming O +language O +which O +was O +developed O +independently O +for O +a O +different O +purpose O +. O +The O +language O +resembles O +C B-Language +and O +C++ B-Language +very O +closely O +, O +so O +closely O +that O +it O +'s O +almost O + +identical O +. O +Programming O +the O +Arduino B-Device +, O +however O +, O +is O +accomplished O +using O +a O +( O +n O +unfortunate O +) O +mixture O +of O +C B-Language +and O +C++ B-Language +, O +with O +a O +set O +of O +custom O +libraries O +( O +which O +are O +similar O +in O +style O +to O +that O +of O +Processing O +) O +. O +These O +libraries O +are O +written O +in O +C B-Language +and O +C++ B-Language +themselves O +, O +and O +they O +are O +only O +good O +for O +making O +one O +'s O +code O +more O +portable O +across O +different O +MCU O +types O +. O +Using O +them O +is O +not O +strictly O +necessary O +for O +programming O +the O +AVR B-Application +MCU I-Device +. O +In O +fact O +, O +the O +libraries O +have O +quite O +a O +few O +drawbacks O +( O +the O +code O +is O +big O +, O +inherently O +slow O +and O + +ugly O +, O +amongst O +others O +) O +. O +If O +you O +want O +to O +use O +plain O +ol B-Language +' O +C B-Language +for O +programming O +the O +Arduino B-Device +, O +then O +just O +go O +ahead O +and O +do O +so O +. O +Grab O +the O +reference O +PDF B-File_Type +from O +Atmel B-User_Name +'s O +site O +for O +your O +particular O +MCU B-Device +, O +learn O +the O +special O +registers O +( O +I/O O +, O +timers B-Device +, O +etc O +. O +) O +, O +install O +the O +avr-gcc B-Code_Block +toolchain O +on O +your O +computer B-Device +, O +and O +use O +avr-gcc B-Code_Block +, O +avr-objcopy B-Code_Block +and O +avrdude B-Code_Block +to O +compile O +and O +install O +your O +programs O +. O +There O +also O +happens O +to O +be O +a O +C-only B-Language +library O +which O +follows O +this O +kind O +of O +convention O +. O + +It O +does O +n't O +provide O +as O +much O +abstraction O +as O +the O +stock O +Arduino B-Application +library O +has O +, O +because O +it O +'s O +lower-level O +, O +but O +you O +can O +have O +a O +look O +at O +it O +and O +see O +how O +one O +can O +accomplish O +basic O +algorithms O +without O +the O +default O +libraries O +. O +Here O +is O +my O +code O +I O +am O +unable O +to O +get O +the O +Uid B-Variable +because O +of O +different O +namespace O +probably O +, O +same O +goes O +for O +av:Canvas.Top B-Variable +. O +How O +to O +get O +these O +attributes O +? O +-TIA B-User_Name +First O +, O +add O +all O +the O +namespaces O +Now O +, O +if O +you O +want O +to O +check O +for O +attributes O +and O +nodes B-Class +regardless O +of O +the O +namespace O +you O +could O +simply O +visit O +each O + +node O +and O +then O +loop O +through O +its O +attributes O +to O +find O +out O +the O +value O +. O +As O +long O +as O +you O +add O +the O +path O +you O +want O +to O +visit O +in O +SelectSingleNode B-Function +and O +your O +namespaces O +are O +declared O +you O +should O +be O +able O +to O +run O +through O +any O +node O +and O +get O +any O +value O +you O +want O +. O +Try O +this O +I O +have O +Saved O +a O +link O +in O +database O +and O +then O +i O +need O +to O +view O +that O +link O +in O +view O +in O +asp.net B-Library +mvc I-Library +for O +example O +https://www.google.com O +Just O +print O +the O +URL O +: O +The O +@Url B-Code_Block +helpers O +are O +for O +links O +pointing O +into O +the O +application O +. O +Simple O +question O +: O +where O +do O +the O +tableView B-Class +and O +section B-Variable +arguments O +get O +passed O +from O +? O +The O +actual O + +code O +in O +the O +method O +return O +[ B-Code_Block +self.listData I-Code_Block +count I-Code_Block +] I-Code_Block +; O +does O +n't O +even O +mention O +them O +. O +Here O +'s O +my O +interface O +code O +: O +And O +this O +is O +all O +the O +implementation O +code O +: O +I O +just O +want O +to O +know O +how O +does O +the O +method O +( O +NSInteger B-Class +) O +tableView B-Variable +: O +( O +UITableView B-Class +* I-Class +) I-Class +numberOfRowsInSection B-Variable +: O +receive O +those O +arguments O +? O +Of O +course O +this O +happens O +everywhere O +; O +I O +just O +want O +to O +understand O +it O +. O +The O +Simple_TableViewController B-Class +class O +is O +likely O +meant O +to O +manage O +a O +single O +table B-User_Interface_Element +with O +a O +single O +section O +. O +Given O +that O +, O +the O +tableView B-Variable +and O +section B-Variable +parameters O +are O +n't O +important O +because O + +they O +can O +only O +be O +one O +thing O +: O +a O +pointer B-Data_Type +to O +the O +table B-Data_Structure +and O +0 B-Value +, O +respectively O +. O +Your O +view B-Class +controller I-Class +class O +is O +adding O +support O +for O +these O +callback O +methods O +through O +UITableViewDelegate B-Class +and O +UITableViewDataSource B-Class +. O +You O +are O +adding O +this O +support O +in O +your O +.h B-File_Type +file O +through O + B-Class +. O +These O +classes O +are O +built O +in O +to O +the O +Cocoa B-Library +Touch I-Library +framework O +and O +you O +are O +just O +using O +them O +. O +When O +the O +table B-Data_Structure +is O +( O +re O +) O +loaded O +, O +this O +callback O +methods O +are O +called O +if O +you O +have O +defined O +them O +( O +some O +are O +required O +, O +others O +are O +optional O +) O +. O +For O +example O +. O +I O + +have O +multiple O +classes O +as O +: O +Inventory B-Class +, O +Product B-Class +, O +Sales B-Class +etc O +. O +Now O +my O +requirement O +is O +to O +put O +all O +above O +types O +in O +a O +single O +map B-Class +container O +. O +I O +do O +n't O +want O +to O +create O +multiple O +maps B-Class +for O +putting O +above O +each O +object O +values O +. O +If O +all O +your O +classes O +can O +implement O +the O +same O +interface O +, O +then O +you O +can O +store O +them O +all O +in O +the O +same O +container O +. O +Otherwise O +you O +would O +have O +to O +use O +Object B-Class +.. O +. O +More O +generally O +- O +why O +do O +you O +not O +want O +to O +use O +multiple O +maps B-Class +? O +Set O +the O +value O +type O +as O +Object B-Class +: O +Or O +, O +if O +Inventory B-Class +, O +Product B-Class +, O +Sales B-Class +, O +and O +whatever O +else O +is O +going O +into O +the O +map B-Class +share O +a O +superclass O +or O +implement O +the O +same O +interface O + +, O +then O +set O +the O +value O +type O +as O +that O +: O +I O +am O +using O +a O +SKTextureAtlas B-Class +to O +animate O +a O +SKSpriteNode B-Class +. O +The O +animation O +works O +, O +but O +it O +looks O +weird O +because O +for O +some O +reason O +the O +sprite B-Class +'s O +height B-Variable +is O +changing O +several O +times O +in O +the O +animation O +. O +This O +also O +causes O +the O +y B-Variable +position O +to O +change O +as O +well O +. O +Everything O +else O +remains O +the O +same O +except O +for O +the O +height B-Variable +and O +the O +y B-Variable +. O +The O +only O +thing O +I O +can O +think O +of O +is O +there O +are O +different O +amounts O +of O +transparent O +pixels O +within O +each O +frame O +. O +Each O +image B-User_Interface_Element +is O +the O +same O +size O +though O +. O +Even O +when O +I O +use O + +SKAction.animateWithTextures(atlasFrames,timePerFrame:0.1,resize:true,restore:false) B-Code_Block +, O +with O +resize B-Variable +set O +to O +true O +and O +false O +, O +the O +problem O +persists O +. O +I O +heard O +about O +this O +issue O +with O +textures B-Class +. O +I O +recommend O +you O +to O +make O +all O +textures B-User_Interface_Element +of O +same O +size O +and O +add O +background B-User_Interface_Element +for O +all O +images B-User_Interface_Element +of O +1% B-Value +alpha O +( O +it O +wont O +be O +visible O +but O +it O +will O +be O +where O +) O +. O +This O +is O +happening O +because O +invisible O +background B-User_Interface_Element +is O +cut O +. O +You O +can O +watch O +this O +guide O +for O +more O +information O +: O + +https://www.youtube.com/watch?v=TDwSR3e6nN0 O +I O +am O +using O +below O +code O +snippet O +to O +create O +a O +singleton O +instance O +of O +Connection B-Class +object O +for O +a O +web O +application O +which O +will O +be O +used O +by O +multiple O +users O +. O +This O +class O +will O +return O +same O +instance O +of O +connection O +until O +and O +unless O +connection O +is O +closed O +or O +null B-Value +. O +I O +suppose O +same O +connection O +will O +be O +shared O +by O +all O +users O +on O +different O +machine O +as O +it O +is O +static B-Data_Type +one O +. O +If O +one O +user O +is O +setting O +auto O +commit O +to O +off O +to O +commit O +couple O +of O +statements O +as O +transaction O +, O +will O +this O +create O +problems O +for O +other O +users O +by O +restricting O +their O +connection O +to O +disable O +autocommit O + +as O +well O +or O +by O +commiting O +their O +transaction O +in O +mid O +way O +if O +one O +user O +has O +used O +con.commit() B-Function +? O +Yes O +, O +it O +will O +cause O +problems O +. O +They O +are O +sharing O +the O +same O +instance O +, O +so O +this O +statement O +is O +wrong O +It O +should O +read O +Since O +all O +the O +users O +( O +threads O +) O +are O +using O +the O +same O +instance O +, O +changes O +made O +to O +it O +by O +one O +user O +will O +affect O +the O +others O +. O +As O +Shivam B-User_Name +Kalra I-User_Name +says O +, O +connection O +pools O +are O +a O +better O +tool O +. O +Most O +probably O +your O +web B-Application +server I-Application +will O +already O +provide O +them O +, O +and O +if O +not O +there O +are O +third O +party O +libraries O +. O +Yes O +. O +Yes O +. O +Database O +connections O +are O +not O +safe O +for O +use O +by O +multiple O + +threads O +, O +and O +should O +not O +in O +general O +even O +be O +member O +fields O +let O +alone O +singletons O +. O +They O +should O +be O +method-local O +variables O +. O +If O +you O +want O +to O +economize O +on O +creating O +& O +destroying O +them O +, O +you O +must O +use O +a O +connection B-Class +pool I-Class +. O +I O +'m O +writing O +an O +integration O +test O +where O +I O +will O +be O +inserting O +a O +number O +of O +objects O +into O +a O +database O +and O +then O +checking O +to O +make O +sure O +whether O +my O +method O +retrieves O +those O +objects O +. O +My O +connection O +to O +the O +database O +is O +through O +NHibernate B-Library +... O +and O +my O +usual O +method O +of O +creating O +such O +a O +test O +would O +be O +to O +do O +the O +following O +: O +However O +, O +I O +'ve O +recently O +found O +out O +about O +TransactionScope B-Class +which O + +apparently O +can O +be O +used O +for O +this O +very O +purpose O +.. O +. O +Some O +example O +code O +I O +'ve O +found O +is O +as O +follows O +: O +I O +believe O +that O +if O +I O +do O +n't O +include O +the O +line O +txScope.Complete() B-Function +that O +the O +data O +inserted O +will O +be O +rolled O +back O +. O +But O +unfortunately O +I O +do O +n't O +understand O +how O +that O +is O +possible. O +. O +how O +does O +the O +txScope B-Class +object O +keep O +a O +track O +of O +the O +deptAdapter B-Variable +and O +empAdapter B-Class +objects O +and O +their O +transactions O +on O +the O +database O +. O +I O +feel O +like O +I O +'m O +missing O +a O +bit O +of O +information O +here O +.. O +am O +I O +really O +able O +to O +replace O +my O +BeginTransaction() B-Function +and O +RollbackTransaction() B-Function +calls O +by O +surrounding O +my O +code O + +using O +TransactionScope B-Class +? O +If O +not O +, O +how O +then O +does O +TransactionScope B-Class +work O +to O +roll O +back O +transactions O +? O +Essentially O +TransactionScope B-Class +does O +n't O +track O +your O +Adapter B-Class +'s O +, O +what O +it O +does O +is O +it O +tracks O +database O +connections O +. O +When O +you O +open O +a O +DB O +connection O +the O +connections O +will O +looks O +if O +there O +is O +an O +ambient O +transaction O +( O +Transaction B-Class +Scope I-Class +) O +and O +if O +so O +enlist O +with O +it O +. O +Caution O +if O +there O +are O +more O +the O +one O +connection O +to O +the O +same O +SQL B-Language +server I-Application +this O +will O +escalate O +to O +a O +Distribtued O +Transaction B-Class +. O +What O +happens O +since O +you O +'re O +using O +a O +using O +block O +you O +are O +ensuring O +dispose B-Function +will O +be O +called O +even O +if O +an O +exception B-Class +occurs O + +. O +So O +if O +dispose B-Function +is O +called O +before O +txScope.Complete() B-Function +the O +TransactionScope B-Class +will O +tell O +the O +connections O +to O +rollback O +their O +transactions O +( O +or O +the O +DTC O +) O +. O +The O +TransactionScope B-Class +class O +works O +with O +the O +Transaction B-Class +class O +, O +which O +is O +thread-specific O +. O +When O +the O +TransactionScope B-Class +is O +created O +, O +it O +checks O +to O +see O +if O +there O +is O +a O +Transaction B-Class +for O +the O +thread O +; O +if O +one O +exists O +then O +it O +uses O +that O +, O +otherwise O +, O +it O +creates O +a O +new O +one O +and O +pushes O +it O +onto O +the O +stack O +. O +If O +it O +uses O +an O +existing O +one O +, O +then O +it O +just O +increments O +a O +counter O +for O +releases O +( O +since O +you O +have O +to O +call O +Dispose B-Function +on O +it O +) O +. O +On O + +the O +last O +release O +, O +if O +the O +Transaction B-Class +was O +not O +comitted O +, O +it O +rolls O +back O +all O +the O +work O +. O +As O +for O +why O +classes O +seem O +to O +magically O +know O +about O +transactions O +, O +that O +is O +left O +as O +an O +implementation O +detail O +for O +those O +classes O +that O +wish O +to O +work O +with O +this O +model O +. O +When O +you O +create O +your O +deptAdapter B-Variable +and O +emptAdapter B-Class +instances O +, O +they O +check O +to O +see O +if O +there O +is O +a O +current O +transaction O +on O +the O +thread O +( O +the O +static B-Data_Type +Current B-Variable +property O +on O +the O +Transaction B-Class +class O +) O +. O +If O +there O +is O +, O +then O +it O +registers O +itself O +with O +the O +Transaction B-Class +, O +to O +take O +part O +in O +the O +commit/rollback O +sequence O +( O +which O +Transaction B-Class +controls O +, O +and O +might O + +propogate O +to O +varying O +transaction O +coordinators O +, O +such O +as O +kernel O +, O +distributed O +, O +etc O +. O +) O +. O +I O +am O +creating O +an O +XML B-File_Type +file O +from O +scratch O +using O +PHP B-Language +'s O +SimpleXML B-Class +Object I-Class +. O +But O +I O +am O +getting O +this O +error O +when O +validating O +the O +document O +: O +' O +Can B-Error_Name +not I-Error_Name +find I-Error_Name +declaration I-Error_Name +of I-Error_Name +element O +" O +example I-Value +" O +. O +' O +Here O +is O +the O +code O +that O +is O +creating O +the O +XML B-File_Type +document O +: O +The O +XML B-Language +that O +is O +produced O +is O +this O +: O +Any O +help O +would O +be O +appreciated O +! O +Thanks O +An O +XML B-File_Type +file O +needs O +something O +to O +validate O +it O +against O +, O +a O +Document O +Type O +Definition O +( O +DTD O +) O +or O +an O +XML B-Language +Schema O +. O + +You O +'re O +not O +providing O +any O +, O +so O +validation O +( O +i.e O +. O +, O +checking O +if O +the O +structure/content O +of O +the O +XML B-Language +document O +conforms O +to O +the O +rules O +set O +forth O +in O +the O +DTD/Schema O +) O +is O +impossible O +. O +Or O +did O +you O +just O +wish O +to O +check O +for O +well-formedness O +( O +i.e O +. O +, O +checking O +that O +all O +tags O +are O +closed O +properly O +, O +that O +there O +are O +no O +illegal O +characters O +anywhere O +etc O +. O +) O +? O +In O +order O +to O +validate O +an O +XML B-File_Type +document O +, O +you O +need O +a O +DTD O +( O +or O +XML B-Language +Schema O +) O +which O +describes O +how O +a O +valid O +document O +looks O +like O +. O +You O +need O +write O +a O + +DTD B-File_Type +example.dtd B-File_Name +for O +your O +XML B-Language +application O +, O +and O +either O +give O +it O +to O +the O +validator O +or O +include O +it O +in O +your O +XML B-File_Type +document O +, O +by O +prefixing O +it O +with O +Since O +SimpleXML B-Library +does O +not O +support O +doctypes O +, O +you O +must O +either O +manually O +prefix O +the O +above O +line O +or O +use O +php B-Language +'s O +DOM B-Library +extension O +. O +Fortunately O +, O +you O +can O +import O +the O +SimpleXML B-Library +fragment O +to O +DOM B-Library +with O +dom_import_simplexml B-Function +. O +Say O +I O +have O +a O +Class O +: O +And O +I O +want O +other O +objects O +to O +inherit O +variables O +& O +functions O +from O +it O +. O +Then O +instantiate O +my O +objects O +: O +What O +'s O +the O +proper O +function O +to O +include O +Foo B-Variable +in O + +Bar B-Code_Block +and O +Baz B-Code_Block +? O +I O +already O +did O +Bar.prototype B-Code_Block += I-Code_Block +new I-Code_Block +Foo() I-Code_Block +; I-Code_Block +but O +it O +seems O +to O +fail O +on O +our O +beloved O +IE B-Application +( O +< B-Version +9 B-Version +) O +. O +have O +a O +look O +to O +Classy B-Library +or O +, O +if O +you O +like O +Ruby B-Language +and O +want O +a O +more O +complete O +solution O +to O +JS.Class B-Class +. O +Those O +libraries O +helps O +you O +with O +object O +orientation O +in O +javascript B-Language +ad O +hide O +prototype O +to O +the O +developer O +. O +Hope O +this O +helps O +If O +you O +attach O +all O +the O +properties O +to O +the O +prototype O +( O +which O +is O +preferable O +, O +at O +least O +for O +methods O +) O +, O +then O +assigning O +the O +parent O +'s O +prototype O +to O +the O +child O +'s O +prototype O +is O +sufficient O +: O +Here O +we O +used O +an O +intermediate O + +constructor O +function O +to O +" O +decouple O +" O +the O +two O +prototypes O +. O +Otherwise O +if O +you O +'d O +change O +one O +, O +you O +'d O +change O +the O +other O +one O +too O +( O +as O +they O +reference O +the O +same O +object O +) O +. O +This O +way O +is O +actually O +pretty O +popular O +and O +used O +by O +a O +couple O +of O +libraries O +. O +If O +not O +, O +you O +have O +to O +call O +the O +parent O +'s O +constructor O +function O +inside O +the O +child O +'s O +constructor O +function O +: O +This O +is O +something O +you O +always O +should O +do O +, O +to O +assign O +the O +properties O +set O +up O +in O +the O +constructor O +function O +to O +the O +current O +object O +. O +An O +additional O +remark O +to O +your O +way O +: O +this O +should O +work O +( O +also O +in O +IE B-Application +actually O +) O +, O +but O +it O +has O +two O +major O +flaws O +: O +All O + +the O +instance O +properties O +set O +up O +in O +Foo B-Class +will O +become O +properties O +shared O +by O +all O +Bar B-Class +instances O +. O +What O +if O +Foo B-Class +expects O +some O +arguments O +that O +are O +only O +available O +when O +you O +create O +a O +Bar B-Class +instance O +? O +Whenever O +I O +try O +to O +open O +Eclipse B-Application +with O +a O +new O +workspace O +, O +it O +turn O +out O +give O +empty O +dialog B-User_Interface_Element +box I-User_Interface_Element +with O +no O +message O +. O +Is O +there O +a O +way O +to O +limit O +the O +bandwidth O +in O +NSURLSession B-Application +? O +I O +'m O +making O +file-sync-client B-Library +for O +macOS B-Operating_System +like O +Dropbox/GoogleDrive/pCloud B-Application +and O +they O +all O +have O +bandwidth O +limiting O +options O +, O +but O +I O +'m O +not O +sure O +how O +to O +configure O +NSURLSession B-Application +to O +respect O +bandwidth O + +limiting O +. O +Unless O +Apple B-Website +has O +added O +something O +very O +recently O +, O +NSURLSession B-Class +provides O +no O +facilities O +for O +bandwidth O +limiting O +. O +The O +only O +ways O +I O +'m O +aware O +of O +to O +do O +that O +are O +: O +Use O +lower-level O +APIs B-Application +that O +allow O +you O +to O +provide O +your O +own O +sockets O +and O +then O +throttle O +the O +data O +rate O +at O +the O +TCP O +socket O +level O +. O +Provide O +an O +in-app O +web O +proxy O +and O +use O +it O +for O +all O +outgoing O +requests O +. O +Configure O +the O +proxy O +to O +limit O +the O +bandwidth O +of O +all O +requests O +that O +go O +through O +it O +. O +I O +'m O +new O +to O +Android B-Operating_System +and O +MVP B-Application +in-general O +, O +and O +I O +'ve O +been O +doing O +iOS B-Operating_System +programming O +for O + +the O +last O +1.5 O +years O +, O +so O +I O +find O +delegate O +patterns O +easy O +to O +digest O +. O +I O +'ve O +implemented O +MVP B-Library +in O +such O +a O +way O +that O +the O +view O +conforms O +to O +a O +presenter O +'s O +protocol O +, O +which O +lets O +the O +presenter O +disregard O +the O +view O +'s O +specific O +type O +, O +but O +lets O +it O +know O +that O +certain O +methods O +are O +a O +given O +and O +thus O +okay O +to O +call O +on O +the O +" O +view B-Function +. O +" O +I O +'ve O +been O +reading O +various O +MVP B-Library +guides O +, O +and O +all O +of O +the O +Mosby B-Website +tutorials O +, O +and O +I O +'m O +not O +sure O +I O +agree O +with O +some O +of O +it O +. O +Is O +the O +pattern O +I O +'ve O +implemented O +kosher O +? O +I O +'d O + +like O +some O +feedback O +so O +I O +do O +n't O +keep O +heading O +in O +a O +bad O +direction O +, O +if O +that O +is O +indeed O +what O +I O +'m O +doing O +.. O +. O +For O +example O +, O +Base B-Class +Presenter I-Class +: O +I O +then O +subclass O +this O +into O +the O +following O +: O +PhotoRecyclerPresenter B-Class +: O +And O +it O +communicates O +with O +the O +view O +: O +PhotoRecyclerFragment B-Class +: O +This O +lets O +me O +define O +a O +set O +of O +requirements O +a O +view O +needs O +to O +conform O +to O +in O +order O +to O +utilize O +the O +singleton O +presenter B-Class +, O +while O +keeping O +the O +presenter B-Class +agnostic O +about O +what O +views O +use O +it O +, O +as O +long O +as O +they O +conform O +to O +its O +protocol O +. O +So O +far O +in O +my O +practice O +project O +it O +seems O + +to O +work O +fine O +, O +but O +I O +ca O +n't O +seem O +to O +find O +any O +resources O +where O +what O +I O +'m O +doing O +is O +recommended O +as O +far O +as O +MVP B-Application +goes O +, O +and O +I O +have O +enough O +self-doubt O +that O +I O +figured O +I O +'d O +ask O +my O +first O +StackOverflow B-Website +question O +. O +Can O +anyone O +who O +has O +experience O +with O +MVP B-Application +shed O +some O +light O +on O +this O +? O +Also O +, O +if O +I O +'m O +asking O +in O +the O +wrong O +place O +, O +feel O +free O +to O +point O +me O +to O +the O +correct O +place O +to O +post O +this O +. O +Thanks O +:) O +I O +have O +the O +following O +code O +for O +a O +CUDA B-Application +program O +: O +in O +which O +every O +thread O +will O +print O +its O +threadIdx.x B-Variable +and O +blockIdx.x B-Variable +. O + +One O +possible O +output O +of O +this O +program O +is O +this O +: O +Running O +the O +program O +several O +times O +I O +get O +similar O +results O +, O +except O +that O +block O +order O +is O +random O +. O +For O +example O +, O +in O +the O +above O +output O +we O +have O +this O +block O +order O +0 B-Value +, O +2 I-Value +, O +3 I-Value +, I-Value +1 I-Value +. O +Running O +the O +problem O +again O +I O +get O +1 B-Value +, I-Value +2 I-Value +, I-Value +3 I-Value +, I-Value +0 I-Value +. O +This O +is O +expected O +. O +However O +, O +the O +thread O +order O +in O +every O +block O +is O +always O +0 B-Value +, I-Value +1 I-Value +, I-Value +2 I-Value +, I-Value +3 I-Value +. O +Why O +is O +this O +happening O +? O +I O +thought O +it O +would O +be O +random O +too O +. O +I O +tried O +to O +change O +my O +code O +to O +force O +thread B-Variable +0 B-Value +in O +every O +block O +to O +take O +longer O +to O +execute O +. O +I O +did O +it O +like O +this O +: O + +I O +would O +expect O +thread O +order O +to O +be O +1 B-Value +, O +2 I-Value +, O +3 I-Value +, O +0 I-Value +. O +However O +, O +I O +got O +a O +similar O +result O +to O +the O +one O +I O +have O +shown O +above O +where O +thread O +order O +was O +always O +0 B-Value +, O +1 I-Value +, O +2 I-Value +, O +3 I-Value +. O +Why O +is O +this O +happening O +? O +With O +4 O +threads O +per O +block O +you O +are O +only O +launching O +one O +warp B-Class +per O +block O +. O +A O +warp B-Class +is O +the O +unit O +of O +execution O +( O +and O +scheduling O +, O +and O +resource O +assignment O +) O +in O +CUDA B-Application +, O +not O +a O +thread O +. O +Currently O +, O +a O +warp B-Class +consists O +of O +32 O +threads O +. O +This O +means O +that O +all O +4 O +of O +your O +threads O +per O +block O +( O +since O +there O +is O +no O +conditional O + +behavior O +in O +this O +case O +) O +are O +executing O +in O +lockstep O +. O +When O +they O +reach O +the O +printf B-Function +function O +call O +, O +they O +all O +execute O +the O +call O +to O +that O +function O +in O +the O +same O +line O +of O +code O +, O +in O +lockstep O +. O +So O +the O +question O +becomes O +, O +in O +this O +situation O +, O +how O +does O +the O +CUDA B-Application +runtime O +dispatch O +these O +" O +simultaneous O +" O +function O +calls O +? O +The O +answer O +to O +that O +question O +is O +unspecified O +, O +but O +it O +is O +not O +" O +random O +" O +. O +Therefore O +it O +'s O +reasonable O +that O +the O +order O +of O +dispatch O +for O +operations O +within O +a O +warp O +does O +not O +change O +from O +run O +to O +run O +. O +If O +you O +launch O +enough O +threads O +to O +create O +multiple O +warps O +per O +block O +, O +and O +probably O + +also O +include O +some O +other O +code O +to O +disperse O +and O +or O +" O +randomize O +" O +the O +behavior O +between O +warps O +, O +you O +should O +be O +able O +to O +see O +printf B-Code_Block +operations O +emanating O +from O +separate O +warps O +occurring O +in O +" O +random O +" O +order O +. O +To O +answer O +the O +second O +part O +of O +your O +question O +, O +when O +control O +flow O +diverges O +at O +the O +if B-Code_Block +statement O +, O +the O +threads O +where B-Code_Block +threadIdx.x B-Code_Block +!= I-Code_Block +0 I-Code_Block +simply O +wait O +to O +at O +the O +convergence O +point O +after O +the O +if B-Code_Block +statement O +. O +They O +do O +not O +go O +on O +to O +the O +printf B-Code_Block +statement O +until O +thread B-Variable +0 B-Value +has O +completed O +the O +if B-Code_Block +block O +. O +I O +am O +using O +Spring B-Library +Boot I-Library +1.4.0.M3 B-Version +. O +I O +have O + +an O +@Entity B-Class +that O +has O +a O +username B-Variable +which O +should O +be O +unique O +: O +Using O +a O +Spring B-Library +Data I-Library +Repository I-Library +, O +I O +want O +to O +test O +if O +there O +will O +be O +an O +exception B-Class +when O +a O +duplicate O +username B-Variable +is O +used O +. O +This O +test O +works O +: O +However O +, O +when O +adding O +@Transactional B-Function +with O +@Commit B-Function +, O +this O +test O +fails O +: O +But O +looking O +at O +the O +logging O +, O +the O +DataIntegrityViolationException B-Class +is O +being O +thrown O +: O +Why O +does O +the O +test O +fail O +? O +Could O +it O +be O +that O +JUnit B-Library +checks O +if O +the O +exception B-Class +is O +thrown O +before O +Spring B-Library +commits O +the O +transaction O +? O +I O +need O +to O +test O +DataIntegrityViolationException B-Class +in O +MVC B-Library +controller O +test B-Code_Block +( O + +@WebAppConfiguration B-Class +) O +and O +do O +@ResponseStatus B-Class +modification O +inside O +application O +by O +@ControllerAdvice B-Class +.So O +yours O +approach O +does O +n't O +suit O +for O +me O +, O +it O +flush O +too O +late O +. O +Unfortunately O +@NotTransactional B-Class +annotation O +was O +excluded O +in O +Spring B-Library +4 B-Version +, O +so O +I O +just O +separate O +my O +tests O +for O +@Transactional B-Class +and O +not O +transactional O +. O +See O +also O +http://docs.spring.io/spring/docs/3.0.x/spring-framework-reference/html/testing.html#integration-testing-annotations O +from O +UPDATE O +. O +2 O +ways O +solution O +: O +separate O +your O +test O +explicitly O +for O + +Transactional B-Class +and O +Non B-Class +transactional O +use O +@Transactional B-Function +( I-Code_Block +propagation I-Code_Block += I-Code_Block +Propagation.NEVER I-Code_Block +) I-Code_Block +where O +transaction O +is O +not O +desirable O +Based O +on O +the O +comments O +by O +M.Deinum B-User_Name +and O +Stephane B-User_Name +Nicoll I-User_Name +, O +this O +is O +the O +working O +version O +: O +Note O +that O +both O +static B-Data_Type +methods O +need O +to O +be O +called O +to O +make O +it O +work O +. O +I O +would O +like O +to O +know O +how O +I O +could O +import O +the O +JSTL B-Library +core O +library O +directly O +into O +my O +project O +instead O +of O +accessing O +it O +by O +a O +link O +this O +way O +: O +EDIT O +: O +In O +fact O +it O +is O +already O +working O +, O +i O +have O +already O +import O +the O +jstl.jar B-File_Name +file O +in O +my O + +eclipse B-Application +project O +. O +I O +can O +use O +in O +my O +jsp B-File_Type +files O +. O +The O +thing O +is O +that O +i O +would O +like O +to O +use O +them O +without O +having O +a O +link O +to O +another O +website O +. O +( O +http://java.sun.com/jsp/jstl/core O +) O +Download O +the O +jar B-File_Type +file O +: O +http://www.java2s.com/Code/Jar/j/Downloadjstljar.htm O +Import O +it O +into O +your O +IDE O +: O +Eclipse B-Application +: O +How O +to O +import O +a O +jar B-File_Type +in O +Eclipse B-Application +NetBeans B-Application +: O +How O +to O +use O +.jar B-File_Type +files O +in O +NetBeans B-Application +? O +Use O +an O +import B-Code_Block +statement O +to O +import O +your O +library O +: O +import B-Code_Block + +javax.servlet.jsp.jstl.core.* I-Output_Block +; I-Output_Block +All O +. O +I O +am O +using O +xmpp B-Library +framework O +for O +Facebook B-Library +chat O +implementation O +in O +iOS B-Operating_System +application O +. O +The O +chat O +is O +working O +fine O +with O +iOS B-Operating_System +, O +but O +there O +is O +one O +issue O +with O +this O +. O +When O +online O +and O +offline O +friends O +are O +being O +shown O +, O +always O +presence O +of O +online O +and O +offline O +friend O +is O +called O +. O +In O +this O +process O +I O +'m O +getting O +the O +Blank B-Value +name O +of O +online O +user O +in O +Facebook B-Application +chat O +, O +the O +last O +name O +field O +is O +blank B-Value +. O +Can O +anyone O +tell O +me O +what O +is O +wrong O +with O +my O +config O +.. O +. O +I O +'ve O +been O +at O +this O +for O +a O +bit O +and O +ca O +n't O +seem O +to O +get O + +it O +outputing O +the O +way O +I O +want O +. O +My O +output O +files O +are O +as O +follows O +after O +two O +runs O +log-file_2014.02.20.xml B-File_Name +log-file_2014.02.20.1.xml B-File_Name +Which O +is O +what O +I O +would O +expect O +, O +but O +when O +I O +run O +it O +a O +third O +time O +. O +I O +would O +expect O +to O +see O +log-file_2014.02.20.2.xml B-File_Name +however O +.. O +. O +the O +actively O +logging O +file O +replaces O +the O +file O +with O +no O +index B-Variable +" O +log-file_2014.02.20.xml B-File_Name +" O +, O +and O +the O +file O +that O +had O +no O +index B-Variable +gets O +moved O +to O +one O +with O +the O +.1 B-File_Type +index B-Variable +and O + +the O +one O +that O +had O +the O +.1 B-Value +index O +is O +deleted O +! O +So O +my O +indexes B-Variable +never O +go O +past O +.1 B-Value +for O +any O +given O +date O +. O +Did O +ya O +follow O +that O +.. O +. O +Any O +help O +would O +be O +grateful O +! O +use O +this O +configration O +.. O +. O +Hope O +it O +helps O +.. O +. O +:) O +In O +my O +C# B-Language +program O +I O +have O +a O +big O +problem O +: O +I O +add O +an O +SQL B-Language +server I-Application +database O +named O +" O +Behgozin_DB B-Value +" O +to O +my O +project O +. O +I O +do O +the O +following O +steps O +for O +adding O +the O +database O +: O +In O +my O +SQL B-Application +server I-Application +management I-Application +studio I-Application +I O +detach O +my O +database O +In O +my O +visual B-Application +studio I-Application +from O +Data B-User_Interface_Element +menu I-User_Interface_Element +I O +add O +new O +data O +source O +My O +Connection B-Variable +String B-Data_Type +is O +: O +Everything O +is O +OK O +but O + +when O +I O +insert O +something O +into O +my O +database O +after O +closing O +the O +application O +, O +I O +can O +not O +see O +any O +data O +. O +But O +when O +I O +right O +click O +on O +my O +tables B-Data_Structure +in O +my O +visual B-Application +studio I-Application +server I-Application +explorer I-Application +menu B-User_Interface_Element +and O +choose O +show O +table B-Data_Structure +data O +, O +my O +application O +reads O +the O +whole O +table B-Data_Structure +of O +data O +completely O +! O +Another O +problem O +is O +after O +working O +with O +this O +app O +, O +even O +it O +can O +not O +read O +its O +own O +data O +in O +table B-Data_Structure +. O +Its O +a O +C# B-Language +project O +in O +Visual B-Application +Studio I-Application +2010 B-Version +SQL B-Application +Server I-Application +2008 B-Version +. O +Your O +database O +file O +has O +2 O +copies O +. O +One O +is O +in O +your O +project O +and O +the O +other O +is O +in O +bin B-File_Name +\debug I-Code_Block +. O +In O +design O +time O +you O +edit O +the O +one O +in O +your O +project O +. O +Each O +time O +your O +project O + +changes O +and O +you O +build O +it O +, O +the O +project O +database O +file O +is O +overwriting O +the O +file O +in O +bin B-File_Name +\debug I-File_Name +, O +and O +this O +file O +you O +'re O +updating O +in O +run-time O +. O +In O +order O +to O +solve O +that O +you O +have O +three O +options O +: O +Use O +only O +the O +file O +in O +bin B-File_Name +\debug I-File_Name +. O +Set O +the O +project O +database O +file O +copy O +options O +to O +" B-Value +Never I-Value +" I-Value +( O +in O +the O +properties O +window O +) O +, O +show O +all O +files O +of O +the O +project O +and O +add O +the O +bin B-File_Name +\debug I-File_Name +database I-File_Name +file O +to O +the O +server B-Application +explorer I-Application +. O +Caution O +: O +If O +you O +accidently O +delete O +the O +bin B-File_Name +\debug I-File_Name +folder O +all O +your O +changes O +are O +gone O +. O +Manually O +copy O +the O +database O +file O +from O +bin B-File_Name +\debug I-File_Name +to O +the O +project O +folder O +when O +you O +change O + +it O +. O +Put O +the O +file O +in O +your O +sql B-Language +server B-Application +folder O +and O +not O +in O +your O +project O +. O +When O +deploying O +, O +change O +the O +connection O +string B-Data_Type +and O +copy O +the O +database O +from O +server B-Application +. O +Replace O +" B-Value +|DataDirectory| B-Value +" O +macro O +with O +the O +absolute O +path O +to O +the O +project O +database O +file O +. O +When O +deploying O +, O +just O +change O +it O +back O +to O +" B-Value +|DataDirectory| O +" O +I O +'m O +facing O +an O +authentication O +issue O +not O +being O +able O +to O +read/write O +to O +CloudStorage B-Application +from O +PHP B-Application +on O +GCE B-Application +. O +I O +tested O +using O +the O +sample O +API I-Library +but O +received O +an O +error O +message O +and O +the O +authentication O +failed O +. O +Also O +, O +I O +see O +no O +Redirect O +URI O +generated O +in O +" B-Value +2 I-Value +. O +Generated O +a O +Client B-Application + +ID B-Variable +" O +Maybe O +this O +is O +a O +stupid O +question O +but O +it O +'s O +bugging O +me O +. O +I O +have O +a O +bi-directional O +one O +to O +many O +relationship O +of O +Employee B-Class +to O +Vehicles B-Class +. O +When O +I O +persist O +an O +Employee B-Class +in O +the O +database O +for O +the O +first O +time O +( O +i.e O +. O +it O +has O +no O +assigned O +ID B-Variable +) O +I O +also O +want O +its O +associated O +Vehicles B-Class +to O +be O +persisted O +. O +This O +works O +fine O +for O +me O +at O +the O +moment O +, O +except O +that O +my O +saved O +Vehicle B-Class +entity O +is O +not O +getting O +the O +associated O +Employee B-Class +mapped O +automatically O +, O +and O +in O +the O +database O +the O +employee_id B-Variable +foreign O +key O +column B-Data_Structure +in O +the O +Vehicle B-Class +table O +is O +null B-Value +. O +My O +question O + +is O +, O +is O +it O +possible O +to O +have O +the O +Vehicle B-Class +'s O +employee B-Class +persisted O +at O +the O +same O +time O +the O +Employee B-Class +itself O +is O +being O +persisted O +? O +I O +realise O +that O +the O +Employee B-Class +would O +need O +to O +be O +saved O +first O +, O +then O +the O +Vehicle B-Class +saved O +afterwards O +. O +Can O +JPA B-Library +do O +this O +automatically O +for O +me O +? O +Or O +do O +I O +have O +to O +do O +something O +like O +the O +following O +: O +Thanks O +! O +Edit O +: O +As O +requested O +, O +here O +'s O +my O +mappings O +( O +without O +all O +the O +other O +methods O +etc O +. O +) O +I O +just O +realised O +I O +should O +have O +had O +the O +following O +method O +defined O +on O +my O +Employee B-Class +class O +: O +Now O +the O +code O +above O +will O +look O +like O + +this O +: O +Much O +simpler O +and O +cleaner O +. O +Thanks O +for O +your O +help O +everyone O +! O +One O +way O +to O +do O +that O +is O +to O +set O +the O +cascade B-Code_Block +option O +on O +you O +" O +One O +" O +side O +of O +relationship O +: O +by O +this O +, O +when O +you O +call O +it O +will O +save O +the O +vehicles B-Class +too O +. O +You O +have O +to O +set O +the O +associatedEmployee O +on O +the O +Vehicle B-Class +before O +persisting O +the O +Employee B-Variable +. O +My O +table B-Data_Structure +( O +projects O +) O +: O +As O +you O +may O +have O +noticed O +, O +this O +is O +hierarchical O +data O +using O +the O +nested B-Data_Structure +set I-Algorithm +model O +. O +Tree B-Data_Structure +pretty-printed O +: O +I O +want O +to O +select O +all O +sub O +projects O +under O +project O +1 O +and O +4 O +. O +I O +can O +do O +this O +with O +: O +However O +, O +this O +is O +very O +slow O + +with O +a O +large O +table B-Data_Structure +, O +when O +running O +EXPLAIN B-Function +( O +Query O +) O +i O +get O +: O +( O +The O +project O +table B-Data_Structure +has O +indexes O +on O +lft B-Code_Block +, O +rgt B-Variable +, O +and O +lft-rgt B-Code_Block +. O +As O +you O +can O +see O +, O +mysql B-Application +does O +not O +use O +any O +index O +, O +and O +loops O +through O +the O +7040 O +records O +) O +I O +have O +found O +that O +if O +I O +only O +select O +for O +one O +of O +the O +super O +project O +, O +mysql B-Application +manages O +to O +use O +the O +indexes O +: O +EXPLAINs B-Function +to O +: O +FINALLY O +, O +my O +question O +: O +I O +there O +any O +way O +i O +can O +SELECT B-Code_Block +rows B-Data_Structure +matching O +multiple O +ranges O +, O +and O +still O +benefit O +from O +indexes O +? O +From O +7.2.5.1 B-Version + +. O +The O +Range B-Function +Access I-Function +Method O +for O +Single-Part O +Indexes O +in O +MySQL B-Application +reference O +manual O +: O +So O +you O +need O +to O +have O +a O +union O +of O +two O +different O +selects O +. O +have O +you O +tried O +a O +union B-Code_Block +? O +take O +your O +second O +example O +, O +add O +" O +union B-Code_Block +" O +underneath O +and O +the O +repeat O +but O +matching O +id B-Variable +4 O +. O +i O +do O +n't O +know O +if O +it O +would O +work O +, O +but O +it O +seems O +like O +an O +obvious O +thing O +to O +try O +. O +edit O +: O +I O +'m O +setting O +up O +IPython B-Application +to O +automatically O +load O +Sympy B-Application +and O +configure O +it O +'s O +output O +method O +on O +startup O +. O +However O +, O +whatever O +I O +try O +I O +ca O +n't O +get O +sympy B-Library +to O +initialize O +the O + +latex/unicode B-Data_Type +style O +output O +printing O +. O +Steps O +taken O +: O +The O +startup O +script O +: O +When O +I O +start O +ipython B-Application +, O +it O +does O +n't O +display O +a O +" O +pretty-printed O +" O +output O +: O +Output O +: O +Similar O +output O +using O +qtconsole/notebook B-Library +. O +If O +I O +run O +the O +init_printing B-Function +command O +again O +the O +pretty O +print O +display O +works O +for O +that O +kernel O +instance O +. O +Additionally O +I O +know O +the O +startup O +script O +is O +being O +run O +properly O +because O +I O +can O +add O +print O +statements O +and O +get O +output O +( O +additionally O +, O +the O +packages O +are O +imported O +and O +available O +for O +use O +) O +. O +I O +am O +running O +sympy B-Application +0.7.3 B-Version +, O +ipython3 B-Application +1.1 B-Version + +, O +matplotlib B-Library +1.3.1 B-Version +, O +numpy B-Library +1.7.1 B-Version +, O +scipy B-Library +0.12.0 B-Version +on O +a O +64-bit O +Ubuntu B-Operating_System +13.10 B-Version +install O +. O +Incidentally O +, O +running O +the O +plain O +python3 B-Language +terminal B-Application +with O +PYTHONSTARTUP B-Code_Block +set O +to O +run O +the O +same O +startup O +script O +will O +properly O +pretty O +print O +Sympy B-Library +output O +. O +In O +response O +to O +Jakob B-User_Name +'s O +comment O +, O +ipython3 B-Library +1.1.0 B-Version +is O +still O +using O +the O +interactive O +sympy B-Library +module O +instead O +of O +sympy B-Library +0.7.3 B-Version +' O +s O +init_printing B-Function +, O +which O +theoretically O +works O +fine O +except O + +I O +get O +nasty O +warning O +output O +at O +start O +. O +I O +'m O +also O +not O +too O +keen O +on O +everything O +in O +sympy B-Application +being O +imported O +into O +the O +global B-Data_Type +namespace O +, O +which O +the O +bundled O +sympy B-Application +config O +does O +( O +as O +well O +as O +define O +a O +few O +variables O +) O +. O +However O +, O +the O +suggestion O +did O +help O +me O +find O +a O +fix O +: O +Instead O +of O +putting O +my O +startup O +code O +into O +the O +00-startup.py B-File_Name +, O +I O +modified O +the O +ipython_config.py B-File_Name +file O +to O +execute O +additional O +lines O +at O +startup O +: O +I O +'m O +unsure O +if O +this O +is O +a O +bug O +in O +either O +sympy B-Application +or O +ipython B-Application +, O +but O +this O +option O +certainly O +works O +. O +How O + +can O +i O +set O +left O +mouse B-Device +click O +to O +save O +the O +doc B-File_Type +( O +docx B-File_Type +) O +document O +to O +my O +computer B-Device +? O +At O +this O +moment O +its O +only O +opening O +doc B-File_Type +file O +in O +a O +browser B-Application +, O +i O +want O +to O +prevent O +that O +. O +How O +'s O +that O +can O +be O +done O +? O +The O +code O +above O +is O +not O +working O +- O +still O +opening O +that O +doc B-File_Type +file O +in O +a O +browser B-Application +.. O +. O +Thanks O +in O +advance O +. O +i O +can O +set O +that O +on O +my O +test.php B-File_Name +page O +: O +but O +then O +when O +i O +load O +test.php B-File_Name +it O +always O +asks O +me O +to O +save O +that O +file O +.. O +. O +how O +can O +i O +make O +to O +work O +that O +only O +for O +links O +that O +leading O +to O +doc||docx B-File_Type +files O +? O +Add O +the O +following O +to O +your O +.htaccess B-File_Type +file O + +in O +your O +sites O +directory O +: O +This O +will O +force O +it O +to O +download O +, O +and O +you O +can O +use O +a O +regular O + I-Code_Block +to O +link O +to O +the O +file O +without O +any O +JS B-Language +intervention O +. O +How O +can O +I O +swap O +mouse-1 B-Device +and O +mouse-2 B-Device +on O +Emacs B-Application +? O +There O +must O +be O +a O +simple O +.emacs B-File_Type +code O +; O +I O +spent O +one O +hour O +searching O +on O +the O +web O +but O +I O +could O +n't O +find O +any O +example O +.. O +. O +Thanks O +in O +advance O +. O +You O +can O +do O +it O +with O +But O +if O +you O +tell O +us O +why O +, O +maybe O +we O +can O +give O +a O +better O +answer O +. O +E.g O +. O +you O +might O +want O +to O +take O +a O +look O +at O + +mouse-1-click-follows-link B-Code_Block +which O +performs O +a O +similar O +( O +but O +partial O +) O +swap O +( O +and O +is O +activated O +by O +default O +) O +. O +I O +have O +downladed O +an O +OBJ B-File_Type +file O +along O +with O +meta O +information O +and O +properties O +, O +based O +on O +an O +IFC O +that O +was O +uploaded O +to O +Autodesk B-Application +Forge I-Application +. O +Question O +is O +; O +How O +do O +I O +map O +objects O +in O +the O +OBJ B-File_Type +to O +the O +correct O +entries O +in O +the O +' O +meta B-Variable +' O +and O +' O +properties B-Variable +' O +? O +I O +have O +a O +procedure O +that O +I O +'ll O +need O +in O +a O +lot O +( O +if O +not O +all O +) O +of O +my O +view O +controllers O +. O +I O +want O +to O +know O +how O +I O +can O +put O +it O +in O +one O +place O +( O +for O +code O + +cleanliness O +and O +maintenance O +) O +and O +utilize O +it O +elsewhere O +. O +If O +you O +'re O +not O +sure O +that O +the O +method O +will O +be O +used O +in O +all O +Controllers B-Class +, O +I O +'d O +recommend O +creating O +a O +category O +for O +the O +functionality O +you O +'re O +adding O +. O +You O +can O +find O +a O +good O +intro O +to O +categories O +here O +. O +If O +you O +'re O +sure O +you O +'ll O +need O +it O +in O +all O +UIViewControllers B-Class +, O +creating O +a O +base O +Controller B-Class +and O +subclassing O +should O +be O +the O +better O +approach O +. O +All O +other O +methods O +of O +implementing O +( O +Placing O +a O +class O +method O +in O +a O +utility O +/ O +Adding O +to O +* B-File_Name +-Prefix.pch I-File_Name +) O +will O +work O +, O +but O +might O +not O +be O + +ideal O +solutions O +( O +assuming O +the O +functionality O +your O +'re O +adding O +is O +only O +applicable O +to O +UIViewController B-Class +) O +. O +There O +are O +more O +ways O +on O +how O +to O +approach O +this O +- O +depending O +on O +what O +exactly O +you O +would O +like O +to O +achieve O +. O +If O +this O +methods O +are O +tied O +with O +UIViewController B-Class +'s O +life O +and O +data O +you O +would O +probably O +want O +to O +subclass O +UIViewController B-Class +or O +make O +an O +UIViewController B-Class +category O +. O +A O +: O +Subclassing O +( O +you O +want O +to O +add O +some O +custom O +properties O +, O +variables O +, O +methods O +or O +you O +want O +to O +override O +a O +method O +) O +: O +MySubclassedViewController.h B-File_Name + +MySubclassedViewController.m B-File_Name +B B-Variable +: O +Category O +( O +you O +just O +want O +to O +add O +some O +extra O +method O +to O +a O +class O +) O +: O +UIViewController+ B-File_Name +SpecialCatrgory.h B-File_Name +UIViewController+ B-File_Name +SpecialCatrgory.m B-File_Name +C B-Variable +: O +Dedicated O +helper O +class O +On O +the O +other O +hand O +if O +you O +find O +yourself O +using O +some O +independent O +method O +on O +more O +than O +one O +place O +you O +might O +want O +to O +consider O +writing O +up O +a O +helper O +class O +and O +use O +it O +as O +a O +singleton O +. O +MyHelperClass.h B-File_Name +MyHelperClass.m B-File_Name +You O +use O +it O +simply O +by O +importing O +MyHelperClass.h B-File_Name +( O +or O +putting O +it O +in O + +-Prefix.pch I-File_Name +) O +, O +without O +explicitly O +creating O +an O +instance O +. O +For O +example O +: O +I O +am O +trying O +to O +implement O +a O +queue B-Data_Structure +, O +dequeueing O +and O +requeueing O +in O +a O +single O +channel O +. O +I O +have O +two O +questions O +: O +why O +do O +I O +obtain O +a O +deadlock O +? O +I O +was O +expecting O +an O +infinite O +loop O +( O +since O +I O +am O +requeueing O +even O +elements O +which O +generate O +more O +elements O +and O +so O +on O +) O +. O +Should O +n't O +the O +range B-Class +queue B-Data_Structure +always O +listening O +to O +the O +channel O +? O +this O +is O +part O +of O +the O +print O +before O +the O +deadloks O +: O +Are O +two O +different O +goroutines O +dequeueing O +the O +same O +element O +? O +I O +do O + +n't O +understand O +why O +this O +data O +race O +; O +I O +thought O +that O +the O +range O +would O +pick O +one O +per O +time O +. O +Code O +in O +Playground B-Application +When O +a O +range O +loop O +over O +a O +channel B-Class +reaches O +the O +end O +of O +the O +channel O +'s O +buffer O +( O +if O +the O +channel O +has O +one O +) O +it O +will O +block O +, O +waiting O +for O +more O +elements O +to O +be O +sent O +through O +the O +channel O +. O +If O +there O +are O +no O +other O +running O +or O +runnable O +goroutines B-Device +then O +we O +'ve O +reached O +a O +deadlock O +. O +Minimal O +example O +: O +http://play.golang.org/p/Vb4-RFEmm3 O +No O +. O +What O +'s O +happening O +is O +that O +this O +line O +( O +26 O +) O +: O + +instructs O +Go B-Language +'s O +runtime O +to O +schedule O +a O +new O +goroutine O +, O +it O +does O +not O +necessarily O +execute O +immediately O +. O +When O +the O +goroutine O +effectively O +runs O +, O +new B-Variable +'s O +value O +is O +1001 B-Value +, O +not O +1000 B-Value +as O +printed O +. O +It O +'s O +a O +scope O +problem O +. O +This O +happens O +a O +lot O +when O +getting O +started O +with O +go B-Code_Block +func() I-Code_Block +{ I-Code_Block +... I-Code_Block +} I-Code_Block +; O +it O +might O +be O +more O +common O +than O +real O +problems O +with O +concurrency O +. O +There O +are O +sections O +in O +the O +FAQ O +and O +the O +Go B-Language +wiki O +about O +it O +. O +The O +anonymous O +func O +you O +create O +gets O +a O +reference O +to O +a O +variable O +in O +the O +outer O +scope O +, O +not O +to O +its O +value O +at O +the O +time O +the O +func B-Code_Block +statement O +runs O +. O +And O +that O +loop O +variable O +is O +updated O + +each O +pass O +through O +the O +loop O +, O +so O +it O +changes O +between O +your O +go O +statement O +and O +when O +the O +goroutine O +actually O +runs O +. O +You O +can O +work O +around O +this O +by O +declaring O +another O +variable O +during O +each O +iteration O +of O +the O +loop O +( O +i.e O +. O +, O +inside O +the O +for B-Code_Block +braces O +) O +. O +If O +your O +loop O +was O +for B-Code_Block +i I-Code_Block +:= I-Code_Block +range I-Code_Block +arr I-Code_Block +{ I-Code_Block +... I-Code_Block +} I-Code_Block +you O +could O +just O +add O +i B-Code_Block +:= I-Code_Block +i I-Code_Block +. O +So O +, O +this O +bad O +version O +: O +always O +... O +prints O +9 B-Value +. O +A O +fixed O +version O +, O +redeclaring O +i B-Variable +inside O +the O +loop O +: O +prints O +.. O +0-9 B-Value +. O +A O +different O +, O +arguably O +more O +elegant O +way O +to O +redeclare O +i B-Variable +is O +to O +make O +it O +a O +param O +of O + +the O +anonymous O +func O +; O +then O +it O +'s O +not O +a O +weird-looking O +standalone O +statement O +: O +Here O +'s O +that O +code O +. O +For O +all O +of O +the O +Playground B-Application +versions O +, O +I O +had O +to O +add O +synchronization O +so O +main B-Code_Block +would O +n't O +exit O +before O +the O +goroutines B-Class +run O +. O +It O +'s O +confusing O +that O +a O +declaration O +that O +" O +runs O +" O +once O +each O +time O +through O +the O +loop O +behaves O +differently O +( O +weird O +way O +for O +scope O +to O +manifest O +) O +but O +the O +way O +to O +get O +around O +it O +is O +straightforward O +enough O +. O +In O +your O +case O +: O +queue B-Code_Block +< I-Code_Block +- I-Code_Block +new I-Code_Block +can O +run O +at O +any O +time O +, O +and O +it O +turns O +out O +to O +run O +after O +you O +'ve O +gone O +through O +the O +for B-Code_Block +_ I-Code_Block +, I-Code_Block +new B-Code_Block + +loop O +entirely O +. O +However O +, O +it O +uses O +whatever O +the O +value O +of O +new B-Code_Block +is O +as O +of O +when O +it O +actually O +runs O +, O +not O +as O +of O +when O +the O +go B-Code_Block +statement O +was O +executed O +. O +In O +this O +case O +, O +both O +the O +goroutines O +you O +start O +get O +the O +value O +1001 B-Value +, O +the O +so O +second O +time O +through O +both O +values O +passed O +into O +enqueue B-Function +are O +odd O +( O +you O +can O +see O +that O +as O +two O +using O +1001s B-Value +in O +your O +output O +) O +so O +nothing O +writes O +to O +the O +queue B-Data_Structure +, O +so O +there O +is O +nothing O +for O +the O +range O +queue B-Data_Structure +loop O +to O +consume O +. O +The O +channel B-Data_Structure +is O +n't O +closed O +either O +, O +so O +the O +main O +ca O +n't O +just O +end O +, O +so O +you O +get O +a O +deadlock O +. O +You O +want O +a O +different O + +value O +to O +be O +" O +captured O +" O +for O +each O +execution O +of O +the O +goroutine O +. O +For O +that O +, O +you O +can O +put O +new B-Code_Block +:= I-Code_Block +new I-Code_Block +at O +the O +top O +of O +the O +loop O +, O +as O +funny O +as O +that O +looks O +. O +That O +'s O +enough O +to O +make O +the O +value O +from O +each O +iteration O +a O +" O +different O +var B-Data_Type +" O +from O +Go B-Language +'s O +perspective O +, O +so O +you O +get O +1000 B-Value +and O +1001 B-Value +inserted O +in O +the O +channel B-Data_Structure +. O +Once O +you O +'ve O +actually O +got O +it O +working O +, O +the O +Playground B-Application +wo O +n't O +actually O +run O +your O +code O +successfully O +because O +it O +loops O +forever O +and O +there O +are O +a O +zillion O +goroutines O +running O +and O +I O +guess O +the O +Playground B-Application +does O +n't O +like O +that O +( O +overusing O + +resources O +) O +. O +If O +you O +add O +a O +limit O +of O +100 O +elements O +dequeued O +before O +quitting O +, O +you O +get O +http://play.golang.org/p/bBM3uTnvxi O +. O +You O +'ll O +also O +notice O +the O +numbers O +it O +outputs O +get O +weird O +because O +multiplying O +by O +100 B-Value +each O +time O +will O +eventually O +overflow O +the O +machine O +'s O +int B-Data_Type +type O +, O +but O +that O +'s O +just O +how O +it O +goes O +writing O +programs O +in O +lowish-level O +languages O +. O +As O +a O +minor O +thing O +, O +you O +probably O +do O +n't O +want O +to O +name O +a O +variable O +new O +because O +that O +'s O +also O +the O +name O +of O +a O +built-in O +function O +. O +It O +'s O +legal O +to O + +do O +so O +, O +just O +confusing O +. O +( O +It O +can O +be O +kind O +of O +reflexive O +to O +name O +a O +length O +variable O +len B-Variable +, O +especially O +if O +nothing O +was O +wrong O +with O +that O +in O +the O +language O +you O +'re O +coming O +from O +. O +) O +I O +wish O +I O +could O +ask O +this O +question O +in O +context O +, O +but O +I O +do O +n't O +have O +enough O +rep O +to O +comment O +and O +ask O +my O +question O +there O +, O +so O +I O +have O +to O +make O +a O +new O +post O +. O +I O +am O +trying O +to O +use O +the O +code O +from O +this O +comment O +: O +https://stackoverflow.com/a/21034111/432509 O +I O +am O +working O +in O +Python B-Language +in O +Houdini B-User_Name +at O +school O +, O +so O +I O +am O +limited O +on O +what O +libraries O +I O +can O + +utilize O +to O +what O +they O +have O +installed O +, O +so O +I O +was O +going O +to O +use O +the O +pure O +python B-Language +implementation O +to O +write O +some O +data O +out O +as O +a O +PNG B-File_Type +map B-Data_Structure +, O +but O +I O +am O +running O +into O +an O +error O +in O +this O +line O +: O +I O +am O +getting O +the O +following O +error O +: O +Unfortunately O +I O +am O +not O +familiar O +with O +all O +of O +this O +syntax O +and O +as O +such O +I O +am O +not O +able O +to O +repair O +the O +error O +myself O +. O +Any O +clues O +? O +How O +does O +one O +inject O +state B-Variable +into O +ring B-Class +handlers O +most O +conveniently O +( O +without O +using O +global B-Data_Type +vars O +) O +? O +Here O +is O +an O +example O +: O +I O +would O +like O +to O +get O +the-state O +into O +the O +compojure B-Language +handler O +for O +main-routes B-Code_Block +. O + +The O +state B-Variable +might O +be O +something O +like O +a O +map B-Data_Structure +created O +with O +: O +In O +a O +non B-Library +ring I-Library +application O +I O +would O +create O +the O +state B-Variable +in O +a O +main B-Function +function O +and O +start O +injecting O +it O +, O +or O +parts O +of O +it O +, O +as O +function O +parameters O +to O +the O +different O +components O +of O +the O +application O +. O +Can O +something O +similar O +be O +done O +with O +ring B-Library +'s O +:init O +function O +without O +using O +a O +global B-Data_Type +var I-Data_Type +? O +The O +" O +correct O +" O +way O +to O +do O +this O +is O +to O +use O +a O +dynamically O +bound O +var B-Data_Type +. O +You O +define O +a O +var B-Data_Type +with O +: O +And O +then O +you O +create O +some O +ring B-Library +middleware O +which O +binds O +the O +var B-Data_Type +for O +each O +handler O +call O +: O +You O +would O +use O +this O +to O +inject O +dependencies O +by O +using O +this O +in O +your O +' O +main B-Function +' O + +function O +where O +you O +launch O +the O +server B-Application +: O +I O +'ve O +seen O +this O +done O +a O +couple O +of O +ways O +. O +The O +first O +is O +using O +middleware O +that O +injects O +the O +state B-Variable +as O +a O +new O +key B-Variable +in O +the O +request B-Variable +map O +. O +For O +instance O +: O +The O +other O +approach O +is O +to O +replace O +the O +call O +to O +defroutes O +, O +which O +behind O +the O +scenes O +will O +create O +a O +handler O +and O +assign O +it O +to O +a O +var B-Data_Type +, O +with O +a O +function O +that O +will O +accept O +some O +state O +and O +then O +create O +the O +routes B-Class +, O +injecting O +the O +state B-Variable +as O +parameters O +to O +function O +calls O +within O +the O +route B-Class +definitions O +: O +Given O +a O +choice O +, O +I O +'d O +probably O +go O +with O +the O +second O +approach O +. O +I O +have O +a O + +NSTableview B-Class +which O +shows O +50 O +rows B-User_Interface_Element +currently O +which O +is O +fixed O +static O +. O +Now O +I O +want O +to O +add O +a O +feature O +into O +it O +. O +I O +want O +to O +add O +a O +more O +50 O +rows B-User_Interface_Element +to O +the O +table B-Data_Structure +when O +user O +reach O +to O +the O +last O +row B-User_Interface_Element +of O +the O +NSTableView B-Class +. O +I O +mean O +currently O +I O +am O +showing O +fixed O +50 O +rows B-User_Interface_Element +in O +the O +application O +. O +But O +now O +I O +want O +to O +add O +50 O +more O +rows B-User_Interface_Element +whenever O +user O +reaches O +to O +the O +last O +row B-User_Interface_Element +of O +previous O +NsTableview B-Class +. O +Please O +give O +me O +any O +suggestions O +or O +any O +sample O +code O +to O +achieve O +my O +motive O +. O +Thanks O +in O +advance O +. O +What O +i O +have O +done O +is O +( O +This O +code O +does O +not O +work O +with O +row B-Variable +selected O +( O +Down O + +key O +pressed O +) O +, O +and O +does O +not O +load O +new O +rows B-User_Interface_Element +) O +- O +Trying O +to O +use O +features O +from O +OpenMP B-Application +3 B-Version +in O +Visual B-Application +Studio I-Application +2017 B-Version +; O +i O +'m O +getting O +error O +c3005 O +: O +' O +collapse B-Code_Block +' O +unexpected O +token I-Output_Block +encountered O +on O +openmp B-Code_Block +' O +parallel O +for O +' O +directive O +It O +seems O +Visual B-Application +Studio I-Application +2017 B-Version +only O +supports O +OpenMP2 B-Application +. O +In O +a O +request O +to O +support O +OpenMP4.5 B-Application +it O +was O +said O +from O +VS B-Application +team O +Another O +answer O +said O +How O +to O +use O +clang-cl B-Library +with O +Visual B-Application +Studio I-Application +2017 B-Version +and O +what O +is O +the O +fallback O +option O +? O +You O +may O +obtain O +clang-cl B-Library +from O +http://llvm.org/builds/ O +But O +you O + +may O +run O +into O +integration O +issues O +starting O +with O +VS2017 B-Application +: O +https://bugs.llvm.org/show_bug.cgi?id=33672 O +https://www.reddit.com/r/cpp/comments/6oepq4/making_windows_clang_401_play_nice_with_visual/ O +There O +is O +an O +attempt O +at O +solving O +this O +: O +https://github.com/WubbaLubba/LlvmForVS2017 O +/fallback O +is O +a O +clang-cl B-Library +option O +which O +makes O +it O +fall O +back O +to O +Microsoft B-Website +'s O +compiler B-Application +if O +it O +ca O +n't O +compile O +something O +itself O + +. O +But O +keep O +in O +mind O +there O +is O +no O +support O +for O +the O +/MP O +hack O +: O +http://clang-developers.42468.n3.nabble.com/clang-windows-clang-cl-support-for-MP-tp4045651p4045659.html O +I O +'ve O +implemented O +the O +IQKeyboardManager B-Library +framework O +to O +make O +the O +keyboard B-Device +handle O +easier O +. O +It O +works O +very O +fine O +, O +except O +for O +one O +thing O +: O +There O +'re O +some O +UItextField B-Class +controls O +in O +my O +app O +which O +open O +a O +UIDatePicker B-Class +in O +place O +of O +a O +default O +keyboard B-Device +( O +e.g O +. O +number B-Data_Type +pad O +, O +decimal B-Data_Type + +pad O +, O +ASCII B-Data_Type +capable O +, O +etc O +. O +) O +. O +Here O +'s O +a O +code O +sample O +with O +the O +graphical O +result O +: O +My O +question O +is O +: O +Is O +it O +possible O +to O +handle O +the O +action O +on O +the O +" O +OK O +" O +button B-User_Interface_Element +to O +fill O +the O +field O +" O +Date O +de O +naissance O +" O +? O +EDIT O +: O +For O +the O +ones O +who O +want O +to O +know O +how O +I O +solved O +my O +problem O +: O +in O +my O +.h B-File_Type +, O +I O +imported O +IQDropDownTextField.h B-File_Name +: O +#import O +" O +IQDropDownTextField.h B-File_Name +" O +in O +the O +.h B-File_Type +, O +I O +changed O +the O +type O +of O +my O +UITextField B-Class +to O +IQDropDownTextField B-Class +: O +@property B-Variable +( O +weak O +, O +nonatomic O +) O +IBOutlet B-Class + +IQDropDownTextField B-Class +* B-Variable +myTextField I-Code_Block +; O +select O +your O +field O +in O +Interface B-Class +Builder I-Library +or O +in O +your O +.xib B-File_Type +, O +and O +show O +the O +Identity O +Inspector O +: O +change O +your O +field O +'s O +class O +to O +IQDropDownTextField B-Class +. O +Note O +according O +to O +Mohd B-User_Name +Iftekhar I-User_Name +Qurashi I-User_Name +comment O +: O +the O +two O +next O +points O +can O +be O +avoided O +with O +the O +following O +code O +: O +in O +the O +.m B-File_Type +, O +I O +added O +the O +setCustomDoneTarget:action B-Variable +: O +method O +: O +in O +the O +.m B-File_Type +, O +I O +added O +the O +doneAction B-Function +: O +method O +: O +You O +can O +now O +add O +customised O +selector O +( O +please O +refer O +' O +IQUIView+ B-File_Name +IQKeyboardToolbar.h B-File_Name + +' O +) O +for O +previous/next/done B-Function +to O +get O +notify B-Class +. O +Note O +that O +custom O +selector O +does O +n't O +affect O +the O +native O +functionality O +of O +previous/next/done B-Function +, O +it O +'s O +just O +used O +for O +callback O +purpose O +only O +. O +For O +detail O +documentation O +please O +refer O +' O +IQUIView+ B-File_Name +IQKeyboardToolbar.h B-File_Name +' O +, O +for O +' O +how O +to O +use O +? O +' O +please O +refer O +' O +TextFieldViewController.m B-File_Name +' O +. O +I O +need O +help O +I O +get O +this O +error O +every O +time O +on O +my O +website O +Parse B-Error_Name +error I-Error_Name +: O +syntax B-Error_Name +error I-Error_Name +, O +unexpected B-Error_Name +end I-Error_Name +of O +file O +in O +/var/www/html/dashboard.php B-File_Name +on O +line O + +1021 O +this O +is O +my O +code O +Can O +somebody O +please O +help O +me O +in O +tell O +me O +what O +i O +'m O +doing O +wrong O +. O +Which O +line O +is O +line O +1021 O +? O +Taking O +a O +quick O +look O +at O +it O +you O +are O +missing O +a O +} B-Code_Block +at O +the O +very O +end O +of O +your O +file O +: O +PHP B-Language +is O +still O +waiting O +for O +that O +closing O +} B-Code_Block +to O +end O +your O +if B-Code_Block +statement O +which O +is O +why O +you O +are O +getting O +the O +unexpected B-Error_Name +end B-Error_Name +of I-Error_Name +file I-Error_Name +error O +. O +I O +am O +trying O +to O +export O +Firewall B-Application +logs B-File_Type +and O +it O +is O +giving O +me O +above O +error O +. O +Both O +client B-Application +and O +server B-Application +are O +Linux/Unix B-Operating_System +based O +server B-Application +. O +Can O +anyone O +help O +? O +SCP B-Device +syntax O +goes O +: O +scp B-Code_Block + +[[user@]host1:]file1 B-Code_Block +.. O +. O +[[user@]host2:]file2 B-Code_Block +. O +Your O +@ B-Value +symbols O +will O +definitely O +confuse O +scp B-Application +, O +but O +I O +'m O +not O +sure O +that O +'s O +even O +what O +you O +'re O +trying O +to O +do O +. O +Run O +your O +export B-Code_Block +first O +and O +then O +export O +the O +resulting O +file O +. O +i O +have O +to O +convert O +this O +hql B-Language +query O +in O +hibernate B-Application +criteria O +. O +in O +following O +query O +i O +am O +trying O +to O +count B-Code_Block +#option B-Code_Block +picked O +by O +various O +user O +during O +a O +survey O +. O +and O +for O +this O +i O +am O +using O +case O +inside O +count() B-Function +method O +. O +my O +hibernate B-Application +version O +5.1 B-Version +how O +to O +write O +. O + +I O +'m O +testing O +new O +JS/HTML5 B-Language +history O +methods O +. O +On O +subpage O +load O +I O +have O +an O +event O +changing O +the O +URL O +and O +history B-Variable +state I-Variable +: O +Now O +when O +the O +user O +clicks O +back O +button B-User_Interface_Element +the O +history.state B-Variable +and O +the O +URL O +changes O +, O +but O +without O +loading O +the O +previous O +page B-User_Interface_Element +( O +without O +refreshing O +the O +current O +URL O +) O +. O +I O +tried O +to O +add O +a O +manual O +refresh O +on O +the O +history.state B-Variable +change O +, O +I O +found O +something O +like O +this O +: O +but O +it O +does O +n't O +work O +. O +Try O +this O +: O +I O +got O +a O +segmentation B-Error_Name +fault I-Error_Name +when O +trying O +to O +use O +one O +cpp B-File_Type +file O +and O +tried O +to O +locate O +the O +error O +using O +Valgrind B-Library +, O +but O +I O +'m O + +confused O +. O +Since O +the O +code O +is O +very O +large O +, O +I O +will O +only O +post O +a O +short O +portion O +of O +it O +below O +: O +It O +looks O +like O +you O +are O +running O +valgrind B-Application +on O +the O +compiler B-Application +. O +Unless O +you O +are O +trying O +to O +debug O +the O +compiler B-Application +, O +you O +should O +be O +running O +valgrind B-Application +on O +your O +application O +instead O +: O +( O +replace O +./MyApp B-File_Name +with O +the O +appropriate O +executable O +name O +and O +arguments O +, O +of O +course O +) O +( O +Explanation O +: O +valgrind B-Library +is O +a O +run-time O +analysis O +tool O +; O +it O +takes O +your O +application O +as O +input O +. O +It O +is O +not O +a O +compiler B-Application +tool O +like O +some O +of O +the O +other O +debugging O +tools O +that O +are O +out O +there O +) O +I O +have O +the O +following O + +example O +So O +that O +works O +just O +fine. O +. O +but O +in O +my O +aggregate O +function O +I O +need O +to O +clear O +out O +the O +self.counters B-Variable +dict B-Data_Structure +. O +I O +'m O +having O +issues O +doing O +this. O +. O +I O +want O +to O +do O +something O +like O +If O +I O +reference O +self.counters B-Variable +in O +that O +function O +I O +get O +It O +'s O +a O +good O +idea O +to O +include O +a O +runnable O +example O +of O +your O +problem O +, O +if O +I O +try O +what O +you O +describe O +it O +works O +fine O +. O +I O +know O +that O +to O +add O +permissions O +to O +a O +specific O +user O +, O +you O +format O +a O +permissions B-Class +resource O +like O +so O +: O +But O +, O +what O +if O +i O +want O +to O +grant O +read-only O +access O +to O +anyone O +? O +I O +guess O +, O +something O +like O +: O +What O + +do O +I O +put O +as O +' O +value B-Variable +' O +? O +Well O +, O +it O +turns O +out O +that O +" O +value B-Variable +" O +is O +not O +required O +parameter O +for O +type B-Code_Block += I-Code_Block +anyone O +. O +works O +just O +fine O +. O +I O +posted O +my O +code O +below O +. O +In O +a O +modal B-Class +I O +have O +a O +editDependent O +as O +model O +in O +a O +modal B-User_Interface_Element +div B-HTML_XML_Tag +which O +is O +in O +a O +page O +employee.html B-File_Name +which O +is O +routed O +in O +a O +inner O +div B-HTML_XML_Tag +ui-view I-HTML_XML_Tag +. O +How O +to O +perform O +the O +two-way O +binding O +on O +the O +object O +from O +modal B-Class +and O +send O +it O +to O +save O +? O +I O +explain O +it O +more O +below O +. O +I O +have O +an O +index B-HTML_XML_Tag +as O +main O +html B-Language +which O +contains O +a O +ui-view B-Class +. O +I O +control O +the O +routing O +like O + +this O +This O +is O +my O +employee.html B-File_Name +this O +is O +my O +EmployeeService B-File_Name +and O +EmployeeController B-Class +UPDATE O +I O +added O +a O +new O +method O +in O +the O +controller O +And O +I O +linked O +the O +method O +to O +my O +2 O +buttons(new/edit) B-User_Interface_Element +with O +ng-view="editDependent()" B-Code_Block +but O +$scope B-Variable +is O +still O +undefined O +. O +I O +would O +like O +to O +have O +a O +kind O +of O +cascading O +primary B-Variable +key O +like O +given O +below O +. O +Root O +table B-Data_Structure +: O +Parent O +table B-Data_Structure +: O +Child O +table B-Data_Structure +: O +For O +INSERT B-Code_Block +statements O +the O +FOREIGN B-Code_Block +KEY I-Variable +part O +will O +be O +given O +, O +e.g O +. O +like O +: O +Unfortunately O +I O +run O +into O +2 O +issues O +: O +id B-Variable +of O +child B-Variable +table B-Data_Structure +is O +set O +to O +0 B-Value +for O +first O +insert O +( O +even O + +though O +declared O +as O +NOT B-Value +NULL B-Value +) O +second O +insert O +with O +same O +id_root B-Variable +and O +id_parent B-Variable +is O +not O +taking O +place O +( O +guess O +due O +to O +primary O +key O +violation O +with O +id B-Code_Block += I-Code_Block +0 I-Code_Block +, O +for O +some O +reason O +mysql B-Application +is O +not O +throwing O +an O +error O +like O +normally O +) O +I O +have O +played O +with O +UNIQUE B-Variable +KEY I-Variable +instead O +of O +PRIMARY B-Variable +KEY I-Variable +, O +but O +same O +result O +. O +Auto_increment O +of O +id B-Variable +is O +rejected O +by O +the O +engine O +when O +creating O +the O +table B-Data_Structure +. O +Apart O +from O +giving O +the O +id B-Variable +value O +e.g O +. O +through O +triggers O +, O +is O +there O +another O +way O +to O +make O +this O +work O +? O +I O +have O +defined O +a O +HotKey B-Device +Ctrl O ++ O +Space O +to O +activate O +my O +Windows B-Application +Form I-Class + +. O +When O +the O +form B-User_Interface_Element +handles O +this O +HotKey B-Class +, O +this O +event O +is O +not O +seen O +by O +the O +system O +. O +Is O +there O +subsequently O +any O +way O +to O +unhandle O +these O +keystrokes O +? O +( O +That O +is O +, O +unregister O +the O +HotKey B-Class +. O +) O +Here O +is O +what O +I O +have O +tried O +: O +Create O +a O +global B-Data_Type +bool B-Data_Type +variable O +. O +Set O +its O +value O +to O +false B-Value +. O +In O +Windows B-Operating_System +KeyDown B-Device +event O +check O +if O +that O +bool B-Data_Type +variable O +is O +true B-Value +return O +from O +method O +. O +When O +you O +want O +to O +unhandle O +these O +keystrokes O +set O +its O +value O +to O +true B-Value +and O +when O +you O +want O +to O +handle O +these O +keystrokes O +set O +its O +value O +to O +false B-Value +. O +Now O +you O +just O +have O +to O +set O +this O +flag O +value O +to O +handle O +or O +unhandle O +your O + +keystrokes O +. O +Is O +there O +any O +example O +code O +of O +a O +cpython B-Application +( O +not O +IronPython B-Application +) O +client B-Application +which O +can O +call O +Windows B-Library +Communication I-Application +Foundation I-Application +( O +WCF B-Library +) O +service O +? O +WCF B-Library +needs O +to O +expose O +functionality O +through O +a O +communication O +protocol O +. O +I O +think O +the O +most O +commonly O +used O +protocol O +is O +probably O +SOAP O +over O +HTTP O +. O +Let O +'s O +assume O +that O +'s O +what O +you O +'re O +using O +then O +. O +Take O +a O +look O +at O +this O +chapter O +in O +Dive O +Into O +Python B-Language +. O +It O +will O +show O +you O +how O +to O +make O +SOAP O +calls O +. O +I O +know O +of O +no O +unified O +way O +of O +calling O +a O +WCF B-Library +service O +in O +Python B-Language +, O +regardless O +of O +communication O +protocol O +. O +I O +used O + +suds O +. O +That O +should O +get O +you O +started O +. O +I O +'m O +able O +to O +connect O +to O +exposed O +services O +from O +WCF B-Library +and O +a O +RESTful B-Library +layer O +. O +There O +needs O +to O +be O +some O +data O +massaging O +to O +help O +do O +what O +you O +need O +, O +especially O +if O +you O +need O +to O +bind O +to O +several O +namespaces O +. O +I O +'m O +having O +an O +issue O +with O +saving O +the O +time O +into O +my O +SQL B-Language +database O +. O +The O +system O +should O +save O +time O +and O +date O +to O +the O +database O +when O +the O +user O +scans O +into O +the O +building O +. O +At O +the O +current O +moment O +it O +saves O +date O +but O +time B-Variable +is O +saved O +as O +00:00 B-Value +. O +I O +had O +problems O +converting O +the O +date O +to O +SQL B-Language +during O +the O +save O +process O +, O +so O +maybe O +i O +'ve O + +made O +a O +mistake O +in O +the O +process O +. O +I O +'ve O +looked O +at O +it O +for O +ages O +and O +cant O +see O +why O +it O +wouldnt O +save O +the O +time O +as O +well O +. O +Any O +ideas O +? O +here O +is O +the O +code O +in O +question O +Thank O +you O +You O +should O +not O +to O +change O +its O +datatype O +and O +convert O +it O +to O +string B-Data_Type +, O +just O +pass O +it O +directly O +to O +the O +database O +if O +you O +have O +column B-Data_Structure +in O +database O +of O +type O +date B-Data_Type +or O +datetime B-Data_Type +: O +You O +can O +directly O +pass O +DateTime.Now B-Data_Type +for O +command O +parameters O +and O +make O +sure O +database O +column B-Data_Structure +is O +DateTime B-Data_Type +. O +That O +'s O +It O +. O +You O +can O +remove O +below O +from O +your O +code O +as O +It O +is O +not O +required O +at O +all O +. O +I O +am O +using O +SDL B-Language +and O + +I O +have O +created O +a O +function O +that O +will O +create O +a O +random O +set O +of O +pieces O +and O +render O +them O +. O +However O +, O +when O +I O +run O +the O +program O +it O +will O +constantly O +render O +a O +new O +random O +set O +of O +pieces O +on O +a O +10 O +by O +10 O +grid B-Data_Structure +. O +I O +would O +like O +to O +know O +how O +I O +can O +get O +it O +so O +render O +once O +and O +no O +longer O +generate O +a O +new O +set B-Data_Structure +, O +but O +still O +be O +able O +to O +edit O +the O +locations O +. O +This O +is O +the O +function O +I O +have O +for O +generating O +the O +set B-Data_Structure +and O +I O +put O +it O +in O +the O +main O +loop O +. O +Create O +your O +array B-Data_Structure +" O +loc B-Variable +" O +outside O +of O +your O +location O +generation O +and O +render O +functions O +. O +Just O +now O +you O +are O +creating O +a O +new O +array B-Data_Structure +each O +time O +you O +render O +( O +multiple O + +times O +a O +second O +) O +. O +You O +can O +create O +your O +array B-Data_Structure +once O +, O +and O +then O +pass O +it O +to O +your O +location O +generation O +function O +which O +can O +alter O +the O +values O +stored O +in O +your O +array B-Data_Structure +, O +and O +then O +to O +your O +render B-Function +function O +. O +This O +will O +also O +reduce O +the O +memory O +use O +of O +your O +program O +. O +I O +may O +be O +misunderstanding O +the O +question O +, O +but O +why O +do O +n't O +you O +make O +a O +class O +with O +a O +function O +to O +generate O +and O +another O +function O +to O +edit O +the O +locations O +? O +Your O +code O +for O +execution O +would O +then O +be O +: O +Simply O +put O +, O +is O +separating O +the O +functions O +an O +issue O +? O +I O +have O +text B-File_Type +file O +with O +5 O +strings B-Data_Type +. O +I O +need O +to O +use O +NSURLConnection B-Class +to O +get O +contnent O +of O + +this O +file O +. O +But O +NSLog B-Library +shows O +me O +, O +that O +' O +dump B-Variable +' O +is O +empty O +. O +How O +can O +I O +transform O +the O +data O +from O +NSMutableData B-Class +to O +NSArray B-Class +. O +Arrays B-Class +is O +because O +I O +need O +to O +show O +those O +5 O +items O +in O +a O +TableView B-Class +. O +Thanks O +in O +advance O +. O +BTW O +URL O +works O +, O +you O +can O +see O +the O +file O +. O +If O +you O +do O +n't O +want O +to O +use O +a O +delegate O +, O +you O +can O +use O +a O +synchronous O +call O +with O +NSURLConnection B-Class +, O +like O +this O +: O +Just O +beware O +that O +this O +will O +not O +be O +running O +asynchronously O +. O +If O +you O +do O +n't O +want O +it O +to O +run O +on O +the O +main O +thread O +and O +block O +your O +main O +thread/UI O +, O +consider O + +using O +a O +separate O +thread O +to O +execute O +that O +code O +or O +use O +GCD B-Application +. O +You O +need O +to O +implement O +the O +delegate O +methods O +for O +NSURLConnection B-Class +to O +be O +notified O +of O +incoming O +data O +. O +You O +are O +using O +the O +asynchronous B-Function +methods O +. O +Also O +note O +that O +[ B-Function +NSMutableData I-Class +data I-Variable +] I-Class +just O +creates O +an O +empty O +data-object B-Variable +. O +so O +you O +ca O +n't O +expect O +it O +to O +contain O +any O +data O +. O +I O +suggest O +you O +read O + +https://developer.apple.com/library/ios/#documentation/Cocoa/Conceptual/URLLoadingSystem/Tasks/UsingNSURLConnection.html#//apple_ref/doc/uid/20001836-BAJEAIEE O +( O +completely O +! O +) O +this O +code O +select B-Code_Block +from I-Code_Block +table I-Code_Block +PrivateMessages I-Code_Block +where I-Code_Block +Sender==QueryString('idCompany') I-Code_Block +this O +code O +work O +fine O +. O +i O +want O +select B-Code_Block +from I-Code_Block +privateMessage I-Code_Block +where I-Code_Block +Sender I-Code_Block +== I-Code_Block +" I-Code_Block +admin I-Code_Block +" I-Code_Block +??????? I-Code_Block +? I-Code_Block +where I-Code_Block +sender I-Code_Block +equal I-Code_Block +a I-Code_Block +const B-Data_Type +string B-Data_Type +. O +You O +can O +use O +Selecting O +event O +and O +do O +like O +. O +Or O +you O +can O +replace O +the O +WhereParameters B-Class + +section O +with O +something O +like O +Depends O +on O +you O +in O +choosing O +what O +flavor O +of O +this O +2 O +solutions O +best O +suits O +this O +scenario O +. O +I O +have O +a O +quite O +odd O +problem O +. O +The O +problem O +is O +like O +this O +.. O +. O +When O +I O +try O +to O +pass O +a O +string B-Data_Type +to O +my O +controller O +action O +( O +.NET B-Library +MVC I-Library +) O +, O +this O +one O +: O +I O +checked O +in O +the O +console B-Application +and O +I O +'m O +getting O +an O +server B-Application +internal O +error O +500 B-Error_Name +.. O +. O +To O +make O +things O +worse O +I O +'ve O +tested O +whether O +the O +post O +will O +work O +with O +different O +kinds O +of O +titles O +like O +: O +" O +super O +duper O +amoled O +TV B-Device +" O +or O +something O +like O +, O +and O +it O +works. O +. O +I O +suspect O +that O +the O +issue O +is O +because O +the O +string B-Data_Type + +contains O +special O +characthers O +like O +' B-Value +and O +" B-Value +.. I-Value +. O +This O +is O +the O +post B-Function +method O +itself O +: O +First O +post O +data O +and O +now O +the O +post O +itself O +: O +And O +now O +the O +Controller B-Class +action O +itself O +: O +With O +the O +title O +itself O +that O +I O +'ve O +shown O +above O +, O +action O +does O +n't O +gets O +triggered O +at O +all. O +. O +Instead O +I O +simply O +get O +internal O +server B-Error_Name +error O +500 B-Error_Name +in O +console B-Application +.. O +. O +How O +could O +I O +fix O +this O +? O +You O +could O +serialize O +the O +postData B-Variable +and O +expect O +a O +request O +object O +at O +the O +action O +which O +can O +further O +be O +de-serialized O +to O +obtain O +individual O +properties O +. O +Model O +: O +Controller B-Class +Action O +: O +Update O +: O +Json B-Class +object O +: O +I O +have O +to O +create O + +a O +struct B-Data_Type +, O +a O +static B-Data_Type +variable O +to O +keep O +track O +of O +how O +many O +structs B-Data_Type +are O +alive O +and O +also O +a O +list B-Data_Structure +of O +all O +current O +structs B-Data_Type +. O +I O +'m O +having O +trouble O +creating O +this O +list B-Data_Structure +and O +the O +appropriate O +constructor O +. O +So O +far O +I O +have O +As O +you O +can O +see O +I O +tried O +to O +do O +it O +by O +creating O +a O +static B-Data_Type +array B-Data_Structure +that O +gets O +added O +to O +as O +part O +of O +the O +constructor O +, O +but O +the O +compiler B-Application +gives O +me O +an O +error O +: O +" O +lvalue O +required O +as O +left O +operand O +of O +assignment O +" O +in O +the O +place O +I O +indicated O +. O +It O +'s O +not O +letting O +me O +assign O +new O +structs B-Class +to O +my O +static B-Data_Type +array B-Data_Structure +. O +What O +am O +I O +doing O +wrong O +? O +Keep O + +in O +mind O +pointers B-Data_Type +are O +the O +bane O +of O +my O +life O +so O +please O +explain O +it O +to O +me O +as O +you O +would O +to O +a O +small O +child O +. O +Thanks O +a O +lot O +. O +When O +you O +define O +MyStruct B-Code_Block +MyStruct::* B-Code_Block +AllStructs I-Code_Block +; I-Code_Block +, O +all O +you O +are O +doing O +is O +allocating O +memory O +for O +one O +single O +pointer B-Data_Type +to O +a O +MyStruct B-Class +object O +, O +not O +actually O +creating O +space O +for O +an O +array B-Data_Structure +of O +them O +. O +This O +array B-Data_Structure +you O +want O +needs O +to O +have O +a O +valid O +memory O +location O +initialised O +for O +it O +to O +live O +in O +, O +where O +it O +can O +store O +its O +copy O +of O +all O +the O +pointers B-Data_Type +you O +want O +it O +to O +. O +That O +'s O +likely O +to O +get O +messy O +though O +, O +so O +you O +should O +use O +a O +static B-Data_Type +std::vector B-Class +instead O +to O + +manage O +the O +memory O +allocation O +for O +the O +MyStruct B-Class +. O +Simple O +as O +this O +: O +Hope O +that O +helps O +! O +I O +have O +MySQL B-Application +tables B-Data_Structure +looking O +like O +that O +regions B-Variable +table B-Data_Structure +.. O +. O +and O +schools B-Variable +table B-Data_Structure +There O +are O +multiple O +select O +( O +dropdown B-User_Interface_Element +) O +menus B-User_Interface_Element +in O +my O +registration O +form O +. O +The O +regions B-User_Interface_Element +dropdown I-User_Interface_Element +looks O +like O +that O +I O +want O +to O +populate O +new O +dropdown B-User_Interface_Element +list I-User_Interface_Element +based O +on O +previous O +selections O +. O +What O +i O +want O +to O +do O +is O +, O +get O +" O +regions B-Variable +" O +id B-Variable +, O +then O +populate O +schools B-Variable +dropdown B-User_Interface_Element +menu I-User_Interface_Element +based O +on O +id B-Variable +( O +id B-Variable +of O +previous O +selection O +) O +from O +" O +schools B-Variable +" O +table B-Data_Structure +on O +the O +fly O +. O +Here O +is O +my O +code O +but O +it O + +does O +n't O +work O +. O +My O +js B-Language +looks O +like O +that O +and O +search.php B-File_Name +Please O +help O +me O +to O +finish O +it O +. O +Thx O +in O +advance O +. O +You O +'re O +calling O +getschools() B-Function +with O +no O +parameter O +, O +so O +it O +returns O +nothing O +. O +You O +were O +supposed O +to O +pass O +the O +result O +that O +you O +get O +after O +making O +a O +POST O +request O +to O +the O +search.php B-File_Name +file O +. O +EDIT O +: O +I O +'m O +not O +sure O +that O +this O +will O +work O +, O +as O +I O +'ve O +not O +tested O +it O +first O +. O +But O +I O +think O +you O +should O +change O +to O +I O +was O +working O +with O +twilio B-Application +my O +case O +is O +when O +user O +make O +a O +call O +IVR B-Application +will O +ask O +for O +user O +mood O +and O +then O +start O +recording O +for O +10 B-Value + +second O +, O +take O +that O +recording O +to O +server B-Application +find O +podcast O +according O +to O +user O +mood O +and O +send O +back O +TWIML B-Application +with O +podcast B-File_Type +mp3 B-File_Type +url O +and O +play O +it O +to O +user O +I O +'m O +done O +with O +this O +job O +now O +i O +want O +to O +implement O +the O +feature O +in O +which O +when O +user O +user O +say O +" O +Skip O +" O +or O +" O +I O +do O +n't O +like O +this O +one O +please O +skip O +" O +( O +or O +something O +similar O +which O +i O +will O +handle O +with O +A B-Device +i) I-Device +immediately O +stop O +playing O +and O +goto O +server B-Application +and O +get O +another O +podcast B-File_Type +mp3 B-File_Type +url O +and O +play O +it O +for O +doing O +this O +i O +need O +to O +do O +something O +like O +this O +: O +but O +doing O +this O +will O +not O +solve O +my O +problem O +because O +twilio B-Application +will O +start O +recording O +after O + +finish O +playing O +, O +I O +want O +to O +record O +each O +10 O +seconds O +and O +send O +it O +to O +server B-Application +continuously O +when O +user O +is O +listening O +podcast B-User_Interface_Element +each O +time O +when O +we O +get O +recording O +on O +server B-Application +, O +i O +will O +convert O +recording O +to O +text B-Application +ad I-Application +check I-Application +if O +user O +said O +" O +skip O +" O +, O +if O +yes O +i O +will O +modify O +call O +on O +the O +fly O +Twilio B-Application +developer O +evangelist O +here O +. O +I O +'m O +afraid O +that O +it O +is O +currently O +not O +possible* O +to O +record O +slices O +of O +a O +call O +while O +simultaneously O +playing O +an O +mp3 B-File_Type +. O +Can O +I O +suggest O +that O +rather O +than O +voice O +you O +use O +a O +key B-Device +press O +for O +this O +functionality O +instead O +? O +You O +can O +then O +use O +the O +following O + +TwiML B-Language +( O +as O +an O +example O +) O +Then O +you O +will O +need O +an O +endpoint O +in O +your O +application O +at O +/voice/check O +-digits I-Code_Block +that O +directs O +the O +user O +onto O +the O +next O +podcast O +. O +* O +OK O +, O +it O +might O +be O +possible O +if O +you O +play O +the O +audio O +into O +a O +conference O +and O +have O +another O +script O +dial O +into O +the O +conference O +and O +record O +10 O +seconds O +, O +then O +hangup O +as O +another O +script O +dials O +in O +to O +start O +recording O +. O +But O +even O +then O +, O +you O +'d O +be O +trying O +to O +extract O +the O +voice O +of O +the O +caller O +from O +the O +audio O +of O +the O +podcast O +and O +that O +is O +unlikely O +to O +be O +accurate O +at O +all O +. O +Especially O +if O +a O +voice O +in O +the O +podcast O +says O +" O +skip O + +" I-Value +. O +So O +I O +still O +recommend O +using O + B-HTML_XML_Tag +! O +I O +have O +script O +for O +asterisk B-Application +I O +want O +to O +execute O +this O +script O +from O +build.xml B-File_Name +file O +this O +version O +does O +not O +work O +Can O +anybody O +help O +me O +? O +The O +difference O +between O +you O +command B-Application +line I-Application +and O +the O +Ant B-Language +script O +is O +the O +working O +directory O +. O +One O +is O +the O +current O +one O +, O +the O +other O +is O +the O +asterisk B-Application +one O +. O +Probably O +you O +just O +want O +to O +do O +: O +In O +Erlang B-Language +is O +there O +a O +way O +reference O +the O +currently O +executing O +function O +) O +? O +That O +would O +be O +useful O +to O +spawn O +an O +infinite O +loop O +: O +In O +JavaScript B-Language +arguments.callee B-Function +does O +just O +that O +, O +see O +the O +specification O +on O +MDC B-Application +. O + +Edit O +to O +answer O +a O +' O +why O +would O +you O +do O +that O +' O +: O +mostly O +curiosity O +; O +it O +is O +also O +useful O +to O +define O +a O +timer O +when O +prorotyping O +: O +The O +Erlang B-Language +language O +does O +not O +expose O +any O +way O +for O +anonymous O +functions O +to O +refer O +to O +them O +self O +, O +but O +there O +is O +a O +rumour O +that O +Core B-Library +Erlang I-Library +( O +an O +intermediate O +but O +official O +representation O +in O +the O +compiler B-Application +phases O +) O +does O +have O +such O +a O +feature O +. O +I O +do O +n't O +know O +why O +I O +am O +forwarding O +this O +, O +but O +you O +know O +, O +if O +you O +happen O +to O +be O +generating O +Core B-Library +Erlang I-Library +in O +a O +DSL B-File_Type +or O +similar O +it O +is O +something O +that O +is O +within O +reach O +. O + +In O +Erlang/OTP B-Language +17.0-rc1 B-Version +, O +you O +can O +use O +a O +named O +fun B-Function +for O +that O +: O +In O +earlier O +versions O +, O +there O +is O +no O +way O +to O +do O +exactly O +that O +. O +You O +could O +pass O +the O +function O +itself O +as O +an O +argument O +: O +I O +am O +developing O +an O +iOS B-Operating_System +application O +( O +iPad B-Device +) O +, O +my O +problem O +is O +to O +choose O +how O +to O +store O +my O +data O +( O +I O +have O +an O +equivalent O +of O +1Mb O +of O +data O +) O +. O +What O +is O +the O +best O +one O +to O +choose O +and O +Why O +? O +( O +Property O +list B-Data_Structure +, O +XML B-Language +, O +SQlite B-Library +, O +. O +) O +. O +thanks O +for O +our O +answers O +. O +That O +'s O +not O +enough O +information O +to O +answer O +your O +question O + +properly O +. O +There O +are O +a O +lot O +of O +factors O +that O +affect O +the O +decision O +. O +Persistence O +libraries O +and O +frameworks O +all O +have O +very O +special O +constraints O +and O +learning O +curves O +. O +Here O +are O +some O +questions O +to O +be O +taken O +into O +account O +: O +What O +kind O +of O +data O +? O +How O +much O +data O +? O +How O +often O +does O +the O +data O +change O +and O +in O +which O +patterns O +? O +Where O +does O +the O +data O +come O +from O +( O +server O +, O +user O +input O +) O +Do O +you O +want O +to O +synchronize O +data O +( O +iCloud B-Library +, O +Dropbox B-Class +, O +other O +services O +) O +What O +are O +typical O +access O +patterns O +? O +( O +Database O +vs O +. O +whole O +file O +) O +Shall O +the O +data O +be O +portable O +? O +TextView B-Class + +has O +setText(String) B-Function +, O +but O +when O +looking O +on O +the O +Doc O +, O +I O +do O +n't O +see O +one O +for O +GridLayout B-Class +. O +Is O +there O +an O +adapter O +or O +something O +that O +I O +need O +to O +use O +instead O +? O +If O +so O +, O +which O +one O +? O +Thanks O +in O +advance O +for O +any O +of O +the O +help O +. O +GridLayout B-Class +is O +a O +ViewGroup B-Class +, O +to O +which O +you O +can O +only O +add O +views O +; O +if O +you O +want O +to O +make O +a O +calendar B-User_Interface_Element +, O +it O +would O +be O +better O +to O +use O +a O +GridView B-Class +. O +for O +the O +GridView B-Class +, O +create O +an O +adapter O +which O +extends O +BaseAdapter B-Class +, O +and O +use O +TextView B-Class +for O +the O +grid O +'s O +layout O +. O +here O +is O +an O +example O +. O +We O +can O +create O +many O +wrapper O +scripts O +to O +call O + +specific O +binary B-File_Type +files O +and O +use O +alias O +to O +point O +to O +different O +string B-Data_Type +. O +My O +requirement O +is O +we O +need O +to O +call O +the O +alias O +string B-Data_Type +in O +exec B-Function +system O +call O +. O +If O +we O +run O +that O +string B-Data_Type +directly O +in O +exec B-Function +call O +, O +the O +system O +call O +fails O +Ex O +: O +The O +above O +execl B-Code_Block +system O +call O +fails O +. O +I O +think O +it O +is O +unable O +to O +find O +alias O +string B-Data_Type +in O +the O +PATH O +and O +that O +is O +expected O +. O +How O +to O +get O +away O +from O +this O +problem O +? O +? O +The O +usage O +of O +ksh/bash B-Library +with O +command O +as O +options O +worked O +like O +a O +charm B-Application +. O +Thanks O +I O +need O +to O +get O +all O +fields O +of O +a O +row B-User_Interface_Element +who O +has O +min B-Variable +sqrt I-Function +value O +for O +one O +column B-User_Interface_Element +The O +min B-Function +function O +works O +perfectly O +But O +the O +name O + +and O +dist B-Variable +would O +always O +return O +from O +first O +row B-Data_Structure +. O +Eg O +. O +Min B-Variable +was O +from O +5th O +row B-Data_Structure +even O +then O +name B-Variable +and O +dist B-Variable +would O +be O +of O +first O +row B-Data_Structure +mysql B-Application +version O +I O +have O +a O +configuration O +that O +has O +a O +hardcoded O +resolution O +of O +1200x800 B-Value +, O +however. O +. O +in O +the O +onPrepare B-Function +I O +like O +to O +check O +the O +user-agent O +string B-Data_Type +to O +see O +if O +someone O +is O +trying O +to O +test O +iPhone B-Device +or O +iPad B-Device +. O +then O +I O +change O +the O +resolution O +accordingly O +. O +This O +works O +great O +with O +plain O +old O +protractor/nodeJS B-Application +, O +but O +when O +I O +try O +to O +use O +my O +grunt B-Application +task O +. O +it O +completely O +ignores O +the O +updated O +resolution O +of O +375x667 B-Value +and O +runs O +with O +the O +default O + +. O +What O +I O +think O +might O +be O +occurring O +was O +a O +version O +mismatch O +perhaps O +, O +but O +unsure O +how O +to O +fix/track O +this O +behavior O +down O +. O +Ideas O +? O +mytestconfig.conf.js O +I O +have O +the O +following O +recurrence O +: O +It O +can O +be O +solved O +directly O +with O +a O +theorem O +called O +" O +Subtraction O +and O +Conquer O +" O +, O +but O +in O +this O +case O +I O +'m O +interested O +in O +the O +back O +substitution O +method O +. O +I O +tried O +the O +solution O +below O +but O +I O +'m O +almost O +certain O +that O +I O +'ve O +committed O +some O +error O +because O +I O +ca O +n't O +see O +how O +to O +build O +the O +final O +equation O +.. O +. O +, O +below O +my O +attempt O +: O +1st O +iteration O + +2nd O +iteration O +3rd O +iteration O +Attempt O +to O +find O +the O +equation O +: O +I O +have O +following O +code O +. O +Why O +do O +all O +the O +three O +objects O +refer O +to O +the O +same O +array B-Data_Structure +while O +the O +string B-Data_Type +variable O +is O +independent O +? O +How O +can O +I O +fix O +it O +without O +explicitly O +adding O +: O +function B-Code_Block +B() I-Code_Block +{ I-Code_Block +this.arr I-Code_Block += I-Code_Block +[ I-Code_Block +] I-Code_Block +; I-Code_Block +} I-Code_Block +An O +explanation O +would O +be O +: O +Prototypes O +are O +live O +chains O +between O +objects O +. O +Because O +B B-Class +'s O +prototype O +is O +a O +single O +tone O +instance O +of O +A B-Class +, O +the O +array B-Data_Structure +prop O +is O +passed O +by O +reference O +. O +This O +means O +that O +for O +each O +B B-Class +instance O +we O +have O +access O +to O +the O +same O +A B-Class +instance O +on O +the O +prototype O +. O +This O +might O +sound O +confusing O +at O +first O + +but O +that O +'s O +the O +magic O +of O +prototypes O +in O +JavaScript B-Language +. O +This O +is O +the O +caveat O +of O +prototypal O +inheritance O +. O +Anything O +on O +the O +prototype O +will O +be O +passed O +down O +to O +each O +instance O +. O +To O +maintain O +different O +instances O +of O +the O +attribute O +we O +initialise O +our O +object O +'s O +attributes O +in O +the O +constructor O +. O +When O +working O +with O +objects O +in O +JS B-Language +( O +like O +arrays B-Data_Structure +) O +, O +they O +are O +passed O +by O +reference O +. O +To O +make O +use O +of O +JS B-Language +'s O +prototype O +system O +I O +would O +suggest O +something O +like O +so O +: O +This O +way O +we O +reuse O +the O +methods O +from O +the O +" O +parent O +" O +and O +have O +a O +localised O +array B-Data_Structure +in O +our O +" O +child B-Variable +" O +. O +At O +a O +first O +glance O +this O + +might O +look O +as O +a O +classic O +OOP O +inheritance O +case O +but O +it O +is O +a O +bit O +different O +. O +If O +you O +want O +to O +read O +more O +about O +prototypes O +in O +JS B-Application +I O +recommend O +this O +article O +Hope O +this O +helps O +. O +Hi O +all O +I O +have O +a O +problem O +with O +CSV B-File_Type +opening O +through O +PHP B-Language +code O +. O +My O +PHP B-Language +code O +is O +: O +The O +problem O +is O +n't O +in O +PHP B-Language +code O +, O +the O +problem O +is O +in O +.csv B-File_Type +file O +. O +PHP B-Language +code O +must O +work O +even O +if O +there O +is O +missing O +comma O +, O +when O +it O +show O +the O +information O +the O +normal O +way O +. O +The O +.csv B-File_Type +file O +: O +The O +problem O +is O +most O +likely O +to O +do O +with O +lines O +like O +: O +Where O +there O +is O +no O +city O +information O +. O +In O +this O +case O +, O + +you O +'ll O +never O +get O +" B-Value +9876542 I-Value +" I-Value +to O +show O +up O +in O +the O +phone O +column B-User_Interface_Element +unless O +you O +apply O +some O +logic O +to O +determine O +that O +this O +is O +n't O +the O +city O +, O +and O +to O +skip O +to O +the O +next O +column B-User_Interface_Element +. O +What O +you O +should O +do O +though O +, O +so O +that O +you O +have O +6 O +columns B-User_Interface_Element +in O +each O +row B-User_Interface_Element +, O +is O +that O +instead O +of O +resetting O +$max B-Variable +every O +time O +, O +you O +should O +just O +set O +it O +once O +after O +reading O +the O +header B-User_Interface_Element +. O +Then O +display O +that O +number O +of O +columns B-User_Interface_Element +from O +each O +row B-User_Interface_Element +you O +read O +. O +I O +'m O +trying O +to O +build O +a O +structure O +called O +PROCESS B-Variable +in O +C B-Language +, O +this O +struct B-Data_Structure +should O +contain O +the O +ID(id) B-Variable +and O +waiting O +time O +( O +wt B-Variable + +) O +of O +the O +process O +now O +i O +want O +to O +make O +more O +then O +one O +instance O +of O +this O +struct B-Data_Structure +like O +an O +array B-Data_Structure +. O +what O +i O +want O +to O +do O +is O +something O +like O +this O +but O +i O +want O +to O +do O +it O +using O +dynamic O +memory O +allocation O +: O +what O +is O +my O +mistake O +I O +would O +allocate O +like O +this-> O +Write-> O +Read-> O +Free B-Function +when O +done. O +. O +/A O +pt B-Variable +is O +a O +pointer B-Data_Type +to O +PROCESS B-Variable +, O +pt[0] B-Variable +is O +the O +first O +PROCESS B-Class +object O +pointed O +to O +by O +pt B-Variable +. O +The O +-> B-Code_Block +operator O +to O +access O +members O +of O +a O +struct B-Data_Structure +must O +be O +used O +with O +pointers B-Data_Type +only O +, O +otherwise O +use O +. B-Code_Block +would O +be O +correct.1 O +An O +since O +you O +say O +you O +are O +doing O +C B-Code_Block +, O +you O + +do O +n't O +need O +to O +cast O +malloc B-Function +or O +calloc O +. O +Also O +do O +n't O +forget O +to O +check O +the O +return O +value O +of O +calloc B-Function +and O +do O +n't O +forget O +to O +free O +the O +memory O +later O +with O +free(pt) B-Function +; I-Code_Block +. O +Fotenotes O +1Note O +that O +this O +would O +be O +equivalent O +to O +but O +if O +you O +want O +to O +set O +id B-Variable +of O +the O +second O +element O +, O +you O +would O +need O +to O +do O +but O +I O +think O +it O +'s O +more O +readable O +to O +do O +Suppose O +the O +array B-Data_Structure +is O +: O +I O +want O +to O +copy O +the O +diamond O +arrangement O +, O +i.e O +. O +the O +elements O +d B-Variable +, O +b B-Variable +, O +f B-Variable +, O +h B-Variable +, O +e B-Variable +into O +a O +new O +1D O +array B-Data_Structure +. O +The O +above O +array B-Data_Structure + +is O +just O +an O +example O +, O +the O +matrix B-Data_Structure +could O +be O +any O +size O +rectangular O +matrix B-Data_Structure +and O +the O +location O +of O +the O +diamond O +can O +be O +anywhere O +within O +the O +array B-Data_Structure +. O +Assuming O +that O +you O +are O +looking O +only O +for O +5-elements O +diamonds O +, O +in O +the O +order O +you O +specified O +, O +you O +could O +do O +: O +This O +works O +by O +building O +a O +mask B-Data_Structure +( O +logical O +index O +) O +with O +the O +desired O +diamond O +shape O +and O +a O +specified O +center O +. O +The O +mask B-Data_Structure +is O +obtained O +by O +computing O +the O +L1 B-Variable +( O +or O +taxicab O +) O +distance O +from O +each O +entry O +to O +the O +diamond O +center O +and O +comparing O +to O +the O +appropriate O +threshold O +: O +I O +tried O +.NET B-Application +Reactor I-Application +with O +a O +simple O +Managed O + +Extensibility O +Framework O +( O +MEF O +) O +application O +. O +The O +host O +could O +n't O +load O +adpators O +and O +addins O +. O +There O +is O +no O +forum O +support O +from O +.NET B-Library +Reactor I-Application +, O +so O +stackoverlow B-Website +seems O +the O +best O +place O +to O +ask O +this O +question O +. O +:) O +Given O +the O +specificity O +of O +your O +issue O +you O +should O +consider O +contacting O +Eziriz B-Application +directly O +, O +however O +as O +long O +as O +you O +do O +n't O +obfuscate O +the O +metadata O +of O +the O +types O +exported O +everything O +should O +work O +fine O +. O +Mind O +that O +as O +soon O +as O +you O +'ll O +obfuscate O +the O +metadata O +of O +a O +public O +type O +used O +elsewhere O +things O +will O +most O +likely O +break O +. O +As O +per O +my O +requirement O +main O +page O + +contains O +TextField B-Class +and O +radio B-User_Interface_Element +button I-User_Interface_Element +. O +Scenario O +1 O +: O +when O +the O +user O +enter O +" O +locationno O +" O +in O +TextField B-Class +and O +submit O +servlet B-Class +will O +call O +DB O +and O +fetch O +records O +for O +entered O +locationno O +from O +Database O +and O +forward O +to O +locationDetails O +page.its O +working O +fine O +Scenario O +2 O +: O +when O +the O +user O +enter O +enters O +locationno O +in O +TextField B-Class +simultaneously O +click O +radio B-User_Interface_Element +button I-User_Interface_Element +servlet B-Application +will O +call O +DB O +and O +fetch O +all O +details O +for O +the O +particular O +locationno O +and O +forward O +to O +locationAllDetails B-Variable +page.Here O +it O +is O +fetching O +records O +proper O +but O +it O +always O +forward O +to O +locationDetails O +page O +instead O +of O +locationAllDetails B-Variable +page O +. O +When O +I O +click O +submit O + +button I-User_Interface_Element +after O +enter O +TextField B-User_Interface_Element +and O +radio B-User_Interface_Element +button I-User_Interface_Element +in O +the O +log B-File_Type +it O +shows O +Outputtype O +( O +radio B-User_Interface_Element +button I-User_Interface_Element +name O +) O +as O +" B-Value +ALL I-Value +" I-Value +but O +still O +it O +always O +forward O +to O +locationDetails O +page O +instead O +of O +locationAllDetails O +page O +what O +'s O +wrong O +in O +the O +below O +code O +my O +doubt O +is O +due O +to O +this O +line O +Please O +find O +the O +code O +below O +and O +help O +on O +this O +. O +After O +every O +forward O +do O +a O +return O +. O +Say O +I O +'m O +accessing O +www.mywebsite.com O +. O +This O +website O +fetches O +the O +following O +asset O +: O +http://www.mywebsite.com/styles/app.css O +I O +want O +to O +access O +the O +website O +exactly O +as O +I O +normally O +would O +, O +with O + +one O +exception B-Class +: O +Whenever O +my O +browser B-Application +makes O +a O +request O +to O +/styles/app.css B-File_Name +, O +instead O +of O +fetching O +it O +from O +http://www.mywebsite.com O +, O +I O +want O +to O +fetch O +it O +from O +http://localhost:3000/mywebsite/ O +. O +So O +instead O +it O +should O +be O +fetching O +: O +http://localhost:3000/mywebsite/styles/app.css O +Is O +this O +possible O +with O +nginx B-Application +? O +I O +tried O +to O +do O +it O +using O +the O +following O +server B-Application +config O +: O +But O +even O +after O +restarting O +nginx B-Application +( O +sudo B-Code_Block +nginx I-Code_Block +-s I-Code_Block +quit I-Code_Block +, O +sudo B-Code_Block +nginx I-Code_Block +) O +, O +nothing O +seems O +to O +have O +changed O +. O + +When O +I O +browse O +to O +www.mywebsite.com/styles/app.css O +, O +I O +still O +get O +the O +same O +old O +app.css B-File_Name +being O +retrieved O +from O +the O +server B-Application +, O +rather O +than O +my O +local O +one O +. O +I O +have O +a O +big O +dataframe B-Data_Structure +in O +R B-Language +, O +and O +I O +want O +to O +make O +some O +new O +columns B-Data_Structure +based O +on O +existing O +columns B-Data_Structure +. O +However O +, O +for O +each O +row B-Data_Structure +, O +the O +new O +value O +depends O +also O +on O +some O +other O +rows B-Data_Structure +. O +Here O +is O +some O +dummy O +data O +What O +I O +want O +to O +do O +, O +is O +for O +every O +row B-Data_Structure +( O +uniquely O +identified O +by O +docnr B-Variable +) O +to O +take O +the O +date B-Variable +and O +the O +client B-Variable +id I-Variable +, O +and O +find O +all O +of O +the O +other O +rows B-Data_Structure +that O +have O +the O +same O + +clientid B-Variable +, O +and O +an O +earlier O +date B-Variable +. O +Then O +, O +I O +want O +to O +calculate O +some O +things O +from O +this O +subset O +. O +For O +example O +, O +I O +want O +the O +total O +number O +of O +rows B-Data_Structure +in O +this O +subset O +, O +and O +the O +total O +of O +all O +values O +of O +this O +subset O +. O +So O +for O +this O +example O +data O +, O +I O +would O +expect O +: O +At O +the O +moment O +, O +I O +use O +a O +for B-Code_Block +loop O +: O +This O +loop O +is O +obviously O +very O +slow O +for O +a O +dataframe B-Data_Structure +of O +700k O +rows B-Data_Structure +( O +have O +not O +run O +it O +to O +completion O +yet O +) O +. O +A O +parallel O +implementation O +with O +doSNOW B-Function +does O +not O +seem O +to O +scale O +much O +better O +. O +I O +'ve O +tried O +using O +a O +sql B-Language +query O +with O + +sqldf B-Library +, O +but O +subqueries O +can O +only O +return O +1 O +value O +at O +a O +time O +, O +which O +would O +mean O +running O +the O +query O +all O +over O +for O +every O +new O +column B-Data_Structure +I O +want O +to O +define O +( O +and O +I O +want O +to O +add O +many O +more O +derivative O +columns B-Data_Structure +later O +) O +. O +I O +came O +across O +a O +solution O +with O +SQL B-Language +objects O +( O +Is O +it O +possible O +to O +get O +multiple O +values O +from O +a O +subquery O +? O +) O +, O +but O +objects O +did O +n't O +work O +in O +R B-Language +'s O +sqldf B-Library +. O +Using O +joins B-Code_Block +does O +n't O +work O +because O +the O +second O +query O +needs O +to O +have O +information O +from O +the O +first O +query O +. O +I O +just O +started O +in O +R B-Language +( O +and O +am O +also O +not O +very O +familiar O +with O +sql B-Language +) O +, O + +so O +I O +would O +be O +much O +obliged O +if O +someone O +knew O +a O +more O +efficient O +way O +to O +do O +this O +. O +Here O +are O +two O +lines O +of O +base B-Library +R B-Language +code O +using O +ave B-Function +for O +grouping O +. O +This O +returns O +I O +suspect O +that O +the O +above O +code O +wil O +perform O +quickly O +enough O +for O +the O +data O +that O +you O +described O +. O +However O +, O +data.table B-Function +is O +a O +recommended O +package O +for O +working O +with O +datases O +that O +may O +have O +billions O +of O +rows B-Data_Structure +. O +An O +analog O +to O +the O +above O +code O +in O +data.table B-Function +would O +be O +where O +seq_len(.N) B-Variable +fills O +the O +role O +of O +seq_along B-Variable +and O +shift O +fills O +the O +role O +of O +c B-Code_Block +( I-Code_Block +0 I-Code_Block +, I-Code_Block +head B-Code_Block +( I-Code_Block + +cumsum(x) B-Code_Block +, I-Code_Block +-1 I-Code_Block +) I-Code_Block +) O +in O +the O +previous O +code O +. O +This O +returns O +a O +data.table B-Variable +with O +the O +same O +values O +as O +above O +. O +data B-Variable +This O +works O +easily O +with O +dplyr B-Library +df1 I-Library +now O +contains O +the O +data O +you O +want O +Recently O +I O +'m O +trying O +to O +create O +a O +ZSL B-Application +session O +on O +my O +camera B-Application +app O +using O +the O +camera2 B-Library +API I-Library +from O +android B-Operating_System +. O +I O +'m O +using O +a O +device O +with O +a O +LEVEL-3 O +hardware O +level O +which O +supports O +YUV_REPROCESSING B-Function +. O +In O +this O +case O +I O +'m O +using O +the O +next O +template O +: O +All O +the O +tables B-Data_Structure +and O +information O +can O +be O +found O +in O +the O +ReprocessableCaptureSession B-Class + +documentation O +With O +the O +table O +above O +, O +I O +created O +a O +ReprocessableCatureSession O +with O +the O +next O +values O +: O +Input O +configuration O +in O +YUV B-Library +format O +with O +4608 B-Value +x O +3456 B-Value +Size O +( O +The O +one O +returned O +by O +my O +CameraCharacteristics B-Application +when O +calling O +getInputSizes(ImageFormat.YUV_420_888) B-Function +YUV_420_888 B-Variable +ImageReader B-Class +Surface I-Class +with O +4608 B-Value +x O +3456 B-Value +size O +. O +JPEG B-Class +ImageReader I-Class +Surface I-Class +with O +the O +size O +that O +I O +want O +( O +With O +a O +maximum O +size O +of O +4608x3456 B-Value +) O +. O +A O +Preview B-Class +Surface O +in O +YUV B-Library +Format O +. O +RAW B-Class +ImageReader I-Class +Surface O +with O +the O +max O +size O +of O +the O + +application O +( O +RAW B-File_Type +always O +should O +be O +sensor O +device O +size O +) O +. O +With O +this O +values O +I O +can O +create O +a O +ReprocessableCaptureSession O +an O +everything O +works O +well O +. O +I O +attached O +my O +YUV_420_888 B-Value +Surface I-Class +to O +my O +preview B-Class +CaptureRequest B-Class +to O +capture O +all O +the O +images B-User_Interface_Element +from O +the O +preview B-Class +in O +a O +custom O +class O +which O +works O +as O +a O +RingQueue B-Class +of O +images B-User_Interface_Element +and O +CaptureRequest B-Class +where O +I O +store O +the O +last O +X O +images B-User_Interface_Element +from O +my O +preview B-Class +, O +ready O +to O +be O +taked O +and O +reprocessed O +in O +the O +way O +that O +I O +want(ZSL) O +. O +I O +can O +reprocess O +images B-User_Interface_Element +from O +YUV B-File_Type +to O +RAW B-File_Type +, O +to O +JPEG B-File_Type +, O +change O +values O +and O +everything O +, O +but O + +my O +problem O +appear O +when O +I O +want O +to O +use O +the O +YUV B-Class +images B-User_Interface_Element +that O +I O +captured O +which O +are O +always O +at O +MAX B-Variable +SIZE(4608x3456) I-Variable +to O +generate O +a O +JPEG B-File_Type +from O +them O +or O +process O +them O +with O +some O +native O +libraries O +which O +uses O +YUV B-Class +bytearrays O +to O +work O +. O +In O +this O +case O +my O +image B-User_Interface_Element +is O +always O +in O +the O +MAX B-Variable +Size I-Variable +, O +and O +I O +do O +n't O +want O +that O +. O +The O +documentation O +says O +that O +my O +" O +Same O +as O +input O +" O +Target O +( O +YUV B-Class +in O +this O +case O +) O +size O +can O +go O +from O +minimum O +to O +MAXIMUM B-Variable +, O +it O +does O +n't O +indicate O +that O +it O +just O +work O +in O +the O +max O +size O +given O +by O +the O +hardware O + +. O +It O +is O +possible O +to O +achieve O +these O +in O +some O +way O +? O +I O +mean O +, O +I O +have O +tried O +to O +look O +to O +more O +codes O +which O +use O +Camera B-Library +API I-Library +2 B-Version +, O +but O +the O +documentation O +about O +ReprocessableCaptureRequest B-Class +is O +a O +bit O +poor O +and O +the O +only O +code O +that O +I O +found O +on O +internet O +is O +the O +CTS B-Application +repository O +from O +Google B-Website +. O +My O +problem O +can O +be O +solved O +just O +finding O +a O +way O +to O +configure O +my O +Session B-Class +with O +a O +lower O +YUV B-Class +imageReader B-Class +session O +or O +looking O +to O +some O +way O +to O +resize O +a O +YUV B-Class +Byte[] I-Class +to O +a O +different O +width O +and O +height O +values O +. O +Thank O +you O +so O +much O +for O +your O +time O +! O +I O +have O +a O +hard-coded O +list B-Data_Structure +, O +each O + +list B-Data_Structure +item O +of O +which O +has O +an O +ID B-Variable +. O +I O +want O +to O +have O +jQuery B-Library +generate O +list B-Data_Structure +items O +in O +another O +list B-Data_Structure +, O +and O +set O +as O +their O +text O +content O +the O +ID B-Variable +attribute O +values O +of O +each O +of O +the O +hard-coded O +list B-Data_Structure +'s O +items O +: O +i.e O +. O +hard-coded O +list B-Data_Structure +: O +jQuery-generated B-Library +list B-Data_Structure +: O +I O +have O +jQ B-Library +getting O +the O +number O +of O +gallery B-User_Interface_Element +items O +.. O +. O +.. O +. O +here O +'s O +the O +trouble O +: O +how O +do O +I O +get O +jQuery B-Library +to O +get O +each O +of O +the O +list B-Data_Structure +items O +' O +IDs B-Variable +as O +it O +generates O +the O +nav B-HTML_XML_Tag +list I-User_Interface_Element +( O +below O +) O +? O +this O +is O +generating O +the O +nav B-HTML_XML_Tag +list I-User_Interface_Element +however O +the O +content O +in O +each O +is O +the O +same O +because O +of O +my O +blindspot O + +with O +regard B-Function +to O +var B-Variable +ListItemIndex B-Variable +The O +results O +of O +the O +above O +code O +generates O +the O +list O +but O +all O +the O +list O +items O +' O +content O +is O +the O +same O +, O +' O +Slide O +#1 O +of O +3 O +items O +' O +. O +Many O +thanks O +in O +advance O +! O +svs B-User_Name +Here O +is O +the O +jsFiddle B-Application +. O +The O +code O +: O +Your O +code O +had O +the O +basics O +right O +, O +you O +just O +need O +to O +move O +the O +appending O +to O +the O +each O +function O +that O +will O +execute O +for O +each O +list O +item O +. O +The O +item O +can O +then O +be O +accessed O +with O +$(this) B-Function +. O +i O +would O +not O +append O +it O +in O +the O +loop O +, O +but O +constructing O +a O +string B-Data_Type +and O +append O +it O +when O +its O +finished O +. O +its O +much O +faster O +then O +append O +it O + +for O +each O +li B-HTML_XML_Tag +in O +the O +gallery B-User_Interface_Element +. O +demo O +: O +http://jsfiddle.net/meo/yKgSf/​ O +or O +the O +fancy O +version O +( O +because O +constructing O +long O +strings B-Data_Type +with O +JS B-Language +can O +be O +slow O +) O +demo O +: O +http://jsfiddle.net/meo/yKgSf/2/ O +PS O +: O +Having O +only O +a O +number O +as O +ID B-Variable +is O +not O +W3C B-Language +valid O +in O +HTML4 B-Language +. O +Thats O +why O +i O +choose O +to O +use O +the O +index B-Variable +alternatively O +when O +there O +is O +no O +ID B-Variable +on O +the O +element O +I O +want O +to O +upload O +multiple O +images B-User_Interface_Element +on O +my O +gallery B-User_Interface_Element +till O +today O +I O +was O +using O +this O +code O +to O +upload O +single O +images B-User_Interface_Element +my O + +controller O +is O +My O +models O +is O +and O +my O +view O +is O +This O +is O +what O +I O +'m O +using O +for O +uploading O +single O +images B-User_Interface_Element +now O +I O +want O +to O +upload O +multiple O +and O +I O +had O +only O +one O +images B-User_Interface_Element +fields O +on O +database O +did O +I O +need O +to O +make O +more O +images B-User_Interface_Element +fields O +for O +upload O +multiple O +images B-User_Interface_Element +? O +If O +you O +want O +to O +upload O +multiple O +images B-User_Interface_Element +there O +are O +so O +many O +plugins O +for O +that O +This O +a O +very O +simple O +and O +very O +great O +plugin O +I O +have O +also O +used O +it O +in O +may O +projects O +. O +You O +got O +to O +send O + I-Code_Block +as O +an O +array B-Data_Structure +like O +so O +: O +Then O +for O +each O +posted O +image B-User_Interface_Element +do O +an O +upload O +. O +BTW O +a O +quick O +search O +on O +this O +site O +gave O +me O +this O +post O +, O +that O +has O +all O + +other O +info O +you O +need O +: O +Multiple O +files O +upload O +( O +Array B-Data_Structure +) O +with O +CodeIgniter B-Library +2.0 B-Version +good O +luck O +Inside O +my O +build.xml B-File_Name +, O +I O +have O +: O +When O +I O +invoke O +this O +target O +, O +I O +get O +an O +exception B-Class +: O +Kindly O +suggest O +how O +to O +add O +this O +Constants B-Class +class O +in O +my O +classpath O +? O +Somewhere O +in O +my O +build.xml B-File_Name +, O +I O +have O +: O +Project O +structure O +is O +: O +Here O +is O +my O +build.xml B-File_Name +As O +suggested O +by O +Christian B-User_Name +, O +the O +issue O +got O +resolved O +by O +adding O +: O +I O +would O +like O +to O +declare O +kind O +of O +global B-Data_Type +variables O +. O +What O +I O +want O +to O +do O +is O +initialize O +these O +variables O +, O +then O +use O +them O +in O +macros O +, O +and O +change O + +their O +values O +in O +other O +macros O +. O +I O +started O +to O +write O +it O +as O +public O +variables O +: O +The O +problem O +here O +is O +that O +I O +have O +to O +call O +Sub_Init_Globals() B-Function +in O +each O +of O +my O +SubProcedure B-Class +, O +and O +so O +if O +I O +want O +to O +change O +the O +initial O +values O +of O +my O +global B-Data_Type +variables O +inside O +other O +SubProcedures B-Class +, O +those O +changes O +wo O +n't O +be O +made O +. O +Do O +you O +know O +a O +way O +to O +create O +such O +variables O +? O +As O +far O +as O +I O +understood O +these O +are O +just O +starting O +values O +what O +leaves O +you O +with O +next O +options O +: O +1 O +. O +) O +You O +can O +declare O +these O +variables O +and O +assign O +values O +in O +Workbook_Open B-Class +sub I-Library +. O +More O +here O + +Is O +it O +possible O +to O +declare O +a O +public O +variable O +in O +vba B-Variable +and O +assign O +a O +default O +value O +? O +2 O +. O +) O +Create O +separate O +sheet B-Data_Structure +, O +that O +will O +be O +hidden O +, O +with O +support O +table B-Data_Structure +consisting O +of O +these O +values O +, O +in O +this O +case O +all O +changes O +to O +these O +values O +will O +be O +saved O +even O +after O +you O +close O +Workbook B-Class +. O +3 O +. O +) O +Declare O +constants O +and O +assign O +it O +'s O +value O +to O +a O +different O +variable O +inside O +Procedures B-Class +. O +Below O +is O +the O +schema O +where O +I O +need O +to O +put O +a O +constraint O +such O +that O +a O +second O +new O +entry O +could O +be O +put O +in O +for O +a O +room O +number O +, O +even O +before O +the O +existing O +depDt B-Variable +for O +the O +same O +room O +number O +. O +Could O + +any O +of O +you O +please O +help O +me O +with O +this O +? O +? O +I O +have O +tried O +giving O +a O +sub O +query O +under O +WHERE B-Code_Block +in O +CONSTRAINTS B-Code_Block +but O +its O +is O +not O +working O +in O +SQL B-Application +Fiddle I-Application +. O +This O +can O +be O +done O +using O +an O +exclusion O +constraint O +on O +the O +date B-Variable +range O +: O +Note O +that O +you O +need O +the O +btree_gist B-Class +extension O +to O +support O +the O += B-Code_Block +operator O +in O +a O +GiST O +index O +. O +Note O +: O +This O +does O +not O +solve O +the O +problem O +of O +race O +conditions O +. O +Create O +a O +function O +that O +checks O +whether O +a O +room O +is O +available O +based O +on O +your O +conditions O +and O +returns O +a O +scalar O +boolean B-Data_Type +value O +which O +can O +be O +used O +in O +CHECK B-Code_Block +constraint O +. O +Here O +you O + +can O +preview O +how O +it O +works O +( O +remember O +to O +uncomment O +the O +last O +insert O +statement O +) O +:SQL O +FIDDLE B-Code_Block +Create O +table B-Data_Structure +with O +new O +constraint O +Try O +inserting O +two O +rows B-Data_Structure +in O +separate O +statements O +First O +value O +is O +inserted O +, O +while O +when O +issuing O +the O +second O +insert O +statement O +you O +get O +a O +check O +constraint O +violation O +Note O +: O +This O +could O +be O +easily O +implemented O +using O +triggers O +as O +well O +. O +You O +just O +need O +to O +modify O +the O +function O +a O +little O +and O +issue O +a O +CREATE B-Code_Block +TRIGGER I-Code_Block +statement O +. O +This O +is O +another O +question O +on O +date O +string B-Data_Type +to O +datevalue O +conversion O +. O +Input O +format O +is O +" B-Value +March I-Value +17 I-Value +, I-Value +2013 I-Value +7:04:28 I-Value +PM I-Value + +GMT-07:00 I-Code_Block +" I-Value +. O +( O +Output O +of O +SAP B-Library +tool I-Application +) O +=DATEVALUE(B26) B-Code_Block +fails O +. O +Any O +chances O +? O +Thanks O +, O +Gert B-User_Name +If O +you O +are O +using O +US O +regional O +settings O +then O +your O +text O +is O +a O +valid O +date/time O +format O +once O +you O +remove O +" O +GMT B-Value +" O +and O +everything O +after O +so O +you O +can O +use O +a O +formula O +that O +will O +simply O +remove O +that O +part O +and O +" O +co-erce O +" O +to O +a O +date/time O +value O +, O +i.e O +. O +=LEFT(B26,FIND("GMT",B26)-1)+0 B-Code_Block +format O +result O +cell B-User_Interface_Element +in O +the O +required O +date/time O +format O +, O +e.g O +. O + +m/d/yy O +hh:mm I-Value +This O +should O +work O +: O +I O +am O +a O +bit O +confused O +about O +the O +c++11 B-Language +random B-Library +library O +. O +What O +I O +understand O +: O +we O +need O +two O +separate O +concepts O +: O +random O +engine O +( O +which O +can O +be O +pseudo O +( O +need O +seed O +) O +or O +real O +) O +distribution O +: O +it O +maps O +the O +numbers O +obtained O +from O +the O +engine O +to O +a O +specific O +interval O +, O +using O +a O +specific O +distribution O +. O +What O +I O +do O +n't O +understand O +is O +why O +not O +just O +use O +this O +: O +As O +far O +as O +I O +can O +tell O +this O +works O +well O +. O +Instead O +, O +this O +is O +what O +I O +found O +on O +most O +examples/sites/articles O +: O +I O +am O +not O +talking O +about O +special O +use O + +, O +e.g O +. O +cryptography O +, O +just O +your O +basic O +getting O +started O +articles O +. O +My O +suspicion O +is O +because O +std::mt19937 B-Function +( O +or O +std::default_random_engine B-Function +) O +accepts O +a O +seed O +, O +it O +can O +be O +easier O +to O +debug O +by O +providing O +the O +same O +seed O +during O +a O +debug O +session O +. O +Also O +, O +why O +not O +just O +: O +It O +might O +be O +fine O +if O +you O +only O +will O +do O +this O +once O +, O +but O +if O +you O +will O +do O +it O +many O +times O +, O +it O +'s O +better O +to O +keep O +track O +of O +your O +std::random_device B-Class +and O +not O +create O +/ O +destroy O +it O +unnecessarily O +. O +It O +may O +be O +helpful O +to O +look O +at O +the O +libc++ B-Language +source O +code O +for O + +implementation O +of O +std::random_device B-Function +, O +which O +is O +quite O +simple O +. O +It O +'s O +just O +a O +thin O +wrapper O +over O +std::fopen("/dev/urandom") B-Function +. O +So O +each O +time O +you O +create O +a O +std::random_device B-Class +you O +are O +getting O +another O +filesystem O +handle O +, O +and O +pay O +all O +associated O +costs O +. O +On O +windows B-Operating_System +, O +as O +I O +understand O +, O +std::random_device B-Class +represents O +some O +call O +to O +a O +microsoft B-Application +crypto I-Application +API I-Application +, O +so O +you O +are O +going O +to O +be O +initializing O +and O +destroying O +some O +crypto B-Application +library O +interface O +everytime O +you O +do O +this O +. O +It O +depends O +on O +your O +application O +, O +but O +for O +general O +purposes O +I O +would O +n't O +think O +of O +this O +overhead O + +as O +always O +negligible O +. O +Sometimes O +it O +is O +, O +and O +then O +this O +is O +great O +. O +I O +guess O +this O +ties O +back O +into O +your O +first O +question O +: O +At O +least O +the O +way O +I O +think O +about O +it O +is O +: O +std::mt19937 B-Class +is O +a O +very O +simple O +and O +reliable O +random O +generator O +. O +The O +implementation O +is O +mandated O +by O +the O +standard O +, O +and O +at O +least O +in O +boost B-Application +, O +it O +used O +the O +same O +code O +everywhere O +, O +derived O +from O +the O +original O +mt19937 B-Library +paper O +. O +This O +code O +is O +very O +stable O +and O +it O +'s O +cross-platform O +. O +You O +can O +be O +pretty O +confident O +that O +initializing O +it O +, O +querying O +from O +it O +, O +etc O +. O +is O +going O +to O +compile O +to O +similar O +code O + +on O +any O +platform O +that O +you O +compile O +it O +on O +, O +and O +that O +you O +will O +get O +similar O +performance O +. O +std::random_device B-Function +by O +contrast O +is O +pretty O +opaque O +. O +You O +do O +n't O +really O +know O +exactly O +what O +it O +is O +, O +what O +it O +'s O +going O +to O +do O +, O +or O +how O +efficient O +it O +will O +be O +. O +You O +do O +n't O +even O +know O +if O +it O +can O +actually O +be O +acquired O +- O +- O +it O +might O +throw O +an O +exception B-Class +when O +you O +attempt O +to O +create O +it O +. O +You O +know O +that O +it O +does O +n't O +require O +a O +seed B-Variable +. O +You O +'re O +not O +usually O +supposed O +to O +pull O +tons B-User_Interface_Element +and O +tons B-User_Interface_Element +of O +data O +from O +it O +, O +just O +use O +it O +to O +generate O +seeds B-Variable +. O +Sometimes O +, O +it O +acts O + +as O +a O +nice O +interface O +to O +cryptographic B-Application +APIs I-Library +, O +but O +it O +'s O +not O +actually O +required O +to O +do O +that O +and O +sadly O +sometimes O +it O +does O +n't O +. O +It O +might O +correspond O +to O +/dev/random B-Value +on O +unix B-Operating_System +, O +it O +might O +correspond O +to O +/dev/urandom/ B-Value +. O +It O +might O +correspond O +to O +some O +MSVC B-Application +crypto B-Application +API I-Application +( O +visual B-Application +studio I-Application +) O +, O +or O +it O +might O +just O +be O +a O +fixed O +constant O +( O +mingw O +) O +. O +If O +you O +cross-compile O +for O +some O +phone B-Device +, O +who O +knows O +what O +it O +will O +do O +. O +( O +And O +even O +when O +you O +do O +get O +/dev/random B-Value +, O +you O +still O +have O +the O +problem O +that O +performance O +may O +not O +be O + +consistent O +- O +- O +it O +may O +appear O +to O +work O +great O +, O +until O +the O +entropy B-Library +pool O +runs O +out O +, O +and O +then O +it O +runs O +slow O +as O +a O +dog O +. O +) O +The O +way O +I O +think O +about O +it O +is O +, O +std::random_device B-Class +is O +supposed O +to O +be O +like O +an O +improved O +version O +of O +seeding O +with O +time(NULL) B-Variable +- O +- O +that O +'s O +a O +low O +bar O +, O +because O +time(NULL) B-Variable +is O +a O +pretty O +crappy O +seed O +all O +things O +considered O +. O +I O +usually O +use O +it O +where O +I O +would O +have O +used O +time(NULL) B-Variable +to O +generate O +a O +seed O +, O +back O +in O +the O +day O +. O +I O +do O +n't O +really O +consider O +it O +all O +that O +useful O +outside O +of O +that O +. O +This O + +article O +is O +a O +good O +point O +to O +start O +. O +I O +'m O +going O +to O +synthesize O +just O +few O +points O +: O +It O +Has O +Unknown O +Cost O +. O +For O +my O +personal O +experience O +I O +'ve O +notified O +that O +std::random_device B-Function +is O +usually O +slower O +than O +a O +simple O +Pseudo-randomic O +algorithm O +. O +That O +could O +be O +no O +true O +in O +general O +, O +but O +usually O +it O +does O +. O +That O +because O +it O +may O +involve O +physical O +devices O +, O +or O +other O +hardware O +than O +the O +simple O +CPU B-Device +. O +It O +Might O +Actually O +Be O +Deterministic O +. O +I O +have O +an O +app O +that O +will O +take O +a O +list B-Data_Structure +of O +players O +and O +set O +them O +up O +so O +that O +you O +can O +go O +through O +and O +create O +a O +bracket O +dynamically O +. O + +The O +number O +of O +players O +will O +change O +and O +the O +names O +as O +well O +. O +Instead O +of O +showing O +a O +whole O +bracket O +, O +my O +point O +will O +be O +to O +go O +in O +columns B-User_Interface_Element +. O +I.e O +. O +instead O +of O +the O +left O +side O +of O +the O +arrow B-User_Interface_Element +, O +it O +show O +the O +right O +side O +: O +My O +questions O +is O +how O +do O +I O +best O +draw O +this O +? O +My O +initial O +thought O +is O +to O +do O +multiple O +layouts O +where O +I O +hard O +code O +textviews B-Class +with O +custom O +drawables B-Class +and O +lines B-User_Interface_Element +for O +each O +column B-User_Interface_Element +of O +16/8/4/2 B-Value +with O +just O +one O +border B-User_Interface_Element +, O +but O +then O +I O +have O +to O +constantly O +change O +the O +layout O +setup O +. O +My O +second O +one O +would O +be O +to O +dynamically O +draw O +it O +on O +a O +canvas B-User_Interface_Element + +based O +on O +this O +answer O +here O +, O +but O +it O +did O +n't O +give O +a O +lot O +of O +ideas O +of O +implementations O +. O +My O +Questions O +: O +If O +I O +choose O +method O +1 O +, O +will O +I O +be O +able O +to O +dynamically O +change O +the O +layout O +of O +my O +activity B-Class +? O +If O +I O +choose O +method O +2 O +, O +how O +could O +I O +go O +about O +this O +? O +I O +'m O +still O +pretty O +new O +to O +android B-Operating_System +. O +As O +for O +question O +1 O +, O +yes O +you O +can O +absolutely O +change O +the O +layout O +dynamically O +. O +You O +can O +create O +several O +layout O +files O +and O +do O +one O +of O +two O +things O +: O +The O +first O +, O +is O +you O +can O +use O +your O +activity B-Class +'s O +setContentView(int) B-Function +method O +to O +completely O +reset O +the O +activity B-Class +'s O +layout O +to O +a O +new O + +view O +. O +The O +second O +would O +be O +to O +identify O +the O +parent O +view O +of O +the O +bracket O +portion O +, O +cast O +it O +to O +a O +ViewGroup B-Class +and O +use O +addView(View) B-Function +and O +removeView(View) B-Function +. O +As O +for O +question O +2 O +, O +you O +could O +go O +about O +using O +a O +canvas B-Class +, O +but O +it O +would O +be O +quite O +difficult O +to O +use O +only O +a O +canvas B-Class +, O +but O +possibly O +a O +combination O +of O +a O +canvas B-Class +and O +a O +set O +of O +text B-Class +views O +could O +work O +. O +While O +this O +is O +n't O +directly O +answering O +your O +question O +, O +this O +tutorial O +is O +one O +I O +have O +used O +in O +the O +past O +, O +and O +gives O +you O +an O +excellent O +sense O +of O +how O +to O +work O +with O +the O +Canvas B-Class +class O + +in O +android B-Operating_System +. O +while O +adding O +a O +new O +classifier O +in O +weka B-Application +... O +by O +running O +java B-Language +call O +:java O +-classpath I-Code_Block +" I-Code_Block +weka.jar I-Code_Block +; I-Code_Block +weka-src.jar I-Code_Block +" I-Code_Block +weka.gui.GUIChooser B-Code_Block +what O +to O +set O +classpath O +... O +and O +is O +it O +the O +correct O +format O +to O +add O +a O +classifier O +a O +weka B-Application +... O +i O +am O +using O +windows B-Operating_System +10 B-Version +You O +are O +not O +adding O +classifiers O +, O +you O +are O +adding O +.jar B-File_Type +files O +. O +You O +have O +to O +use O +absolute O +paths O +( O +C:/.. B-Value +. I-Code_Block +) O +to O +the O +jar B-File_Type +files O +. O +java B-Code_Block +-classpath I-Code_Block +" I-Code_Block +c:/.../weka.jar I-Code_Block +" I-Code_Block +weka-src.jar B-Code_Block +is O +not O +neeeded O + +. O +It O +is O +optional O +to O +set O +the O +working O +directory O +of O +your O +script/batch B-File_Name +file O +to O +the O +directory O +where O +the O +weka.jar B-File_Name +file O +can O +be O +found O +. O +Is O +the O +contents O +of O +the O +.Net B-Class +MemoryStream I-Class +Object O +secure O +in O +Memory O +? O +We O +have O +large O +files O +that O +are O +downloaded O +from O +a O +secure O +site O +directly O +into O +MemoryStream B-Class +Objects O +that O +contain O +PCI O +information O +. O +The O +concern O +is O +that O +the O +data O +in O +the O +MemoryStream B-Class +object O +itself O +maybe O +exposed O +in O +the O +system O +memory O +to O +RAM O +scraping O +attacks O +. O +I O +have O +a O +string B-Data_Type +of O +numerical O +values O +separated O +with O +spaces B-Value +: O +I O +want O +to O +get O +all O +occurrences O +of O +the O +string B-Data_Type +, O +where O + +combined O +sum O +of O +numbers O +is O +x B-Variable +. O +So O +, O +if O +I O +search O +: O +2041 B-Value +it O +should O +return O +an O +array B-Data_Structure +( O +" B-Value +318 I-Value +500 I-Value +358 I-Value +865 I-Value +" I-Value +) O +or O +if O +I O +search O +: O +1818 B-Value +it O +should O +return O +an O +array B-Data_Structure +( O +" B-Value +920 I-Value +898 I-Value +" I-Value +, I-Value +" B-Value +31 I-Value +470 I-Value +725 I-Value +358 I-Value +114 I-Value +56 I-Value +9 I-Value +55 I-Value +" I-Value +) O +. O +I O +also O +need O +solution O +to O +be O +optimal O +, O +because O +string B-Data_Type +of O +numbers O +can O +sum O +up O +to O +hundreds O +of O +thousands O +. O +Principle O +explained O +in O +theory O +would O +be O +good O +, O +but O +preferred O +languages O +are O +PHP B-Language +or O +NodeJs B-Language +if O +solution O +is O +given O +by O +programming O +language O +. O +Even O +MySQL B-Application +solution O +would O +be O + +nice O +, O +if O +possible O +. O +But O +solution O +by O +any O +language O +would O +be O +nice O +anyway O +. O +Extra O +notes O +numbers O +are O +all O +positive O +integers B-Data_Type +number O +values O +are O +between O +1-10000 B-Value +Here O +you O +go O +, O +in O +Python B-Language +. O +This O +has O +linear O +complexity O +: O +I O +'m O +assuming O +there O +are O +no O +negative O +values O +in O +your O +list B-Data_Structure +, O +and O +the O +list B-Data_Structure +consists O +purely O +of O +integers B-Data_Type +separated O +by O +spaces B-Value +. O +You O +should O +n't O +have O +any O +problems O +translating O +it O +into O +any O +other O +language O +. O +I O +hope O +the O +algorithm O +is O +self-explanatory O +, O +if O +not O +ask O +. O +Usage O +: O +First O +we O +pass O +the O +string B-Data_Type +we O +want O +to O +search O +, O +then O +we O +use O +method O + +to_array() B-Function +so O +we O +can O +create O +the O +array B-Data_Structure +from O +the O +string B-Data_Type +, O +then O +you O +need O +to O +choose O +which O +mode O +you O +want O +to O +use O +. O +It O +has O +2 O +modes O +, O +soft O +search O +and O +hard O +search O +. O +you O +can O +choose O +which O +one O +to O +use O +in O +the O +find B-Function +method O +, O +->find(true) O +, O +True B-Value += O +hard O +mode O +, O +False B-Value += O +soft O +mode O +; O +The O +soft O +mode O +it O +is O +really O +simple O +, O +creates O +a O +new O +multidimensional O +array B-Data_Structure +with O +keys O +as O +the O +strlen B-Variable +of O +the O +numbers O +( O +method O +order()) B-Function +, O +so O +if O +we O +are O +searching O +for O +a O +number O +70 B-Value +we O +do O +n't O +really O +wanna O +use O +the O +3 O +digits O +or O +more O +, O +i O +mean O + +( O +100 B-Value +, O +99999 B-Value +etc O +.. O +. O +) O +. O +Then O +it O +just O +minus O +the O +search O +value O +with O +the O +number O +and O +tries O +to O +search O +in O +the O +entire O +array B-Data_Structure +with O +( O +in_array B-Function +) O +if O +it O +has O +the O +result O +; O +The O +hard O +mode O +is O +just O +as O +the O +name O +states O +, O +we O +will O +loop O +through O +every O +number O +. O +Of O +course O +we O +could O +really O +make O +a O +few O +more O +tweaks O +but O +from O +what O +i O +tested O +it O +gives O +good O +results O +. O +Feel O +free O +to O +ask O +if O +you O +have O +any O +questions O +. O +Example O +with O +outputs O +: O +http://codepad.viper-7.com/INvSNo O +Output O +example O +for O +285 O +: O +Detailed O +information O +seems O +to O +be O +hard O + +to O +find O +on O +this O +. O +So O +the O +situation O +I O +have O +is O +an O +existing O +server B-Application +with O +usernames O +and O +passwords O +. O +I O +'m O +adding O +an O +additional O +couchdb B-Application +server I-Application +to O +manage O +data O +for O +a O +mobile O +app O +, O +however O +I O +still O +want O +all O +authentication O +to O +be O +handled O +via O +the O +existing O +server B-Application +. O +So O +I O +can O +send O +an O +HTTP O +request O +with O +username O +and O +password B-Variable +to O +the O +existing O +server B-Application +and O +i O +can O +get O +it O +to O +send O +back O +anyanything O +i O +like O +if O +access O +is O +accepted O +. O +How O +could O +I O +then O +use O +that O +information O +to O +authenticate O +with O +the O +couchdb B-Application +server I-Application +? O +I O +imagine O +it O +would O +be O +possible O +to O +recieve O +a O +secret B-Variable +from O +the O +existing O +server B-Application +on O + +successful O +authentication O +that O +we O +could O +match O +to O +one O +we O +have O +manually O +stored O +on O +couchdb B-Application +server I-Application +. O +However O +that O +does O +n't O +seem O +to O +be O +very O +secure O +. O +I O +have O +read O +the O +Authentication O +docs O +at O +couchdb B-Application +but O +I O +'m O +still O +confused O +. O +Any O +suggestions O +for O +an O +authentication O +system O +? O +I O +think O +JWT O +authentication O +is O +what O +you O +'re O +looking O +for O +. O +There O +'s O +a O +plugin O +which O +can O +do O +this O +for O +you O +: O +https://github.com/dmunch/couch_jwt_auth O +( O +The O +repository O +is O +a O +fork O +, O +implementing O +additional O +functionality O +to O +the O +original O +one O +plus O +is O +compatible O +with O + +CouchDB B-Application +2.0 B-Version +. O +) O +Basically O +you O +send O +your O +username/password O +to O +the O +authentication O +server B-Application +, O +which O +in O +turn O +gives O +you O +back O +a O +token O +( O +the O +JWT B-File_Type +) O +. O +You O +can O +now O +authenticate O +to O +CouchDB B-Application +using O +this O +token O +. O +CouchDB B-Application +verifies O +the O +integrity O +of O +the O +token O +either O +by O +using O +a O +shared O +secret I-Variable +( O +HS256 B-Variable +) O +or O +by O +using O +the O +public O +key I-Variable +of O +the O +authentication O +server B-Application +. O +I O +have O +a O +problem O +that O +I O +frequently O +deal O +with O +using O +MVC B-Application +that O +I O +ca O +n't O +seem O +to O +find O +an O +easy O +solution O +for O +. O +Very O +frequently O +I O +find O +myself O +creating O +a O +viewmodel O +for O +an O +object O +that O + +has O +a O +collection O +of O +smaller O +objects O +. O +For O +instance O +, O +I O +created O +a O +Staff B-Class +screen B-User_Interface_Element +where O +the O +user O +adds O +a O +staff O +member O +to O +the O +database O +. O +Most O +of O +this O +is O +fairly O +straight O +forward O +, O +but O +then O +I O +need O +to O +be O +able O +to O +add O +a O +credential B-Class +. O +The O +number O +of O +credentials O +a O +staff O +can O +have O +is O +dynamic O +, O +so O +there O +'s O +a O +second O +table B-Data_Structure +with O +a O +foreign O +key O +referencing O +the O +staff O +, O +as O +well O +as O +the O +appropriate O +credential O +data O +. O +So O +my O +viewmodel O +has O +a O +Staff B-Class +object O +, O +and O +an O +IEnumerable B-Class +of O +Credential B-Class +objects O +. O +Currently O +when O +the O +user O +adds/edits O +staff O +in O +the O +partialview O +form O + +, O +a O +popup B-User_Interface_Element +with O +the O +credential O +fields O +appears O +. O +When O +you O +save O +the O +credential O +, O +I O +manually O +generate O +the O +hidden O +fields O +of O +every O +single O +property O +as O +hidden O +html B-Language +elements O +using O +javascript B-Language +strings B-Data_Type +, O +then O +append O +it O +to O +the O +appropriate O +places O +. O +It O +gets O +really O +unmanageable O +. O +etc O +... O +to O +hid7 O +. O +I O +also O +generate O +a O +series O +of O +tags O +to O +display O +the O +data O +on O +the O +page O +. O +An O +absolute O +mess O +. O +It O +currently O +works O +, O +but O +there O +has O +to O +be O +a O +better O +way O +, O +and O +I O +'m O +about O +to O +deal O +with O +a O +very O +similar O +problem O +. O +I O +feel O +like O +I O +'m O +reinventing O +the O +wheel O +. O +My O +first O +instinct O +was O + +to O +add O +a O +nested O +form O +, O +but O +my O +research O +tells O +me O +MVC B-Application +forbids O +this O +, O +so O +that O +'s O +out O +of O +the O +question O +. O +To O +sum O +up O +what O +I O +'m O +looking O +for O +: O +How O +can O +I O +dynamically O +load/save O +objects O +in O +the O +partial O +view O +, O +without O +losing O +the O +data O +on O +HTTPPOST B-Application +? O +I O +want O +equivalent O +to O +GROUP_CONCAT B-Function +functionality O +of O +MySql B-Application +in O +DB2 B-Application +. O +I O +have O +tried O +XML B-Language +Aggrigate O +functon O +of O +DB2 B-Application +for O +cocating O +murows B-Variable +. O +Which O +gives O +me O +result O +But O +I O +want O +distinct/Unique O +Value O +of O +BASIC_SKILL2 B-Variable +, O + +BASIC_SKILL1 B-Code_Block +. O +The O +select B-Code_Block +distinct I-Code_Block +wo O +n't O +work O +in O +case O +of O +tables B-Data_Structure +with O +no O +duplicates O +, O +because O +of O +multiple O +joins O +giving O +all O +the O +combinations O +of O +the O +values O +of O +every O +join O +. O +That O +leads O +to O +duplicates O +in O +the O +aggregate O +function O +. O +I O +'ve O +found O +that O +pushing O +the O +group B-Code_Block +bys I-Code_Block +and O +the O +aggregate O +functions O +to O +subqueries O +in O +the O +from O +part O +gives O +the O +best O +results O +. O +Came O +across O +your O +question O +after O +asking O +the O +same O +one O +myself O +. O +The O +solution O +I O +came O +up O +with O +is O +to O +use O +a O +common O +table B-Data_Structure +expression O +with O +DISTINCT B-Code_Block +. O +In O +your O +case O +, O +it O + +would O +be O +easier O +and O +clearer O +to O +use O +subselects B-Class +instead O +( O +XMLELEMENT B-Class +boilerplate O +elided O +for O +clarity O +) O +: O +There O +may O +well O +be O +an O +easier O +way O +, O +but O +this O +is O +what O +I O +came O +up O +with O +. O +Also O +, O +you O +might O +want O +to O +take O +advantage O +of O +functions O +like O +XMLQUERY B-Function +and O +XSLTRANSFORM B-Class +. O +Much O +simpler O +and O +less O +error-prone O +than O +the O +manual O +way O +you O +'re O +doing O +it O +. O +I O +'m O +trying O +to O +implement O +a O +tpl B-HTML_XML_Tag +within O +a O +displayfield O +to O +display O +a O +list O +of O +data O +sent O +to O +the O +server B-Application +from O +a O +textarea B-User_Interface_Element +. O +The O +same O +data O +is O +displayed O +in O +a O + +grid B-User_Interface_Element +with O +rowexpander B-Application +plugin O +( O +display O +values O +in O +XTemplate B-Library +like O +textarea B-User_Interface_Element +format O +) O +Fiddle B-Application +: O +https://fiddle.sencha.com/#fiddle/14sf O +I O +tried O +something O +like O +this O +: O +FIDDLE B-Application +: O +https://fiddle.sencha.com/#fiddle/14t7 O +without O +sucess O +.. O +. O +I O +tried O +every O +way O +I O +found O +to O +render O +a O +tpl B-File_Type +unsuccessfully O +. O +Display O +has O +a O +config O +tpl B-File_Type +but O +it O +seems O +not O +work O +in O +my O +case O +.. O +. O +I O +appreciate O +suggestions O +for O +resolving O +this O +issue O +The O +displayfield O +also O +has O +renderer O +function O +. O +You O +can O +use O +it O +as O + +in O +your O +grid B-User_Interface_Element +: O +https://fiddle.sencha.com/#fiddle/14il O +I O +am O +trying O +to O +insert O +excel B-Application +data O +into O +mongoDB B-Application +database O +. O +I O +have O +succeeded O +to O +insert O +data O +into O +it O +but O +I O +am O +unable O +to O +store O +the O +data O +row O +by O +row B-User_Interface_Element +, O +the O +total O +data O +inserted O +as O +one O +thing O +and O +unable O +differentiate O +the O +String B-Data_Type +and O +Numeric B-Data_Type +. O +please O +help O +me O +on O +this O +. O +I O +need O +to O +insert O +the O +data O +row O +by O +row B-User_Interface_Element +. O +I O +have O +attached O +my O +excel B-Application +, O +code O +and O +o/p O +. O +Output O +: O +mongoDB B-Application +output O +as O +image B-User_Interface_Element +Excel B-Application +: O +Excel B-Application +data O +as O +image B-User_Interface_Element +} B-Code_Block +I O +have O + +a O +Silverlight B-Application +4 B-Version +app O +using O +Prism B-Application +2.2 B-Version +and O +I O +have O +a O +few O +modules O +that O +I O +am O +loading O +on O +demand O +by O +defining O +them O +as O +ondemand O +in O +the O +module O +catalog O +( O +via O +a O +xaml B-File_Type +file O +) O +and O +then O +using O +the O +ModuleManager B-Class +to O +request O +the O +module O +be O +downloaded O +Is O +there O +a O +mechanism O +in O +Prism B-Application +to O +determine O +when O +the O +module O +download O +is O +completed O +and O +get O +to O +download O +progress O +events O +? O +There O +was O +a O +thread O +on O +the O +prism B-Application +codeplex I-Application +site O +but O +none O +of O +the O +suggestions O +seemed O +to O +pan O +out O +for O +the O +folks O +having O +the O +discussion O + +http://compositewpf.codeplex.com/Thread/View.aspx?ThreadId=47957 O +thanks O +Michael B-User_Name +It O +turns O +out O +that O +the O +solution O +provided O +in O +the O +prism O +discussion O +on O +codeplex B-Application +worked O +like O +a O +charm O +http://compositewpf.codeplex.com/Thread/View.aspx?ThreadId=47957 O +I O +created O +a O +custom O +FileDownloader B-Class +called O +FileDownloaderWithProgress B-Class +. O +I O +wanted O +to O +subclass O +the O +existing O +one O +in O +Prism B-Application +but O +the O +WebClient B-Class +that O +fires O +the O +DownloadProgressChanged B-Function +event O +was O +private O +. O +So O +I O +had O +to O +create O +my O +own O +by O + +implementing O +IFileDownloader B-Class +. O +In O +the O +DownloadProgressChanged B-Function +event O +handler O +in O +the O +FileDownloaderWithProgress B-Class +class O +- O +I O +publish O +a O +Prism B-Class +event O +that O +includes O +the O +% B-Code_Block +complete I-Code_Block +and O +the O +module O +name O +that O +was O +downloaded O +. O +Below O +is O +my O +code O +. O +Its O +an O +MVC B-Library +project O +on O +asp.net B-Library +. O +Ca O +n't O +find O +out O +what O +is O +the O +problem O +! O +Create O +, O +Update O +and O +Retrieve O +operations O +work O +successfully O +but O +do O +n't O +know O +why O +delete O +operation O +is O +not O +working O +. O +Code O +: O +Controller O +Code O +: O +Error B-Error_Name +Showing O +: O +DELETE B-Code_Block +http://localhost:1693/Product/Delete?id=16 O +404 I-Error_Name +( O +Not B-Error_Name +Found I-Error_Name +) O +Thanks O +in O + +advance O +. O +You O +should O +call O +the O +URL O +like O +/Product B-Function +without O +mentioning O +Delete B-Function +in O +the O +URL O +, O +ASP.Net B-Library +WebAPI I-Library +will O +take O +care O +about O +calling O +Delete B-Function +method O +, O +when O +you O +call O +.delete B-Function +on O +$http B-Variable +As O +the O +question O +suggests O +i O +cannot O +seem O +to O +configure O +foo-tables B-Variable +, O +even O +in O +the O +most O +basic O +way O +- O +3 O +columns B-User_Interface_Element +, O +last O +column B-User_Interface_Element +is O +the O +toggle O +which O +shows O +the O +detail O +row B-User_Interface_Element +. O +My O +markup O +code O +is O +thus O +: O +$('.footable').footable({}) B-Code_Block +; I-Code_Block +I O +have O +an O +example O +template O +from O +which O +i O +got O +his O +code O +which O +works O +perfectly O +- O +but O +in O +the O +actual O +app O +im O +building O +the O +third O +row B-User_Interface_Element + +which O +should O +be O +hidden O +until O +toggled O +is O +un-rendered O +and O +shows O +as O +a O +third O +column B-User_Interface_Element +. O +My O +setup O +is O +as O +follows O +: O +FooTable B-Library +- O +Version O +: O +2.0.3 B-Version +jQuery-1.11.1 B-Library +jQuery B-Library +UI I-Library +- O +v1.11.0 O +- O +2014-06-26 O +Chrome B-Application +: O +Version O +46.0.2490.80 B-Version +m O +Any O +pointers O +appreciated O +- O +thanks O +in O +advance O +. O +BTW O +i O +have O +the O +correct O +footables B-User_Interface_Element +css B-File_Type +file O +referenced O +in O +my O +app O +( O +not O +shown O +in O +code O +snippet O +above O +) O +Found O +the O +solution O +here O +: O +footable B-Class +in O +bootstrap B-Library +3 B-Version +not O +initializing O + +( O +so O +please O +stop O +the O +stampede O +to O +answer O +;¬) B-Value +) O +Thanks O +Synopsis O +I O +want O +to O +build O +a O +custom O +control O +which O +displays O +events O +in O +a O +calendar B-User_Interface_Element +. O +Here O +is O +the O +draft O +: O +The O +Concept O +The O +bottom O +left O +box B-User_Interface_Element +is O +vertically O +scrollable O +. O +The O +bottom O +right O +box B-User_Interface_Element +scrollable O +in O +both O +directions O +. O +It O +'s O +possible O +to O +move O +the O +event B-Class +views O +around O +. O +If O +they O +come O +near O +the O +bounds O +during O +dragging O +the O +view O +auto-scrolls O +in O +that O +direction O +. O +The O +scroll O +area O +is O +finite O +according O +to O +the O +earliest O +and O +latest O +event O +in O +a O +database O +or O +a O +certain O +maximum O +. O +But O +if O +the O +user O +continues O +scrolling O +the O +scroll O +area O + +grows O +accordingly O +and O +collapses O +if O +the O +user O +scrolls O +back O +and O +did O +not O +create O +a O +new O +event O +. O +This O +" O +July B-Value +2011 I-Value +" O +button B-User_Interface_Element +at O +the O +bottom O +acts O +as O +scroller O +. O +If O +the O +user O +pulls O +it O +beyond O +the O +bounds O +of O +the O +scroll O +area O +, O +it O +grows O +accordingly O +. O +The O +month O +name O +in O +the O +header B-User_Interface_Element +stays O +always O +at O +this O +position O +until O +the O +next O +month O +moves O +in O +, O +so O +it O +'s O +a O +long O +cell B-User_Interface_Element +which O +spans O +over O +the O +day O +cells B-User_Interface_Element +of O +the O +month O +with O +a O +floating O +caption B-User_Interface_Element +. O +The O +header B-User_Interface_Element +rows B-User_Interface_Element +and O +columns B-User_Interface_Element +are O +always O +visible O +. O +The O +Question O +Since O +I O +'m O +only O +slightly O +familiar O +with O +the O +capabilities O +of O + +Cappuccino B-Library +or O +Cocoa B-Library +'s O +control O +classes O +: O +Where O +can O +I O +make O +direct O +use O +of O +Cappuccino B-Library +or O +Cocoa B-Library +classes O +, O +where O +is O +it O +reasonable O +to O +subclass O +Cappuccino/Cocoa B-Library +controls O +and O +where O +do O +I O +have O +to O +write O +custom O +controls O +from O +scratch O +? O +Edit O +: O +My O +Thoughts O +I O +think O +its O +reasonable O +dividing O +the O +control O +with O +a O +SplitView B-Class +with O +a O +vertical O +divider O +. O +I O +could O +use O +a O +TableView B-Class +for O +the O +left O +header B-User_Interface_Element +column I-User_Interface_Element +in O +the O +left O +subview O +. O +And O +I O +could O +synchronize O +the O +vertical O +scrolling O +with O +what O +happens O +on O +the O +right O +side O +. O +But O +I O +'m O + +not O +so O +sure O +about O +the O +view O +on O +the O +right O +side O +. O +I O +thought O +about O +TableView B-Class +but O +I O +would O +actually O +only O +need O +the O +cells B-User_Interface_Element +as O +a O +background O +grid B-User_Interface_Element +. O +Thus O +, O +I O +guess O +, O +it O +would O +be O +difficult O +to O +have O +two O +header B-User_Interface_Element +rows B-User_Interface_Element +and O +to O +implement O +the O +desired O +scrolling O +behavior O +. O +So O +the O +best O +way O +is O +probably O +to O +create O +a O +completely O +new O +custom O +view O +. O +But O +then O +again O +the O +question O +: O +Where O +is O +it O +reasonable O +to O +subclass O +Cappuccino B-Library +resp O +. O +Cocoa B-Library +controls O +and O +where O +do O +I O +have O +to O +write O +custom O +controls O +from O +scratch O +? O +For O +the O +calendar B-User_Interface_Element +view O +it O +looks O +sufficiently O +different O +from O +a O +table B-User_Interface_Element +view O +that O +it O +might O + +be O +easier O +to O +just O +write O +it O +from O +scratch O +. O +Perhaps O +start O +with O +a O +bare O +CPView B-Class +and O +draw O +the O +background B-User_Interface_Element +in O +its O +drawRect B-Function +: I-Function +method O +, O +then O +create O +a O +CPControl B-Class +subclass O +for O +the O +events O +. O +In O +its O +drawRect B-Function +render O +its O +borders O +and O +background B-User_Interface_Element +, O +or O +use O +a O +CPBox B-Class +with O +setBackgroundColor B-Function +: I-Function +. O +The O +text O +is O +best O +drawn O +with O +label O +subviews O +. O +React O +to O +mouseDown B-Device +and O +so O +on O +to O +implement O +drag O +and O +drop O +, O +double O +click O +events O +and O +what O +else O +you O +might O +want O +. O +Then O +put O +the O +whole O +calendar O +view O +in O +a O +CPScrollView B-Class +. O +Synchronise O +its O +vertical O +scrolling O +with O +the O +scroll B-Class +view O +on O +the O + +left O +- O +use O +a O +CPTableView B-Class +there O +. O +Scrolling O +is O +fairly O +easy O +with O +a O +CPScrollView B-Class +: O +just O +call O +scrollToPoint B-Function +: I-Function +on O +the O +content B-Class +view O +. O +You O +will O +need O +to O +expand O +the O +content B-Class +view O +size O +dynamically O +to O +allow O +' O +infinite O +' O +scrolling O +. O +Maybe O +simply O +always O +make O +the O +content B-Class +view O +size O +the O +minimum O +of O +the O +size O +of O +its O +events O +and O +the O +current O +scroll O +position O ++ O +X B-Variable +( O +the O +X B-Variable +giving O +the O +user O +some O +distance O +to O +scroll O +before O +you O +have O +to O +resize O +again O +) O +. O +In O +a O +nutshell O +, O +subclass O +CPView B-Class +and O +CPControl B-Class +- O +CPView B-Class +when O +there O +is O +no O +interaction O +, O +and O +CPControl B-Class +when O +there O +is O +. O + +to O +display O +the O +name O +of O +all O +the O +candidates O +who O +got O +below O +40 B-Value +in O +exactly O +2 O +subjects O +using O +sql B-Language +degree(degcode,name,subject) O +candidate(seatno,degcode,name) B-Variable +marks(seatno,dedcode,mark) B-Variable +Your O +query O +can O +be O +like O +below O +- O +If O +it O +does O +not O +work O +for O +you O +then O +can O +create O +a O +sqlfiddle B-Application +with O +dummy O +data O +for O +more O +clairty B-Application +so O +that O +I O +can O +modify O +query O +as O +per O +your O +requirement O +. O +I O +am O +making O +an O +android B-Operating_System +application O +. O +I O +have O +a O +TextField B-Class +and O +a O +button B-User_Interface_Element +. O +Based O +on O +the O +value O +of O +the O +textfield B-User_Interface_Element +, O +as O +soon O +as O +the O +user O +clicks O +the O + +button B-User_Interface_Element +I O +want O +to O +make O +something O +. O +I O +have O +the O +code O +: O +This O +however O +does O +n't O +compile O +, O +saying O +" O +Cannot O +refer O +to O +a O +non-final O +variable O +value O +inside O +an O +inner O +class O +defined O +in O +a O +different O +method O +" O +. O +Is O +there O +any O +way O +to O +fix O +this O +? O +Thanks O +a O +lot O +Use O +final B-Code_Block +String I-Code_Block +value I-Code_Block += I-Code_Block +et.getText().toString() I-Code_Block +; I-Code_Block +and O +then O +use O +, O +If O +you O +want O +to O +compare O +the O +value O +of O +a O +string B-Data_Type +you O +should O +use O +the O +" O +equals B-Function +" O +method O +instead O +of O +" B-Code_Block += I-Code_Block +" I-Code_Block +. O +The O +code O +will O +look O +like O +this O +: O +I O +have O +my O +linq B-Language +code O +formatted O +like O +: O +In O +the O +following O +code O +how O +do O +I O + +add O +another O +Door B-Class +that O +is O +the O +same O +" O +level O +" O +as O +treasure O +? O +Everything O +I O +have O +tried O +keeps O +adding O +it O +as O +the O +same O +level O +as O +card O +. O +Here O +is O +what O +I O +have O +: O +You O +need O +to O +create O +the O +Deck B-Class +element O +first O +: O +Then O +add O +both O +the O +treasure O +( O +which O +i O +'ve O +taken O +the O +liberty O +of O +renaming O +from O +root O +to O +treasure O +) O +and O +the O +door O +to O +it O +: O +I O +am O +trying O +to O +make O +the O +width B-Variable +of O +xeditable O +textfield O +increase O +or O +decrease O +with O +the O +input O +text B-User_Interface_Element +. O +I O +tried O +the O +following O +code O +but O +no O +result O +. O +After O +a O +long O +research O +, O +I O +found O +the O +solution O +of O +my O +problem O + +. O +although O +it O +seemed O +that O +no O +one O +actually O +bothered O +my O +problem O +lol O +. O +The O +following O +code O +executes O +fine O +in O +Firefox B-Application +and O +Chrome B-Application +, O +but O +gives O +an O +error O +: O +when O +executed O +in O +Internet B-Application +Explorer I-Application +. O +( O +I O +would O +have O +thought O +the O +line O +after O +the O +one O +indicated O +would O +be O +more O +likely O +to O +return O +the O +error O +but O +the O +debugger O +says O +the O +run-time O +error O +is O +at O +the O +line O +indicated O +) O +Any O +ideas O +why O +? O +I O +'ve O +just O +found O +a O +solution O +for O +this O +. O +Make O +the O +encoding O +type O +us-ascii B-Value +( O +encoding='us-ascii' B-Code_Block +) O +in O +the O +xml B-File_Type +file O +. O +It O +solved O +my O + +problem O +. O +Try O +something O +like O +this O +( O +as O +usual O +, O +IE B-Application +does O +things O +diferently O +) O +( O +take O +from O +http://msdn.microsoft.com/en-us/library/ms534370(VS.85).aspx O +) O +how O +can O +interact O +with O +multiple O +console B-Application +windows I-User_Interface_Element +, O +from O +one O +node.js B-File_Name +script O +? O +so O +far O +i O +have O +researched O +a O +bit O +, O +and O +not O +have O +found O +anything O +that O +covers O +my O +case O +. O +What O +i O +want O +to O +accomplish O +is O +to O +have O +one O +main O +console B-Application +window I-User_Interface_Element +, O +which O +it O +reads O +my O +input O +, O +and O +it O +would O +redirect O +its O +output O +to O +another O +console B-Application +window I-User_Interface_Element +named O +as O +Logger B-Class +which O +shows O +the O +stdout O + +of O +the O +action O +that O +the O +user O +selected O +, O +but O +keeps O +the O +main O +" O +select O +action O +" O +console B-User_Interface_Element +window I-User_Interface_Element +clean O +. O +well O +i O +manage O +to O +find O +a O +way O +around O +it O +, O +since O +i O +wanted O +to O +stay O +with O +node.js B-File_Name +all O +the O +way O +. O +start.js B-File_Name +logger.js B-File_Name +startAdminInterface.js B-File_Name +bottom O +, O +line O +its O +a O +workaround O +not O +exactly O +what O +i O +was O +after O +, O +put O +i O +saw O +potential O +, O +on O +logger.js B-File_Name +it O +could O +listen O +from O +multiple O +sources O +, O +which O +is O +an O +enormous O +plus O +in O +the O +application O +that O +i O +'m O +building O +. O +I O +am O +running O +selenium B-Application +tests O +using O +TestNG B-Application +programatically O +. O +I O +want O +to O +run O +test O + +methods O +in O +sequence O +that O +i O +mention O +. O +Its O +like O +attribute O +preserve-order B-Code_Block += I-Code_Block +" I-Code_Block +true I-Code_Block +" I-Code_Block +if O +we O +use O +for O +TestNG.XML B-File_Name +. O +Similar O +functionality O +how O +can O +i O +achive O +it O +without O +using O +TestNG.XMl B-Class +. I-Function +setTestNames I-Function +is O +not O +working O +A.class B-Class +is O +having O +class O +level O +@Test B-Class +specified O +. O +So O +all O +methods O +in O +that O +class O +are O +testcases O +. O +So O +Testng B-Class +executing O +all O +methods O +in O +A B-Class +. O +I O +want O +to O +run O +in O +sequence O +as O +they O +appear O +in O +the O +class O +. O +In O +testNg O +you O +can O +use O +and O +them O +change O +this O +to O +all O +the O +methods O +to O +keep O +the O +order O +you O +want O +like O +Another O +solution O + +would O +be O +the O +use O +of O +I O +searched O +TestNG B-File_Type +docs O +and O +I O +cannot O +see O +an O +easy O +way O +to O +do O +what O +you O +want O +using O +annotatios B-Library +.. O +. O +Without O +a O +testng.xml B-File_Name +, O +the O +easiest O +way O +to O +do O +this O +is O +probably O +to O +implement O +your O +own O +IMethodInterceptor B-Class +. O +Are O +modal B-User_Interface_Element +windows/dialogs I-User_Interface_Element +considered O +a O +good O +practice O +for O +websites O +? O +One O +of O +the O +things O +that O +concerns O +me O +about O +using O +a O +modal B-User_Interface_Element +window I-User_Interface_Element +is O +that O +it O +is O +so O +much O +like O +a O +pop-up B-User_Interface_Element +window I-User_Interface_Element +and O +it O +could O +cause O +user O +frustration O +or O +cause O +users O +to O +simply O +close O +it O +because O +it O +'s O +intrusive O +. O +Do O +you O + +know O +of O +any O +studies O +that O +talk O +about O +user O +preferences O +and O +use O +rates O +? O +Are O +there O +any O +accessibility O +issues O +beyond O +having O +the O +a O +modal B-User_Interface_Element +window I-User_Interface_Element +link O +load O +the O +content O +in O +a O +new O +page O +when O +JavaScript B-Language +is O +turned O +off O +? O +Do O +you O +like O +sites O +or O +web O +apps O +that O +use O +modal B-User_Interface_Element +windows I-User_Interface_Element +? O +Why O +or O +why O +not O +? O +What O +are O +good O +and O +bad O +practices O +for O +implementing O +modal B-User_Interface_Element +windows I-User_Interface_Element +? O +I O +know O +modals B-User_Interface_Element +are O +probably O +most O +often O +used O +when O +displaying O +pictures B-User_Interface_Element +or O +galleries B-User_Interface_Element +, O +but O +what O +are O +some O +other O +practical O +use O +cases O +? O +Do O +you O +use O +them O +on O +your O +site O +and O +what O +lead O +you O +to O +your O +decision O +? O +From O +a O +practice O + +standpoint O +- O +excluding O +accessibility O +- O +modal B-User_Interface_Element +windows I-User_Interface_Element +provide O +an O +alternative O +that O +are O +less O +startling O +as O +, O +say O +, O +dialog B-User_Interface_Element +boxes I-User_Interface_Element +and O +feel O +less O +intrusive O +than O +pop-up B-User_Interface_Element +windows I-User_Interface_Element +. O +They O +usually O +have O +a O +more O +cohesive O +feel O +to O +the O +site O +than O +either O +of O +the O +two O +aforementioned O +method O +. O +Aside O +from O +pictures B-User_Interface_Element +or O +media B-User_Interface_Element +, O +I O +'ve O +used O +modal B-User_Interface_Element +dialogs I-User_Interface_Element +to O +serve O +the O +same O +purpose O +as O +dialog B-User_Interface_Element +boxes I-User_Interface_Element +- O +to O +get O +the O +user O +to O +give O +some O +form O +of O +required O +input O +, O +or O +to O +acknowledge O +something O +before O +letting O +them O +interact O +with O +the O +site O +again O +. O +From O +a O +purely O +accessible O +standpoint O +, O +they O +are O +n't O + +so O +great O +. O +They O +typically O +require O +JavaScript B-Language +, O +and O +, O +because O +of O +the O +way O +that O +modals B-Class +are O +managed O +with O +respect O +to O +the O +DOM B-Library +, O +screen B-User_Interface_Element +readers O +will O +not O +interpret O +them O +well O +. O +To O +combat O +this O +, O +it O +'s O +always O +a O +good O +idea O +to O +degrade O +gracefully O +- O +one O +suggestion O +is O +to O +take O +the O +content O +of O +the O +modal B-User_Interface_Element +dialog I-User_Interface_Element +and O +place O +it O +on O +a O +page B-User_Interface_Element +. O +Whenever O +the O +modal B-User_Interface_Element +dialog I-User_Interface_Element +should O +appear O +, O +have O +the O +current O +page O +redirect O +to O +the O +' O +modal B-User_Interface_Element +page I-User_Interface_Element +' O +, O +get O +the O +user O +'s O +input O +, O +and O +return O +to O +the O +page B-User_Interface_Element +it O +was O +on O +. O +Finally O +, O +as O +far O +as O +my O +personal O +opinions O +are O +concerned O + +, O +I O +do O +n't O +mind O +modal B-Class +windows B-Operating_System +. O +I O +think O +that O +, O +when O +used O +correctly O +, O +they O +provide O +a O +decent O +experience O +- O +if O +something O +has O +to O +get O +my O +attention O +, O +then O +I O +'d O +rather O +it O +do O +so O +without O +redirecting O +me O +from O +the O +page O +, O +showing O +an O +ugly O +operating O +system O +themed O +dialog B-User_Interface_Element +, O +or O +a O +pop-up B-User_Interface_Element +( O +which O +my O +browser B-Application +will O +likely O +block O +, O +anyway O +) O +. O +I O +guess O +, O +to O +sum O +it O +up O +, O +if O +I O +had O +to O +choose O +how O +I O +'d O +like O +to O +be O +interrupted O +, O +then O +I O +'d O +choose O +a O +modal B-User_Interface_Element +dialog B-User_Interface_Element +. O +It O +seems O +as O +though O +many O +confuse O +modal B-Class + +window B-User_Interface_Element +with O +a O +layered O +panel B-User_Interface_Element +. O +A O +dialog B-User_Interface_Element +box I-User_Interface_Element +can O +be O +a O +modal O +window B-User_Interface_Element +and O +a O +pop-up B-User_Interface_Element +is O +a O +modal B-User_Interface_Element +window B-User_Interface_Element +. O +A O +layered O +panel B-User_Interface_Element +is O +not O +a O +window B-User_Interface_Element +, O +but O +has O +the O +appearance O +of O +a O +pop-up B-User_Interface_Element +or O +dialog B-User_Interface_Element +box I-User_Interface_Element +. O +It O +is O +modal O +in O +the O +sense O +that O +the O +underlying O +layers O +are O +unavailable O +. O +Modal O +window B-User_Interface_Element +are O +popular O +on O +web O +sites O +because O +they O +are O +immune O +to O +pop-up B-User_Interface_Element +blockers B-User_Interface_Element +. O +Modal O +windows B-User_Interface_Element +were O +designed O +to O +obtain O +information O +or O +user O +action O +that O +the O +underlying O +application O +requires O +to O +continue O +. O +Non-modal O +windows B-User_Interface_Element +allow O +the O +user O +to O +switch O +back O +and O +forth O +between O +the O +window B-User_Interface_Element +and O + +the O +underlying O +application O +. O +A O +good O +use O +for O +a O +non-modal O +window B-User_Interface_Element +might O +be O +screen O +help O +or O +a O +tutorial O +, O +where O +the O +user O +needs O +a O +reference O +tool O +and O +access O +to O +the O +underlying O +application O +. O +IMHO O +, O +modal B-User_Interface_Element +windows I-User_Interface_Element +were O +designed O +for O +a O +narrow O +specific O +purpose O +and O +are O +used O +inappropriately O +a O +lot O +of O +the O +time O +now O +. O +Just O +because O +you O +can O +do O +something O +does O +n't O +mean O +you O +should O +! O +:-) O +I O +have O +a O +WSDL B-File_Type +file O +located O +under O +src B-File_Name +\main\resources\wsdl\ I-File_Name +folder O +and O +it O +is O +having O +multiple O +operations O +defined O +within O +it O +. O +My O +application O +is O +running O +on O +Weblogic B-Application +12C B-Version +server B-Application +. O +I O +'m O + +trying O +to O +expose O +the O +SOAP B-Library +web-service O +using O +Apache B-Application +Cammel I-Application +( O +version O +: O +2.18.3 B-Version +) O +with O +Java B-Language +DSL I-Library +- O +I O +have O +written O +below O +code O +under O +configuration O +method O +of O +my O +RouteBuilder B-Class +class O +- O +While O +I O +'m O +deploying O +the O +application O +, O +it O +is O +throwing O +below O +exception B-File_Name +- I-File_Name +pom.xml I-File_Name +Step O +1 O +: O +Generate O +the O +service O +from O +your O +wsdl B-File_Type +using O +wsdl2java B-Library +command O +or O +your O +choice O +of O +IDE O +. O +Step O +2 O +: O +Have O +that O +in O +your O +code O +classpath O +Step O +3 O +: O +Mention O +the O +class O +name O +and O +endpoint O +names O +in O +the O +above O +piece O +of O +code O +There O +are O +many O +questions O +in O +this O +community O + +for O +opening O +the O +window B-Class +View I-Class +on O +a O +click O +of O +a O +button B-User_Interface_Element +just O +we O +need O +to O +create O +the O +instance O +of O +the O +view O +and O +use O +.Show O +and O +some O +question O +are O +based O +on O +using O +User B-Class +Control I-Application +in O +Window B-Class +View I-Class +. O +I O +am O +following O +MVVM B-Algorithm +pattern O +to O +create O +a O +WPF B-Library +application O +, O +in O +the O +Views B-Class +I O +created O +a O +file O +called O +SalesView.xaml B-File_Name +which O +is O +a O +User B-Application +Control(WPF) I-Application +view O +and O +by O +default O +I O +set O +the O +Dashboard.xaml B-File_Name +from O +the O +App.xaml B-File_Name +which O +is O +Window B-Class +View I-Class +and O +the O +project O +structure O +is O +some O +thing O +like O +this O +: O +My O +requirement O +is O +that O +I O +have O +a O +button B-User_Interface_Element +in O +Dashboard.xaml B-File_Name +on O +click O + +of O +this O +button B-User_Interface_Element +I O +want O +to O +open O +a O +SalesView.xaml B-File_Name +which O +is O +a O +User O +Control(WPF) O +view O +not O +a O +window B-Class +View I-Class +. O +It O +seems O +like O +you O +need O +some O +short O +of O +shell B-Application +for O +hosting O +your O +user O +controls O +. O +Simplest O +way O +is O +to O +put O +them O +on O +main O +window B-User_Interface_Element +as O +content O +instead O +of O +a O +previous O +one O +. O +Or O +use O +some O +framework O +like O +Prism B-Application +. O +Normally O +how O +I O +would O +do O +it O +, O +I O +would O +create O +a O +class O +that O +is O +controller/view O +manager O +. O +And O +then O +pass O +in O +to O +it O +my O +view O +and O +vm B-Application +, O +then O +the O +class O +would O +bind O +it O +and O +put O +it O +into O +the O +hosting O +window B-User_Interface_Element +. O +Usage O +sample O +: O +Here O +is O +an O +example O + +of O +three O +forms B-Class +with O +the O +same O +repeated O +instance O +and O +no O +unique O +identifier O +: O +How O +can O +I O +attach O +a O +different O +console.log B-File_Name +or O +any O +message O +triggered O +by O +a O +click O +to O +each O +of O +these O +buttons B-User_Interface_Element +? O +I O +am O +targeting O +these O +buttons B-User_Interface_Element +so O +far O +with O +a O +jQuery B-Library +Dom B-Function +selector O +$("form[action='/haters']") B-Code_Block +I O +posted O +on O +codepen B-Application +also O +: O +http://codepen.io/marc313/pen/uphiv O +Please O +and O +thanks O +! O +While O +you O +could O +bind O +to O +each O +button B-User_Interface_Element +individually O +, O +as O +in O +Deryck B-User_Name +'s O +answer O +, O +often O +times O +such O +practice O +leads O +to O +duplicate O +code O +. O +Its O + +likely O +your O +actual O +use O +case O +is O +n't O +to O +log O +3 O +different O +things O +to O +the O +console O +when O +3 O +buttons B-User_Interface_Element +are O +clicked O +. O +Particularly O +if O +these O +3 O +buttons B-User_Interface_Element +do O +similar O +actions O +or O +if O +they O +act O +on O +the O +same O +set O +of O +data O +, O +its O +often O +much O +more O +clean O +to O +do O +something O +like O +this O +: O +jQuery B-Class +Markup B-Variable +Reference O +On O +calling O +.on() B-Function +for O +event O +binding O +Each O +item O +in O +a O +set O +will O +have O +an O +index B-Variable +number O +and O +you O +can O +use O +that O +to O +identify O +them O +. O +jQuery B-Library +: O +The O +.eq() B-Function +method O +means O +" O +equals B-Function +" O +and O +refers O +to O +the O +index B-Variable +number O +for O +the O +selector O +you O +chose O +in O + +$('input[type=submit']) B-Code_Block +. O +If O +you O +want O +to O +do O +that O +systemically O +, O +you O +can O +put O +that O +into O +a O +for() B-Code_Block +or O +while() B-Code_Block +loop O +. O +Of O +course O +, O +you O +would O +replace O +eq(0) B-Function +with O +whatever O +number O +you O +want O +to O +use O +to O +identify O +the O +button B-User_Interface_Element +( O +starting O +from O +0 B-Value +being O +the O +first O +element O +in O +the O +set O +, O +not O +greater O +than O +$('input[type=submit]').length) B-Code_Block +. O +Here O +'s O +a O +fork O +of O +your O +CodePen B-Application +to O +see O +it O +in O +action O +with O +alert() B-Function +The O +default O +behaviour O +for O +editing O +a O +cell B-User_Interface_Element +is O +double O +clicking O +it O +, O +but O +i O +want O +to O +show O +to O +the O +user O +that O +, O +there O +is O +a O + +list B-User_Interface_Element +they O +can O +select O +from O +, O +( O +some O +of O +my O +columns B-User_Interface_Element +have O +only O +one O +value O +, O +and O +is O +not O +editable O +) O +, O +so O +i O +opened O +persistent O +editor B-Application +, O +but O +it O +'s O +too O +slow O +if O +there O +are O +too O +many O +rows B-User_Interface_Element +. O +so O +i O +turned O +to O +reimplementing O +the O +mousePressEvent B-Class +and O +show O +the O +combobox B-User_Interface_Element +when O +user O +right O +click O +on O +the O +cell B-User_Interface_Element +, O +but O +without O +any O +visual O +cue O +to O +tell O +them O +which O +cell B-User_Interface_Element +can O +be O +right O +clicked O +on O +. O +( O +i O +know O +maybe O +i O +can O +change O +bg B-User_Interface_Element +color O +of O +that O +cell B-User_Interface_Element +) O +but O +can O +i O +achieve O +something O +like O +this O +? O +drawing O +a O +black O +triangle B-User_Interface_Element +at O +the O +lower O +right O +color O +of O +the O +cell B-User_Interface_Element +to O +indicate O +that O + +it O +can O +be O +right O +clicked O +on O +? O +like O +this O +image B-User_Interface_Element +from O +excel B-Application +? O +You O +could O +use O +a O +QStyleItemDelegate B-Class +, O +something O +like O +this O +: O +I O +'m O +trying O +to O +use O +POS B-Library +tagger I-Library +in O +Maven B-Application +project O +. O +I O +got O +this O +error O +info O +. O +The O +version O +of O +POS B-Library +tagger I-Library +is O +3.7.0 B-Version +, O +and O +using O +eclipse B-Application +. O +I O +tried O +to O +edit O +the O +pom.xml B-File_Name +, O +but O +the O +version O +is O +really O +old O +and O +ca O +n't O +work O +.. O +. O +I O +'m O +wondering O +how O +I O +can O +check O +which O +modules O +I O +need O +to O +load O +in O +my O +modules O +array B-Data_Structure +( O +config/modules.config.php B-File_Name +) O +. O +The O +autoloader O +does O + +not O +seem O +to O +load O +all O +which O +were O +installed O +using O +composer B-Application +or O +some O +are O +already O +included O +in O +ZF3 B-Application +itself O +and O +they O +conflict O +when O +it O +tries O +to O +load O +them O +again O +. O +All O +modules O +which O +you O +install O +using O +composer B-Application +should O +be O +registered O +in O +autoloader B-Application +. O +But O +the O +problem O +, O +the O +modules O +is O +registered O +in O +config/modules.config.php B-File_Name +or O +not O +. O +If O +you O +use O +Zend B-Application +Component I-Application +Installer I-Application +, O +you O +do O +n't O +need O +to O +think O +the O +Zend B-Library +Modules I-Library +must O +be O +loaded O +in O +modules.config.php B-File_Name +or O +not O +. O +Because O +Zend B-Application +Component I-Application +Installer I-Application +will O +prompt O +you O +to O +inject O +the O +module O +in O +modules B-File_Name + +configuration O +( O +config/modules.config.php B-File_Name +) O +or O +not O +while O +install O +it O +using O +composer B-Application +. O +This O +very O +helpful O +feature O +. O +It O +works O +by O +read O +extra.zf.component B-Variable +key O +in O +composer.json B-File_Name +from O +installed O +module O +. O +Here O +is O +the O +sample O +from O +Zend B-Class +Form I-Class +. O +While O +you O +add O +Zend B-Class +\\Form I-Class +to O +composer.json B-File_Name +, O +then O +run O +composer B-Application +update O +, O +composer B-Application +will O +prompt O +you O +to O +inject O +this O +module O +to O +config/modules.config.php B-File_Name +or O +not O +. O +If O +you O +do O +n't O +use O +Zend B-Library +Component I-Application +Installer I-Application +, O +I O +think O +you O +can O +check O +extra.zf.component B-Variable +key O +in O + +composer.json B-File_Name +from O +installed O +module O +. O +And O +add O +it O +manually O +to O +your O +config/modules.config.php B-File_Name +. O +FYI O +, O +if O +your O +application O +using O +Zend B-Application +Skeleton I-Application +Application O +, O +it O +has O +use O +Zend B-Application +Component I-Application +Installer I-Application +. O +HttpSession B-Class +cannot O +be O +resolved O +to O +a O +type O +in O +jsf B-Application +logout I-Application +I O +wanted O +to O +create O +a O +two O +countdown O +timer O +that O +will O +run O +at O +the O +same O +time O +in O +one O +android B-Operating_System +application O +using O +chronometer B-Application +. O +is O +it O +possible O +? O +if O +you O +have O +some O +tutorials O +please O +comment O +it O +in O +here O +I O +will O +gladly O +appreciate O +it O +. O +thank O +you O +:) O +I O +'m O +investigating O +the O +use O +of O + +NodaTime B-Class +LocalDate I-Class +to O +replace O +our O +existing O +use O +of O +of O +the O +BCL B-Class +DateTime/DateTimeOffset B-Class +classes O +. O +We O +have O +run O +into O +a O +number O +of O +timezone O +related O +issues O +with O +our O +code O +due O +to O +our O +misunderstanding O +of O +the O +arguably O +ambiguous O +behavior O +of O +DateTime B-Class +. O +To O +fully O +leverage O +NodaTime B-Library +I O +want O +to O +be O +able O +to O +send O +and O +receive O +dates O +from O +our O +ASP.NET B-Library +Web I-Library +API I-Library +2 B-Version +web O +services O +of O +the O +form O +YYYY-MM-DD B-Value +. O +I O +have O +had O +success O +in O +properly O +serializing O +LocalDate B-Class +to O +YYYY-MM-DD B-Value +. O +However O +I O +am O +unable O +to O +deserialize O +a O +date O +query O + +parameter O +to O +a O +LocalDate B-Class +. O +The O +LocateDate B-Class +is O +always O +1970-01-01 B-Value +. O +Here O +is O +my O +current O +prototype O +code O +( O +some O +code O +removed O +for O +clarity O +) O +: O +PeopleController.cs B-File_Name +Global.asax.cs B-File_Name +I O +execute O +the O +web O +service O +via O +However O +, O +what O +is O +returned O +is O +January B-Value +1 I-Value +, I-Value +1970 I-Value +. O +Stepping O +into O +the O +code O +I O +confirm O +that O +birthday B-Variable +is O +set O +to O +1970-01-01 B-Value +. O +How O +can O +I O +configure O +the O +serialization O +such O +that O +the O +date O +specified O +in O +the O +URL O +as O +a O +query O +parameter O +( O +or O +path O +element O +) O +can O +be O +properly O +serialized O +into O +a O +NodaTime B-Class +LocalDate I-Class +? O +Thanks O +to O + +this O +very O +helpful O +article O +from O +Microsoft B-Website +, O +I O +was O +able O +to O +find O +the O +solution O +using O +a O +custom O +model O +binder O +. O +Add O +this O +class O +to O +your O +project O +: O +Then O +change O +your O +controller O +method O +to O +use O +it O +. O +The O +article O +also O +mentions O +other O +ways O +to O +register O +model O +binders O +. O +Note O +that O +since O +your O +method O +returns O +a O +LocalDate B-Class +, O +you O +'ll O +still O +need O +the O +Noda B-Class +Time O +serialziation O +for O +Json.net B-Library +, O +as O +that O +ends O +up O +getting O +used O +in O +the O +body O +for O +the O +return O +value O +. O +I O +have O +a O +UITableView B-Class +that O +is O +never O +consistent O +. O +This O +table B-Class +view I-Class +has O +2 O +sections O +. O +I O +have O +created O +2 O +UIButtons B-Class +, O +they O +both O +are O + +practically O +the O +same O +image B-User_Interface_Element +, O +but O +one O +is O +grey B-Value +and O +one O +is O +red B-Value +. O +Every O +row B-User_Interface_Element +in O +the O +UITableView B-Class +is O +supposed O +to O +have O +the O +grey O +button B-User_Interface_Element +when O +the O +UITableView B-Class +first O +loads O +, O +and O +then O +if O +a O +user O +taps O +a O +button B-User_Interface_Element +then O +it O +switches O +to O +the O +red B-Value +version O +of O +the O +button B-User_Interface_Element +. O +For O +some O +reason O +, O +about O +80% O +of O +the O +time O +when O +I O +load O +the O +view B-Class +controller O +with O +this O +UITableView B-Class +on O +my O +iPhone B-Device +, O +the O +first O +2 O +rows B-User_Interface_Element +in O +the O +first O +section O +will O +not O +have O +a O +button B-User_Interface_Element +. O +What O +'s O +weird O +is O +if O +I O +tap O +my O +finger O +where O +the O +button B-User_Interface_Element +is O +supposed O +to O +be O +2 O +things O +happen O +: O +The O + +functionality O +attached O +to O +the O +button B-User_Interface_Element +works O +and O +NSLogs B-Application +in O +the O +console B-Application +in O +xcode B-Application +. O +The O +red O +button B-User_Interface_Element +appears O +. O +So O +it O +'s O +like O +the O +grey O +button B-User_Interface_Element +is O +there O +, O +it O +'s O +just O +invisible O +. O +This O +does O +n't O +work O +because O +if O +a O +user O +sees O +2 O +rows B-User_Interface_Element +without O +a O +button B-User_Interface_Element +they O +are O +going O +to O +think O +something O +is O +broken O +or O +that O +they O +ca O +n't O +tap O +on O +that O +row B-User_Interface_Element +. O +Also O +, O +if O +I O +scroll O +to O +the O +very O +bottom O +of O +my O +UITableView B-Class +, O +and O +then O +scroll O +back O +up O +again O +, O +the O +invisible O +grey O +buttons B-User_Interface_Element +will O +magically O +appear O +like O +they O +were O +there O +the O +whole O +time O +. O +Here O +are O +the O +first O +3 O +method O + +implementations O +that O +are O +involved O +in O +creating O +my O +UITableView B-Class +: O +And O +then O +here O +is O +my O +cellForRowAtIndexPath B-Function +method O +implementation O +which O +does O +most O +of O +the O +work O +in O +creating O +the O +UITableView B-Class +and O +which O +actually O +creates O +the O +UIButton B-Class +settings O +for O +each O +row B-User_Interface_Element +. O +The O +if B-Code_Block +else O +statement O +really O +has O +2 O +sets O +of O +nearly O +identical O +code O +, O +the O +only O +difference O +is O +one O +is O +for O +section O +1 O +of O +the O +table B-Class +view O +and O +the O +other O +is O +for O +section O +2 O +: O +I O +have O +not O +included O +the O +full O +method O +implementations O +that O +these O +2 O +statements O +trigger O +because O +they O +only O +handle O +the O +functionality O +attached O +to O +each O +button B-User_Interface_Element +, O +and O +most O +likely O + +have O +nothing O +to O +do O +with O +this O +issue O +, O +but O +I O +will O +post O +them O +here O +anyways O +. O +These O +2 O +statements O +can O +be O +found O +in O +the O +if B-Code_Block +else I-Code_Block +for O +cellForRowAtIndexPath B-Function +and O +handle O +the O +touch O +events O +for O +the O +2 O +sections O +of O +the O +table B-Class +view I-Class +: O +I O +see O +the O +pattern O +of O +trying O +to O +set O +up O +a O +custom O +UITableViewCell B-Class +from O +within O +tableView:cellForRowAtIndexPath B-Class +: O +quite O +a O +lot O +. O +The O +trouble O +is O +that O +I O +believe O +it O +to O +be O +the O +wrong O +place O +to O +do O +it O +. O +If O +you O +'re O +really O +only O +using O +a O +built-in O +UITableViewCell B-Class +, O +then O +it O +'s O +the O +right O +place O +; O +for O +custom O + +cells B-User_Interface_Element +, O +it O +'s O +not O +. O +I O +'d O +recommend O +making O +a O +UITableViewCell B-Class +subclass O +with O +a O +" O +setup O +" O +method O +that O +takes O +an O +object O +and O +uses O +that O +object O +to O +set O +up O +the O +cell O +'s O +UI O +. O +For O +instance O +, O +take O +section B-Variable +0 B-Value +from O +your O +UITableView B-Class +. O +I O +'d O +do O +something O +like O +this O +: O +This O +way O +, O +you O +can O +set O +up O +the O +cell O +'s O +layout O +as O +well O +as O +images B-User_Interface_Element +for O +the O +button B-User_Interface_Element +in O +IB O +, O +rather O +than O +code O +. O +This O +also O +makes O +the O +code O +a O +lot O +easier O +to O +read O +( O +and O +re-read O +6 O +months O +later O +! O +) O +. O +Also O +, O +unless O +the O +2 O +cells B-User_Interface_Element +( O +section O +0 O +and O +section O +1) O +are O +really O + +interchangeable O +, O +I O +'d O +recommend O +two O +different O +subclasses O +of O +UITableViewCell B-Class +to O +give O +you O +greater O +control O +, O +rather O +than O +trying O +to O +force O +one O +to O +act O +like O +the O +other O +or O +vice O +versa O +. O +Then O +, O +you O +simply O +assign O +different O +identifiers O +and O +recycle O +the O +appropriate O +type O +. O +I O +implemented O +deep O +link O +in O +my O +android B-Operating_System +app O +. O +Whenever O +I O +clicked O +the O +share O +link O +its O +open O +my O +app O +perfectly O +. O +My O +problem O +is O +copy O +the O +share O +link O +and O +paste O +the O +chrome B-Application +browser I-Application +it O +does O +n't O +open O +my O +app O +. O +Sorry O +for O +my O +bad O +english O +. O +You O +need O +to O +actually O +click O +on O +a O +link O +pointing O +to O +that O +URL O +to O +trigger O +the O + +deep-link O +Intent O +, O +writing O +the O +URL O +manually O +does O +n't O +trigger O +it O +. O +I O +would O +like O +to O +turn O +a O +list B-Data_Structure +like O +this O +into O +a O +list B-Data_Structure +of O +tuples B-Data_Structure +representing O +consecutive O +ranges O +like O +this O +: O +Is O +there O +a O +compact O +way O +to O +do O +this O +in O +Haskell B-Language +? O +This O +seems O +pretty O +compact O +: O +Sure O +: O +I O +am O +wondering O +if O +this O +is O +possible O +and O +maybe O +some O +code O +examples O +if O +it O +is O +. O +I O +am O +trying O +to O +have O +the O +presenter O +during O +a O +live O +address O +be O +able O +to O +hit O +a O +button B-User_Interface_Element +when O +he O +is O +away O +. O +This O +button B-User_Interface_Element +will O +then O +trigger O +a O +jpg B-File_Type +or O +some O +kind O +of O +image B-User_Interface_Element +on O +the O +clients B-Application +side O +that O + +says O +he O +is O +currently O +away O +and O +to O +also O +have O +it O +mute O +the O +presenter B-Device +'s O +microphone B-Device +? O +Anyone O +have O +any O +ideas O +how O +this O +would O +be O +possible O +in O +FMIS B-Application +4 B-Version +and O +AS3 B-Operating_System +? O +Yes O +, O +this O +is O +do-able O +. O +There O +'s O +a O +bit O +of O +code O +to O +write O +. O +Here O +'s O +a O +break O +down O +: O +Client O +for O +presenter B-Class +makes O +a O +NetConnection B-Class +and O +then O +publishes O +a O +NetStream B-Class +to O +FMS B-Application +. O +When O +presenter B-Class +hits O +away O +button B-User_Interface_Element +: O +Presenter B-Class +'s O +client O +sets O +microphone B-Device +gain O +to O +0 B-Value +Presenter B-Class +'s O +client O +uses O +NetStream.send() B-Function +to O +send O +a O +message O +to O +all O +subscribing O +clients O +. O +The O +message O +is O +basically O + +the O +name O +of O +a O +function O +and O +some O +arguments O +that O +all O +subscribing O +clients O +should O +execute O +. O +In O +this O +case O +, O +the O +function O +would O +display/hide O +the O +" O +away O +" O +image B-User_Interface_Element +. O +then O +do O +the O +reverse O +when O +the O +presenter O +returns O +[ O +Edit O +] O +Adding O +some O +code O +to O +clarify O +how O +to O +use O +NetStream.send() B-Function +: O +The O +presenter O +code O +: O +The O +subscriber O +code O +When O +creating O +the O +NetStream B-Class +, O +use O +the O +client B-Variable +property O +so O +it O +knows O +where O +to O +find O +the O +function O +" O +toggleAwayImageDisplay B-Function +" O +we O +specified O +above O +: O +I O +have O +joomla B-Application +2.5 B-Version +which O +log O +many O +deprecated O +warnings O +like O +Error::raiseNotice() B-Function + +is O +deprecated O +. O +So O +I O +result O +width O +a O +big O +log B-File_Type +file O +. O +Can O +I O +turn O +off O +this O +option O +, O +and O +log O +just O +my O +own O +exceptions B-Class +? O +You O +can O +always O +place O +an O +error O +reporting O +condition O +in O +your O +index.php B-File_Name +like O +: O +error_reporting B-Function +( I-Code_Block +E_ALL I-Code_Block +^ I-Code_Block +E_DEPRECATED I-Code_Block +) I-Code_Block +; I-Code_Block +For O +more O +info O +: O +http://php.net/manual/en/function.error-reporting.php O +Or O +you O +can O +edit O +error.php B-File_Name +in O +your O +joomla B-Application +directory O +, O +and O +disable O +this O +function O +to O +raise O +deprecated O +warnings O +.. O +. O +Here O +is O +the O +structure O +of O +my O +database O +: O +i O +have O +textbox1 B-User_Interface_Element +and O +textbox2 B-User_Interface_Element +and O +8 B-Value + +checkboxes B-User_Interface_Element +in O +my O +ASP.NET B-Library +( O +VB.NET B-Library +) O +webform O +. O +i O +want O +to O +retrieve O +the O +seats O +on O +the O +particular O +dates O +means O +if O +i O +enter O +11/12/2010 B-Value +in O +textbox1 B-User_Interface_Element +then O +in O +textbox2 B-User_Interface_Element +the O +output O +would O +be O +from O +seat_select B-Variable +column I-User_Interface_Element +, O +let O +say O +( B-Value +1 I-Value +, I-Value +2 I-Value +, I-Value +3) I-Value +where O +date B-Variable +would O +be O +11/12/2010 B-Value +If O +i O +enter O +13/12/2010 B-Value +in O +textbox1 B-User_Interface_Element +then O +in O +textbox2 B-User_Interface_Element +the O +output O +would O +be O +1 B-Value +, I-Value +2 I-Value +How O +to O +do O +this O +in O +VB.NET B-Library +? O +Markup O +: O +Code-behind O +( O +C# B-Language +) O +- O +formatting O +on O +presentation O +layer O + +: O +Do O +n't O +forget O +to O +add O +the O +reference O +to O +System.Data.DataSetExtensions.dll B-File_Name +, O +System.Core.dll B-File_Name +. O +Code-behind O +( O +C# B-Language +) O +- O +formatting O +on O +data O +layer O +: O +you O +can O +use O +the O +following O +query O +to O +return O +you O +a O +comma O +separate O +list B-Data_Structure +of O +seat_select B-Variable +and O +then O +use O +linq B-Library +to O +do O +a O +distinct B-Function +on O +the O +returned O +data O +. O +In O +my O +app O +, O +I O +want O +to O +get O +survey O +answers O +from O +the O +user O +. O +So O +, O +I O +'ve O +decided O +put O +smiley O +images B-User_Interface_Element +to O +act O +as O +a O +radio B-User_Interface_Element +buttons I-User_Interface_Element +. O +Is O +it O +possible O +on O +android B-Operating_System +? O +For O +example O +, O +I O +will O +show O + +smiley O +images B-User_Interface_Element +when O +user O +touches O +the O +image B-User_Interface_Element +and O +it O +will O +be O +activated O +like O +a O +radio B-User_Interface_Element +button I-User_Interface_Element +. O +At O +a O +time O +, O +they O +will O +be O +allowed O +to O +only O +choose O +one O +. O +If O +anyone O +could O +guide O +me O +, O +I O +would O +appreciate O +it O +. O +Example O +: O +Thanks O +in O +advance O +! O +This O +question O +has O +been O +answered O +before O +Below O +is O +from O +@Benito B-User_Name +-Bertoli O +RadioButton B-Class +- O +how O +to O +use O +a O +custom O +drawable B-Class +? O +Give O +your O +radiobutton B-User_Interface_Element +a O +custom O +style O +: O +custom_btn_radio.xml B-File_Name +Replace O +the O +drawables B-Class +with O +your O +own O +. O +I O +might O +be O +a O +bit O +late O +. O +Use O +android:button B-Library +" B-Value +@btmImage I-Output_Block +link I-Output_Block +" I-Value + +I O +want O +to O +add O +a O +custom O +VF B-Class +component O +to O +display O +the O +batch O +job O +details O +in O +a O +pageblock B-User_Interface_Element +table I-User_Interface_Element +. O +However O +my O +component O +aint O +saving O +, O +it O +says O +: O +Error B-Error_Name +Error I-Output_Block +: O +Read O +only O +property O +' O +c:batchDetailsComponent.BatchJobDetails B-Variable +' O +Please O +help O +. O +This O +is O +the O +visualforce B-Application +component O +: O +VF B-Class +Page B-User_Interface_Element +: O +Controller O +: O +You O +need O +to O +set O +the O +access O +for O +your O +component O +to O +global B-Data_Type +. O +Like O +this O +: O + I-Code_Block +I O +am O +trying O +to O +integrate O +Hadoop B-Application +and O +Mongo B-Application +. O +I O +downloaded O +the O +mongo-hadoop B-Application +files O +from O + +git B-Application +and O +trying O +to O +built O +jar B-File_Type +files O +by O +using O +below O +. O +But O +i O +'m O +getting O +below O +error O +can O +anyone O +tell O +how O +to O +fix O +this O +issue O +Are O +you O +sure O +that O +have O +network O +connection O +? O +Try O +this O +in O +console B-Application +for O +check O +if O +network O +is O +OK O +: O +$ B-Code_Block +wget O +https://repo1.maven.org/maven2/org/apache/commons/commons-math3/3.4.1/commons-math3-3.4.1.jar O +My O +firewall B-Application +was O +blocking O +the O +connection O +. O +So O +i O +disabled O +the O +firewall B-Application +and O +restarted O +the O +VM B-Application +. O +Now O +it O +'s O +working O +perfectly O +I O +removed O + +Laravel B-Library +'s O +scaffolding O +with O +the O +command O +php B-Code_Block +artisan I-Code_Block +fresh I-Code_Block +. O +I O +read O +the O +Auth O +middleware O +documentation O +, O +but O +it O +did O +n't O +talk O +about O +a O +specific O +feature O +, O +the O +password-reset B-Code_Block +. O +It O +only O +explains O +its O +use O +with O +the O +scaffolding O +, O +but O +not O +if O +I O +removed O +it O +. O +There O +is O +chapter O +" O +Manuel O +authentication O +" O +for O +common O +authentication O +methods O +, O +such O +as O +" O +determining O +if O +a O +user O +is O +authenticated O +" O +, O +but O +nothing O +about O +password-reset O +. O +Other O +point O +, O +does O +this O +middleware O +need O +specific O +rows O +in O +the O +DB O +tables O +I O +created O +with O +migrations O +? O +Especially O +" O +users B-Variable +" O +and O +" O + +password_resets I-Variable +" O +tables B-Data_Structure +configured O +in O +the O +app B-File_Name +\config\auth.php I-File_Name +file O +. O +This O +problem O +may O +seem O +simple O +, O +but O +I O +did O +n't O +find O +any O +clue O +in O +the O +documentation O +. O +Thanks O +for O +help O +! O +I O +seem O +to O +be O +having O +an O +issue O +when O +updating O +records O +on O +a O +specific O +table B-Data_Structure +. O +For O +reference O +here O +is O +an O +example O +of O +the O +query O +that O +throws O +an O +error O +: O +I O +am O +able O +to O +insert O +, O +delete O +and O +query O +rows O +, O +as O +well O +as O +update O +other O +columns B-Data_Structure +however O +whenever O +trying O +to O +update O +the O +CustomerID B-Variable +field O +( O +int B-Data_Type +, O +non-null B-Value +) O +it O +throws O +an O +error O +saying O +: O +I O +have O +all O + +rights O +to O +both O +the O +database O +and O +table B-Data_Structure +however O +while O +trying O +to O +update O +the O +CustomerID B-Variable +column B-Data_Structure +on O +any O +rows B-Data_Structure +, O +ever O +when O +Revision B-Variable +is O +n't O +even O +in O +the O +query O +I O +get O +the O +same O +error O +. O +I O +looked O +around O +a O +great O +deal O +into O +the O +issue O +using O +a O +regex O +in O +my O +php B-Language +code O +to O +remove O +all O +non-printable O +characters O +however O +even O +when O +running O +the O +query O +from O +phpMyAdmin B-Language +the O +same O +error O +is O +thrown O +. O +If O +anyone O +has O +insight O +into O +this O +error O +it O +would O +be O +greatly O +appreciated O +. O +Table B-Data_Structure +description O +: O +You O +may O +possibly O +encounter O +this O +if O +you O +have O +an O +update O +trigger O +firing O +off O +which O +is O +referencing O +a O + +column B-Data_Structure +that O +does O +not O +exist O +. O +May O +be O +the O +offending O +trigger O +is O +not O +even O +trying O +to O +read/write O +to O +this O +table B-Data_Structure +! O +As O +such O +, O +that O +column B-Data_Structure +may O +not O +exist O +where O +it O +is O +trying O +to O +reference O +it O +. O +Further O +, O +you O +could O +kick O +off O +a O +cascade O +of O +such O +triggers O +, O +and O +have O +this O +buried O +more O +than O +one O +layer O +deep O +. O +To O +show O +triggers O +: O +http://dev.mysql.com/doc/refman/5.7/en/show-triggers.html O +To O +modify O +them O +: O + +http://dev.mysql.com/doc/refman/5.7/en/trigger-syntax.html O +UITableViewStyleGrouped B-Class +does O +not O +have O +rounded O +corners B-User_Interface_Element +like O +in O +iOS B-Operating_System +versions O +<= O +6 B-Version +. O +Is O +anyone O +having O +same O +problem O +in O +iOS B-Operating_System +7 B-Version +? O +My O +UITableView B-Class +is O +all O +written O +in O +code O +as O +it O +is O +complex O +. O +I O +have O +had O +a O +look O +at O +all O +the O +changes O +and O +guidelines O +and O +I O +cannot O +see O +any O +mention O +of O +change O +to O +the O +cell B-User_Interface_Element +appearance O +. O +Where O +did O +the O +corners O +go O +? O +iOS B-Operating_System +7 B-Version +is O +Borderless O +. O +Rounded O +corners O +are O +no O +longer O +available O +in O +iOS B-Operating_System +7 B-Version +. O + +Apple B-Website +removed O +this O +feature O +. O +I O +am O +currently O +working O +with O +iOS B-Operating_System +7 B-Version +and O +had O +a O +discussion O +with O +apple B-Website +support O +guys O +. O +They O +confirmed O +that O +this O +is O +no O +more O +supported O +. O +You O +can O +see O +the O +Settings B-Application +app O +for O +an O +example O +— O +the O +table B-Data_Structure +view O +there O +is O +group O +style O +. O +Now O +this O +is O +example O +list B-Data_Structure +: O +What O +i O +want O +is O +getting O +the O +list B-Data_Structure +count O +at O +this O +main B-Variable +list B-Data_Structure +( O +dblWordFreqByCluster B-Variable +) O +. O +Which O +means O +getting O +count O +of O +List B-Class +> I-Code_Block +lists B-Data_Structure +. O +I O +can O +count O +them O +via O +making O +foreach B-Code_Block +iteration O +which O +i O +do O +n't O +want O +to O +because O +i O +suppose O +that O +would O +cause O +unnecessary O +performance O + +loss O +. O +Using O +LINQ B-Language +you O +could O +do O +However O +, O +that O +is O +n't O +much O +different O +than O +using O +a O +foreach B-Code_Block +loop O +, O +but O +it O +would O +be O +less O +verbose O +and O +just O +as O +easy O +to O +read O +. O +A O +simple O +: O +Should O +work O +.. O +. O +Edited O +: O +I O +thought O +it O +was O +java B-Language +;) O +I O +'m O +trying O +to O +add O +the O +ability O +to O +complete O +a O +todo O +item O +by O +patching O +in O +:complete B-Function +method O +. O +Is O +it O +possible O +to O +use O +a O +checkbox B-User_Interface_Element +for O +this O +rather O +than O +the O +link_to O +I O +have O +below O +? O +I O +would O +very O +much O +like O +a O +checkbox B-User_Interface_Element +so O +it O +feels O +like O +the O +task O +is O +ticked O +off O +. O +My O +View O +My O +Controller O +My O +Resources O +EDIT O +: O +I O +have O + +gone O +about O +this O +another O +way O +but O +now O +face O +a O +different O +problem O +.. O +. O +I O +have O +migrated O +a O +:completed O +boolean B-Data_Type +, O +I O +then O +added O +it O +to O +my O +form O +like O +so O +( O +simple_form B-Class +) O +This O +allows O +me O +to O +update O +completed B-Variable +, O +not O +completed B-Variable +. O +But O +how O +do O +I O +get O +this O +to O +show O +in O +my O +view O +? O +I O +do O +n't O +want O +to O +have O +to O +click O +into O +each O +todo(edit) B-Class +I O +want O +to O +do O +it O +from O +the O +index O +but O +not O +sure O +how O +to O +go O +about O +this O +? O +From O +a O +RESTful B-Library +standpoint O +there O +is O +no O +need O +for O +an O +additional O +route B-Class +here O +. O +Instead O +your O +would O +simply O +send O +a O +PATCH B-Function +request O +to O +the O +normal O + +member O +route B-Variable +: O +Also O +you O +want O +to O +do O +it O +like O +a O +real O +rockstar B-Application +you O +might O +want O +to O +use O +a O +enum B-Data_Type +instead O +of O +a O +boolean B-Data_Type +: O +This O +lets O +you O +setup O +many O +states O +without O +creating O +several O +boolean B-Data_Type +columns B-Data_Structure +and O +gives O +you O +a O +bunch O +of O +functionality O +almost O +for O +free O +. O +To O +set O +this O +up O +on O +the O +view O +side O +you O +could O +simply O +create O +a O +form B-HTML_XML_Tag +for O +each O +element O +: O +We O +could O +use O +a O +classical O +submit O +button B-User_Interface_Element +here O +but O +to O +give O +a O +good O +UX O +we O +want O +to O +use O +ajax B-Function +. O +Having O +a O +form B-HTML_XML_Tag +element O +gives O +us O +the O +perfect O +foundation O +since O +we O +can O +simply O +enhance O +its O +behavior O +: O +I O +have O +a O +large O +file O +of O +measurements O + +with O +3-second O +period O +( O +here O +is O +a O +small O +part O +of O +it O +) O +. O +I O +made O +time B-Class +serie I-Class +: O +On O +the O +next O +step O +I O +need O +convert O +it O +to O +the O +time B-Class +series I-Class +with O +3 O +minutes O +update O +interval O +, O +where O +values O +must O +be O +the O +averages O +. O +What O +is O +the O +simplest O +way O +to O +do O +this O +? O +You O +can O +use O +the O +period.apply B-Function +from O +the O +xts B-Library +package O +The O +second O +argument O +to O +period.apply B-Function +is O +a O +vector B-Data_Structure +of O +the O +row B-Data_Structure +numbers O +of O +the O +end O +of O +each O +3 O +minute O +period O +. O +endpoints O +( O +dat B-Variable +, O +" B-Value +minutes I-Value +" I-Value +, I-Value +3) I-Value +calculates O +that O +for O +you O +. O +If O +you O +want O +the O +timestamps B-Class +to O +be O +" O + +rounded O +" O +instead O +of O +being O +the O +last O +timestamp O +of O +each O +period O +, O +you O +can O +use O +align.time B-Function +, O +but O +align.time B-Function +requires O +that O +the O +object O +is O +an O +xts B-Data_Type +, O +so O +you O +'d O +have O +to O +convert O +to O +xts B-Data_Type +first O +. O +Use O +aggregate.zoo B-File_Name +: O +Note O +that O +dec B-Code_Block +="." I-Code_Block +and O +index B-Code_Block += I-Code_Block +1 I-Code_Block +are O +used O +by O +default O +in O +read.zoo B-File_Name +so O +they O +could O +be O +omitted O +from O +the O +read.zoo B-File_Name +line O +. O +I O +created O +an O +API B-Library +using O +the O +rails-api B-Library +gem O +and O +I O +have O +an O +client B-Application +app O +based O +on O +angular B-Library +in O +which O +I O +use O +ng-resource B-Function +. O +I O +do O +think O +that O +the O +request O +I O +send O +to O +my O +API B-Library +should O +be O +more O + +like O +{ B-Code_Block +post=> I-Code_Block +{ I-Code_Block +"kind"=>"GGG" I-Code_Block +} I-Code_Block +} B-Code_Block +and O +not O +{ B-Code_Block +"kind"=>"GGG" I-Code_Block +} I-Code_Block +of O +I O +have O +to O +find O +a O +way O +for O +my O +api B-Library +to O +work O +with O +the O +request O +I O +send O +now O +. O +For O +now O +I O +'m O +stuck O +with O +400 B-Error_Name +Bad I-Error_Name +Request I-Error_Name +errors O +and O +I O +ca O +n't O +find O +out O +how O +to O +fix O +it O +. O +Here O +is O +my O +rails B-Library +controller O +: O +Here O +is O +my O +angular B-Library +controller I-Class +: O +Here O +is O +my O +angular B-Library +factory I-Library +: O +In O +my O +logs O +I O +have O +: O +- O +Change O +the O +following O +code O +: O +To O +be O +: O +And O +you O +problem O +will O +be O +fixed O +. O +Yes O +, O +it O +has O +been O +asked O +before O +and O +i O +have O +followed O + +the O +advice O +here O +and O +put O +my O +declerations O +at O +the O +top O +still O +not O +working O +. O +note O +the O +logic O +of O +the O +code O +is O +correct O +as O +it O +was O +working O +on O +another O +machine O +, O +its O +the O +compiler B-Application +that O +is O +not O +happy O +with O +the O +layout O +The O +compiler B-Application +complains O +because O +assert B-Code_Block +is O +not O +a O +declaration O +. O +You O +'ll O +need O +to O +move O +the O +assert B-Code_Block +so O +that O +it O +comes O +after O +the O +declarations O +. O +Using O +a O +C B-Application +compiler I-Application +that O +supported O +a O +standard O +more O +recent O +that O +C89 B-Value +would O +be O +a O +good O +move O +. O +I O +'ve O +created O +a O +bash B-Language +script O +to O +find O +dollar B-Value +words O +. O +For O +those O +of O +you O +who O +do O +n't O +know O +, O +a O +dollar B-Value +word O +is O +a O +word O +whose O +values O +of O +their O +letters O + +add O +up O +to O +100 B-Value +when O +A B-Variable +is O +given O +a O +value O +of O +1 B-Value +, O +B B-Variable +is O +given O +a O +value O +of O +2 B-Value +, O +C B-Variable +is O +3 B-Value +, O +and O +all O +the O +way O +to O +Z B-Variable +is O +26 B-Value +. O +I O +am O +new O +to O +programming O +, O +so O +I O +'ve O +created O +a O +very O +crude O +script O +that O +'ll O +do O +this O +kind O +of O +thing O +, O +but O +it O +'s O +not O +working O +as O +fast O +as O +I O +would O +expect O +. O +Something O +in O +my O +code O +is O +slowing O +it O +down O +, O +but O +I O +do O +n't O +know O +what O +. O +This O +is O +my O +code O +. O +I O +can O +only O +speculate O +that O +it O +has O +something O +to O +do O +with O +the O +while O +loops O +, O +or O +with O +how O +it O +is O +constantly O +writing O +the O +value O +of O +$line B-Code_Block +to O + +a O +file O +. O +I O +'ve O +created O +a O +script O +before O +that O +adds O +numbers O +to O +generate O +the O +Fibonacci O +sequence O +, O +and O +it O +does O +it O +almost O +instantaneously O +. O +So O +my O +question O +is O +, O +what O +are O +some O +ways O +to O +help O +my O +code O +run O +more O +efficiently O +? O +Apologies O +if O +this O +belongs O +on O +codereview B-Application +. O +Any O +help O +is O +highly O +appreciated O +. O +Thanks O +Edit O +: O +Although O +I O +accepted O +Gordan B-User_Name +Davisson I-User_Name +'s O +Answer O +, O +the O +other O +ones O +are O +just O +as O +good O +if O +you O +want O +to O +do O +this O +. O +I O +'d O +recommend O +reading O +everyone O +else O +'s O +answer O +before O +giving O +this O +a O +try O +. O +Also O +, O +as O +numerous O +users O +have O +pointed O +out O +, O +bash B-Language + +is O +not O +a O +good O +language O +to O +be O +using O +for O +this O +. O +Again O +, O +Thanks O +to O +everyone O +for O +your O +suggestions O +. O +As O +@thatotherguy O +pointed O +out O +in O +a O +comment O +, O +there O +are O +two O +big O +problems O +here O +. O +First O +, O +the O +way O +you O +'re O +reading O +lines O +from O +the O +file O +reads O +the O +entire O +file O +every O +line O +. O +That O +is O +, O +to O +read O +the O +first O +line O +you O +run O +sed B-Code_Block +-n I-Code_Block +" I-Code_Block +1 I-Code_Block +" I-Code_Block +p I-Code_Block +Words.txt I-Code_Block +, O +which O +reads O +the O +entire O +file O +and O +prints O +only O +the O +first O +line O +; O +then O +you O +run O +sed B-Code_Block +-n I-Code_Block +" I-Code_Block +2 I-Code_Block +" I-Code_Block +p I-Code_Block +Words.txt I-Code_Block +, O +which O +reads O +the O +entire O +file O +again O +and O +prints O +only O +the O +second O +line O +; O +etc O +. O +To O +fix O + +this O +use O +a O +while B-Code_Block +read B-Code_Block +loop O +: O +Note O +that O +if O +anything O +inside O +the O +loop O +tries O +to O +read O +from O +standard O +input O +, O +it O +'ll O +steal O +some O +of O +the O +input O +from O +Words.txt B-File_Name +. O +In O +that O +case O +you O +can O +send O +the O +file O +over O +FD B-Variable +#3 B-Variable +instead O +of O +standard O +input O +with O +while B-Code_Block +read B-Code_Block +-u3 I-Code_Block +.. I-Code_Block +. I-Code_Block +done I-Code_Block +3 I-Code_Block +< I-Code_Block +Words.txt I-Code_Block +. O +The O +second O +problem O +is O +this O +bit O +: O +which O +.. O +creates O +3 O +subprocesses O +( O +echo B-Code_Block +, O +grep B-Code_Block +, O +and O +wc B-Code_Block +) O +, O +which O +is O +n't O +too O +bad O +except O +that O +this O +runs O +26 O +times O +for O +each O +and O +every O +word O +in O +the O +file O +. O +Creating O +processes O +is O +expensive O +compared O +to O +most O +shell B-Application +operations O +, O + +so O +you O +should O +do O +your O +best O +to O +avoid O +it O +especially O +in O +loops O +that O +run O +many O +many O +times O +. O +Try O +this O +instead O +: O +This O +works O +by O +replacing O +all O +characters B-Data_Type +that O +are O +n't O +${letter[i]} B-Code_Block +with O +"" B-Value +, O +then O +looking O +at O +the O +length O +of O +the O +resulting O +string B-Data_Type +. O +The O +parsing O +happens O +entirely O +in O +the O +shell B-Application +process O +, O +so O +it O +should O +be O +much O +faster O +. O +Given O +: O +( O +i.e O +. O +, O +the O +370,101 O +word O +file O +linked O +HERE O +) O +In O +Bash B-Application +alone O +, O +start O +with O +a O +loop O +that O +reads O +the O +file O +line O +by O +line O +: O +To O +count O +the O +lines O +alone O +in O +Bash B-Application +( O +same O +file O +) O +takes O + +over O +7.8 O +seconds O +on O +my O +computer B-Device +. O +wc B-File_Type +in O +comparison O +executes O +in O +microseconds O +. O +So O +the O +Bash B-Application +version O +is O +going O +to O +take O +a O +while O +. O +Once O +you O +have O +the O +file O +word O +by O +word O +, O +you O +can O +read O +each O +word O +character O +by O +character O +and O +find O +the O +index O +of O +that O +character O +in O +a O +string B-Data_Type +of O +the O +alphabet O +: O +Prints O +: O +That O +takes O +about O +1:55 B-Value +on O +the O +370,101 B-Value +word I-Value +file O +. O +As O +a O +comparison O +, O +consider O +the O +same O +function O +in O +Python B-Language +: O +Far O +easier O +to O +understand O +and O +executes O +in O +580 B-Value +ms O +. O +Bash B-Application +is O +great O +for O +gluing O +together O +different O +tools O +. O +Is O +is O +not O +that O +great O + +at O +large O +processing O +tasks O +. O +Use O +awk B-Library +perl I-Library +python B-Language +ruby B-Language +etc O +for O +larger O +tasks O +. O +Easier O +to O +write O +, O +read O +, O +understand O +and O +faster O +. O +I O +'m O +trying O +to O +match O +a O +regex O +string B-Data_Type +against O +a O +data O +file O +in O +perl B-Language +, O +but O +it O +constantly O +keeps O +skipping O +the O +exact O +line O +that O +I O +'m O +heading O +for O +.. O +. O +what O +can O +possibly O +be O +wrong O +here O +? O +My O +file O +says O +: O +I O +'m O +going O +for O +the O +class O +" O +lydskrift B-Library +" O +line O +, O +so O +I O +tried O +to O +grab O +its O +content O +in O +multiple O +ways O +until O +I O +ended O +up O +trying O +to O +match O +just O +everything O +like O +so O +: O +Surprisingly O +it O +keeps O +giving O + +me O +this O +: O +Interestingly O +enough O +, O +it O +matches O +all O +four O +lines O +if O +I O +put O +them O +in O +a O +DATA B-File_Name +area O +inside O +the O +same O +perl B-File_Type +file O +! O +But O +that O +'s O +not O +what O +I O +want O +, O +so O +what O +makes O +the O +difference O +here O +? O +To O +build O +on O +mu B-Operating_System +is O +too O +short O +'s O +solution O +, O +this O +is O +how O +I O +'d O +write O +it O +: O +or O +, O +if O +you O +also O +want O +to O +skip O +lines O +consisting O +only O +of O +whitespace O +: O +First O +of O +all O +, O +I O +think O +your O +file O +has O +one O +more O +line O +at O +the O +top O +that O +you O +'re O +not O +including O +. O +The O +reason O +for O +my O +suspicion O +is O +below O +. O +Your O +problem O +is O +n't O +the O +regex O +, O +your O +problem O +is O +that O + + B-Code_Block +reads O +a O +line O +each O +time O +you O +call O +it O +. O +So O +every O +run O +through O +your O +loop O +reads O +one O +line O +in O +the O +while( B-Code_Block +< B-Code_Block +FILE I-Code_Block +> I-Code_Block +) O +and O +then O +another O +one O +in O +the O +if( B-Code_Block +< I-Code_Block +FILE I-Code_Block +> I-Code_Block += I-Code_Block +~ I-Code_Block +m/ I-Code_Block +(.+)/) I-Code_Block +. O +Your O +if B-Code_Block +should O +be O +just O +this O +: O +so O +that O +it O +uses O +the O +default O +$_ B-Variable +variable O +that O +the O +while(1) B-Code_Block +will O +be O +populating O +. O +Furthermore O +, O +your O +while B-Code_Block +loop O +is O +doing O +a O +lot O +more O +work O +than O +it O +has O +to O +, O +you O +could O +just O +do O +this O +: O +or O +even O +this O +: O +If O +you O +'re O +trying O +to O +skip O +blank O +lines O +, O +then O +maybe O +this O +: O +I O +'m O +trying O +to O +upload O +a O +video B-User_Interface_Element +while O + +using O +Laravel B-Library +. O +Though O +uploading O +images B-User_Interface_Element +work O +fine O +for O +me O +when O +I O +change O +my O +controller O +line O +to O +: O +I O +only O +see O +uploaded O +written O +on O +a O +new O +page B-User_Interface_Element +, O +but O +no O +video B-User_Interface_Element +. O +Controller O +: O +Routes O +: O +View O +: O +You O +can O +try O +like O +this O +: O +Controller B-Variable +: O +php.ini B-File_Type +files O +contains O +some O +limits O +that O +might O +affect O +this O +. O +Try O +changing O +these O +to O +high O +enough O +values O +: O +I O +'m O +sure O +this O +question O +has O +been O +asked O +before O +, O +but O +I O +'m O +unable O +to O +find O +it O +. O +I O +have O +a O +bunch O +of O +list O +elements O +like O +so O +: O +I O +want O +to O +wrap O +each O +group O +in O +a O +
      B-HTML_XML_Tag +element O +. O +How O +do O +I O +do O +that O + +? O +This O +is O +what O +I O +'ve O +tried O +, O +but O +it O +only O +matches O +the O +individual O +elements O +: O +/
    • ]*>.*<\/li>/g I-Code_Block +https://regex101.com/r/KXEkJz/1 O +And O +if O +I O +do O +/
    • ]*>[\s\S]*<\/li>/g I-Code_Block +, O +it O +produces O +one O +giant O +match O +. O +If O +you O +want O +to O +group O +them O +by O +new O +lines O +, O +try O +something O +like O +this O +: O +( B-Code_Block +
    • ]*>.*<\/li> I-Code_Block +\n? B-Code_Block +) I-Code_Block ++ O +The O +only O +difference O +between O +it O +and O + +yours O +is O +that O +it O +tries O +to O +capture O +multiple O +
    • B-HTML_XML_Tag +objects O +and O +does O +n't O +mind O +if O +there O +is O +a O +new O +line O +. O +If O +there O +'s O +a O +new O +line O +followed O +by O +something O +different O +though O +, O +it O +stops O +matching O +. O +I O +am O +having O +problem O +in O +populating O +data O +from O +a O +table B-Data_Structure +in O +one O +screen B-User_Interface_Element +to O +a O +Text B-Class +Field I-Class +in O +the O +other O +screen B-User_Interface_Element +. O +I O +have O +two O +classes O +FirstClass O +containing O +a O +textbox B-User_Interface_Element +and O +a O +button B-User_Interface_Element +. O +On O +pressing O +a O +button B-User_Interface_Element +a O +second O +window B-User_Interface_Element +is O +opened O +containing O +a O +Table B-Data_Structure +of O +values O +. O +As O +the O +user O +double O +clicks O +a O +row B-User_Interface_Element +the O +value O +of O +the O +second O +column B-User_Interface_Element +of O +the O +row B-User_Interface_Element +should O +be O +inserted O +into O +the O +textbox B-User_Interface_Element +of O +the O + +FirstClass B-Class +. O +Code O +of O +both O +the O +classes O +is O +attached O +. O +Thanking O +you O +in O +anticipation O +. O +The O +quick O +and O +easy O +way O +( O +but O +it O +introduces O +coupling O +between O +the O +2 O +classes O +) O +would O +be O +to O +pass O +userNameFld B-Variable +to O +your O +showDialog B-Function +method O +and O +make O +it O +a O +member O +of O +TableClass B-Class +. O +You O +can O +then O +change O +its O +value O +from O +the O +TableClass B-Class +class O +. O +A O +better O +way O +would O +be O +to O +bind O +the O +value O +of O +userNameFld B-Variable +to O +value B-Variable +. O +I O +am O +trying O +to O +programmatically O +fire O +a O +key O +event O +to O +go O +left O +in O +a O +text B-User_Interface_Element +box I-User_Interface_Element +, O +but O +not O +having O +any O +luck O +. O +The O +input O +element O +has O +focus O +and O +the O +cursor O +is O +at O +the O + +end O +. O +I O +'m O +trying O +to O +get O +the O +cursor O +to O +move O +left O +one O +step O +- O +before O +the O +letter O +" B-Value +F I-Value +" I-Value +* O +programmatically O +by O +firing O +a O +Keyboard B-Device +event O +( O +keydown/keyup/keypress O +) O +with O +the O +corresponding O +keystroke O +← B-Value +or O +→ B-Value +targeted O +at O +the O +input O +box B-User_Interface_Element +. O +ABCDEF| B-Value +Here O +'s O +the O +code O +so O +far O +: O +HTML B-Language +Javascript B-Language +Saved O +a O +quick O +demo O +on O +jsfiddle B-Application +if O +you O +want O +to O +see O +the O +whole O +code O +- O +http://jsfiddle.net/Vsafv/ O +I O +am O +not O +interested O +in O +making O +this O +cross-browser B-Application +( O +just O +get O +it O +working O +in O +Chrome B-Application +) O +. O + +Thanks O +for O +any O +help O +. O +And O +for O +those O +not O +viewing O +jQuery B-Library +as O +the O +solution O +to O +everything O +:) O +From O +http://blog.josh420.com/archives/2007/10/setting-cursor-position-in-a-textbox-or-textarea-with-javascript.aspx O +where O +" O +input B-User_Interface_Element +" O +is O +your O +textarea B-User_Interface_Element +37 B-Value +- O +left O +38 O +- O +up O +39 O +- O +right O +40 B-Value +- O +down O +So O +when O +you O +record O +your O +" O +events O +" O +you O +record O +the O +values O +for O +the O +keys O +pressed O +. O +I O +'m O +sure O +you O +already O +figured O +out O +a O +way O +to O +do O +this O +but O +just O +in O +case O +, O +here O +'s O +an O +idea O +of O +how O +i O +would O + +tackle O +it O +: O +Hope O +this O +helps O +I O +need O +to O +get O +the O +bounding O +box O +( O +in O +scene O +space O +) O +of O +QGraphicsItems B-Class +that O +have O +the O +QGraphicsItem::ItemIgnoresTransformations B-Class +flag O +set O +. O +According O +to O +the O +docs O +, O +you O +need O +to O +use O +QGraphicsItem::deviceTransform() B-Function +to O +do O +that O +. O +I O +tried O +this O +: O +But O +something O +is O +wrong O +, O +the O +bounding O +boxes B-User_Interface_Element +appear O +smaller O +and O +far O +to O +the O +right O +of O +the O +items O +.. O +. O +Just O +figured O +it O +out O +, O +QGraphicsView::viewportTransform() B-Function +doc O +says O +" O +Returns O +a O +matrix B-Data_Structure +that O +maps O +viewport O +coordinates O +to O +scene O +coordinates O +" O +, O +but O +in O +fact O +it O +returns O +the O + +scene O +to O +viewport O +transform O +. O +Inverting O +vp_trans B-Function +in O +the O +last O +step O +fixed O +my O +problem O +. O +In O +version O +2.0.4 B-Version +of O +Twitter B-Library +Bootstrap I-Library +I O +added O +a O +box B-User_Interface_Element +shadow I-User_Interface_Element +to O +my O +nav-bar B-User_Interface_Element +and O +it O +worked O +great O +. O +( O +see O +the O +image B-User_Interface_Element +below O +) O +I O +recently O +upgraded O +to O +version O +2.2.1 B-Version +and O +tried O +doing O +the O +same O +but O +I O +fail O +to O +see O +the O +box B-User_Interface_Element +shadow I-User_Interface_Element +below O +my O +navbar B-User_Interface_Element +. O +Here O +is O +my O +current O +style O +: O +Any O +ideas O +why O +the O +drop B-User_Interface_Element +shadow I-User_Interface_Element +is O +n't O +appearing O +in O +2.2.1 B-Version +? O +In O +the O +bug O +reported O +, O +the O +possible O +solution O +would O +be O +: O +And O +the O +latest O +version O + +2.1.2-WIP B-Version +has O +this O +code O +: O +I O +need O +to O +limit O +the O +radius O +of O +the O +great O +circle B-User_Interface_Element +problem O +. O +The O +circle B-User_Interface_Element +will O +extend O +until O +it O +hits O +another O +item O +. O +I O +need O +it O +to O +limit O +the O +range O +of O +the O +circle B-User_Interface_Element +to O +5 O +miles O +Here O +is O +my O +code O +First O +, O +it O +is O +surprising O +you O +use O +a O +function O +that O +returns O +a O +radius O +in O +km O +, O +and O +then O +want O +to O +limit O +it O +to O +5 O +miles O +. O +You O +should O +make O +up O +your O +mind O +: O +either O +write O +the O +function O +to O +return O +miles O +and O +add O +the O +limit O +in O +miles O +, O +or O +leave O +the O +function O +as-is O +and O +limit O +it O +by O +km O +( O +8 O +km O +is O +roughly O +5 O + +miles O +) O +. O +If O +you O +want O +to O +use O +miles O +, O +then O +change O +this O +line O +: O +to O +: O +and O +replace O +: O +by O +: O +Alternatively O +, O +if O +you O +want O +to O +stick O +to O +km O +, O +then O +only O +replace O +: O +by O +: O +When O +I O +install O +the O +module O +using O +pip B-Code_Block +install I-Code_Block +module_name I-Code_Block +, O +I O +am O +able O +to O +see O +the O +size O +of O +either O +wheel O +or O +the O +package O +. O +so O +the O +question O +is O +, O +is O +it O +possible O +to O +know O +just O +the O +size O +of O +each O +module O +? O +something O +like O +this O +. O +I O +want O +to O +know O +estimated O +size O +of O +the O +distribution O +so O +that O +I O +can O +remove O +them O +from O +winpython B-Operating_System +distribution O +. O +I O +know O +this O +is O +vague O +but O +this O +is O +what O +I O +wanted O +: O + +or O +you O +can O +get O +list B-Data_Structure +at O +: O +http://hastebin.com/qiconesoje.apache O +If O +you O +'re O +in O +virtualenv B-Application +, O +you O +can O +use O +first O +option O +to O +get O +more O +: O +I O +have O +a O +array B-Data_Structure +now O +i O +want O +to O +create O +a O +copy O +of O +that O +array B-Data_Structure +so O +that O +i O +can O +retain O +the O +previous O +value O +of O +my O +array B-Data_Structure +if O +i O +want O +to O +; O +I O +tried O +something O +like O +this O +But O +it O +giving O +me O +a O +null B-Value +pointer O +exception B-Class +i.e O +. O +Please O +suggest O +me O +how O +could O +i O +do O +this O +now O +Very O +simple O +Try O +this O +As O +the O +exception B-Class +stands O +you O +have O +not O +allocate O +memory O +for O +the O +destination O +. O +Before O +System.arrayCopy B-Function +call O +if O + +secondArray B-Variable +is O +of O +the O +String B-Data_Type +type O +. O +Otherwise O +you O +have O +to O +change O +it O +accordingly O +I O +want O +to O +Convert O +My O +Data B-Class +Table B-Data_Structure +to O +XML B-Language +. O +I O +Have O +two O +data B-Class +Table I-Class +Similar O +like O +this O +. O +I O +want O +to O +convert O +similar O +like O +this O +. O +I O +Have O +tried O +Below O +, O +but O +I O +need O +to O +do O +this O +with O +looping O +with O +datatable B-Class +select B-Code_Block +statement O +for O +refid B-Variable +. O +can O +anyone O +please O +help O +me O +on O +this O +. O +I O +hope O +it O +will O +help O +you O +You O +can O +use O +the O +writeXML B-Function +method O +to O +save O +it O +as O +XML B-Language +Here O +is O +useful O +link O + +http://msdn.microsoft.com/en-us/library/system.data.datatable.writexml.aspx O +I O +tried O +using O +the O +regex.syntax B-Class +module O +to O +access O +the O +individual O +tokens O +of O +a O +parsed O +regular O +expression O +without O +success O +: O +the O +only O +thing O +I O +'m O +able O +to O +output O +is O +a O +simplified/optimized O +version O +of O +the O +regex O +. O +Code O +: O +Output O +: O +Can O +someone O +give O +me O +a O +simple O +example O +of O +how O +to O +traverse O +and O +output O +its O +parse B-Data_Structure +tree B-Data_Structure +? O +The O +Parse B-Function +function O +you O +'re O +calling O +is O +right O +. O +When O +you O +call O +fmt.Println(p) B-Function +, O +the O +parse O +tree B-Data_Structure +is O +being O + +converted O +to O +a O +string B-Data_Type +, O +which O +is O +why O +the O +output O +you O +'re O +seeing O +is O +just O +an O +equivalent O +regexp O +. O +The O +return O +value O +of O +Parse B-Function +is O +a O +pointer B-Data_Type +to O +a O +syntax.Regexp B-Class +struct I-Class +. O +To O +traverse O +the O +returned O +parse O +tree O +you O +want O +to O +look O +at O +the O +Sub O +field O +of O +the O +returned O +struct B-Data_Structure +which O +lists O +all O +the O +subexpressions O +( O +a O +slice O +of O +pointers O +to O +syntax.Regexp B-Class +structs I-Class +) O +. O +For O +example O +: O +See O +the O +syntax B-Library +package O +reference O +for O +more O +fields O +worth O +inspecting O +: O +Op B-Variable +and O +Rune B-Variable +are O +major O +ones O +. O +I O +have O +problem O +with O +event B-Class +in O +Java B-Language +. O +I O +have O +got O +two O +jade B-Library +'s O +class O + +: O +First O +class O +Second O +class O +Problem O +is O +that O +when O +I O +click O +Add O +in O +gui B-Application +i O +want O +to O +view O +" B-Value +it I-Value +is I-Value +work I-Value +" I-Value +. O +Why O +it O +does O +n't O +work O +? O +I O +do O +n't O +know O +Jade B-Library +but O +in O +your O +code O +, O +var B-Variable +is O +set O +to O +true B-Value +when O +the O +add O +button B-User_Interface_Element +is O +clicked O +. O +If O +you O +put O +a O +System.out.println("something") B-Code_Block +after O +the O +line O +var B-Code_Block += I-Code_Block +true I-Code_Block +in O +the O +second O +class O +you O +will O +see O +that O +it O +happens O +as O +expected O +when O +you O +click O +the O +button B-User_Interface_Element +. O +If O +you O +change O +the O +first O +class O +like O +this O +: O +you O +will O +also O +see O +that O +var B-Variable +is O +still O +false B-Value +when O +that O +condition O +is O +tested O +because O +you O +have O +not O +had O +time O +to O +click O +the O + +add O +button B-User_Interface_Element +yet O +. O +The O +proper O +way O +to O +handle O +this O +would O +be O +to O +have O +the O +first O +class O +listen O +to O +the O +second O +class O +so O +that O +it O +gets O +alerted O +when O +the O +button B-User_Interface_Element +is O +clicked O +and O +runs O +something O +appropriate O +when O +that O +happens O +. O +Im O +simply O +trying O +to O +upload O +this O +image B-User_Interface_Element +to O +iCloud B-Application +. O +It O +keeps O +giving O +me O +the O +error O +" B-Output_Block +The I-Output_Block +operation I-Output_Block +could I-Output_Block +n't I-Output_Block +be I-Output_Block +completed I-Output_Block +. I-Output_Block +Operation I-Output_Block +not I-Output_Block +permitted I-Output_Block +" I-Output_Block +. O +I O +took O +this O +code O +right O +out O +of O +the O +Document O +Based O +App O +Programming O +Guide O +and O +I O +believe O +I O +'ve O +set O +all O +my O +certificates O +, O +identifiers O +, O +profiles O +, O +and O +entitlements O +correctly O +. O +Any O +help O +would O + +be O +much O +appreciated O +. O +This O +is O +insanely O +frustrating O +. O +Welcome O +to O +iCloud B-Application +. O +You O +'ll O +get O +used O +to O +that O +feeling O +after O +a O +while O +. O +In O +the O +meantime O +though O +, O +you O +have O +other O +problems O +. O +This O +is O +not O +going O +to O +give O +you O +a O +valid O +URL O +, O +which O +is O +going O +to O +be O +a O +problem O +. O +What O +you O +need O +is O +: O +That O +will O +give O +you O +a O +valid O +file:// B-Value +URL O +. O +Below O +are O +my O +configuration O +inputFromKafka O +goes O +through O +transformation O +below O +The O +print O +statement O +from O +above O +prints O +only O +two O +consistent O +headers O +regardless O +KAFKA B-Code_Block +Message B-Code_Block +Headers I-Code_Block +{ B-Code_Block +id I-Code_Block += I-Code_Block + +9c8f09e6-4b28-5aa1-c74c-ebfa53c01ae4 B-Code_Block +, I-Code_Block +timestamp I-Code_Block += I-Code_Block +1437066957272} I-Code_Block +While O +Sending O +a O +Kafka B-Library +message O +some O +headers O +were O +passed O +including O +KafkaHeaders.MESSAGE_KEY B-Code_Block +but O +I O +am O +not O +getting O +back O +that O +either O +, O +wondering O +if O +there O +is O +away O +to O +accomplish O +this O +? O +Unfortunately O +it O +does O +n't O +work O +that O +way O +.. O +. O +The O +Producer B-Class +part O +( O +KafkaProducerMessageHandler B-Class +) O +looks O +like O +this O +: O +As O +you O +see O +we O +do O +n't O +send O +any O +messageHeaders O +to O + +the O +Kafka B-Application +topic O +. O +Only O +payload O +and O +exactly O +under O +that O +messageKey B-Variable +as O +it O +specified O +by O +Kafka B-Application +protocol O +. O +From O +other O +side O +the O +Consumer B-Class +side O +( O +KafkaHighLevelConsumerMessageSource B-Class +) O +does O +this O +logic O +: O +As O +you O +see O +we O +do O +n't O +care O +here O +about O +messageKey B-Variable +. O +The O +KafkaMessageDrivenChannelAdapter B-Library +( O + B-Code_Block +) O +is O +for O +you O +! O +It O +does O +this O +before O +sending O +the O +message O +to O +the O +channel O +: O +As O +stated O +before O +there O +'s O +no O +concept O +of O +message O +headers O +in O +Kafka B-Application +. O +Because O +I O +struggled O +with O +that O +same O + +problem O +in O +the O +past O +I O +'ve O +compiled O +a O +small O +library O +that O +helps O +tackle O +this O +issue O +. O +It O +may O +come O +handy O +to O +you O +. O +I O +am O +building O +a O +calculator O +with O +flexbox B-Class +. O +I O +want O +one O +of O +its O +keys O +twice O +the O +height B-Variable +and O +another O +key O +twice O +the O +width B-Variable +. O +I O +googled O +much O +about O +it O +but O +could O +n't O +find O +both O +cases O +together O +. O +For O +twice O +height B-Variable +key O +, O +only O +answers O +I O +found O +was O +to O +make O +flex-direction B-Variable +as O +column B-User_Interface_Element +. O +But O +in O +that O +case O +I O +will O +not O +be O +able O +to O +make O +double O +width B-Variable +key O +. O +Here O +is O +my O +code O +( O +on O +codepen.io B-Application +) O +. O +Please O +help O +. O +There O +is O +n't O + +a O +generic O +answer O +I O +can O +come O +up O +with O +, O +but O +this O +is O +as O +close O +as O +I O +can O +get O +. O +I O +have O +modified O +your O +code O +to O +use O +floating B-Data_Type +instead O +of O +the O +flexbox B-Class +layout I-Class +model O +. O +This O +is O +less O +modern O +, O +but O +seems O +to O +be O +a O +viable O +workaround O +to O +this O +particular O +problem O +, O +with O +little O +to O +no O +negative O +effects O +. O +https://codepen.io/anon/pen/VjOKGX O +Wrap O +the O +uneven O +keys O +in O +their O +own O +flex O +containers O +and O +go O +from O +there. O +. O +Revised O +Codepen B-Application +( O +with O +compiled O +CSS B-Language +) O +Notes O +: O +Include O +padding O +and O +borders O +in O +width O +/ O +height O +calculations O +. O + +Wrap O +uneven O +keys O +in O +a O +separate O +flex B-Class +container I-Class +( O +with O +defaults O +flex-direction B-Code_Block +: O +row B-HTML_XML_Tag +and O +flex-wrap B-Code_Block +: O +nowrap I-Code_Block +) O +Wrap O +long B-Data_Type +key O +in O +a O +separate O +flex B-Class +container I-Class +with O +wrapping O +enabled O +( O +and O +take O +enough O +siblings O +to O +create O +equal O +height O +with O +tall B-Variable +key O +) O +. O +Force O +three O +keys O +per O +row B-User_Interface_Element +max O +. O +Make O +long B-Data_Type +key O +twice O +the O +width O +of O +siblings O +. O +( O +Did O +n't O +use O +simpler O +long B-Class +class O +selector O +due O +to O +weaker O +specificity O +. O +) O +Wrap O +tall B-Variable +key O +in O +a O +separate O +flex B-Class +container I-Class +with O +vertical O +orientation O +. O +Make O +tall B-Variable +key O +consume O +all O +available O +width O +and O +height O +of O +container O +. O +UPDATE O +From O +the O + +comments O +: O +Question O +#1 O +: O +The O +keys O +in O +the O +first O +sub-section O +container O +( O +containing O +.long B-Data_Type +) O +are O +sized O +with O +flex B-Code_Block +: I-Code_Block +1 I-Code_Block +0 I-Code_Block +33.33 I-Code_Block +% I-Code_Block +. O +This O +is O +shorthand O +for O +flex-grow B-Code_Block +: I-Code_Block +1 I-Code_Block +, O +flex-shrink B-Code_Block +: I-Code_Block +0 I-Code_Block +, O +and O +flex-basis B-Code_Block +: I-Code_Block +33.33 I-Code_Block +% I-Code_Block +. O +For O +the O +.long B-Variable +key O +we O +are O +simply O +overriding O +the O +flex-basis B-Variable +component O +with O +66.67 B-Value +% I-Value +. O +( O +there O +'s O +no O +need O +to O +re-declare O +the O +other O +two O +components O +) O +. O +Also O +, O +there O +'s O +really O +no O +difference O +in O +this O +case O +between O +width B-Variable +and O +flex-basis B-Variable +, O +but O +since O +we O +'re O + +overriding O +flex-basis B-Variable +, O +I O +used O +flex-basis B-Variable +. O +Using O +width B-Variable +would O +leave O +the O +original O +flex-basis B-Variable +: O +33.33 B-Value +% O +intact O +, O +creating O +two O +width B-Variable +rules O +which O +may O +, O +therefore O +, O +fail O +to O +expand O +the O +.long B-Variable +key O +, O +depending O +on O +which O +rule O +prevails O +in O +the O +cascade O +. O +For O +a O +complete O +explanation O +of O +flex-basis B-Variable +vs O +. O +width B-Variable +, O +see O +What O +are O +the O +differences O +between O +flex-basis B-Variable +and O +width B-Variable +? O +Question O +#2 O +: O +Because O +the O +initial O +value O +of O +the O +flex-grow B-Variable +component O +is O +0 B-Value +( O +source B-Variable +) O +. O +The O +following O +query O +returns O +the O +error O +: O +Why O +cant O +the O + +subquery O +use O +the O +variable O +from O +the O +parent O +query O +in O +this O +case O +? O +I O +have O +tried O +various O +combinations O +to O +try O +and O +fix O +this O +, O +but O +have O +had O +no O +luck O +so O +far O +. O +You O +should O +consider O +the O +following O +part O +of O +the O +select O +as O +if O +you O +'re O +defining O +another O +Table B-Data_Structure +( O +that O +you O +call O +x B-Variable +) O +: O +when O +this O +Table B-Data_Structure +is O +defined O +, O +which O +a.Lat B-Variable +should O +be O +used O +? O +The O +way O +to O +fix O +it O +is O +have O +the O +" O +outer O +" O +query O +run O +, O +and O +use O +its O +results O +when O +you O +run O +the O +second O +query O +on O +AWE_Propvids B-Variable +. O +It O +should O +look O +something O +like O +: O +Q B-Variable +: O +Why O +cant O +the O +subquery O +use O +the O +variable O +from O +the O +parent O + +query O +in O +this O +case O +? O +A O +: O +Because O +that O +subquery O +is O +an O +inline O +view O +. O +MySQL B-Application +will O +run O +that O +query O +and O +create O +a O +temporary O +table B-Data_Structure +, O +the O +" O +derived O +table B-Data_Structure +" O +( O +as O +MySQL B-Application +calls O +it O +) O +is O +a O +row B-Data_Structure +source O +for O +the O +outer O +query O +. O +The O +inline O +view O +query O +has O +to O +be O +run O +before O +the O +query O +that O +references O +it O +. O +A O +correlated O +subquery O +can O +be O +used O +in O +a O +WHERE B-Code_Block +clause O +, O +a O +HAVING B-Code_Block +clause O +, O +an O +IN B-Code_Block +clause O +, O +or O +in O +the O +SELECT B-Code_Block +list I-Code_Block +, O +but O +it O +is O +n't O +valid O +in O +the O +FROM B-Code_Block +clause O +, O +as O +an O +inline O +view O +query O +. O +I O +have O +a O +panel B-User_Interface_Element +that O +contains O +a O + +checkboxTree B-Class +, O +I O +populate O +the O +tree B-Data_Structure +when O +open O +the O +panel B-User_Interface_Element +, O +the O +problem O +is O +when O +i O +have O +to O +much O +items O +to O +be O +selected O +in O +the O +checkboxtree B-Class +( O +about O +4000 O +) O +the O +panel B-User_Interface_Element +take O +a O +long O +time O +to O +open O +. O +this O +is O +my O +code O +: O +checkBoxTree.getCheckBoxTreeSelectionModel().setDigIn(true) B-Function +; I-Function +any O +suggestions O +will O +be O +welcomed O +:) O +, O +Now O +that O +the O +JQM B-Application +1.1 B-Version +RC O +is O +out O +, O +I O +would O +like O +to O +migrate O +my O +1.0 B-Version +mobile B-Device +app O +to O +this O +1.1 B-Version +version O +. O +How O +can O +I O +do O +that O +? O +Do O +I O +have O +to O +replace O +every O +file O +or O + +just O +some O +specific O +files O +? O +What O +should O +be O +my O +migration O +path O +? O +Edit O +: O +I O +plan O +to O +use O +my O +app O +using O +PhoneGap B-Application +, O +which O +means O +, O +that O +I O +will O +want O +to O +have O +all O +resources O +locally O +, O +so O +no O +external O +references O +. O +Adjust O +your O +jqm B-File_Type +css B-File_Type +and O +js B-Language +references O +. O +Also O +, O +you O +'ll O +need O +jquery B-Library +1.7.1 B-Version +I O +have O +a O +small O +issue O +but O +I O +have O +been O +battling O +for O +two O +days O +now O +to O +resolve O +it O +. O +I O +have O +recently O +recreated O +a O +new O +category O +( O +www.site.co.za/mens-clothing-3 O +) O +which O +is O +populated O +and O +working O +. O +I O +want O +to O + +redirect O +( O +www.site.co.za/mens-clothing B-Value +) O +to O +the O +new O +category O +( O +www.site.co.za/mens-clothing-3 B-Value +) O +. O +I O +have O +tried O +implementing O +the O +following O +in O +the O +htacess B-File_Type +file O +, O +but O +nothing O +happens O +. O +The O +old O +category O +links O +( O +mens-clothing O +) O +goes O +obviosuly O +now O +to O +a O +404 B-Error_Name +and O +it O +is O +still O +being O +picked O +up O +by O +Google B-Website +( O +main O +concern O +) O +. O +My O +htaccess B-File_Type +rule O +looks O +like O +this O +: O +You O +could O +use O +magento B-Application +url B-Function +redirect I-Function +instead O + +http://www.magentocommerce.com/wiki/modules_reference/english/mage_adminhtml/urlrewrite/index O +:) O +Can O +i O +achieve O +a O +many-to-many O +relationship O +without O +using O +a O +junction B-Data_Structure +table B-Data_Structure +with O +the O +below O +2 O +tables B-Data_Structure +? O +Airports B-Class +table B-Data_Structure +: O +Aeroplanes B-Variable +Table B-Data_Structure +If O +not O +then O +why O +? O +Well O +, O +yes O +you O +can O +, O +but O +you O +shouldn't O +! O +Without O +an O +extra O +relation O +, O +you O +would O +need O +a O +copy O +of O +the O +whole O +entry O +. O +So O +in O +your O +case O +: O +every O +airport B-Class +has O +zero O +( O +or O +one O +) O +or O +more O +planes B-User_Interface_Element +. O +And O +every O +plane B-User_Interface_Element +was O +at O +one O +or O +more O +airports B-User_Interface_Element + +. O +When O +saving O +this O +in O +one O +relation O +your O +data O +will O +look O +like O +this O +: O +( O +and O +similar O +for O +the O +areoplanes B-Variable +table B-Data_Structure +) O +This O +would O +cause O +some O +problems O +in O +your O +DB O +: O +The O +Primary B-Variable +Key I-Variable +for O +airport B-Variable +is O +n't O +unique O +anymore O +You O +will O +need O +to O +maintain O +a O +lot O +of O +copies O +of O +your O +data O +and O +make O +sure O +that O +you O +update O +all O +of O +them O +! O +So O +the O +better O +table B-Data_Structure +design O +in O +your O +scenario O +would O +be O +Where O +in O +airports_and_planes B-Variable +: O +both O +fields O +are O +foreign O +keys O +to O +their O +repsective O +tables B-Data_Structure +both O +fields O +form O +the O +primary B-Variable +key I-Variable +together O +! O +We O +'re O +hosting O +the O +script O +in O +out O +app O +. O +On O +exceptions/crashes B-Class + +, O +we O +'d O +like O +to O +see O +the O +line O +number O +in O +the O +stacktrace O +. O +I O +ca O +n't O +find O +if O +there O +is O +a O +setting O +to O +include O +debug O +info O +when O +setting O +up O +the O +CSScript B-Application +compiler I-Application +? O +I O +believe O +you O +mean O +CS-Script B-Application +( O +if O +not O +please O +correct O +me O +) O +. O +I O +am O +not O +sure O +how O +you O +are O +calling O +it O +but O +I O +did O +find O +this O +command B-Application +line I-Application +documentation O +( O +it O +seems O +that O +the O +position O +in O +their O +help O +file O +is O +not O +reflected O +in O +their O +URL O +, O +you O +need O +to O +navigate O +to O +Overview O +-> O +Command-line B-Application +interface O +) O +. O +With O +.net B-Application +the O +line O +number O +is O +included O +in O +the O +stack O +trace O +if O +you O +have O +a O +corresponding O + +.pdb B-File_Type +file O +and O +the O +line O +number O +will O +also O +be O +correct O +if O +there O +is O +no O +optimization O +done O +at O +compile O +time O +( O +this O +should O +not O +be O +a O +problem O +for O +CS-Script B-Application +) O +. O +In O +the O +documentation O +for O +cscs.exe B-File_Name +there O +is O +a O +switch O +/dbg B-File_Name +or O +/d B-File_Name +. O +When O +you O +include O +this O +switch O +the O +corresponding O +.pdb B-File_Type +file O +will O +be O +included O +with O +your O +.exe B-File_Type +( O +or O +with O +the O +.dll B-File_Type +if O +building O +a O +library O +) O +. O +Once O +you O +have O +both O +files O +line O +numbers O +will O +now O +be O +available O +in O +the O +stack O +trace O +of O +any O +given O +exception B-Class +that O +hits O +an O +operation O +in O +that O +assembly O +. O +Assume O +we O +have O +a O +file O + +called O +Test.cs B-File_Name +with O +some O +test O +code O +: O +This O +will O +output O +2 O +files O +: O +Test.exe B-File_Name +Test.pdb B-File_Name +Here O +is O +the O +sample O +content O +of O +Test.cs B-File_Name +, O +when O +you O +execute O +it O +you O +will O +see O +the O +line O +numbers O +. O +For O +Executing O +inline O +This O +should O +also O +be O +possible O +with O +the O +DebugBuild B-Code_Block +flag O +in O +the O +EvaluatorConfig B-Variable +section O +set O +to O +true O +. O +In O +my O +example O +below O +you O +will O +get O +everything O +expected O +BUt B-Application +when O +using O +LoadCode B-Function +it O +uses O +a O +temporary O +file O +name O +so O +the O +file O +name O +looks O +funny O +although O +the O +line O +number O +is O +correct O +. O +There O +are O +also O +LoadXXX B-Code_Block +commands O +for O +loading O +one O +or O +more O +files O +which O +will O +give O +a O + +prettier O +stack O +trace O +as O +the O +file O +name O +is O +now O +known O +. O +I O +did O +test O +this O +all O +to O +ensure O +that O +it O +does O +work O +. O +If O +you O +have O +problems O +just O +let O +me O +know O +. O +I O +have O +cells B-User_Interface_Element +that O +have O +an O +if B-Code_Block +statement O +linked O +to O +a O +different O +sheet B-User_Interface_Element +using O +importrange B-Code_Block +. O +However O +, O +when O +the O +status O +changes O +to O +" B-Value +YES I-Value +" O +on O +my O +sheet B-User_Interface_Element +, O +the O +onedit B-Library +script O +which O +logs O +time O +and O +date O +does O +not O +run O +. O +However O +when O +I O +manually O +type O +" O +YES B-Value +" O +the O +script O +successfully O +logs O +time O +and O +date O +. O +Is O +there O +a O +workaround O +or O +an O +alternative O +to O +onEdit B-Class +to O +make O +this O +work O +? O +OnEdit B-Class +trigger O +does O +n't O +care O +if O +value O +, O + +returned O +by O +formula O +, O +changes O +. O +It O +will O +react O +only O +if O +different O +value O +or O +formula O +will O +be O +entered O +. O +You O +may O +use O +Time-driven O +triggers O +. O +I O +have O +the O +following O +content O +below O +in O +a O +file O +: O +I O +have O +use O +vim B-Code_Block +/text I-Code_Block +\n[\t].\n[\t] I-Code_Block +and O +the O +" O +text B-Value +" O +word O +and O +the O +left O +parentheses O +was O +highlighted O +. O +But O +when O +I O +use O +egrep B-Code_Block +' B-Code_Block +text I-Code_Block +\n[\t].\n[\t] I-Code_Block +' B-Code_Block +there O +is O +NO O +output O +. O +Just O +wondering O +how O +can O +I O +grep B-Function +until O +the O +right O +parentheses O +. O +Thank O +you O +. O +Instead O +of O +egrep B-Function + +you O +can O +use O +sed B-Code_Block +. O +sed B-Code_Block +-n I-Code_Block +' I-Code_Block +/ I-Code_Block +^ I-Code_Block +text/ I-Code_Block +, I-Code_Block +/ I-Code_Block +^($/p I-Code_Block +' I-Code_Block +yourfile O +will O +print O +all O +lines O +starting O +from O +where O +text B-Value +is O +found O +until O +the O +( B-Value +is O +found O +at O +the O +beginning O +of O +a O +line O +. O +If O +you O +know O +how O +long O +the O +sample O +is O +going O +to O +be O +, O +you O +can O +use O +the O +After B-Code_Block +flag O +, O +using O +-AN B-Code_Block +where O +N B-Variable +is O +the O +number O +of O +lines O +after O +the O +match O +you O +want O +to O +grab O +. O +is O +there O +any O +free O +tool O +to O +read O +excel B-Application +without O +using O +Excel B-Application +Interop I-Application +. O +I O +am O +creating O +a O +website O +using O +Visual B-Application +studio I-Application +2010 B-Version +, O +and O +I O +am O +using O +c# B-Language +and O +asp B-Language +. O +I O +cant O +install O +any O +software O + +on O +server B-Application +so O +I O +want O +to O +use O +some O +third O +party O +free B-Application +tool O +. O +I O +read O +the O +file O +and O +have O +to O +use O +the O +contents O +to O +update O +the O +db O +, O +. O +I O +want O +to O +read O +Both O +XLSX B-File_Type +and O +XLS B-File_Type +Need O +some O +suggestions O +for O +that O +. O +Thanks O +There O +are O +many O +options O +to O +read/edit/create O +Excel B-File_Type +files O +without O +Interop B-Application +: O +MS B-Application +provides O +the O +free O +OpenXML B-Library +SDK I-Library +V B-Version +2.0 B-Version +- O +see O +http://msdn.microsoft.com/en-us/library/bb448854%28office.14%29.aspx O +( O +XLSX B-File_Type +only O +) O +This O +can O +read+write O +MS B-Application +Office I-Application +files O +( O +including O + +Excel B-Application +) O +. O +Another O +free O +option O +see O +http://www.codeproject.com/KB/office/OpenXML.aspx O +( O +XLSX B-File_Type +only O +) O +IF O +you O +need O +more O +like O +handling O +older O +Excel B-Application +versions O +( O +like O +XLS B-File_Type +, O +not O +only O +XLSX B-File_Type +) O +, O +rendering O +, O +creating O +PDFs B-File_Type +, O +formulas O +etc O +. O +then O +there O +are O +different O +free O +and O +commercial O +libraries O +like O +ClosedXML B-Library +( O +free O +, O +XLSX B-File_Type +only O +) O +, O +EPPlus B-Library +( O +free O +, O +XLSX B-File_Type +only O +) O +, O +Aspose.Cells B-Library +, O +SpreadsheetGear B-Library +, O +LibXL B-Library +and O +Flexcel B-Library +etc O +. O +BTW O +: O +Interop O + +is O +not O +supported O +in O +sever-scenarios O +by O +MS O +. O +I O +used O +ExcelDataReader B-Library +on O +a O +recent O +project O +, O +worked O +great O +for O +reading O +the O +XLS/XLSX B-File_Type +files O +. O +Excel B-Library +Data I-Library +Reader I-Library +Can O +someone O +explain O +me O +why O +this O +is O +happening O +? O +Silverlight B-Library +4 B-Version +application O +using O +WCF B-Library +Ria I-Library +Services I-Library +SL B-Function +app O +calls O +StartLongOperation B-Function +[ O +Invoke O +] O +operation O +. O +Due O +to O +synchronization B-Error_Name +issues O +with O +external O +components O +there O +is O +a O +Thread.Sleep B-Function +( I-Function +30 I-Code_Block +* I-Code_Block +1000 I-Code_Block +) O +in O +the O +server-side B-Application +code O +. O +SL B-Function +app O +calls O +GetStatus B-Function +( O +standard O +query O +) O +operation O +. O +These O +calls O +appear O +to O +be O +blocked O + +server-side B-Application +and O +are O +waiting O +for O +the O +StartLongOperation B-Function +to O +complete O +. O +Why O +? O +? O +I O +was O +assuming O +that O +serverside B-Application +, O +the O +StartLongOperation B-Function +runs O +an O +a O +worker O +thread O +and O +each O +call O +to O +GetStatus B-Function +would O +run O +on O +a O +seperate O +worker O +thread O +. O +Client-side B-Application +the O +calls O +are O +async O +so O +SL B-Library +fires O +off O +the O +StartLongOperation B-Function +and O +then O +continues O +to O +poll O +the O +GetStatus B-Class +. O +But O +the O +GetStatusCompleted B-Function +does O +n't O +get O +fired O +until O +the O +StartLongOperation B-Function +has O +completed O +. O +Since O +all O +Silverlight B-Library +network O +communication O +happens O +on O +the O +UI O +thread O +, O +only O +one O +WCF B-Library +call O +can O +happen O +at O +a O +time O +. O +Meaning O +your O + +StartLongOperation B-Function +has O +to O +complete O +, O +and O +then O +the O +client B-Application +will O +start O +the O +GetStatus B-Function +call O +. O +If O +you O +want O +to O +test O +this O +behavior O +, O +fire O +up B-Application +Fiddler B-Application +. O +You O +will O +find O +that O +Silverlight B-Application +will O +not O +send O +an O +HTTP O +request O +to O +the O +GetStatus B-Function +method O +until O +it O +first O +gets O +a O +StartLongOperation B-Function +response O +from O +the O +server B-Application +. O +So O +the O +problem O +is O +n't O +server-side B-Application +. O +It O +'s O +a O +limitation O +of O +Silverlight B-Application +. O +I O +want O +to O +retrieve O +two O +columns B-Data_Structure +from O +database O +namely O +system_name B-Variable +and O +arrival_time B-Variable +and O +display O +these O +in O +tabular O +format O +. O +Now O +along O +with O +these O +two O +columns B-Data_Structure +, O +I O +want O +to O +display O +a O +third O +column B-Data_Structure +which O +will O +represent O + +the O +number O +of O +times O +system_name B-Variable +appears O +in O +the O +table B-Data_Structure +. O +I O +'m O +using O +sql B-Application +server I-Application +2012 B-Version +and O +for O +display O +I O +use O +JSP B-Application +AND I-Application +JSTL B-Application +. O +I O +tried O +to O +write O +code O +for O +displaying O +two O +columns B-Data_Structure +, O +but O +the O +output O +shows O +only O +the O +last O +data O +entries O +. O +The O +java B-Language +code O +is O +: O +Jsp B-Library +code O +is O +: O +I O +have O +an O +event O +listener O +on O +a O +button B-User_Interface_Element +. O +The O +button B-User_Interface_Element +is O +inside O +div B-HTML_XML_Tag +div1 I-HTML_XML_Tag +. O +When O +I O +click O +on O +another O +button B-User_Interface_Element +, O +I O +make O +the O +div1 B-HTML_XML_Tag +position:absolute O +. O +However O +, O +the O +event O +listener O +on O +the O +button B-User_Interface_Element +disappears O +. O +When O +I O +click O +on O +the O +button B-User_Interface_Element +, O +nothing O +happens O +. O +Does O + +anyone O +know O +why O +this O +is O +happening O +or O +how O +I O +can O +debug O +it O +? O +I O +have O +a O +directory O +on O +network B-Device +drive O +with O +million O +of O +files O +. O +If O +I O +try O +to O +read O +it O +with O +it O +will O +take O +a O +lot O +of O +time O +until O +resulting O +array B-Data_Structure +will O +be O +filled O +with O +files O +. O +I O +would O +like O +to O +receive O +files O +by O +one O +and O +printout O +a O +progress O +. O +How O +can O +I O +do O +this O +in O +Java B-Language +? O +You O +might O +try O +with O +DirectoryStream B-Class +: O +You O +can O +also O +make O +the O +DirectoryStream B-Class +filter O +files O +for O +you O +if O +you O +need O +to O +: O +all O +you O +need O +to O +do O +is O +add O +a O +parameter O +to O +the O +Files.newDirectoryStream B-Function +call O +: O +You O +can O +use O +the O +NIO.2 B-Library +API I-Library + +: O +How O +can O +I O +iterate O +through O +each O +of O +these O +hidden O +fields O +and O +change O +each O +one O +'s O +value O +with O +JQuery B-Library +? O +You O +can O +do O +it O +by O +combining O +:hidden O +selector O +and O +attribute O +starts O +with O +selector B-HTML_XML_Tag +, O +DEMO O +To O +make O +sure O +that O +the O +ID B-Variable +not O +change O +use O +also O +the O +ClientIDMode B-Code_Block += I-Code_Block +" I-Code_Block +Static I-Code_Block +" I-Output_Block +on O +each O +control B-Class +. O +The O +ID B-Variable +can O +change O +if O +you O +place O +that O +code O +on O +any O +page B-User_Interface_Element +that O +use O +any O +master O +page B-User_Interface_Element +, O +or O +is O +inside O +any O +custom O +control B-Class +. O +So O +your O +control O +must O +be O +: O +I O +'m O +facing O +an O +issue O +installing O +angular-cli B-Library +locally O +. O +I O +'m O +on O +Ubuntu B-Operating_System +16.04.2 B-Version +LTS O +with O +following O +versions O +of O + +node.js B-File_Name +and O +npm B-Application +: O +I O +tried O +to O +install O +angluar-cli B-Library +using O +the O +following O +command O +: O +this O +worked O +fine O +and O +completed O +with O +following O +warnings O +: O +Now O +when O +I O +'m O +trying O +' O +ng B-Code_Block +' O +command O +: O +npm B-Code_Block +install I-Code_Block +@angular B-Code_Block +/cli I-Code_Block +@latest B-Code_Block +will O +not O +install O +angular-cli B-Library +globally O +but O +it O +works O +for O +you O +user O +. O +I O +resolve O +this O +problem O +by O +learning O +this O +article O +: O +Fixing O +npm B-Application +permissions O +I O +'m O +creating O +a O +word O +game O +in O +Java B-Language +for O +practice O +. O +I O +'ve O +got O +a O +txt B-File_Type +file O +containing O +all O +the O +four-letter O +words O +in O +the O +English O +language O +. O +They O +are O +length-delimited O +, O + +i.e O +. O +every O +4th O +character B-Data_Type +starting O +from O +the O +1st O +is O +the O +first O +letter O +of O +a O +word O +. O +What O +is O +a O +good O +way O +to O +go O +about O +checking O +to O +see O +if O +a O +word O +exists O +in O +the O +dictionary B-Data_Structure +? O +You O +can O +read O +the O +file O +into O +a O +TreeSet B-Class +then O +use O +the O +contains B-Function +method O +. O +For O +a O +Set B-Class +contains O +runs O +in O +constant O +time O +. O +I O +have O +added O +a O +.toUpperCase() B-Function +conversion O +so O +that O +there O +are O +no O +case O +related O +issues O +, O +this O +can O +easily O +be O +a O +.toLowerCase() B-Function +also O +. O +I O +'d O +like O +to O +sum O +minutes O +up O +in O +Excel B-Application +, O +and O +show O +the O +resulting O +hours O +. O +Currently O +if O +for O +example O + +, O +I O +sum O +0.45 B-Value ++ O +0.45 B-Value +, O +I O +get O +90 B-Value +. O +I O +should O +get O +1.30 B-Value +. O +Is O +this O +possible O +? O +You O +need O +TimeSerial B-Application +: O +As O +i O +mentioned O +on O +the O +question O +title O +, O +I O +want O +to O +know O +the O +best O +approach O +to O +get O +this O +to O +work O +and O +i O +'ll O +need O +and O +example O +( O +very O +simple O +one O +as O +the O +follow O +: O +) O +Let O +'s O +say O +i O +have O +an O +API B-Library +which O +has O +1 O +controller B-Class +and O +1 O +action O +for O +example O +simplicity O +and O +inside O +the O +index B-Function +action O +i O +have O +Then O +i O +have O +another O +rails B-Library +app O +which O +will O +work O +for O +front-end O +rendering O +How O +can O +i O +pass O +this O +@date B-Variable +as O +JSON B-File_Type +from O +the O +API B-Library +to O +the O +other O +app O + +to O +render O +it O +? O +Should O +i O +have O +same O +controller O +on O +the O +other O +app O +? O +How O +can O +i O +connect O +and O +send O +http O +request O +and O +receive O +response O +? O +Thanks O +in O +advance O +For O +such O +a O +simple O +example O +, O +you O +can O +do O +something O +as O +simple O +as O +: O +However O +, O +you O +'re O +most O +likely O +going O +to O +want O +to O +deal O +with O +more O +complicated O +JSON B-File_Type +responses O +, O +so O +before O +long O +you O +'ll O +probably O +want O +to O +use O +something O +like O +the O +Jbuilder B-Class +gem I-Library +or O +ActiveModel B-Class +Serializers I-Class +( O +my O +preferred O +approach O +) O +. O +On O +the O +other O +end O +, O +your O +front-end O +will O +need O +to O +make O +an O +HTTP O +GET B-Function +request O +. O +Lots O +of O +ways O +( O +and O +gems B-Application +) O +to O +do O +this O +, O +but O +one O +common O + +approach O +is O +just O +to O +use O +the O +built O +in O +Net::HTTP B-Class +class O +. O +In O +your O +situation O +, O +a O +better O +approach O +might O +be O +to O +use O +the O +Active B-Class +Resource I-Class +gem O +. O +This O +gem O +allows O +you O +to O +create O +models O +that O +are O +backed O +by O +a O +REST B-Library +API I-Library +rather O +than O +a O +database O +. O +For O +example O +, O +if O +your O +API B-Library +app O +provides O +basic O +Create-Read-Update-Destroy O +actions O +for O +a O +particular O +model O +( O +let O +'s O +call O +it O +Widget B-Class +) O +at O +the O +following O +URLs O +: O +then O +in O +your O +front-end O +app O +you O +could O +declare O +an O +Active B-Class +Resource I-Class +like O +this O +: O +which O +will O +auto-magically O +access O +all O +of O +those O +methods O +in O +your O +API B-Library +, O +and O +behave O +much O + +like O +a O +regular O +Active B-Class +Record I-Class +model O +. O +That O +way O +, O +you O +basically O +design O +your O +front-end O +app O +like O +a O +" O +normal O +" O +rails B-Library +app O +, O +but O +using O +ActiveResource-based B-Class +models O +in O +place O +of O +ActiveRecord B-Class +. O +I O +would O +note O +, O +however O +, O +that O +a O +more O +common O +thing O +to O +do O +these O +days O +would O +be O +to O +build O +your O +API O +in O +Rails B-Library +, O +and O +build O +your O +front-end O +with O +client-side B-Application +Javascript B-Language +, O +using O +something O +like O +JQuery B-Library +or O +Angular B-Library +to O +make O +requests O +from O +the O +API O +. O +I O +'m O +not O +sure O +what O +you O +'re O +gaining O +by O +splitting O +API B-Library +and O +front-end O +, O +where O +both O +of O +them O +are O +Rails B-Library +apps O +- O +unless O +you O +'ve O + +got O +a O +compelling O +reason O +, O +I O +'d O +just O +build O +one O +Rails B-Library +app O +that O +handles O +both O +API B-Library +and O +front-end O +, O +or O +build O +a O +Rails B-Library +API I-Library ++ O +Angular B-Library +( O +or O +similar O +) O +front-end O +. O +I O +am O +able O +to O +set O +up O +AWS B-Library +WorkMail I-Library +to O +receive O +and O +send O +email O +using O +custom O +domain O +e.g O +. O +john@mycompany.com B-User_Name +Now O +I O +'d O +like O +to O +allow O +our O +users O +to O +login O +and O +access O +emails O +at O +https://mail.mycompany.com O +( O +instead O +of O +the O +AWS B-Application +provided O +access O +url O +https://mycompany.awsapps.com O +) O +. O +The O +document O +I O +can O +find O +seems O +only O +handle O +my O +first O +case O +( O + +which O +is O +already O +done O +) O +. O +Thanks O +Create O +a O +sub-domain O +" B-Value +mail.mycompany.com B-Value +" O +and O +redirect O +it O +to O +" B-Value +mycompany.awsapps.com I-Value +" I-Value +. O +I O +resolved O +this O +by O +using O +the O +built-in O +CloudFront B-Application +interface O +. O +I O +admit O +the O +documentation O +on O +this O +is O +pretty O +poor O +, O +but O +the O +aim O +behind O +it O +is O +to O +get O +people O +to O +pay O +for O +this O +redirection O +. O +To O +have O +your O +mywebmail.mydomain.com O +mapped O +into O +myaws.awsapps.com/workmail O +then O +please O +follow O +the O +steps O +below O +: O +1) O +You O +might O +have O +done O +this O +step O +already O +: O +On O +your O +DNS B-Application +server I-Application +( O + +where O +that O +is O +) O +, O +create O +a O +CNAME O +to O +map O +mywebmail.mydomain.com O +into O +myaws.awsapps.com O +2) O +Login O +into O +your O +CloudFront B-Application +interface O +https://console.aws.amazon.com/cloudfront/ O +3) O +Click O +on O +" O +Create O +Distribution O +" O +4) O +On O +the O +Origin-Domain O +put O +myaws.awsapps.com O +5) O +On O +the O +Origin-URI O +put O +/workmail B-File_Name +6 O +) O +Adjust O +the O +setting O +to O +what O +you O +like O +such O +as O +redirecting O +from O +HTTP O +into O +HTTPS O +or O +use O +as-is O +etc O +. O +7 O +) O +Scroll O +down O +to O +the O +CNAME B-Variable +and O +enter O +the O +aliases O +you O +need O +, O +for O + +this O +example O +you O +need O +to O +put O +in O +mywebmail.mydomain.com O +8 O +) O +Save O +9 O +) O +Notice O +that O +this O +might O +take O +a O +while O +to O +get O +created O +, O +mine O +took O +about O +30 O +minutes O +to O +complete O +, O +also O +every O +time O +I O +needed O +to O +edit O +something O +it O +would O +take O +around O +10-20 O +minutes O +to O +complete O +. O +10 O +) O +Once O +done O +, O +browse O +your O +mywebmail.mydomain.com O +, O +your O +CNAME B-Variable +on O +your O +original O +DNS O +( O +step O +1 O +above O +) O +should O +ask O +your O +browser B-Application +to O +redirect O +and O +then O +with O +AWS B-Application +CloundFront I-Application +setting O +it O +would O +add O +the O +URI O +afterwards O +, O +1 O +1) O +If O +you O +get O +a O +blank O +page O +, O +then O + +check O +your O +headers O +, O +in O +particular O +( O +? B-Code_Block +organization I-Code_Block += I-Code_Block +YourDomainName I-Code_Block +) O +, O +you O +might O +need O +to O +manually O +add O +it O +there O +from O +the O +behaviours O +menu B-User_Interface_Element +of O +the O +item O +you O +created O +above O +. O +I O +hope O +this O +helps O +Kind O +Regards O +Heider B-User_Name +Sati I-User_Name +I O +was O +wondering O +if O +something O +like O +this O +, O +is O +safe O +in O +Zend B-Application +: O +I O +'m O +not O +checking O +the O +content O +of O +$postid B-Variable +is O +here O +. O +Zend B-Application +does O +this O +automatically O +when O +you O +make O +queries O +like O +this O +: O +But O +I O +do O +n't O +like O +this O +way O +of O +working O +, O +just O +writing O +queries O +is O +much O +faster O +for O +me O +. O +So O +should O +I O +be O +manually O +escaping O +or O + +is O +this O +done O +for O +me O +? O +And O +what O +are O +the O +easiest O +ways O +to O +do O +this O +? O +If O +you O +do O +n't O +want O +to O +use O +Zend_Db_Select B-Function +you O +can O +do O +: O +Where O +the O +2nd O +param O +is O +an O +array B-Data_Structure +of O +values O +to O +be O +dropped O +into O +the O +placeholders O +. O +See O +: O +http://framework.zend.com/manual/en/zend.db.statement.html O +Zend B-Library +cannot O +be O +escaping O +your O +variable O +because O +it O +never O +sees O +it O +. O +Your O +variable O +is O +being O +appended O +to O +a O +string B-Data_Type +, O +and O +the O +$ B-Function +db->query I-Function +method O +gets O +to O +see O +the O +string B-Data_Type +as O +a O +whole O +. O +I O +do O +n't O +think O + +that O +the O +query() B-Function +method O +does O +any O +sanitization O +anyway O +. O +I O +have O +a O +folder O +that O +contains O +multiple O +sub-directories O +The O +version O +format O +is O +[ O +major O +] O +. O +[ O +minor O +] O +. O +[ O +update O +] O +[ O +phase O +] O +[ O +build O +] O +, O +like O +1.0.0d0 B-Value +. O +And O +valid O +phases O +are O +d(ev) B-Variable +, O +a(lpha) B-Variable +, O +b(eta) B-Variable +, O +f(inal) B-Variable +, O +please O +note O +d B-Code_Block +< I-Code_Block +a I-Code_Block +< I-Code_Block +b I-Code_Block +< I-Code_Block +f I-Code_Block +. O +I O +'d O +like O +to O +get O +the O +latest O +version O +number O +which O +is O +16.0.0a2 B-Value +using O +batch B-Library +script O +. O +I O +write O +such O +codes O +, O +but O +does O +n't O +work O +, O + +because O +the O +sub-directories O +are O +sorted O +by O +alphabetical O +order O +. O +So O +it O +will O +give O +a O +result O +16.0.0d24 B-Value +. O +The O +following O +script O +does O +what O +you O +want O +: O +The O +basic O +concept O +is O +to O +adapt O +the O +version O +numbers O +so O +that O +( O +alpha O +- O +) O +numeric O +sorting O +provides O +the O +same O +result O +as O +alphabetic O +sorting O +. O +This O +can O +be O +achieved O +by O +adding O +a O +great O +number O +to O +every O +numeric O +part O +of O +the O +version O +numbers O +so O +that O +each O +one O +always O +has O +got O +the O +same O +number O +of O +digits O +. O +In O +addition O +, O +since O +the O +priority O +of O +the O +phase O +figure O +is O +not O +of O +alphabetical O +order O +, O +adequate O +replacements O + +are O +done O +. O +The O +core O +idea O +is O +taken O +from O +this O +answer O +and O +is O +credited O +to O +Aacini B-User_Name +. O +Similar O +code O +to O +the O +one O +posted O +by O +aschipfl B-User_Name +. O +Same O +value O +padding O +approach O +for O +each O +segment O +, O +just O +a O +different O +handling O +of O +name O +splitting O +and O +value O +padding O +. O +Does O +anyone O +know O +how O +to O +use O +a O +" O +like O +" O +or O +" O +contains O +" O +function O +in O +Ampscript B-Language +? O +Example O +: O +GetContent B-Function +where O +name B-Variable +contains O +" O +LOY I-Value +" I-Value +Perhaps O +you O +'re O +looking O +for O +the O +IndexOf() B-Function +function O +? O +BTW O +, O +there O +are O +many O +more O +people O +answering O +SFMC B-Application +questions O +over O +at O +the O +dedicated O +SF B-Application +site O +: O + +http://salesforce.stackexchange.com O +I O +want O +to O +make O +a O +search O +function O +to O +my O +android B-Operating_System +app O +. O +I O +want O +the O +things O +that O +you O +are O +going O +to O +search O +from O +in O +the O +app O +, O +not O +a O +database O +or O +something O +like O +that O +! O +:) O +So O +yeah O +, O +maby O +someone O +could O +link O +me O +a O +tutorial O +or O +something O +? O +:) O +Thanks O +! O +( O +REALLY O +sorry O +for O +bad O +english O +! O +) O +You O +should O +look O +at O +this O +tutorial O +: O +searching O +employees O +and O +this O +one O +from O +android B-Application +developer I-Application +site O +( O +I O +do O +hope O +my O +question O +still O +fits O +into O +what O +is O +allowed O +to O +ask O +here O +) O +Having O +successfully O +developed O +and O +deployed O +iPhone B-Device +applications O + +using O +MonoTouch B-Application +, O +I O +was O +looking O +for O +ways O +to O +do O +it O +for O +OS B-Operating_System +X I-Operating_System +, O +too O +. O +What O +I O +found O +was O +MonoMac B-Application +( O +also O +on O +Github B-Website +) O +which O +looks O +promising O +to O +me O +. O +Since O +most O +stuff O +seems O +to O +be O +from O +2010/2011 O +I O +'m O +unsure O +whether O +this O +is O +still O +up-to-date O +. O +My O +questions O +therefore O +are O +: O +Are O +there O +any O +real-world O +applications O +out O +there O +that O +were O +recently O +successfully O +submitted O +to O +the O +Mac B-Operating_System +OS I-Operating_System +X I-Operating_System +AppStore O +? O +Would O +you O +recommend O +using O +it O +for O +commercial O +projects O +nowadays O +? O +Are O +there O +any O +working O +alternatives O +? O +( O +beside O +learning O +Objective B-Language +C I-Application +, O +which O + +I O +'m O +currently O +doing O +) O +I O +stumbled O +upon O +an O +interesting O +behavior O +in O +the O +Trackbar B-User_Interface_Element +Winforms B-Operating_System +control O +. O +On O +a O +horizontal O +trackbar B-User_Interface_Element +, O +the O +left/right O +arrow B-User_Interface_Element +keys O +work O +as O +expected O +. O +( O +Left O +arrow B-User_Interface_Element +moves O +the O +slider B-User_Interface_Element +to O +the O +left O +and O +decreases O +the O +value O +, O +right O +arrow O +does O +the O +opposite O +) O +It O +is O +also O +possible O +to O +manipulate O +the O +slider B-User_Interface_Element +using O +the O +up/down O +arrow B-User_Interface_Element +keys O +and O +PageUp/PageDown B-Function +. O +However O +, O +the O +behavior O +seem O +counter-intuitive O +: O +arrow B-User_Interface_Element +up O +and O +page B-User_Interface_Element +up O +move O +the O +slider B-User_Interface_Element +to O +the O +left O +and O +consequently O +decrease O +the O +value O +. O +Arrow B-User_Interface_Element +down O +and O +page B-User_Interface_Element +down O +move O + +the O +slider B-User_Interface_Element +to O +the O +right O +and O +increase O +the O +value O +. O +When O +using O +a O +vertical O +trackbar I-User_Interface_Element +, O +up/down O +keys O +work O +as O +expected O +but O +arrow B-Code_Block +left I-Code_Block += I-Code_Block +increase O +and O +arrow B-Code_Block +right I-Code_Block += I-Code_Block +decrease O +. O +This O +is O +the O +default O +behavior O +in O +C# B-Language +Winforms B-Operating_System +, O +and O +apparently O +in O +native O +Windows B-Operating_System +. O +( O +Not O +sure O +about O +the O +latter O +, O +the O +slider B-User_Interface_Element +for O +UAC B-Application +does O +work O +this O +way O +) O +In O +WPF B-Application +the O +slider B-User_Interface_Element +control O +works O +" O +properly O +" O +i.e O +. O +the O +value O +increases O +with O +arrow B-Code_Block +up O +, O +arrow B-Code_Block +right I-Code_Block +und O +PgUp B-Code_Block +. O +Also O +the O +slider B-User_Interface_Element +in O +Internet B-Application +Explorer I-Application +Privacy I-Application +settings O +works O +properly O +. O +Not O +sure O + +why O +, O +but O +I O +suspect O +a O +custom O +handling O +of O +the O +keys O +. O +From O +an O +ergonomics O +standpoint O +, O +it O +is O +clear O +that O +up O +, O +right O +, O +forward O +and O +clockwise O +manipulation O +of O +anything O +is O +supposed O +to O +increase O +the O +value O +. O +( O +This O +nothing O +new O +, O +compare O +A O +Guide O +to O +Human O +Factors O +and O +Ergonomics O +, O +Second O +Edition O +Page O +100 O +) O +Now O +to O +my O +Question O +: O +Does O +anyone O +know O +why O +this O +is O +the O +way O +it O +is O +? O +I O +'m O +strongly O +inclined O +to O +think O +this O +behavior O +was O +chosen O +to O +keep O +the O +trackbar B-User_Interface_Element +control O +consistent O +with O +the O +scrollbar B-User_Interface_Element +control O +. O +These O +two O +controls O +have O +very O +much O + +in O +common O +( O +their O +thumb O +can O +be O +moved O +by O +" O +line O +" O +or O +" O +page B-User_Interface_Element +" O +increments O +, O +both O +controls B-User_Interface_Element +can O +be O +laid O +out O +horizontally O +or O +vertically O +, O +both O +use O +WM_HSCROLL B-Function +and O +WM_VSCROLL B-Function +to O +notify O +their O +parent O +when O +the O +thumb O +position O +changes O +) O +. O +From O +the O +control O +'s O +point O +of O +view O +, O +the O +thumb O +can O +move O +" O +up O +" O +or O +" O +down O +" O +( O +" O +left O +" O +or O +" O +right O +" O +respectively O +) O +. O +The O +keyboard B-Device +navigation O +for O +scrollbars B-User_Interface_Element +used O +Left O +and O +Up O +for O +upwards O +( O +leftwards O +) O +movement O +, O +as O +well O +as O +Right B-Value +and O +Down O +for O + +downwards O +( O +rightwards O +) O +movement O +. O +It O +must O +have O +made O +sense O +for O +the O +trackbar B-User_Interface_Element +control O +to O +follow O +the O +same O +conventions O +, O +so O +developers O +used O +to O +the O +scrollbar B-User_Interface_Element +control O +'s O +implementation O +could O +apply O +the O +same O +principles O +to O +the O +trackbar B-User_Interface_Element +control O +. O +I O +'m O +experimenting O +with O +OrientDB B-Application +and O +I O +would O +like O +to O +model O +a O +non O +disjunctive O +inheritance O +. O +For O +example O +: O +- O +there O +are O +Person B-Variable +- O +a O +Student B-Variable +is O +a O +Person B-Variable +- O +a O +Worker B-Variable +is O +a O +Person B-Variable +- O +" B-Variable +Alberto I-Value +" I-Value +is O +both O +a O +Student B-Variable +and O +Worker B-Variable +. O +Is O +it O +possible O +to O +model O +this O +situation O +with O +only O +the O +three O +classes O +I O +defined O +( O +Student B-Class + +, O +Worker B-Class +, O +Person B-Class +) O +or O +shall O +I O +introduce O +a O +new O +class O +WorkingStudent B-Class +, O +extending O +both O +Worker B-Class +and O +Student B-Class +, O +containing O +" O +Alberto B-Value +" O +? O +I O +suppose O +a O +vertex O +cannot O +be O +instance O +of O +more O +than O +one O +class O +since O +the O +system O +would O +not O +know O +in O +which O +cluster O +to O +put O +it O +but O +I O +have O +n't O +found O +an O +explicit O +answer O +to O +my O +question O +, O +yet O +. O +Cheers O +, O +Alberto B-User_Name +( O +the O +working O +student O +:-) O +) O +I O +think O +you O +may O +trying O +to O +solve O +this O +the O +wrong O +way O +. O +For O +instance O +, O +Alberto B-Variable +will O +presumably O +always O +be O +a O +Person B-Class +. O +But O +when O +Alberto B-User_Name +graduates O +, O +he O +will O +no O +longer O + +be O +a O +Student B-Class +. O +In O +fact O +, O +he O +might O +also O +lose O +his O +job O +and O +no O +longer O +be O +a O +Worker B-Class +. O +Moving O +him O +from O +one O +class O +to O +another O +is O +a O +considerable O +issue O +. O +I O +'d O +create O +separate O +, O +smaller O +nodes O +of O +Worker B-Variable +and O +Student B-Variable +. O +Then O +create O +edges O +from O +Person B-Variable +to O +Worker B-Variable +, O +or O +Person B-Variable +to O +Student B-Variable +. O +The O +edge O +can O +be O +named O +" O +Is B-Value +A I-Value +" O +. O +Now O +, O +it O +is O +very O +easy O +to O +add O +new O +categories O +, O +for O +instance O +" O +Parent B-Variable +" O +or O +" O +Spouse B-Variable +" O +, O +without O +having O +to O +worry O +about O +changing O +your O +class O +inheritance O +. O +One O +of O +the O +fantastic O +advantages O +of O +a O +Graph B-Library +database O +.. O + +. O +in O +OrientDb B-Application +a O +vertex B-Class +can O +be O +an O +instance O +of O +multiple O +class O +. O +Use O +this O +command O +Kind O +regards O +. O +I O +am O +getting O +a O +Net::SMTPAuthenticationError B-Error_Name +both O +on O +my O +development O +( O +local O +) O +env O +as O +well O +as O +when O +I O +host O +on O +Heroku B-Application +, O +when O +I O +try O +to O +send O +mails O +from O +my O +rails B-Library +application O +. O +This O +started O +after O +sending O +the O +first O +couple O +of O +email O +( O +2 O +mails O +to O +be O +specific O +) O +. O +All O +research O +so O +far O +made O +me O +think O +that O +this O +should O +could O +be O +due O +to O +having O +a O +2-factor O +auth O +enabled O +on O +the O +gmail B-Website +account O +, O +but O +when O +I O +checked O +the O +account O +, O +2-factor O +autt O +was O +not O +enabled O + +. O +below O +is O +my O +smtp B-Application +setting O +both O +in O +config/development.rb B-File_Name +and O +config/production.rb B-File_Name +: O +My O +mailer B-Application +is O +set O +up O +as O +follow O +: O +On O +calling O +PushWatir::StackoMailer.success_mail.deliver_now B-Library +! O +, O +I O +get O +the O +following O +error O +: O +What O +could O +be O +causing O +this O +? O +How O +can O +I O +make O +this O +work O +? O +Big O +thanks O +for O +responses O +One O +of O +the O +solutions O +that O +worked O +for O +me O +is O +by O +allowing O +" O +less O +secure O +apps O +" O +from O +my O +google B-Website +account O +. O +Steps O +to O +do O +this O +are O +as O +follow O +: O +- O +From O +your O +Google B-Website +Account O +settings O +, O +find O +" O +Sign O +In O +& O +Security O +" O +-> O +" O + +Allow O +less O +secure O +apps O +" O +, O +enable O +it O +. O +Reference O +- O +https://support.google.com/accounts/answer/6010255 O +I O +am O +currently O +building O +a O +module O +for O +an O +ecommerce O +website O +( O +Lemonstand B-Application +) O +. O +My O +shop O +sells O +both O +normal O +books O +and O +ebooks B-Device +, O +and O +charge O +different O +rates O +of O +for O +shipping O +based O +on O +the O +subtotal O +of O +all O +items O +in O +the O +cart O +( O +$7 B-Variable +shipping O +cost O +for O +subtotal O +of O +less O +than O +$20 B-Variable +, O +$14 B-Variable +shipping O +cost O +for O +between O +$20 B-Value +and O +$ B-Variable +50 I-Value +.. O +etc O +) O +. O +Currently O +the O +website O +just O +uses O +the O +subtotal O +of O +all O +items O +in O +the O +cart O +to O +determine O + +which O +rate O +should O +be O +applied O +. O +The O +problem O +is O +, O +I O +want O +only O +the O +subtotal O +of O +normal O +books O +to O +be O +used O +for O +calculating O +shipping O +, O +because O +obviously O +ebooks B-Variable +do O +n't O +need O +shipping O +. O +Lemonstand B-Application +platform O +has O +some O +built_in O +functions O +that O +I O +'m O +using O +to O +help O +with O +this O +. O +update_shipping_quote B-Function +function O +is O +called O +just O +before O +shipping O +cost O +is O +calculated O +. O +It O +will O +be O +used O +to O +change O +the O +subtotal O +of O +cart O +items O +so O +that O +shipping O +cost O +can O +be O +calculated O +using O +the O +subtotal O +of O +non-ebooks O +instead O +. O +Here O +is O +the O +API B-Library +documentation O +for O +the O +function O +: O + +https://v1.lemonstand.com/api/event/shop:onupdateshippingquote/ O +Here O +is O +the O +bit O +of O +code O +that O +'s O +giving O +me O +trouble O +. O +I O +want O +to O +know O +if O +the O +value O +I O +get O +at O +the O +end O +($non_ebook_subtotal) O +actually O +contains O +the O +value O +it O +'s O +supposed O +to O +. O +If O +anyone O +can O +come O +up O +with O +a O +better O +method O +for O +doing O +what O +I O +'m O +trying O +to O +do O +, O +please O +share O +. O +public B-Code_Block +function I-Code_Block +update_shipping_quote I-Code_Block +( I-Code_Block +$shipping_option I-Code_Block +, I-Code_Block +$params I-Code_Block +) I-Code_Block +{ I-Code_Block +Thanks O +I O +want O +to O +execute O +a O +function O +that O +is O +sent O +over O +AJAX B-Function +request O + +from O +the O +server B-Application +. O +The O +function O +body O +is O +n't O +in O +the O +calling O +page O +. O +For O +example O +: O +( O +the O +complete O +code O +is O +given O +below O +) O +1.calling O +PHP B-Language +script O +: O +2.ajax_js2.php O +script B-HTML_XML_Tag +: O +I O +know O +putting O +the O +function O +definition O +of O +" O +test B-Variable +" O +in O +the O +calling O +script O +will O +do O +. O +But O +I O +want O +to O +keep O +it O +in O +the O +second O +script.What B-HTML_XML_Tag +should O +I O +do O +? O +The O +server B-Application +returns O +the O +span B-HTML_XML_Tag +as O +a O +response O +to O +the O +client B-Application +. O +While O +clicking O +upon O +the O +span B-HTML_XML_Tag +" O +Test B-Code_Block +AJAX I-Value +" O +the O +function O +should O +be O +called O +. O +