text
stringlengths
0
30.5k
title
stringclasses
1 value
embeddings
listlengths
768
768
(both sites running as http). However on our client's testing site it occurs all the time. Unfortunately my testing environment is not the same as the client's testing environment, so that adds some variables to the mix, but the main difference I see is that the client's testing site is using SSL. Has anyone ever had...
[ 0.31082212924957275, 0.1670817881822586, -0.10541782528162003, 0.00856097973883152, -0.1235806941986084, -0.0581054650247097, 0.8002822995185852, 0.15363501012325287, -0.26006367802619934, -0.6527318358421326, 0.011387507431209087, 0.3787118196487427, -0.25982466340065, 0.13413189351558685...
got Fiddler running and simulated the performance to run at old school modem speeds, still no operation aborted error locally or on our own testing server. FYI: The site is an ASP.NET 2.0 Site using ASP.NET AJAX Extensions 1.0. The page with the issue also has the AJAX Control Toolkit's Cascading Drop Down on it. And...
[ 0.19988617300987244, 0.038228701800107956, 0.3791758120059967, 0.03281060606241226, -0.1165633276104927, -0.32195547223091125, 0.3801456391811371, 0.1422383338212967, -0.2322528213262558, -0.2964223027229309, 0.15816505253314972, 0.47614869475364685, -0.0013963994570076466, 0.0365697853267...
the ASP.NET AJAX client-side framework. I'll paraphrase what I found: The issue is a race condition that occurs due to an Internet Explorer/ASP.Net AJAX bug. The probability of encountering this issue increases when the application has a significant number of ASP.Net AJAX enabled server controls on the web page. The ...
[ -0.009856107644736767, -0.052227940410375595, 0.167966827750206, 0.04451422393321991, 0.07589225471019745, -0.048331718891859055, 0.4489166736602783, 0.25909021496772766, -0.18661002814769745, -0.6154868602752686, 0.09721586108207703, 0.5765110850334167, -0.4729647934436798, -0.10747424513...
I have a collection of elements on my page, and I want to see if they are visible or not currently. So: ``` $(".someClass") ``` How can I loop through and figure this out? because if it is visible, i have to fire another function. ``` $(".someClass").each(function(){ if($(this).is(":visible")){ //item is visi...
[ 0.15553896129131317, -0.030970795080065727, 0.3261069655418396, -0.14283056557178497, -0.012903139926493168, -0.05826586112380028, 0.4157201647758484, -0.08258716762065887, -0.2044658064842224, -0.6350076794624329, -0.20635879039764404, 0.2509070634841919, -0.41954708099365234, 0.198202922...
Given a section of HTML, can I selectively pick some types of elements (e.g., input) and add a custom attribute using JavaScript? I would also need to remove this attribute if it exists. I have done this before using jQuery, but I'm unable to use it for this particular task. [Accessing HTML attributes using the DOM](h...
[ 0.17392484843730927, 0.1593109667301178, 0.3809879720211029, -0.39156225323677063, -0.16388370096683502, 0.019288117066025734, 0.22913819551467896, -0.4727640151977539, -0.1415829211473465, -0.3877551853656769, -0.5072057843208313, 0.36523282527923584, -0.6247161626815796, 0.03824388235807...
I am using a ASP.NET MVC framework, jQuery library (1.3.2), linq to sql, sql server 2005. I have a problem with jQuery MaskMoney plugin, to save data in sql server table. I created a table, where this table have a field "valueProducts" type Decimal(18,2). In my page, I have a html field with jQuery maskmoney. Exampl...
[ 0.14881932735443115, 0.2556080222129822, 0.38028445839881897, 0.08213898539543152, -0.013842185959219933, 0.28926435112953186, 0.05021467059850693, -0.16142290830612183, -0.3104250133037567, -0.559253454208374, 0.6841278076171875, 0.6253517866134644, -0.003108124015852809, 0.23513171076774...
me? Thanks. I did it. The problem of answer above is in the Linq to SQL data mapping. Fields type money or smallmoney are mapping using decimal type. The solution that I found was... I don't save money fields of the View using UpdateModel. before: ``` Check c = new Check(); this.UpdateModel(c, new[] { "number", ...
[ -0.04940512031316757, 0.14460456371307373, 0.7906791567802429, 0.12925775349140167, -0.061871789395809174, 0.0831817090511322, 0.16880269348621368, -0.1576133370399475, -0.19484774768352509, -0.43052080273628235, 0.07721579819917679, 0.3904394805431366, 0.010890670120716095, 0.096782684326...
c = (Check)ViewData.Model; %> //In the field, I use de string format type currency and I passed the object of //CurrentSymbol ... Value1:<br> <%= Html.TextBox("value1", Convert.ToDouble(c.value1).ToString("C", LocalFormat))%> .... </asp:Content> ``` Thank you for helping me.
[ 0.08889119327068329, -0.2010992467403412, 0.7163209319114685, 0.06524713337421417, -0.12444914132356644, -0.08281148970127106, 0.10007672756910324, -0.23719899356365204, -0.16935117542743683, -0.4534473717212677, 0.13627472519874573, 0.44488540291786194, 0.1416502594947815, 0.1048075631260...
We have several large subprojects inside our main SVN project root. I commit and merge only my subproject when working with our release branches, mainly because it's faster. However, a colleague pointed out this [reference to merging subdirectories in *Version Control with Subversion*](http://svnbook.red-bean.com/e...
[ 0.2502157986164093, -0.12213374674320221, 0.11564445495605469, -0.02159040793776512, -0.05762117728590965, -0.4221247732639313, 0.5504733920097351, 0.05566844344139099, -0.2363697737455368, -0.4217720627784729, -0.21955932676792145, 0.22725224494934082, -0.4371318817138672, 0.2549267411231...
about short-lived feature branches? One possible explanation is that you could forget parts of a change set. If the change sets that you are merging cover files that are outside the subdirectory that you have checked out, then there is always the possibility that you will forget to merge those files. For example, if...
[ -0.007101107854396105, -0.5127221345901489, 0.23662041127681732, 0.04003646597266197, 0.1682424396276474, -0.023217501118779182, 0.39229750633239746, 0.30313539505004883, -0.49220147728919983, -0.4761127233505249, -0.29129263758659363, 0.45596903562545776, -0.34146547317504883, 0.277594417...
change set r5 like this: ``` $ svn co http://example.com/svn/branches/stable/subdir1 $ cd subdir1 $ svn merge -c 5 http://example.com/svn/trunk/subdir1 . --- Merging r5 into '.': U main.c $ svn ci -m"Merged r5 from trunk" ``` But this will only merge half of revision 5. Worse still, if you go back and look at the...
[ -0.1603553146123886, -0.30757981538772583, 0.8073123693466187, -0.06927285343408585, -0.14815562963485718, 0.040496379137039185, 0.23415280878543854, -0.2741774022579193, -0.6783775687217712, -0.39845016598701477, -0.18214473128318787, 0.4293566048145294, -0.18379001319408417, 0.6010137200...
of it. Of course r6 does show that only 1 file has changed on the stable branch. ``` ------------------------------------------------------------------------ r6 | rich | 2009-04-16 22:28:16 +0200 (Thu, 16 Apr 2009) | 1 line Changed paths: M /branches/stable/subdir2 M /branches/stable/subdir2/main.c Merge revisi...
[ -0.3680832087993622, 0.03049192950129509, 0.6739364862442017, -0.016851237043738365, 0.2747802436351776, 0.015462624840438366, 0.47876301407814026, 0.023760544136166573, -0.5299519300460815, -0.5881995558738708, -0.44424518942832947, 0.49969443678855896, -0.26362305879592896, 0.25007230043...
best to add a good commit message describing your intentions.
[ 0.36509907245635986, 0.1696733832359314, -0.1570451557636261, -0.10591987520456314, -0.1851762980222702, -0.19152918457984924, 0.5431109070777893, 0.4665272831916809, 0.07387607544660568, -0.6974869966506958, 0.03090207464993, 0.61574786901474, 0.15582695603370667, -0.49617019295692444, ...
If I bind GridView to SqlDataSource and also set AutoGenerateEditButton to true, and if I then try to update a field ( this field being a primary key in database ), then database should return an error and thus SqlException should be thrown?! So why doesn’t page report an exception? Instead, all Gridview does is setti...
[ 0.26761189103126526, 0.0209005456417799, 0.37878668308258057, -0.03993076831102371, -0.2128196656703949, -0.20566785335540771, 0.45640239119529724, -0.4085538685321808, 0.0519220344722271, -0.5710182189941406, 0.2050843983888626, 0.6389121413230896, -0.43091633915901184, 0.3501417338848114...
exception wasn't raised: ``` SqlConnection sc = new SqlConnection(); sc.ConnectionString = @"Data source=localhost; integrated security=sspi; initial catalog=northwind;"; SqlCommand sComand = new SqlCommand(); sComand.Connection = sc; sComand.CommandText = "update Employees set...
[ -0.16875594854354858, -0.24835988879203796, 0.6160271167755127, 0.09197834134101868, -0.13559897243976593, 0.09263499826192856, 0.1784949004650116, 0.08446677774190903, -0.4014817774295807, -0.5232949256896973, -0.4639120399951935, 0.13462863862514496, -0.3085983991622925, 0.12340033799409...
int I = sComand.ExecuteNonQuery(); ``` BTW - I tried with setting DataKeyNames="EmployeeId", but exception was still not raised thanx EDIT: Hello, Sorry for not replying sooner, but I haven't noticed I got a reply. Anyways, for some reason it's working now, meaning GridView does report an exception. Thus I mus...
[ 0.26619693636894226, 0.014587506651878357, 0.015201154164969921, -0.037357185035943985, -0.19580727815628052, -0.32851725816726685, 0.6998322010040283, 0.15770691633224487, -0.32002177834510803, -0.7940646409988403, 0.18591897189617157, 0.5411356687545776, -0.33741602301597595, 0.238550737...
with the GridView. SQL does not allow updates to IDENTITY columns since they get generated by the database engine. In this case "EmployeeId" is such a field.
[ 0.22517260909080505, -0.08678475022315979, 0.21411319077014923, 0.17330892384052277, 0.1159762591123581, -0.3488456904888153, 0.02287939563393593, 0.119203120470047, -0.1501207798719406, -0.4532483220100403, 0.06800296902656555, 0.2986551523208618, -0.38132011890411377, 0.2279539257287979,...
Does anybody know if there's a better alternative to swfobject? I actually like swfobject, I just wanted to hear if anybody found something better. Or maybe it is the best way. If you do not know swfobject you can find it here: <http://code.google.com/p/swfobject/> It is the best way I know of, and I have never had a...
[ 0.7359416484832764, 0.08047374337911606, 0.06297827512025833, -0.19884981215000153, -0.13942144811153412, -0.4099248945713043, 0.42566508054733276, 0.7543296217918396, -0.2058020830154419, -0.6671993136405945, 0.22622594237327576, 0.5877469778060913, -0.29038625955581665, -0.33967196941375...
I'm trying to create a Fluent Interface to the Winforms Datagrid. This should allow me to use a typed datasource and easy use of properties of properties (Order.Custom.FullName) I'm adding the columns on initialization and trying to set the property to use there: ``` dgv.With<Order>().Column("Client Name").On(x => x....
[ 0.09202208369970322, -0.11099062114953995, 0.47513875365257263, -0.0908634141087532, -0.039518337696790695, -0.013139592483639717, 0.05525284633040428, -0.3625060021877289, 0.13437320291996002, -0.6548635959625244, -0.020906921476125717, 0.7870479822158813, -0.47585320472717285, 0.03785047...
like: ``` ProcessList<Client>(clientList, x => x.FullName); ``` Is it possible to do something like this: [Edit] Note that in practice, the expressions will be set earlier, and will be fetched elsewhere... ``` public void ProcessList<T>(IList<T> sourceList, Expression<Func<T, object>> expression) { var list = ...
[ 0.2497633546590805, -0.2704235911369324, 0.5255191326141357, -0.21821007132530212, -0.048594798892736435, 0.08205835521221161, 0.008327384479343891, -0.5077472925186157, -0.33553987741470337, -0.6868911981582642, -0.18887265026569366, 0.5914648771286011, -0.6872109770774841, 0.068455658853...
the given expression. I know I can evaluate that expression to retrieve the correct properties. I'm kinda stuck, is something like this possible? Any ideas? Well, with a simple call to `Select` you can come very close: ``` ProcessList(clientList.Select(x => new { x.FullName })); ... public void ProcessList<T>(IEnu...
[ 0.13703615963459015, -0.24178917706012726, 0.6178645491600037, -0.16395998001098633, 0.15526321530342102, 0.09350640326738358, 0.08305473625659943, -0.1333947777748108, -0.35886359214782715, -0.8264903426170349, -0.07694759219884872, 0.6018120646476746, -0.283854603767395, 0.36480548977851...
I have a WCF service currently using a TCP endpoint. Rather than create a separate console client app to administer the server I want the ability to telnet into the server or even just connect using a raw connection using putty and execute ascii commands straight on the server. Any ideas how I would go about doing thi...
[ 0.6404703259468079, -0.07253966480493546, 0.2960149645805359, 0.0447644479572773, -0.33019310235977173, -0.14395608007907867, -0.03055662289261818, -0.07216183096170425, -0.05299228057265282, -0.7736014127731323, 0.09808135777711868, 0.3633899390697479, -0.45562031865119934, 0.377439320087...
inside a windows service rather than IIS 2. Create a socket listener inside the windows service listening on the port of your choice 3. Write some code to process your command when data arrives the socket
[ 0.4756774604320526, -0.039250243455171585, 0.07028773427009583, -0.11428755521774292, -0.279432088136673, 0.027338337153196335, 0.15322279930114746, -0.29529014229774475, 0.12252867966890335, -0.7668320536613464, -0.18301346898078918, 0.6835569739341736, -0.16309022903442383, 0.17812478542...
Alright here's the deal, I'm taking an intro to C++ class at my university and am having trouble figuring out how to change the extension of a file. First, what we are suppose to do is read in a .txt file and count words, sentences, vowels etc. Well I got this but the next step is what's troubling me. We are then suppo...
[ 0.7603204846382141, 0.0662020742893219, 0.3140546381473541, -0.25657013058662415, -0.05272145941853523, 0.014078483916819096, 0.15221662819385529, 0.05701591819524765, -0.2294856458902359, -0.524320125579834, 0.1239200234413147, 0.48715174198150635, -0.27382993698120117, 0.0541955940425396...
to the ASCII code of each character if you were interested). Being a beginner in programming, I'm not quite sure how to do this. I'm using the following piece of code to at first get the input file: ``` cout << "Enter filename: "; cin >> filename; infile.open(filename.c_str()); ``` I'm assuming to create a new file ...
[ 0.615138590335846, 0.45018470287323, 0.04695549234747887, -0.16436617076396942, -0.10007195174694061, 0.12489510327577591, 0.07410454750061035, -0.11594796925783157, 0.020047619938850403, -0.6783483624458313, -0.01039901189506054, 0.5415907502174377, -0.15789714455604553, 0.021314328536391...
this. You can take the super lazy approach, and have them enter in just the file name, and not the .txt extension. In which case you can append .txt to it to open the input file. ``` infile.open(filename + ".txt"); ``` Then you just call ``` outfile.open(filename + ".code"); ``` The next approach would be to tak...
[ 0.3979748785495758, 0.05426453799009323, 0.1946839541196823, -0.18931184709072113, 0.1280335634946823, -0.15547598898410797, 0.24004465341567993, -0.21503329277038574, -0.2611593008041382, -0.632980227470398, -0.36208856105804443, 0.6880791783332825, -0.4567439556121826, 0.0190684273838996...
We are starting a big LOB application using Silverlight. I was wondering if you have any experience with Testing Silverlight apps, what are the best solutions you found and if you encountered any pitfalls. A stalwart individual named Jeff Wilcox has developed a unit test framework targeting Silverlight 2 specifically...
[ 0.6192800402641296, 0.5578560829162598, 0.10631074011325836, 0.2450515627861023, -0.28788572549819946, 0.10360464453697205, 0.2680589556694031, -0.09577003866434097, 0.0048624384216964245, -0.6577126979827881, 0.2761327624320984, 0.4105488359928131, -0.25080814957618713, -0.026793066412210...
is that Silverlight unit tests run inside a web browser, which hampers continuous integration. ib.
[ 0.19841733574867249, 0.320578932762146, -0.22904621064662933, 0.08032893389463425, 0.4841039478778839, -0.3879213035106659, 0.20017050206661224, -0.2564426362514496, 0.24021029472351074, -0.3463108539581299, 0.1220095232129097, 0.03210323676466942, -0.1744672954082489, -0.1835109144449234,...
In MS Access 2003, I have the following values in a column ``` 0-0-60 20-0-0-24S 20.5-0-0-24S 32-0-0 ``` How can I write my query such that I can pull the 3rd item from the column, example the "60" from "0-0-60". Keep in mind that I've optionally got the 4th column also. You will want to generalize this function for...
[ -0.33019906282424927, -0.21378983557224274, 0.36191269755363464, -0.2570149302482605, -0.3152630925178528, -0.08465462177991867, 0.055472444742918015, -0.37475743889808655, -0.14484737813472748, -0.2971729636192322, -0.2409869134426117, 0.5746515989303589, -0.46453407406806946, -0.00721644...
MyTable; ``` Good Luck!
[ 0.10505981743335724, 0.6164498329162598, 0.6582393646240234, -0.03572290390729904, 0.25823044776916504, -0.16720402240753174, 0.07113873213529587, 0.5829527378082275, -0.14842729270458221, -0.5598446726799011, -0.064808689057827, 0.449489563703537, 0.33497685194015503, 0.17108987271785736,...
I have this regex code in python : ``` if re.search(r"\{\\fad|fade\(\d{1,4},\d{1,4}\)\}", text): print(re.search(r"\{\\fad|fade\((\d{1,4}),(\d{1,4})\)\}", text).groups()) ``` `text` is `{\fad(200,200)}Épisode 101 : {\i1}The Ghost{\i0}\Nv. 1.03` and read from a file (don't know if that helps). This returns the fol...
[ -0.29693248867988586, 0.24282245337963104, 0.4925774931907654, -0.14509505033493042, 0.12869395315647125, 0.022164005786180496, 0.41573357582092285, -0.2562023401260376, -0.1660335659980774, -0.48369112610816956, -0.2994467318058014, 0.559593915939331, -0.5613498687744141, 0.01973143033683...
I have a table, let's call it "a" that is used in a left join in a view that involves a lot of tables. However, I only want to return rows of "a" if they also join with another table "b". So the existing code looks like ``` SELECT .... FROM main ... ... LEFT JOIN a ON (main.col2 = a.col2) ``` but it's returning too ...
[ -0.30527186393737793, 0.26552119851112366, 0.49921438097953796, -0.33196789026260376, -0.15238018333911896, 0.17726077139377594, 0.009821053594350815, -0.1797211468219757, -0.32874616980552673, -0.6891483664512634, 0.02924344502389431, 0.293009877204895, -0.3909064531326294, 0.210912525653...
me the correct results but unfortunately "EXPLAIN PLAN" tells that doing it this way ends up forcing a full table scan of both a and b, which is making things quite slow. One of my co-workers suggested another LEFT JOIN on b, but that doesn't work because it gives me the b row when it's present, but doesn't stop return...
[ 0.24212050437927246, 0.05539754405617714, 0.43118226528167725, -0.21360065042972565, 0.27652060985565186, 0.05392441898584366, 0.0387471504509449, -0.13767942786216736, -0.11542429029941559, -0.697641909122467, 0.09890906512737274, 0.4875260591506958, -0.2815650999546051, 0.245867267251014...
... FROM .... LEFT JOIN ( a INNER JOIN b ON .... ) ON .... ```
[ -0.520521879196167, 0.28050360083580017, 0.32585829496383667, -0.3074462115764618, -0.026281699538230896, -0.07675058394670486, 0.30014967918395996, -0.484409362077713, -0.07386104762554169, -0.5935333371162415, -0.44884204864501953, 0.05485892668366432, -0.3893904685974121, 0.205453708767...
Why does [this WSDL file](http://services.fliqz.com/searchservice/20071001/service.svc?wsdl) generate an empty service proxy in VS2008? If you look at the Reference.cs file generated, it's empty. Any ideas? Have you read your error list? I got the following: ``` Custom tool warning: There was a validation error on a ...
[ -0.08747880160808563, -0.049490030854940414, 0.4852921962738037, 0.1756613403558731, 0.08918682485818863, -0.21512067317962646, 0.2983584702014923, -0.12518902122974396, -0.48636817932128906, -0.33686161041259766, 0.023970698937773705, -0.01979651115834713, -0.49814632534980774, 0.41003924...
to attempt to validate each item in the sequence in turn can be uniquely determined without examining the content or attributes of that item, and without any information about the items in the remainder of the sequence. Custom tool warning: Cannot import wsdl:portType Detail: An exception was thrown while runni...
[ -0.014500053599476814, 0.08012912422418594, 0.44267603754997253, -0.04016958549618721, -0.18844787776470184, 0.15674707293510437, 0.4303041398525238, -0.679327666759491, -0.2611626982688904, -0.2824103832244873, -0.1664157509803772, 0.4267847537994385, -0.3697608709335327, 0.26667970418930...
Cannot import wsdl:port Detail: There was an error importing a wsdl:binding that the wsdl:port is dependent on. XPath to wsdl:binding: //wsdl:definitions[@targetNamespace='http://tempuri.org/']/wsdl:binding[@name='basicHttpBinding_IVideoSearchService_20071001'] XPath to Error Source: //wsdl:definitions[@targetNamespace...
[ 0.23697268962860107, 0.257207453250885, 0.7728356122970581, 0.058727432042360306, -0.24831831455230713, -0.21123099327087402, 0.49003997445106506, -0.34629788994789124, -0.44367504119873047, -0.45278966426849365, -0.03216198831796646, 0.6826619505882263, -0.36538171768188477, 0.16783702373...
DataContract/MessageContract for its contract definitions, and WCF doesn't want to play nicely with them and generates inappropriate WSDL. If you could control the original contract, you could probably fix the issue and be on your way; unfortunately, you may be entirely out of luck. If you can get the ServiceContract...
[ 0.42135530710220337, -0.19697442650794983, 0.2915153503417969, 0.13070707023143768, 0.007688014302402735, -0.3640635013580322, 0.22703252732753754, -0.00682271970435977, -0.3030734658241272, -0.5221580266952515, 0.03661622852087021, 0.6106826663017273, -0.3378080725669861, 0.32248678803443...
ask them for a .dll you can reference. You could try to write out the interface and data / message contract types yourself by analyzing the WSDL and XSDs. Looks like it'd be a lot of work, though. Sorry I can't help more. This seems to be a combination of poor WCF legacy support and poor architecture/design on the ...
[ 0.6179847121238708, -0.03600470349192619, 0.134436696767807, 0.3571857511997223, -0.13791434466838837, -0.30604374408721924, 0.06307647377252579, 0.36663585901260376, -0.21849529445171356, -0.6476696729660034, 0.2700667679309845, 0.3506336510181427, -0.21963754296302795, 0.1994869261980056...
I am getting a segmentation fault while running this code. I can't work out why this is happening - can anyone see a possible reason? (I have already got and initialized the semaphore's shared memory.) My code: ``` #include<stdlib.h> #include<sys/types.h> #include<sys/shm.h> #include<sys/ipc.h> #includ...
[ 0.14610359072685242, -0.1290128529071808, 0.49303191900253296, -0.3784526288509369, 0.06198655813932419, 0.10724619776010513, 0.6567019820213318, -0.34744101762771606, -0.04143047332763672, -0.9529993534088135, -0.3536040484905243, 0.18217146396636963, -0.38560712337493896, 0.4420589506626...
printf("entered into main of producer\n"); if(semkey<0) { perror("ftok"); exit(1); } shmid=shmget(semkey,30,0777); if(shmid<0) { printf("error"); perror("shmget"); exit(1); } shm=shmat(shmid,0,0); if(shm==(char *) -1) { perror("shm"); exit(1); } s=shm; semid=semget(semk...
[ -0.14531944692134857, -0.3664180040359497, 1.023050308227539, -0.5034545063972473, 0.3231603503227234, 0.5768443942070007, 0.5371610522270203, -0.45489782094955444, -0.044933803379535675, -0.44724148511886597, -0.5088797807693481, 0.40725642442703247, -0.36155471205711365, 0.41689175367355...
PRODUCING\n\n\n"); printf("ENTER DATA\n"); while((c=getchar())!='\n') { *ptrr++=c; } *ptrr='\0'; *s='r'; } else printf("RESOURCE IS FULL:CAN'T PRODUCE"); //printf("produced enough for the consumer \nexiting from the buffer area now..."); buf[0].sem_num=0; buf[0].sem_op=-1; buf[0].sem_flg...
[ -0.02946787141263485, 0.007289892993867397, 0.6079915761947632, -0.685267448425293, 0.5885779857635498, 0.4493776559829712, 0.47568270564079285, -0.19074785709381104, -0.22678408026695251, -0.7663054466247559, -0.63709557056427, 0.5373687148094177, -0.18369269371032715, 0.2964716851711273,...
to use 2. In that case, you should use ``` struct sembuf buf[2] ```
[ -0.0788419172167778, 0.2089899331331253, 0.15507324039936066, -0.6070496439933777, -0.4502609968185425, -0.0607285276055336, -0.07007670402526855, -0.20191876590251923, -0.058442141860723495, -0.8384636044502258, -0.5905253887176514, 0.5429825782775879, -0.40990349650382996, -0.28715160489...
**Question:** How to display the **value** of a **C++** **iterator** using WinDbg, illustrated **below:** ``` for (vector<string>::iterator i = args.begin(); i != args.end(); i++) //omitted //for instance: } else if (*i == "-i") {//attempting to display the value of *i ++i; if (!::PathFileExistsA(i->c...
[ -0.38907456398010254, -0.013167161494493484, 0.5642817616462708, -0.20240390300750732, -0.015857964754104614, 0.34899216890335083, 0.19052447378635406, -0.5887752175331116, -0.1710212677717209, -0.683583676815033, -0.31264200806617737, 0.526491641998291, -0.08140692114830017, -0.0449452325...
: (null) +0x008 _Myptr : 0x009c6198 std::basic_string<char,std::char_traits<char>,std::allocator<char> > ``` * Can another command **display/print** the value of `*i` - please correct me if I'm wrong Try: ``` dt -r i ``` Which will recursively dump the iterator. One of the members should be the inf...
[ -0.2282978594303131, 0.1035374328494072, 0.04096308723092079, 0.109880730509758, 0.048090919852256775, 0.03701557219028473, 0.1797133833169937, -0.29548171162605286, 0.1034855991601944, -0.2421385794878006, -0.33744552731513977, 0.5392761826515198, -0.25191932916641235, 0.05607729032635689...
When I moved a program from a Mac to this Windows PC, the VC++ 2008 compiler is giving me errors for passing unsigned ints to the cmath pow() function. As I understand, this function is not overloaded to accept anything but floating-point numbers. Is there some compiler flag/setting that will ignore these errors? Also...
[ -0.004720515571534634, 0.34959620237350464, 0.18576163053512573, 0.010013610124588013, -0.18188302218914032, -0.06487656384706497, 0.16635380685329437, -0.03337891027331352, -0.40528225898742676, -0.47442886233329773, 0.2397928684949875, 0.48063424229621887, -0.23276959359645844, 0.0836115...
it was just warnings I would move on with my life, but it's not letting me compile. Can I suppress errors somehow? Like I said, the errors aren't coming up on my Mac and the program is fine. Regarding other answers here, it is not a good idea to tell the question author to turn off this warning. His code is broken - he...
[ 0.314808189868927, 0.27050355076789856, 0.3831460475921631, 0.03514774516224861, -0.11254078894853592, -0.09507451951503754, 0.7354395389556885, 0.030009934678673744, -0.24816878139972687, -0.5377766489982605, 0.3153078258037567, 0.5087775588035583, -0.26234087347984314, 0.1198359504342079...
only dealing with numbers that come out as integers, so I don't care that > they aren't floats. If it was just warnings I would move on with my life, but it's not > letting me compile. Can I suppress errors somehow? Like I said, the errors aren't > coming up on my Mac and the program is fine. Integers and floats...
[ 0.4327245056629181, 0.36218196153640747, 0.32239702343940735, 0.08805117011070251, -0.20167401432991028, 0.008248008787631989, 0.2521626949310303, -0.059668391942977905, -0.33182820677757263, -0.622084379196167, 0.27003082633018494, 0.6458863019943237, 0.005220448132604361, -0.189474955201...
to work if you are passing an integer when you should be passing a float. Furthermore, I assert your Mac code either is silently using an overloaded version of that function (e.g. you are on that platform compiling with C++) or you believe it works when in fact it is working by chance or is not actually working. Adde...
[ 0.4678254723548889, 0.17675238847732544, 0.015862034633755684, -0.05421457067131996, 0.21016910672187805, -0.18527793884277344, 0.6761679649353027, -0.07811456173658371, -0.044232603162527084, -0.35683614015579224, -0.19003905355930328, 0.6267036199569702, -0.3313489556312561, -0.460947245...
I use wxWidgets to create test tools at work. I have always created the GUI by creating the widgets in code. I haven't tried any of the tools available that help to do this. How do other users of wxWidgets typically create their interface? If you use a tool, which tool do you use? If you use a tool, what advantages and...
[ 0.7673266530036926, 0.25612905621528625, -0.03981481119990349, -0.037813153117895126, -0.33674606680870056, -0.10750263184309006, 0.11174469441175461, -0.007958770729601383, 0.22536300122737885, -0.7983630299568176, 0.43263041973114014, 0.5777885317802429, -0.21433521807193756, 0.095946736...
time futzing about with building the GUI. I think it works quite well, and being familiar with similar GUI building tools (Borland C++ Builder, Jigloo for Java, Delphi) I found it easy to use. If you stick with the paradigm of using wxFormBuilder to generate base classes, and then you make a class that inherits to la...
[ 0.4159361720085144, -0.0055681257508695126, 0.308525025844574, 0.055102646350860596, -0.23918910324573517, -0.2632419168949127, 0.15117895603179932, -0.15062202513217926, -0.08162509649991989, -0.8282250761985779, 0.05844620615243912, 1.0824743509292603, -0.07045911252498627, -0.0815104097...
to constantly look up the documentation. * Don't have to do as many code/compile/run cycles just to make sure your GUI is looking like what you expected. * The base class/derived class paradigm can make a reasonably clean separation of your GUI and business logic code. *Potential Disadvantages* * *Disclaimer:* I've o...
[ 0.3414560556411743, 0.004672285635024309, 0.18502630293369293, -0.005679946392774582, -0.2324393093585968, -0.19070124626159668, 0.382618248462677, -0.052276190370321274, -0.16561859846115112, -0.7201186418533325, 0.048755839467048645, 0.9954872727394104, 0.054501764476299286, -0.201634228...
had a situation where I needed a menu item when compiled for one operating system, but not when compiled for another. There is no logic in wxFormBuilder to support this. I ended up taking the short-cut of always creating the menu item and then having my derived class make it invisible if it was the wrong OS (not ideal....
[ 0.08007816225290298, -0.03997548297047615, 0.019460419192910194, -0.060773298144340515, -0.016753535717725754, -0.15315204858779907, 0.4267178177833557, 0.4416918158531189, -0.16212932765483856, -0.5073246359825134, 0.15002772212028503, 0.449867844581604, -0.3104844391345978, 0.07054296135...
I have a class "Class" which has a member std::list, I want to search that list/tree for an item, specifically an item with a specific name. A basic representation of my class is as follows: ``` #include <list> #include <string> class Class { std::string _name; std::list<Class*> _members; public: Class(con...
[ -0.15125733613967896, 0.06272503733634949, 0.25260400772094727, -0.2698381841182709, 0.11918662488460541, 0.013919939287006855, 0.21073521673679352, -0.2945968210697174, 0.013999477960169315, -0.7117325067520142, -0.16708137094974518, 0.3637045919895172, -0.33396854996681213, 0.33972960710...
just do something like this in Class::findItem: ``` Class* Class::findItem(const std::string& n) const { std::list<Class>::const_iteratior i; for(i=_members.begin(); i!=_members.end(); ++i) if((*i)->name() == n) return *i; for(i=_members.begin(); i!=_members.end(); ++i) { Class* cls = (*i)->f...
[ 0.0728912428021431, -0.26045480370521545, 0.2919895052909851, -0.19848497211933136, 0.4506002366542816, -0.2336028516292572, 0.2979876697063446, -0.27326276898384094, -0.21094031631946564, -0.6332338452339172, -0.361243337392807, 0.5332279801368713, -0.33164891600608826, 0.0307521168142557...
list hierarchy, and each number representing the items "value". I want findItem(3) to return B(3), rather than C(3). ``` A(1) | ---------------------------------- B(2)
[ -0.2665056884288788, -0.11617104709148407, 0.3422499895095825, -0.19823603332042694, -0.1566549837589264, 0.10246796160936356, 0.09208599478006363, -0.40099194645881653, -0.27677983045578003, -0.5317617058753967, -0.12890276312828064, 0.38782504200935364, -0.6720150709152222, 0.30970752239...
B(3) | | --------------------- ----- C(3) C(4)
[ -0.30042633414268494, 0.2841184139251709, 0.1548827737569809, -0.3977556824684143, -0.3038540780544281, 0.04005724564194679, 0.518663763999939, -0.5533172488212585, 0.00868692621588707, 0.1012001633644104, -0.46943894028663635, 0.19559815526008606, -0.5812636017799377, -0.1318434327840805,...
C(4) | | ---------------- ---------- D(5) D(6) D(7) D(5) D(6) ``` Use a [breadth-first search](http://en.wikipedia.org/wiki/Breadth-first_search). As
[ -0.07193747907876968, 0.09837453067302704, 0.4183138906955719, -0.27835512161254883, 0.1272612065076828, -0.1714177429676056, -0.10458837449550629, -0.32483935356140137, -0.2809518575668335, -0.2167406678199768, -0.4814055263996124, 0.4221651554107666, -0.13442686200141907, 0.4064328074455...
you access a node that isn't equal to the query value, you push that node onto the back of the queue. Process nodes from the front of the queue first. The first match you find will be the one closest to the root. ``` Class* Class::findItem(const std::string& n) const { std::list<Class>::const_iteratior i; std:...
[ -0.2554987967014313, -0.18336284160614014, 0.7031753063201904, -0.14781422913074493, 0.3207346498966217, 0.20145848393440247, -0.13561996817588806, -0.35741469264030457, -0.026757167652249336, -0.6012210845947266, -0.32505279779434204, 0.4541037082672119, -0.3073180317878723, 0.30929118394...
for(i=c->_members.begin(); i!=c->_members.end(); ++i) q.push(i); } return NULL; } ```
[ 0.026365675032138824, -0.025241736322641373, 0.29689091444015503, -0.4963824450969696, 0.2721419632434845, -0.0032749988604336977, 0.3927587568759918, -0.6318684816360474, -0.04828835278749466, -0.2823050022125244, -0.4536071717739105, 0.45115187764167786, -0.36629560589790344, 0.462004959...
I'm interested to know if it is possible to have some comments in a function (c, c++, java) in a way that doxygen could put them in the generated html file. for example: ``` function(...) { do_1(); /** * Call do_2 function for doing specific stuff. */ do_2(); } ``` No, doxygen does not support comments blocks ins...
[ 0.6124770045280457, 0.06623230874538422, 0.04240027070045471, -0.031057173386216164, -0.03024771437048912, -0.25237661600112915, -0.13009494543075562, -0.012157206423580647, -0.006194275803864002, -0.6849996447563171, -0.10221938788890839, 0.5237889289855957, -0.38135653734207153, -0.11890...
I have a flash file that contains actionscript3 in it. I am trying to export my file as a .mov to play in quicktime. Sometimes it will work, then if I make a change to my file (moving a few frames around, but not changing the script at all), it will then export an empty file. Does any one have any tips on what I can d...
[ 0.4745112359523773, 0.0569242462515831, 0.16575661301612854, 0.008006866089999676, -0.19590093195438385, 0.034923527389764786, 0.22946035861968994, 0.05624106898903847, -0.3757712244987488, -0.5883415341377258, 0.24030518531799316, 0.5986018180847168, -0.13684402406215668, -0.1105495318770...
a clean conversion for you. The one I used most is [Sothink's Swf to Video Converter](http://www.sothink.com/product/swftovideoconverter/index.htm). After a couple tests, I was surprised that it handled even actionscripted events seamlessly.
[ 0.32602739334106445, -0.4455017149448395, 0.506655216217041, 0.31442615389823914, -0.0356542244553566, -0.43237239122390747, -0.16891181468963623, 0.060332588851451874, -0.09607483446598053, -0.7336038947105408, 0.17212824523448944, 0.6853716373443604, -0.02984083816409111, -0.004041383042...
How far does the spring framework go with transaction handling? My reading of the book "Spring In Action" suggestions with its examples that you create DAO methods that don't worry about Session and Transaction management fairly simply by setting up a session factory and transaction template in XML and then wiring them...
[ -0.005778025835752487, -0.02870599925518036, -0.07029924541711807, 0.18133050203323364, -0.2069920003414154, -0.09538518637418747, 0.05064893513917923, -0.383309543132782, -0.3660315275192261, -0.25269612669944763, -0.1010170578956604, 0.4600525200366974, -0.054442111402750015, -0.34443801...
make it just ``` preform database actions ``` reducing the amount of boiler plate transactional code that I have across my methods to a minimum? Spring provides at least 3 ways of transaction demarcation: 1) Programmatic handling, via TransactionTemplate or PlatformTransactionManager - light on config, but invasive...
[ 0.11178608238697052, -0.1779460906982422, 0.3421252965927124, 0.1941414773464203, -0.1256604641675949, 0.08177792280912399, -0.13985353708267212, -0.33341678977012634, -0.2895113527774811, -0.1414903849363327, 0.008022470399737358, 0.5621638298034668, -0.19556958973407745, -0.2587811052799...
transaction handling. It's clear and concise. I always consult the ref docs first, and only consult a book if it's not in the docs.
[ 0.07164659351110458, 0.12416946142911911, 0.2707087993621826, -0.030077770352363586, 0.04029199108481407, -0.2856093645095825, -0.5100311636924744, -0.0430004745721817, -0.14797034859657288, -0.4923866093158722, 0.09091399610042572, 0.9303334951400757, 0.059052225202322006, -0.161069825291...
I have a list of keywords that I need to search against, using ThinkingSphinx Some of them being more important than others, i need to find a way to weight those words. So far, the only solution i came up with is to repeat x number of times the same word in my query to increase its relevance. Eg: 3 keywords, each o...
[ 0.042305994778871536, -0.0037139146588742733, 0.5835863351821899, 0.32634198665618896, 0.009759586304426193, 0.10370642691850662, -0.11060313135385513, 0.001080562244169414, -0.49328628182411194, -0.2527821660041809, -0.035679709166288376, 0.39328891038894653, -0.1923595666885376, 0.242752...
demarcation: 1) Programmatic handling, via TransactionTemplate or PlatformTransactionManager - light on config, but invasive 2) Declarative via XML - verbose XML, but non-invasive 3) Declarative via annotations - light on XML, not invasive Which one you pick depends on which one best suits your needs, Spring doesn...
[ -0.16361533105373383, 0.045044202357530594, 0.4637411832809448, 0.29094475507736206, -0.21788173913955688, -0.16720953583717346, -0.3582460582256317, -0.2855741083621979, -0.13887441158294678, -0.40789008140563965, -0.21058611571788788, 0.6149433255195618, -0.2574169933795929, -0.234700009...
I have a couple of ActionMethods that queries the Controller.User for its role like this ``` bool isAdmin = User.IsInRole("admin"); ``` acting conveniently on that condition. I'm starting to make tests for these methods with code like this ``` [TestMethod] public void HomeController_Index_Should_Return_Non_Null_Vi...
[ 0.14687055349349976, -0.12942452728748322, 0.6679016351699829, 0.02603120729327202, -0.0032705224584788084, -0.02768530510365963, 0.16546811163425446, -0.5682792067527771, -0.26646938920021057, -0.842210054397583, 0.0347292460501194, 0.509611189365387, -0.24591520428657532, 0.3939995467662...
{ var homeController = new HomeController(); var userMock = new Mock<IPrincipal>(); userMock.Expect(p => p.IsInRole("admin")).Returns(true); var contextMock = new Mock<HttpContextBase>(); contextMock.ExpectGet(ctx => ctx.User) .Returns(userMock.Object); ...
[ -0.2682972848415375, -0.24943022429943085, 0.9212124943733215, -0.09437473863363266, 0.23250553011894226, 0.4267430305480957, 0.3856666088104248, -0.44007399678230286, -0.1962941735982895, -0.8029947876930237, -0.41823408007621765, 0.9482997059822083, -0.33215847611427307, -0.0408026762306...
.Returns(contextMock.Object); homeController.ControllerContext = controllerContextMock.Object; var result = homeController.Index(); userMock.Verify(p => p.IsInRole("admin")); Assert.AreEqual(((ViewResult)result).ViewName, "Index"); } ``` Testing the behaviour when the user isn't a...
[ -0.06883292645215988, -0.14909346401691437, 0.537929356098175, 0.016669096425175667, 0.08206931501626968, -0.0634559765458107, 0.6760199666023254, -0.5057164430618286, 0.07596457004547119, -0.4982505440711975, -0.1789330095052719, 0.7446864247322083, -0.15160901844501495, 0.174852028489112...
I was playing with recursive lambdas in C# and have found two approaches to do this on the web. One approach uses [fixed point combinator](http://en.wikipedia.org/wiki/Y_combinator) and the other does not. In the code below f1 is built using combinator, and f2 is defined directly. My question is, do we need fixed point...
[ 0.015923449769616127, -0.15124818682670593, -0.11879823356866837, 0.013116882182657719, -0.1996929794549942, -0.096614308655262, -0.18193405866622925, -0.18671435117721558, -0.09624927490949631, -0.36250895261764526, -0.2459995597600937, 0.7547354698181152, -0.4112622141838074, -0.11337801...
static void Main(string[] args) { Func<Func<int,int>,Func<int,int>> f = fac => x => x == 0 ? 1 : x * fac(x - 1); var f1 = F(f); Console.WriteLine(f1(5)); Func<int, int> f2 = null; f2 = x => x == 0 ? 1 : x * f2(x - 1); Console.WriteLine(f2(5)); } } ``` As we ca...
[ -0.1935877650976181, -0.31328123807907104, 0.5371860861778259, -0.39960646629333496, 0.16410619020462036, 0.19971048831939697, 0.2834658920764923, 0.007560717407613993, -0.09644266963005066, -0.10452878475189209, -0.46845394372940063, 0.5375971794128418, -0.6125947833061218, 0.143375217914...
give a name to a method, that means that the language already has the necessary support for recursion built into it. Note that the second method given in your question involves changing the value of a variable after it has been introduced, making it not "pure" functional programming. Y-combinator is only necessary if ...
[ 0.23817934095859528, -0.05555446818470955, -0.21612931787967682, 0.09576492756605148, -0.24104046821594238, -0.3726397752761841, 0.2821195423603058, -0.16116155683994293, 0.14511801302433014, 0.02869400940835476, -0.3065744638442993, 0.5628607869148254, -0.4707763195037842, -0.039888918399...
named method (by far the preferred technique).
[ 0.23843735456466675, 0.12140227109193802, 0.25169873237609863, 0.026597267016768456, 0.06706666946411133, -0.19672657549381256, 0.17876483500003815, -0.30795779824256897, -0.20255672931671143, -0.2624322175979614, -0.3491666615009308, 0.2911348342895508, 0.3191160261631012, 0.1200932040810...
I'm testing ELMAH and have deliberately turned off the database connection for the ELMAH log in my application to see what will happen in production if the DB isn't available. It seems that ELMAH can't trap its own errors- the AXD file isn't available when the SQL databse log fails. What is the intended behavior of E...
[ 0.6420022249221802, 0.5053980350494385, -0.17602801322937012, -0.021376105025410652, -0.13296984136104584, -0.08420741558074951, 0.41817066073417664, -0.19091157615184784, -0.03987019881606102, -0.3681662082672119, 0.2631296217441559, 0.5545670390129089, -0.24820050597190857, 0.36851099133...
will just not log the errors to database. As suggested above you can/should use alternative sinks - email or flat file.
[ 0.4508666694164276, 0.16215160489082336, -0.17021264135837555, 0.7585962414741516, 0.2078758031129837, -0.2095581591129303, 0.1668863743543625, 0.19532465934753418, 0.027945956215262413, -0.6915239095687866, 0.31087055802345276, 0.7139622569084167, -0.09011489152908325, -0.0649360045790672...
see also "[Any tools to check for duplicate VB.NET code?"](https://stackoverflow.com/questions/2266978/any-tools-to-check-for-duplicate-vb-net-code) A friend of mine only has access to the Express editions of Visual Studio and I am trying to help him refactor to remove a lot of duplication. You could take a look at [S...
[ 0.299805223941803, 0.06765925139188766, -0.302505761384964, -0.014575288631021976, -0.3695363402366638, -0.23242807388305664, 0.3836615979671478, -0.03356976434588432, -0.38643938302993774, -0.597197949886322, 0.08821310102939606, 0.45087650418281555, -0.49870407581329346, 0.02352423034608...
Does anyone have any good c# code (and regular expressions) that will parse a string and "linkify" any urls that may be in the string? It's a pretty simple task you can acheive it with [Regex](http://msdn.microsoft.com/en-us/library/system.text.regularexpressions.regex.replace.aspx) and a ready-to-go regular expression...
[ -0.0062204510904848576, 0.0842454731464386, 0.602786660194397, 0.13560335338115692, 0.1825830042362213, -0.14688904583454132, 0.2444617599248886, 0.09062419086694717, -0.24784553050994873, -0.5508837699890137, -0.29653745889663696, 0.5900526642799377, -0.21929366886615753, -0.3833776414394...
"<a href=\"$1\">$1</a>"); ``` You may also be interested not only in creating links but in shortening URLs. Here is a good article on this subject: * [Resolve and shorten URLs in C#](http://madskristensen.net/post/resolve-and-shorten-urls-in-csharp) **See also**: * [Regular Expression Workbench](http://code.msdn.m...
[ -0.20304247736930847, -0.014310591854155064, 0.04697674512863159, 0.3759443461894989, 0.021297965198755264, -0.10041840374469757, 0.059606198221445084, -0.022736692801117897, -0.5293189287185669, -0.1761588752269745, -0.4263506829738617, 0.471587210893631, -0.5474281311035156, -0.117699801...
[Format URLs in string to HTML Links in C#](http://snipplr.com/view/13286/format-urls-in-string-to-html-links-in-c/) * [Automatically hyperlink URL and Email in ASP.NET Pages with C#](http://www.codeproject.com/KB/aspnet/Autohyperlink.aspx)
[ 0.2505764067173004, 0.025959331542253494, 0.2612491548061371, 0.05306055024266243, 0.09513823688030243, 0.05717954412102699, 0.32155120372772217, -0.07978389412164688, -0.5699732899665833, -0.4652155637741089, -0.6649858951568604, 0.676831841468811, -0.3953581154346466, -0.2708934843540191...
I am working on a project to retrieve emails from a POP3 mailbox and save those to a database. I would like to find a way I can link original messages to replies so I can relationally show them as a chain. I was going to use subject lines those aren't going to be very reliable as they have the ability to change. Is the...
[ 0.6993168592453003, -0.018814124166965485, 0.2762467563152313, 0.23610343039035797, -0.08758794516324997, -0.13564442098140717, 0.6388528943061829, 0.39871546626091003, -0.34742069244384766, -0.5369253754615784, 0.34812629222869873, 0.38017043471336365, -0.20210275053977966, 0.242486864328...
and it can be fooled into threading unrelated items if the subjects are the same. I think email sent from Exchange has some sort of ID for a thread, but that only works inside an organisation running exchange, and I suspect it is not reliable if mails come from outside the organisation. You could try and thread using...
[ 0.5167118310928345, 0.04172738268971443, -0.00430217944085598, 0.294403612613678, -0.13089236617088318, -0.3357323110103607, 0.3028649687767029, 0.05065295472741127, -0.3672700822353363, -0.2755693197250366, 0.27647778391838074, 0.17392203211784363, -0.24670270085334778, 0.0399144291877746...
There is a simple way to get top N rows from any table: ``` SELECT TOP 10 * FROM MyTable ORDER BY MyColumn ``` Is there any efficient way to query M rows starting from row N For example, ``` Id Value 1 a 2 b 3 c 4 d 5 e 6 f ``` And query like this ``` SELECT [3,2] * FROM MyTable ORDER BY MyCol...
[ -0.22551193833351135, 0.39507269859313965, 0.44499266147613525, 0.14271244406700134, -0.15962520241737366, 0.23927751183509827, -0.002950165420770645, -0.28674134612083435, -0.22769024968147278, -0.6525263786315918, -0.016050830483436584, 0.4776284396648407, -0.08901914209127426, 0.1326022...
this really easy. See [Implement paging (skip / take) functionality with this query](https://stackoverflow.com/questions/13220743/implement-paging-skip-take-functionality-with-this-query) I guess the most elegant is to use the ROW\_NUMBER function (available from MS SQL Server 2005): ``` WITH NumberedMyTable AS ( ...
[ -0.3023652732372284, -0.1331033706665039, 0.24952827394008636, -0.1276407688856125, -0.24025820195674896, -0.04216129705309868, -0.22069601714611053, -0.1403571218252182, -0.3362504243850708, -0.21840287744998932, 0.3187698423862457, 0.3361569941043854, -0.28486111760139465, -0.34719631075...
I have child classes, each carries a different type of value along with other members. There may be a LongObject, IntObject, StringObject, etc. I will be given a value, which can be a long, int, string, etc., and I have to create a LongObject, IntObject, StringObject, etc., respectively. Would it be faster to overlo...
[ 0.0020206423941999674, -0.14075443148612976, 0.0055293855257332325, 0.12665389478206635, 0.03498508408665657, 0.35448935627937317, 0.0866604745388031, -0.20637232065200806, 0.21819838881492615, -0.5821020603179932, 0.18204449117183685, 0.37822985649108887, -0.030155304819345474, 0.33286631...
you saying to just test it. Sure, I ought to. I would also like to know how this type of overloading is handled under the hood, if anyone knows. Please let me know what you think. Thanks, jbu a) ``` BaseObject getObject(long l) { return new LongObject(l); } BaseObject getObject(int i) { return new IntObj...
[ 0.36694076657295227, -0.3842639923095703, 0.10385406017303467, -0.19537144899368286, 0.1585375815629959, -0.23123031854629517, 0.33384373784065247, -0.14163950085639954, -0.01314610242843628, -0.30376487970352173, -0.15314048528671265, 0.6933606266975403, -0.5012219548225403, 0.05397876352...
IntObject((Int)x); else if(value is a String) return new StringObject((String)x); ... } ``` edit: I guess I didn't completely add all the details, some of you caught it. For both choices, I still have to get an object/value and from the value determine what type it is. Therefore, I still have to do a...
[ 0.2815686762332916, -0.1127292662858963, 0.049365267157554626, -0.21427029371261597, -0.05433686822652817, -0.15629363059997559, 0.4346362352371216, -0.09736383706331253, 0.17657159268856049, -0.3533107042312622, 0.005796085111796856, 0.4127647280693054, -0.36106404662132263, 0.04108018428...
compile-time, I strongly suggest you use that information. If you don't, then the overloading option isn't really feasible anyway. EDIT: The comment suggests I elaborate a bit about overloads being chosen at compile-time. The compiler picks which method signature is called based on *compile-time* information about t...
[ 0.398456335067749, 0.07910536229610443, -0.07505518943071365, -0.030132366344332695, -0.19222362339496613, -0.15395644307136536, 0.3062584102153778, -0.1865566372871399, -0.060260578989982605, -0.4233490228652954, -0.040160782635211945, 0.35611051321029663, -0.5137731432914734, 0.326278537...
foo(x); } public static void foo(String x) { System.out.println("foo(String)"); } public static void foo(Object x) { System.out.println("foo(Object)"); } } ``` This prints `foo(Object)` because the compile-time type of `x` is `Object`, not `String`. The fact that the exec...
[ -0.06440524756908417, 0.41842585802078247, 0.2876695692539215, -0.41195419430732727, -0.0903165191411972, 0.026724733412265778, 0.08226104080677032, 0.1349102407693863, -0.28022879362106323, -0.13656163215637207, -0.4818017780780792, 0.6270313262939453, -0.7371144890785217, 0.2549226284027...
I have a table with timestamps. What is the proper query to get the records counts for each minute for the last hour. I.e. if now is 2:25, I want to know how many record were between 1:25 and 1:26, 1:26 and 1:27, and so on, so I have 60 results. This will return a count of results for each minute (where you have recor...
[ 0.4219089448451996, 0.21090319752693176, 0.6003064513206482, -0.04134955257177353, 0.26955127716064453, 0.23471534252166748, -0.05826777219772339, -0.5311809182167053, -0.4655819535255432, -0.5833155512809753, 0.13219086825847626, 0.19109944999217987, -0.06811479479074478, 0.34550294280052...
60 results, the query is slightly different. This uses a Common Table Expression to generate a list of 60 numbers and a correlated sub-query to get the results for each minute: ``` WITH numbers ( num ) AS ( SELECT 1 UNION ALL SELECT 1 + num FROM numbers WHERE num < 60 ) SELECT num AS minute, (SELECT COUNT(...
[ 0.3007385730743408, -0.31682825088500977, 0.21229742467403412, -0.06205145642161369, 0.1636148989200592, 0.4047146141529083, -0.24388699233531952, -0.5470942258834839, -0.11313366889953613, -0.5833216309547424, -0.20374691486358643, -0.12101683765649796, -0.06539084017276764, 0.50291448831...
-15, GETDATE()) and you'll get the results for the last 15 minutes and 0 for other minutes.
[ 0.5947163701057434, -0.36046460270881653, 0.9753125309944153, 0.32538408041000366, 0.22082284092903137, 0.001038449234329164, 0.2631163001060486, -0.23030883073806763, -0.25603124499320984, -0.47306108474731445, -0.06742358952760696, 0.2576972246170044, 0.19447438418865204, 0.0360643640160...
Here's my old code from WinForms: ``` private void ValueChanged(double inValue1, double inValue2) { //only manual mode for this driver, so that's easy. if (ValueLabel.InvokeRequired) { ValueLabel.Invoke(new MethodInvoker(delegate { ValueLabel.Text = (inValue1* inValue2/ ...
[ -0.0005446996656246483, -0.06664717197418213, 0.30020231008529663, -0.13867194950580597, 0.2914368510246277, 0.16270940005779266, 0.452231764793396, -0.2930324077606201, 0.0777290016412735, -0.5675901174545288, 0.03884834051132202, 1.1404011249542236, -0.17100957036018372, 0.00612508272752...
)); } else { ValueLabel.Text = (inValue1* inValue2/ 1000).ToString("f1"); } } ``` Is there an easy way to convert this to be WPF friendly? So far, I have: ``` private void KVPValueChanged(double inValue1, double inValue2) { if (ValueLabel.Dispatcher.Thread == Thread...
[ 0.024255994707345963, -0.1693696230649948, 0.926189661026001, -0.1629938930273056, 0.12460107356309891, 0.07138567417860031, 0.40051692724227905, -0.1127416267991066, 0.011538819409906864, -0.44868412613868713, -0.1749175786972046, 0.9641866683959961, -0.31449249386787415, 0.35073414444923...
} else { ValueLabel.Dispatcher.BeginInvoke(delegate { ValueLabel.Content = (inValue1* inValue2/ 1000).ToString("f1"); }); } } ``` But that second 'delegate' call fails. How can I invoke this delegate? I suppose I can go through the whole making a delegate method, ma...
[ 0.15208247303962708, 0.02183358557522297, 0.06001231446862221, 0.016970688477158546, 0.2351011335849762, -0.16422238945960999, 0.5516031980514526, -0.4873313903808594, 0.04042503982782364, -0.40149983763694763, -0.08357007056474686, 0.6973912715911865, -0.25899261236190796, 0.1151100546121...
instance, etc, but I thought the whole point of these anonymous delegates was to avoid that hassle. Plus, my old winforms code has that first implementation all over the place, so I'd really like to avoid having to de-anonymize all my delegates. **Edit:** I can try to use the MethodInvoker like I was before, but then ...
[ 0.04752300679683685, -0.037781015038490295, 0.1765783280134201, 0.11687560379505157, -0.004635968711227179, -0.2825019359588623, 0.29208827018737793, -0.0695982277393341, -0.26692134141921997, -0.4715472459793091, 0.3458927869796753, 0.5483776330947876, -0.41990384459495544, 0.440748661756...
ValueLabel.Content = (inValue1* inValue2/ 1000).ToString("f1"); } else { ValueLabel.Dispatcher.BeginInvoke(new System.Windows.Forms.MethodInvoker(delegate { ValueLabel.Content = (inValue1* inValue2/ 1000).ToString("f1"); })); } } ``` That use of Meth...
[ 0.34886568784713745, 0.23854517936706543, -0.002868508454412222, -0.20428775250911713, 0.1712726205587387, 0.03346019238233566, 0.3895826041698456, -0.2872178256511688, -0.03360060602426529, -0.5289323329925537, -0.08554162085056305, 0.5016180872917175, -0.41501763463020325, 0.123769082129...
other way to use the same behavior? I think you need to change the signature of the delegate: ``` ValueLabel.Dispatcher.BeginInvoke(DispatcherPriority.Normal, (ThreadStart)delegate(invalue1, invalue2){ ValueLabel.Content = ... ``` Also, look up using the BackgroundWorker component. Not just for wpf but also for...
[ 0.15987621247768402, -0.46843087673187256, 0.052911657840013504, 0.0760994553565979, 0.34452950954437256, -0.18301747739315033, 0.25332409143447876, -0.11138918250799179, -0.29996126890182495, -0.6394343972206116, 0.021997008472681046, 0.6449131369590759, -0.36122265458106995, 0.1163519546...
I know there have been a ton of questions about how to implement automatic updates in a .NET application, and I've probably read most of them. Unfortunately, none I have seen quite fit my situation as far as I can tell. I am trying to build a self-updating .NET application that will run in an environment with limited...
[ 0.4225986897945404, 0.1524505913257599, 0.5374115109443665, 0.001422487199306488, 0.09233244508504868, -0.14497950673103333, 0.380584716796875, 0.14434528350830078, -0.19878631830215454, -0.6035184264183044, -0.1253332793712616, 0.9592453241348267, -0.16371169686317444, -0.0278573334217071...