text
stringlengths
0
30.5k
title
stringclasses
1 value
embeddings
listlengths
768
768
display:inline-block; padding:0; margin:0; } </style> <span>Test</span> <span>Test2</span> ``` It's spacing them apart because you have space between them - the newline.
[ 0.016945375129580498, -0.06874771416187286, 0.5675659775733948, -0.013186505064368248, -0.3860218822956085, 0.05289865657687187, -0.1787455976009369, -0.5037511587142944, -0.20842517912387848, -0.7814262509346008, -0.041635457426309586, 0.15245376527309418, -0.0354483462870121, -0.08183263...
What do the following mean in an sql sytax: 1. (+) after a condition eg: "WHERE table1.col1 = table2.col2 (+) 2. What does /\* \*/ after select signify , i vaguely remember it being a suggestion to the optimizer, but where can i find more reference on this eg: select /\* \*/ ... 1. The `(+)` means an outer join synta...
[ 0.1549862027168274, -0.03337631747126579, 0.18535134196281433, -0.17253485321998596, -0.1470697820186615, -0.23516161739826202, -0.20746910572052002, -0.2204696238040924, -0.09263156354427338, -0.3312893509864807, -0.23820734024047852, 0.39011019468307495, -0.4740120768547058, -0.039679590...
On my Mac and any other Unix machine, when I delete a file by any of the several available methods (`rm` on the command line, drag to trash, press delete key) it usually happens instantly. Occasionally it takes a few seconds if it's a huge file. On Windows, when I try to delete something a dialog comes up with a progr...
[ 0.04327590391039848, -0.01264460850507021, 0.49122366309165955, 0.04717089980840683, -0.0056421491317451, -0.033305250108242035, 0.4963989853858948, 0.11833389848470688, -0.6706598401069641, -0.5117632150650024, -0.5218026638031006, 0.5500971078872681, 0.12929300963878632, 0.27290716767311...
to click those "are you sure..." dialogs? Have you tried on the command line? ``` del /q filename ``` Optionally you could also install MinGW or Cygwin to get the same commands available in Windows as in Linux/Unix. Please note that file deletion might be **slow** if you keep **many files in your Recycle Bin**. Emp...
[ 0.34650540351867676, -0.11253850162029266, 0.298541396856308, 0.2760607898235321, 0.17895787954330444, -0.5120049118995667, 0.3969738185405731, 0.1102105975151062, -0.24152840673923492, -0.7144967317581177, -0.2317645251750946, 0.9374710917472839, -0.06155473738908768, 0.16719181835651398,...
Folders in Windows XP](http://support.microsoft.com/kb/320031)
[ -0.08431831002235413, 0.08111788332462311, 0.414520263671875, 0.14534610509872437, 0.07093508541584015, -0.05856253206729889, 0.04722293093800545, 0.13790754973888397, -0.6522496938705444, -0.2886978089809418, -0.3692050576210022, 0.5233840942382812, -0.26912203431129456, -0.19649651646614...
So I have this website that will be accessed via an SSL connection ("<https://mystupidwebsite/etc>...") I am using themes in conjunction with a single css file. when the page is rendered though, the CSS link tag in the header still has the <http://mystupidwebsite/etc>... full path. How do I get it to regester the css...
[ 0.3723675608634949, -0.086843341588974, 0.5134530067443848, 0.2410915046930313, -0.24584200978279114, -0.30386650562286377, 0.14457248151302338, 0.1787266582250595, -0.47027066349983215, -0.7754857540130615, 0.1184229701757431, 0.46213406324386597, -0.25935840606689453, 0.2696598768234253,...
to `/path/to/style.css` instead of with the full `http://example.com/path/to/style.css`. This assumes you've got the same content being served to HTTPS and HTTP requests. If not, you'll need to make an alias or symbolic link or something.
[ 0.6638903021812439, -0.1769457310438156, 0.3514135777950287, 0.03700794279575348, -0.14552617073059082, -0.35436949133872986, 0.3010334074497223, 0.1710677593946457, -0.4331606328487396, -0.6920452117919922, -0.28381451964378357, 0.3772806227207184, -0.12148807942867279, 0.0853370949625969...
There is a "How To" on adding developers to the TFS on MSDN. <http://msdn.microsoft.com/en-us/library/bb668968.aspx> It has 3 main parts: Step 1 – Grant Access to the Team Project Step 2 – Grant Access to the SharePoint Project Site Step 3 – Grant Access to SQL Server Reporting Services Fair enough, it works for indi...
[ 0.4217369556427002, 0.09100647270679474, 0.19625510275363922, 0.21424850821495056, -0.003999785054475069, -0.12574997544288635, -0.03436710685491562, -0.4507787227630615, -0.08337488025426865, -0.6569244265556335, -0.01901949942111969, 0.47842299938201904, -0.00405822554603219, -0.10428407...
is interested, I found a tool called TFS Admin Tool <http://www.codeplex.com/TFSAdmin> It's buggy and unstable, and does not do exactly what I need, but very close to. "The TFS Admin Tool allows a TFS administrator to quickly add users to all three platforms utilized by Team Foundation Server: Team Foundation Server,...
[ 0.3224413990974426, 0.09762134402990341, 0.4426710605621338, 0.27298495173454285, 0.08548297733068466, -0.226028174161911, 0.05510320886969566, -0.16767695546150208, -0.09065631777048111, -0.7761878967285156, 0.06309981644153595, 0.3326837420463562, -0.3391592800617218, 0.04811171442270279...
Compiler error [CS0283](http://msdn.microsoft.com/en-us/library/ms228656(VS.80).aspx) indicates that only the basic POD types (as well as strings, enums, and null references) can be declared as `const`. Does anyone have a theory on the rationale for this limitation? For instance, it would be nice to be able to declare ...
[ -0.0407106839120388, 0.3699813783168793, 0.0824170708656311, -0.2608429491519928, -0.004588804207742214, -0.08358466625213623, 0.31955593824386597, 0.1557437777519226, -0.002706811996176839, -0.24326318502426147, -0.1616283804178238, 0.5090157389640808, -0.6220813989639282, 0.1481797397136...
"foo"; ``` This would rule out any mutable types, so maybe they chose this limitation rather than having to determine at compile time whether a given type is mutable? From the [C# specification, chapter 10.4 - Constants](http://msdn.microsoft.com/en-us/library/aa645749(VS.71%29.aspx): *(10.4 in the C# 3.0 specific...
[ 0.18592150509357452, 0.10274265706539154, 0.0688553899526596, -0.03855614364147186, -0.032024309039115906, 0.040726907551288605, 0.2073550969362259, -0.029981903731822968, -0.11397238820791245, -0.1759919375181198, -0.19805845618247986, 0.6072344183921814, -0.5828371047973633, 0.3446474373...
is no way for the compiler to do that execution, and thus compute the results, at compile time. Also, since there is no way to tag a method as invariant (ie. there is a one-to-one mapping between input and output), the only way for the compiler to do this would be to either analyze the IL to see if it depends on things...
[ 0.06491129845380783, -0.034504037350416183, 0.03452519699931145, 0.17390669882297516, -0.3761872947216034, -0.04768167808651924, 0.14993946254253387, -0.38627389073371887, -0.03893420845270157, -0.4427078068256378, -0.11470790952444077, 0.26244890689849854, -0.5115982890129089, 0.079380527...
literals. As such, any expression using an IntPtr will need to call code in the IntPtr structure, and this is what is not legal for a constant declaration. The only legal constant value type example I can think of would be one that is initialized with zeroes by just declaring it, and that's hardly useful. As for how ...
[ 0.4262678325176239, 0.09959963709115982, 0.05736548826098442, 0.03822232410311699, -0.28687864542007446, -0.22297117114067078, 0.38055142760276794, 0.1256750077009201, -0.14881163835525513, -0.15930652618408203, -0.1022116094827652, 0.6636418104171753, -0.5311698317527771, 0.09111642837524...
this location * If you decompile the code, it will have magic numbers in it, simply because the original "reference" to the constant is, as mentioned above, not present, only the value of the constant * The compiler can use this to optimize, or even remove, unnecessary code. For instance, `if (SomeClass.Version == 1)`,...
[ 0.1856383979320526, -0.00024507101625204086, 0.02244953252375126, 0.03942631557583809, 0.3923770487308502, -0.19395793974399567, 0.3979593515396118, 0.010795317590236664, -0.22880928218364716, -0.5666187405586243, -0.3225421607494354, 0.20481456816196442, -0.22686512768268585, 0.1061992719...
into the code, and not a reference to the constant, using constants from other assemblies will not automagically update the compiled code in any way if the value of the constant should change (which it should not!) In other words, with the following scenario: 1. Assembly A, contains a constant named "Version", having...
[ 0.4313386082649231, 0.1358128935098648, 0.01619938760995865, -0.11626336723566055, 0.22520004212856293, -0.03650209307670593, 0.5596163272857666, -0.3526102900505066, -0.18292298913002014, -0.3685967028141022, -0.15911714732646942, 0.36719709634780884, -0.5237164497375488, 0.08893050998449...
(but not B) In this case, assembly B, in its compiled form, will still compare the value of 1 to 1, because when B was compiled, the constant had the value 1. In fact, if that is the only usage of anything from assembly A in assembly B, assembly B will be compiled without a dependency on assembly A. Executing the cod...
[ 0.49613139033317566, 0.0860304981470108, -0.0032209299970418215, -0.014394636265933514, 0.054280899465084076, 0.057921893894672394, 0.25192975997924805, 0.017701173201203346, -0.31598517298698425, -0.23667795956134796, -0.16755810379981995, 0.5052335262298584, -0.5324518084526062, 0.101931...
guarantee that all other assemblies are rebuilt simultaneously, a readonly field is more appropriate than a constant. So this is ok: * public const Int32 NumberOfDaysInAWeekInGregorianCalendar = 7; * public const Int32 NumberOfHoursInADayOnEarth = 24; while this is not: * public const Int32 AgeOfProgrammer = 25; * ...
[ 0.40229538083076477, 0.263297438621521, 0.30380013585090637, -0.22658176720142365, 0.21882851421833038, -0.05230943113565445, 0.587624192237854, -0.4233929514884949, -0.29545608162879944, -0.40058526396751404, -0.031001422554254532, 0.7484702467918396, -0.14004655182361603, 0.1905937045812...
a look at the `decimal` type. ``` public class Test { public const decimal Value = 10.123M; } ``` Let's look at what this class looks like *really* when looked at with ildasm: ``` .field public static initonly valuetype [mscorlib]System.Decimal X .custom instance void [mscorlib]System.Runtime.CompilerServices.D...
[ -0.09283064305782318, 0.07042573392391205, 0.3534887135028839, 0.15130218863487244, 0.042823296040296555, 0.01969989761710167, 0.009451744146645069, 0.22078458964824677, -0.0864073857665062, -0.0997425764799118, -0.09399574249982834, 0.49992483854293823, -0.012137959711253643, 0.0196446739...
magic. Now, this is the only such magic I know of with the C# compiler but I thought it was worth mentioning.
[ 0.3370480239391327, 0.2405632585287094, 0.183692067861557, 0.16221369802951813, -0.20054073631763458, -0.26787269115448, 0.4385903477668762, 0.23573008179664612, -0.2240016609430313, -0.2888387143611908, 0.10084038227796555, 0.32136306166648865, 0.25307929515838623, 0.15260353684425354, ...
Does anyone know of a site or page, or know the order of execution for the events of the HTTPApplication class for HTTPModule event execution? I found the [MSDN Documentation](http://msdn.microsoft.com/en-us/library/system.web.httpapplication_events.aspx) for all of the events, but it doesn't show a list of process st...
[ 0.008975441567599773, -0.11276402324438095, 0.5965103507041931, 0.19811734557151794, -0.1629537045955658, -0.08655967563390732, 0.4875771999359131, -0.641278088092804, -0.2610902786254883, -0.43992939591407776, -0.3436002731323242, 0.24913479387760162, -0.15551415085792542, 0.0901134908199...
available for modules to synchronize with for each request transmission. The order of these events is non-deterministic. * PreSendRequestHeaders * PreSendRequestContent * Error See the article for full info.
[ 0.04645548015832901, -0.11107081919908524, 0.19641053676605225, 0.24182657897472382, 0.16386567056179047, -0.1595696657896042, 0.520440936088562, 0.016225622966885567, -0.36949312686920166, -0.49665457010269165, -0.4346925616264343, 0.34982335567474365, -0.20636172592639923, 0.307758718729...
I'm using the [jQuery autocomplete plugin](http://docs.jquery.com/Plugins/Autocomplete) to get a list of locations, which works fine. But if the user clicks the browser's back button after submitting the page with the autocomplete textbox, the textbox is empty. If I take the autocomplete off the textbox and submit & cl...
[ 0.16874606907367706, 0.25400450825691223, 0.35717809200286865, -0.04643521457910538, 0.051319628953933716, -0.1235593855381012, 0.4185791313648224, 0.18406137824058533, -0.23486359417438507, -0.587805449962616, -0.32888421416282654, 0.6713280081748962, -0.39009425044059753, -0.063162699341...
is so that the browser's autocomplete history doesn't conflict with jquery's autocomplete, but in Firefox, fields that have this attribute don't get pre-populated when the user clicks the back button. I'm guessing there isn't a way around this, it appears to be the default browser behaviour. If anyone knows different ...
[ 0.39179930090904236, 0.08198818564414978, 0.1890052706003189, -0.152881920337677, -0.17242023348808289, -0.16237512230873108, 0.3043953478336334, 0.5731263756752014, -0.33129772543907166, -0.28976255655288696, -0.22838766872882843, 0.6556494235992432, -0.27191388607025146, -0.2147304564714...
What does "Generate Debug Info" mean in VB/C#? The difference between "none" and "pdb-only" only is pretty clear. But what about "pdb-only" and "full"? The compiler will generate a pdb file for you when you build which contains the symbols for your application and can be used by the Visual Studio debugger and external...
[ 0.37874293327331543, 0.14197233319282532, 0.23382791876792908, -0.037909135222435, -0.057207025587558746, -0.20882034301757812, 0.1884496659040451, -0.028608083724975586, -0.048934560269117355, -0.26788529753685, -0.4883350133895874, 0.8156877756118774, -0.37151089310646057, -0.22217290103...
debugging information will be generated on build, which will not add the `[DebuggableAttribute]` to the compiled code which is used by the JIT compiler to link the code the debugging information. More info can be found [here](https://web.archive.org/web/20090206175153/http://www.rp2c.com/blogofbob/VisualStudioTheBreak...
[ 0.15318842232227325, 0.3540743589401245, 0.020392607897520065, -0.03529265895485878, -0.1730068475008011, -0.11116942018270493, 0.789339005947113, -0.01654151827096939, -0.036220043897628784, -0.23375678062438965, -0.3153958022594452, 0.3095743656158447, -0.14832943677902222, 0.35034817457...
I have a camera that returns raw images that can easily be converted to a bitmap that can be saved to a file by the following C# method (that I did not write). From various sources, I have determined that the pictures have 8 bits per pixel, and may or may not be grayscale. ``` private void rawImgToBmp(byte[] imgData, ...
[ 0.5234933495521545, 0.02112538367509842, 0.5357815623283386, -0.10358774662017822, 0.03400582820177078, 0.17794443666934967, 0.24283161759376526, -0.5516836047172546, -0.18535847961902618, -0.5828474760055542, 0.12050484120845795, 0.5826647877693176, -0.364304780960083, 0.07584135979413986...
256; i++) { bmp.Palette.Entries[i] = Color.FromArgb(255, i, i, i); } //Copy the data from the byte array into the bitmap BitmapData bmpData = bmp.LockBits( new Rectangle(0, 0, bmp.Width, bmp.Height), ImageLockMode.WriteOnly, bmp.PixelFormat);
[ -0.07021194696426392, 0.038507893681526184, 0.6072819232940674, -0.33053553104400635, -0.028761060908436775, 0.36485952138900757, 0.19058392941951752, -0.581868588924408, -0.2310948371887207, -0.2580721378326416, -0.21131139993667603, 0.2702905535697937, -0.5279070734977722, 0.168655231595...
Marshal.Copy(imgData, 0, bmpData.Scan0, getWidth() * getHeight()); bmp.UnlockBits(bmpData); //Unlock the pixels bmp.Save(FileName); } ``` My question is: how would I go about writing the equivalent method in C++, using built in functions of Windows CE 4.2? erisu: thanks for the palette code, I th...
[ 0.5054419040679932, 0.2638651728630066, 0.21442212164402008, 0.2576395273208618, -0.06878164410591125, -0.11167412996292114, 0.09231459349393845, -0.7193481922149658, 0.02683943323791027, -0.7615615725517273, 0.1348513662815094, 0.5408538579940796, -0.08247178047895432, -0.0562190525233745...
answer, I recommend that you understand the BMP format as fully as possible, so you can adjust the header fields accordingly. The complicated loop at the end is my workaround for an issue with my hardware/OS, where it would not write all of the data I supplied to fwrite. It should work in any environment, though. ``...
[ 0.3414258062839508, 0.19123393297195435, 0.5398740768432617, 0.06013927981257439, 0.0477677658200264, -0.04500207677483559, 0.08752001076936722, -0.4585186839103699, -0.37690651416778564, -0.47112151980400085, -0.14181385934352875, 0.6556978821754456, -0.39527952671051025, 0.06267376244068...
LPTSTR lpCmdLine, INT nShowCmd ) { int w = 1920, h = 1080; // My values, yours may vary //////////////////////// File Operations /////////////////////////////// // Reading raw img FILE* f = fopen("\\FlashDisk\\raw_img.bin","r"); if(NULL == f){printf("BAD");exit(1);} // Obtaini...
[ -0.12754148244857788, -0.2730388045310974, 0.6816297173500061, -0.2503422796726227, 0.1518862545490265, 0.214798703789711, -0.06119890138506889, -0.6418375372886658, -0.3968163728713989, -0.547889769077301, -0.22438547015190125, 0.5849435925483704, -0.5021957159042358, -0.02510449662804603...
(DWORD)ftell (f); fseek (f , 0L , SEEK_SET); char *imgData = (char*) malloc (sizeof(char)*fsize); if(NULL == imgData) {printf("NOT imgData");exit(2);} // Copy contents of file into buffer DWORD result = fread(imgData,1,fsize,f); if (result != fsize) { printf ("Reading error. Expected: ...
[ -0.28247058391571045, -0.17518679797649384, 0.7029507160186768, -0.5597109794616699, 0.13145112991333008, 0.35370489954948425, 0.41988733410835266, -0.45038577914237976, 0.05781326815485954, -0.4949139654636383, -0.8357943892478943, 0.6464440226554871, -0.49288275837898254, 0.0927433744072...
fclose(f); exit (3); } fclose(f); //////////////////////// BMP Operations /////////////////////////////// /* A bitmap has the following components: * 1. BMP file header * 2. Bitmap Information (DIB) header * 3. Color Palette * 4. Raw Data */ BITMAPFILEHEADER bmfh; ...
[ 0.026344848796725273, -0.33882981538772583, 0.6200760006904602, -0.02764100953936577, 0.013945898041129112, 0.08996409177780151, -0.19898417592048645, -0.6503847241401672, -0.1460997462272644, -0.43053820729255676, -0.1849604696035385, 0.20509298145771027, -0.6146247982978821, -0.069134026...
= 0x4D42; // Magic # bmfh.bfSize = sizeof( bmfh ) + sizeof( BITMAPINFOHEADER ) + NPAL_ENT*sizeof(PALETTEENTRY) + w*h; // Or total file size if w/h not known bmfh.bfOffBits = sizeof( bmfh ) + sizeof( BITMAPINFOHEADER ) + NPAL_ENT*sizeof(PALETTEENTRY); BITMAPINFOHEADER bmih; ZeroMemory( &...
[ 0.09888771921396255, 0.22176918387413025, 0.17713530361652374, -0.079682357609272, 0.11995116621255875, 0.31248870491981506, 0.34868478775024414, -0.8538764715194702, -0.3049355447292328, -0.26684269309043884, -0.5018478631973267, 0.34248337149620056, -0.313719779253006, 0.2248982489109039...
= 8; bmih.biCompression = BI_RGB; bmih.biSizeImage = w * h; int palSize = NPAL_ENT*sizeof(PALETTEENTRY); LOGPALETTE *logpal=(LOGPALETTE*)new BYTE[sizeof(LOGPALETTE)+palSize]; if(!logpal) {delete [] imgData; printf("!logpal\n"); exit(4);} logpal->palVersion=0x300; logpal->palNumEntries=NPAL_...
[ -0.19913916289806366, -0.34410905838012695, 0.5052065253257751, -0.1416613757610321, -0.035139478743076324, 0.7758333683013916, 0.17519618570804596, -0.42672884464263916, -0.6514432430267334, -0.45487138628959656, -0.3369436264038086, 0.3323115408420563, -0.16214963793754578, 0.08469226956...
} while(++i<NPAL_ENT); // Complete bitmap is now in memory, time to save it TCHAR bmpfname[80]; wsprintf( bmpfname, (TCHAR*) TEXT( "\\USBDisk\\out.bmp" ) ); // open the file for writing FILE *bmpFile = _wfopen(bmpfname,L"wb"); if(!bmpFile) { delete[] imgData; delete[] logpal; exit(6); } ...
[ 0.13921715319156647, -0.04032968729734421, 0.6581966280937195, -0.1889088898897171, 0.21311014890670776, 0.2600412964820862, 0.3479270040988922, -0.2544899582862854, -0.3283166289329529, -0.9152041077613831, -0.27098673582077026, 0.6453456878662109, -0.04418107122182846, 0.0717009082436561...
if(totWrit < sizeof(bmfh)){ // File header offset = totWrit; totWrit += fwrite( ((char*)&bmfh)+offset, 1, sizeof(bmfh)-offset, bmpFile ); } else if(totWrit<sizeof(bmfh)+sizeof(bmih)){ // Image header offset = totWrit - sizeof(bmfh); totWrit += fwrite( ((ch...
[ 0.18197102844715118, -0.15611490607261658, 0.7506994605064392, -0.3717266917228699, 0.4887228012084961, 0.15272778272628784, 0.3289916515350342, -0.6588670611381531, -0.012032264843583107, -0.5153287649154663, -0.3780139088630676, 0.9487274885177612, -0.5411263108253479, -0.107130751013755...
} else if(totWrit<sizeof(bmfh)+sizeof(bmih)+palSize) { // Pallette offset = totWrit - sizeof(bmfh) - sizeof(bmih); totWrit += fwrite( ((char*)&logpal->palPalEntry)+offset, 1, palSize-offset, bmpFile ); } else { // Image data offset = totWrit - sizeof(bmfh) - s...
[ 0.14822271466255188, -0.21451523900032043, 0.7116403579711914, -0.15520763397216797, 0.46832790970802307, 0.5678688883781433, -0.07898592948913574, -0.4191381633281708, -0.4360755681991577, -0.4492606222629547, -0.23640337586402893, 0.8904173970222473, -0.41817253828048706, -0.098010502755...
if(bmfh.bfSize-totWrit >= IO_SIZE) { writeAmt = IO_SIZE; } else { writeAmt = bmfh.bfSize-totWrit; } totWrit += fwrite( &imageBuffer[offset], 1, writeAmt, bmpFile );
[ 0.10064826160669327, -0.013521432876586914, 0.7408873438835144, -0.5998567342758179, 0.2724151015281677, 0.14702437818050385, 0.2591317892074585, -0.5707564353942871, -0.03495677188038826, -0.5128070116043091, -0.376629501581192, 0.9132973551750183, -0.5557128190994263, -0.3460606336593628...
} // Close and open after each iteration to please WinCE fflush(bmpFile); fclose(bmpFile); Sleep(4000); bmpFile = _wfopen(bmpfname,L"ab"); if(!bmpFile) {flog->lprintf("Couldn't reopen bmpfile"); delete [] logpal; return 0;} } fclose(bmpFile); if(totWrit != ...
[ 0.2511381208896637, -0.2258361577987671, 0.7784242630004883, -0.5021591782569885, 0.4092991352081299, 0.3144373595714569, 0.6249088644981384, -0.39392682909965515, -0.49571213126182556, -0.7702490091323853, -0.2654934823513031, 0.8765374422073364, -0.276202529668808, -0.006316908169537783,...
mismatch: %d/%d.",totWrit,bmfh.bfSize); delete [] imgData; delete [] logpal; exit(-1); } // Cleanup delete [] imgData; delete [] logpal; return 0; } ```
[ -0.2933289706707001, 0.03892112895846367, 0.0920204296708107, -0.1565248817205429, 0.5761712193489075, 0.2917468249797821, 0.6052981019020081, -0.14781227707862854, -0.25146371126174927, -0.4224046766757965, -0.4072265326976776, 0.609169065952301, -0.38288208842277527, 0.2423773556947708, ...
Is there a way to detect a right click followed by paste with JavaScript on IE and Firefox ? Update: I decided to use Jquery to do it: ``` $('#controlId').bind('paste', null, function() { // code }); ``` It's not exactly what I was looking (because it gets fired on 'ctrl + v' as well as in 'right click + paste...
[ -0.11766808480024338, 0.018322434276342392, 0.42474693059921265, -0.14205870032310486, -0.049366410821676254, -0.21875563263893127, 0.5067823529243469, -0.3492967188358307, -0.055277757346630096, -0.5342341661453247, -0.07818714529275894, 0.6123349666595459, -0.43119165301322937, -0.181305...
How can I generate a assembly qualified type name? For an example, when configuring a membership provider, I would have to provide a assembly qualified type name for "SqlMembershipProvider" (in this example, i have copied the below configuration from somewhere) in "type" attribute. How do you generate that assembly q...
[ 0.4330131709575653, -0.014723106287419796, 0.29150620102882385, 0.18146830797195435, 0.057714156806468964, -0.18590223789215088, 0.09838095307350159, -0.41251346468925476, -0.3141574263572693, -0.6343497633934021, 0.10552941262722015, 0.3724168837070465, -0.09804832935333252, 0.29677391052...
System.Web, Version=2.0.0.0, > Culture=neutral,PublicKeyToken=b03f5f7f11d50a3a" > connectionStringName="LocalSqlServer"/> > </providers> > </membership> > > ``` ***[UPDATE]***: [Simpler PowerShell version](https://stackoverflow.com/questions/622902/powershell-tips-tricks-for-net-developers/622...
[ 0.23251350224018097, -0.05482916533946991, 0.5905278325080872, 0.2692302167415619, 0.22825349867343903, -0.1567266583442688, 0.3533024787902832, -0.24704936146736145, -0.3061468005180359, -0.6321532726287842, -0.06285189837217331, 0.20858602225780487, -0.09664548933506012, 0.10041025280952...
want to generate the assembly qualified type name with all the references set, it is easy to build a test script using reflection.. ``` using System; using System.Reflection; ........ Type ty = typeof(System.Web.Security.SqlMembershipProvider); string fullname = ty.AssemblyQualifiedName; //"System.Web.Security.SqlMem...
[ 0.3955903649330139, 0.1540711373090744, 0.0735880509018898, -0.01658662222325802, 0.12148032337427139, 0.03604763373732567, 0.4596474766731262, -0.4165637493133545, -0.01364455372095108, -0.40981924533843994, -0.017561551183462143, 0.31811264157295227, -0.33748990297317505, 0.2567968666553...
Let's say you have a domain entity User and you want to support the ability for a User to add an item to their shopping cart. Now, we want to make sure that the items in the shopping cart are unique, so we create the following function inside the User class: ``` function AddItemToCart(Item item) { // Add business ...
[ 0.3011093735694885, 0.018694138154387474, 0.3250383138656616, 0.2675701081752777, -0.03606276959180832, -0.1687094122171402, -0.2111484557390213, -0.03625056520104408, -0.2944827377796173, -0.5525410771369934, -0.0010777359129860997, 0.46290552616119385, -0.33273133635520935, 0.38219869136...
sort of IEmailer dependency into the User class. The alternative would be to create a service to handle this transaction (e.g. ShoppingCartService) which would perform the business logic and send out the e-mail. However, this leads to a rather anemic domain (i.e. the User class is nothing but getters/setters) Logic th...
[ 0.3077041506767273, -0.0106347082182765, 0.14073295891284943, 0.03239022567868233, 0.03216000273823738, -0.3828168213367462, 0.34363338351249695, 0.05801437422633171, 0.07150259613990784, -0.5669493675231934, -0.17059913277626038, 0.49616020917892456, -0.6340224146842957, 0.292632251977920...
your ubiquitous language. I would write this: ``` class ShoppingCartService { private EmailService emailer; public void addItemToUserCart(User u, Item i) { u.addItemToCart(i); this.emailer.sendEmailTo(u, "Item " + i.toString() + " was added to your cart"); } } ``` [This related ques...
[ -0.010774475522339344, -0.02970275841653347, 0.6777832508087158, 0.029965024441480637, 0.19405975937843323, 0.10942328721284866, 0.189534991979599, 0.3917199373245239, -0.4170287847518921, -0.7799064517021179, -0.382964164018631, 0.6224531531333923, -0.768372118473053, 0.08503110706806183,...
Can a single regex be used to valdate urls and match all the parts, I have been working on one and what I have come up with so far is: ``` (?:(?P<scheme>[a-z]*?)://)?(?:(?P<username>.*?):?(?P<password>.*?)?@)?(?P<hostname>.*?)/(?:(?:(?P<path>.*?)\?)?(?P<file>.*?\.[a-z]{1,6})?(?:(?:(?P<query>.*?)#?)?(?P<fragment>.*?)?)...
[ -0.02707466296851635, -0.2432749718427658, 0.6621416807174683, 0.16659075021743774, -0.23427431285381317, 0.09025111794471741, 0.06553346663713455, -0.2655636668205261, -0.11215539276599884, -0.45675891637802124, -0.1000700369477272, 0.4529377520084381, -0.4256548285484314, 0.1674642115831...
> > mailto://user@unkwndesign.com and provide a named capture for all the components: > scheme eg. http https ftp ftps callto mailto and any other one not listed > > username > > password > > hostname including subdomains, domainand tld > > path eg /images/profile/ > > filename eg file.ext > ...
[ 0.21834200620651245, -0.12709200382232666, 0.584712028503418, -0.09283566474914551, -0.07353176921606064, 0.0010496831964701414, -0.05251931771636009, -0.2559186518192291, -0.24819624423980713, -0.6339023113250732, -0.43724584579467773, 0.16967856884002686, -0.5336633324623108, 0.012705543...
be used to find links in text. Modified version of [mingfai's regular expression](https://stackoverflow.com/questions/27745/getting-parts-of-a-url-regex#309360): ``` /^((?P<scheme>https?|ftp):\/)?\/?((?P<username>.*?)(:(?P<password>.*?)|)@)?(?P<hostname>[^:\/\s]+)(?P<port>:([^\/]*))?(?P<path>(\/\w+)*\/)(?P<filename>[-...
[ -0.30622372031211853, -0.15155713260173798, 0.8922315835952759, -0.1841791868209839, -0.09801947325468063, -0.12050137668848038, 0.23563998937606812, -0.3407273292541504, -0.27694424986839294, -0.6937933564186096, -0.16070933640003204, 0.0908256471157074, -0.35459545254707336, 0.2784761786...
C++ is unable to make a template out of a typedef or typedef a templated class. I know if I inherit and make my class a template, it will work. Examples: ``` // Illegal template <class T> typedef MyVectorType vector<T>; //Valid, but advantageous? template <class T> class MyVectorType : public vector<T> { }; ``` Is...
[ 0.29279136657714844, 0.1358795315027237, 0.22746917605400085, -0.08036024868488312, -0.13233362138271332, -0.2423257976770401, 0.23733966052532196, -0.25041908025741577, -0.009327583014965057, -0.46754053235054016, 0.011782892979681492, 0.6497607231140137, -0.7078999280929565, 0.0776830390...
if it is, but you don't want to reference vector in your code, you can do: ``` template <typename T> class MyVectorType { public: typedef std::vector<T> type; }; ```
[ 0.15934187173843384, -0.2729870080947876, 0.5368133783340454, 0.013955199159681797, -0.033177826553583145, 0.013371884822845459, -0.0746954157948494, 0.04925534874200821, 0.04594915732741356, -0.911969006061554, -0.03604160621762276, 0.496567964553833, -0.4539705514907837, 0.05662121623754...
Let's say I have the following objects: ``` squirrel_table - name - country_of_origin - id nut_table - id - squirrel_who_owns_me[fk to squirrel] ``` I want to retrieve a list of all squirrels in a particular country. The returned squirrel objects can be in a QuerySet, but do not need to be. A list will ...
[ 0.13708904385566711, 0.4096962511539459, 0.2549542784690857, 0.152887761592865, 0.013185647316277027, 0.34563305974006653, 0.05921148881316185, 0.17678624391555786, -0.6379857063293457, -0.2707359790802002, 0.13077989220619202, -0.31677231192588806, -0.41721728444099426, 0.1375975757837295...
PostgreSQL): ``` select sq.*, nut_counts.nut_count from squirrel_table sq, (select sq2.id as squirrel_id, count(nuts) as nut_count from squirrel_table sq2, nut_table nuts where nuts.squirrel_who_owns_me = sq2.id and sq.country_of_origin = 'USA' ...
[ -0.2140617072582245, 0.10889729112386703, 0.22207337617874146, 0.20656129717826843, 0.44428277015686035, 0.16203482449054718, -0.0996173769235611, 0.243169903755188, -0.46842160820961, -0.19693218171596527, -0.4335871934890747, -0.038917604833841324, -0.41752487421035767, 0.357532680034637...
where sq.id = nut_counts.squirrel_id ``` Is there a way to execute the SQL, take the cursor it generates, and turn it into a list of squirrel objects, and add the nut\_count to each squirrel? You probably want to read through [the documentation for the "extra()" method](http://docs.djangoproject.com/en/dev/ref/models...
[ -0.016866637393832207, 0.16554325819015503, 0.16411249339580536, 0.07496818155050278, 0.11568796634674072, 0.24826034903526306, -0.2940268814563751, -0.32515591382980347, -0.8841722011566162, -0.14901326596736908, -0.13603538274765015, 0.025051681324839592, -0.47122514247894287, -0.2016475...
I have been asked to build a web application that will be used to store and manipulate sensitive financial data for a private lending firm. Before I bite off more that I can chew, I am trying to figure out if there is anything I should know about legally hosting and securing this kind of information. I have read much a...
[ 0.7378255128860474, 0.2771201729774475, 0.24586521089076996, 0.35936450958251953, 0.3802485466003418, -0.28883594274520874, -0.298130601644516, 0.03414684534072876, -0.3409334421157837, -0.24388527870178223, 0.328523725271225, 0.593460202217102, 0.051171526312828064, 0.1221398115158081, ...
the sensitivity of this data to that of a bank. So my ultimate question is whether or not there are any laws regarding storing and transmitting this data. Obviously, an SSL certificate is in order, but what about the hosting. Should I get a dedicated private server or is shared hosting suitable? Any other input on th...
[ 0.6221457719802856, 0.16545045375823975, 0.15301382541656494, 0.349656879901886, 0.24629466235637665, -0.36215248703956604, -0.0911610871553421, 0.21964941918849945, -0.2971417307853699, -0.28408730030059814, 0.18253014981746674, 0.3250093460083008, 0.17708411812782288, -0.0097185764461755...
you to deal with. the long answer: **Get a Lawyer** and bill your client for the lawyer. The client should be providing you with all the compliance related specifications up front. If they aren't providing you the appropriate information ***Run Away***. If you choose to proceed with project make sure you have a liab...
[ 0.5386199951171875, 0.02564634382724762, 0.335985392332077, 0.02375173382461071, 0.04740191996097565, 0.23112472891807556, 0.19183433055877686, -0.03344709798693657, -0.31361714005470276, -0.69094318151474, -0.01897251605987549, 0.8346690535545349, 0.23049454391002655, -0.2174467146396637,...
Does anybody know of a fully thread-safe `shared_ptr` implementation? E.g. boost implementation of `shared_ptr` is thread-safe for the targets (refcounting) and also safe for simultaneous `shared_ptr` instance reads, but not writes or for read/write. (see [Boost docs](http://www.boost.org/doc/libs/1_37_0/libs/smart_pt...
[ 0.07859335839748383, 0.007198716048151255, -0.02267754077911377, 0.06897539645433426, -0.11906573921442032, -0.21787089109420776, 0.2921837866306305, -0.1486143171787262, -0.38229382038116455, -0.23361040651798248, -0.14338380098342896, 0.5676894783973694, -0.38815322518348694, -0.22558079...
on x86 architecture. EDIT2: An example use case for such a smart pointer would be where there are a number of worker threads which update a global shared\_ptr with a their current work item and a monitor thread that takes random samples of the work items. The shared-ptr would own the work item until another work item ...
[ 0.07751533389091492, -0.33926722407341003, 0.01534168142825365, 0.18211595714092255, 0.0737733468413353, -0.08876011520624161, -0.07411763072013855, -0.06224578619003296, -0.28642481565475464, -0.5011366009712219, -0.15916644036769867, 0.311687171459198, -0.7541016936302185, 0.243056789040...
but would be nice if a shared-ptr could do it. Another example is where the global shared-ptr holds a "processor", and is assigned by some thread, and used by some other thread. When the "user" thread sees that the processor shard-ptr is NULL, it uses some alternative logic to do the processing. If it's not NULL, it p...
[ -0.09690836817026138, -0.23736795783042908, 0.33515551686286926, 0.09509151428937912, 0.14808876812458038, 0.15361936390399933, 0.030558649450540543, -0.11373672634363174, -0.15753959119319916, -0.38962531089782715, 0.042443886399269104, 0.16286194324493408, -0.5726416707038879, 0.22788144...
= global\_ptr; If we break this down into its constituent operations: Thread 1: ``` A.refcnt++; tmp_ptr = exchange(global_ptr, A); if (!--tmp_ptr.refcnt) delete tmp_ptr; ``` Thread 2: ``` B.refcnt++; tmp_ptr = exchange(global_ptr, B); if (!--tmp_ptr.refcnt) delete tmp_ptr; ``` Thread 3: ``` local_ptr = global_...
[ -0.15449637174606323, -0.11586945503950119, 0.6180579662322998, -0.45649489760398865, 0.032003432512283325, 0.1358179897069931, 0.33135971426963806, -0.35088232159614563, -0.48326337337493896, -0.27745234966278076, -0.2592872083187103, 0.5030580759048462, -0.7951033711433411, 0.13495363295...
== BAD_PTR || !compare_exchange(global_ptr, tmp_ptr, A)) tmp_ptr = global_ptr; if (!--tmp_ptr.refcnt) delete tmp_ptr; ``` Thread 2: ``` B.refcnt++; while (tmp_ptr == BAD_PTR || !compare_exchange(global_ptr, tmp_ptr, A)) tmp_ptr = global_ptr; if (!--tmp_ptr.refcnt) delete tmp_ptr; ``` Thread 3: ``` tmp_ptr...
[ 0.11099953949451447, -0.0986100509762764, 0.358381062746048, -0.09917989373207092, 0.061046987771987915, 0.04304377734661102, 0.44884130358695984, -0.16130049526691437, -0.28980952501296997, -0.12524722516536713, -0.41848620772361755, 0.3920559585094452, -0.6340410113334656, 0.182588011026...
- but by that point you've reinvented the lock. This cost, which has to be borne by every operation, and is very similar in nature to what a lock would give you anyway, is why you generally don't see such thread-safe shared\_ptr implementations. If you need such a thing, I would recommend wrapping a mutex and shared\_...
[ 0.5448513627052307, 0.18345016241073608, -0.03780854493379593, 0.1722830832004547, 0.1795331835746765, -0.08991627395153046, 0.10395939648151398, -0.08359826356172562, -0.17082123458385468, -0.2667655646800995, -0.06135775148868561, 0.4092227816581726, -0.14635241031646729, 0.4790099263191...
It seems rare to read of a Python "virtual machine" while in Java "virtual machine" is used all the time. Both interpret byte codes; why call one a virtual machine and the other an interpreter? A virtual machine is a virtual computing environment with a specific set of atomic well defined instructions that are support...
[ 0.4901917576789856, 0.05837658792734146, -0.03786960616707802, 0.3592459559440613, -0.09100069850683212, -0.0873565673828125, 0.2242417335510254, 0.01608247309923172, -0.30917468667030334, -0.3426835536956787, -0.2138260006904602, 0.5537480711936951, -0.23314185440540314, 0.084584608674049...
codes) that are independent of the next. An instruction executes deterministically based only on the current state of the virtual machine and does not depend on information elsewhere in the instruction stream at that point in time. An interpreter on the other hand is more sophisticated in that it is tailored to parse ...
[ 0.2022639960050583, -0.19103142619132996, -0.2332909107208252, 0.3745723068714142, -0.06221383437514305, 0.26766258478164673, 0.381473571062088, -0.27183860540390015, 0.02128557488322258, -0.5891533493995667, -0.09744635969400406, 0.2527580261230469, -0.5114316344261169, 0.0228087287396192...
in the language can't be taken in isolation like they can relative to the instructions (byte codes) of a VM. A Java compiler converts Java language into a byte-code stream no different than a C compiler converts C Language programs into assembly code. An interpreter on the other hand doesn't really convert the program...
[ 0.15405678749084473, 0.1594790518283844, -0.45023080706596375, -0.12488935887813568, -0.2812146544456482, -0.07553283125162125, 0.346377432346344, -0.11151695996522903, -0.003534212475642562, -0.4956974685192108, -0.15244092047214508, 0.34888744354248047, -0.49748530983924866, -0.182908490...
Java VM is not really Java specific. You could make a compiler from other languages that result in byte codes that can be run on the JVM. On the other hand, I don't think we would really think of "compiling" some other language other than Python into Python for interpretation by the Python interpreter. Because of the ...
[ 0.3372693955898285, 0.10907217860221863, -0.06578649580478668, -0.1065850704908371, -0.3936415910720825, -0.3517994284629822, 0.2978127598762512, -0.09112682938575745, -0.28705865144729614, -0.3160794675350189, 0.064528688788414, 0.6216093897819519, -0.5261262059211731, -0.1846283823251724...
is where we can define intermediate forms of pre-parsed, pre-tokenized source code that is more readily directly interpreted. This sort of binary form is still interpreted at execution time, it is just starting from a much less human readable form to improve performance. However, the logic executing that form is not a ...
[ -0.12835867702960968, -0.12211576104164124, -0.09840398281812668, 0.326686292886734, -0.045267511159181595, 0.1822105497121811, 0.002007988980039954, 0.12251877784729004, -0.08577603846788406, -0.66081702709198, 0.02364739589393139, 0.1371607780456543, -0.1000092625617981, -0.0449970997869...
Has anyone tried ASP.NET MVC using IronPython? Having done a lot of Python development recently, it would be nice to continue with the language as I go into a potential ASP.NET MVC project. I'm especially interested in exploiting the dynamic aspects of Python with .NET features such as LINQ and want to know if this wi...
[ 0.4675033688545227, 0.04919159784913063, -0.1426568627357483, 0.07851220667362213, -0.24930664896965027, -0.1382913738489151, 0.21928825974464417, 0.17806504666805267, -0.3835633099079132, -0.2461431324481964, 0.1254582405090332, 0.5925482511520386, -0.12456764280796051, -0.022400917485356...
I was just wondering what network libraries there are out there for Python for building a TCP/IP server. I know that Twisted might jump to mind but the documentation seems scarce, sloppy, and scattered to me. Also, would using Twisted even have a benefit over rolling my own server with select.select()? I must agree t...
[ 0.47128555178642273, -0.3111315369606018, 0.2460327446460724, 0.33785343170166016, -0.0838608369231224, -0.23307549953460693, 0.19199499487876892, 0.07306849211454391, -0.29592451453208923, -0.6023391485214233, 0.20171105861663818, 0.510175347328186, 0.11323282122612, 0.03145822882652283, ...
much more complex stuff more quickly than if you were to write your own framework and it would also mean one less thing to bug hunt as Twisted is very much production proven. I don't really know of another framework that can offer as much as Twisted can, so my vote would definitely go for Twisted even if the docs aren...
[ 0.6743165254592896, 0.04169246554374695, 0.1531199812889099, 0.4694603979587555, -0.1745215207338333, 0.0031798253767192364, 0.3801557421684265, 0.17495211958885193, 0.0704207792878151, -0.5882225036621094, 0.3005889654159546, 0.6941116452217102, 0.1371881514787674, 0.21987761557102203, ...
Twisted (the PerspectiveBroker which is very useful comes to mind - <http://twistedmatrix.com/projects/core/documentation/howto/pb-intro.html>)
[ 0.35506734251976013, -0.4512079358100891, 0.4510946273803711, 0.23612667620182037, -0.20247693359851837, 0.09234543144702911, -0.19987596571445465, 0.20720341801643372, -0.18908999860286713, -0.45387524366378784, -0.06732585281133652, 0.17349684238433838, 0.08757767826318741, 0.15320277214...
I have a nullable DateTime column in my SQL Server 2005 table called DateTimeDeleted. I'd like to have a BIT type computed column that is 1 if DateTimeDeleted is not null, otherwise 0. However, I can't seem to get the syntax for the formula correct. I've tried: ``` (TsDeleted IS NULL) = 0 ``` but it gives me a syn...
[ -0.47852975130081177, -0.04759874567389488, 0.5740489959716797, -0.1725992113351822, -0.2909415662288666, -0.015165603719651699, 0.29895707964897156, -0.15293756127357483, -0.22948427498340607, -0.411912202835083, 0.31419485807418823, 0.5045977234840393, -0.5384023785591125, 0.122873827815...
Table MyTableName Add IsDeleted As cast( (Case When [DateTimeDeleted] Is Null Then (0) Else (1) End) as Bit) ```
[ -0.08463238179683685, 0.21841411292552948, 0.5057641863822937, -0.2487853467464447, -0.03267977014183998, -0.0010889661498367786, 0.12587203085422516, -0.09250921756029129, -0.047152839601039886, -0.2953684329986572, 0.16113252937793732, 0.37680283188819885, -0.009861738421022892, 0.398734...
Pretty straightforward, but I just want to know which is faster. I think simply multiplying a number by `-1` is much faster than calling a predefined method, provided that you are sure that value is negative. But if that's the case then what is the `abs()` function for? Is it simply for making sure that the value ret...
[ 0.28293314576148987, 0.01941681280732155, -0.028438812121748924, -0.276167094707489, -0.2579220235347748, -0.017275264486670494, 0.5736265778541565, -0.301134318113327, -0.2964760661125183, -0.39097484946250916, 0.06469208002090454, 0.5709401965141296, -0.3991910517215729, -0.2831348478794...
-1 : a; /* Test 4: */ b = a < 0 ? -a : a; ``` I got the following result on Windows 7. Values are normalized after the fastest result per browser to make it easier to compare which method is faster: ```none 1:Math 2:abs 3:*-1 4:- 1.0= Version Chrome 1.0 1.0 1.0 1.0 111ms 21.0.1180.75 m Fir...
[ 0.14061957597732544, 0.30285322666168213, 0.8370212316513062, -0.41860833764076233, -0.23644419014453888, 0.011005118489265442, 0.7523196935653687, -0.461050808429718, -0.19558653235435486, -0.5263690948486328, -0.01389081496745348, 0.7485901117324829, -0.49027219414711, -0.311074674129486...
1.4 1.0 1.1 1.0 185ms 9.0.8112 Opera 1.9 1.6 1.1 1.0 246ms 12.00 Safari 1.6 1.6 1.1 1.0 308ms 5.1.7 ``` **Conclusion:** When I did this test 3 years ago, -a was fastest, but now Math.abs(x) is faster in Firefox! In Chrome `abs(a)` and `-a` got the same time and it was only 3 ms di...
[ 0.38120102882385254, 0.1360379159450531, 0.7917101979255676, -0.1868899017572403, -0.18713070452213287, 0.0021505653858184814, 0.6040929555892944, -0.3137606084346771, -0.24808882176876068, -0.5448012948036194, -0.005180456675589085, 0.799872875213623, -0.3641117215156555, -0.4037776589393...
it with 10 000 000 numbers. **My Recommendation**: Use **Math.abs(a)**. If you are in a tight loop and by profiling has found it to be too slow, you can use a local reference to the abs function: ```js var abs=Math.abs; //A local reference to the global Math.abs function for (i=0;i<1234567890;++i) if ( abs( v[i] ) >...
[ 0.1263602375984192, -0.002319933148100972, 0.6057876348495483, 0.0676700621843338, -0.06399678438901901, 0.4339119791984558, 0.3536127805709839, -0.055436961352825165, -0.4771806299686432, -0.5084177255630493, -0.021445728838443756, 0.22219274938106537, -0.3345485329627991, -0.046606160700...
Is there a way of using ASP.NET user-controls (.ascx files) to fill my own templating needs within a .NET application, without that application being a Website? It's actually a class library that will take data in, combine it with a template, then spit it out. I don't want to write my own templating system from scrat...
[ 0.5342868566513062, -0.01644109934568405, 0.07971756905317307, 0.2322164922952652, -0.23022550344467163, -0.12428969889879227, -0.12191867083311081, 0.02243226021528244, -0.12306050956249237, -0.6519988179206848, 0.15788736939430237, 0.48591455817222595, -0.31965938210487366, 0.14677846431...
looking for.. [Building Re-Usable ASP.NET User Control and Page Libraries with VS 2005](http://weblogs.asp.net/scottgu/archive/2005/08/28/423888.aspx) Also have a look at [Turning an .ascx User Control into a Redistributable Custom Control](http://msdn.microsoft.com/en-us/library/aa479318.aspx)
[ -0.1943873167037964, -0.2903493642807007, 0.22593505680561066, 0.33227062225341797, 0.056868765503168106, 0.05855603516101837, 0.18258461356163025, -0.10707290470600128, -0.6177535057067871, -0.482022225856781, -0.17055276036262512, 0.1270734667778015, -0.2493046224117279, 0.19062584638595...
Is there a working real world project using Clojure that take advantage of multi-core system that I can take a look? I want to if Clojure is still in a toy-language phrase or it's really "happening soon". You should look at the many examples posted up in the Google discussion group. They are interesting and a couple o...
[ 0.3139441907405853, 0.18989922106266022, 0.018776796758174896, 0.4981629550457001, 0.4339345395565033, -0.074420265853405, -0.047574449330568314, 0.6545372605323792, 0.009126863442361355, -0.45932242274284363, -0.23890848457813263, 0.14302946627140045, -0.24286243319511414, -0.031876679509...
ready. The API at this point isn't changing much since things are headed toward a 1.0 release, so you don't really have to worry too much about hte rug being pulled out under your feet. Probably the least stable part right now, if you're going to do your Lisping in Emacs, is SLIME and swank-clojure. It's pretty imperat...
[ 0.6831384897232056, -0.20780251920223236, 0.47456738352775574, 0.4975508451461792, 0.3221515119075775, -0.19466479122638702, -0.12314587086439133, 0.0018344726413488388, -0.25716036558151245, -0.40525028109550476, -0.041222378611564636, 0.5837228894233704, 0.14685648679733276, -0.031746283...
I do a lot of data analysis scripting, comparing two objects or strings to determine differences or come up with gaps that need to be filled. When you're in a loop, comparing object a to object b, do you have a preferred coding standard that makes sense (i.e., it is self-documenting) and can travel nicely to other c...
[ 0.6509943604469299, 0.19231902062892914, -0.17480865120887756, -0.06658053398132324, -0.0776473879814148, 0.031012356281280518, 0.3170219659805298, -0.20338517427444458, 0.07561296224594116, -0.4237978756427765, 0.18786194920539856, 0.19297437369823456, -0.35579732060432434, 0.037621259689...
// Update a } else { TreeMapvar.add(b); } ``` A different example: ``` TreeMap<String, MyObject> TreeMapvar = new TreeMap<String, Object>(); File f = "Somefile"; // Open the file with bufferedReader br while ((line=br.readLine)!=null)) { //insert code parse line to get object a if (TreeM...
[ -0.3333768844604492, -0.1863456666469574, 0.416214257478714, -0.4302296042442322, 0.021421749144792557, 0.09983347356319427, 0.2529984414577484, -0.43515828251838684, -0.12568484246730804, -0.33160319924354553, -0.29618895053863525, 0.5861028432846069, -0.56463623046875, 0.0240115132182836...
} else { //insert code to insert new object } } } ``` Well, if you need 2 variable names, let's call them a and b, then you probably have 3 objects involved: self, a, b. Now, that's quite a bunch for me, I try to keep things smaller. So, consider your first example: ``` for (Strin...
[ 0.1517333984375, -0.005468842573463917, 0.03864185884594917, -0.1511140763759613, -0.20529833436012268, 0.031064923852682114, 0.15461410582065582, -0.12923286855220795, -0.265639066696167, -0.37368592619895935, 0.10071668773889542, 0.5105084776878357, -0.5531521439552307, 0.114863440394401...
if (a.equals(b)) { // Update a } else { TreeMapvar.add(b); } ``` So, why not have your whole snippet be part of the b class definition and rename b to "this"? ``` lookAtYourTreeMap() { for( String a : TreeMapvar) { this.accomodateTreemapIfNecessaryTo(a); } } ``` And then I w...
[ 0.05105694755911827, -0.14292536675930023, 0.4637291133403778, -0.3306680917739868, 0.02748752571642399, -0.06327761709690094, 0.12434929609298706, -0.34722283482551575, -0.3609207272529602, -0.36956289410591125, -0.042180418968200684, 0.3221452534198761, -0.5615411996841431, 0.00240829354...
TreeMapVar.add(a); } } ``` Notice that the inventor of the modern computer, Kent Beck, says that, methods need to be short. Start the whole thing in your third component like this: ``` B b = loadBFromSource(); b.lookAtYourTreemap(); ``` Loops like yours I would call "structural code".
[ 0.11748208105564117, 0.1264760047197342, -0.25024381279945374, -0.10238481312990189, -0.026194311678409576, -0.2255900353193283, 0.35331419110298157, -0.443167507648468, -0.4566386640071869, -0.2403232902288437, -0.12728425860404968, 0.187844917178154, -0.6778612732887268, -0.0094561446458...
I have a class with implements 2 interfaces and inherits 1 class. So, generally it looks like this: ``` class T : public A, public IB, public IC { }; ``` There is one point in the code where I have an `IB *`, but could really use an `A *`. I was hoping that a dynamic cast would like this: ``` IB *b_ptr = new T; // ...
[ 0.28667333722114563, -0.08178576081991196, -0.17137834429740906, -0.20074623823165894, -0.0855749249458313, -0.16081902384757996, 0.20426100492477417, -0.22219181060791016, -0.07774873822927475, -0.5971201062202454, 0.05627080425620079, 0.4021347761154175, -0.3702147901058197, 0.3004707992...
virtually from `A`, but IIRC last time I tried that there were some complications that made it undesirable. Any thoughts? **EDIT**: oh yea, this is part of a plugin API, so unfortunately I don't have direct access to the `T` type where I need the `A *`. My example has then next to each other, but as mentioned, it's m...
[ 0.5959928631782532, -0.00684110214933753, 0.04665705934166908, -0.11317192763090134, 0.00020017400674987584, -0.16583393514156342, 0.17019672691822052, 0.01767980121076107, -0.27507033944129944, -0.7179900407791138, -0.046810079365968704, 0.44338542222976685, -0.4739267826080322, 0.1691400...
are in separate libraries): plugin A: ``` class PluginA : public QObject, public PluginInterface, public OtherInterface { }; ``` plugin B: ``` class PluginB : public QObject, public PluginInterface { // in here, I have a PluginInterface *, but really could use a QObject * // unfortunately, PluginB has abso...
[ -0.17998236417770386, -0.09720052778720856, 0.007612239569425583, -0.2608618438243866, 0.11979783326387405, -0.00870034284889698, 0.25491034984588623, -0.271896094083786, 0.08088994771242142, -0.7814680933952332, -0.09624609351158142, 0.6631248593330383, -0.6402702927589417, 0.198542237281...
module boundaries. I think this might be the case because people's examples seem to work fine in my tests. Specifically, pluginB has no "typeinfo for PluginA" if I do an "nm" on it. This may be the core of the issue. If this is the case, I'll simply have to work around it by either virtual inheritance or a virtual `cas...
[ 0.20699967443943024, -0.013487979769706726, 0.21960929036140442, -0.33538106083869934, 0.005202131811529398, -0.1508171558380127, 0.11113343387842178, -0.516490638256073, -0.24858404695987701, -0.5454659461975098, 0.21245141327381134, 0.43348872661590576, -0.47202661633491516, 0.2322395741...
in PluginB. My solution was to effectively add `RTLD_NOW` and `RTLD_GLOBAL` to my load process technically it was ``` loader.setLoadHints(QLibrary::ResolveAllSymbolsHint | QLibrary::ExportExternalSymbolsHint); ``` because I'm using Qt's plugin system but same difference. These flags force all symbols from loaded l...
[ 0.06679721921682358, -0.059590041637420654, 0.45079541206359863, -0.4160480797290802, -0.14114271104335785, -0.14989548921585083, 0.3136588931083679, -0.1381470113992691, 0.017346534878015518, -0.7243674993515015, -0.2004910409450531, 0.6997262239456177, -0.638146162033081, 0.0216399841010...
I want to avoid hardcoding the port number as in the following: ``` httpd = make_server('', 8000, simple_app) ``` The reason I'm creating the server this way is that I want to use it as a 'kernel' for an Adobe AIR app so it will communicate using PyAMF. Since I'm running this on the client side it is very possible t...
[ 0.10073376446962357, 0.38976502418518066, 0.45687130093574524, -0.2117478996515274, -0.04920797422528267, 0.030927838757634163, 0.18465110659599304, -0.03611123189330101, -0.00745789660140872, -0.9419379234313965, -0.10533014684915543, 0.5578624606132507, -0.5631439089775085, 0.16258095204...
you give a port number of 0, I believe the OS will provide you with the first available unused port.
[ 0.12555283308029175, 0.17416605353355408, 0.1359328180551529, 0.12528856098651886, 0.26826199889183044, -0.015802985057234764, 0.10656742006540298, 0.2905200123786926, -0.16716551780700684, -0.5583704113960266, -0.10459025204181671, 0.5294539332389832, -0.07453548908233643, 0.2376783639192...
I know that the asp.net repeater doesnt have a Client side object model, and we are stuck with improving the performance of many pages which have repeater/gridview with the functionality of adding rows to them by server-side code. We have used updatepanels to ajaxify the functionality adding the rows to the repeater/g...
[ 0.22050100564956665, 0.14379233121871948, 0.46877968311309814, -0.009215039201080799, -0.191704660654068, -0.24340605735778809, 0.29802757501602173, -0.0212196484208107, -0.15433572232723236, -0.9038381576538086, 0.3024662137031555, 0.5489725470542908, -0.21622838079929352, 0.0609234347939...
the Repeater control doesn't have a DOM which can be used to do client side operations like adding of rows and stuff, the only easy way out(due to some constraints) i had was to use the GridView control instead and then use its DOM and that's what i finally did.
[ 0.03841199353337288, -0.3132435977458954, 0.4813106954097748, 0.12353753298521042, 0.05466800928115845, -0.2482992559671402, 0.1200234591960907, 0.20137158036231995, -0.020235376432538033, -0.45884618163108826, 0.5758387446403503, 0.8841732740402222, -0.2949305772781372, 0.4796294569969177...
There are various posts on the web about this issue whereby the ComboBox only changes its dropdown height to fit the items on its very first dropdown. Any changes to the items shown doesn't cause the dropdown to resize. The various workarounds I have found don't seem to work for me, so I was wondering if anyone had fou...
[ 0.24909381568431854, -0.43073517084121704, 0.4936911165714264, 0.16029371321201324, -0.2012747824192047, 0.07855884730815887, 0.3035520017147064, -0.31902605295181274, -0.3521517515182495, -0.4561511278152466, 0.12401807308197021, 0.398857057094574, 0.06376563012599945, 0.05505271255970001...
outside the bounds. I've tried changing the container for the items, but it seems they all have this issue. Any ideas? Note that I have also tried programmatically recreating the combo whenever I change the ItemsSource as indicated on several forums, but I can't get this to work without crashing. I found a great solu...
[ 0.20605209469795227, -0.19817419350147247, 0.40242883563041687, 0.4513342082500458, -0.37038689851760864, -0.17886196076869965, 0.2948637008666992, -0.3238011300563812, -0.4416273832321167, -0.5576306581497192, 0.025529641658067703, 0.3227204978466034, -0.10048951208591461, 0.0913810133934...
I have a Silverlight project (with ASP.net MVC web project) Suddenly, when I press F5 it takes like 20 seconds, from the moment that Internet explorer opens, to when the debugger is attached. Mind you, it is a project that works perfectly since about 3 months. The problem just started last days. When I start without ...
[ 0.3621406555175781, 0.09930238127708435, 0.47127848863601685, -0.1836046278476715, -0.10113771259784698, -0.22838212549686432, 0.5295392274856567, 0.06925981491804123, -0.5069338083267212, -0.7404736876487732, 0.20015425980091095, 0.18965624272823334, -0.16406762599945068, 0.23157791793346...