text
stringlengths
0
30.5k
title
stringclasses
1 value
embeddings
listlengths
768
768
aren't available to HTML or JavaScript/DOM in any browsers that I know of, so you're going to end up dependent on some sort of plugin. I'd recommend you start your search with Adobe Flash/Flex, though It's possible that Microsoft Silverlight is able to do the same thing. Flex is a bit more reliable technology and has b...
[ 0.5578569769859314, 0.04856804385781288, 0.5467471480369568, 0.17944557964801788, -0.012923387810587883, -0.42113640904426575, 0.1422913819551468, 0.1786247044801712, -0.40296411514282227, -0.7538732886314392, -0.23475666344165802, 0.6018819808959961, -0.01720433123409748, -0.0652747601270...
I remember working on a project with a group of developers and they always wanted static html text to be inside of an out tag (`<c:out value="words" />`). I don't remember why this was the case. Is this really a best practice when building jsp pages? What are the advantages/disadvantages of such an approach? It is ...
[ 0.1735866665840149, 0.2857022285461426, 0.422883003950119, -0.21832431852817535, -0.4238370358943939, -0.1714819371700287, -0.03635643795132637, -0.1579146385192871, -0.2867794632911682, -0.40175989270210266, -0.05601689964532852, 0.3657684326171875, -0.6479591727256775, 0.0556740462779998...
tags, in my experience: 1. You're using an older servlet spec, and need them to output DYNAMIC text in some fashion 2. You want to escape `HTML` output to avoid using `<>`, etc, replacing ampersands with their control codes, etc. Otherwise, having them use static text confuses the programmer or maintainer...now where...
[ 0.3196755349636078, 0.00039156578714028, 0.43677088618278503, 0.08528410643339157, -0.13829563558101654, -0.1654522716999054, 0.21558628976345062, -0.45771074295043945, -0.24384841322898865, -0.24446295201778412, 0.012068847194314003, 0.28343841433525085, -0.5142145156860352, -0.1499201655...
I'm using **DotNetNuke**, so the whole site is basically dynamically driven and I'm clueless to how to go about creating a Google sitemap for it. Any help will be greatly appreciated. Jeff Atwood has some good information on SiteMaps [here](http://www.codinghorror.com/blog/archives/001174.html). You can also see more...
[ 0.7321614027023315, -0.10310330986976624, -0.2467155009508133, 0.041614923626184464, 0.3257211446762085, -0.0779738500714302, 0.12021096050739288, 0.2588442862033844, -0.1623290628194809, -0.90272057056427, -0.029632028192281723, 0.1956997811794281, -0.3339211344718933, -0.0849465355277061...
I build and maintain a set of Flash components that is distributed to publishers and allows them to integrate with our system. Currently the component has no UI and simply contains compiled code for querying our system servers, parsing the response, and modifying the params sent in the query. There's an As2 version and...
[ 0.4514099955558777, 0.19724692404270172, 0.533163845539093, 0.12129725515842438, -0.2064964473247528, -0.04107118025422096, 0.2507507801055908, -0.3156948387622833, -0.010431334376335144, -0.6382114887237549, -0.07651250064373016, 0.4635525941848755, -0.0719006285071373, -0.109130784869194...
retrieving and using parsed data We've been talking a lot lately about automating the testing of these components, and there seems to be a lot of buzz around frameworks like AsUnit and FlexUnit. However, I've never been able to grasp how I might effectively use of one of these. The examples and tutorials always skimp...
[ 0.41412386298179626, -0.048946794122457504, -0.39624831080436707, 0.3112449645996094, -0.22564713656902313, 0.00260881963185966, 0.25911498069763184, -0.1418943554162979, -0.09487030655145645, -0.5839990377426147, 0.01572738215327263, 0.48555630445480347, -0.1324651688337326, -0.0500091761...
runner, and test cases built in at the start of development. An automated test of our component would have to make sure properties were properly set, those properties were sent in the request to our system, the response received was correct considering the parameters sent, the parsed data includes correct information...
[ -0.03490157425403595, -0.08425965905189514, -0.08724267780780792, 0.5410964488983154, 0.03191123530268669, -0.07322042435407639, 0.2667143940925598, -0.2703626751899719, 0.029519466683268547, -0.35467347502708435, 0.19721552729606628, 0.6522945165634155, -0.3927880823612213, -0.42519938945...
already possible? **UPDATE**: Thanks for the responses. I have started to integrate my component with AsUnit and think I have a pretty good understanding of how it can help me. However, the AS2 AsUnit does not support asynchronous test cases, and I'm having a hard time finding an AS2 unit test framework that does. As...
[ 0.5588857531547546, -0.18557079136371613, -0.06645522266626358, 0.5517674088478088, 0.28791147470474243, 0.12001796066761017, 0.20997996628284454, -0.013103448785841465, -0.31055915355682373, -0.7346664667129517, 0.08232752233743668, 0.4496641755104065, 0.26284340023994446, 0.0371734984219...
much at all (if anything) in order to test your code. If you're already using an MVC framework like [Cairngorm](http://opensource.adobe.com/wiki/display/cairngorm/Cairngorm) or [PureMVC](http://puremvc.org/), FlexUnit should integrate pretty painlessly. I will say however that my experience with Flash/Flex unit testin...
[ 0.0667460486292839, -0.30289226770401, 0.32990148663520813, 0.1624472588300705, -0.0795430913567543, -0.0966457799077034, 0.40447548031806946, -0.19725875556468964, -0.39720234274864197, -0.6176468133926392, -0.13903570175170898, 0.6804572343826294, 0.007140644825994968, -0.230797141790390...
environment such as [CruiseControl.NET](http://confluence.public.thoughtworks.org/display/CCNET/Welcome+to+CruiseControl.NET) or [CruiseControl.rb](http://cruisecontrolrb.thoughtworks.com/) since it requires a human to run it and click buttons. Lastly, a huge benefit of unit testing is usually that you can run it along...
[ 0.08717600256204605, -0.3936995267868042, 0.22843533754348755, 0.25609588623046875, 0.16455745697021484, -0.402235209941864, 0.0905698612332344, -0.35465845465660095, -0.27481409907341003, -0.7195903658866882, -0.1051977202296257, 0.7220714688301086, -0.0065794410184025764, -0.303600609302...
I'm looking to add a tooltip to each row in a bound datagrid in vb.net winforms. How can this be done? I haven't tried this myself but I would give it a shot: ``` System.Windows.Forms.ToolTip formToolTip = new System.Windows.Forms.ToolTip(); formToolTip .SetToolTip(item, "Row Tooltip"); ``` Where `item` corresponds ...
[ 0.10452791303396225, -0.1832374483346939, 0.5822511911392212, -0.220224991440773, 0.15956449508666992, -0.21045710146427155, -0.041850775480270386, -0.35895872116088867, -0.19810202717781067, -0.8600835800170898, 0.155799001455307, 0.3768497407436371, -0.43461164832115173, -0.0008492101915...
I'm wondering what the best way is to have a "if all else fails catch it". I mean, you're handling as much exceptions as possible in your application, but still there are bound to be bugs, so I need to have something that catches all unhandled exceptions so I can collect information and store them in a database or sub...
[ 0.0091706532984972, 0.006979445926845074, 0.16265469789505005, 0.2184092402458191, 0.22700192034244537, -0.4801347851753235, 0.6134642958641052, -0.10350572317838669, -0.3842277526855469, -0.2272759974002838, -0.3850499093532562, 0.7216737866401672, -0.32597586512565613, -0.054365817457437...
of our users are still using Windows XP. I have just played with AppDomain's UnhandledException behavior, (this is the last stage the unhandled exception is registered at) Yes, after processing the event handlers your application will be terminated and the nasty "... program stopped working dialog" shown. :) You *sti...
[ 0.11612027883529663, -0.016714777797460556, 0.7091569900512695, -0.14374342560768127, 0.34761232137680054, -0.09939520806074142, 0.5962581634521484, -0.14683318138122559, -0.21145620942115784, -0.5402971506118774, -0.30024126172065735, 0.7044328451156616, -0.43806546926498413, 0.1546072661...
(new Thread(delegate() { throw new ArgumentException("ha-ha"); })).Start(); } while (Console.ReadLine().Trim().ToLowerInvariant() == "x"); Console.WriteLine("last good-bye"); } int r = 0; void CurrentDomain_UnhandledException(object sender, Unhandl...
[ -0.07880951464176178, -0.23254689574241638, 0.7316203713417053, -0.34390363097190857, 0.5274254083633423, 0.13397115468978882, 0.4921463429927826, -0.368727445602417, -0.17953547835350037, -0.2778480350971222, -0.3763674199581146, 0.3019375503063202, -0.1998765915632248, 0.7884320616722107...
Interlocked.Increment(ref r); Console.WriteLine("handled. {0}", r); Console.WriteLine("Terminating " + e.IsTerminating.ToString()); Thread.CurrentThread.IsBackground = true; Thread.CurrentThread.Name = "Dead thread"; while (true) Thread.Sleep(TimeSpan.Fr...
[ 0.28594574332237244, -0.1916094571352005, 0.48037853837013245, -0.38707974553108215, 0.6455462574958801, 0.2500251233577728, 0.40491783618927, -0.3149290084838867, -0.370686799287796, -0.3905416429042816, -0.19082996249198914, 0.5855045914649963, -0.48398357629776, 0.7900245785713196, -0...
{ Console.WriteLine("..."); (new Program()).Run(); } } ``` **P.S.** Do handle the unhandled for Application.ThreadException (WinForms) or DispatcherUnhandledException (WPF) at the higher level.
[ -0.01781506836414337, -0.19958935678005219, 0.4641202390193939, -0.1763274073600769, 0.16493649780750275, -0.07180047035217285, 0.2679905891418457, -0.2722267806529999, -0.13743893802165985, -0.4392094910144806, -0.3882899284362793, 0.5607523322105408, -0.2114088088274002, 0.23065738379955...
In C#, is it possible to extend a class that has no constructors? Maybe I'm thinking about this incorrectly and just need a kick in the crotch. I have a Silverlight class that extends System.Windows.Media.Transform, With the official release of Silverlight 2, Transform now has no constructor. So, when I compile my cla...
[ 0.3302694261074066, 0.004961858037859201, 0.44327712059020996, -0.23566904664039612, -0.18144994974136353, -0.23040562868118286, 0.42722365260124207, 0.15360082685947418, 0.01657979004085064, -0.47976815700531006, -0.30290380120277405, 0.682194709777832, -0.3711605668067932, 0.178042769432...
it yourself.
[ 0.46950918436050415, 0.09186942130327225, 0.043715715408325195, -0.016772955656051636, -0.022872179746627808, 0.29976776242256165, 0.33842790126800537, -0.20563742518424988, -0.11222320795059204, -0.2808428108692169, 0.06433583796024323, 0.5495620369911194, 0.0032598499674350023, 0.1302332...
My application uses an event tap to capture keyboard events, and I'd like to know which device (i.e. which keyboard) each event comes from. Is there an sort of device-identifying information along with the CGEvent that a tap gets? I've looked at NSEvent's methods, and the various CGEventField keys, but none of them see...
[ 0.02917247638106346, -0.49922969937324524, 0.42109936475753784, 0.2760886251926422, 0.037239234894514084, -0.2701251208782196, 0.15647545456886292, 0.1095481589436531, -0.22422416508197784, -0.3950243890285492, 0.25360068678855896, 0.7366040349006653, -0.4160752594470978, 0.005887496285140...
under Leopard, due to some security concerns at Apple regarding capturing an HID device, but if you're lucky it might provide you with what you need.
[ 0.11984185129404068, -0.3392049968242645, -0.13427598774433136, 0.05802277848124504, 0.14159920811653137, -0.21910637617111206, 0.5820328593254089, -0.19080258905887604, -0.48866742849349976, -0.05216527730226517, -0.13808825612068176, 0.11749672144651413, -0.3307701647281647, -0.471805214...
Could someone please explain the best way to connect to an Interbase 7.1 database using .NET/C#? The application will be installed on many end user computers so the less "add-ons" that I will have to package with my application the better. CodeGear offers a free ADO.NET 2.0 driver for registered users of InterBase her...
[ 0.41183796525001526, 0.08408521115779877, 0.5352638363838196, 0.1543484479188919, -0.12553127110004425, -0.37305644154548645, -0.018862126395106316, 0.10590564459562302, -0.06729218363761902, -0.42537903785705566, 0.3495875895023346, 0.7124475836753845, -0.34682926535606384, -0.08830200880...
not recommend using a driver designed for Firebird, as InterBase and Firebird have somewhat different SQL syntaxes, and differ in other features, as well. In particular, I think that using any driver dependent on fbclient.dll with InterBase is outright dangerous.
[ 0.11383292824029922, 0.325654536485672, -0.10580632835626602, 0.18541033565998077, -0.12485332041978836, -0.43658825755119324, 0.19643086194992065, 0.24622736871242523, 0.09077466279268265, -0.4899601936340332, 0.061144135892391205, 0.6634743213653564, -0.39035847783088684, 0.0316150747239...
I wanna get the Timedate value from another page using request.querystring and then use it an query to compare and pull up the matching datas. The function for the query in linq is: ``` protected void User_Querytime() { DataClasses2DataContext dc1 = new DataClasses2DataContext(); String Data = Request....
[ 0.704855740070343, -0.08453395217657089, 0.7738363742828369, 0.00027707015397027135, 0.5648479461669922, 0.007072981912642717, 0.17625820636749268, -0.2383667528629303, -0.0629708543419838, -0.41184717416763306, 0.016121191903948784, 0.5627076029777527, -0.3505764901638031, 0.3135612308979...
where u.TimeOfMessage = Data orderby u.TimeOfMessage descending select u; GridView1.DataSource = query7;
[ -0.5129377245903015, -0.5776228904724121, 0.6552456021308899, -0.27345970273017883, 0.14729619026184082, 0.2744002044200897, 0.1595139354467392, -0.15935362875461578, -0.11037750542163849, -0.7698195576667786, -0.3355235159397125, 0.30053865909576416, -0.32395294308662415, 0.25686118006706...
GridView1.DataBind(); } ``` Here the "Request.QueryString["TimeOfMessage"]" which i get is DateTime (ex:8/25/2008 9:07:19 AM). I wanted to compare it against the "u.TimeOfMessage" in database and pull up the matching records. When I use todatetime function to convert from string to datetime ,the value returned ...
[ 0.05358678847551346, -0.20250551402568817, 0.6069212555885315, -0.27947092056274414, 0.023874834179878235, -0.1291629523038864, 0.3184712827205658, -0.31947824358940125, -0.07946667075157166, -0.8584526181221008, 0.03578944131731987, 0.6816482543945312, -0.26924771070480347, 0.269683748483...
"when" in the query. I'm not sure the purpose of ordering by it if you know they are all equal, though... did I miss something? If the issue is that you want *only* the time part (not the date part), could you clarify that?
[ 0.2850998044013977, -0.06960363686084747, 0.08786401152610779, 0.09158618748188019, -0.012754811905324459, 0.04655252769589424, -0.23990657925605774, 0.1989719122648239, -0.23174665868282318, -0.4137040972709656, 0.055560704320669174, 0.202156662940979, -0.02255084365606308, 0.339350253343...
Is there a preference or behavior difference between using: ``` if(obj.getClass().isArray()) {} ``` and ``` if(obj instanceof Object[]) {} ``` ? In most cases, you should use the `instanceof` operator to test whether an object is an array. Generally, you test an object's type before downcasting to a particular t...
[ 0.1404649317264557, -0.025051899254322052, -0.10997170209884644, -0.10337574034929276, -0.1005948930978775, -0.07143540680408478, 0.3295283317565918, -0.371662437915802, -0.16673654317855835, -0.5088857412338257, -0.1483369767665863, 0.6038784980773926, -0.3923869729042053, -0.156607285141...
int[] array = (int[]) obj; /* Use the primitive array */ } else ... ``` At the JVM level, the `instanceof` operator translates to a specific ["instanceof"](http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc6.html#instanceof) byte code, which is optimized in most JVM implementations. In rar...
[ 0.03812692314386368, 0.008145507425069809, 0.22831791639328003, -0.22268183529376984, -0.3017045557498932, 0.023825889453291893, 0.3739176392555237, -0.37841689586639404, -0.10646603256464005, -0.5512282848358154, -0.12136836349964142, 0.5577149987220764, -0.46737968921661377, -0.195723846...
are two special cases: null references and references to primitive arrays. A null reference will cause `instanceof` to result `false`, while the `isArray` throws a `NullPointerException`. Applied to a primitive array, the `instanceof` yields `false` unless the component type on the right-hand operand exactly matches ...
[ -0.28773584961891174, 0.026809828355908394, -0.1725352257490158, -0.01810523308813572, 0.026494178920984268, -0.0529722198843956, 0.09411904960870743, -0.06952866166830063, 0.1605270653963089, -0.19172827899456024, -0.2316640168428421, 0.6996095180511475, -0.4257032871246338, 0.16801135241...
e.g, ``` foo1 foo2 foo10 foo100 ``` rather than ``` foo1 foo10 foo100 foo2 ``` Update: not interested in coding the sort myself (although that's interesting in its own right), but having the database to do the sort for me. You can use functions in your order-by clause. In this case, you can split the non-numeric ...
[ 0.2874044179916382, -0.09110569953918457, 0.08441101759672165, -0.08062712848186493, -0.17548002302646637, 0.3157414197921753, -0.05015714839100838, -0.32915806770324707, 0.0018295863410457969, -0.4585583209991455, -0.20484192669391632, 0.2988092601299286, -0.6848885416984558, -0.060084026...
to_number(regexp_substr(a, '[0-9]+$')), a); ```
[ 0.0557195208966732, 0.04002979397773743, 0.21683742105960846, -0.3574434816837311, 0.41550394892692566, 0.29829126596450806, 0.3158951997756958, -0.02982400357723236, -0.16348230838775635, -0.1332482397556305, -0.587287962436676, 0.5448625683784485, -0.6248811483383179, 0.30573713779449463...
Caution: This question is over nine years old! ---------------------------------------------- Your best option is to search for newer questions, or to search the answers below looking for your specific version of MVC, as many answers here are obsolete now. If you do find an answer that works for your version, please...
[ 0.11958303302526474, 0.28451085090637207, 0.3751789927482605, 0.3156367242336273, 0.43301957845687866, -0.37264347076416016, 0.22202511131763458, 0.1256466507911682, -0.27413398027420044, -0.4652251601219177, 0.172134131193161, 0.6070354580879211, 0.23366592824459076, 0.1390494555234909, ...
them. This says to me "form with checkboxes." My objects don't have any concept of "selected" (they're rudimentary POCO's formed by deserializing a wcf call). So, I do the following: ``` public class SampleObject{ public Guid Id {get;set;} public string Name {get;set;} } ``` In the view: ``` <% using (Html....
[ 0.004801154136657715, -0.1344679594039917, 0.8394243717193604, -0.01721780374646187, -0.03937789052724838, 0.22984503209590912, 0.06644104421138763, -0.6437835097312927, -0.31640487909317017, -0.7213736772537231, 0.006825026590377092, 0.5306525826454163, -0.3596538007259369, 0.146974369883...
x in result.AllKeys where result[x] != "false" select x; // yadda } ``` Its freaky in the first place, and secondly, for those items the user checked, the FormCollection lists its value as "true false" rather than just true. Obviously, I'm missing something. I think this is built with the idea...
[ 0.2409231960773468, -0.03503808751702309, 0.3550681173801422, 0.10434865206480026, -0.2042989879846573, -0.3268214464187622, 0.35863155126571655, -0.040900785475969315, -0.16396570205688477, -0.1712583750486374, -0.1764131784439087, 0.4697417616844177, -0.48682689666748047, 0.1944823712110...
that mean that this is the only way? Is there another way to do it? Html.CheckBox is doing something weird - if you view source on the resulting page, you'll see there's an `<input type="hidden" />` being generated alongside each checkbox, which explains the "true false" values you're seeing for each form element. Try...
[ 0.350599080324173, -0.2854791581630707, 0.5030028820037842, -0.030427614226937294, -0.16339555382728577, -0.21686378121376038, 0.2871331572532654, -0.13195092976093292, -0.08649467676877975, -0.7369922399520874, 0.09620371460914612, 0.41330409049987793, -0.373447984457016, 0.11695083230733...
%> <%}%> <input type="submit" value="Submit" /> <%}%> ``` Your checkboxes are all called `selectedObjects`, and the `value` of each checkbox is the GUID of the corresponding object. Then post to the following controller action (or something similar that does something useful instead of Response.Write()) ``` pub...
[ -0.13771983981132507, -0.4439721703529358, 0.4955849349498749, -0.09347755461931229, -0.11757700145244598, 0.12597842514514923, -0.0396091528236866, -0.41160646080970764, -0.20603050291538239, -0.686905026435852, -0.47141575813293457, 0.3609071969985962, -0.49969711899757385, -0.0564234778...
`Guid[] selectedObjects` parameter for you, and even parses the strings from the Request.Form collection into instantied GUID objects, which I think is rather nice.
[ -0.1510733813047409, -0.2383040487766266, 0.02595740556716919, 0.21952864527702332, -0.34993696212768555, -0.28714656829833984, 0.10267803072929382, 0.1280127316713333, -0.07701124995946884, -0.5915833115577698, -0.2381608933210373, 0.6295081973075867, -0.3569051921367645, -0.1534469574689...
I am trying to use log4net in an ASP.NET application with Visual Studio 2005. I have declared an instance of the logger like so: ``` Private Shared ReadOnly log As ILog = LogManager.GetLogger("") ``` I am trying to use it in the following manner: ``` If log.IsDebugEnabled Then log.Debug("Integration Services Con...
[ -0.035015564411878586, -0.129998579621315, 0.2521879971027374, -0.2811920642852783, -0.10582857578992844, 0.12730048596858978, 0.11389794945716858, -0.05374037101864815, -0.3209039866924286, -0.9152366518974304, 0.061159584671258926, 0.5136604309082031, -0.4046992361545563, -0.035253401845...
<appendToFile value="true"/> <rollingStyle value="Size"/> <maxSizeRollBackups value="10"/> <maximumFileSize value="1MB"/> <staticLogFileName value="true"/> <layout type="log4net.Layout.PatternLayout"> <conversionPattern value="%date [%thread] %-5level %logger [%proper...
[ 0.07282421737909317, -0.26263949275016785, 0.6314886212348938, -0.07236480712890625, 0.049214623868465424, 0.12792731821537018, 0.18534427881240845, -0.4870161712169647, -0.3794480562210083, -0.5649401545524597, -0.03857184201478958, 0.3475342392921448, -0.1894894391298294, 0.2408255338668...
<param name="LevelMax" value="FATAL" /> </filter> </appender> </log4net> ``` Unfortunately, `log.IsDebugEnabled` is always false. How do I configure log4net so that I can log only debug messages? Before calling LogManager.GetLogger("") You have to call log4net.Config.XmlConfigurator.Configure(); In...
[ 0.16184090077877045, -0.08628510683774948, 0.46575310826301575, 0.0407230481505394, -0.07187353819608688, -0.05359577387571335, 0.5634207725524902, -0.5440683960914612, -0.6379879117012024, -0.6107417941093445, -0.1498951017856598, 0.5525638461112976, -0.3446875214576721, 0.037057738751173...
Has anyone got much experience deploying applications to Amazons EC2? I am considering doing this in future and wonder about peoples experiences compared to shared hosting and dedicated server hosting are. So far, so good. Being able to turn on 5/10/50/100+ machines at a time is awesome. It's even better being able to ...
[ 0.591057538986206, 0.024198224768042564, 0.4215688705444336, 0.4846104681491852, 0.07250439375638962, -0.10490726679563522, 0.3619443476200104, 0.30556830763816833, -0.42383795976638794, -0.8262077569961548, 0.13164664804935455, 0.6951487064361572, 0.0899256020784378, 0.1723843216896057, ...
doing anything processor intensive, you need at least a m1.medium instance. It's all pretty new, so there aren't many tools to help out yet. I'm using [Puppet](http://reductivelabs.com/trac/puppet/) to configure my hosts and I have a set of PHP scripts for starting up clusters. I use LDAP as a host inventory database....
[ 0.4155731797218323, -0.2536832094192505, 0.18388229608535767, 0.18085931241512299, 0.05075221136212349, -0.2467915415763855, -0.09294403344392776, 0.21240611374378204, -0.31020933389663696, -1.1251064538955688, -0.0936330109834671, 0.6710537672042847, -0.25206103920936584, -0.2055156826972...
How do I enable double-buffering of a control using C# (Windows forms)? I have a panel control which I am drawing stuff into and also an owner-drawn tab control. Both suffer from flicker, so how can I enable double-buffering? In the constructor of your control, set the DoubleBuffered property, and/or ControlStyle appr...
[ 0.4833289682865143, -0.04480700567364693, 0.5732200741767883, -0.09785657376050949, 0.002911736723035574, 0.10275623202323914, 0.20033659040927887, -0.355523943901062, -0.13500559329986572, -0.49571847915649414, -0.0684238001704216, 0.5666831731796265, -0.39034122228622437, -0.250802963972...
ControlStyles.ContainerControl | ControlStyles.OptimizedDoubleBuffer | ControlStyles.SupportsTransparentBackColor , true); ```
[ -0.23450954258441925, -0.0998295396566391, 0.5599374771118164, 0.1321834772825241, 0.23921094834804535, -0.25847768783569336, 0.13861991465091705, -0.16465899348258972, -0.11238241195678711, -0.44460079073905945, -0.3428381085395813, 0.5815655589103699, -0.3884084224700928, 0.1037927716970...
Let's say I have the following code: ``` @sites = Site.find(session[:sites]) # will be an array of Site ids @languages = Language.for_sites(@sites) ``` for\_sites is a named\_scope in the Language model that returns the languages associated with those sites, and languages are associated with sites using has\_many th...
[ 0.12521201372146606, 0.4394623637199402, 0.014187649823725224, -0.1703861653804779, -0.17245185375213623, 0.025089964270591736, 0.5984508395195007, 0.23584626615047455, -0.04633045196533203, -0.792644739151001, 0.010644483380019665, 0.5413765907287598, -0.44831225275993347, 0.0837905928492...
scopes can extend the array object to have attributes, but unless I'm missing something that doesn't apply here. Any plugins that do this would be welcome, it doesn't have to be in core. You could extend the array returned by Site.find. ``` class Site def find(*args) result = super result.extend LanguageAggr...
[ 0.3367226719856262, -0.07794737070798874, 0.389535516500473, -0.15615130960941315, 0.15036436915397644, -0.1869576871395111, 0.3248310387134552, -0.4782998561859131, -0.1491326093673706, -0.6393639445304871, -0.23446112871170044, 0.7367028594017029, -0.40732795000076294, -0.036615110933780...
Can someone please let me know how to get the different segments of the three rows that are intersecting in different ways using SQL? The three rows in #t2 represent sets A,B, C - I am looking for A I B, A I C, B I C, A I B I C, A' , B', C' etc., (7 possible segments with 3 rows as in a Venn diagram) where I is the Int...
[ 0.18476252257823944, 0.2431982457637787, 0.6253354549407959, 0.17849943041801453, -0.010122984647750854, 0.44723573327064514, 0.25537851452827454, -0.23709192872047424, -0.428567111492157, -0.7507759928703308, 0.2685620188713074, 0.14591708779335022, -0.39498376846313477, 0.387462824583053...
Key1 there can be 1 or more Key2 go create table #t2 (row_id int identity(101, 1), key1 int) --row_id is the primary key go insert into #t1 select 1, 11 union select 1, 12 union select 1, 13 union select 1, 14 union select 2, 13 union select 2, 15 union select 2, 16 union select 2, 17 union select 3, 13 union selec...
[ -0.12864552438259125, -0.17500324547290802, 0.16680996119976044, 0.011594018898904324, 0.18517445027828217, 0.38338375091552734, -0.16887167096138, -0.36473241448402405, -0.01061992347240448, -0.637327253818512, -0.20524489879608154, 0.2009403556585312, -0.4915469288825989, 0.1629722714424...
End ``` The output I am looking for is, ``` 1001 11 (A') 1001 14 (A') 1002 12 (A I C - A I B I C) 1003 13 (A I B I C) 1004 15 (B') 1005 16 (B I C - A I B I C) 1005 17 (B I C - A I B I C) ``` The output has 5 segments, instead of the possible 7 as two of them are NULL. If I have understood the problem correc...
[ 0.05213645100593567, 0.4278804063796997, 0.4214426577091217, -0.26190927624702454, 0.11725487560033798, 0.3087962567806244, 0.4778209924697876, -0.47502872347831726, -0.13350047171115875, -0.43002286553382874, -0.054056279361248016, 0.2614315152168274, -0.2230852097272873, 0.27197849750518...
TABLE ( Key2 INT, Subset VARCHAR(1000) ) SET @Subset = '' SELECT @Key2 = MIN(Key2) FROM #t1 WHILE @Key2 IS NOT NULL BEGIN SELECT @Subset = @Subset + CAST(Key1 AS VARCHAR(10)) FROM #t1 WHERE Key2 = @Key2 INSERT INTO @tblResults (Key2, Subset) VALUES (@Key2, @Subset) SET @Subset = '' ...
[ -0.17224445939064026, 0.015004980377852917, 0.4338950514793396, -0.20851047337055206, 0.21347427368164062, 0.46157360076904297, -0.1674320101737976, -0.6827101111412048, -0.09708144515752792, -0.6448413729667664, -0.1550237089395523, 0.24262700974941254, -0.3047747313976288, -0.10290341824...
I have a script that needs to extract data temporarily to do extra operations on it, but then doesn't need to store it any further after the script has run. I currently have the data in question in a series of temporary local tables (CREATE TABLE #table), which are then dropped as their use is completed. I was consider...
[ -0.032719358801841736, 0.21466295421123505, 0.22429613769054413, 0.16349537670612335, 0.19882163405418396, 0.0036171881947666407, -0.032396819442510605, 0.0017554117366671562, -0.2875209450721741, -0.6453719735145569, -0.14355500042438507, 0.29146257042884827, 0.11952363699674606, 0.058559...
tables? From what I'm reading, temporary tables are just physical tables that only the session running the script can look at (cutting down on locking issues). EDIT: I should point out that I'm talking about physical tables vs. temporary tables. There is a lot of info available about temporary tables vs. table variabl...
[ -0.056582093238830566, 0.06876310706138611, 0.4967643618583679, 0.15198540687561035, -0.08513592928647995, 0.044017888605594635, -0.023383252322673798, 0.0368574857711792, -0.6122811436653137, -0.6197817921638489, -0.008212017826735973, 0.22396190464496613, -0.15363366901874542, 0.20770354...
operations will be slow on the lack of indexes. You CAN create indexes on temporary tables. But I will never recommend a temporary table for anything with a big amount of records. Your other approach: To create and then drop regular tables just creates the same overhead. Another approach: Using existing tables, augme...
[ -0.013024521991610527, -0.07689879089593887, 0.16006603837013245, 0.35363954305648804, 0.28998884558677673, -0.02367376536130905, 0.1854916661977768, -0.12068832665681839, -0.6673921942710876, -0.6505957245826721, -0.05827511474490166, 0.5876444578170776, -0.3542981445789337, 0.00974606070...
a way to maintain the table for those cases where a session ended prematurely and there are leftovers (rows that were not removed at the end of the processing). I recommend you to rethink your processing strategy. Some alternatives are as easy as using correlated queries, derived tables or table variables. Take a look...
[ 0.044897254556417465, -0.04785873368382454, 0.059713516384363174, 0.27986323833465576, -0.058831945061683655, -0.1111423522233963, 0.162421315908432, -0.1872701793909073, -0.4382685720920563, -0.5239555835723877, 0.08249717205762863, 0.4394388496875763, -0.07766283303499222, -0.02250979654...
to find alternate ways to proccess your data.
[ 0.44791772961616516, 0.1061091423034668, -0.06883621960878372, 0.48862943053245544, 0.2179669737815857, 0.03033258020877838, -0.034137193113565445, -0.063576839864254, 0.13525284826755524, -0.4577721953392029, -0.03951270133256912, 0.482153058052063, 0.05616158992052078, -0.233087405562400...
The subject doesn't say much cause it is not easy to question in one line. I have to execute a few programs which I read from the registry. I have to read from a field where somebody saves the whole paths and arguments. I've been using System.Diagnostics.ProcessStartInfo setting the name of the program and its argum...
[ 0.6109635829925537, 0.15143874287605286, 0.12173863500356674, 0.23057332634925842, -0.03674222528934479, 0.12516099214553833, 0.16141097247600555, -0.06938033550977707, -0.29947760701179504, -0.5962070822715759, 0.25049352645874023, 0.5573197603225708, 0.06424037367105484, 0.21817311644554...
same way as the poster above, using cmd.exe with process start info. ``` Process myProcess = New Process; myProcess.StartInfo.FileName = "cmd.exe"; myProcess.StartInfo.Arguments = "/C " + cmd; myProcess.StartInfo.WindowStyle = ProcessWindowStyle.Hidden; myProcess.StartInfo.CreateNoWindow = True; myProcess.Start(); myP...
[ 0.10343379527330399, 0.18211285769939423, 0.8543548583984375, -0.4599078297615051, 0.45482170581817627, 0.1726779341697693, 0.268734872341156, -0.0629456490278244, -0.26062265038490295, -0.5005848407745361, -0.5832706689834595, 0.436728835105896, -0.07440774887800217, 0.8373652100563049, ...
I'm creating a web application for work where the user has to enter the name of the person that requested the job. I'd like to create a simple AJAX auto-suggest dropdown so they don't need to type the entire name. On the backend, the database will provide suggestions based on previous entries. The website is built usin...
[ 0.4067923128604889, -0.129058837890625, 0.14867477118968964, 0.0813618078827858, -0.16374324262142181, 0.027558356523513794, 0.059823837131261826, -0.22260147333145142, -0.0025631156750023365, -0.7159136533737183, -0.11428706347942352, 0.4008156657218933, -0.21763496100902557, -0.349571347...
you go down to 'AJAX', you can see you can do something like this in your controller: ``` function autocomplete () { $this->set('people', $this->Person->findAll("name LIKE '%{$this->data['Person']['name']}%'") ); $this->layout = "ajax"; } ``` And in your `autocomplete.thtml` view, you would have: ``...
[ -0.4969329237937927, -0.3125675320625305, 0.28043416142463684, 0.09475316107273102, -0.028623444959521294, -0.11510291695594788, 0.02451629750430584, -0.18393252789974213, -0.2690804600715637, -0.9209444522857666, -0.12343218922615051, 0.6218335032463074, -0.10498077422380447, -0.073893159...
How can I comment a JSP expression like: `<%= map.size() %>` Is there something like `<%= // map.size() %>?` Pure JSP comments look like this: ``` <%-- Comment --%> ``` So if you want to retain the "`=`".you could do something like: ``` <%--= map.size() --%> ``` The key thing is that `<%=` defines the beginning ...
[ 0.47778746485710144, 0.05666602775454521, 0.34304046630859375, -0.09493328630924225, -0.454377681016922, -0.17371241748332977, -0.09376244992017746, -0.13231763243675232, -0.09326564520597458, -0.7299758195877075, -0.10741037130355835, 0.5022640228271484, -0.13211455941200256, -0.219320118...
lack of link targets, so I can't link you directly to the relevant section - boo!)
[ 0.5265344381332397, -0.02916899137198925, 0.4888184368610382, 0.20893926918506622, -0.14880536496639252, -0.20207315683364868, 0.4010041356086731, 0.22313052415847778, -0.35818901658058167, -0.22927574813365936, 0.02358623966574669, 0.18250812590122223, -0.3566070795059204, 0.2874730229377...
All the googling around hasn't found an answer for me yet... I have one of our devs that is using VSS and VS2005. Checking in works (abeit quite painfully across the 'Net) but there doesn't seem to be a way to put comments into a checkin (unless you embed it in the source file maybe?) I'll be one of the firs to admit t...
[ 0.5595768690109253, -0.03424502909183502, 0.6464452743530273, 0.25609147548675537, 0.03423419967293739, -0.012137207202613354, 0.2842113673686981, 0.23889002203941345, -0.36643776297569275, -0.5530822277069092, 0.36439797282218933, 0.4993334114551544, -0.19413915276527405, -0.0588186867535...
that exposes a comment box.
[ 0.5492083430290222, 0.4099498987197876, -0.07684897631406784, 0.07668011635541916, -0.1800343245267868, -0.3325732946395874, 0.1538752019405365, 0.233840674161911, -0.1494717299938202, -0.15285569429397583, -0.2028816044330597, 0.22503714263439178, -0.19517187774181366, 0.10208237916231155...
Are the .net classes relating to DbProviderFactory thread safe? When you say "These instances are generated once at run time, and used for the rest of the service's life", do you mean the connection object? Also, do you mean you're keeping the connection object open through out the life of your service? If your service...
[ 0.44256651401519775, -0.06918985396623611, 0.0569508820772171, 0.13266834616661072, -0.07789397239685059, -0.3800196051597595, 0.5088076591491699, 0.10416624695062637, -0.3409111797809601, -0.5662128925323486, -0.058679502457380295, 0.4185802936553955, -0.4894757568836212, 0.31574219465255...
treat the IDbConnection you get from the factory, instead of the factory itself. We use the DbProviderFactory very heavily for our multithreaded applications, which connect to Oracle, FoxPro and SqlServer and I haven't seen this issue. Good luck! Ricardo.
[ 0.3699389398097992, 0.11416308581829071, 0.20265673100948334, 0.2429061383008957, -0.04030957445502281, -0.3329576253890991, 0.22114965319633484, 0.33884483575820923, 0.06254725158214569, -0.28785479068756104, 0.4049952030181885, 0.9289976358413696, 0.2047598958015442, -0.06114856153726578...
I have a class with the following member functions: ``` /// caller pid virtual pid_t Pid() const = 0; /// physical memory size in KB virtual uint64_t Size() const = 0; /// resident memory for this process virtual uint64_t Rss() const = 0; /// cpu used by this process virtual double PercentCpu() const = 0; //...
[ -0.01011593360453844, -0.026258355006575584, 0.5382850170135498, 0.006500935181975365, 0.08998525887727737, 0.2646576464176178, 0.07890911400318146, -0.27860867977142334, -0.08929752558469772, -0.8712192177772522, 0.12939956784248352, 0.36954376101493835, -0.297262966632843, 0.509627163410...
calls have eluded me, aside from invoking a popen on ps or top and parsing the output - which isn't acceptable. Any help would be greatly appreciated. Requirements: Compiles on g++ 4.0 No obj-c OSX 10.5 Process info comes from `pidinfo`: ``` cristi:~ diciu$ grep proc_pidinfo /usr/include/libproc.h int proc_...
[ -0.22232967615127563, 0.3321811854839325, 0.5421137809753418, -0.07531711459159851, 0.11520382016897202, 0.21120239794254303, 0.36402595043182373, -0.2782268226146698, -0.13975544273853302, -0.4530724287033081, -0.45214027166366577, 0.7113015651702881, -0.5755288600921631, 0.05755655840039...
All these interfaces are version specific, so you need to take that into account when writing production code (libproc.h): ``` /* * This header file contains private interfaces to obtain process information. * These interfaces are subject to change in future releases. */ ```
[ 0.4611499607563019, 0.33768460154533386, 0.3410862386226654, -0.0694345086812973, 0.00681395223364234, -0.24372419714927673, 0.06461776793003082, 0.26833033561706543, -0.19645719230175018, -0.8095867037773132, -0.2601584196090698, 0.4667966067790985, -0.35196658968925476, 0.109179832041263...
So the [transparent background problem](https://stackoverflow.com/questions/214215/user-drawn-controls-are-using-the-previous-forms-background) is solved. Now, every time I show the form (or have to have it repainted), I get a lot of flickering. Is there any way I can not update the screen until the paint event is comp...
[ 0.3810042440891266, -0.1726892739534378, 0.6434969902038574, -0.04687785729765892, -0.08912412822246552, -0.0648219883441925, 0.24195319414138794, 0.04324070364236832, -0.42881062626838684, -0.6654377579689026, 0.2421092689037323, 0.33714741468429565, -0.13548269867897034, -0.1454288810491...
setting the [DoubleBuffered](https://stackoverflow.com/questions/220100/how-do-i-enable-double-buffering-of-a-control-using-c-window-forms) property for the form?
[ 0.4503321349620819, -0.06497475504875183, 0.5271419882774353, 0.12106698751449585, 0.11152271926403046, -0.3058805465698242, 0.15774516761302948, -0.39147666096687317, -0.01263828482478857, -0.10059386491775513, -0.22051654756069183, 0.3107202351093292, -0.5620180368423462, -0.310850113630...
I have just started migrating my homegrown persistence framework to JPA. Given that the persistence frameworks hide a lot of the plumbing, I'm interested in knowing if NOT closing EntityManagers will create a resource leak, or if the frameworks will collect and close them for me. I intend in all places to close them,...
[ 0.6410713791847229, 0.17236527800559998, 0.41107574105262756, 0.12430901825428009, 0.025574401021003723, -0.2538146376609802, 0.34410232305526733, 0.13493214547634125, -0.2125508040189743, -0.6994439959526062, 0.03491559252142906, 0.34358900785446167, -0.1464865654706955, 0.236924082040786...
you obtained it using dependency injection (eg using EJB and @PersistenceContext annotation) you should not close it by hand (AFAIK it will cause RuntimeException).
[ -0.04850747436285019, 0.006767236161977053, 0.3086576759815216, 0.041696202009916306, 0.3804650604724884, -0.3596270680427551, 0.45139995217323303, 0.08929358422756195, -0.03160526603460312, -0.575414776802063, -0.20056545734405518, 0.5371747016906738, -0.228805273771286, 0.250963240861892...
This is the exception that I'm getting when I'm trying to bind to a System.Type.Name. Here is what I'm doing: ``` this.propertyTypeBindingSource.DataSource = typeof(System.Type); /* snip */ this.nameTextBox1.DataBindings.Add( new System.Windows.Forms.Binding( "Text", this.propertyTypeBindingSou...
[ 0.19085383415222168, 0.10730631649494171, 0.45413926243782043, -0.284393310546875, 0.04364057257771492, -0.177688866853714, 0.4651526212692261, -0.492605596780777, -0.16474388539791107, -0.656209409236908, -0.17644289135932922, 0.6682284474372864, -0.4244716167449951, 0.1649555265903473, ...
this.StubPropertyTypeName = type.Name; } public string StubPropertyTypeName = string.Empty; } ``` created a binding source ``` this.propertyStubBindingSource.DataSource = typeof(StubPropertyType); ``` created an instance of the class and bound the textbox to it. ``` this.nameTextBox.DataBindings.Add( ...
[ 0.06625978648662567, 0.20706547796726227, 0.5805836915969849, -0.31709158420562744, 0.04304124042391777, 0.010014872066676617, 0.3416646420955658, -0.4020400643348694, 0.0772693008184433, -0.682415783405304, -0.4821436405181885, 0.5171064734458923, -0.46085816621780396, 0.283283531665802, ...
I have a web application that I'm writing (C#, MSSQL) and I need to store the timestamp when a record is stored in the system. Normally, I would just do this with SQL and the DATETIME function. However, the server is located in a different time zone than our company is located... AND we may change to another server in ...
[ 0.6339412331581116, 0.43192538619041443, 0.21515916287899017, 0.1803220510482788, 0.3657646179199219, -0.24272671341896057, 0.03330129757523537, 0.3322497010231018, -0.38533249497413635, -0.5903560519218445, 0.366955041885376, 0.1628502607345581, -0.08291313797235489, 0.41052761673927307, ...
store the date/time of the record update and what is the best way to present that date/time back to the user in our local time zone? I want the least messy way of doing this, so a combo of C# and SQL would be fine as long as the solution is easy to implement. (My normal style is to do more work in stored procedures an...
[ 0.5035382509231567, 0.06371573358774185, 0.23187711834907532, 0.37953415513038635, 0.24049045145511627, -0.16774563491344452, 0.0703117847442627, 0.20709095895290375, -0.237924262881279, -0.8656618595123291, 0.18521282076835632, 0.5014265775680542, -0.07338759303092957, -0.0957630276679992...
date math to always work * this allows transactions in different time zones to stay in synch * this allows you to move the data to a different server in a different time zone and not screw everything up * etc. "Universal" time, make sense? C# DateTime provides DateTime.UtcNow and ToLocalTime(), SQL provides GETUTCDATE...
[ 0.25732508301734924, -0.2950276732444763, 0.5531646609306335, -0.009821992367506027, 0.18482215702533722, 0.06911232322454453, 0.07666834443807602, -0.008953389711678028, -0.03688887879252434, -0.5643007755279541, -0.02427113614976406, 0.5952980518341064, -0.20477907359600067, 0.1141194403...
@dt END ``` example: ``` SELECT dbo.udfUtcToLocalTime(someDateTimeField) FROM someTable ```
[ 0.19721461832523346, -0.1005982831120491, 0.15794354677200317, -0.1416221261024475, -0.09030095487833023, -0.2946082353591919, 0.15658599138259888, 0.2468697726726532, 0.22620581090450287, -0.6299778819084167, -0.21272800862789154, 0.2947894334793091, -0.015142973512411118, 0.4238032698631...
How would I be able to programmatically search and replace some text in a large number of PDF files? I would like to remove a URL that has been added to a set of files. I have been able to remove the link using javascript under Batch Processing in Adobe Pro, but the link text remains. I have seen recommendations to use...
[ 0.14318515360355377, 0.229126438498497, 0.44761034846305847, 0.22099080681800842, -0.050978753715753555, -0.23913832008838654, 0.23121441900730133, -0.32793721556663513, 0.025834109634160995, -0.8097386360168457, -0.1272118091583252, 0.7441742420196533, -0.1333332061767578, 0.2130766361951...
may not be contiguous in the file. That said, [CAM::PDF](http://search.cpan.org/dist/CAM-PDF) has some search-replace capabilities and heuristics. Give [changepagestring.pl](http://search.cpan.org/dist/CAM-PDF/bin/changepagestring.pl) a try and see if it works on your PDFs. To install: ``` $ cpan install CAM::PDF #...
[ -0.19871443510055542, -0.1973196566104889, 0.7037790417671204, -0.033871766179800034, 0.06453440338373184, -0.2845240831375122, 0.0035870573483407497, -0.12119285762310028, -0.1210012212395668, -0.6786156892776489, -0.14735911786556244, 0.8103737235069275, -0.2053409367799759, 0.0691221207...
I've got the bare minimum to handle the Linux/MySQL parts of the stack, but I want to have a basic grasp of PHP before I dive in. I'll be working on WordPress plugins, in case there's anything specifically interesting for that. PS - any recommendations regarding recommended source control/IDEs would also be great, but...
[ 0.7627480626106262, -0.09492449462413788, 0.20875683426856995, 0.0519774928689003, -0.05965743213891983, -0.1394011527299881, 0.07830939441919327, 0.4298699200153351, -0.26311948895454407, -0.6585984230041504, 0.21000051498413086, 0.6024046540260315, 0.17698170244693756, -0.097430251538753...
Does anyone knows how to detect printable characters in java? After a while ( trial/error ) I get to this method: ``` public boolean isPrintableChar( char c ) { Character.UnicodeBlock block = Character.UnicodeBlock.of( c ); return (!Character.isISOControl(c)) && c != KeyEvent.CHAR_...
[ 0.011419258080422878, 0.30145126581192017, 0.2408594787120819, -0.19666682183742523, 0.14074386656284332, 0.034388281404972076, 0.3973052501678467, -0.25965484976768494, -0.09719407558441162, -0.528876781463623, 0.03970811516046524, 0.561253547668457, -0.28776809573173523, 0.02695222385227...
block != Character.UnicodeBlock.SPECIALS; } ``` I'm getting the input via KeyListener and come Ctr-'key' printed an square. With this function seems fairly enough. Am I missing some char here? It seems this was the "Font" independent way. ``` public boolean isPrintableChar( char c ) { Character.UnicodeBloc...
[ -0.007974812760949135, 0.24218031764030457, 0.4330158233642578, -0.21599163115024567, 0.15646331012248993, 0.21897614002227783, 0.3598422408103943, -0.4085165560245514, -0.04677072539925575, -0.49442988634109497, -0.3390324115753174, 0.5739522576332092, -0.43869301676750183, 0.053740039467...
block != Character.UnicodeBlock.SPECIALS; } ```
[ -0.06853924691677094, 0.24294479191303253, -0.013744652271270752, -0.29739701747894287, 0.03958051651716232, -0.04064124450087547, 0.182973712682724, -0.07338088005781174, -0.3029055893421173, -0.39912116527557373, -0.4868539273738861, 0.15038138628005981, -0.36515164375305176, 0.088589467...
In my app I've got a thread which displays for some time "please wait" dialog window, sometimes it is a very tiny amout of time and there is some glitch while drawing UI (I guess). I get the exception "Thread was being aborted" and completly have no idea how get rid of it. I mean Catch that exception in some way, or i...
[ 0.6467127799987793, -0.15734978020191193, 0.4325203597545624, 0.183648020029068, -0.04315594956278801, 0.13509143888950348, 0.37006551027297974, 0.36109524965286255, -0.29918327927589417, -0.7422725558280945, 0.16267722845077515, 0.15646541118621826, -0.36432945728302, 0.27916115522384644,...
call. I tried in various ways to catch that exception by side of code which starts and stops thread with dialog window but it seems that error apparently is by side some other thread which dispalys window in my newly created thread. Here is a code sample, part of static class with useful stuff, of course I don't say ...
[ 0.40893158316612244, -0.05318935588002205, 0.33769071102142334, -0.02095985785126686, 0.08771169185638428, -0.26098552346229553, 0.3610527217388153, 0.04338480904698372, -0.2287442535161972, -0.511441707611084, -0.005634161178022623, 0.8542159795761108, -0.4444500207901001, 0.2612021863460...
public static BusyIndicator bi = new BusyIndicator(""); public static Thread backgroundOpertionThread; public static void showBusy(bool isBusy, System.Windows.Forms.Form hostform, string message) { Common.busyMessage = message; if (isBusy) { Common.alreadyBusy = true; ...
[ 0.26729530096054077, -0.3418331742286682, 0.44611096382141113, -0.2440560758113861, 0.4621086120605469, 0.22732636332511902, 0.2699854075908661, 0.014007583260536194, -0.5708839297294617, -0.5758639574050903, -0.45608988404273987, 0.516655683517456, -0.5562601685523987, 0.5409008860588074,...
if (hostform != null) { hostform.Enabled = false; hostform.SuspendLayout(); } backgroundOpertionThread.Start(); } else
[ 0.21024587750434875, -0.4930812120437622, 0.5336164236068726, -0.28189224004745483, 0.37732651829719543, -0.06360434740781784, 0.5926907658576965, 0.04033735394477844, -0.4258755147457123, -0.30977165699005127, -0.41440871357917786, 0.517756998538971, -0.20768623054027557, 0.29340779781341...
{ backgroundOpertionThread.Abort(); Thread.Sleep(500); Common.alreadyBusy = false; if (hostform != null) { hostform.Enabled = true;
[ 0.31504350900650024, -0.3879362940788269, 0.4622974395751953, -0.415300190448761, 0.8020617365837097, 0.15364721417427063, 0.6583965420722961, 0.10823030024766922, -0.356193870306015, -0.5661012530326843, -0.2871001362800598, 0.5344066023826599, -0.15207473933696747, 0.40608012676239014, ...
hostform.ResumeLayout(); } } } public static void showBusy() { BusyIndicator bir = new BusyIndicator(Common.busyMessage); bir.ShowDialog(); } ``` Any ideas? Do **not** use Thread.Abort. This method is reserved for when the .NET runtime needs to forcibly kill thread...
[ 0.46007251739501953, -0.08663039654493332, 0.6350477933883667, -0.3518420159816742, 0.33360081911087036, -0.23026755452156067, 0.3364877700805664, 0.17385780811309814, -0.4843371510505676, -0.7046196460723877, -0.24205739796161652, 0.5268292427062988, -0.6203749179840088, 0.617679059505462...
an AppDomain and want to get rid of threads running in it first. To get rid of a thread, write it in cooperative mode. This means that the thread should periodically check some kind of flag, and if the flag is set, exit normally out of the thread method. To "kill" the thread, simply set the flag and wait for the threa...
[ -0.06322240084409714, -0.18287716805934906, 0.45943179726600647, 0.07883108407258987, 0.17314700782299042, -0.10407111048698425, 0.5091556906700134, -0.08862771838903427, -0.178822860121727, -0.53399258852005, -0.2847304344177246, 0.6079068779945374, -0.8514449000358582, 0.2430045604705810...
Could someone explain? I understand the basic concepts behind them but I often see them used interchangeably and I get confused. And now that we're here, how do they differ from a regular function? A **lambda** is just an anonymous function - a function defined with no name. In some languages, such as Scheme, they ar...
[ 0.16648849844932556, 0.15105003118515015, 0.03532492741942406, -0.030470529571175575, -0.2522856891155243, 0.1002977192401886, 0.12392090260982513, 0.1498582661151886, -0.1687692403793335, -0.20399554073810577, -0.1799234300851822, 0.2993428707122803, -0.5472008585929871, 0.229726850986480...
over** the **environment** in which it was defined. This means that it can access variables not in its parameter list. Examples: ``` def func(): return h def anotherfunc(h): return func() ``` This will cause an error, because `func` does not **close over** the environment in `anotherfunc` - `h` is undefined. `fun...
[ -0.2384176403284073, 0.1455591768026352, 0.29779863357543945, -0.15350982546806335, 0.016932636499404907, -0.3654978275299072, 0.2332523614168167, -0.02074762061238289, -0.280685156583786, -0.614052951335907, -0.31449493765830994, 0.4971939027309418, -0.579518735408783, 0.15200406312942505...
it **closes over** `anotherfunc`'s environment and can access variables inside of it. In Python 3.1+, mutation works too when using [the `nonlocal` keyword](http://docs.python.org/release/3.1.3/reference/simple_stmts.html#nonlocal). Another important point - `func` will continue to close over `anotherfunc`'s environme...
[ -0.30840420722961426, -0.1388837993144989, 0.2798711657524109, -0.44449928402900696, -0.1001177430152893, -0.050551898777484894, 0.23807083070278168, -0.04843650385737419, -0.1722303032875061, -0.7352803945541382, -0.2591463029384613, 0.5953185558319092, -0.44516459107398987, 0.04855348914...
How can I detect keyboard event in C language without using third party libraries? Should I use signal handling? There's not a standard way, but these should get you started. Windows: ``` getch(); ``` Unix: Use this code from W. Richard Stevens' Unix Programming book to set your terminal in raw mode, and then use ...
[ -0.2145264446735382, -0.3465806841850281, 0.5887705683708191, -0.1989942491054535, 0.1421092450618744, -0.12616047263145447, 0.22730377316474915, -0.01589133031666279, 0.02452217973768711, -0.8312917351722717, -0.24091358482837677, 0.8661763668060303, -0.22022593021392822, -0.0603143349289...
original state */ return -1; buf = save_termios; buf.c_lflag &= ~(ECHO | ICANON | IEXTEN | ISIG); /* echo off, canonical mode off, extended input processing off, signal chars off */ buf.c_iflag &= ~(BRKINT | ICRNL | ISTRIP | IXON);
[ -0.16991153359413147, -0.4312134087085724, 0.33831390738487244, -0.1323111206293106, 0.020777372643351555, 0.2844105064868927, 0.5546925663948059, -0.23415561020374298, 0.00719286547973752, -0.265228807926178, -0.43178293108940125, 0.2765214741230011, -0.5363718867301941, 0.359316051006317...
/* no SIGINT on BREAK, CR-toNL off, input parity check off, don't strip the 8th bit on input, ouput flow control off */ buf.c_cflag &= ~(CSIZE | PARENB);
[ 0.10087157040834427, 0.04523661360144615, 0.2510950565338135, -0.2877925634384155, 0.20208097994327545, 0.267167329788208, 0.5155614018440247, 0.2317964732646942, -0.056764744222164154, -0.25427666306495667, -0.5197656750679016, 0.4780229330062866, -0.26371532678604126, 0.00558450957760214...
/* clear size bits, parity checking off */ buf.c_cflag |= CS8; /* set 8 bits/char */ buf.c_oflag &= ~(OPOST); /* output processing off */ buf.c_cc[VMIN] = 1; /* 1 byte at a time */ buf.c_cc[VTIME] = 0; /* no
[ 0.04907964542508125, -0.07863815873861313, 0.550895094871521, -0.10961050540208817, 0.13879944384098053, 0.28940221667289734, 0.28945687413215637, -0.2968427538871765, -0.5222623944282532, -0.3688465356826782, -0.408216655254364, 0.4239468574523926, -0.17192202806472778, 0.0673816353082656...
timer on input */ if (tcsetattr(fd, TCSAFLUSH, &buf) < 0) return -1; term_saved = 1; return 0; } int tty_reset(int fd) { /* set it to normal! */ if (term_saved) if (tcsetattr(fd, TCSAFLUSH, &save_termios) < 0) return -1; return 0; } ```
[ 0.3175240755081177, -0.4223394989967346, 0.7090562582015991, -0.40308353304862976, 0.1869986206293106, 0.13958963751792908, 0.3173467814922333, -0.46922242641448975, -0.08625568449497223, -0.48857277631759644, -0.18840429186820984, 0.9262787699699402, -0.4006052017211914, 0.175273016095161...
What is the best way to deal with XML documents, XSD etc in C# 2.0? Which classes to use etc. What are the best practices of parsing and making XML documents etc. EDIT: .Net 3.5 suggestions are also welcome. The primary means of reading and writing in C# 2.0 is done through the **XmlDocument** class. You can load m...
[ 0.28847774863243103, 0.3460806608200073, 0.6569797992706299, 0.2122427225112915, 0.05972864851355553, -0.2676772177219391, 0.039293378591537476, -0.2626436650753021, 0.0044058687053620815, -1.0009502172470093, -0.36208319664001465, 0.7665484547615051, 0.005141167435795069, -0.4937020540237...