text
stringlengths
0
30.5k
title
stringclasses
1 value
embeddings
listlengths
768
768
>` IE was freaking out about the blank src attribute and hitting the server root and the defaulting to page main. I don't fully understand the mechanics happening here. I also don't understand if this is how IE is supposed to behave (it is a malformed img tag after all) or not. Is this a bug?
[ 0.6793201565742493, 0.5382052063941956, 0.3216921389102936, -0.2465876340866089, -0.3050914704799652, -0.34627896547317505, 0.49694371223449707, 0.4952436685562134, 0.08067430555820465, -0.6993994116783142, -0.004514443222433329, 0.46365058422088623, -0.2717476785182953, 0.4803374409675598...
I'm programming a class that implements the observable pattern (not the interface) and I'm thinking about whether or not the copy constructor should also copy the listeners. On the one hand the copy constructor should create an instance that is as close as possible to the original instance so that it can be swapped ou...
[ 0.8023006916046143, 0.05366091430187225, 0.10978084057569504, 0.29980093240737915, -0.10657468438148499, 0.10409753769636154, 0.3474027216434479, -0.004172411281615496, -0.19036124646663666, -0.7139838933944702, 0.31480538845062256, 0.8301032781600952, -0.4155817925930023, 0.05879624933004...
will know nothing about the new object. 2. Have the new object add itself to the list of things the old observers are observing. The existing observers will respond to the new object as they did the old. 3. Create new observers that observe the new object, as the old ones did the old object. The new observers will resp...
[ 0.6531055569648743, 0.016132090240716934, 0.677245557308197, 0.42996060848236084, -0.020024502649903297, -0.17015118896961212, 0.36560380458831787, -0.12205306440591812, -0.3493560552597046, -0.5944298505783081, -0.1523611694574356, 0.5988116264343262, -0.4347670376300812, 0.17756797373294...
the observers are **always** created/copied. Doing nothing allows for observers to be added later if necessary. However it is possible to imagine cases where the other options are right. If you want an observer that responds to *any* instance of a given class, no matter how created, then 2) is right. If your observer ...
[ 0.5562201142311096, -0.14177030324935913, 0.11130088567733765, 0.5751017928123474, -0.1872013807296753, -0.032374732196331024, 0.18471559882164001, -0.07089579850435257, -0.3288746774196625, -0.64577317237854, 0.039540160447359085, 0.46683841943740845, -0.6038541197776794, 0.11786518990993...
the owner. And if you simply don't know what you want to happen, choose 1) and add the observers later.
[ 0.35786721110343933, -0.13638663291931152, 0.3012223541736603, 0.35063350200653076, -0.02156059816479683, -0.18588608503341675, -0.1969257891178131, -0.03762819617986679, -0.035476941615343094, -0.4386959969997406, -0.22960264980793, 0.8333744406700134, -0.4869654178619385, -0.005125243682...
I am trying to write a C++ program that takes the following inputs from the user to construct rectangles (between 2 and 5): height, width, x-pos, y-pos. All of these rectangles will exist parallel to the x and the y axis, that is all of their edges will have slopes of 0 or infinity. I've tried to implement what is men...
[ -0.04503900185227394, 0.11947186291217804, 0.5395374298095703, -0.027638476341962814, -0.23413938283920288, 0.34868124127388, -0.07295745611190796, -0.5471891760826111, -0.3406214118003845, -0.4525558352470398, -0.005843054037541151, 0.13800261914730072, -0.1917893886566162, 0.069077111780...
so on... // Gets all the vertices for Rectangle 2 and stores them in an array -> arrRect2 // rotated edge of point a, rect 1 int rot_x, rot_y; rot_x = -arrRect1[3]; rot_y = arrRect1[2]; // point on rotated edge int pnt_x, pnt_y; pnt_x = arrRect1[2]; pnt_y = arrRect1[3]; // test point, a from rect 2 int tst_x, tst_y; ...
[ -0.012108854949474335, 0.04231524467468262, 0.335637629032135, -0.08774488419294357, -0.1142604798078537, 0.3795391321182251, 0.1746440976858139, -0.535365641117096, -0.13861092925071716, -0.6891179084777832, -0.31926530599594116, 0.09518539160490036, -0.3607514202594757, 0.026543676853179...
&& RectA.Right > RectB.Left && RectA.Top > RectB.Bottom && RectA.Bottom < RectB.Top ) ``` or, using Cartesian coordinates (With X1 being left coord, X2 being right coord, **increasing from left to right** and Y1 being Top coord, and Y2 being Bottom coord, **increasing from bottom to top** -- if this is not ho...
[ -0.15877746045589447, 0.048480886965990067, 0.639981746673584, 0.07264839112758636, 0.05393514037132263, 0.13573575019836426, 0.0830298513174057, -0.41513487696647644, -0.1672467589378357, -0.3834393322467804, -0.10608131438493729, 0.3970221281051636, 0.011130528524518013, 0.05921949073672...
by contradiction. Any one of four conditions guarantees that **no overlap can exist**: * Cond1. If A's left edge is to the right of the B's right edge, - then A is Totally to right Of B * Cond2. If A's right edge is to the left of the B's left edge, - then A is Totally to left Of B * Cond3. If A's top edge is below ...
[ -0.18467657268047333, 0.251092791557312, 0.42100900411605835, -0.3017081320285797, -0.2726361155509949, -0.22764518857002258, 0.24012799561023712, -0.4459421932697296, -0.5529534220695496, -0.4141700863838196, -0.47610655426979065, 0.21630285680294037, -0.28528282046318054, 0.0141815841197...
Or Cond2 Or Cond3 Or Cond4 ``` Therefore, a sufficient condition for Overlap is the opposite. ``` Overlap => NOT (Cond1 Or Cond2 Or Cond3 Or Cond4) ``` De Morgan's law says `Not (A or B or C or D)` is the same as `Not A And Not B And Not C And Not D` so using De Morgan, we have ``` Not Cond1 And Not Cond2 An...
[ -0.20349158346652985, 0.20271393656730652, 0.19077521562576294, -0.4494246542453766, -0.017031215131282806, -0.06259187310934067, 0.031937796622514725, -0.5606001615524292, -0.4865729510784149, -0.3231450617313385, -0.3866237998008728, 0.4208381772041321, -0.3976585865020752, 0.08957367390...
B's bottom, [`RectA.Top > RectB.Bottom`], and * A's bottom below B's Top [`RectA.Bottom < RectB.Top`] **Note 1**: It is fairly obvious this same principle can be extended to any number of dimensions. **Note 2**: It should also be fairly obvious to count overlaps of just one pixel, change the `<` and/or the `>` on t...
[ 0.15770094096660614, -0.08699241280555725, 0.534460186958313, -0.02560068480670452, -0.03832028806209564, 0.014768845401704311, -0.09242613613605499, -0.43133997917175293, -0.18401487171649933, -0.6141539812088013, -0.06549417227506638, 0.16187100112438202, -0.46514496207237244, -0.1320592...
(e.g., increasing Y from top to bottom, or X From right to left), the syntax will need to be adjusted accordingly/
[ 0.12793031334877014, 0.03296366333961487, 0.20127329230308533, -0.05799597501754761, -0.13598453998565674, 0.200647234916687, 0.2887270450592041, -0.006904586683958769, 0.036164309829473495, -0.7128518223762512, -0.49761703610420227, 0.4164673089981079, -0.0957200676202774, -0.218337491154...
Delegates look like such a powerful language feature, but I've yet to find an opportunity to use them in anger (apart from in DALs I must say). How often do you use them, and under what circumstances do you find them most useful? Funcs and Actions are newish "types" of delegates and I use them a lot with Linq and real...
[ 0.24938257038593292, 0.08125882595777512, 0.31688013672828674, 0.3587721288204193, -0.4644276201725006, -0.2096489667892456, -0.10933814197778702, -0.29242709279060364, -0.39014890789985657, -0.40509676933288574, -0.014177191071212292, 0.38840246200561523, -0.012940438464283943, -0.0407005...
times where I find myself repeating a certain lambda expressions a couple times in a class, so personally I think Funcs work well for that. Another situation is a, for lack of a better term, Method Factory. Basically it is a dictionary that holds a list of Actions as the value and say an Enum as the key: ``` Dictiona...
[ 0.39093923568725586, -0.030826276168227196, 0.2673966586589813, -0.026202967390418053, -0.22383281588554382, 0.23130589723587036, 0.3022494316101074, -0.2994208037853241, -0.16596189141273499, -0.48227569460868835, -0.1367870271205902, 0.36030474305152893, -0.2944332957267761, -0.197529003...
better uses for delegates, but these are useful.
[ 0.14036685228347778, 0.10866020619869232, -0.11375533044338226, 0.4048120677471161, 0.1423131376504898, -0.2185821831226349, -0.19799771904945374, -0.13290444016456604, -0.4361976683139801, -0.4545212388038635, -0.14004068076610565, 0.2586098313331604, 0.04799573868513107, -0.0767034813761...
How do I retrieve an item at random from the following list? ``` foo = ['a', 'b', 'c', 'd', 'e'] ``` Use [`random.choice()`](https://docs.python.org/library/random.html#random.choice): ``` import random foo = ['a', 'b', 'c', 'd', 'e'] print(random.choice(foo)) ``` For [cryptographically secure](https://en.wikiped...
[ 0.17158883810043335, 0.02502097561955452, 0.041063740849494934, 0.1786719709634781, -0.09250786900520325, 0.05821274593472481, -0.2891996502876282, -0.42242634296417236, -0.29095014929771423, -0.19516505300998688, -0.310323029756546, 0.43552741408348083, -0.14606882631778717, 0.02180145867...
I'm using [Interop.Domino.dll](http://www.codeproject.com/KB/cs/lotusnoteintegrator.aspx) to retrieve E-mails from a Lotus "Database" (Term used loosely). I'm having some difficulty in retrieving certain fields and wonder how to do this properly. I've been using `NotesDocument.GetFirstItem` to retrieve Subject, From an...
[ 0.25381574034690857, 0.15322639048099518, 0.09779928624629974, 0.027915120124816895, -0.14402984082698822, 0.07107420265674591, 0.02095225267112255, -0.2307327389717102, -0.1986779421567917, -0.5415963530540466, 0.0627855435013771, -0.07347992062568665, 0.05558794364333153, -0.042603656649...
aren't where I expect them. Related code: ``` string ActualSubject = nDoc.GetFirstItem("Subject").Text, ActualFrom = nDoc.GetFirstItem("From").Text, ActualBody = nDoc.GetFirstItem("Body").Text; ``` Hah, got it! ``` Object[] ni = (Object[])nDoc.Items; string names_values = ""; for (int x = 0; x < ni.Length; x...
[ 0.11530771106481552, 0.12854574620723724, 0.9275630712509155, 0.09985794872045517, 0.15310357511043549, 0.17768551409244537, 0.06370529532432556, -0.21459287405014038, -0.13564984500408173, -0.16767844557762146, -0.43594682216644287, 0.43908607959747314, 0.10490197688341141, 0.182894200086...
Wed, 19 Nov 2008 17:34:31 -0500 1: Received from example.com ([192.168.0.2]) by host2.example.com (Lotus Domino Release 6.5.4 HF182) with ESMTP id 2008111917343129-205078 ; Wed, 19 Nov 2008 17:34:31 -0500 2: X_PGRTRKID 130057945714t 3: X_PGRSRC IE 4: ReplyTo "example" <name...
[ -0.2335563749074936, 0.47153908014297485, 0.47142982482910156, -0.0011211854871362448, -0.0786830261349678, 0.3732141852378845, 0.09922365844249725, -0.10399022698402405, -0.21645314991474152, -0.09619506448507309, -0.10985391587018967, 0.3589331805706024, -0.23596520721912384, 0.374347358...
"IE130057945714t"<service@test.email.example.com> 7: SendTo me@example.com 8: Subject (Message subject redacted) 9: PostedDate 11/19/2008 03:34:15 PM 10: MIME_Version 1.0 11: $Mailer SMTP DirectMail 12: $MIMETrack Itemize by SMTP Server on xxxPT02-CORP/example(Release 6.5.4 HF182|May 31...
[ -0.3804361820220947, -0.04857492819428444, 0.5676597356796265, -0.019579974934458733, -0.2683255970478058, 0.14445436000823975, 0.9663161039352417, -0.25239187479019165, -0.06920107454061508, -0.4058406949043274, -0.301067590713501, 0.2132757008075714, -0.504672646522522, 0.168569013476371...
PM;MIME-CD complete at 11/19/2008 05:34:32 PM;Itemize by Router on camp-db-05/example(Release 7.0.2 HF76|November 03, 2006) at 11/19/2008 05:34:32 PM;MIME-CD by Notes Client on MyName/Guest/example(Release 6.5.6|March 06, 2007) at 11/20/2008 12:46:25 PM;MIME-CD complete at 11/20/2008 12:46:25 PM 13: Form Memo 14...
[ -0.5005252361297607, 0.2506556510925293, 0.5397326946258545, -0.0030613760463893414, 0.08726811408996582, 0.23116955161094666, 0.5917536020278931, -0.3596757650375366, -0.24871830642223358, -0.3275465667247772, -0.4451935291290283, 0.45974835753440857, -0.1308303326368332, 0.09987463057041...
21: $Revisions 22: DeliveredDate 11/19/2008 03:34:32 PM 23: Body []exampleexample ``` Now, who can tell me why the Body keeps getting messed up?
[ 0.2876625955104828, 0.4984346628189087, 1.1175892353057861, 0.17318344116210938, -0.009117315523326397, 0.12462446838617325, 0.3333154022693634, -0.29804959893226624, -0.040897615253925323, -0.2865240275859833, 0.23347175121307373, 0.34163790941238403, 0.2712155878543854, 0.094693541526794...
I'm trying to understand how you are supposed to add page numbers to the bottom of each page using ActiveReports3. E.g. Page 1 of 10. Thanks, Mo Use the "ReportInfo" control and set the "FormatString" property.
[ 0.4358952045440674, 0.09500519931316376, 0.27529653906822205, 0.27938154339790344, -0.1460685133934021, -0.5769404172897339, 0.17346641421318054, 0.1221265196800232, -0.32167166471481323, -0.7448839545249939, 0.050654906779527664, 0.6174815893173218, -0.32453176379203796, -0.24813038110733...
I'm trying to figure out how to write this function: ``` template <typename Bound> Bound::result_type callFromAnyList(Bound b, list<any> p) { } ``` Then, if I had some function: ``` double myFunc(string s, int i) { return -3.0; } ``` I could call it by doing something like this: ``` list<any> p; p.push_back(...
[ -0.019177688285708427, -0.08028576523065567, 0.6516358852386475, -0.19404584169387817, -0.15195704996585846, -0.07173259556293488, 0.3262447416782379, -0.627767026424408, -0.12117934226989746, -0.5416860580444336, 0.06657629460096359, 0.7143082618713379, -0.261971652507782, 0.0701356902718...
in mind. As you updated your concerns in the comment sections, here the answer. Just getting the return type of a function is possible: ``` template<typename> struct return_of; template<typename R> struct return_of<R(*)()> { typedef R type; }; template<typename R, typename P1> struct return_of<R(*)(P1)> { ty...
[ -0.2311803549528122, 0.19002649188041687, 0.5341113209724426, -0.2194904386997223, -0.00504280673339963, 0.22089606523513794, -0.010167822241783142, -0.6624457836151123, -0.1848696917295456, -0.3422631025314331, -0.22940409183502197, 0.876958429813385, -0.465412437915802, -0.18589560687541...
I am porting an existing application to C# and want to improve performance wherever possible. Many existing loop counters and array references are defined as System.UInt32, instead of the Int32 I would have used. Is there any significant performance difference for using UInt32 vs Int32? I don't think there are any per...
[ 0.2572149336338043, 0.24440033733844757, 0.22418083250522614, -0.12939408421516418, 0.013649234548211098, -0.2569645941257477, 0.26150044798851013, 0.22568456828594208, -0.19469518959522247, -0.6448699235916138, -0.030327431857585907, 0.5352166891098022, -0.4931284189224243, 0.157771944999...
I have a relatively simple site that I'm working up for an intranet environment. The pages have a hook to display a simple bit of text (possibly with a bit of HTML for markup purposes) for help when the user clicks a link on the page. I'm debating whether to put the help snippets in their own XML file or create a secti...
[ 0.6113472580909729, 0.16194893419742584, 0.4139906167984009, 0.01657291315495968, 0.11386614292860031, -0.17727124691009521, -0.03569978475570679, 0.12403981387615204, -0.2496686726808548, -0.5238337516784668, 0.04199855029582977, 0.31494012475013733, 0.0055533102713525295, 0.0579927302896...
would be the best place to locate it? I'd rather it weren't easily web-accessible, so although root or some folder is an option, I'm wondering if there is a more "standard" location for files like this, `App_LocalResources` perhaps? Any feedback would be welcome. Thanks. --- I will look at these options. I don't anti...
[ 0.49627071619033813, 0.03473826125264168, 0.17670977115631104, 0.39221400022506714, 0.23856104910373688, -0.20289133489131927, 0.2059621661901474, 0.355946809053421, -0.28424012660980225, -0.816184937953949, -0.04755372554063797, 0.40852171182632446, 0.2439182549715042, -0.0304680895060300...
the file. Thanks all! Sounds like a perfect candidate for resx (resource) files in the App\_GlobalResources folder. Those are easily editable and posted to a site without any restarts.
[ 0.31947627663612366, 0.0011715940199792385, 0.5851411819458008, 0.48486512899398804, 0.13307397067546844, -0.2591998875141144, 0.3653557598590851, 0.49307629466056824, -0.32073357701301575, -0.6789944767951965, -0.31675660610198975, 0.4885339140892029, 0.16893821954727173, 0.18470011651515...
**Given:** Constructing an ADO Connection object from one thread and giving it to another thread is ***forbidden***. The two threads are different apartments, and even though the first thread will **never** touch it again (not even maintain a reference to it!), it doesn't matter. That ADO Connection object was create...
[ 0.3058936595916748, 0.16821908950805664, 0.695899486541748, 0.06449519842863083, 0.1315351128578186, -0.33574816584587097, 0.20457255840301514, 0.15730930864810944, -0.09460331499576569, -0.6674032211303711, -0.30509841442108154, 0.1648356318473816, -0.6256067752838135, 0.6594273447990417,...
in the SDK says: > **Thread Safety** > > Any public **static** members of > this type are thread safe. Any > instance members are not guaranteed to > be thread safe. i understand that **not thread-safe** means that i have to synchronize access to the object if i am going to access it from different threads. T...
[ 0.3329310119152069, 0.09647341072559357, 0.38491442799568176, -0.00522147910669446, -0.047043003141880035, -0.4901049733161926, 0.16683125495910645, -0.16632771492004395, -0.246869757771492, -0.8537837862968445, -0.3673628568649292, 0.3340357840061188, -0.35668718814849854, 0.2076136469841...
the object has been constructed on one apartment, you are ***forbidden*** from accessing it from another apartment - no matter how much you protect that object from multiple simultaneous thread access. Does a similar concept exist in .NET? --- More Information ---------------- i know you are forbidden from accessi...
[ 0.310884565114975, -0.011860327795147896, 0.21575646102428436, 0.2589898407459259, 0.06734037399291992, -0.2589831054210663, 0.3365210294723511, -0.16019079089164734, -0.3754972219467163, -0.5855259299278259, -0.19829191267490387, 0.21788084506988525, -0.3494291603565216, 0.328028172254562...
been created. Calling CreateGraphics > before the control's handle has been > created on a background thread can > cause illegal cross thread calls. There is no mention of Controls throwing exceptions when you create and use them from a single thread - when that thread is not the first thread that was created when ...
[ 0.1661403924226761, 0.057077426463365555, 0.3742055594921112, 0.12929201126098633, 0.10561417788267136, -0.18918079137802124, 0.3633706569671631, -0.04068348929286003, -0.43207383155822754, -0.6942696571350098, -0.07502518594264984, 0.27780482172966003, -0.5635563731193542, 0.1467360258102...
two threads are allowed to talk to it? --- The same goes for: ``` List<Object> sharedList = new List<Object>(); ``` Two threads can talk to the list, as long as they don't do it simultaneously, usually with: ``` lock (sharedList) { sharedList.Add(data); } ``` are two threads allowed to touch the same object...
[ -0.09801013767719269, -0.28866884112358093, 0.5279682874679565, 0.06296617537736893, -0.04738737270236015, -0.04645010828971863, 0.08423303812742233, -0.07433344423770905, -0.258170485496521, -0.8263750076293945, -0.14812009036540985, 0.6775272488594055, -0.5400282740592957, 0.095161370933...
existing DB transaction Bitmap thumb = EndGetImageNumbthail(ar); ``` --- Rather than answering the question, people went off on a discussion about design patterns in ADO.NET. Please answer the question. Ignore the examples if they confuse and distract your squirrel brains. SHOOTING for the bounty! Okay, some classe...
[ 0.8599840998649597, 0.17819198966026306, 0.12370651215314865, 0.22502373158931732, -0.22999286651611328, -0.33782118558883667, 0.19365346431732178, -0.13441374897956848, -0.4483495056629181, -0.5206580758094788, 0.30784472823143005, 0.35630112886428833, -0.5252733826637268, 0.2366526126861...
facilities in the framework that makes this easy, other than those for UI components tracking the UI thread. That support framework is probably buried deep within the UI stack; I've never seen it in any MSDN docs. What IS more common is setting the thread apartment. Lots of parts of the entire framework are restricted...
[ 0.01533142477273941, 0.2001570463180542, 0.3650539517402649, 0.18878737092018127, -0.04305218160152435, -0.2388160228729248, 0.2441880702972412, 0.16847412288188934, -0.2733747363090515, -0.8424538373947144, -0.2827717363834381, 0.19562405347824097, -0.26204028725624084, 0.1544724404811859...
UI component can only be touched within the same thread they are created, the UI thread. Interestingly, the XamlReader in WPF is aware of the current thread apartment and won't even deserialize UI components unless the thread its running in is an STA thread. "Does a standard POCO have thread affinity or care if its in...
[ -0.17424683272838593, -0.06907714903354645, 0.679530143737793, 0.2533380687236786, -0.012070048600435257, -0.4295092523097992, 0.11932013183832169, -0.09294550120830536, -0.2517174184322357, -0.7218790054321289, -0.21391040086746216, 0.17151035368442535, -0.20977912843227386, 0.17048174142...
an ADO.NET object have thread affinity, and is it apartment aware?" Well, a DbConnection extends from Component, which extends MarshalByRefObject. Component, MBRO, DbConnection and its descendents (i.e., SqlConnection) contain no methods that are marked with the STAThreadAttribute. A quick check of their major depend...
[ 0.15674664080142975, -0.04422358050942421, 0.43306630849838257, 0.22303873300552368, -0.2856570780277252, -0.13818611204624176, 0.2827318608760834, -0.46365252137184143, 0.05239236354827881, -0.5420535802841187, 0.05967038497328758, 0.13746608793735504, -0.39164969325065613, 0.350745201110...
few of these classes. DbConnection - Doesn't care about the current thread's ID SqlConnection - Does some thread tracking when debugging SqlTransaction - Has a function called "ZombieCheck", but no thread watching DbTransaction - Nothing here. So I think its safe to say that ADO.NET objects do NOT have thr...
[ 0.43895888328552246, 0.15487854182720184, 0.2783723771572113, 0.034490715712308884, -0.2544606029987335, -0.21823009848594666, 0.4577893614768982, 0.15474547445774078, -0.23805660009384155, -0.5463929772377014, 0.3029171824455261, 0.2104051411151886, -0.44876232743263245, 0.405341476202011...
the class definitions rather than the entire class. I've edited this to clarify, and let me say it here to be absolutely clear: No class methods in System.Data are marked with the STAThreadAttribute. You can check this for yourself with the following hacky code: ``` SqlConnection sc = new SqlConnection(); var data = ...
[ -0.019702868536114693, -0.2823798358440399, 0.6979312300682068, 0.036306027323007584, -0.007092179264873266, -0.04166489094495773, 0.26932236552238464, -0.38636457920074463, -0.38973450660705566, -0.4979555904865265, -0.36260613799095154, 0.3203783631324768, -0.4046246409416199, 0.32202342...
method.GetCustomAttributes(true).OfType<System.Attribute>()) { results.Add(string.Format("{0} {1} {2}", type.Name, method.Name, attr.GetType().Name)); if (attr.GetType() == typeof(STAThreadAttribute))
[ -0.023167381063103676, -0.45068037509918213, 0.6267199516296387, 0.03514668345451355, 0.13573892414569855, -0.0130849564447999, 0.42408499121665955, -0.5926617383956909, 0.07947125285863876, -0.3678487539291382, -0.34305861592292786, 0.37573471665382385, -0.3834620714187622, 0.053427238017...
throw new Exception("SHIII"); } ``` Also, UI classes in winforms also don't use the STAThreadAttribute; its the application where this attribute is used (as, again, Jeremy pointed out). There is a special case where I've run into a class being apartment aware. The XamlReader, which deserializes xaml and cre...
[ 0.22956012189388275, -0.14720508456230164, -0.0019103599479421973, 0.06050923466682434, -0.1476765275001526, -0.3677820861339569, 0.5359607934951782, -0.31285715103149414, -0.09469044208526611, -0.528328537940979, -0.265472412109375, 0.2444765865802765, -0.23087437450885773, 0.149896934628...
docs, which is annoying... So, again, classes aren't apartment aware by default; you have to code it that way or you have to make their instances aware by newing them up in a method chain containing a method marked by the STAThreadAttribute. Whew. This stuff is harder to explain than understand...
[ 0.22124040126800537, 0.13801471889019012, 0.066353440284729, 0.3476858139038086, -0.0077262744307518005, -0.3203185498714447, 0.5057593584060669, 0.10667194426059723, -0.10056568682193756, -0.7089735865592957, -0.3976905047893524, 0.1352095603942871, -0.06699452549219131, 0.121210642158985...
I have a PPPOE connection on a computer. That computer has two LAN cards and I activated ICS on it. The problem is, the connection kinda degrades over time (don't know why), and a redial would be nice, hourly maybe. I was thinking of writing an AutoIT script that would do this, if, for example I'm sending some data to ...
[ 0.08772379159927368, -0.13116344809532166, 0.24461500346660614, 0.22364875674247742, -0.06296636164188385, 0.0628073588013649, 0.009137890301644802, 0.23209740221500397, -0.25317925214767456, -0.7770349979400635, 0.31490978598594666, 0.720308244228363, -0.5643385052680969, -0.2723109126091...
this process, and wouldn't like to have to write the thing in AutoIT (this a last resort option). you can use rasdial (which is build in into windows) and create a batch script (.bat extension) like so: ``` rasdial connectionname ``` -or- if you want to do it in a programming language, you can just call the comman...
[ 0.20184314250946045, -0.08552594482898712, 0.6814152598381042, -0.24226437509059906, 0.2937530279159546, 0.07173143327236176, 0.1604088842868805, -0.08330260217189789, -0.18971310555934906, -0.6409632563591003, -0.17248179018497467, 0.5137531161308289, -0.26847872138023376, 0.5073581337928...
Process.Start(ProcessInfo); Process.WaitForExit(Timeout); ExitCode = Process.ExitCode; Process.Close(); return ExitCode; } ``` and I guess your desired language will have something like this available as well. oh and you can use: ``` rasdial "connection name" /d ``` to drop the connection.
[ -0.07495163381099701, 0.053458090871572495, 0.43874818086624146, -0.3184605836868286, 0.4315948486328125, 0.11694251745939255, 0.2400117963552475, 0.19966116547584534, -0.1732150763273239, -0.521845817565918, -0.34490078687667847, 0.4042280912399292, -0.296443372964859, 0.6217594146728516,...
I have the following entity class (in Groovy): ``` import javax.persistence.Entity import javax.persistence.Id import javax.persistence.GeneratedValue import javax.persistence.GenerationType @Entity public class ServerNode { @Id @GeneratedValue(strategy = GenerationType.AUTO) Long id String firstName Stri...
[ -0.06608203798532486, 0.21614328026771545, 0.6672172546386719, -0.20856332778930664, -0.019005995243787766, 0.05511794611811638, 0.010138854384422302, -0.31225794553756714, -0.06794857978820801, -0.8252724409103394, 0.1406550258398056, 0.5235251784324646, -0.19269023835659027, 0.5435454845...
<property name="hibernate.connection.password" value=""/> <property name="hibernate.archive.autodetection" value="class"/> <property name="hibernate.show_sql" value="true"/> <property name="hibernate.format_sql" value="true"/> <property name="hbm2ddl.auto" value="create"/...
[ 0.08419816941022873, 0.21175777912139893, 0.3639529347419739, -0.17071141302585602, 0.04389708861708641, 0.10834676772356033, 0.2768060564994812, -0.6258494853973389, -0.3246724605560303, -0.6006802320480347, -0.3225827217102051, 0.47821712493896484, -0.35313522815704346, 0.448509365320205...
factory.createEntityManager() manager.getTransaction().begin() manager.persist new ServerNode(firstName: "Test", lastName: "Server") manager.getTransaction().commit() ``` the database *Icarus* exists, but currently has no tables. I would like Hibernate to automatically create and/or update the tables based on the ...
[ 0.4118076264858246, 0.0038743452169001102, 0.4907321035861969, -0.15920040011405945, 0.010845842771232128, 0.001276441034860909, 0.29661041498184204, 0.04681311547756195, -0.5368828177452087, -0.5480532050132751, -0.047167710959911346, 0.20825426280498505, -0.3154070973396301, 0.2213084697...
*Premise*: The requirements for an upcoming project include the fact that no one except for authorized users have access to certain data. This is usually fine, but this circumstance is not usual. The requirements state that there be no way for even the programmer or any other IT employee be able to access this informat...
[ 0.9726014137268066, 0.1514204889535904, 0.12971244752407074, 0.2560780942440033, 0.472698450088501, -0.5203593969345093, 0.23565717041492462, -0.17525596916675568, -0.09876348078250885, -0.5303546190261841, -0.3105621337890625, 0.6365742087364197, -0.013023130595684052, -0.0756895318627357...
so that only the SQL Admin can access it directly. **Hack 1:** I rollout a change that sends the data to a different table for later viewing. Also, the SQL Admin can see the data, which breaks the requirement. **Scenario II:** Encrypt the data so that it requires a password to decrypt. This password would be known ...
[ 0.3965175747871399, 0.17291803658008575, 0.19897641241550446, -0.006479363888502121, 0.2654436528682709, -0.1971651315689087, 0.28346046805381775, -0.334140807390213, -0.1929072141647339, -0.6049184203147888, -0.37440574169158936, 0.4167012870311737, -0.26346591114997864, 0.209685623645782...
the server, where it could be logged or sniffed. **Hack II:** Rollout a change that logs keypresses in javascript and posts them back to the server so that I can retrieve the password. Or, rollout a change that simply stores the unecrypted data in a hidden field that can be posted to the server for later viewing. *...
[ 0.3716404139995575, -0.06399237364530563, 0.6037724614143372, -0.029936285689473152, 0.2256445735692978, -0.11834502220153809, 0.10162631422281265, -0.6263766884803772, -0.15614713728427887, -0.5046221613883972, -0.2496400624513626, 0.4233323037624359, -0.2143387794494629, 0.01316102687269...
or encrypt that data. Then, the user could just copy the encrypted text and put the in the field for new records. They would also have to use this site to see the plain-text for old records. **Hack III:** Besides installing a full-fledged key logger on their system, I don't know how to break this one. So, Scenario ...
[ 0.44274452328681946, 0.18483728170394897, 0.1462980955839157, 0.0963323637843132, 0.08199411630630493, -0.30274179577827454, 0.6082296371459961, -0.17947672307491302, -0.1341167390346527, -0.713984489440918, -0.04865586385130882, 0.4896019995212555, -0.045847393572330475, -0.24204899370670...
browser, then that means it's in the DOM, which means you can write a script to get it and send it to you after it has been decrypted. Aren't these problems usually solved via controls: 1. All programmers need a certain level of clearance and background checks 2. They are trained to understand that rolling out code t...
[ 0.341647744178772, 0.06303379684686661, 0.36644840240478516, 0.170405775308609, -0.08829712122678757, -0.40257394313812256, 0.2036237269639969, 0.062100980430841446, -0.5535768866539001, -0.8888405561447144, -0.32618024945259094, 0.32675063610076904, -0.15445466339588165, -0.24046164751052...
Is there a way to reuse a 3rd party control reference? For example, I have this referenced in my App.xaml ``` xmlns:cust="clr-namespace:ThirdParty.Controls;assembly=ThirdParty.Controls" ``` I don't want to repeat this 3rd party control xml namespace on each page/control that needs a control from the library. Is t...
[ 0.11529803276062012, 0.018762392923235893, 0.326046884059906, 0.4114839434623718, -0.13858987390995026, -0.3563089072704315, -0.0485856868326664, -0.18532994389533997, -0.356480211019516, -0.4594349265098572, -0.07635209709405899, 0.20904748141765594, -0.4002561569213867, 0.155407726764678...
into a UserControl and then use your UserControl in all the places. 2) Declare the third party control as a Resource somewhere and then use DynamicResource reference to that on your other places. The second option can be implemented as bellow. Where ever you want the third party control put a ContentControl like bel...
[ -0.29867932200431824, -0.3664070665836334, 0.6258752346038818, 0.24111808836460114, 0.17419561743736267, -0.12297167629003525, 0.18054862320423126, -0.3645326793193817, -0.009978953748941422, -0.4885806143283844, -0.5020018219947815, 0.4283188283443451, -0.21363602578639984, 0.096310548484...
</ControlTemplate> </Application.Resources> ``` You can see that the namespace declaration will be always on this resource file and you will be able to use that Control control from any place
[ 0.15476880967617035, -0.0023443344980478287, 0.5811548829078674, 0.19468507170677185, 0.2535695731639862, -0.18870240449905396, -0.0961923822760582, 0.0905618667602539, -0.27240437269210815, -0.5855386853218079, -0.1609327644109726, 0.5156813859939575, -0.2519184947013855, 0.30349767208099...
I have a C# application that is a client to a web service. One of my requirements is to allow capturing the SOAP that I send, so that if there is a problem, I can either fix the bug, or demonstrate that the problem is in the service I am calling. My WebReference proxy service class derives from `System.Web.Services.Pr...
[ 0.522176206111908, 0.11545909196138382, 0.3549807667732239, 0.03946162760257721, -0.22819600999355316, -0.2844505310058594, 0.26898497343063354, -0.09640567004680634, -0.0232025608420372, -0.6523826122283936, 0.24945586919784546, 0.4988817870616913, -0.25000226497650146, 0.2160501480102539...
way to get this level of logging? I think what you are looking for is addressed in this question: [Getting RAW Soap Data from a Web Reference Client running in ASP.net](https://stackoverflow.com/questions/300674/getting-raw-soap-data-from-a-web-reference-client-running-in-aspnet) It looks like a lot of code though.
[ 0.6943870782852173, -0.2072845697402954, 0.07684625685214996, 0.35059645771980286, -0.14781491458415985, -0.3254756033420563, 0.2958424985408783, -0.06495218724012375, -0.3000246286392212, -0.44105035066604614, 0.4768839180469513, 0.4739445149898529, -0.12115484476089478, -0.14106421172618...
I have a ContextMenuStrip that contains a submenu of dynamically generated ToolStripMenuItems. There are up to 80 sub menu items. Pressing the first letter of a desired menu item selects it correctly, but if the item happens to be out of the visible range (in a range handled by the scroll arrows), it isn't displayed - ...
[ -0.013262543827295303, -0.12562832236289978, 0.7028923630714417, 0.1071656346321106, -0.03031795471906662, 0.7052887082099915, 0.17037709057331085, -0.3983328938484192, -0.04140312597155571, -0.6026716828346252, -0.0953010767698288, 0.598802387714386, 0.1485729068517685, 0.1518746912479400...
the first item is highlighted, I hit m 3 more times and I can see half a selected row (it's at the bottom of the visible area), hit m two more times, and I can't see the select row, then m one more time and the first m entry is visible and selected again. By default ToolStripMenuItems (TSMI) don't have key listeners a...
[ 0.15469564497470856, -0.07719830423593521, 0.7165687680244446, 0.07220376282930374, 0.07095525413751602, 0.39837807416915894, 0.46910756826400757, -0.25019416213035583, -0.37827175855636597, -0.8120753169059753, -0.2997957170009613, 0.735524594783783, 0.04172056168317795, 0.196825906634330...
to either: **a)** scroll a tool strip's sub menu or **b)** allow the sub menu to use multiple columns (and hope the user doesn't have a ridiculously low resolution). I think what you are looking for is addressed in this question: [Getting RAW Soap Data from a Web Reference Client running in ASP.net](https://stack...
[ 0.644087016582489, -0.1622229963541031, 0.16457125544548035, 0.25518426299095154, -0.2692292630672455, -0.12364232540130615, 0.2868404686450958, 0.008390050381422043, -0.21805812418460846, -0.6160843968391418, 0.2814553678035736, 0.5121138691902161, 0.04912203177809715, -0.1385660022497177...
I have a problem where I cannot identify visitors to my intranet page because their browser is configured to use a proxy, even for the local intranet. I always see the proxy IP and no other details about the client. The SOE that my company uses has the proxy set up already for Firefox and Internet Explorer, and I canno...
[ 0.2302241027355194, 0.3230929970741272, 0.3947770595550537, -0.2504236400127411, -0.23837482929229736, 0.04383428394794464, 0.2193307727575302, 0.03946715220808983, -0.37453943490982056, -0.6632187366485596, 0.1242719516158104, 0.4420720338821411, -0.16352322697639465, 0.3972523510456085, ...
nothing informative of the actual client connecting. This is why I think it needs to be done on the client's side. I'm not looking for a secure solution because it is only a simple page, so I was hoping that I could use Javascript or something similar to find something revealing about the client and send it to my intr...
[ 0.41174623370170593, -0.08233287930488586, -0.0015157378511503339, 0.34904414415359497, -0.13428407907485962, -0.2880517542362213, 0.22955036163330078, 0.3934645354747772, -0.23368321359157562, -0.5865110158920288, 0.233679860830307, 0.48225659132003784, -0.1972215473651886, 0.060004476457...
unique ID that's set upon the first entrance, and then used for identification. Could be done either in JavaScript or in PHP.
[ 0.40954723954200745, 0.01726197823882103, 0.1766628921031952, 0.2556458115577698, -0.19539989531040192, -0.24210548400878906, -0.16934145987033844, -0.273290753364563, -0.06372609734535217, -0.48277804255485535, -0.05942479521036148, -0.07013257592916489, 0.11542142182588577, 0.10769110172...
A table exists that someone else loaded. I need to query against the table, but the lack of indexes makes the query plan abysmal. What I would like to do is detect if there is an index for a particular column, so that I can created it if it does not exist, and not create it if it is already there. Thanks. Evil You ca...
[ 0.25579071044921875, 0.40004444122314453, 0.4202347993850708, 0.1617790013551712, -0.04838944971561432, 0.15353545546531677, 0.4371286928653717, -0.09892105311155319, -0.1984887570142746, -0.5146646499633789, 0.3571600317955017, 0.5533557534217834, -0.47443637251853943, 0.1751478910446167,...
column_name = 'EMPNO'; INDEX_NAME ------------------------------ PK_EMP ``` Of course, you may want to expand the query a bit. This will pick up any index that the EMPNO column appears in. You may want to limit yourself to indexes where the column is the leading column of the index (`COLUMN_POSITION` = 1). Or you ma...
[ -0.2390066236257553, 0.17535926401615143, 0.6265339255332947, -0.005638733971863985, 0.008499247021973133, -0.014790271408855915, 0.09086460620164871, -0.2875977158546448, -0.523242712020874, -0.4226285219192505, -0.24170774221420288, 0.148675799369812, -0.43643292784690857, -0.04569388553...
AND table_name = 'EMP' 5 AND column_name = 'EMPNO' 6 AND column_position = 1 7 AND NOT EXISTS( SELECT 1 8 FROM dba_ind_columns b 9 WHERE a.index_owner = b.index_owner 10
[ -0.4452682435512543, 0.23925524950027466, 0.8490915298461914, 0.03300384804606438, 0.1088409423828125, 0.30556389689445496, -0.0034934296272695065, -0.2097867876291275, -0.39062055945396423, -0.49377909302711487, -0.28753337264060974, 0.033424004912376404, -0.283319890499115, 0.08541622757...
AND a.index_name = b.index_name 11* AND b.column_position = 2) SQL> / INDEX_NAME ------------------------------ PK_EMP ```
[ -0.2850501537322998, 0.36170002818107605, 0.5155975222587585, -0.031173963099718094, 0.18599745631217957, -0.09202714264392853, 0.04999266937375069, -0.15256226062774658, -0.19502666592597961, -0.37082788348197937, -0.3693487346172333, 0.38356953859329224, -0.26625508069992065, 0.192216664...
I wanted to deserialize an XML message containing an element that can be marked `nil="true"` into a class with a property of type `int?`. The only way I could get it to work was to write my own `NullableInt` type which implements `IXmlSerializable`. Is there a better way to do it? I wrote up the full problem and the w...
[ 0.08777166903018951, 0.07042194902896881, 0.02887335605919361, -0.06426194310188293, -0.15584036707878113, 0.05086435377597809, 0.5182976126670837, -0.35802045464515686, -0.14226201176643372, -0.5080912113189697, -0.0002768124977592379, 0.5756836533546448, -0.3229340612888336, 0.3579963743...
<name>Foo</name> <parent-id xsi:type="integer" xsi:nil="true"/> ```
[ 0.06266967207193375, 0.517914891242981, 0.04753483459353447, -0.33635538816452026, 0.1351255476474762, 0.06966696679592133, 0.0734703317284584, 0.14182932674884796, 0.09731922298669815, -0.1494978666305542, -0.3230573534965515, 0.3260422945022583, -0.23281115293502808, 0.33072298765182495,...
When I run a wxPython application, it prints the string “Redirecting output to win32trace remote collector”and I must open PythonWin's trace collector tool to view that trace output. Since I'm not interested in collecting this output, how should I disable this feature? You can even pass that when you instantiate your ...
[ 0.2617601454257965, 0.13614213466644287, 0.32171547412872314, -0.07689134031534195, 0.09279030561447144, -0.07270503789186478, 0.535200297832489, -0.15483440458774567, -0.358857661485672, -0.49790966510772705, 0.005486490670591593, 0.40027910470962524, -0.5979201197624207, 0.16527794301509...
Why are the code-behind pages for an ASP.NET web application locked at run time? I have older projects (probably defined as "web sites" instead of "web apps") where I can edit the code behind, refresh the browser, and see my changes. With the web app, I have to continually close and reopen the browser if I want to see ...
[ 0.47366654872894287, 0.06665389984846115, 0.22966758906841278, 0.23969623446464539, 0.15766216814517975, -0.05108119547367096, 0.39378905296325684, -0.1164059191942215, -0.3949671983718872, -0.7200515866279602, -0.11839498579502106, 0.30308377742767334, -0.1806926429271698, 0.1006213054060...
explorer, select the Web tab and check Enable Edit and Continue. Now you can edit your sources, but you have to pause the debugger to do so.
[ 0.2179705649614334, 0.11899171769618988, 0.4566846489906311, 0.20481324195861816, 0.031125884503126144, -0.5501301288604736, 0.4169605076313019, 0.1477217972278595, 0.1042947992682457, -1.038549780845642, -0.24494734406471252, 0.6553906202316284, -0.11220603436231613, 0.29440435767173767, ...
On several of my usercontrols, I change the cursor by using ``` this.Cursor = Cursors.Wait; ``` when I click on something. Now I want to do the same thing on a WPF page on a button click. When I hover over my button, the cursor changes to a hand, but when I click it, it doesn't change to the wait cursor. I wonder i...
[ 0.05746668949723244, -0.38079291582107544, 0.6925114989280701, -0.10607462376356125, -0.25480708479881287, -0.09134343266487122, -0.07724940031766891, 0.11867836862802505, -0.5834662318229675, -0.45221495628356934, 0.05588991567492485, 0.3055291175842285, -0.30629482865333557, 0.1649216413...
particular page/usercontrol? If not, I'd suggest using [Mouse.OverrideCursor](http://msdn.microsoft.com/en-us/library/system.windows.input.mouse.overridecursor.aspx): ``` Mouse.OverrideCursor = Cursors.Wait; try { // do stuff } finally { Mouse.OverrideCursor = null; } ``` This overrides the cursor for your a...
[ -0.2313815951347351, 0.22422020137310028, 0.7353546023368835, -0.06255393475294113, 0.004352419171482325, -0.2135765701532364, 0.3718011677265167, 0.17335563898086548, -0.2866986393928528, -0.7415980100631714, -0.45877334475517273, 0.4660499095916748, -0.4877675473690033, 0.137008398771286...
I'm working on an application controller for a program that is spitting text directly to /dev/tty. This is a production application controller that must be able to catch all text going to the terminal. Generally, this isn't a problem. We simply redirect stdout and stderr. This particular application is making direct c...
[ 0.5861305594444275, 0.3744450509548187, 0.13910022377967834, -0.3875589370727539, -0.5497010946273804, 0.03197565674781799, 0.3986693322658539, 0.09619129449129105, -0.04073000326752663, -0.4327702522277832, 0.1870293915271759, 0.5978176593780518, -0.38902923464775085, 0.1703878939151764, ...
how to catch and/or throw away the output? I can't quite determine whether the `screen` program mentioned by @flolo will do what you need or not. It may, but I'm not sure whether there is a logging facility built in, which appears to be what you need. There probably is a program out there already to do what you need. ...
[ 0.692290186882019, -0.27109310030937195, 0.15411658585071564, 0.2894864082336426, 0.051661789417266846, -0.08657628297805786, -0.03805793821811676, 0.06405892968177795, -0.23515008389949799, -0.25787806510925293, 0.04731589928269386, 0.41591426730155945, -0.115631602704525, 0.0305147822946...
can log whatever you need it to log. That's not trivial. You can find information about this in Rochkind's "[Advanced UNIX Programming, 2nd Edn](https://rads.stackoverflow.com/amzn/click/com/0131411543)" book, and no doubt other similar books (Stevens' "Advanced Programming in the UNIX Environment" book is a likely can...
[ 0.18380622565746307, 0.05813755840063095, 0.02223736234009266, 0.30488598346710205, 0.20378929376602173, -0.4857454299926758, 0.09009940177202225, 0.03966981917619705, -0.5152658820152283, -0.34013909101486206, -0.11140996962785721, 0.7488490343093872, -0.1527455598115921, -0.0455465726554...
The rails books and web pages I've been following have all stuck to very simple projects for the sake of providing complete examples. I'm moving away from the small project app and into a realm of non-browser clients and need to decide where to put code that is shared by all involved parties. The non-browser client is...
[ 0.613844633102417, -0.039911817759275436, -0.2560684084892273, 0.025171058252453804, -0.15654900670051575, 0.09332901239395142, 0.46643006801605225, 0.047574132680892944, 0.08882949501276016, -0.8105250000953674, 0.2940589487552643, 0.3809393644332886, -0.11930713057518005, -0.163132652640...
the RoR server, but has access to its directory structure. Where would be the best place for shared code to live, and how would the RoR loader handle it? The code in question doesn't really belong in a model, otherwise I'd drop it in there and be done with it. I'd put the shared code in the Rails project's `/lib` dire...
[ 0.20372819900512695, -0.02150513045489788, 0.11510671675205231, 0.3077736496925354, 0.12361976504325867, -0.03305986896157265, 0.08666542172431946, 0.09673108160495758, -0.07152266055345535, -0.294986367225647, 0.04298460856080055, 0.5361741185188293, -0.1978994756937027, 0.104415714740753...
The function [CreateFileMapping](http://msdn.microsoft.com/en-us/library/aa366537(VS.85).aspx) can be used to allocate space in the pagefile (if the first argument is `INVALID_HANDLE_VALUE`). The allocated space can later be memory mapped into the process virtual address space. Why would I want to do this instead of u...
[ 0.29888206720352173, 0.011708284728229046, 0.5762636065483093, 0.14836452901363373, 0.10591278970241547, -0.016972649842500687, -0.04957142844796181, 0.00462915888056159, -0.2510119080543518, -0.7376410365104675, -0.02215445786714554, 0.32482990622520447, -0.11310547590255737, 0.3950934112...
OS about my expected memory usage patterns? (Ie, the former is a hint to swap out those pages more aggressively.) Or is it simply a convenience method when working with very large datasets on 32-bit processes? (Ie, I can use CreateFileMapping to make >4Gb allocations, then memory map smaller chunks of the space as nee...
[ 0.03951622173190117, 0.07562295347452164, 0.3349728286266327, 0.06949674338102341, 0.08947017788887024, 0.08586189150810242, 0.049425579607486725, 0.10288191586732864, -0.3872380554676056, -0.9646837711334229, -0.04081198573112488, 0.38353201746940613, -0.2580859661102295, -0.0791859999299...
across multiple processes?
[ 0.28249260783195496, 0.12458130717277527, -0.011643584817647934, 0.138956218957901, 0.12945182621479034, 0.12304061651229858, -0.04001094028353691, -0.04830218106508255, -0.38288259506225586, -0.36157041788101196, 0.1530887484550476, -0.08271763473749161, -0.17186003923416138, 0.1954073011...
I want to offload a block of code in my main process to child process to make it run concurrently. I also want to have the PID of the spawned child process so I can monitor and kill it if necessary. You can use the `fork` kernel method. Here is an example: ``` #!/usr/bin/env ruby puts "This is the master process." ch...
[ 0.3394772708415985, 0.12992830574512482, -0.03187398985028267, -0.054464440792798996, 0.11781458556652069, 0.25008270144462585, -0.034063905477523804, 0.07807902246713638, 0.006444801576435566, -0.45687681436538696, 0.121833436191082, 0.22227641940116882, -0.5187902450561523, 0.79498726129...
keeps the bindings of the parent process. It is a good idea to make your forked process `exit`.
[ 0.15913444757461548, 0.027503227815032005, 0.16423025727272034, 0.10563189536333084, 0.15654757618904114, -0.007658203598111868, 0.1392504721879959, -0.009416988119482994, -0.0469217523932457, -0.32445913553237915, -0.06816558539867401, 0.13188378512859344, 0.012622403912246227, 0.66364055...
i get a Keyword not supported: '192.168.1.1;initial catalog'. error when trying to do this `Dim cn As New SqlConnection(str)` where str is the connection string starts with '192.168.1.1;initial catalog' ... I have not specified the provider in the connection string you need to provide a properly formatted connectio...
[ 0.050469230860471725, 0.24344170093536377, 0.9141302704811096, 0.03504815325140953, -0.03779623657464981, -0.047016385942697525, 0.3148004114627838, 0.1483985334634781, -0.2167782336473465, -0.603942334651947, -0.2109331637620926, 0.31637677550315857, -0.25097227096557617, 0.58572411537170...
I have the following code for a UDF but it errors with the message: > Msg 156, Level 15, State 1, Procedure > CalendarTable, Line 39 Incorrect > syntax near the keyword 'OPTION'. is it because of my WITH statement as I can run the same code fine in a stored procedure? ``` SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER...
[ -0.08937966823577881, 0.1310805380344391, 0.6339921355247498, -0.19115488231182098, -0.21252891421318054, -0.06228269264101982, 0.3240661919116974, -0.20237784087657928, -0.11428968608379364, -0.689899742603302, -0.06124764308333397, 0.19094900786876678, -0.47836148738861084, 0.24678532779...
as ( select cast(@StartDate as datetime) DateValue union all select DateValue + 1 from MyCalendar where DateValue + 1 <= @EndDate
[ 0.37860411405563354, -0.2777096927165985, 0.62541663646698, -0.14790642261505127, 0.2683388590812683, -0.011167921125888824, 0.15987332165241241, -0.2244427502155304, 0.021973315626382828, -0.5492324829101562, -0.2945691645145416, 0.2874336540699005, -0.1365179568529129, 0.4164105653762817...
) select DateValue , datepart(dy, DateValue) [day of year] , datename(dw, DateValue) [day] , datepart(dw, DateValue-1) [day of week] , datepart(dd, DateValue) [day of month] , datepart(ww, DateValue) [week] , datepart(mm, DateValue)
[ 0.0229042898863554, -0.39846542477607727, 0.6516285538673401, 0.28095465898513794, 0.09271537512540817, 0.33454981446266174, 0.24673806130886078, -0.2430507391691208, 0.017931858077645302, -0.6157997250556946, -0.3886963725090027, 0.34371164441108704, 0.24215754866600037, 0.484882086515426...
[month] , datename(mm, DateValue) [month] , datepart(qq, DateValue) [quarter] , datepart(yy, DateValue) [year] , datepart(HH, DateValue) [HOUR] , datepart(MI, DateValue) [MIN] , datepart(SS, DateValue) [SEC] , datepart(MS, DateValue) [MILLISECOND] ...
[ -0.2921072542667389, -0.2662335932254791, 0.9155497550964355, 0.2015141397714615, -0.01475981343537569, 0.3841005265712738, 0.11025100946426392, 0.03823160380125046, -0.11748194694519043, -0.4375849664211273, -0.3372175395488739, 0.020447643473744392, 0.4574163258075714, 0.5394599437713623...
OPTION (MAXRECURSION 0) ) GO ``` No, you can't use the OPTION keyword. From the documentation: "MAXRECURSION can be used to prevent a poorly formed recursive CTE from entering into an infinite loop. The following example intentionally creates an infinite loop and uses the MAXRECURSION hint to limit the number of rec...
[ -0.06653868407011032, -0.5074967741966248, 0.28926628828048706, 0.11589635163545609, 0.28930234909057617, -0.2902359664440155, 0.2533363103866577, 0.08091089129447937, -0.18577590584754944, -0.27356037497520447, -0.3302328586578369, 0.7893790602684021, -0.43553489446640015, -0.221698299050...
I'm having trouble with this code: ``` NSRect itemFrame; id item; // code to assign item goes here. itemFrame.origin.y -= [item respondsToSelector:@selector(selectedHeight)] ? [item selectedHeight] : [self defaultSelectedHeight]; ``` This is the problematic bit: ``` [item selectedHeight] ``` The compiler is ass...
[ 0.17867125570774078, 0.11721168458461761, 0.12933780252933502, -0.030641736462712288, -0.09236401319503784, -0.14901727437973022, 0.23182478547096252, -0.22913546860218048, 0.03372649848461151, -0.5747324824333191, 0.1699148267507553, 0.4662375748157501, -0.24399952590465546, 0.38744568824...
What do I gain by adding a timestamp column called recordversion to a table in ms-sql? You can use that column to make sure your users don't overwrite data from another user. Lets say user A pulls up record 1 and at the same time user B pulls up record 1. User A edits the record and saves it. 5 minutes later, User B e...
[ 0.4953841269016266, 0.10887473076581955, 0.5038493871688843, 0.09767808020114899, -0.03542637825012207, -0.25370174646377563, -0.04782720282673836, -0.1521892249584198, -0.32150909304618835, -0.5370901823043823, 0.26514896750450134, 0.2903277277946472, -0.15507058799266815, 0.3965124785900...
could detect this invalid condition and throw some kind of data out of date error.
[ 0.3128027021884918, 0.10477888584136963, -0.07160922884941101, 0.45629334449768066, 0.41539138555526733, -0.15086428821086884, 0.15310189127922058, 0.083265021443367, 0.07685200124979019, -0.18074628710746765, 0.14858025312423706, 0.2220056802034378, 0.11227285861968994, 0.2642583549022674...
I'm doing a PHP site which displays code examples in various languages (C#, PHP, Perl, Ruby, etc.). Are there any PHP functions which add syntax coloring for these and other languages? If not, I would at least like to find that one built-in PHP function which does syntax coloring for PHP code, can't find it anymore. ...
[ 0.4967438876628876, 0.05591358616948128, 0.02218705788254738, 0.21193814277648926, -0.32989633083343506, -0.004269101191312075, 0.19289343059062958, 0.305162250995636, -0.022332467138767242, -0.6963591575622559, 0.0656430646777153, 0.43487274646759033, -0.098282590508461, -0.19248151779174...
I have a field in my form labeled "Name" that will contain both the First & Last name. Our existing dynamic server (to which the form is being POSTed to), expects two separate fields (first name, last name). Can I use Javascript to split the user input into two separate variables before the form is posted to the ser...
[ 0.5642222762107849, -0.027265185490250587, 0.3302423059940338, 0.05727206915616989, 0.039522916078567505, -0.11910133063793182, 0.0413968600332737, -0.07166967540979385, 0.041381895542144775, -0.4781183898448944, -0.03906818479299545, 0.1893455684185028, -0.11000476032495499, 0.28780937194...
your separator. Most would agree to split it wherever there is a white-space character, but what if they enter a three word name such as **Don Juan DiMarco**? If you decide to split the name based on whitespace, you'll have to determine how to assign the first and last names. ``` $arrNames = preg_split('/\s+/', $_POST...
[ 0.17650321125984192, 0.09343115240335464, 0.49851757287979126, -0.07989614456892014, -0.31132352352142334, 0.09309398382902145, -0.007556071970611811, -0.3669780194759369, -0.15353019535541534, -0.310686320066452, -0.11062951385974884, 0.48909908533096313, -0.4461115598678589, 0.0565267987...
and which are a middle, and which are a last name. It gets even harder if you have 4 or 5 names entered, which is entirely realistic for certain cultures. All of this is guesswork, which is why I would recommend simply adding a Last Name input field on the front-end. This would eliminate all guess work as to which name...
[ 0.10383106768131256, 0.30637526512145996, 0.19870147109031677, 0.0673920288681984, -0.01658397540450096, 0.16822661459445953, 0.23315954208374023, 0.011289840564131737, -0.005971755366772413, -0.6820326447486877, -0.2819453775882721, 0.04623645916581154, 0.12574444711208344, 0.257170826196...
I am writing an iPhone application, and need to save the state of my application (5K or so). My main worry is data persisting across upgrades. Some of the applications I use clearly got this wrong, and I would prefer not to! To save state, NSUserDefaults is the way to go. I believe most, if not all, instances of appli...
[ 0.10026819258928299, 0.21086406707763672, 0.4475487768650055, 0.025155069306492805, 0.2641151249408722, -0.013072595000267029, 0.8002305030822754, 0.12896811962127686, -0.18122532963752747, -0.7811794281005859, -0.22024966776371002, 0.5552114248275757, -0.1997443288564682, -0.2019057422876...