text
stringlengths
0
30.5k
title
stringclasses
1 value
embeddings
listlengths
768
768
App_Web_kh7-x3ka"`. Delete the "`App_Web_XXXX`" part and add the CodeFile attribute pointing to your code behind file: `CodeFile="yourPageFile.aspx.cs"` The `<%@Page />` tag should now look similar to when you create a new page from scratch. When your Asp.Net pages are precompiled for release to the production ser...
[ 0.12321371585130692, 0.22844062745571136, 0.4964054226875305, -0.25893059372901917, -0.21895155310630798, 0.2097352147102356, 0.3296281397342682, -0.007823041640222073, -0.3165609836578369, -0.8306353688240051, -0.5018621683120728, 0.32224658131599426, -0.5317809581756592, 0.04661732539534...
How could I setup a nice indice on `cap:deploy`? I want the remote server to nice the `cp` commands like so: ``` nice -n 19 cp ... ``` This seems to be doing exactly what you want. It's just your code with some typos fixed. ``` var reportXML:XML = <Report> <prop1>4</prop1> ...
[ 0.3076701760292053, -0.1272195279598236, 0.6567445397377014, 0.1447489857673645, 0.010041892528533936, -0.1610366404056549, 0.08177074790000916, -0.04009053856134415, -0.3721204400062561, -0.4119371771812439, -0.07617384940385818, 0.6737093925476074, -0.22803466022014618, 0.009077137336134...
<prop3>true</prop3> <prop4>false</prop4> <prop5>true</prop5> </Report>; var myArray:Array = [{xmlNodeName: "prop5", value: false}]; for each (var item:Object in myArray) {
[ 0.05933369696140289, -0.6848344802856445, 0.6031417846679688, 0.1509397029876709, -0.13119423389434814, 0.40672174096107483, 0.4762752056121826, -0.4921624958515167, -0.19217444956302643, -0.28963255882263184, -0.37402862310409546, 0.5232443809509277, -0.3523707687854767, -0.06652840971946...
reportXML[item.xmlNodeName] = item.value.toString(); } trace(reportXML); ```
[ 0.16748133301734924, -0.21855004131793976, 0.264270156621933, -0.1817512959241867, 0.03539426252245903, -0.07955943793058395, 0.17061834037303925, -0.3413345515727997, -0.20209896564483643, -0.39147356152534485, -0.2720353901386261, 0.4223339557647705, -0.4411010444164276, 0.32524013519287...
From a couple of preliminary tests it seems that [`EnumWindows`](http://msdn.microsoft.com/en-us/library/ms633497.aspx) always returns windows in reverse instantiation order, i.e. most recently instantiated window first. Is that a valid observation? If so, is it true across all versions of Windows? And is this a reliab...
[ 0.02666330523788929, 0.023554863408207893, 0.19676867127418518, -0.11492814123630524, -0.14098547399044037, 0.026638658717274666, 0.6810488104820251, 0.024218451231718063, -0.36698436737060547, -0.34684908390045166, -0.48973456025123596, 0.2468775510787964, -0.06019896641373634, 0.20186209...
and I also do not know their expected coordinates. However, if I could rely on the above behaviour of `EnumWindows` I could simply use the first handle returned by `EnumWindows` whose class and caption match my expectation. That still leaves some hypothetical loop holes but I think it will be good enough. Alternative s...
[ 0.021869061514735222, 0.028931057080626488, 0.6815580725669861, 0.10137307643890381, 0.01689014956355095, 0.1908571869134903, 0.41036444902420044, 0.09670096635818481, -0.08025550842285156, -0.722028374671936, -0.6011276245117188, 0.45917993783950806, 0.08831146359443665, 0.200256094336509...
that's higher in the Z-order than a visible window will still appear before it. **EDIT**: It's highly unlikely that you could use this as you want, just taking the first return from `EnumWindows`. Not only is your new window unlikely to be the first return, but you'd have a race condition where other windows could be...
[ 0.34011033177375793, 0.025625240057706833, 0.285380482673645, 0.13231568038463593, 0.003951765596866608, -0.1266729235649109, 0.28914546966552734, 0.04317251965403557, -0.31141766905784607, -0.9057026505470276, -0.202396959066391, 0.5001372694969177, 0.08399704098701477, 0.2905024588108063...
correct class and caption (you might even check that it belongs to the right process with `GetWindowThreadProcessID`) that is *not* in your list, then you've found the new window. For your purposes, though, you may be even better served by installing a CBT hook and watching for the HCBT\_CREATEWND notification. See MS...
[ 0.13518156111240387, 0.1956011801958084, 0.2725737690925598, 0.11885850876569748, 0.1026177629828453, -0.24727870523929596, 0.0954739972949028, -0.022473350167274475, -0.44852566719055176, -0.7242571115493774, -0.45797690749168396, 0.38851216435432434, -0.12839378416538239, 0.1881703585386...
[the `EnumWindowsProc` callback](http://msdn.microsoft.com/en-us/library/ms633498(VS.85).aspx) are both quite silent on the issue. I offer as evidence the following: 1. A [C++ Q&A article in MSDN magazine](http://msdn.microsoft.com/en-us/magazine/cc164067.aspx) does state specifically: > EnumWindows enumerates the wi...
[ -0.040245503187179565, 0.2052999585866928, 0.07472801208496094, -0.14969466626644135, 0.06843829154968262, 0.16102565824985504, 0.08107065409421921, -0.0951276421546936, -0.2587025761604309, -0.6721879243850708, -0.5545311570167542, 0.3365752696990967, -0.14892230927944183, 0.4630078971385...
logic and ordering applies to `EnumWindows`. 3. This is the observable behavior of this function, which makes it a breaking change to alter it. In general, Microsoft has been very good about not making breaking changes to observable behavior. That's not a guarantee, but it's a pretty safe bet. You're more likely to fin...
[ 0.04866737499833107, 0.4378111958503723, 0.3618893623352051, -0.09633995592594147, 0.12914282083511353, -0.19165629148483276, 0.25252237915992737, -0.1877765655517578, -0.23559701442718506, -0.3230498135089874, -0.10773830860853195, 0.7629703879356384, -0.4916234612464905, 0.18612033128738...
the very least `EnumThreadWindows` would probably be a better fit—but I thought it was worth mentioning for other people who might come across this post.
[ 0.44698458909988403, 0.14488913118839264, -0.004452412016689777, 0.17224858701229095, -0.5193581581115723, -0.13864438235759735, 0.293545663356781, 0.44176429510116577, -0.12403269112110138, -0.14915378391742706, 0.17527341842651367, -0.07969999313354492, 0.14647367596626282, 0.20151464641...
Since I'm sure many people have different standard, I've made this post a community wiki. My question is, what's a good naming scheme for table aliases? I've been using the first letter of every word from the table name, but it's been getting quite unreadable. Here's a quick example. ``` FROM incidents i FROM cause_a...
[ 0.29792511463165283, 0.18663233518600464, 0.10333748906850815, 0.02809848077595234, -0.06441572308540344, -0.12477795034646988, 0.26883742213249207, 0.2530062198638916, -0.3262590765953064, -0.6301384568214417, 0.14023590087890625, 0.34691911935806274, -0.01989298313856125, 0.1241968944668...
naming scheme. If all your tables have a 5-part name where the first 4 are common across a query, it's silly to keep those parts in the aliases.
[ 0.4061097800731659, 0.04108911752700806, 0.27956879138946533, 0.23921486735343933, 0.009229438379406929, -0.07233918458223343, 0.22728915512561798, 0.1267322301864624, -0.302961140871048, -0.31047484278678894, 0.034980207681655884, 0.007284288760274649, -0.19749319553375244, 0.423715442419...
I am sure making a silly mistake but I can't figure what: In SQL Server 2005 I am trying select all customers except those who have made a reservation before 2 AM. When I run this query: ``` SELECT idCustomer FROM reservations WHERE idCustomer NOT IN (SELECT distinct idCustomer FROM reservations WHERE DATEPA...
[ -0.42747077345848083, 0.11875788122415543, 0.5638121962547302, -0.03570989519357681, -0.14473722875118256, 0.18838874995708466, 0.021290844306349754, -0.24579700827598572, -0.03410938009619713, -0.5752424001693726, 0.06403204053640366, 0.5279921889305115, -0.11578164249658585, 0.2506890892...
idCustomer is not null ``` Make sure your list parameter does not contain null values. Here's an explanation: ``` WHERE field1 NOT IN (1, 2, 3, null) ``` is the same as: ``` WHERE NOT (field1 = 1 OR field1 = 2 OR field1 = 3 OR field1 = null) ``` * That last comparision evaluates to null. * That null is OR'd wi...
[ -0.19040948152542114, -0.2120783030986786, 0.23259373009204865, -0.13721656799316406, -0.19768595695495605, -0.030723124742507935, 0.30817651748657227, -0.29276779294013977, 0.11735116690397263, -0.5003641843795776, -0.0361303873360157, 0.5771469473838806, -0.3381730318069458, -0.037628341...
nit-picking. (TRUE OR NULL) would evaluate to TRUE. This is relevant if field1 = 3, for example. That TRUE value would be negated to FALSE and the row would be filtered.
[ -0.1001954898238182, -0.411762535572052, -0.3033117353916168, -0.05285607650876045, -0.24151161313056946, 0.0777173787355423, -0.007665557321161032, -0.4344295561313629, -0.11385755985975266, -0.3962727189064026, 0.08797561377286911, 0.41444092988967896, -0.43282926082611084, 0.13403564691...
In the standard PrintDialog there are four values associated with a selected printer: Status, Type, Where, and Comment. If I know a printer's name, how can I get these values in C# 2.0? As [dowski suggested](https://stackoverflow.com/questions/296182/how-to-get-printer-info-in-cnet#296232), you could use WMI to get pr...
[ 0.2126670777797699, 0.002712465589866042, 0.8628250956535339, 0.09315546602010727, 0.3101043701171875, 0.1581289917230606, -0.2157192975282669, -0.15955638885498047, -0.2653525471687317, -0.7348677515983582, 0.16530273854732513, 0.43230363726615906, -0.3954257667064667, 0.04606141895055771...
foreach (ManagementObject printer in coll) { foreach (PropertyData property in printer.Properties) { Console.WriteLine(string.Format("{0}: {1}", property.Name, property.Value)); } } } catch (ManagementException ex) {
[ -0.3412913382053375, -0.08845853805541992, 0.7609801888465881, -0.26825305819511414, 0.2945629060268402, 0.035611558705568314, 0.016581382602453232, -0.39213281869888306, -0.06349895894527435, -0.44302311539649963, -0.40148594975471497, 0.6452045440673828, -0.08534251898527145, 0.197637557...
Console.WriteLine(ex.Message); } } ```
[ -0.23881933093070984, 0.13206924498081207, 0.33758965134620667, -0.1969892382621765, 0.37939953804016113, -0.19137047231197357, 0.2076430767774582, 0.17854419350624084, 0.3354804813861847, -0.7563674449920654, -0.1877189576625824, 0.700914740562439, -0.4508930444717407, 0.3025423586368561,...
I have a set of classes, each one is a different [strategy](http://en.wikipedia.org/wiki/Strategy_pattern) to do the same work. ``` namespace BigCorp.SuperApp { public class BaseClass { } public class ClassA : BaseClass { } public class ClassB : BaseClass { } } ``` The choice of which strategy to use is...
[ 0.3672601282596588, 0.1996537744998932, 0.34919995069503784, -0.1840730905532837, 0.17224319279193878, 0.33421438932418823, 0.19266846776008606, -0.26473188400268555, -0.3497394621372223, -0.8213074207305908, -0.23638400435447693, 0.6178067326545715, -0.5772625207901001, -0.039734408259391...
particularly ``` Type t = Type.GetType("ClassB"); // results in t == null BaseClass c = Activator.CreateInstance(t) as BaseClass; // fails ``` How can I get this to work while configuring only the class name? Concatenate the namespace to the class name for full type name? Is there another reflection call that works?...
[ 0.11507772654294968, -0.050151560455560684, 0.08798467367887497, -0.14780308306217194, -0.14217345416545868, -0.09458363801240921, 0.4867176115512848, -0.3286132514476776, -0.13887105882167816, -0.6815708875656128, -0.10647527128458023, 0.8930999040603638, -0.3745051920413971, 0.1034403070...
and use that: ``` <appConfig> <SuperAppConfig handlerNamespace="BigCorp.SuperApp"> <Handler class="ClassB" /> </SuperAppConfig> </appConfig> ``` **Edit:** I changed *name* to *class* to better denote the meaning of that attribute.
[ 0.2185428887605667, -0.029382945969700813, 0.23235902190208435, -0.006462843623012304, 0.3788661062717438, 0.07177241891622543, 0.09570977836847305, -0.1136888861656189, -0.3297700583934784, -0.5664499998092651, -0.2855435907840729, 0.5539411306381226, -0.433395653963089, -0.03122005611658...
I'm thinking about starting work on a fairly large scale .NET or ASP.NET project (I haven't decided yet, but it is likely that, eventually, it will be accessible from both a desktop application written in .NET as well as an ASP.NET web application). However, I'm not sure if there's a conventional way to structure the p...
[ 0.42993593215942383, 0.07931265980005264, 0.1789291799068451, 0.270673543214798, 0.16495998203754425, -0.3725855052471161, -0.22215710580348969, 0.14691181480884552, -0.217166006565094, -0.7068395018577576, -0.16555917263031006, 0.3385491371154785, 0.29892203211784363, 0.14425773918628693,...
large, I want to be able to implement and test one section at a time, but have them integrated into a single system. Once I have a section or two done and tested, I want to release this as an open-source tool. However, if others are going to be working on this, I want to present them with an easy to understand structu...
[ 0.5444886684417725, 0.0909564271569252, 0.11387379467487335, -0.025227544829249382, -0.08109071850776672, -0.38473013043403625, -0.032776106148958206, -0.04037966579198837, -0.47791942954063416, -0.7096131443977356, 0.08492108434438705, 0.2108038067817688, -0.26662477850914, -0.03624203801...
as to how such a large scale project can be structured to make design, development, testing, use, and maintenance as easy and painless as possible for anyone who uses or works on this project. **EDIT 1:** I'm not only looking for patterns (like what Toran Billups pointed out), but also directory structures, project st...
[ 0.777981698513031, -0.08258337527513504, -0.0029738242737948895, 0.04593672603368759, -0.1083071380853653, -0.19195759296417236, 0.10399331897497177, 0.036890026181936264, -0.4677603840827942, -0.8200811743736267, -0.07103487104177475, 0.1984453648328781, -0.3220928907394409, -0.1846569180...
coding. In addition to this approach, I would recommend creating a service layer that handles the logic beyond the Presenter class (including Data Access / Business Logic). I found that creating a class library to hold this UI agnostic code makes it very easy to reuse this code. This architecture also lends itself to ...
[ 0.7736763954162598, 0.10227054357528687, -0.5099779963493347, 0.22735115885734558, -0.09097200632095337, -0.07666662335395813, 0.16483794152736664, -0.05443032458424568, -0.13903585076332092, -0.7886530160903931, -0.20981630682945251, 0.352594256401062, -0.40192925930023193, -0.18741820752...
this same structure and the big benefit is that my UI does not drive my line of business apps. They are also much more maintainable and reusable. I can have a web forms app use the same class library that my WPF app uses.
[ 0.3350681662559509, 0.1320062279701233, 0.5382367968559265, 0.23659323155879974, -0.20289939641952515, -0.12296347320079803, 0.1690010130405426, -0.12979815900325775, -0.10888924449682236, -0.952796995639801, 0.07417632639408112, 0.4755682051181793, -0.13074275851249695, 0.0332048386335372...
The following code is just a simplified example to demonstrate my problem: ``` using System; using System.IO; using System.Diagnostics; using System.Threading; namespace ConsoleApplication5 { class Program { static string LogFile = @"C:\test.log"; static void Main(string[] args) { ...
[ 0.3376814126968384, 0.07121601700782776, 0.403015673160553, -0.21306663751602173, 0.3691336512565613, 0.21547678112983704, 0.44986793398857117, -0.23379047214984894, -0.12086064368486404, -0.4247443974018097, -0.07656797766685486, 0.6387925744056702, -0.33017122745513916, 0.356959253549575...
new Thread(new ParameterizedThreadStart(DoWork)).Start(i); } Console.ReadKey(); } static void DoWork(object param) { int count = (int)param; try {
[ 0.14641258120536804, -0.1884954571723938, 0.481739342212677, -0.26820439100265503, 0.20557238161563873, 0.220947265625, 0.31056392192840576, -0.5353143811225891, -0.36808761954307556, -0.44154590368270874, -0.12647412717342377, 0.2705412805080414, -0.44003549218177795, 0.6253343820571899, ...
using (FileStream fs = new FileStream(LogFile, FileMode.Append, FileAccess.Write, FileShare.ReadWrite)) using (StreamWriter sw = new StreamWriter(fs)) { sw.WriteLine(DateTime.Now + " - Start " + count.ToString());
[ 0.0004386393411550671, -0.5011557936668396, 0.9053972959518433, -0.48110130429267883, 0.5460619926452637, -0.025653915479779243, 0.29289525747299194, -0.3197658061981201, 0.008744521997869015, -0.7005917429924011, -0.2871943414211273, 0.4435516595840454, -0.1610175222158432, 0.310864955186...
Thread.Sleep(2000); // simulate doing some work sw.WriteLine(DateTime.Now + " - End " + count.ToString()); } } catch (Exception e) {
[ 0.1930568665266037, -0.3988809883594513, 0.0933103859424591, -0.24244487285614014, 0.41283664107322693, -0.22774754464626312, 0.3453228771686554, -0.3064216673374176, -0.3964706361293793, -0.3475247025489807, -0.023055288940668106, 0.3762342631816864, -0.32171475887298584, 0.15247860550880...
Console.WriteLine(count.ToString() + ": " + e.Message); return; } Console.WriteLine(count.ToString() + ": Done."); } } } ``` The problem here is that typically only one entry makes it into the file, even though I call the method 10 times. The file should be open to ...
[ 0.014553467743098736, 0.23390525579452515, 0.6564500331878662, -0.30478015542030334, 0.47830256819725037, -0.20246972143650055, 0.44667768478393555, -0.2725575268268585, 0.032765183597803116, -0.6945850849151611, -0.12081654369831085, 0.636188805103302, -0.07268338650465012, 0.232993423938...
are thrown. What's going on? In the real code that this example shadows, each call to DoWork is actually in a separate process, though testing shows that the results are the same-- if I can fix it here I can fix it there. There is nothing strange going on here. Imagine that you have a file "a.txt" and you open it in n...
[ 0.5248411297798157, 0.27958619594573975, 0.25792863965034485, -0.07431123405694962, -0.04553748294711113, 0.05472545325756073, 0.3713039755821228, -0.08462139964103699, -0.5316323041915894, -0.39206579327583313, -0.18201448023319244, 0.4229671359062195, -0.13156455755233765, 0.267666935920...
9 saves. I think you've got the same behavior here. All the files are opened at the same time because you have a Thread.Sleep in each processing. So the i file to be saved overwrites the previous save (i-1). EDIT: Try removing the Thread.Sleep(2000) and you'll have more logs in the file.
[ 0.2367997169494629, -0.18171639740467072, 0.1857268363237381, 0.044377651065588, 0.032618988305330276, 0.2581668496131897, 0.19105245172977448, 0.1947774589061737, -0.8324693441390991, -0.8024880886077881, 0.16712608933448792, 0.3138108253479004, -0.4512869715690613, 0.22951148450374603, ...
I have an importer process which is running as a windows service (debug mode as an application) and it processes various xml documents and csv's and imports into an SQL database. All has been well until I have have had to process a large amount of data (120k rows) from another table (as I do the xml documents). I am n...
[ 0.3867547810077667, 0.4311179220676422, 0.22041969001293182, -0.07237091660499573, 0.001755226170644164, -0.09042774885892868, 0.21581456065177917, 0.08593013137578964, -0.4186483919620514, -0.42569267749786377, -0.025398574769496918, 0.29403579235076904, -0.08767662942409515, 0.5484267473...
server separately but that application thread is just stuck with no obvious thread in SQL Activity Monitor and no activity in Profiler. Any ideas on where to begin solving this problem would be greatly appreciated as we have been struggling with it for over a week now. The basic architecture is c# 2.0 using NHibernat...
[ -0.1659305840730667, -0.030326688662171364, 0.6936349272727966, 0.10876736789941788, -0.4409451484680176, -0.1233055517077446, -0.08928552269935608, 0.031850218772888184, -0.2842743992805481, -0.5395633578300476, 0.10206309705972672, 0.4558280110359192, -0.47698384523391724, 0.097727395594...
table, which I can only assume is being generated from ADO.net the statement like exec sp\_cursorfetch 180153005,16,113602,100 is being called thousands of times according to Profiler I found out that it was nHibernate creating the cursor on the large table. I am yet to understand why, but in the mean time I have repla...
[ -0.20014646649360657, 0.13414013385772705, 0.48611101508140564, 0.07212505489587784, -0.11396253108978271, -0.020508112385869026, -0.4123156666755676, 0.007094788830727339, -0.38854557275772095, -0.35183894634246826, 0.09483884274959564, 0.4274430274963379, -0.6195532083511353, 0.299729794...
I have a List of beans, each of which has a property which itself is a List of email addresses. ``` <c:forEach items="${upcomingSchedule}" var="conf"> <div class='scheduled' title="${conf.subject}" id="scheduled<c:out value="${conf.id}"/>"> ... </div> </c:forEach> ``` This renders one `<div>` per bean in...
[ 0.5352092981338501, 0.348470538854599, 0.41821420192718506, -0.24050931632518768, 0.14648166298866272, -0.019975492730736732, -0.2129615843296051, -0.3044450879096985, -0.18783451616764069, -0.7171571254730225, 0.09475956112146378, 0.18676471710205078, -0.3069394826889038, 0.35310459136962...
and the library turns the `title` into the text of the tooltip. So, if `${conf.subject}` was "Subject", ultimately I'd like the `title` of the `<div>` to be "Subject: blah@blah.com, blah2@blah2.com, etc.", containing all of the email addresses of the sub-list. How can I do this using JSP EL? I'm trying to stay away f...
[ 0.35739728808403015, 0.13755455613136292, 0.5639550089836121, -0.007965967059135437, -0.060724854469299316, -0.2761363387107849, 0.12705190479755402, -0.33611157536506653, -0.018779881298542023, -0.8436492085456848, -0.22853511571884155, 0.8552576899528503, -0.1472480148077011, 0.042275406...
<div class='scheduled' title="${title}" id="scheduled<c:out value="${conf.id}"/>"> ... </div> </c:forEach> ``` I just use `<c:set>` repeatedly, referencing it's own value, to append/concatenate the strings.
[ 0.341318279504776, -0.23071818053722382, 0.3598531484603882, -0.2691608667373657, 0.00023719544697087258, -0.1382584124803543, -0.0539994016289711, -0.20334874093532562, 0.07771584391593933, -0.28206124901771545, -0.36851760745048523, 0.43574589490890503, -0.31252408027648926, 0.2084347307...
I am writing an algorithm to find the dominating set of a tournament graph. Is the minimum spanning tree of a directed graph equivalent to the dominating set of the graph? In other words, if I find the smallest MST for the tournament graph (by iterating through all of the vertices), can I then say this is equivalent to...
[ -0.37775692343711853, 0.028751475736498833, 0.25865286588668823, -0.14386795461177826, -0.2810612916946411, 0.009129234589636326, -0.07271948456764221, -0.10293492674827576, -0.17579132318496704, -0.9688740968704224, -0.051406774669885635, 0.2984127402305603, -0.5659618973731995, 0.2521649...
you can easily obtain of the original graph joining one spanning tree of it with the vertexes that do not belong to it. However, finding a *minimum* spanning tree and finding a *minimal* dominating set are different problems. I guess that they are equivalent again, but I'm not sure.
[ -0.010777097195386887, -0.05329322814941406, -0.06881026923656464, 0.04703891649842262, -0.3525694012641907, -0.2166655957698822, 0.09897242486476898, 0.14111296832561493, -0.26761025190353394, -0.9623708128929138, -0.08298304677009583, 0.2931426167488098, -0.4169742166996002, 0.4174144268...
I have a datagridview where the users can select which subset of columns to view. The problem I am having is that when I change the columns being displayed, the column widths are only being determined by the width of the Header Cells, not the data in it. I do have each column set to AutoSizeMode = AllCells. If a new ...
[ 0.31698450446128845, -0.06427016109228134, 0.5372543334960938, -0.15902087092399597, -0.048538222908973694, 0.13192206621170044, 0.1942126750946045, -0.22258572280406952, -0.2691105604171753, -0.7747024893760681, 0.2713582217693329, 0.7282770276069641, -0.34569528698921204, 0.3027385175228...
the columns: ``` dgv.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.None; dgv.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.AllCells; ``` Worth a try...
[ -0.23242031037807465, 0.19038091599941254, 0.4274611473083496, -0.062301140278577805, -0.040418822318315506, 0.15699821710586548, 0.03951313719153404, -0.0011677996953949332, -0.024274831637740135, -0.3781585693359375, -0.3315960466861725, 0.41919493675231934, -0.23990938067436218, -0.0839...
In the .xsd file for a typed DataSet in .NET, there's a `<Connections>` section that contains a list of any data connections I've used to set up the DataTables and TableAdapters. There are times when I'd prefer not to have those there. For instance, sometimes I prefer to pass in a connection string to a custom constru...
[ 0.3773316442966461, 0.03205383941531181, 0.24928663671016693, 0.15368835628032684, -0.12535959482192993, -0.3100518584251404, -0.03627887740731239, 0.22110912203788757, -0.2672908306121826, -0.9263678193092346, -0.06171112507581711, 0.1707729995250702, -0.3499552607536316, 0.32754364609718...
the DataSet gripes when I put it in a different project because it can't find the settings for those connection strings. Is there any way I can tell a typed DataSet not to worry about any connections? (Obviously I'll have to give it a connection if I change any TableAdapter SQL or stored procs, but that should be *my*...
[ 0.11040955036878586, -0.15106479823589325, 0.3553161919116974, 0.10970150679349899, -0.17075368762016296, -0.2184479534626007, 0.2661696672439575, -0.10840413719415665, -0.39526668190956116, -0.7853565812110901, 0.2020188421010971, 0.5759908556938171, -0.12788505852222443, 0.18586741387844...
or not. * You *can* make sure datasets won't store passwords in their connection strings. * You can either have the connection string stored in the 'connections' section the .xsd file or you can have it stored in the app.config file and referenced from the 'connections' section of the .xsd file. Either way, the 'connec...
[ 0.6861302852630615, 0.20548923313617706, 0.4607027769088745, 0.28139811754226685, 0.21858008205890656, -0.22415894269943237, 0.30615073442459106, 0.2373468577861786, -0.23546245694160461, -0.8859315514564514, -0.32179442048072815, 0.5072953104972839, -0.2507363259792328, 0.231245219707489,...
connection and never use one stored in the dataset.
[ -0.12046365439891815, 0.13611766695976257, 0.6917540431022644, 0.33104509115219116, 0.4162401854991913, -0.2957984209060669, 0.392986923456192, 0.32522159814834595, -0.3820575773715973, -0.5791211128234863, -0.33097726106643677, 0.19020622968673706, -0.21716827154159546, 0.1795956790447235...
Once I have all the files I require in a particular folder, I would like my python script to zip the folder contents. Is this possible? And how could I go about doing it? Adapted version of [the script](http://mail.python.org/pipermail/python-list/2006-May/384142.html) is: ``` #!/usr/bin/env python from __future__...
[ 0.084720678627491, -0.08579792827367783, 0.4053783416748047, -0.16354306042194366, -0.01787455379962921, 0.047015707939863205, 0.1250907927751541, -0.370687872171402, -0.15555450320243835, -0.6834813952445984, -0.38782748579978943, 0.5460063815116882, -0.2327088564634323, -0.12399448454380...
for fn in files: absfn = os.path.join(root, fn) zfn = absfn[len(basedir)+len(os.sep):] #XXX: relative path z.write(absfn, zfn) if __name__ == '__main__': import sys basedir = sys.argv[1] archivename = sys.argv[2] zipdir(basedir, archivename) ``` Example...
[ -0.09878398478031158, -0.14444422721862793, 0.25859585404396057, -0.24587801098823547, 0.028042346239089966, 0.13216343522071838, -0.02222697250545025, -0.25137093663215637, -0.29886099696159363, -0.5784621834754944, -0.30666589736938477, 0.4280780553817749, -0.4938972592353821, -0.1603726...
the contents of the `'c:\tmp\test'` directory.
[ 0.2893303632736206, 0.38408559560775757, -0.37436506152153015, 0.24416862428188324, 0.2762705683708191, -0.09697549045085907, 0.04598993808031082, 0.2956339716911316, 0.13244745135307312, -0.23596037924289703, -0.34516191482543945, 0.2988884747028351, -0.16794565320014954, 0.01179862394928...
I am wondering if anyone has any insight into this. I am thinking of going to grad school to get some computer science related degree. I have always been intrigued by people who are working on problems using statistical packages or simulation to solve problems. What would I study to get a good breadth of knowledge of t...
[ 0.6182703375816345, 0.11907712370157242, -0.19779039919376373, 0.27538517117500305, 0.1033635288476944, 0.05163018777966499, 0.09538160264492035, 0.5485357642173767, -0.41778072714805603, -0.7346569299697876, 0.14672322571277618, 0.40719306468963623, 0.1165720745921135, 0.07765180617570877...
program, with statistics, data mining, text analysis, and computational learning theory. * Industrial engineering/operations research, with simulation, reliability, and process control. I'd be happy to talk further about this, please put questions in comments.
[ 0.6663351058959961, 0.06884388625621796, -0.24777890741825104, 0.5030841827392578, 0.11208529025316238, 0.1982908695936203, -0.2634216547012329, 0.1875579059123993, -0.48234137892723083, -0.545354962348938, -0.15264853835105896, 0.3070301413536072, 0.2882143557071686, 0.20421218872070312, ...
I'm stuck in having to write a simple spam filter I'm not really sure about how I'm going to do it. So far I've come up with wordlist and domain filtering, which will give or remove points up to a certain threshold. For example, if you're writing about "v1agr4" from a blacklisted domain, you'll get like 2 points for ...
[ 0.6232426762580872, 0.20423130691051483, 0.28890761733055115, -0.030823417007923126, -0.3170260190963745, -0.2973935306072235, 0.5540725588798523, -0.04148378595709801, -0.3263261318206787, -0.5515735149383545, 0.2740618586540222, 0.4421478807926178, -0.18611347675323486, 0.204338714480400...
the wheel? Just download K9: <http://keir.net/k9.html>
[ 0.048123348504304886, -0.08380720764398575, 0.3659288287162781, 0.35242754220962524, -0.0705418810248375, 0.15799854695796967, 0.14903423190116882, 0.038875263184309006, -0.21359474956989288, -0.23188936710357666, -0.017208106815814972, 0.3258441388607025, 0.25710105895996094, 0.3210014104...
I'm getting ready to implement a source control system (subversion) but I'm facing some doubts on how to structure my folders. I use Delphi for all my development and compile the projects from within the IDE. My current projects folder structure is as follows: ``` -E:\Work\1. Shared --Forms (shared forms across all...
[ 0.336102694272995, 0.25893113017082214, 0.29246631264686584, -0.1567547619342804, -0.09289634227752686, 0.00420311139896512, 0.06070071831345558, -0.06051134318113327, -0.13066792488098145, -0.7850010991096497, -0.19009391963481903, 0.17017477750778198, -0.05840357393026352, 0.167536213994...
create the setup.exe) -------Protection (Project files to protect the compiled exe) -------Update (inf files related with the auto-update) ------Docs (where the readme.txt, license.txt and history.txt that are included in the setup file are) -------Defects (docs for any testing done by me or others) -------HTMLHelp (ht...
[ 1.0328736305236816, -0.03725742548704147, 0.330842524766922, 0.2755894362926483, 0.10277432948350906, -0.6291015148162842, 0.02355521358549595, -0.3646068274974823, -0.10705359280109406, -0.8590112924575806, -0.38057687878608704, 0.5377517938613892, -0.21367138624191284, -0.148951902985572...
we decide to have individual web sites for products they would all be placed on the Sites folder) ``` The sign "-" marks directories. Anyone cares to comment about the current structure or has any suggestions to improve it? Thanks! Having setup literally hundreds of projects over the years, and having specialized i...
[ 1.036734938621521, 0.5080453753471375, -0.0054436842910945415, 0.12200005352497101, 0.24576906859874725, -0.3705531358718872, -0.025290263816714287, -0.06835705041885376, -0.1796799749135971, -0.6258688569068909, -0.07900816202163696, 0.4493663012981415, 0.2969447076320648, -0.061647240072...
find. However, I would strongly recommend that you do not build only with an IDE, or even at all. Instead, create an automated build/release script using one or more of the many wonderful open-source tools available. Since you appear to be targeting Windows, I recommend starting with a look at Ant, Ivy, and the approp...
[ 0.43472376465797424, 0.2885197103023529, -0.007598450407385826, 0.2682662606239319, 0.09420539438724518, -0.2719837427139282, 0.09242580085992813, 0.1555650532245636, 0.2312268614768982, -0.8333529233932495, -0.042991284281015396, 0.6979576349258423, -0.09133663773536682, -0.07103084027767...
will readily find answers to your question there, as well as find a whole lot more questions worth investigating. Enjoy! Based on comments, it seems that some detail is needed. A particular recommendation that I would make is that you separate your codebase into individual subprojects that each produce a single deli...
[ 0.49823054671287537, -0.04421577230095863, 0.10975077748298645, 0.24422234296798706, -0.08130314201116562, -0.19790831208229065, 0.027189146727323532, -0.1150440201163292, -0.09019862860441208, -0.6964628100395203, -0.639797568321228, 0.28514042496681213, -0.2970161437988281, 0.03285690397...
the subprojects are peers (no depth or hierarchy, because it does not help), and do NOT let projects "reach" into each other's subtree--each project should be completely independent, with dependencies ONLY on the primary deliverables of the other subprojects, referenced in the shared output directory. Do NOT create a ...
[ 0.37492355704307556, 0.10244681686162949, 0.016877587884664536, 0.11625867336988449, 0.1272573173046112, -0.06996545195579529, 0.48588064312934875, -0.22436584532260895, -0.03249821811914444, -0.45157355070114136, -0.29773586988449097, 0.34589773416519165, -0.2965051233768463, 0.0434261225...
dependencies into source control--not your build output, not the libraries that you use, etc. Use Ivy against a Maven-like binary repository that you deploy separate from source control, and publish your own deliverables to it for sharing within your organization. Oh, and don't use Maven--it is too complicated, obfusc...
[ 0.3881402015686035, -0.1327490210533142, 0.4081214368343353, 0.018642622977495193, 0.01388486847281456, -0.1146220937371254, -0.10189788043498993, 0.0715862512588501, -0.05199926719069481, -0.48655402660369873, -0.013986296951770782, 0.8444116711616516, -0.5000740885734558, 0.1805914491415...
repository?](https://stackoverflow.com/questions/222827/how-do-you-organize-your-version-control-repository#304036)
[ 0.057763878256082535, -0.12234422564506531, 0.1663403958082199, 0.4253394603729248, 0.4507555067539215, -0.3377330005168915, -0.007112158462405205, -0.278067946434021, -0.4337989389896393, -0.0007449018303304911, -0.19312572479248047, 0.3273964524269104, -0.1797378659248352, 0.221209257841...
We're looking into transport/protocol solutions and were about to do various performance tests, so I thought I'd check with the community if they've already done this: Has anyone done server performance tests for simple echo services as well as serialization/deserialization for various messages sizes comparing EJB3, T...
[ 0.21897023916244507, -0.02245895005762577, 0.056813713163137436, 0.03959766402840614, -0.3300096392631531, 0.09024257957935333, 0.1436498463153839, 0.019582374021410942, -0.5574941635131836, -0.6319172978401184, -0.1162898913025856, 0.22362396121025085, -0.4080490171909332, -0.200637146830...
well. Latest comparison available here at the [thrift-protobuf-compare](https://github.com/eishay/jvm-serializers/wiki/) project wiki. It includes many other serialization libraries.
[ 0.32556384801864624, 0.1071576401591301, -0.10334685444831848, 0.170380637049675, -0.041122473776340485, -0.13899540901184082, 0.007481964770704508, 0.011755241081118584, -0.5337660312652588, -0.4659874439239502, 0.043789930641651154, 0.17695990204811096, 0.1459474265575409, 0.183941230177...
One thing that bugs me about IE is that when it goes to load a page with an iframe it will wait until the iframe has finished loading before it will render the page. Firefox by contrast will render all the other page elements while the iframe is loading which is really nice if the iframe takes a long time to load becau...
[ 0.4072260558605194, 0.18782095611095428, 0.44233131408691406, -0.07200516760349274, -0.23278075456619263, -0.4444413185119629, 0.3969007134437561, 0.18429076671600342, -0.10373669862747192, -1.1429485082626343, 0.2255828082561493, 0.4401053786277771, -0.5391272306442261, 0.1367383748292923...
am wondering if anyone has found a workaround for this. Ideally, I'd like to see a cross browser solution that shows a progess bar as an iframe loads on the page. Short of that I'd take a method of implementing an iframe that forces IE to first render the page then load the iframe. I have seen a couple of interesting ...
[ 0.1966150403022766, 0.047526344656944275, 0.38705334067344666, -0.021702716127038002, -0.34520137310028076, -0.02814694121479988, 0.2970307469367981, 0.0004099168290849775, -0.23618292808532715, -0.6787574887275696, -0.26506656408309937, 0.541957676410675, -0.07757052779197693, -0.03609642...
is loaded so showing a progress bar at that point is irrelevant. I've also tried setting the iframe src to loading.htm and then onload switch the src to the content I want. Sadly IE still will not render the page until the final content page comes up (seems strange to me). Help me stackoverflow, you're my only hope. ...
[ 0.27649006247520447, 0.12386637181043625, 0.7671034336090088, -0.10607121139764786, -0.21348701417446136, -0.21182385087013245, 0.262335866689682, -0.1671224981546402, -0.20805072784423828, -0.7782604694366455, -0.16379192471504211, 0.5852699875831604, -0.12550358474254608, 0.1605616956949...
I am trying to autoreload my page after every 20 seconds. I am using JavaScript for this instead of the <meta>. I have <body onload="SetTimer()"> and here is my JavaScript function ``` function SetTimer(){ setTimeout('window.location.replace(window.location.pathname)', 20000) } ``` Now my problem is...
[ -0.09621641784906387, 0.13967882096767426, 0.7505643963813782, -0.17237363755702972, -0.21727138757705688, -0.10576135665178299, 0.6051309704780579, -0.5428168177604675, -0.2846226096153259, -0.6765121221542358, 0.062407203018665314, 0.5736237168312073, -0.4121457636356354, 0.2310161292552...
trick
[ 0.03481303155422211, 0.31991007924079895, 0.20913493633270264, 0.06623422354459763, 0.20410650968551636, 0.03417036309838295, 0.10403412580490112, 0.0020776751916855574, -0.22238212823867798, -0.002030598931014538, 0.027467595413327217, 0.1973302811384201, 0.07472068816423416, -0.002069140...
I need to populate a context menu from a database at run time. I do not know the number of items that will be in the list, so I would like to handle the click event in a single place. How do I declare the handler so I can tell which menu item actually triggered the click. ``` Public Function GetBookmarkContextMenu(ByV...
[ -0.12471162527799606, 0.015998467803001404, 0.7368875741958618, 0.05234508588910103, 0.175235778093338, -0.18850938975811005, 0.18590834736824036, -0.22987720370292664, -0.1780233234167099, -0.7323839664459229, -0.32620131969451904, 0.5874995589256287, -0.2332429140806198, 0.16469936072826...
Dim mySubMenuItem As New Controls.MenuItem mySubMenuItem.Name = "MailingListName" & aMailingList.ID.ToString mySubMenuItem.Header = aMailingList.Title AddHandler (myMenuItem.Click), AddressOf ForwardToList_Click mySubMenuItem.IsEnabled = True
[ 0.11214645951986313, -0.09351462125778198, 0.7523084282875061, -0.026882436126470566, 0.06286069750785828, -0.0571693554520607, 0.2782593369483948, 0.05808666720986366, -0.031227191910147667, -0.3889210522174835, -0.24608370661735535, 0.790857195854187, -0.0935131162405014, 0.3722979724407...
myMenuItem.Items.Add(mySubMenuItem) Next myContextMenu.Items.Add(myMenuItem) return myContextMenu End Function Public Sub ForwardToList_Click() 'How do I know which of the dynamically created items was clicked? End Sub ``` Your ForwardToList\_Click() should include parameters ...
[ -0.6351172924041748, 0.0995955541729927, 0.5534429550170898, -0.10205874592065811, -0.056941427290439606, 0.08378896117210388, 0.2537429928779602, -0.046156566590070724, -0.10603359341621399, -0.5348978042602539, -0.29741865396499634, 0.5002054572105408, -0.19348880648612976, 0.24302312731...
A problem I've encountered a few time in my career is in a tiered service architecture a single downstream system can bring down the entire client application if it gets into a state where all its threads are consumed on a deadlock or some sort of infinite loop bug in that system. Under these conditions the server sock...
[ 0.030377980321645737, 0.22501374781131744, 0.18592163920402527, 0.07217436283826828, 0.047727469354867935, -0.19249698519706726, 0.31639325618743896, -0.04855995625257492, -0.39748120307922363, -0.6431746482849121, -0.032129134982824326, 0.27934110164642334, -0.26859450340270996, 0.4796383...
as their requests are also being queued. I've thought of a few solutions but I was wondering if the community has some better ones. 1. Isolated thread pools for downstream requests. This becomes a problem because you compound the number of idle threads in you system creating many small pools that need to have enough ...
[ 0.23288623988628387, -0.4245203137397766, 0.01559104211628437, -0.027098624035716057, -0.3802871108055115, -0.06389074772596359, 0.14573854207992554, -0.013402619399130344, -0.5256279110908508, -0.5710869431495667, -0.016187183558940887, 0.22026635706424713, -0.6913449764251709, 0.15514947...
app server deal with management the MDB thread pools. (Currently number one on my list) 3. ESB. This is even more heavy-weight and adds more network and processing time. But it allows you to set individual service timeouts. Also has the problem of it will take forever to get implemented in a big corporation so probably...
[ 0.1836569458246231, 0.07697123289108276, 0.4185754358768463, 0.16402748227119446, -0.18213443458080292, 0.03865152969956398, 0.27636104822158813, 0.0009144353098236024, -0.3525841534137726, -0.874008297920227, 0.025179646909236908, 0.6145301461219788, -0.5053929090499878, -0.23477251827716...
problem but just shift the backup to your JMS queue without responses ever being sent back to the client. Of course if only 1 of several services cause this problem, the others will now still be accessible. Your proposal (1) is also doable on WebSphere or Weblogic via the commonj WorkManager. It will allow you to crea...
[ 0.31469041109085083, -0.16924592852592468, 0.22807393968105316, 0.07736886292695999, 0.19259752333164215, -0.1844128519296646, 0.06763128191232681, -0.12219290435314178, -0.30966636538505554, -0.830234169960022, 0.13309161365032196, 0.5361623764038086, -0.4071868062019348, -0.0661882907152...
When I generate a default scaffold, the display tags on show.html.erb have ``` <%=h @broker.name %> ``` I know the difference between `<%` and `<%=`. What's the "h" do? html escape. It's a method that converts things like < and > into numerical character references so that rendering won't break your html.
[ 0.0436079315841198, 0.19486817717552185, 0.5677241086959839, 0.024044208228588104, -0.22837144136428833, -0.16958625614643097, 0.20981678366661072, -0.385422945022583, 0.01597575843334198, -0.6001984477043152, -0.07001419365406036, 0.40064361691474915, -0.17113558948040009, -0.016894305124...
I have a class that has some properties. And I want something that calculates a Score out of these properties. Since this is a trivial task (some additions and divisions, but nothing spectacular). So naturally, the question is: "When to use a Property with some code in the getter, and when to use a function?", and [th...
[ 0.04897530376911163, -0.11216411739587784, 0.07754527032375336, 0.28280818462371826, 0.1846494823694229, -0.24553778767585754, 0.09695664048194885, -0.15726442635059357, -0.2738340198993683, -0.3786851167678833, -0.07577797025442123, 0.4965001344680786, 0.06621251255273819, 0.0388999171555...
throw an exception or whatever), is it easy to change a Property into a Method? Of course, it seems really trivial, just changing ``` public double Score { get { return Math.Round(A + B / C * D,3); } } ``` to ``` public double Score(){ return Math.Round(A + B / C * D,3); } ``` But I wonder: A...
[ 0.348055899143219, 0.11163131892681122, 0.09452486038208008, -0.03655937314033508, 0.005527577828615904, -0.2599736452102661, 0.3361373543739319, -0.3103080689907074, -0.4713875949382782, -0.4358459413051605, -0.11730613559484482, 0.4838312864303589, -0.23574396967887878, 0.106664344668388...
have 2 Assemblies - one that defines the class and one that uses the class - and only change the one that contains the class without recompiling the consumer assembly. Is that a possible source of "weird bugs that are nearly impossible to track" or is it completely safe to change Properties to Methods? No. There are no...
[ 1.0641206502914429, -0.026069436222314835, 0.5109407305717468, 0.14367125928401947, -0.024378381669521332, -0.28493398427963257, 0.17388959228992462, -0.6849915385246277, -0.02701420895755291, -0.671581506729126, -0.07854744791984558, 0.9454907178878784, -0.06495934724807739, 0.06934087723...
(but typically shouldn't) add parameters to a property. The only "gotcha" is that in C# you will need to add "()" to any existing calls. Also > according to the coding guidelines, a > property name usually is noun (i.e. > Score), but methods should describe > actions (verb), so more proper name is > GetScore() ...
[ 0.06415873765945435, 0.010963485576212406, 0.2097071409225464, 0.5201008319854736, -0.08875595778226852, -0.28968846797943115, 0.25609320402145386, -0.43954089283943176, -0.09891427308320999, -0.5379577875137329, -0.36190149188041687, 0.18651182949543, -0.03673693537712097, -0.171802759170...
The following code fails to compile stating "A local variable named 'st' cannot be declared in this scope because it would give a different meaning to 'st', which is already used in a 'child' scope to denote something else": ``` var l = new List<string>(); l.Find(st => st.EndsWith("12")); stri...
[ 0.17421501874923706, 0.06263956427574158, 0.200180783867836, -0.2636910080909729, 0.2818196415901184, 0.04232095927000046, 0.6477684378623962, -0.45274731516838074, -0.006868621800094843, -0.49903562664985657, -0.4487763047218323, 0.6987185478210449, -0.4555741548538208, 0.2235272973775863...
string preParent = "Should fail cause we change the meaning"; } ``` When we do the following we get "CS0103: The name 'postParent' does not exist in the current context": ``` { string postParent=string.Empty; } postParent = "Should this work?"; ``` What I don't get is wh...
[ 0.10499066859483719, 0.12214639037847519, -0.11211499571800232, -0.2470628321170807, 0.34090784192085266, -0.08613239973783493, 0.8210186958312988, -0.18967318534851074, 0.19393105804920197, -0.23491039872169495, -0.4596109688282013, 0.47242894768714905, -0.458537220954895, 0.1165533438324...
is not within scope, but won't let me define a new variable that has the same name as a variable used within a child scope (which is obviously out of scope at this point). Is the compiler simple enforcing scope by refusing to let me use the variable? If so this makes sense. =========== Edited: I guess what I also...
[ 0.5022493600845337, 0.10094713419675827, 0.017868269234895706, 0.0006998084718361497, -0.04927176609635353, -0.4326290488243103, 0.36679837107658386, -0.19404113292694092, -0.11412765085697174, -0.013467567041516304, -0.07659559696912766, 0.6512612104415894, -0.43233945965766907, 0.3039941...
thisWorks= string.Empty; } { string thisWorks= "Should this work?"; } ``` I'm just a little curious that you can have two variables with the same name as long as they are at the same level (if you look at scope as a tree). This makes sense because you can have local variables in tw...
[ 0.5298597812652588, -0.24610252678394318, 0.07465317845344543, -0.12486105412244797, -0.0319303497672081, -0.3469140827655792, 0.4681287705898285, -0.082041896879673, -0.11537183076143265, -0.7741751670837402, 0.057954851537942886, 0.5912591218948364, -0.5505412817001343, 0.137447014451026...
able to differentiate and allow this, while it wouldn't allow the postParent variable. And is this a technical limitation or was this a design decision? That's what I'm really trying to get at;-) Yes, the compiler is enforcing scope. Note that the scope of a variable is the lexical block it's part of - not just from th...
[ 0.44745638966560364, 0.13330993056297302, -0.04006807133555412, -0.05916944891214371, -0.02356684021651745, -0.22318525612354279, 0.4458208382129669, -0.05234362557530403, -0.0629163607954979, -0.3255539834499359, -0.20697121322155, 0.5769219398498535, -0.4123918116092682, -0.0648189410567...
`postParent` the problem would be with the nested block, because the scope of `postParent` would include that nested block, even though it was before the declaration. Scopes are described in section 3.7 of the C# 3.0 specification. EDIT: To respond to your question edit. It's just two simple rules: * you can't decl...
[ 0.41752469539642334, 0.11467692255973816, 0.2872951626777649, -0.1160048395395279, -0.14568641781806946, -0.295855849981308, 0.13933922350406647, -0.4303551912307739, -0.15557578206062317, -0.23723717033863068, -0.3251514434814453, 0.6238033771514893, -0.5184795260429382, 0.089088924229145...
(in terms of language complexity) to consider scopes as just blocks - so all local variables declared in the same block have the same scope, for example. That makes life a lot simpler when considering captured variables, too - as what gets captured depends on the scope, and nested scopes make life interesting... EDIT:...
[ 0.35420799255371094, 0.0017691821558400989, -0.03569817915558815, 0.09971923381090164, 0.05805845186114311, -0.2749233543872833, 0.30474716424942017, -0.2320089191198349, -0.2170649915933609, -0.21922221779823303, -0.2942371070384979, 0.5785861611366272, -0.43152835965156555, -0.3250147104...
the parameters of the > anonymous function is the > anonymous-function-body. Together with > the parameter list (if given), the > anonymous-method-body constitutes a > declaration space. For this reason, it > is a compile-time error for the name > of a parameter of the anonymous > function to match the name of ...
[ -0.13530251383781433, 0.0173770934343338, 0.10203257203102112, 0.16217343509197235, -0.02531760185956955, -0.08373784273862839, 0.034041840583086014, -0.07307417690753937, 0.07371191680431366, -0.4396800100803375, -0.05210281163454056, 0.618030309677124, -0.4872826337814331, -0.00727314827...
Suppose I have three classes. It is valid to instantiate A, but there are also special cases B and D which subclass A, adding additional information. How would I do the mapping files for this in (fluent) NHibernate? ``` public class A { public int ID { get; set;} public string CommonProperty1 { get; set; } ...
[ 0.0793084129691124, 0.015083634294569492, -0.0013438476016744971, -0.4252356290817261, -0.2142568826675415, 0.18965354561805725, 0.44940945506095886, -0.13060103356838226, 0.24458341300487518, -0.5835496187210083, -0.13207127153873444, 0.5922192335128784, -0.38712257146835327, -0.110412791...
public string DSpecificProperty { get; set; } //not null } ``` I tried the following, but it doesn't work at all: ``` public class AMap : ClassMap<A> { public AMap() { Id(x => x.ID); Map(x => x.CommonProperty1); Map(x => x.CommonProperty2); } } public class BMap : ClassMap<B> { ...
[ 0.013822517357766628, -0.2791880965232849, 0.30995070934295654, 0.0090672941878438, 0.04127063974738121, 0.024011654779314995, 0.3336656391620636, -0.4885149300098419, -0.08764739334583282, -0.6800776720046997, -0.31550735235214233, 0.6216843724250793, -0.6068354249000549, 0.07237407565116...
x.BSpecificProperty1) .CanNotBeNull(); Map(x => x.BSpecificProperty2) .CanNotBeNull(); } } public class DMap : ClassMap<D> { public DMap() { References(x => x.ID); Map(x => x.DSpecificProperty) .CanNotBeNull(); } } ``` I'm not sure I underst...
[ 0.03553090617060661, -0.16860923171043396, 0.2470824420452118, -0.2978755235671997, 0.058482903987169266, -0.1148192510008812, 0.36372044682502747, -0.37435394525527954, -0.2270136922597885, -0.7844001650810242, -0.4549899399280548, 0.4333511292934418, -0.645233154296875, 0.327990680932998...
but if you want to map inheritance where the subclasses have properties that are not nullable, you can do like this in Fluent-NHibernate: ``` // Domain classes public class Animal { public virtual int Id { get; set; } public virtual string Name { get; set; } } public class Cat : Animal { public virtual in...
[ 0.13059912621974945, -0.4349338114261627, -0.051585134118795395, 0.10499908030033112, -0.1691979020833969, -0.11357177048921585, 0.3048302233219147, -0.18811269104480743, -0.09074835479259491, -0.6601205468177795, -0.10673557221889496, 0.7498584985733032, -0.3868008852005005, 0.13077120482...
AnimalMap() { Id(x => x.Id) .WithUnsavedValue(0) .GeneratedBy.Native(); Map(x => x.Name); var catMap = JoinedSubClass<Cat>("CatId", sm => sm.Map(x => x.Id)); catMap.Map(x => x.WhiskerLength) .CanNotBeNull(); catMap.Map(x => x.ClawCount)
[ -0.053377099335193634, -0.4857775866985321, 0.49937427043914795, -0.362851619720459, 0.06199706345796585, 0.1554223895072937, 0.5411356091499329, -0.6414493918418884, -0.2575855553150177, -0.5287637710571289, -0.08111061900854111, 0.42077454924583435, -0.6247471570968628, 0.318243801593780...
.CanNotBeNull(); JoinedSubClass<Dog>("DogId", sm => sm.Map(x => x.Id)) .Map(x => x.TailWagRate) .CanNotBeNull(); } } ``` Since you want the subclasses' properties to be not-null, you have to use the table-per-class (joined-subclass) way of modeling the inheritance. This is bec...
[ -0.1471346914768219, -0.0867115929722786, 0.12341221421957016, -0.22128723561763763, -0.022632699459791183, -0.10952557623386383, 0.6494466662406921, -0.20686987042427063, -0.39965081214904785, -0.6023159623146057, -0.2257806360721588, 0.20637978613376617, -0.49235227704048157, 0.367551952...
What is the way of separating Line-Breaks and Space in MultiLine Textbox or HTML Text area while inserting database (Asp.Net). For example what should I do if I want to insert Hello World to database with line breaks? And also While displaying what should I do? I don't want to use Editor for it. --- But the pro...
[ 0.039557307958602905, -0.08056917041540146, 0.009826427325606346, 0.24530188739299774, -0.23320622742176056, 0.042413271963596344, -0.04194163903594017, -0.06606172025203705, -0.32605743408203125, -0.7417013645172119, 0.09658709913492203, 0.19457781314849854, -0.228768453001976, 0.23645289...
value, which comes from TextBox or html area, are the same as with line break or space. The line breaks should persist to the db. When you retreive the info and display as Html just replace the line break (i.e. Environment.NewLine) with a line break tag (i.e. `< b r / >` )
[ 0.44450899958610535, -0.03864183649420738, 0.5745033025741577, -0.22037853300571442, -0.0873657837510109, -0.08164915442466736, 0.3447103798389435, -0.2691461145877838, -0.0949590727686882, -0.45308127999305725, -0.30300113558769226, 0.3376064896583557, -0.08931968361139297, 0.047334890812...
Is there a way to use Profiler to determine whether a table is being accessed by queries? I saw an event named `Object:Opened` (Indicates when an object has been accessed, such as for SELECT, INSERT, or DELETE statements) and `Object:Closed`, but these do not seem to work. In particular, I created a simple trace with...
[ 0.03258880600333214, -0.19756969809532166, 0.01244411338120699, 0.27867066860198975, -0.00033540098229423165, -0.24816007912158966, -0.07569731026887894, -0.05545204505324364, -0.3423139452934265, -0.4943198561668396, 0.2585446834564209, 0.23012277483940125, -0.3265988528728485, 0.19460484...
help to investigate the locks SQL is acquiring. Select statements will generally aquire shared Locks (LCKMS), so you can filter for this. In profiler look for the Locks:Acquired event. The ObjectID will resolve to the table which you can easily lookup with `OBJECT_NAME(objectid)`. The Mode will tell you the kind of lo...
[ -0.01001677755266428, -0.29793402552604675, 0.21544507145881653, 0.2532884180545807, -0.07986126840114594, -0.3795091211795807, 0.16266097128391266, 0.050730716437101364, -0.40190932154655457, -0.6595442295074463, -0.031105397269129753, 0.5673458576202393, -0.12229625880718231, 0.202223017...