text
stringlengths
0
30.5k
title
stringclasses
1 value
embeddings
listlengths
768
768
class hierarchy so the CLI class would look something like this: ``` public: sig::csignal<void, string> msgEntered; ``` And in the c'tor: ``` entryField.msgEntered.connect(sigc::mem_fun(this, &CLI::passUp)); ``` The passUp function just emits the signal again for the owning class (MainWindow) to connect to un...
[ -0.014788883738219738, 0.007554151583462954, 0.38245078921318054, 0.09220252186059952, -0.11857643723487854, -0.2237519472837448, 0.3423973023891449, 0.0321807861328125, -0.2605353891849518, -0.5232998728752136, -0.0718204602599144, 0.5596040487289429, -0.49690157175064087, 0.3776342868804...
would go against the idea of encapsulation. I could also pass a reference to the network interface all over the GUI, but I would like to keep the GUI code as seperate as possible. It feels like I'm missing something essential here. Is there a clean way to do this? **Note:** I'm using GTK+/gtkmm/LibSigC++, but I'm no...
[ 0.4701463282108307, 0.23766545951366425, 0.16289664804935455, -0.01488961186259985, -0.10884667932987213, -0.22115494310855865, 0.48630860447883606, 0.5678398013114929, -0.3106365203857422, -0.653653085231781, -0.08356981724500656, 0.43852153420448303, -0.11354537308216095, 0.2224040329456...
listener to a generic interface or a controller, you still have to attach the controller to the UI event somehow. With a pub/sub hub you add another layer of indirection, but there's still a duplication - the entryField still says 'publish message ready event' and the listener/controller/network interface says 'liste...
[ 0.1888500452041626, -0.16350048780441284, 0.6863918900489807, 0.09098611027002335, -0.29128068685531616, -0.15889191627502441, -0.1389099359512329, -0.14802539348602295, -0.2808668613433838, -0.49650678038597107, -0.004441577009856701, 0.41065290570259094, -0.1940874606370926, 0.2293470799...
any great advantage). I've used all four approaches - direct coupling, controller, listener and pub-sub - and in each successor you loosen the coupling a bit, but you don't ever get away from having some duplication, even if it's only the id of the published event. It really comes down to variance. If you find you ne...
[ 0.25013893842697144, -0.04851137101650238, 0.4369058609008789, 0.2298855483531952, -0.11299171298742294, 0.27224263548851013, -0.13744886219501495, -0.4161294996738434, -0.0698806643486023, -0.4098300337791443, 0.178252711892128, 0.7219208478927612, -0.2752312123775482, 0.24775417149066925...
want to plug into a more general architecture, pub/sub can work, but it introduces a form of global state, and isn't as amenable to compile-time checking. But if you don't need to vary the parts of the system independently it's probably not worth worrying about.
[ 0.37851980328559875, 0.07156910747289658, 0.19002020359039307, 0.12303625047206879, -0.022025976330041885, 0.062256455421447754, 0.20667284727096558, 0.1846286803483963, -0.4150755703449249, -0.4826766848564148, 0.2436789572238922, 0.39328187704086304, -0.33607515692710876, 0.0452131815254...
Is there a way to tell if I have uncommitted work (ie DML) in a transaction? Maybe a data-dictionary view I can query? A method to find this out both from within and outside of the session running the open transaction would be welcome. Thank you ``` SELECT * FROM v$session v WHERE v.AUDSID = userenv('sessionid'...
[ 0.29294613003730774, 0.17033414542675018, 0.345863401889801, 0.12007001042366028, -0.1982797235250473, -0.3012121617794037, 0.2993602156639099, -0.0936085507273674, -0.17153958976268768, -0.729810893535614, 0.051501672714948654, 0.6163875460624695, 0.07839304953813553, 0.4361821711063385, ...
I have 2 tables with the following structure.. ``` category { sub_cat_id - numeric sub_cat_name - varchar main_cat_id - varchar (2 characters) main_cat_name - varchar } products { pid - autoincrement pname - varchar category (Will be either sub_cat_id or main_cat_id) } ``` Products table ``` pid ...
[ 0.11384314298629761, 0.18426191806793213, 0.6294893622398376, -0.1745923012495041, 0.16042961180210114, 0.6786184906959534, -0.20970411598682404, -0.24649876356124878, -0.023414447903633118, -0.5820267200469971, -0.43548789620399475, 0.4226591885089874, -0.23552244901657104, 0.121130444109...
1 4 TV EL 5 mp3 player EL ``` I want to get the count of each category in the products table such that my query returns 2 for category 1 and 3 for category EL Could someone please help me with this?? This should be the query you're after: ``` SELECT category, COUNT(*) FROM products GROUP...
[ 0.4182705283164978, 0.37012848258018494, 0.48597005009651184, -0.10413740575313568, -0.33080753684043884, 0.13755367696285248, -0.25402534008026123, -0.5227173566818237, -0.2633328139781952, -0.285508930683136, -0.15971492230892181, 0.8110175132751465, -0.20408226549625397, 0.3517989516258...
future.
[ 0.21911656856536865, -0.4129111170768738, 0.34802326560020447, 0.26486948132514954, 0.548061728477478, -0.0823879987001419, -0.5525256395339966, 0.08151352405548096, 0.060945481061935425, -1.0411608219146729, -0.23886576294898987, 0.44751065969467163, 0.012293178588151932, 0.35775849223136...
[problem euler #5](http://projecteuler.net/index.php?section=problems&id=5) i found the solution but i don't know why this first code is faster (i put 14 in order to try to make more clear the code) the only difference is that i eliminate the for i wrote for a huge if ``` if($num%14==0 && $num%13==0 &&$num%12==0 &&$n...
[ -0.4542747139930725, 0.1596151441335678, 0.5226792097091675, 0.01699759066104889, 0.053534362465143204, 0.33508461713790894, 0.5037791728973389, -0.40047794580459595, -0.3788841962814331, -0.47262609004974365, -0.3537002503871918, 0.4416445195674896, -0.510822057723999, -0.4000121653079986...
notFound==0; $i--){ if($num%$i!=0){ $notFound=1; } } ``` The second code sample is simply performing more operations than the first, so I'd expect it to be slower. In this situation, you'd find that whilst offering poorer performance, a `for` loop offers significantly better readability and maintainabi...
[ 0.3331500291824341, -0.05513030290603638, 0.14224326610565186, -0.283037930727005, 0.32883045077323914, -0.13605782389640808, 0.49073463678359985, -0.4471904933452606, -0.09962102770805359, -0.4168759286403656, -0.4179378151893616, 0.5169900059700012, -0.4332365393638611, -0.03376081213355...
In the default TFS setup there are three work item types: scenario, task and bug. That last one is quite straightforward, and task also: it's a specific job for a team member to complete. But I think scenario is a bit vague. I usually create a scenario for larger and more general units of work: for example "Create fun...
[ 0.1565975695848465, -0.40300971269607544, 0.11473705619573593, 0.0331326387822628, 0.18108364939689636, 0.15538325905799866, 0.08214104175567627, -0.09375456720590591, -0.34561875462532043, -0.9530662894248962, -0.029668061062693596, 0.405995637178421, -0.2998740077018738, -0.2148956805467...
task. Is this a good habit? How do you deal with tasks and scenarios? Any resources to best practices? I've also heard scenarios are actually meant for use cases, is this so? Scenarios can be any user story. You only need to check in to the task. When tasks are created, they should be linked to a Scenario first, befo...
[ 0.26148948073387146, -0.1594894826412201, -0.09797978401184082, 0.294560045003891, 0.05951134115457535, -0.06666917353868484, 0.22774019837379456, 0.014222214929759502, -0.43118366599082947, -0.6857598423957825, 0.12570101022720337, 0.828382670879364, -0.1920863837003708, -0.40670600533485...
Most of experienced programmer knows data alignment is important for program's performance. I have seen some programmer wrote program that allocate bigger size of buffer than they need, and use the aligned pointer as begin. I am wondering should I do that in my program, I have no idea is there any guarantee of alignmen...
[ 0.19558343291282654, 0.04096651449799538, 0.2971101999282837, -0.1893755942583084, -0.006984022445976734, 0.10068658739328384, 0.2541918456554413, -0.5956382155418396, -0.10718131810426712, -0.5070584416389465, 0.014644750393927097, 0.6895743012428284, -0.2248232513666153, -0.1773439794778...
cout << "*"; system("pause"); } cout << reinterpret_cast<void *>(p) << endl; } for(size_t i = 0; i < 100; ++i) { short *p = new short[123]; if(reinterpret_cast<size_t>(p) % 4) { cout << "*"; system("pause"); } cout << reinterpret_cast<void *>(p) << endl; } for(size_t i = ...
[ -0.1261737048625946, -0.2051246464252472, 0.5852053761482239, -0.39931702613830566, 0.4133445918560028, 0.5803495049476624, 0.10066352784633636, -0.3960464298725128, -0.0840907096862793, -0.3951619267463684, -0.43327486515045166, 0.32960423827171326, -0.4727720320224762, -0.130700394511222...
{ cout << "*"; system("pause"); } cout << reinterpret_cast<void *>(p) << endl; } system("pause"); ``` The compiler I am using is Visual C++ Express 2008. It seems that all addresses the new operation returned are aligned. But I am not sure. So my question is: are there any guarantee? If they d...
[ 0.01795305497944355, 0.19727039337158203, 0.5746229887008667, -0.3270759880542755, 0.13978621363639832, -0.14866070449352264, 0.09543368220329285, -0.22787083685398102, 0.0015093106776475906, -0.46651503443717957, -0.14235951006412506, 0.8395664691925049, -0.4126720130443573, -0.2156551331...
can be converted to a > pointer of any complete object type and then used to access the object or array in the > storage allocated (until > the storage is explicitly deallocated by a call to a corresponding deallocation function). **EDIT**: Thanks to [timday](https://stackoverflow.com/users/24283/timday) for highl...
[ 0.07656965404748917, -0.08786165714263916, 0.503596305847168, -0.2215208113193512, -0.15364278852939606, 0.012445017695426941, 0.418390691280365, -0.22562719881534576, -0.4175794720649719, -0.5739126205444336, -0.2355973720550537, 0.36390170454978943, -0.6120672225952148, 0.009121416136622...
Is there anything that CSS Frameworks give that its not easy to make yourself? The main use I have for CSS frameworks is that they tend to force you to think about how you're going to organise you code rather than provide you with indispensable tools for your day to day tasks. For that reason, I'm a fan of [boilerplat...
[ 0.5232760310173035, 0.11476488411426544, -0.3826632797718048, 0.10325585305690765, -0.36904439330101013, 0.028065433725714684, 0.07692822813987732, 0.27520209550857544, -0.24255302548408508, -0.5821520686149597, 0.17302511632442474, 0.33548250794410706, -0.18159428238868713, 0.136349156498...
If you end up in a situation that main developer of project you are working on decides to leave. He has all the knowledge, been in project from it's very beginning. If you are lucky you might get something like two month of him still on a project, if not it might be just a month leave notice. What are best practices ...
[ 0.5915886759757996, -0.024030091241002083, -0.23736023902893066, 0.3485824465751648, 0.060786984860897064, -0.2905748188495636, 0.15303952991962433, -0.12108077853918076, -0.22680920362472534, -0.5694870352745056, -0.2987675368785858, 0.36991456151008606, 0.23499323427677155, 0.18877206742...
base. We made a **Knowledge Sharing Chart** which listed each developers name in the margin and each project across the top. We put a green symbol in the box that would line up the primary developer with their project and a yellow symbol that would line up the secondary developer and that same project. It was easy th...
[ 0.5747886896133423, 0.06918000429868698, -0.02882736176252365, 0.3532666563987732, -0.22676457464694977, 0.1627461016178131, -0.07506809383630753, -0.2056063562631607, -0.04858355224132538, -0.28763124346733093, 0.08449990302324295, 0.08619091659784317, 0.09188761562108994, -0.103137679398...
secondary developer on at least *one* project. This way they are learning about the projects they have some interest in and working with the developers of their choosing. Some large or system critical projects had 2 or 3 secondaries. Each month we would schedule in knowledge sharing time in two hour blocks. You'd swa...
[ 0.5567952394485474, -0.10431701689958572, -0.25945550203323364, 0.6805586218833923, -0.3593628704547882, 0.05316448211669922, 0.3635278046131134, 0.15594671666622162, -0.0438733734190464, -0.6788848042488098, 0.056703485548496246, 0.46131646633148193, 0.22934310138225555, -0.02248081192374...
Does anyone know of an easy (built in) way to convert a string like '20081231T130000' (ICalendar I think) to DateTime in C#? Or do I need to parse the string? Try this: ``` DateTime when = DateTime.ParseExact("20081231T130000", "yyyyMMddTHHmmss",CultureInfo.InvariantCulture); ``` Aside: it is *close* to the form...
[ 0.07504704594612122, 0.032251786440610886, 0.45162317156791687, -0.011906989850103855, 0.10477663576602936, -0.29761672019958496, 0.13215509057044983, 0.02068507671356201, -0.0314464271068573, -0.5317753553390503, 0.0044073970057070255, 0.5284304618835449, -0.09483104944229126, 0.084720909...
I have this query: ``` SELECT page.id, revision.title, revision.number FROM page INNER JOIN revision ON page.id = revision.pageId ``` Which will return something like: ``` "1" "Page Version A" "1" "1" "Page Version B" "2" "1" "Page Version C" "3" ``` Now I only want to return one row for each page...
[ -0.22038382291793823, 0.5726446509361267, 0.9408477544784546, -0.05153098329901695, -0.01889846846461296, 0.22340445220470428, -0.06837192922830582, -0.37858307361602783, -0.2354491800069809, -0.7346544861793518, -0.2215365618467331, 0.318159282207489, -0.2789946496486664, 0.39702364802360...
"3" ``` Any ideas? Thanks. Add a WHERE clause similar to WHERE revision.number = (select max(number) from revision r where r.pageId = page.id)
[ 0.036661986261606216, 0.16917647421360016, 0.7351552844047546, 0.039596956223249435, -0.14023403823375702, -0.07110057026147842, 0.22888045012950897, -0.4097358286380768, -0.18136239051818848, -0.49046438932418823, -0.011052830144762993, 0.4446423053741455, -0.20535628497600555, -0.1626310...
I have an issue whereby the company uses a business tracking system that captures a users first visit and redirects them to the page they were trying to visit but with a refferer URL attached... Now as the referer URL carries the url that the person was trying to visit (dont ask why, Ive no idea) it causes me to have a...
[ 0.32696449756622314, 0.501406729221344, 0.2839789390563965, -0.16689082980155945, 0.01683841086924076, 0.21840478479862213, 0.41521021723747253, -0.039685651659965515, -0.46907806396484375, -0.5378261208534241, 0.13832631707191467, 0.2178233563899994, -0.37825724482536316, 0.48383802175521...
this ... ``` private string queryClean(string entity) { try { if(Request.QueryString["referrerUrl"] != null){ string[] Split = entity.Split(new Char[] { ',' }); string tmpValue = Convert.ToString(Split[0]); return tmpValue; }else{ return entity; } } catch (Excep...
[ 0.04565338045358658, -0.19263491034507751, 0.3388400077819824, -0.2071080356836319, 0.03909667208790779, 0.10044778883457184, 0.490273118019104, -0.4643746316432953, -0.03334590792655945, -0.2441442310810089, -0.2973078489303589, 0.7735560536384583, -0.5016375184059143, 0.2284226417541504,...
return entity; } } ``` (ignore the try/catch we have app level error catching, but I'm still playing with it). I'm using C# .net 2 Thanks --- [Additional Info] The reffererURL will always be on the end of the string so it could be possible to delete all of the query string after this point? I've tried usin...
[ 0.0860278308391571, -0.09403371065855026, 0.5614887475967407, -0.1167568564414978, -0.009720792062580585, 0.025382915511727333, 0.4915308654308319, -0.568310022354126, -0.1719369739294052, -0.36448124051094055, -0.2962963581085205, 0.7368497848510742, -0.500704824924469, 0.0052630398422479...
{ Response.Write(i +": "+ testb[i].ToString()+"<br><br>"); } ``` Both still produce the duplicates --- I could use [Trim](http://www.developerfusion.com/code/4398/string-manipulation-in-c/) But is there a cleaner/faster way of achieving this. **[Example URL]** Default2.aspx?test=test&...
[ 0.10892967134714127, 0.10412035882472992, 0.5229243040084839, 0.03294188529253006, -0.29629841446876526, -0.03691057115793228, 0.5619983673095703, -0.4603220820426941, -0.03335657715797424, -0.5606576204299927, -0.30042892694473267, 0.26213526725769043, -0.10237684845924377, 0.318240702152...
+ 1); //Find the number of characters between ? and &referrerURL int countTxt = ((test.IndexOf("&referrerURL")-1) - test.IndexOf("?")); //Capture the substring and split into a string array using & string[] aTest = test.Substring(startTxt, countTxt).Split(new Char[] { '&' }); ``` **[Running a test pro...
[ 0.19260507822036743, -0.26378822326660156, 0.21998247504234314, -0.2991650402545929, -0.15493494272232056, 0.3137587904930115, 0.43424054980278015, -0.845013439655304, 0.15846823155879974, -0.39096128940582275, -0.42040547728538513, 0.49179020524024963, -0.27487507462501526, -0.38350543379...
} ```
[ 0.3354566991329193, 0.5660994052886963, -0.045124202966690063, 0.08949362486600876, 0.36271432042121887, -0.03456072509288788, 0.2035233974456787, 0.4996976852416992, 0.20306141674518585, -0.48415371775627136, -0.1802433431148529, 0.4521971344947815, -0.138974130153656, 0.3154967725276947,...
I created a script that requires selecting a beginning year then only displays years from that Beginning year -> 2009. It's just a startYear to endYear Range selector. The script only works in firefox. I'm LEARNING javascript, so I'm hoping someone can point me into the right direction. Live script can be found at <h...
[ 0.007508143782615662, 0.17344272136688232, 0.563629686832428, -0.4401339590549469, 0.10421671718358994, 0.040261633694171906, 0.26839402318000793, -0.01884198561310768, -0.22584858536720276, -0.5655216574668884, -0.139384925365448, 0.28306466341018677, 0.04776141047477722, -0.0681029185652...
start_year) { var optn = document.createElement("OPTION"); optn.text = x; optn.value = x; document.form.year2.options.add(optn); //alert(x); x--; } } else { var i; for(i=document.form.year2.options.length-1;i>=0;i--) { document.form.year2.remove(i...
[ -0.09134221076965332, -0.32577618956565857, 0.6462476253509521, -0.700544536113739, 0.4421956241130829, 0.24590487778186798, 0.1678244024515152, -0.1689641773700714, -0.2843076288700104, -0.4097507894039154, -0.7749875783920288, 0.5494292378425598, -0.30195069313049316, -0.0098933847621083...
optn.value = "Any"; document.form.year2.options.add(optn); } // end else } // end function </script> ``` Any ideas? Thanks, Nick You are trying to set an onclick event on each option. IE does not support this. Try using the onchanged event in the select element instead. Instead of this: ``` <select name="year1...
[ -0.20240788161754608, -0.07226476818323135, 0.4201052486896515, -0.09486263990402222, 0.03663456812500954, 0.2143673151731491, 0.02797728218138218, 0.10172766447067261, -0.15838275849819183, -0.4391413629055023, -0.09568246454000473, 0.6763081550598145, -0.09021850675344467, -0.50714159011...
I was playing around with the Datetime.ParseExact method, and it wants an IFormatProvider... It works inputting null, but what exactly does it do? In adition to Ian Boyd's answer: Also `CultureInfo` implements this interface and can be used in your case. So you could parse a French date string for example; you could ...
[ 0.36584484577178955, -0.09845031797885895, 0.1942615509033203, -0.03449114412069321, 0.14194588363170624, 0.01591944508254528, 0.03858477249741554, 0.0653158575296402, -0.07276422530412674, -0.47437620162963867, 0.017459845170378685, 0.5380489230155945, -0.25363022089004517, 0.069385237991...
Solution for writing a program for keep secret photos. I have many secret photos of me and my friends and I don't want anyone to see it for now I just use Winrar and Set password feature and use some encrypt and hide folder software. But I think it isn't enough safe. As I am a C# programmer ,I want to develop an ap...
[ 0.0381891205906868, -0.11923010647296906, 0.09560918062925339, 0.34083494544029236, 0.20357273519039154, -0.1506381332874298, 0.5497269034385681, -0.1405717134475708, -0.19070269167423248, -0.4472474455833435, 0.03586536645889282, 0.5783524513244629, -0.10994869470596313, -0.02110247500240...
I know when we write "File.Delete()" it isn't real delete,any one can recovery it.How I make sure that my application really delete it (What about modify data and make it cannot use before delete it) ? FYI * My pc doesn't connect to the internet and I bought it for keep,view my photos only I don't want to do other th...
[ 0.7106198668479919, 0.23622040450572968, 0.5392253398895264, 0.05282679572701454, -0.08672644942998886, -0.24513323605060577, 0.717292308807373, 0.07720066606998444, -0.28563886880874634, -0.6203239560127258, 0.16169068217277527, 0.641716718673706, -0.039023999124765396, 0.1547487676143646...
it is just "suppose" such as "I bought it for keep,view my photos only I don't want to do other thing." It is so weird if I spent 400$ for do something like that. I though everyone will know it is just kidding. sorry for made this question not clear. I just want to know how someone hack it in this situation.And how ...
[ 0.7941539883613586, 0.0005649820668622851, 0.17328159511089325, 0.41242140531539917, 0.1585080921649933, -0.4623663127422333, 0.5418599247932434, 0.35770145058631897, 0.23156951367855072, -0.31096959114074707, 0.020241668447852135, 0.6530564427375793, -0.010275784879922867, -0.171579584479...
Is there any way to determine precisely why a System.Transaction TrasactionScope is being escalated to the DTC? We are hitting a bump with one of our components that seem to escalate the transaction while all other components (which seem deceptively similar) does not do escalation. Are any information made available o...
[ -0.09807121008634567, -0.09689246863126755, 0.1587868630886078, 0.2870944142341614, -0.2033751904964447, -0.3914685845375061, 0.097081758081913, 0.1368183046579361, -0.5846554636955261, -0.3174300491809845, 0.41959691047668457, 0.7464910745620728, -0.3439358174800873, 0.20665517449378967, ...
This will cause an exception when the transaction is promoted that will have the problem code in the call stack. Of course this won't help if you have other items running on the machine that require this service, but would be possible on a debug machine.
[ 0.07669947296380997, 0.17364688217639923, 0.24423524737358093, 0.1266622543334961, 0.21414338052272797, -0.17361752688884735, 0.28887835144996643, -0.11065063625574112, -0.3950763940811157, -0.2910362780094147, -0.17286305129528046, 0.591620147228241, -0.3249354660511017, 0.293651014566421...
I was going to ask a question about preparing a desktop application to support multiple languages on the UI. In my search for existing questions on the topic I was thinking the word "International", so I selected the Internationalization tag and read through some matching questions. Eventually I realized I should pr...
[ 0.23602434992790222, -0.044190648943185806, 0.23732434213161469, -0.06208169832825661, 0.021707218140363693, -0.029374269768595695, 0.24168378114700317, 0.4158591330051422, -0.3612164855003357, -0.5763633847236633, -0.04402752220630646, 0.4152873158454895, -0.28775206208229065, 0.262712061...
hardwired to one language/locale/culture. **Localization (l10n)**the process of adding the appropriate resources to your software so that a particular language/locale is supported. It's bigger in scope than just [this Wikipedia entry](http://en.wikipedia.org/wiki/Language_localization "Wikipedia on language localizatio...
[ 0.23348066210746765, -0.13405847549438477, 0.15212105214595795, -0.032339029014110565, 0.025906117632985115, -0.052942175418138504, 0.2703755795955658, 0.2782926559448242, -0.25238820910453796, -0.787930965423584, -0.38083556294441223, 0.48909062147140503, -0.09532489627599716, -0.14290808...
I am trying to add a row to a table in the database using the table adapter's update method. I am not getting any errors. It looks like it is working fine, but there is no actual insertion into the database. However, if I try to insert the same row again I get a constraint exception saying that I am trying to insert a ...
[ 0.16514287889003754, 0.1953304260969162, 0.26355475187301636, 0.102790467441082, 0.3981167674064636, 0.19899943470954895, 0.17255042493343353, -0.1340867280960083, -0.3795745372772217, -0.6452481746673584, 0.19929535686969757, 0.32162612676620483, -0.3659696578979492, 0.3262375295162201, ...
doing wrong? Here is the code where insertion is made:(database name: `pompadatabase`, table name: `pompa`) ``` pompadatabaseDataSet.pompaRow tmprow; tmprow = pompadatabaseDataSet.pompa.NewpompaRow(); tmprow.isim = textBox5.Text; tmprow.info = richTextBox1.Text; tmprow.resim = bao; tmprow.seri_id = Convert.ToInt32(si...
[ 0.15971563756465912, 0.29512643814086914, 0.3336276113986969, 0.0009981660405173898, 0.33629682660102844, 0.03691878542304039, 0.5747800469398499, -0.2987048029899597, -0.35542768239974976, -0.5345373749732971, 0.05561128258705139, 0.4075285494327545, -0.3658004105091095, 0.206817358732223...
from that folder, if everything goes well, that was the problem. Well it could sound silly but it happened to me when i first started to work with DataSets and TableAdapters.
[ 0.19971604645252228, -0.024458453059196472, 0.1888192743062973, 0.07873590290546417, -0.030630500987172127, -0.307205468416214, 0.025646232068538666, 0.3678889274597168, -0.4274365305900574, -0.1825920194387436, 0.3704599142074585, 0.33192378282546997, -0.14032615721225739, 0.0972747057676...
Problem ------- I need to create 32 Bit numbers (signed or unsigned doesn't matter, the highest bit will never be set anyway) and each number must have a given number of Bits set. Naive Solution -------------- The easiest solution is of course to start with the number of zero. Within a loop the number is now increas...
[ -0.08095958828926086, 0.16451425850391388, 0.14360786974430084, 0.20019353926181793, -0.009999413974583149, 0.3143073618412018, 0.39096760749816895, -0.27145329117774963, -0.433341920375824, -0.35443854331970215, 0.03812738135457039, 0.6764121055603027, -0.22209231555461884, 0.024802332744...
once the number of desired Bits gets very high. A Better Solution ----------------- The simplest number having (let's say) 5 Bits set is the number where the first 5 Bit are set. This number can be easily created. Within a loop the first bit is set and the number is shifted to the left by one. This loop runs 5 times ...
[ 0.30259647965431213, -0.13259094953536987, 0.25246310234069824, 0.03886805847287178, -0.08617597818374634, 0.19381646811962128, 0.021321075037121773, -0.3837614357471466, -0.5016635656356812, -0.5828632116317749, 0.04763258621096611, 0.3259354531764984, -0.1839921921491623, 0.3310940265655...
the first zero bit to the right, so we get 101111, 110111, 111011, 111101, 111110. We could repeat this by adding another 0 to front and repeating this process. 0111110, 1011110, 1101110, etc. However that way numbers will grow much faster than necessary, as using this simple approach we leave out numbers like 1010111....
[ 0.5208046436309814, 0.08400730043649673, -0.05878794938325882, 0.1588727980852127, -0.3371206820011139, 0.33427685499191284, 0.28978627920150757, -0.10225928574800491, -0.18148109316825867, -0.37354522943496704, -0.005840661935508251, 0.09238529950380325, -0.3066463768482208, 0.29654172062...
code to get the next higher number with the same number of one-bit set. If you use this as a primitive to increase your number all you have to do is to find a starting point. Getting the first number with N bits set is easy. It's just 2^(N-1) -1. You will iterate through all possible numbers very fast that way. ``` ...
[ 0.09898075461387634, -0.16753986477851868, 0.08137170970439911, 0.0060340301133692265, 0.10599691420793533, -0.02276364155113697, 0.24098511040210724, -0.6447238922119141, -0.24531127512454987, -0.6657833456993103, 0.027307340875267982, 0.39286914467811584, -0.4287925958633423, 0.157505363...
ripple = x + smallest; new_smallest = (ripple & -ripple); ones = ((new_smallest/smallest) >> 1) - 1; return ripple | ones; } // test code (shown for two-bit digits) void test (void) { int bits = 2; int a = pow(2,bits) - 1; int i; for (i=0; i<100; i++) {
[ 0.5575031638145447, -0.37802353501319885, -0.09684557467699051, -0.185834601521492, -0.21750964224338531, 0.37374624609947205, 0.2858322560787201, -0.7211471199989319, -0.18993191421031952, -0.4603860676288605, 0.015773342922329903, -0.15227250754833221, -0.23161204159259796, 0.10391528904...
printf ("next number is %d\n", a); a = next_set_of_n_elements(a); } } ```
[ -0.298178106546402, -0.04156911000609398, -0.001730041578412056, -0.496937096118927, 0.3579269051551819, 0.05421030893921852, 0.20009060204029083, -0.3176442086696625, -0.004055793862789869, -0.5178489089012146, -0.45834192633628845, 0.4726252853870392, -0.5495808720588684, -0.029680637642...
I designed a CrystalReport using CrystalReport Designer that embedded with VisulaStudio.NET 2005, while running the report using report viewer, it runs properly and retrieves the required data. While running it throught the application, no data is retrieved?! Is running a CrystalReport through a .NET application diffe...
[ 0.11937345564365387, 0.09206163883209229, 0.3498625159263611, 0.09002620726823807, -0.41286733746528625, -0.1000097319483757, 0.2770325243473053, -0.37437930703163147, 0.021489383652806282, -0.3869796693325043, 0.3762695789337158, 0.5218898057937622, -0.26211535930633545, 0.270050078630447...
point. Getting the first number with N bits set is easy. It's just 2^(N-1) -1. You will iterate through all possible numbers very fast that way. ``` unsigned next_set_of_n_elements(unsigned x) { unsigned smallest, ripple, new_smallest, ones; if (x == 0) return 0; smallest = (x & -x); rip...
[ -0.0696125328540802, -0.24667523801326752, 0.17130492627620697, -0.14661408960819244, -0.0325268879532814, 0.06797553598880768, 0.0574512779712677, -0.666413426399231, -0.40758568048477173, -0.641228199005127, 0.02592938207089901, 0.023901237174868584, -0.3826310932636261, 0.28678721189498...
= ((new_smallest/smallest) >> 1) - 1; return ripple | ones; } // test code (shown for two-bit digits) void test (void) { int bits = 2; int a = pow(2,bits) - 1; int i; for (i=0; i<100; i++) { printf ("next number is %d\n", a); a = next_set_of_n_elements(a); } } ``...
[ 0.290985107421875, -0.2811308801174164, -0.09471742063760757, -0.34661468863487244, 0.05210740119218826, 0.34976112842559814, 0.22828882932662964, -0.6228955388069153, -0.15225093066692352, -0.5656580924987793, -0.18855904042720795, 0.1265518069267273, -0.24527911841869354, 0.1448163837194...
I'm looking for a footer like facebook has but only use CSS to style it no js. As you can see here <http://dl.getdropbox.com/u/5910/Jing/2009-02-03_1256.png> it always stays at the bottom even if I scroll down. <http://dl.getdropbox.com/u/5910/Jing/2009-02-03_1258.png> For all browsers, save for IE6, do this: ``` di...
[ 0.26673969626426697, -0.2878870368003845, 0.43816661834716797, 0.01822769083082676, -0.07323290407657623, 0.15822051465511322, 0.1117618978023529, 0.22294633090496063, -0.32911157608032227, -0.7654098868370056, 0.2810988128185272, 0.1100618839263916, -0.16157442331314087, -0.12473058700561...
smoothly as this CSS does in other browsers.
[ -0.11351724714040756, -0.1384204477071762, 0.344378799200058, 0.1332729011774063, 0.024301428347826004, -0.27080485224723816, 0.13401976227760315, 0.38938748836517334, -0.34482908248901367, -1.117046594619751, -0.27048343420028687, 0.251352459192276, 0.16503269970417023, -0.174901306629180...
I want to develop a process() method. The method takes some data in the form of a data class, and processes it. The data classes are similar, but slightly different. For example we have the following classes of data processDataObject\_A, processDataObject\_B and processDataObject\_C. Is it better to overload the meth...
[ 0.10996108502149582, 0.4064689576625824, 0.4105583429336548, -0.10169804096221924, 0.3055097758769989, 0.17075879871845245, -0.38684698939323425, -0.39833953976631165, -0.0301201231777668, -0.5963172912597656, 0.30914488434791565, 0.39553460478782654, -0.3535255193710327, 0.208178088068962...
some better way to address it? Would the approach change if this were to be a Web Method? Thanks in advance I would go with: ``` process (data) { data.doProcessing(); } ```
[ 0.23023466765880585, 0.10729918628931046, 0.18435370922088623, -0.11698693037033081, 0.13882967829704285, 0.12224166840314865, 0.024361055344343185, -0.19277507066726685, -0.09143275767564774, -0.652915894985199, -0.059243474155664444, 0.462643563747406, -0.1849481761455536, -0.02388244867...
I am using jQuery and my list has the following. ``` <div id="wrapper"> <ul id="testnav"> <li class="test1"><a href="/link">Heading</a> <ul> <li><a href="/link">Sub Heading</a></li> <li><a href="/link">Sub Heading</a></li> <li><a href="/link">Sub ...
[ 0.2566450238227844, -0.03678564354777336, 0.10909664630889893, -0.20576560497283936, -0.2588896155357361, -0.17931248247623444, 0.2954511344432831, -0.15805312991142273, 0.20006343722343445, -0.878603458404541, 0.012750346213579178, 0.30104413628578186, -0.20510901510715485, -0.00335270562...
</ul> </li> <li class="test2"><a href="/link">Heading</a> <ul> <li><a href="/link">Sub Heading</a></li> <li><a href="/link">Sub Heading</a></li> <li><a href="/link">Sub Heading</a></li> </ul>
[ -0.11775922775268555, -0.0459100715816021, 0.08089759200811386, 0.16923914849758148, -0.17631742358207703, 0.19056740403175354, 0.26053762435913086, -0.5143282413482666, 0.08358828723430634, -0.6500146389007568, -0.2706296145915985, 0.25126564502716064, -0.3355059027671814, 0.0103477416560...
</li> <li class="test3"><a href="/link">Heading</a> <ul> <li><a href="/link">Sub Heading</a></li> <li><a href="/link">Sub Heading</a></li> <li><a href="/link">Sub Heading</a></li> </ul>
[ -0.2971784770488739, 0.006384328939020634, 0.14659090340137482, 0.11834802478551865, -0.17168015241622925, 0.21843726933002472, 0.23951157927513123, -0.496137410402298, 0.033544935286045074, -0.6159479022026062, -0.30408787727355957, 0.16530774533748627, -0.36696749925613403, -0.0243804119...
</li> </ul> </div> ``` When I click the heading or sub heading I need that the corresponding text. I used the following, but it is not working. ``` $("li").bind("click", function(){ alert( $(this).text()); }); ``` What change should I make? You were very close - you need to bind the event to the anchor ta...
[ 0.02529972605407238, -0.03892584517598152, 0.7802055478096008, -0.2691740393638611, 0.23848116397857666, -0.147866353392601, -0.04285396263003349, -0.538007915019989, -0.25347137451171875, -0.6108953952789307, -0.4778060019016266, 0.7608055472373962, -0.5246714949607849, -0.075064197182655...
I'm using the following function to map columns from a DataTable (passed from the data tier) to object properties. The function exists within the class I'm populating. The class has two methods: Load() which loads the object with values and LoadAll() which returns a collection of populated objects. I wanted to be able ...
[ -0.21585412323474884, -0.048116788268089294, 0.635123074054718, -0.06348900496959686, -0.18135592341423035, 0.23846885561943054, -0.10031969845294952, -0.12300296127796173, -0.3398866057395935, -0.6655609011650085, -0.059071868658065796, 0.26419690251350403, -0.4739324450492859, 0.36730408...
If target.Equals(Me) Then Me.ID = Convert.ToInt32(dr.Item("pkIncidentID")) Me.Description = dr.Item("IncidentDetail").ToString Me.Created = Convert.ToDateTime(dr.Item("CreatedOn")) ... Return Me
[ -0.06633301079273224, -0.3252526819705963, 0.37644603848457336, -0.1405174285173416, -0.0009782708948478103, 0.17800310254096985, 0.32199686765670776, -0.2936866283416748, 0.05656914785504341, -0.9439831972122192, 0.19339685142040253, 0.5008600950241089, -0.32295432686805725, 0.43155625462...
Else Dim NewIncident As New Incident NewIncident.ID = Convert.ToInt32(dr.Item("pkIncidentID")) NewIncident.Description = dr.Item("IncidentDetail").ToString NewIncident.Created = Convert.ToDateTime(dr.Item("CreatedOn")) ... Return
[ 0.11351486295461655, -0.20647457242012024, 0.6114915609359741, -0.05498509481549263, 0.047677189111709595, 0.037326205521821976, 0.3839617669582367, -0.6359592080116272, -0.35650473833084106, -0.7042463421821594, 0.04915083199739456, 0.6525737047195435, -0.41857457160949707, 0.335288524627...
NewIncident End If End Function ``` Note: I'm well aware of ORM tools which will do this for me and I normally use EntitySpaces, but for this project I am unable to do so. It appears to me that your `If` and `Else` blocks only differ in the fact that one assumes an existing object(the current instance...
[ 0.07360196858644485, -0.12794016301631927, 0.4686148464679718, -0.08017553389072418, 0.053216833621263504, -0.43878012895584106, 0.21065457165241241, -0.32829463481903076, -0.13052083551883698, -0.7429094910621643, 0.05797518044710159, 0.31678342819213867, -0.3397495448589325, 0.3778458237...
variables and let this function work in the same way in each case : ``` Private Sub MapDataRowToProperties(ByVal dr As DataRow, ByRef target As Incident) If target Is Nothing Then target = New Incident() End If 'Set properties '... End Sub ``` Sample invocation : ``` 'Usage 1: MapDataRowToProperties(dr...
[ -0.05866798758506775, -0.33531782031059265, 0.5802705883979797, -0.016770774498581886, -0.21170231699943542, 0.05829973891377449, -0.014534905552864075, -0.2985856831073761, -0.06139842048287392, -0.4414656460285187, -0.2752775251865387, 0.7533124685287476, -0.4167569577693939, 0.109573565...
A normalized table should have less number columns and can have reference fields as much as possible. Is it right approach? Is there any relationship between number of columns and a good normalization process? You should follow the normalization principles rather than be concerned with the sheer number of columns in a...
[ 0.021570280194282532, 0.07730844616889954, 0.5336313843727112, 0.4263089597225189, 0.016483405604958534, 0.05432085692882538, 0.010679064318537712, -0.08670445531606674, -0.22947339713573456, -0.5138413310050964, -0.033556871116161346, 0.5355582237243652, -0.3122430145740509, -0.0651256293...
I'm looking for application-wide access to raw keyboard events in OS X, either using the Cocoa or Carbon frameworks (or any of the underlying APIs, for that matter). I know that I can override NSApplication's sendEvent: to get raw keyboard information, but for the meta keys (command, control, alternate, shift, etc) don...
[ -0.023020561784505844, -0.2462136596441269, 0.02389376051723957, 0.011705830693244934, -0.2991909086704254, -0.14847196638584137, 0.17680509388446808, 0.13855116069316864, 0.12208161503076553, -0.6668188571929932, 0.05767471715807915, 0.8554216027259827, -0.48464322090148926, -0.0349138602...
Manager API, documented in [Technical Note TN2187](http://developer.apple.com/technotes/tn2007/tn2187.html). The pre-Leopard API is documented in [HID Class Device Interface Guide](http://developer.apple.com/documentation/DeviceDrivers/Conceptual/HID/). I wrote an Objecive-C wrapper around the older APIs, [DDHidLib](ht...
[ -0.20600084960460663, -0.22553278505802155, 0.01381773129105568, -0.24045875668525696, -0.10638496279716492, -0.0896851122379303, 0.3894476592540741, -0.23652569949626923, -0.14499743282794952, -0.5820207595825195, -0.009873427450656891, 0.9485267996788025, -0.48591142892837524, 0.00796373...
I got an `Int16` value, from the database, and need to convert this to an enum type. This is unfortunately done in a layer of the code that knows very little about the objects except for what it can gather through reflection. As such, it ends up calling `Convert.ChangeType` which fails with an invalid cast exception. ...
[ 0.26212048530578613, 0.2955605089664459, 0.18019646406173706, -0.2870267629623413, 0.0356912761926651, 0.11384810507297516, 0.3194787800312042, -0.3412564694881439, 0.009004376828670502, -0.6808854937553406, 0.20123420655727386, 0.5739822387695312, -0.36741670966148376, 0.21979664266109467...
to experiment: ``` using System; public class MyClass { public enum DummyEnum { Value0, Value1 } public static void Main() { Int16 value = 1; Type destinationType = typeof(DummyEnum); String name = Enum.GetName(destinationType, value); Object enumV...
[ 0.20051878690719604, -0.21901270747184753, 0.07120256870985031, -0.21328523755073547, 0.11012367159128189, 0.1844523549079895, 0.671840488910675, -0.19433118402957916, 0.01709076575934887, -0.3740050792694092, -0.06304119527339935, 0.24977999925613403, -0.47451382875442505, 0.5233304500579...
Console.WriteLine("" + value + " = " + enumValue); } } ``` `Enum.ToObject(....` is what you're looking for! **C#** ``` StringComparison enumValue = (StringComparison)Enum.ToObject(typeof(StringComparison), 5); ``` **VB.NET** ``` Dim enumValue As StringComparison = CType([Enum].ToObject(GetType(StringCompariso...
[ 0.09879354387521744, -0.0720042958855629, 0.9314902424812317, -0.16156737506389618, 0.35923638939857483, 0.11680515855550766, 0.28251686692237854, -0.27518266439437866, -0.022149663418531418, -0.5261666178703308, -0.2257920652627945, 0.804608941078186, -0.46697309613227844, 0.2527405321598...
{ return (EnumType[])Enum.GetValues(typeof(EnumType)); } /// <summary> /// Converts the string representation of the name or numeric value of one or more enumerated constants to an equivalent enumerated object. /// </summary> /// <param name="name"></param> /// <returns></returns> /...
[ 0.0265779010951519, 0.01366219762712717, 0.14524103701114655, -0.10571030527353287, -0.06183755025267601, 0.4880596995353699, 0.06845133751630783, -0.5573210120201111, -0.07758613675832748, -0.4466697573661804, -0.35793688893318176, 0.2778915464878082, -0.6503815650939941, 0.12273961305618...
/// Converts the string representation of the name or numeric value of one or more enumerated constants to an equivalent enumerated object. /// </summary> /// <param name="name"></param> /// <param name="ignoreCase"></param> /// <returns></returns> /// <remarks></remarks> public static EnumType ...
[ -0.09036684781312943, 0.12018249183893204, 0.003538908436894417, -0.019215086475014687, -0.3203356862068176, 0.6363239884376526, 0.1598920226097107, -0.6845153570175171, -0.07729101926088333, -0.4149179756641388, -0.3062654435634613, 0.0924246534705162, -0.7143682241439819, 0.0581594705581...
/// </summary> /// <param name="value"></param> /// <returns></returns> /// <remarks></remarks> public static EnumType ToObject(object value) { return (EnumType)Enum.ToObject(typeof(EnumType), value); } } ``` Now instead of writing `(StringComparison)Enum.ToObject(typeof(StringComparis...
[ 0.05972647666931152, 0.047734856605529785, 0.6184118390083313, -0.17722734808921814, -0.031465258449316025, 0.4100692570209503, 0.4399162232875824, -0.5987218618392944, -0.3514675498008728, -0.2067929208278656, -0.20387645065784454, 0.2665809988975525, -0.47421759366989136, 0.2073296308517...
Is there any Java library allowing to build a simple standalone webservice server without any application server framework? Java 6 contains JAX-WS, which makes it very easy to host a web service in a stand-alone application: ``` javax.xml.ws.Endpoint.publish("http://localhost:8000/myService/", myServiceImplementation)...
[ 0.12512914836406708, 0.1275847852230072, 0.30556726455688477, -0.10579755902290344, -0.008963021449744701, -0.24621056020259857, 0.15322747826576233, -0.25592344999313354, 0.1285007894039154, -0.4886166751384735, -0.10772241652011871, 0.39972662925720215, -0.23858341574668884, -0.184819296...
I opened a file stream to a very big file using fopen. Before performing any read operation on that stream, I deleted the file using unlink(). And still, I was able to read the whole file. I am guessing that there is a buffer associated with the stream, which holds the data of the file. But obviously that buffer will ...
[ 0.017297537997364998, 0.14631737768650055, 0.2506946623325348, -0.13599362969398499, 0.14700084924697876, 0.039759017527103424, 0.3120920956134796, -0.10078533738851547, -0.33945801854133606, -0.7084136605262756, -0.1452084481716156, 0.5821601748466492, -0.4142650365829468, 0.2373678982257...
*fp; long long int file_size = 0; int bytes_read = 0; char buf[1]; fp = fopen("a_big_file", "r"); unlink("a_big_file"); while(0 != (bytes_read = fread(buf, 1, 1, fp))){ file_size += bytes_read; } printf("file_size is %llu\n", file_size); return 0; } ``` Output: file\_s...
[ -0.2985873818397522, 0.041657473891973495, 0.7169477939605713, -0.6589807271957397, 0.254368394613266, 0.20742487907409668, 0.19543562829494476, -0.09048016369342804, -0.38373100757598877, -0.567408561706543, -0.7190898060798645, 0.5848708152770996, -0.24173305928707123, 0.0908580869436264...
temporary files - if you unlink it as soon as you open it, the file won't be visible to other processes, and it will be removed from the system as soon as your program closes it, ends or crashes. That helps prevent the proliferation of orphan temp files. Practically (glossing over some technical details here) what hap...
[ 0.20353074371814728, 0.19024409353733063, 0.5582455396652222, 0.3867965340614319, 0.31003060936927795, -0.26936206221580505, 0.041376736015081406, 0.3794272243976593, -0.7172895669937134, -0.418916791677475, -0.4585617780685425, 0.2393142580986023, -0.328359991312027, 0.526117742061615, ...
so the file doesn't have a name any more. The file system will only reclaim the file space (ie the inode) if it isn't in any directory entries, AND nobody has it open. The other processes can't open it in the ordinary manner because they can't map a file name to the inode. Note that Unix file systems allow multiple di...
[ 0.11796925216913223, 0.16096451878547668, 0.4744749069213867, 0.06366276741027832, 0.4713500142097473, -0.32141944766044617, -0.26575136184692383, 0.14903590083122253, -0.5035907626152039, -0.5350809097290039, -0.4329695999622345, 0.4317338466644287, -0.16122683882713318, 0.411840915679931...
-li", you can see the actual inode address.
[ -0.07462604343891144, 0.17111432552337646, 0.3169395923614502, 0.017921825870871544, 0.15044383704662323, 0.08636707067489624, -0.11441890895366669, -0.027204053476452827, 0.2791447639465332, -0.3663395643234253, -0.007401865441352129, 0.10877896845340729, -0.21219034492969513, 0.349202394...
I'm looking for a Rake task to do deployment via FTP. Does anyone know of any? Anders Ok, I decided to do it myself. The code is not very beautiful since it contains a lot of exception handling, but it gets the job done :) ``` require 'rake' require 'net/ftp' def ftp_files(prefixToRemove, sourceFileList, targetDir,...
[ 0.12622800469398499, -0.09172681719064713, 0.37246575951576233, -0.20847876369953156, -0.11818648129701614, 0.03792775422334671, 0.5487506985664368, -0.4920255243778229, -0.0073300073854625225, -0.9247741103172302, 0.057727470993995667, 0.6014132499694824, -0.20101647078990936, -0.04146214...
= srcFile.pathmap(("%{^#{prefixToRemove},#{targetDir}}p")) else targetFile = srcFile.pathmap("#{targetDir}%s%p") end begin puts "Creating dir #{targetFile}" if File.directory?(srcFile) ftp.mkdir targetFile if File.directory?(srcFile) rescue puts $! end begin puts ...
[ -0.0908801481127739, -0.4216436743736267, 0.520794689655304, -0.37741583585739136, 0.03746209293603897, 0.2116430252790451, 0.19634686410427094, -0.6618040204048157, -0.06244570016860962, -0.812456488609314, -0.29151687026023865, 0.36597198247909546, -0.10424178093671799, 0.083063945174217...
end end end task :ftp => [:dist] do ftp_files("dist", FileList["dist/**/*"], "remote_dir", 'host.com', 'user', 'pwd') end ```
[ -0.13575780391693115, -0.0034703973215073347, 0.6494115591049194, -0.17986968159675598, 0.2778627574443817, -0.13400748372077942, 0.28510043025016785, -0.08091846108436584, -0.07365468144416809, -0.4068988561630249, -0.42281216382980347, 0.6204670667648315, -0.225357785820961, 0.1860549002...
Any recommendations of a **recent** tutorial, or guide, on uploading Rails applications to a (gs) rails container? I've followed a couple tutorials already, both of which haven't worked. If you're only targeting modern browsers: ========================================= Use [element.classList.add](https://developer.m...
[ 0.0417444221675396, 0.08372312784194946, 0.44548967480659485, -0.10301630944013596, 0.027004845440387726, -0.0958217903971672, 0.12781628966331482, -0.2574710249900818, -0.09949180483818054, -0.7470438480377197, -0.20373603701591492, 0.5990603566169739, -0.4585731327533722, -0.057663112878...
before `otherclass`. It's important to include the space otherwise it compromises existing classes that come before it in the class list. See also [element.className on MDN](https://developer.mozilla.org/en-US/docs/Web/API/Element/className).
[ 0.05621173232793808, -0.33941322565078735, -0.18865332007408142, -0.07613282650709152, -0.07804597169160843, -0.2234039604663849, 0.07078239321708679, -0.0663689523935318, -0.26784148812294006, -0.49634310603141785, 0.0326518788933754, 0.34699323773384094, -0.3616952896118164, 0.2760140597...
I've just ported a Web service from Delphi.NET 2006 to Delphi Prism 2009 (running in the Visual Studio 2008 IDE). But I can't find where I'm supposed to set (or unset) the conditional compilation constants! Am I blind, has this option been left out, or is it just not supported in VS? [edit: thanks to Mohammed Nasman ...
[ 0.182676762342453, -0.05573777109384537, 0.3418835997581482, -0.06941723078489304, -0.3747192323207855, -0.08163003623485565, 0.4233296513557434, -0.1949663758277893, -0.3725777566432953, -0.7470037937164307, -0.09897645562887192, 0.833993136882782, -0.5018291473388672, -0.2080015838146209...
to set conditional compilation constants in the Project Designer! I just can't find a way to get to the [Project Options](http://prismwiki.codegear.com/en/Project_Options) in an ASP.NET project... Is it really not possible? Delphi Prism uses VS [How to: Declare Conditional Compilation Constants](http://msdn.microsoft....
[ 0.4017925262451172, -0.33373308181762695, 0.18373289704322815, 0.12080173939466476, -0.2584536373615265, -0.09728500247001648, 0.40401265025138855, -0.21087133884429932, -0.5030838847160339, -0.36462974548339844, -0.17549942433834076, 0.5546191930770874, -0.17111849784851074, -0.2640635669...
I fear that some of my code is causing memory leaks, and I'm not sure about how to check it. Is there a tool or something for MacOS X? Thank you Apple has a good description of how to use MallocDebug on OS X on their developer pages. * document on [finding leaks](http://developer.apple.com/documentation/Performance/C...
[ 0.23869894444942474, 0.31352174282073975, 0.05152418836951256, 0.23868601024150848, 0.09191116690635681, -0.23766469955444336, 0.3491847813129425, 0.3828957974910736, -0.31765270233154297, -0.6965875029563904, -0.190327987074852, 0.7419700622558594, 0.008335542865097523, -0.037644471973180...
I'm trying to do conditional formatting so that the cell color will change if the value is different from the value in the cell left of it (each column is a month, in each row are the expenses on certain object. I want to monitor easily changes in prices over months.) I can do it per cell and format-drag it, but I wou...
[ 0.49238094687461853, 0.3261525630950928, 0.1509176790714264, -0.07013615220785141, 0.1330006718635559, 0.30280548334121704, -0.3013816475868225, -0.3648746907711029, -0.08368325978517532, -0.47129201889038086, 0.08468370139598846, 0.20287224650382996, -0.13250191509723663, 0.12825272977352...
We had an asp.net 1.1 application that we recently migrated to 3.5. We are facing some problems when we do code modification on the migrated application. Here is what is happening 1. In the asp.net 1.1 application we have the page directive codebehind="ePC.aspx.cs". This migrated fine. 2. We made some code changes to ...
[ 0.38824430108070374, -0.17518837749958038, 0.3093765676021576, 0.1585387885570526, -0.062131140381097794, -0.2007552683353424, 0.22182786464691162, -0.33374080061912537, -0.5782700181007385, -0.7413223385810852, -0.1338312029838562, 0.32420647144317627, -0.35464614629745483, -0.12646636366...
be deployed along with the aspx page. We are not sure why this is happening. I have attached an example page directive **In VisualStudio with CodeFile** ``` <%@ Page language="c#" Codefile="ePC.aspx.cs" AutoEventWireup="True" Inherits="SPUniversal.Web.ePC" %> ``` **After publishing the website** ``` <%@ page la...
[ 0.30778685212135315, -0.17717881500720978, 0.8584762811660767, 0.18881329894065857, -0.05108857527375221, -0.1839297115802765, 0.22193434834480286, -0.5008277297019958, -0.16723838448524475, -0.7477148175239563, -0.297843337059021, 0.642406702041626, -0.3865956664085388, -0.263271242380142...
As a fun side-project for myself to help in learning yet another PHP MVC framework, I've been writing Reversi / Othello as a PHP & Ajax application, mostly straightforward stuff. I decided against using a multidimensional array for a number of reasons and instead have a linear array ( in this case 64 elements long ) an...
[ 0.2074616253376007, 0.16266290843486786, 0.44075191020965576, 0.17593684792518616, 0.0216095931828022, 0.011578146368265152, 0.06390560418367386, -0.24711133539676666, -0.10009149461984634, -0.2323392629623413, 0.24098221957683563, 0.26603835821151733, -0.6210159659385681, 0.34875121712684...
return array($x, $y); } //Not a surprise but this is .003 MS slower on average function int2coord_2($i){ $b = base_convert($i, 10, 8); $x = (int) ($b != 0 ? $b/8 : 0); // could also be $b < 8 for condition $y = $b % 10; return array($x, $y); } ``` And for posterity sake, the method I wrote for coord...
[ 0.09083715081214905, -0.04706455022096634, 0.4137328267097473, 0.24223041534423828, -0.044456444680690765, -0.0027469571214169264, 0.30304357409477234, -0.0009776692604646087, -0.25585252046585083, -0.4081951379776001, 0.04263433441519737, 0.412026971578598, -0.045253731310367584, 0.260644...
but using a pre-computed lookup table has predominantly shown to be the fastest, guess trading memory for speed is always a winner? * There was a table with times here but I cut it due to styling issues with SO. I don't have the time to measure this myself right now, but I would suspect that a pre-computed lookup tabl...
[ 0.10174757242202759, 0.11987505853176117, 0.19368208944797516, 0.029147742316126823, 0.042669303715229034, 0.25557994842529297, 0.11531806737184525, -0.014962878078222275, -0.24432110786437988, -0.7620930671691895, 0.04935333505272865, 0.6141933798789978, -0.2204994112253189, -0.0088438177...
for ($i=0; $i<64; $i++) { $this->_table[$i] = array( (int)($i/8), (int)($i%8) ); } } function int2coord( $i ) { return $this->_table[$i]; } } $conv = new Converter(); $coord = $conv->int2coord( 42 ); ``` Of course, this does add a lot of over-head so in practice you wou...
[ -0.014958863146603107, -0.05933280661702156, 0.6948676705360413, -0.17422014474868774, 0.24889595806598663, 0.061269551515579224, 0.2714286744594574, -0.48215964436531067, 0.06179898977279663, -0.6960089206695557, -0.17735980451107025, 0.6128786206245422, -0.29951170086860657, 0.1573811322...
I'm trying to commit to my local SVN which has been working just fine, but today its giving this error: ``` Unable to open repository 'file:///C:/wamp/www/svns/[myproject]/[dir]/[subdir]' ``` What could be the problem? Edit: full error: ``` Commit failed (details follow): Unable to open an ra_local session to URL...
[ -0.2027343213558197, 0.29849356412887573, 0.35993748903274536, -0.3444063663482666, -0.17238150537014008, 0.008382721804082394, 0.7875835299491882, 0.0015800701221451163, -0.5127743482589722, -0.37183624505996704, -0.29867950081825256, 0.7346612811088562, -0.14421364665031433, 0.3390103578...
when there are multiple users for a repository. Therefore you might want to use the svn:// URL scheme to verify if the repository has indeed been corrupted. This is because of the manner in which Subversion handles different URL schemes - it uses the repository access layer to handle the URL schemes. Different modules...
[ 0.6041604280471802, -0.023318707942962646, -0.029536627233028412, -0.0479622446000576, -0.36262375116348267, 0.031736813485622406, 0.5524531602859497, 0.005902810487896204, -0.27689388394355774, -0.20936033129692078, 0.18923383951187134, 0.6060075759887695, -0.3446214199066162, 0.281675785...
presumptuous here, but assuming that you have the [svnserve daemon configured to run as a Window Service](http://svnbook.red-bean.com/en/1.5/svn.serverconfig.svnserve.html#svn.serverconfig.svnserve.invoking.winservice). The root directory for svnserve is important here - the path in the URL is relative to the root. As...
[ 0.08638255298137665, -0.01697723940014839, 0.5020930171012878, 0.15560171008110046, -0.09118340909481049, -0.4350930452346802, 1.0285758972167969, -0.15748269855976105, 0.05571458488702774, -0.32535073161125183, -0.3040153384208679, 0.47735193371772766, 0.0018589417450129986, 0.35943114757...
do a recovery. 2. [Setting repository permissions correctly](http://subversion.tigris.org/faq.html#reposperms) PS: Backups are helpful.
[ 0.041781339794397354, -0.38486066460609436, 0.18063879013061523, 0.2172071933746338, -0.005524218548089266, -0.3273821771144867, 0.49937570095062256, -0.2011410892009735, -0.30722013115882874, -0.32298508286476135, -0.6027548909187317, 0.6165814995765686, -0.33703145384788513, -0.431027770...