text
stringlengths
0
30.5k
title
stringclasses
1 value
embeddings
listlengths
768
768
= Convert.ToInt32(textBox1.Text); Thread ot1 = new Thread(new ParameterizedThreadStart(SumData)); ot1.Start(val); } } private static void ReadData(object state) { System.Windows.Forms.Application.Run(); }
[ 0.12416504323482513, -0.2735724449157715, 0.36010435223579407, -0.3299327492713928, 0.12971508502960205, 0.26434117555618286, 0.5006426572799683, -0.17184418439865112, -0.2906861901283264, -0.6566550135612488, -0.13343445956707, 0.4192255735397339, -0.5686554312705994, 0.6216235160827637, ...
void setTextboxText(int result) { if (this.InvokeRequired) { this.Invoke(new IntDelegate(SetTextboxTextSafe), new object[] { result }); } else {
[ -0.10519970953464508, -0.45146644115448, 0.43824806809425354, -0.28360360860824585, 0.09712208807468414, -0.14100544154644012, 0.3645034730434418, -0.38722771406173706, 0.003616616828367114, -0.5244517922401428, -0.47175925970077515, 0.5316752791404724, -0.33708590269088745, -0.02865394763...
SetTextboxTextSafe(result); } } void SetTextboxTextSafe(int result) { label1.Text = result.ToString(); } private static void SumData(object state) {
[ 0.0003201204526703805, -0.5456425547599792, 0.6234365105628967, -0.34434521198272705, -0.137892946600914, -0.0071458956226706505, 0.30618786811828613, -0.5009997487068176, -0.04692738503217697, -0.39073413610458374, -0.4701296091079712, 0.44161006808280945, -0.5478756427764893, 0.052923988...
int result; //int[] icount = (int[])state; int icount = (int)state; for (int i = icount; i > 0; i--) { result += i;
[ 0.03462816774845123, -0.4187694489955902, 0.42926862835884094, -0.03183819353580475, 0.10129445791244507, 0.29836374521255493, 0.34289899468421936, -0.6032443642616272, -0.14615607261657715, -0.43989184498786926, -0.25730159878730774, 0.23471596837043762, -0.04847508668899536, 0.3663190007...
System.Threading.Thread.Sleep(1000); } setTextboxText(result); } delegate void IntDelegate(int result); private void button2_Click(object sender, EventArgs e) { Application.Exit(); } } } ``` Why is this error occurring? > An object ref...
[ -0.2370770424604416, -0.2561405897140503, 0.38590705394744873, 0.021104147657752037, 0.3306313157081604, 0.1302061378955841, 0.3384261727333069, -0.038350313901901245, -0.43021339178085327, -0.693272054195404, -0.21893712878227234, 0.4240477383136749, -0.46518754959106445, 0.53686487674713...
is required for the nonstatic field, method, or property 'WindowsApplication1.Form1.setTextboxText(int) It looks like you are calling a non static member (a property or method, specifically `setTextboxText`) from a static method (specifically `SumData`). You will need to either: 1. Make the called member static also: ...
[ 0.026612821966409683, -0.09114258736371994, 0.5187956690788269, -0.14683230221271515, 0.09341517090797424, -0.11889664828777313, 0.18063990771770477, -0.46944284439086914, -0.16575181484222412, -0.2176399528980255, -0.5170176029205322, 0.47377023100852966, -0.3960927724838257, 0.1698129028...
icount = (int)state; for (int i = icount; i > 0; i--) { result += i; System.Threading.Thread.Sleep(1000); } Form1 frm1 = new Form1(); frm1.setTextboxText(result); } ``` Passing in an instance of `Form1` would be an option also. 3. Make the calling method a non-static instance meth...
[ 0.052410855889320374, -0.36283838748931885, 0.4748068153858185, -0.10119868069887161, 0.10303784906864166, 0.1342172473669052, 0.3447106182575226, -0.5727884769439697, -0.37392255663871765, -0.52238929271698, -0.12549348175525665, 0.3277428150177002, -0.2802620828151703, 0.5069853067398071...
for (int i = icount; i > 0; i--) { result += i; System.Threading.Thread.Sleep(1000); } setTextboxText(result); } ``` More info about this error can be found [on MSDN](https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/compiler-messages/cs0120).
[ -0.14154769480228424, -0.07032467424869537, 0.12616552412509918, -0.16724582016468048, 0.2778434157371521, 0.007811593357473612, 0.6692019104957581, 0.08473198860883713, -0.41953277587890625, -0.697364330291748, -0.10787323862314224, 0.4290253221988678, -0.2743862569332123, 0.2726564705371...
The following for creating a Global Object is resulting in compilation errors. ``` #include "stdafx.h" #include <iostream> using namespace System; using namespace std; #pragma hdrstop class Tester; void input(); class Tester { static int number = 5; public: Tester(){}; ~Tester(){}; void ...
[ 0.14880958199501038, 0.15237562358379364, 0.23318704962730408, -0.33115023374557495, 0.16554848849773407, 0.13779886066913605, 0.6191515326499939, -0.10986855626106262, -0.017521508038043976, -0.7750774025917053, -0.5203933119773865, 0.3934946656227112, -0.5117046236991882, 0.2666032016277...
<< endl; while(1) { input(); } } void input() { int newNumber = 0; cout << "The current number is " << testerObject.getNumber(); cout << "Change number to: "; cin >> newNumber; cout << endl; testerObject.setNumber(newNumber); cout << "The number...
[ 0.03440845385193825, -0.3241721987724304, 0.5264613628387451, -0.46388378739356995, 0.34401726722717285, 0.20042473077774048, -0.015046329237520695, -0.3374064266681671, -0.1189989224076271, -0.549563467502594, -0.5543749928474426, 0.37957215309143066, -0.31500983238220215, 0.2635191082954...
testerObject.getNumber() << endl; } ``` Here are the compile errors: ``` 1>------ Build started: Project: test, Configuration: Debug Win32 ------ 1>Compiling... 1>test.cpp 1>.\test.cpp(15) : error C2864: 'Tester::number' : only static const integral data members can be initialized within a class 1>.\test.cpp(33) : e...
[ -0.07223545014858246, 0.0014962531859055161, 0.2586614787578583, 0.10532939434051514, 0.288554847240448, 0.049605753272771835, 0.32830896973609924, -0.7417997717857361, -0.20822566747665405, -0.321991890668869, -0.33280879259109497, 0.4862046539783478, -0.47705456614494324, -0.004232085775...
c:\windows\microsoft.net\framework\v2.0.50727\mscorlib.dll : see declaration of 'System::Int32' 1>.\test.cpp(57) : error C2039: 'getNumber' : is not a member of 'System::Int32' 1> c:\windows\microsoft.net\framework\v2.0.50727\mscorlib.dll : see declaration of 'System::Int32' 1>Build log was saved at "file://c:\U...
[ -0.23992814123630524, 0.19716782867908478, 0.2984665632247925, 0.1743336021900177, 0.1866081804037094, 0.005990808829665184, 0.4413183331489563, -0.2936799228191376, -0.2014261782169342, -0.4814419448375702, -0.2245071828365326, 0.6615807414054871, -0.24644267559051514, 0.18444423377513885...
at file scope (I like declaring all globals at file scope) because when I have to create separate source files and do "extern" and everything it becomes extremely complicated and never works for me. Although, I do want to figure out how to do that eventually... it seems every tutorial I look at won't compile though and...
[ 0.13984213769435883, 0.02211013250052929, 0.26694434881210327, 0.011235657148063183, -0.08471141010522842, -0.07652243971824646, 0.5335357189178467, 0.04759945720434189, -0.223515585064888, -0.7005941867828369, 0.08701708167791367, 0.788659393787384, -0.30392685532569885, -0.02742075733840...
Express 2008 and works I will finally be able to figure out how to recreate it. I'm extremely excited on seeing the fix for this! It is just I can't get Global Objects to work right! Any other information on declaring Global Class Objects...or anything for that matter is welcome! Just start addressing the errors one by...
[ -0.5223556160926819, -0.0992221087217331, 0.30273371934890747, 0.12096459418535233, -0.3364908695220947, -0.2777201235294342, 0.3889787793159485, -0.0007647423772141337, -0.06306815892457962, -0.48206228017807007, -0.11517784744501114, 0.42119738459587097, -0.44226735830307007, -0.35244765...
can be initialized within a class ``` You can't initialize a member in the class definition unless it's static, const, and one of the integral types. Leave the "`= 5`" off of the declaration of `number`. Then you'll need to have a definition of `Tester::number` outside of the class definition, like so: ``` int Teste...
[ 0.06765780597925186, 0.04163233935832977, -0.1801307648420334, 0.1394405961036682, 0.025408918038010597, 0.01792183704674244, 0.19037161767482758, -0.23338328301906586, -0.07862842828035355, -0.38345178961753845, -0.3731555938720703, 0.17044439911842346, -0.17972615361213684, 0.08038895577...
problems go away. The key thing is to try and take compiler errors one at a time from the top. If you get more than about 3 of them, you can probably just ignore everything after the 3rd or so because the initial error just cause the compile to into the weeds (and if they are real errors, they'll show up again in the ...
[ 0.00918284896761179, 0.2920396625995636, 0.2439703494310379, 0.21687519550323486, 0.011123735457658768, 0.05702684074640274, 0.45745596289634705, 0.10236987471580505, -0.4124739468097687, -0.5630031824111938, -0.18312877416610718, 0.7399104237556458, -0.3828423321247101, 0.0074871326796710...
When using windbg and running !dumpheap command to see the addresses of objects, how can you limit to a specific number of objects. The only way I found was using CTRL+BREAK and a command line on a blog <http://dotnetdebug.net/2005/07/04/dumpheap-parameters-and-some-general-information-on-sos-help-system/> -l X - Prin...
[ 0.006520584225654602, -0.12182922661304474, 0.33636483550071716, -0.07910023629665375, -0.29098767042160034, 0.0956282913684845, 0.4548691511154175, -0.0481393076479435, -0.33956578373908997, -0.5043355226516724, 0.1843259334564209, 0.30184832215309143, -0.16095568239688873, -0.10049474984...
C2864: 'Tester::number' : only static const integral data members can be initialized within a class ``` You can't initialize a member in the class definition unless it's static, const, and one of the integral types. Leave the "`= 5`" off of the declaration of `number`. Then you'll need to have a definition of `Tester...
[ -0.16801276803016663, -0.17672234773635864, -0.05251726135611534, -0.0033997399732470512, 0.1002352237701416, -0.12892960011959076, 0.22763597965240479, -0.2947644889354706, -0.13089387118816376, -0.05470734089612961, -0.4451691806316376, 0.3445538878440857, -0.3218870460987091, -0.0989138...
definition of the `Tester` class. Fix those and your compilation problems go away. The key thing is to try and take compiler errors one at a time from the top. If you get more than about 3 of them, you can probably just ignore everything after the 3rd or so because the initial error just cause the compile to into the...
[ 0.4143727719783783, -0.162831112742424, -0.6276165843009949, 0.319273978471756, -0.285623162984848, -0.14933286607265472, 0.5171461701393127, -0.11382464319467545, -0.08590540289878845, -0.5577529668807983, 0.058916933834552765, 0.6346477270126343, -0.28213509917259216, 0.02124977856874466...
I installed PHP in windows server 2003. All the files are working fine except the mail issue. There is no problem in SMTP. Because I run the JSP project in the same server.In that mail function working fine. So where is the problem? And how can i manage? I set the SMTP server in PHP as ``` ; For Win32 only. SMTP = loc...
[ -0.2540328800678253, 0.20861157774925232, 0.8273839354515076, -0.16904830932617188, -0.6489594578742981, -0.14438709616661072, 0.5557130575180054, 0.021773038432002068, -0.2451201230287552, -0.7429918646812439, 0.16817082464694977, 0.46799200773239136, -0.4315735697746277, 0.17408455908298...
a parameter. Right now you're trying to use the syntax for an [object initializer](http://msdn.microsoft.com/en-us/library/bb384062.aspx).
[ -0.12646250426769257, -0.09770773351192474, 0.2686632573604584, 0.07966151088476181, -0.06212334707379341, 0.15220031142234802, 0.05097413808107376, 0.09720052033662796, -0.19379684329032898, -0.3656550347805023, -0.22098034620285034, 0.33571743965148926, -0.31832534074783325, 0.0935407653...
I have always wondered, how do game programmers tie together game characters done in an external 3d modeling software like maya or 3d max and the actual game logic done in there favourite programming language e.g c or c++. How do you get to combine this two things together, and what is the actual process of building a...
[ 0.23457957804203033, -0.10579287260770798, -0.09051480144262314, 0.6189038753509521, -0.029858876019716263, -0.02332790195941925, -0.4001978933811188, 0.09272004663944244, -0.4209904372692108, -0.40956711769104004, 0.2503632605075836, 0.4653112292289734, 0.2177523672580719, -0.069840639829...
outside the code. It's quite a simple process actually: 1. An artist makes a 3D model in Maya or whatever, and then saves it in a file. Let's say they called it 'Gollum.3D'. 2. Now 'Gollum.3D' contains a whole lot of numbers representing the model points, textures and everything else. 3. The program code then reads th...
[ 0.38884344696998596, 0.18146128952503204, 0.35020771622657776, 0.24754533171653748, -0.17268581688404083, -0.1033211424946785, 0.03284680098295212, -0.10655045509338379, -0.41526445746421814, -0.36340805888175964, 0.009478823281824589, 0.3924590051174164, -0.20345957577228546, 0.2531644701...
stored separately from the code, and the code just reads it and combines it all together when the game is run. When I say everything - I mean EVERYTHING! All of the text, the stats for the hit points and weapon damage amounts, the menu screen images, and even the artificial intelligence is stored separately from the pr...
[ 0.6793807744979858, 0.03602011874318123, -0.03493594005703926, 0.44359394907951355, 0.1567237675189972, -0.13587553799152374, 0.26845142245292664, -0.15873654186725616, -0.2417498081922531, -0.17831802368164062, -0.1975191831588745, 0.855546772480011, -0.15919382870197296, -0.1006182953715...
it suits them. They're just taking advantage of the fact that basically everything about a game (except for a few core things) are not written into the program's code.
[ 0.6615076065063477, 0.207011878490448, -0.05846152454614639, 0.23560059070587158, 0.339590460062027, -0.27519121766090393, 0.03816181421279907, 0.25991952419281006, -0.06714552640914917, -0.3577321171760559, -0.2597144544124603, 0.6970479488372803, 0.13124187290668488, -0.3116399645805359,...
I currently have a tomcat container -- servlet running on it listening for requests. I need the result of an HTTP request to be a submission to a job queue which will then be processed asynchronously. I want each "job" to be persisted in a row in a DB for tracking and for recovery in case of failure. I've been doing a ...
[ 0.22652335464954376, -0.14477474987506866, 0.4959700405597687, 0.04587602987885475, 0.009637639857828617, 0.07845653593540192, 0.154447540640831, -0.2492922842502594, -0.08739589899778366, -0.7061699628829956, -0.22653628885746002, 0.47244390845298767, -0.22296956181526184, 0.3446449041366...
row in the DB. Have a seperate servlet inside my Tomcat container that always runs -- it Uses Quartz Scheduler or utilities provided in java.util.concurrent to continously process the rows as jobs (uses thread pooling). I am leaning towards the latter because looking at the JMS documentation gives me a headache and wh...
[ -0.03919452056288719, -0.0310507919639349, 0.3556838035583496, -0.09929660707712173, -0.3504618704319, 0.0700465589761734, 0.05520911514759064, -0.1054927185177803, -0.19374464452266693, -0.555224597454071, 0.22171932458877563, 0.5893592834472656, -0.19002005457878113, 0.11419738084077835,...
used Spring and I wouldn't even know how to start using it to solve this problem. Any pointers on how to dive in without having to re-write my entire project would be useful. Otherwise if you could weigh in on option 1 or 2 that would also be useful. Clarification: The asynchronous process would be to screen scrape ...
[ 0.18951416015625, -0.13513582944869995, 0.18821443617343903, 0.018749212846159935, -0.1318063735961914, 0.304300993680954, 0.16662319004535675, 0.08329785615205765, -0.23996339738368988, -0.34997209906578064, 0.04566517844796181, 0.2887468636035919, 0.09846140444278717, -0.0756996572017669...
pulling files from that site and storing them in S3. Your Quartz Job doesn't need to be a Servlet! You can persist incoming Jobs in the DB and have Quartz started when your main Servlet starts up. The Quartz Job can be a simple POJO and check the DB for any jobs periodically. However, I would suggest to take a look at...
[ 0.10848811268806458, -0.24866388738155365, 0.26859885454177856, 0.03584014251828194, -0.1891499012708664, -0.2543962001800537, 0.3995021879673004, -0.20481303334236145, -0.28573137521743774, -0.33089765906333923, -0.009034888818860054, 0.6834567785263062, -0.060110826045274734, -0.08396482...
I'm using C++ with the OpenCV library, which is a library image-processing although that's not relevant for this question. Currently I have a design decision to make. OpenCV, being a C library, has its data structures (such as CvMat) declared as structs. To create them, you use functions like cvCreateMat, and to rele...
[ 0.48258474469184875, 0.03098095767199993, 0.4781094491481781, -0.22692924737930298, -0.2687894105911255, -0.4375578463077545, -0.11504729837179184, -0.19772568345069885, -0.08857035636901855, -0.5587195158004761, -0.14528964459896088, 0.8130728602409363, -0.4090493321418762, 0.068963155150...
I just feel that writing code for my own `cv_auto_ptr` and `cv_shared_ptr` classes would be a bad idea, not to mention a waste of time. So I've been looking for solutions, and I've come up with three possibilities. **First**, I could use the cv\_scoped class I've already made. I'd rename it to `cv_ptr` and then use sm...
[ 0.2808374762535095, 0.061489325016736984, 0.4759589731693268, -0.3074595332145691, 0.013814480975270271, 0.35267433524131775, 0.28397268056869507, -0.41536247730255127, -0.08703308552503586, -0.6246158480644226, 0.024775870144367218, 1.0255484580993652, -0.3427707552909851, -0.025234047323...
- most of OpenCV's functions have the parameter void\* - so no implicit conversion would be called. I would really like a way of doing this where I didn't have to do the double dereference. **Second**, I could somehow override `operator delete`. I don't want to override the global operator delete because I'd only want...
[ -0.10465005040168762, -0.07131975889205933, 0.4547722339630127, -0.18183249235153198, -0.01748035103082657, -0.27809202671051025, 0.37972134351730347, -0.14462962746620178, 0.019605012610554695, -0.6315334439277649, -0.044393762946128845, 0.7733628153800964, -0.4536389410495758, 0.18221718...
large classes so it wouldn't be too difficult, but I just feel like this is bad design. If I were to do this, I would probably do something along these lines: ``` class cv_auto_ptr { public: cv_auto_ptr(); ~cv_auto_ptr(); // each method would just be a proxy for the smart pointer CvMat* get() { return this->m...
[ 0.17758283019065857, -0.2181500494480133, 0.13445506989955902, 0.02491752989590168, 0.11279110610485077, -0.0014522570418193936, 0.06712403893470764, -0.2421562522649765, -0.1384587436914444, -0.5128049254417419, -0.12177877128124237, 0.9210825562477112, -0.4969465732574463, -0.21827304363...
on C++ class with constructs/destructors you are pushing their uses here to things they probably should not be used for (but can). Anyway don'y you want to be able to use your C++ object as if it was a normal stack variable without dynamically allocating each time? The standard solution to your problem is to create ...
[ 0.4117691218852997, 0.007705581374466419, 0.20905397832393646, -0.1196170225739479, -0.07970456033945084, -0.19838711619377136, 0.14473369717597961, -0.27964821457862854, -0.10751966387033463, -0.6021689176559448, -0.12052875012159348, 0.8429258465766907, -0.4194749891757965, 0.04225111752...
impl; public: Mat(/* Constructor Arguments */) { impl = cvCreateMat(/* BLAH */); } ~Mat() { cvReleaseMat(impl); } operator CvMat*()
[ -0.09014222025871277, -0.3158835768699646, 0.6988197565078735, -0.33500936627388, -0.033174216747283936, 0.4638858437538147, 0.3131691813468933, -0.20919233560562134, -0.19950103759765625, -0.4089913070201874, -0.397381454706192, 1.115370750427246, -0.40305083990097046, -0.0703369304537773...
{ // Cast opertator. Convert your C++ wrapper object into C object // when you use it with all those C functions that come with the // library. return impl; } }; void Plop(CvMat* x) { // Some C function dealing with CvMat } int main() {
[ 0.08756572753190994, -0.22414450347423553, 0.21052221953868866, -0.22849631309509277, 0.19241832196712494, 0.29032814502716064, 0.11648763716220856, -0.14789451658725739, -0.03727767989039421, -0.27279263734817505, -0.12983545660972595, 0.6516770124435425, -0.6225056648254395, -0.036089409...
// Don't need to dynamically allocate Mat m; // Just create on the stack. Plop(m); // Call Plop directly std::auto_ptr<Mat> mP(new Mat); Plop(*mP); } ```
[ -0.2890600860118866, -0.205882728099823, 0.47115558385849, -0.28361064195632935, 0.18413521349430084, 0.33904972672462463, 0.21044407784938812, -0.1999293565750122, -0.6034149527549744, -0.5470629930496216, -0.524010956287384, 0.5538821816444397, -0.4652908444404602, -0.2672916054725647, ...
I want to build dynamic linq. But I want to dynamically set the table (from clause) Is this possible? Malcolm As always, it depends ;-p If you want to use the LINQ extension methods or query syntax, then no: this is tightly coupled to `IQueryable<T>`, where `T` is the source type. Generics might be an option, depen...
[ 0.0718972310423851, -0.3011150062084198, 0.44230663776397705, 0.2180803269147873, -0.2807551324367523, 0.007003206294029951, -0.044382352381944656, -0.19701606035232544, -0.3031928837299347, -0.34020310640335083, -0.10178589820861816, 0.5318500995635986, -0.5646471977233887, 0.066118150949...
reflection (`MakeGenericMethod`) - so not trivial! Can you clarify the exact scenario here? It sounds like *maybe* you should just use a regular command here... for example, perhaps with [ExecuteQuery](http://msdn.microsoft.com/en-us/library/system.data.linq.datacontext.executequery.aspx), which takes a string comman...
[ 0.37629595398902893, -0.1245572492480278, -0.02977948635816574, 0.2472548633813858, -0.2232578992843628, -0.20922401547431946, 0.12393669784069061, -0.1826183795928955, -0.19956333935260773, -0.3769243657588959, 0.07165028899908066, 0.49405014514923096, -0.027298059314489365, 0.09400951862...
To get an application installed on a new computer there seems to be two major approaches in current use: 1. Separate installer: Create a separate installer package that creates all directories, files, registry entries required by your application (ie an MSI, InstallSheild etc) and then finally copies your application ...
[ 0.5671699643135071, -0.05205022171139717, 0.5334672331809998, -0.030956478789448738, 0.3070598244667053, -0.2981385290622711, 0.3076457977294922, -0.3264848589897156, -0.15083616971969604, -0.8065316081047058, -0.39693447947502136, 0.8226568698883057, -0.38356679677963257, -0.0218954104930...
had a separate installer. Therefore the only fix was to to re-install, sometimes with settings and even data being lost (very frustrating). Also during software projects I've worked on, the separate installer approach often dictated spreading application specific knowledge across both the installer package and the ac...
[ 0.40324512124061584, 0.3532315492630005, 0.2322891801595688, -0.04364112392067909, 0.012475619092583656, -0.1817895621061325, 0.43801718950271606, -0.015954159200191498, -0.09639782458543777, -0.3499352037906647, -0.04632306471467018, 0.6511554718017578, -0.30841264128685, 0.03362115845084...
feel would also lend itself a more robust application. Integration with in application settings (options) would also be much more clean, in many cases the same component could perform both installation and settings management. On the negative, however, performing these extra checks/steps each time the app starts migh...
[ 0.3305736184120178, -0.10320968180894852, 0.4210367202758789, 0.15438352525234222, 0.06936659663915634, -0.17814309895038605, 0.2493266463279724, -0.6616997718811035, 0.12591324746608734, -0.7617952227592468, -0.09711896628141403, 0.8892201781272888, 0.0870879665017128, -0.3451680541038513...
system components, like drivers, libraries, COM components and so on. Since many of these activities need elevated permissions the install may be performed by the administrator, while the application can be used by all users. * There may actually be requirements for a scriptable installation procedure in corporate envi...
[ 0.5942760109901428, 0.10383571684360504, 0.3381381630897522, 0.35053637623786926, 0.343193382024765, -0.46494221687316895, 0.212459534406662, 0.05945754051208496, -0.32646557688713074, -0.6971021294593811, -0.5781541466712952, 0.7670771479606628, -0.2706620395183563, -0.0036690819542855024...
to decide. I'm not sure that the issue about corrupted settings is really important here. If settings are corrupted (why?) - how is the application to know what to do about it? OTOH the installer can of course also be written to not blindly overwrite any old settings. It all depends... **Edit:** You write in your com...
[ 0.48673275113105774, 0.18616965413093567, 0.5433478951454163, 0.3363230526447296, 0.2655940353870392, -0.04416031762957573, 0.3488197326660156, 0.03799837455153465, 0.011413333006203175, -0.7229984402656555, -0.10683372616767883, 0.9754772186279297, -0.06609764695167542, -0.206242159008979...
and you have to decide individually: * Per-user configuration settings will be missing if the application is run for the first time by the current user. It can be helpful to show a message that it is missing, and how to create it. For example in [FlameRobin](http://www.flamerobin.org) (a database administration progra...
[ 0.3116694688796997, 0.10531315207481384, 0.04313415661454201, -0.008037339895963669, 0.12934260070323944, -0.111741803586483, 0.27452704310417175, -0.1850646287202835, -0.47737443447113037, -0.5264320373535156, -0.26304733753204346, 0.4109310507774353, -0.41275525093078613, 0.1055921018123...
application, and can later change things in the option dialog. Since it is best to minimize the number of such settings, and since the defaults should be what most users expect or what works best in the general case, there is also no need to bother the user at program startup. * Some configuration may be not per-user, ...
[ 0.26169684529304504, -0.09677530825138092, 0.2357872724533081, 0.2948397696018219, 0.4541527032852173, -0.3482804000377655, 0.28702446818351746, 0.05974225327372551, -0.2630196511745453, -0.8766233325004578, -0.405759334564209, 0.6605435609817505, -0.31583601236343384, 0.09738767892122269,...
standard user for the account with sufficient privileges and its password.
[ 0.12889142334461212, 0.20526449382305145, 0.22747422754764557, 0.18617062270641327, 0.15178310871124268, -0.2792547941207886, 0.25856393575668335, 0.1377500593662262, -0.2055453062057495, -0.3184661269187927, -0.49166572093963623, 0.3175910711288452, 0.1211000308394432, 0.06572715938091278...
I have a file which is encoded as iso-8859-1, and contains characters such as ô . I am reading this file with java code, something like: ``` File in = new File("myfile.csv"); InputStream fr = new FileInputStream(in); byte[] buffer = new byte[4096]; while (true) { int byteCount = fr.read(buffer, 0, buffer.length);...
[ 0.15994977951049805, 0.24653971195220947, 0.47026944160461426, -0.29052817821502686, 0.12789063155651093, 0.13058191537857056, 0.3282986581325531, -0.2581208646297455, -0.10826101154088974, -0.8198339343070984, -0.28380241990089417, 0.2548934817314148, -0.09863800555467606, 0.0301132705062...
learnt a little on the way) e.g. * <http://www.joelonsoftware.com/articles/Unicode.html> * <http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4508058> * <http://www.ingrid.org/java/i18n/utf-16/> but still can not get this working Interestingly this works on my local pc (xp) but not on my linux box. I have checked...
[ -0.03281169757246971, 0.05443054065108299, 0.48114296793937683, 0.06877623498439789, -0.045112576335668564, 0.12810976803302765, 0.15000614523887634, -0.1977320909500122, -0.2323024719953537, -0.8196954131126404, -0.07169917970895767, 0.5608634948730469, -0.0016007132362574339, 0.167588382...
s.getCharAt(index)); ``` In both cases the result *should* be 244 decimal; 0xf4 hex. See [my article on Unicode debugging](http://pobox.com/~skeet/csharp/debuggingunicode.html) for general advice (the code presented is in C#, but it's easy to convert to Java, and the principles are the same). In general, by the way...
[ -0.06698950380086899, 0.1501769870519638, 0.4826210141181946, -0.05936434492468834, -0.03270344063639641, 0.026884498074650764, 0.32097145915031433, -0.16531875729560852, -0.07842337340116501, -0.7819426655769348, -0.5668928623199463, 0.4652787148952484, -0.26522594690322876, -0.0537160597...
I am playing with the printf and the idea to write a my\_printf(...) that calls the normal printf and a sprintf that sends the result to a special function. (I was thinking about sprintf since that behaves just like printf on most platforms). My idea was to write a small macro that did this: ``` #define my_printf(...
[ 0.11314212530851364, -0.02950333245098591, 0.339244544506073, -0.37348616123199463, 0.14298850297927856, -0.05446628853678703, 0.08128873258829117, -0.13193188607692719, -0.02628905512392521, -0.4956187307834625, -0.18336088955402374, 0.4144514501094818, -0.6236324906349182, -0.01626887544...
directly. And just to add a number do the malloc seems to be the wrong way to attack the problem, since then I would just move the problem into the future and a day when I want print a big expression... Does anyone has a better idea on how to attack this problem? Or how do I know how big the sprintf result will be? ...
[ 0.1816433221101761, 0.08683540672063828, 0.1928272247314453, -0.11791718751192093, -0.10134777426719666, 0.15790966153144836, 0.2748643755912781, -0.13851669430732727, -0.17158840596675873, -0.6479567289352417, 0.04333004355430603, 0.7574282288551331, -0.46488678455352783, -0.2936475276947...
len = printf(X, ## Y); \ char* data = malloc((len+1)*sizeof(char)); \ sprintf(data, X, ## Y); \ other_print(data);\ free(data);}while(0) ``` *Update:* I was thinking about this and maybe to use a normal function that looks a lot like what ephemient has suggested is a good idea. The key there seems to...
[ 0.10007233172655106, -0.28874775767326355, 0.11312008649110794, -0.05239802598953247, -0.5129952430725098, 0.09230909496545792, 0.28121787309646606, -0.09495439380407333, -0.2510989010334015, -0.5898528695106506, 0.21509896218776703, 0.6061967611312866, -0.28178343176841736, 0.067934416234...
pass data to sprintf to populate the desired buffer, the also pass that buffer to printf("%s") before returning. A lot of the early implementations had a 4K limit on the lowest level printf() call but I would opt for more than that. You probably need to just set an upper limit and stick to it. One trick we used in a ...
[ 0.053066935390233994, -0.3313778042793274, 0.04464482516050339, -0.17592735588550568, -0.3503078520298004, 0.07346382737159729, 0.4832700192928314, -0.1808864325284958, 0.051784321665763855, -0.45741745829582214, -0.19240589439868927, 0.03836141899228096, -0.405093789100647, -0.27227756381...
twice.
[ -0.22220945358276367, 0.10443920642137527, -0.09048904478549957, -0.4731743037700653, -0.2886534333229065, 0.382956326007843, 0.5265035033226013, -0.08149164170026779, -0.6403154134750366, 0.06494917720556259, 0.06306788325309753, 0.49324867129325867, -0.03094181790947914, 0.20504924654960...
I have a class ``` template <unsigned int N> class StaticVector { // stuff }; ``` How can I declare and define in this class a static factory method returning a StaticVector<3> object, sth like ``` StaticVector<3> create3dVec(double x1, double x2, double x2); ``` ? "How can I declare and define in this class" I...
[ 0.2328578382730484, 0.08224328607320786, 0.2599862217903137, -0.08713017404079437, -0.35952234268188477, 0.004498598165810108, 0.317406564950943, -0.19990576803684235, -0.09134268015623093, -0.5265350341796875, -0.06476113200187683, 0.3219674229621887, -0.5105453133583069, 0.22244019806385...
do you want one particular instantiation of that template to have a function returning a StaticVector<3>? If the former: ``` template <unsigned int N> struct SV { int contents[N]; static SV<3> get3dVec(int x, int y, int z) { SV<3> v; v.contents[0] = x; v.contents[1] = y; v.content...
[ -0.0896465852856636, -0.38436952233314514, 0.6898526549339294, -0.2833442986011505, -0.26896563172340393, 0.027717195451259613, 0.49425992369651794, -0.4065929353237152, -0.06731226295232773, -0.48732924461364746, -0.5171341896057129, 0.4675943851470947, -0.5123001933097839, 0.127145022153...
} ``` works for me. If the latter (you only want get3dVec to be a member of SV<3>, not of all SV<whatever>), then you want template specialisation: ``` template <unsigned int N> struct SV { int contents[N]; }; template<> struct SV<3> { int contents[3]; // must be re-declared in the specializatio...
[ -0.07271836698055267, 0.030115146189928055, 0.7596678137779236, -0.11858280748128891, -0.06947875022888184, -0.19302812218666077, 0.3982558250427246, -0.3317171037197113, -0.0844753086566925, -0.6994439363479614, -0.3858478367328644, 0.6097232699394226, -0.3819769024848938, 0.1374234557151...
z; return v; } }; int main() { SV<3> v = SV<1>::get3dVec(1,2,3); // compile error SV<3> v = SV<3>::get3dVec(1,2,3); // OK } ``` If for no other reason than to make the calling code look nicer by omitting the basically irrelevant template parameter, I agree with Iraimbilanja that normally a fr...
[ -0.08055302500724792, -0.024005230516195297, 0.14599238336086273, -0.14867311716079712, -0.1927681267261505, -0.10841579735279083, 0.392340749502182, -0.2735866606235504, -0.017176862806081772, -0.4266020953655243, -0.29030123353004456, 0.549301028251648, -0.46846145391464233, 0.2214260846...
if you want a "foo" function that does one thing for class Bar and another thing for class Baz, you can declare it as a function template with a template parameter that can be Bar or Baz (and which may or may not be inferred from function parameters), rather than making it a static function on each class. But if you do...
[ 0.5530062317848206, 0.028716623783111572, -0.10561095178127289, -0.17928852140903473, -0.04319329559803009, -0.12061550468206406, 0.08093153685331345, 0.0955786183476448, -0.27454131841659546, -0.1787206083536148, -0.23752053081989288, 0.4906543791294098, -0.629243016242981, 0.222494810819...
Suppose I need to have a class which wraps a priority queue of other objects (meaning the queue is a member of the class), and additionally gives it some extra functions. I am not quite sure what the best way is to define that vector and, mainly, how to instantiate it. Currently I have something like this in the head...
[ -0.029007241129875183, -0.37421900033950806, -0.06225414201617241, 0.04714352637529373, 0.033233892172575, 0.08185061067342758, -0.18150025606155396, 0.25985580682754517, -0.3257804214954376, -0.4312746822834015, 0.09659803658723831, 0.23265035450458527, -0.1675998419523239, 0.259627163410...
std::priority_queue<OtherClass> queue; }; ``` while the source file is something like this: ``` // in SomeClass.cpp SomeClass::SomeClass(): queue() // removed the constructor, no need to explicitly call it {} // other methods ``` --- **EDIT:** removed the call, per Ray's answer. Just write: ``` SomeClas...
[ 0.07401015609502792, -0.031156416982412338, 0.4366756081581116, -0.13790304958820343, -0.045456357300281525, -0.06786687672138214, 0.12381027638912201, 0.09653633832931519, -0.28684675693511963, -0.5920864343643188, -0.20258156955242157, 0.39640820026397705, -0.7158342003822327, 0.30143690...
Where can I find a list of the US States in a form for importing into my database? SQL would be ideal, otherwise CSV or some other flat file format is fine. Edit: Complete with the two letter state codes I needed this a few weeks ago and put it on my blog as SQL and Tab Delimited. The data was sourced from wikipedia ...
[ 0.6303486227989197, 0.15744906663894653, 0.2210398018360138, 0.3012644946575165, 0.01927042379975319, -0.13267965614795685, 0.3072563707828522, 0.15809112787246704, -0.34377148747444153, -0.5018846392631531, 0.2706602215766907, 0.018878592178225517, -0.14670835435390472, 0.0959137156605720...
Dialling Codes too. Countries: <http://www.john.geek.nz/index.php/2009/01/sql-tips-list-of-countries/> IDC's: <http://www.john.geek.nz/index.php/2009/01/sql-tips-list-of-international-dialling-codes-idcs/> Edit: New: [Towns and cities of New Zealand](http://www.john.geek.nz/index.php/2009/01/sql-tips-list-of-new...
[ 0.36816054582595825, 0.14033092558383942, 0.3740963339805603, 0.10824064165353775, 0.15650653839111328, 0.012456871569156647, 0.3235394060611725, 0.19351328909397125, -0.4137152135372162, -0.06688831746578217, -0.3169756233692169, -0.10702091455459595, -0.36324211955070496, -0.158107057213...
Perhaps I'm just unaware of the competitors, but it seems when it comes to client-side scripting in the browser and DOM, Javascript is it. I know there's VBScript, but it really isn't even in the same ballpark as JS (not even cross platform, for starters). I'm just curious about how this came to be. Surely there would...
[ 0.5238661170005798, -0.03728640452027321, 0.10278911143541336, -0.19219684600830078, -0.4896995425224304, -0.0673171654343605, 0.11428384482860565, 0.5959563851356506, -0.4108484089374542, -0.7605466246604919, 0.12224112451076508, 0.5865018367767334, 0.001199734746478498, 0.119827635586261...
and browser manufacturers have worked for 15 or so years to make it work in their browsers. If a competitor came along, it would need to really bring something new to the table in order to convince everyone to a) adopt it, b) live with locking out all the users of older browsers like IE7, Firefox 3.0, Chrome 1.0 etc. ...
[ 0.6403576731681824, 0.27961093187332153, 0.044535696506500244, 0.13705316185951233, -0.19964587688446045, -0.4746958017349243, 0.1648024022579193, 0.3394815921783447, -0.14600716531276703, -0.8778186440467834, 0.10257918387651443, 0.34096604585647583, -0.379888653755188, 0.1372873634099960...
``` /* user-defined exception class derived from a standard class for exceptions*/ class MyProblem : public std::exception { public: ... MyProblem(...) { //special constructor } virtual const char* what() const throw() { //what() function ... } }; ... void f() { ... //create an exce...
[ 0.053981713950634, 0.3538513481616974, 0.003459987696260214, -0.3151654005050659, -0.04877921938896179, 0.11480194330215454, 0.2574405074119568, -0.15052825212478638, -0.07733161002397537, -0.32955148816108704, -0.29340654611587524, 0.4357351064682007, -0.3978985548019409, 0.14152166247367...
function does not throw.
[ -0.3419817090034485, -0.36576783657073975, -0.045976798981428146, -0.22570697963237762, -0.4438246786594391, -0.05688200891017914, 0.45962002873420715, -0.19171075522899628, 0.13876548409461975, -0.13026811182498932, -0.19949640333652496, 0.42351242899894714, -0.4197806417942047, 0.0186871...
I'm trying to figure out the best way take a ics file and convert it into a format I can put into a database. Can anyone recommend how to do this? The commercial .NET library Aspose.iCal does the job <http://www.aspose.com/community/blogs/salman.sarfraz/archive/2008/11/21/where-is-aspose-icalendar.aspx> (used to be <h...
[ 0.32749035954475403, 0.049887001514434814, 0.240733802318573, 0.19205600023269653, -0.1000753790140152, -0.4348812997341156, 0.1408393681049347, -0.26098012924194336, -0.5409737229347229, -0.29893776774406433, 0.1649552881717682, 0.08710763603448868, -0.0214610006660223, 0.1650096774101257...
How do I remove all whitespace from the start and end of the string? All browsers since IE9+ have [`trim()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/trim) method for strings: ``` " \n test \n ".trim(); // returns "test" here ``` For those browsers who does not support ...
[ 0.056029096245765686, -0.010986813344061375, 0.40663623809814453, -0.4201771020889282, 0.11640962958335876, 0.07313822209835052, 0.13381311297416687, -0.32480040192604065, -0.14012402296066284, -0.7206929922103882, -0.34088924527168274, 0.40403711795806885, -0.3828880190849304, 0.049804773...
this.replace(rtrim, ''); }; })(); } ``` --- That said, if using `jQuery`, `$.trim(str)` is also available and handles undefined/null. --- See this: ``` String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g, '');}; String.prototype.ltrim=function(){return this.replace(/^\s+/,'');}; String...
[ -0.25982651114463806, -0.1801142543554306, 0.5163719058036804, -0.26830166578292847, 0.3513169288635254, 0.14557012915611267, 0.2773800790309906, -0.39120399951934814, -0.17600294947624207, -0.6495314836502075, -0.32663482427597046, 0.5065257549285889, -0.5014728903770447, 0.11846900731325...
So I'm going to be working on a home made blog system in PHP and I was wondering which way of storing data is the fastest. I could go in the MySQL direction, or I could go with my own little way of doing it which is storing all of the information (encoded in JSON) in files. Which way would be the fastest, MySQL or JSO...
[ 0.4339812695980072, 0.1356138288974762, 0.05241720378398895, 0.38625451922416687, -0.12314293533563614, -0.19389879703521729, -0.11004440486431122, 0.5487509965896606, -0.3314353823661804, -0.6760087609291077, 0.2416439801454544, 0.2884872257709503, -0.20115497708320618, -0.007117106579244...
into [XML](http://www.php.net/manual/en/function.simplexml-element-construct.php) or [Serialized PHP](http://www.php.net/serialize) (which I suspect is what you are after, rather than JSON).
[ 0.25049036741256714, -0.3238111734390259, 0.21162833273410797, -0.09788477420806885, -0.12650392949581146, -0.2682102620601654, 0.06911930441856384, 0.05495019629597664, -0.21027714014053345, -0.2616364061832428, -0.7759454846382141, 0.19063933193683624, -0.2565014064311981, -0.07627511769...
I know about the buttonMode property on a MovieClip (to get the hand cursor on hover) and I'm looking to do the same with a TextField, but it doesn't seem to implement this property. Does anyone know if there's anything similar or, failing that, another way to control the cursor for the textfield? --- @James: I'm ext...
[ 0.648046612739563, 0.0805869847536087, 0.598874032497406, 0.24227149784564972, 0.2986588478088379, -0.16879352927207947, 0.1300971359014511, 0.12521076202392578, -0.18147794902324677, -0.44935938715934753, 0.09284501522779465, 0.7732793092727661, 0.1950269192457199, 0.27928054332733154, ...
except the TextField, when it reverts to the caret (or just the pointer if I set Selectable = false on the TextField). @ForYourOwnGood: Point taken about usability, but I want the textfield to be a seamless part of a bigger object, and it just doesn't feel right without the hand cursor. What you supplied sounds like j...
[ 0.34175875782966614, -0.23689210414886475, 0.46558934450149536, 0.13717122375965118, 0.01763870380818844, -0.11696147918701172, 0.09899390488862991, -0.05825489014387131, -0.10728525370359421, -0.5726227760314941, -0.14806164801120758, 0.8701567053794861, -0.004555356223136187, -0.21304427...
enabled.
[ 0.03092569299042225, -0.14174751937389374, 0.41953614354133606, 0.12759627401828766, 0.1865585744380951, -0.12174192070960999, 0.06838703155517578, 0.1059643030166626, -0.1099448874592781, -0.9038100838661194, -0.5361080169677734, 0.3697914183139801, -0.14742369949817657, -0.04741185903549...
I have a C# application which works with an Oracle database and has been already shipped. Now it's time to ship out a new release. The C# object model have been revised and had an impact on the table structure. If I ship out the new release, I need to take care of existing data. Just dropping tables and recreate these...
[ 0.4431074261665344, 0.38705307245254517, 0.22354482114315033, 0.09387320280075073, -0.024787407368421555, -0.16845844686031342, 0.004577327519655228, 0.09249138087034225, -0.3695420026779175, -0.5641335248947144, 0.019487163051962852, 0.4468849003314972, -0.1714722216129303, 0.122712746262...
committed to a repository like C# source code. The patching of the database is tested on regular basis with the help of CruiseControl.NET. NUnit tests are run against the patched database to uncover mismatches between database tables and C# object model. The whole procedure does work, but I have the feeling that this ...
[ 0.44603291153907776, -0.01339208334684372, 0.3152190148830414, 0.3413832485675812, 0.4602419137954712, -0.21581411361694336, 0.33681079745292664, 0.16220419108867645, -0.44552868604660034, -0.3655726909637451, 0.009132114239037037, 0.7776453495025635, 0.044584549963474274, 0.01120777893811...
me to have full confidence in the tools and practices I use. Last week I stumbled over [LiquiBase](http://www.liquibase.org/) and I asked myself -- and now in SO: **What tools or practices can help to do database migration with lesser risks and more confidence? Are there any good books or internet resources out there...
[ 0.6082568168640137, 0.38823795318603516, 0.07989069074392319, 0.19209222495555878, 0.09879713505506516, -0.05369862914085388, 0.12690812349319458, 0.032583411782979965, -0.16576869785785675, -0.806935727596283, 0.18600867688655853, 0.5932769775390625, 0.2586066424846649, -0.109098829329013...
with version number * each time you make change to database schema of your application you should: + create SQL script for creating, altering or dropping database objects + create SQL script for managing data changes that must be done with new data schema (e.g. insert defaults in new fields, insert default records in...
[ 0.29143956303596497, 0.08090084791183472, 0.7214033007621765, 0.008006008341908455, -0.3625953495502472, 0.06802910566329956, 0.19737300276756287, -0.23719139397144318, -0.19078490138053894, -0.8450854420661926, 0.01893199048936367, 0.4672192633152008, -0.34847670793533325, 0.3825771808624...
will do in your application. Don't create database upgrade that will take weeks or months of work to upgrade your application. * create script that will upgrade your user's database to new version: + script should check current version of database and then execute database upgrade scripts that will convert schema to r...
[ 0.3219972848892212, 0.04899001121520996, 0.6989098787307739, 0.09633183479309082, 0.30182084441185, -0.1913999766111374, 0.4654829800128937, -0.1515452265739441, -0.05269638076424599, -0.9888033866882324, -0.10068274289369583, 0.8110068440437317, 0.12200158834457397, -0.0350043922662735, ...
I have a table that contains some blob fields that I don't want to load by default. In a dbml file it is possible to set the delay loaded property for such fields. Is there a similar option for external mapping files? I'm not familiar with "external mapping files", but this is basically how you do lazy loading with...
[ 0.3116626441478729, -0.09633619338274002, 0.5278098583221436, -0.14386749267578125, -0.16159693896770477, 0.005227272864431143, 0.27164673805236816, -0.26782187819480896, -0.10955877602100372, -0.6200277209281921, -0.19978952407836914, 0.468438982963562, -0.4566061198711395, 0.360468924045...
} set { this._content.Value = value; } } ``` Using `System.Data.Linq.Link<String>` as the private variable causes that property to be delay loaded, unless delay loading is disabled on the DataContext.
[ 0.028467338532209396, 0.03531057760119438, 0.3249964118003845, -0.10925377160310745, 0.4218859076499939, -0.22290867567062378, -0.009744085371494293, -0.1844344139099121, -0.29962196946144104, -0.2640269696712494, -0.5815200209617615, 0.4191322922706604, -0.31299489736557007, 0.30220869183...
I have a winform app which render a few charts, based on the user selection. I want to simulate an ajax style loader such that when the user makes a selection, there will be an overlay on the form with an animation in the center. What are some of the options in accomplishing this? I was thinking of loading a panel with...
[ 0.1712738424539566, -0.00857191625982523, 0.494200736284256, 0.17713016271591187, -0.14523106813430786, 0.25576820969581604, -0.05601350590586662, -0.04009302705526352, -0.23956657946109772, -0.894608736038208, -0.01755679026246071, 0.42553606629371643, 0.0019581797532737255, -0.1144479736...
When the application is run, the `DataGridView` is bound to a `DataTable`. Later I add more columns to the `DataTable` programmatically and it is reflected in the underlying data - i.e. the column Ordinals are as they should be. However this is not reflected in the `DataGridView`. Instead columns are appended onto the ...
[ 0.0681387186050415, -0.14487121999263763, 0.8913472294807434, -0.10596293210983276, 0.04689561948180199, -0.21902628242969513, 0.11596424877643585, -0.39561352133750916, -0.07918483018875122, -0.7174365520477295, -0.5485038757324219, 0.47371581196784973, -0.34992465376853943, 0.06666067987...
EventArgs e) { this.dataGridView1.DataSource = data; for (int i = 0; i < 5; i++) { this.data.Columns.Add(i.ToString()); } } private void button2_Click(object sender, EventArgs e) { DataColumn foo = new DataColumn(); this.data.Columns.Add(foo)...
[ -0.5418162941932678, -0.40771976113319397, 0.8065803647041321, -0.23015139997005463, 0.15781345963478088, 0.1868598461151123, 0.3110540509223938, -0.2492358386516571, -0.24147403240203857, -0.5194398164749146, -0.443587064743042, 0.6091826558113098, -0.3310842216014862, 0.12612783908843994...
foo.SetOrdinal(0); } private void button3_Click(object sender, EventArgs e) { foreach (DataColumn tmpCol in this.data.Columns) { Console.WriteLine("{0} : {1}", tmpCol.ColumnName, tmpCol.Ordinal); } } } ``` Button 1 generates the columns, button 2 adds a column and ...
[ -0.2770114839076996, -0.04154393821954727, 0.9337133169174194, -0.2699614465236664, 0.04971317946910858, 0.42192667722702026, -0.028327414765954018, -0.38979044556617737, -0.2071869671344757, -0.33360397815704346, -0.3010452091693878, 0.19803087413311005, -0.6578378081321716, -0.1883413791...
columns and shows they are how they should be in the `DataTable`. That is just how `DataGridView` works; with auto-generate columns enabled, extra (unmapped) columns are appended to the end. You can unbind and re-bind to fix it; set the DataSource to null and back to the table: ``` this.dataGridView1.DataSource = null...
[ -0.08867239207029343, -0.03284870833158493, 0.7785567045211792, -0.09014950692653656, 0.05774660408496857, 0.010873260907828808, 0.15478399395942688, -0.18885038793087006, -0.28377512097358704, -0.5074013471603394, -0.25584813952445984, 0.3696666657924652, -0.49481749534606934, 0.066511288...
Are there any free Perl IDEs out there for Windows that have debugging capabilities, syntax highlighting, and possibly even IntelliSense? There is an overview of Perl IDE's [here](http://www.perlide.org/). I find Padre very promising, but I'm not sure it already has all features you need (if not it probably will soon).
[ 0.42378881573677063, -0.1967010647058487, 0.20420333743095398, 0.3062174618244171, -0.24761764705181122, -0.31848734617233276, -0.02484532818198204, 0.36762627959251404, -0.25185492634773254, -0.4053506553173065, -0.10801976919174194, 0.4345736503601074, -0.03725403919816017, -0.1606543660...
I've got an app in development where you press a button to play a sound using System beep. Instead of recording the output, I was thinking of recording the timing of when the buttons were pressed, so when the user presses a 'Play' button, the buttons are pressed in the same timing the user has pressed them, so it acts...
[ 0.5713703632354736, -0.010926788672804832, 0.22372885048389435, -0.06953749805688858, 0.3466776907444, 0.0700044110417366, 0.08216386288404465, -0.34112825989723206, -0.3017272651195526, -0.4170168340206146, 0.2110045701265335, 0.6706554889678955, -0.26814740896224976, -0.1699538677930832,...
Timing stops after a button has been pressed 5. PLay button plays back the sequence of events Can anybody give any ideas on coding, documents to read etc. Thanks a lot! I would personally format it in two parts: the non-am/pm part, and the am/pm part with ToLower: ``` string formatted = item.PostedOn.ToString("dddd,...
[ 0.3257746994495392, -0.14218942821025848, 0.7752261757850647, 0.13470964133739471, 0.1500389128923416, 0.16736800968647003, 0.00954236276447773, -0.3518516421318054, -0.24123063683509827, -0.34154605865478516, 0.04857604205608368, 0.38497650623321533, -0.2312888652086258, 0.083391770720481...
that format info for the normal formatting. You'd want to cache the DateTimeFormatInfo, obviously... EDIT: Despite my comment, I've written the caching bit anyway. It probably won't be *faster* than the code above (as it involves a lock and a dictionary lookup) but it does make the calling code simpler: ``` string fo...
[ 0.2645413875579834, 0.06579694151878357, 0.7897278666496277, 0.06091010570526123, -0.07145167887210846, -0.12256651371717453, 0.11558051407337189, -0.03132639080286026, -0.3437348008155823, -0.648908257484436, -0.0830063670873642, 0.47618037462234497, -0.16404470801353455, 0.20332987606525...
complete program to demonstrate: ``` using System; using System.Collections.Generic; using System.Globalization; public class Test { static void Main() { Console.WriteLine(DateTime.Now.ToString("dddd, MMMM d, yyyy a\\t h:mmtt", GetLowerCaseInfo()); }...
[ 0.07650545239448547, -0.042748164385557175, 0.3500937223434448, -0.0412990003824234, 0.46303457021713257, 0.07408620417118073, 0.4063114523887634, 0.019678030163049698, 0.016377903521060944, -0.5571983456611633, -0.37656131386756897, 0.30979716777801514, -0.2073395997285843, 0.478805750608...
new Dictionary<DateTimeFormatInfo,DateTimeFormatInfo>(); private static object cacheLock = new object(); public static DateTimeFormatInfo GetLowerCaseInfo() { DateTimeFormatInfo current = CultureInfo.CurrentCulture.DateTimeFormat; lock (cacheLock) { DateTimeFormatInfo r...
[ -0.013808486983180046, -0.2198190838098526, 0.857459545135498, -0.2502737045288086, 0.6420778036117554, 0.1587633639574051, 0.08994774520397186, 0.07526078820228577, 0.06791114062070847, -0.3998565673828125, -0.32886457443237305, 0.3298877775669098, -0.27086737751960754, 0.7103852033615112...
ret = (DateTimeFormatInfo) current.Clone(); ret.AMDesignator = ret.AMDesignator.ToLower(); ret.PMDesignator = ret.PMDesignator.ToLower(); cache[current] = ret; } return ret; }
[ -0.013075258582830429, -0.3101811707019806, 0.7665713429450989, -0.32071375846862793, 0.8946956396102905, 0.4679264724254608, 0.3989836573600769, -0.35905349254608154, -0.31791290640830994, -0.18507495522499084, -0.47555026412010193, 0.2748296856880188, -0.16544368863105774, 0.779285252094...
} } ```
[ 0.17493881285190582, 0.41805654764175415, 0.05209751054644585, -0.04864929988980293, 0.437467485666275, -0.15825650095939636, 0.13202530145645142, 0.5446501970291138, 0.35430577397346497, -0.4846813380718231, -0.2295716553926468, 0.546978771686554, -0.3188462555408478, 0.2798506021499634, ...
I have a large file in my repository that is not text-mergeable and that I do not need multiple-version control for (PPT for example). I would like to keep it on the repository for backup purposes and to share with multiple people, but I do not want the repository size to grow huge because it's keeping a duplicate copy...
[ 0.6008124351501465, -0.0263096634298563, 0.11147954314947128, 0.043619342148303986, -0.1244347095489502, -0.31613945960998535, 0.4738136827945709, 0.38542789220809937, -0.4864766299724579, -0.53970867395401, -0.05069199576973915, 0.25430071353912354, -0.3869101405143738, 0.3599270582199096...
so depending on the type of changes you make it won't consume a lot of extra space.
[ 0.6650803089141846, 0.1918896585702896, 0.11081952601671219, -0.038693852722644806, 0.5174444317817688, 0.006645636633038521, -0.3352091908454895, -0.039193835109472275, -0.23175522685050964, -0.5676466226577759, 0.5268411040306091, 0.1671348512172699, 0.2726765275001526, 0.225073933601379...
I want to use Vectors in a C# application I'm writing, sepcifically a Vector3. What's the best way for me to get a Vector type without writing my own? I used one in a POC that I found on [CodeProject](http://www.codeproject.com/KB/recipes/VectorType.aspx). It's not ideal, but it worked for our situation. At the time,...
[ 0.42643436789512634, -0.11667522042989731, 0.24742305278778076, 0.02908007986843586, -0.2556934654712677, 0.1840335577726364, -0.17929533123970032, 0.1458921581506729, -0.14289596676826477, -0.7939789295196533, 0.315822035074234, 0.33679550886154175, -0.5298349261283875, -0.130120620131492...
I have this code: ``` using DC = MV6DataContext; using MV6; // Business Logic Layer // ... public DC.MV6DataContext dc = new DC.MV6DataContext(ConnectionString); IP ip = new IP(Request.UserHostAddress); dc.IPs.InsertOnSubmit(ip); dc.SubmitChanges(); // in Business Logic layer: public class IP : DC.IP { public IP(s...
[ -0.10340403020381927, 0.032353077083826065, 0.451357901096344, 0.01612507365643978, 0.05797155573964119, -0.21015328168869019, 0.1892099529504776, -0.3881681561470032, -0.349931538105011, -0.6059989333152771, -0.13960030674934387, 0.46179088950157166, -0.221710205078125, 0.4065870642662048...