Posts

What's the purpose of the command in mongodb? -

i new mongodb , have following query follows "db.runcommand( { addshard : "sf103", maxsize:100000 } );" why using sf103 if use command in environment getting following errors>>> db.runcommand( { addshard : "sf103", maxsize:100000 } ); { "ok" : 0, "errmsg" : "couldn't connect new shard dbconnectionpool: connect failed sf103 : " } > here, sf103 represents what???? please me....... advance thanks, kumar. addshard takes first parameter "serverhostname[:port]". sf103 example host name specified. mongo host want add cluster. please read doc understand how configure mongo cluster. mongo sharded cluster config --sai

legacy - When is it time to port an old application to new platform? -

i'm working company has established application written in vb6. application stable , continues provide company income. however, beginning show age , noises been made port more modern platform such .net. since hardly ever cut , dry decision appreciate input on when time port long standing application modern platform. some of pros , cons have worked through: in favor of porting finding skills old programming language becomes harder , more expensive support platform vendor ends @ point leveraging modern programming practises on old platform becomes harder or impossible rewriting provides opportunity improve existing practises moving modern platform motivating development team moving modern platform provides marketing opportunities against porting "if not broken don't fix it" the cost of rewriting versus return risks associated transition old new application upskilling existing software engineers some related stackoverflow questions: what ...

javascript - jquery dropdown menu opens repeatedly upon hover -

i've got bit of problem jquery menu. works fine, if hover on buttons 3 or 4 times, menu expand 3 or 4 times repetitively, , can wait quit. can please tell me how stop this? here's javascript i'm using: <script type="text/javascript"> $(function () { $('#dropmenu .level1 .submenu.submenu').hover(function() { $(this).find('ul.level2,.level3 li,.level4 li,.level5 li,.level6 li').stop(true, true).hide(1000); $(this).find('ul.level2,.level3 li,.level4 li,.level5 li,.level6 li').stop(true, true).show(1000); }, function() { $(this).find('ul.level2,.level3 li,.level4 li,.level5 li,.level6 li').stop(true, true).show(1000); $(this).find('ul.level2,.level3 li,.level4 li,.level5 li,.level6 li').stop(true, true).hide(1000); });}); </script> any insight appreciated. thanks hey robert, hate when simple hover action unexpected results. on time i've developed few methods resolving flicking of element...

localization - Find the flow direction from CurrentCulture in c# -

hi there way flowdirection current culture. i have set property public string flowdirection { { return // should return flow direction using thread.currentthread.currentuiculture. } } i dont want hardcode like if (currentlanguage.tolower().startswith("ar")) { return flowdirection.righttoleft; } else { return flowdirection.lefttoright; } use this: cultureinfo.textinfo.isrighttoleft taken related question

r - Apply a function to each data frame -

i have 4 data frames contain date column, price column , return column. data.1: date price return 2009-01-02 100 0.2 2009-01-03 110 0.1 etc. data.2: date price return 2009-02-02 60 0.15 2009-02-03 50 -0.1 etc. i set loop , apply function density() each data frame, returning density values returns. i through creating list, setting loop , using lapply() this, so > ff <- list(data.1, data.2, data.3, data.4) > for(i in 1:length(ff){ density[[i]] <- lapply(ff, density(ff[[i]]$return))} but doesn't work. offer me help? thanks in advance - dani first, should initialize density if want manual assignment. densities <- list() second, use density function in funny way. should specify function different in lapply. either give function , arguments after comma, or construct own custom little function in lapply call, shown below. data.1 <- data.frame( x1 = letters[1:10], x2 = 1:10 ) data.2 <...

How to disable certain console warnings in Qt -

on paint events, qt outputs several warnings in console: "qpainter::begin: painter active" i disable particular warning because clutters output window , i'm not planning fix it. how can that? the way remove qt sources , recompile them. easier , reliable fix cause. p. s. actually, noted in other answer, possible install msg handler , filter out particular message calling strcmp(), that's both ugly , not reliable - if message altered in future version, start appearing again.

OpenGL ES Learning - some question about rotating -

hy there! new opengl es, saw many examples in net, have question rotations. how can double rotating @ 1 time? need rotate object on center, , @ same time, need rotate object on circle, has center point, in space. the second thing: i create code: glloadidentity... gltranslatef 0,0,0.. glrotatef... drawsomeobject... glloadidentity... gltranslatef 0,3,0.. glrotatef... drawsomeobject... it good, code can rotate drawing objects on it's own center. how can rotate or translate objects group? so this: //translate, , rotate in group1 gltranslatef 0,0,0.. glrotatef... group1 glloadidentity... gltranslatef 0,0,0.. glrotatef... drawsomeobject... glloadidentity... gltranslatef 0,3,0.. glrotatef... drawsomeobject... end group1 //translate, , rotate in group1 gltranslatef 2,0,0.. glrotatef... group2 glloadidentity... gltranslatef 0,0,0.. glrotatef... drawsomeobject... glloadidentity... gltranslatef 0,3,0.. glrotatef... drawsomeobject... end group2 apply...