Posts

java - Grails app terminates after giving exception -

this strange application stops working after sometime , throws error. below details same. any worth os : ubuntu0.14.04.1 java version : open jdk 7 grails version : 2.4.5 application type : rest application error / exception missing exception handler pc 0x00007fa0613a429c , handler bci -1 exception: java.lang.stackoverflowerror - klass: 'java/lang/stackoverflowerror' compiled exception table : exceptionhandlertable (size = 288 bytes) catch_pco = 344 (1 entries) bci -1 @ scope depth 0 -> pco 1329 catch_pco = 516 (1 entries) bci -1 @ scope depth 0 -> pco 1523 catch_pco = 532 (1 entries) bci -1 @ scope depth 0 -> pco 1528 catch_pco = 868 (1 entries) bci -1 @ scope depth 0 -> pco 1533 catch_pco = 920 (1 entries) bci -1 @ scope depth 0 -> pco 1535 catch_pco = 944 (1 entries) bci -1 @ scope depth 0 -> pco 1537 catch_pco = 1160 (1 entries) bci -1 @ scope depth 0 -> pco 1465 catch_pco = 1188 (1 entries) bci -1 @ scope dept...

javascript - Getting error while updateing the document using mongoDB and node.js -

i getting following error while updating document using mongodb , node.js. error: typeerror: db.profile.updateone not function @ exports.updateprofile (c:\xampp\htdocs\cit_node\route\route.js:101:13) @ layer.handle [as handle_request] (c:\xampp\htdocs\cit_node\node_modules\e xpress\lib\router\layer.js:95:5) @ next (c:\xampp\htdocs\cit_node\node_modules\express\lib\router\route.js:1 31:13) @ route.dispatch (c:\xampp\htdocs\cit_node\node_modules\express\lib\router\ route.js:112:3) @ layer.handle [as handle_request] (c:\xampp\htdocs\cit_node\node_modules\e xpress\lib\router\layer.js:95:5) @ c:\xampp\htdocs\cit_node\node_modules\express\lib\router\index.js:277:22 @ function.process_params (c:\xampp\htdocs\cit_node\node_modules\express\li b\router\index.js:330:12) @ next (c:\xampp\htdocs\cit_node\node_modules\express\lib\router\index.js:2 71:10) @ immediate.<anonymous> (c:\xampp\htdocs\cit_node\node_modules\express-sess ion\index.js:433:7) ...

Java how to transform functional code into methods -

something awesome object oriented programs can make efficient , quick programming, did not learn how use it. far know basics of how construct programs in script style fashion, never use methods/objects, question how convert code use methods, can learn how this, googled how, watched videos on how still dont understand, need real world examples. here's script style code: string[] studentroster = { "1,john,smith,john1989@gmail.com,20,88,79,59", "2,suzan,erickson,erickson_1990@gmailcom,19,91,72,85", "3,jack,napoli,the_lawyer99yahoo.com,19,85,84,87", "4,erin,black,erin.black@comcast.net,22,91,98,82", "5,adan,ramirez,networkturtle66@gmail.com,24,100,100,100" }; (int k = 0; k < studentroster.length; k++) { string s2 = studentroster[k]; string [] parts2 = s2.split(","); string email2 = parts2[3]; string ...

c++ - Are my variables global? -

hello i've been working on homework , due homework rules im not allowed use global variables. i've made research global variables couldnt realy understand if variables global or local. variables defined in constructor inside class. how header looks like: #include <string> using namespace std; class team{ public: string tcolor; string tname; }; class player{ public: string ppos; string pname; }; class socreg { private: team *teams;// these variables im not sure of player *players;// these variables im not sure of int playernum, teamnum; // these variables im not sure of public: socreg(); ~socreg(); void addteam( string teamname, string color ); void removeteam( string teamname ); void addplayer( string teamname, string playername, string playerposition ); void removeplayer( string teamname, string playername ); void displayallteams(); ...

javascript - Does Firefox 41 have a bug when formatting `new Intl.NumberFormat("es-ES").format(3500)` as `3 500`? -

when trying become familiar support of number formatting in different browsers found firefox 41 formats new intl.numberformat("es-es").format(3500) 3 500 (with space group separator) while ie 11, edge , google chrome give me 3.500 (with dot . group separator). i wondering, bug in firefox? or number format allowed in spanish in spain ambiguous? var d1 = 3500; var eses = new intl.numberformat("es-es"); var formattednumber = eses.format(d1); document.body.insertadjacenthtml('beforeend', '<p>formatted number ' + d1 + ' numberformat ' + eses.resolvedoptions().locale + ' ' + formattednumber + '<\/p>'); i have tried firefox nightly , returns 3.500 instead of 3 500 . searched bugzilla , looks there have been various bug reports related number formatting locale "es-es", https://bugzilla.mozilla.org/show_bug.cgi?id=1013091 , https://bugzilla.mozilla.org/show_bug.cgi?id=1078154 h...

xpages - Want to create an column in Dynamic View Panel that displays "Favorites" icon -

i using dynamic view panel , create "favorites" column in view. underlying view has "favorites" multivalue names field contains users have flagged document favorite. handle conversion in "customizer" bean can compare current user stored vales in "favorites" column , see if in list. if present "green star" icon (not standard notes icon) else present empty star icon. make star icon live if click on star toggle favorite value in database on/off. how implement such feature? what dominoviewcustomizer methods need override? (looking @ aftercreatecolumn) how , set column values? (really lost here) how column display notes resource image (my stars) or need store in directory on server? how make star icon clickable? how capture click event? using domino v9.0.1 if don't have use dynamic view panel here's way of doing work view panel, repeat, or data table... use "favorites" document each user. have con...

php - Transform simple array in hierarchy array -

i'm looping trough below array has multiple entries. in example have 3 elements each element have 3 values inside. [0] ['name'] => 'aaa' ['id'] => 38679 ['parent-id'] => 0 [1] ['name'] => 'bbb' ['id'] => 38830 ['parent-id'] => 38679 [2] ['name'] => 'ccc' ['id'] => 38680 ['parent-id'] => 38830 so, looping trough array, need construct 1 in format (the idea construct hierarchy): [0] [38679] => 'aaa' [38830] => 'bbb' [38680] => 'ccc' maybe there's way this. suggestion great. one of possible solutions use recursive function: $test = [ 0 => [ 'name' => 'aaa', 'id' => 38679, 'parent-id' => 0 ], 1 => [ 'name' => 'bbb', 'id' => ...