text
stringlengths
0
30.5k
title
stringclasses
1 value
embeddings
listlengths
768
768
// Make sure custom properties are preserved after serialization Assert.AreEqual(Message, ex.Message, "Message"); Assert.AreEqual(ResourceName, ex.ResourceName, "ex.ResourceName"); Assert.AreEqual(2, ex.ValidationErrors.Count, "ex.ValidationErrors.Count"); Assert.AreEqual...
[ 0.1454915851354599, 0.09627329558134079, 0.28074195981025696, 0.026149414479732513, -0.13407514989376068, 0.23951463401317596, 0.6258972883224487, -0.7456347942352295, -0.04562900587916374, -0.12122485786676407, -0.22611184418201447, 0.7155327200889587, -0.19636325538158417, -0.07971582561...
that the exception message and stack trace (owned by the base Exception) are preserved Assert.AreEqual(exceptionToString, ex.ToString(), "ex.ToString()"); } [TestMethod] public void TestDerivedSerializableExceptionWithAdditionalCustomProperty() { DerivedSerializa...
[ -0.03860469534993172, -0.07904002070426941, 0.2015574425458908, -0.1295841485261917, 0.3814086616039276, -0.011059148237109184, 0.5839015245437622, -0.5302934050559998, 0.19381459057331085, -0.10725472122430801, -0.36454078555107117, 0.5384455323219299, 0.02649812214076519, 0.1534154266119...
// Sanity check: Make sure custom properties are set before serialization Assert.AreEqual(Message, ex.Message, "Message"); Assert.AreEqual(ResourceName, ex.ResourceName, "ex.ResourceName"); Assert.AreEqual(2, ex.ValidationErrors.Count, "ex.ValidationErrors.Count"); Assert...
[ 0.11501453816890717, 0.0320795401930809, 0.21613356471061707, 0.06711283326148987, -0.19430668652057648, 0.2994336485862732, 0.6709908246994019, -0.7669835686683655, 0.04246240109205246, -0.02371215634047985, -0.23475269973278046, 0.8047351837158203, -0.2102637141942978, 0.0822129994630813...
Assert.AreEqual(Username, ex.Username); // Save the full ToString() value, including the exception message and stack trace. string exceptionToString = ex.ToString(); // Round-trip the exception: Serialize and de-serialize with a BinaryFormatter BinaryFormatter bf = new ...
[ -0.26226791739463806, -0.2786000370979309, 0.41282889246940613, -0.012778783217072487, 0.019585033878684044, -0.026838555932044983, 0.48702648282051086, -0.5934869050979614, -0.219281867146492, -0.08988278359174728, -0.10060063004493713, 0.732982337474823, -0.18754257261753082, 0.029848115...
{ // "Save" object state bf.Serialize(ms, ex); // Re-use the same stream for de-serialization ms.Seek(0, 0); // Replace the
[ -0.1290031224489212, -0.1573648750782013, 0.3339042067527771, -0.0024642387870699167, 0.2705264091491699, 0.3900822401046753, 0.5411584377288818, -0.07634087651968002, -0.10952327400445938, -0.4524550437927246, -0.34583786129951477, 0.33593276143074036, -0.6116487383842468, 0.3769357204437...
original exception with de-serialized one ex = (DerivedSerializableExceptionWithAdditionalCustomProperty)bf.Deserialize(ms); } // Make sure custom properties are preserved after serialization Assert.AreEqual(Message, ex.Message, "Message"); Assert.AreEqua...
[ -0.18037240207195282, -0.2786824405193329, 0.28294262290000916, 0.0511825866997242, -0.033298857510089874, 0.1861492246389389, 0.689565896987915, -0.5838010907173157, -0.11226542294025421, -0.25454413890838623, -0.262302964925766, 0.5460399389266968, -0.49092110991477966, 0.262864381074905...
Assert.AreEqual(ValidationError1, ex.ValidationErrors[0], "ex.ValidationErrors[0]"); Assert.AreEqual(ValidationError2, ex.ValidationErrors[1], "ex.ValidationErrors[1]"); Assert.AreEqual(Username, ex.Username); // Double-check that the exception message and stack trace (owned by the ...
[ -0.023038873448967934, 0.19338876008987427, 0.27878880500793457, -0.17585453391075134, -0.008583800867199898, -0.0287366583943367, 0.637324333190918, -0.7784567475318909, -0.0006706395070068538, -0.06946320086717606, -0.30939677357673645, 0.7301509976387024, -0.3077827990055084, -0.0183490...
Sometimes it might be useful, but mostly just looking cool or impressive to visualize log files (anything from http requests and to bandwith usage to cups of coffee drunk per day). I know about [Visitorville](http://www.visitorville.com/) which I think look a bit silly, and then there's [gltail](http://www.fudgie.org/...
[ 0.4581063687801361, -0.007707287557423115, 0.250018447637558, 0.08819270133972168, -0.13137778639793396, -0.44739624857902527, 0.17212583124637604, 0.36963170766830444, -0.41823744773864746, -0.6480828523635864, 0.24087704718112946, 0.4437134861946106, 0.0380496084690094, 0.139449253678321...
last time (was very usefull for the prototyping phase of our JBoss server)
[ 0.03798642382025719, -0.18806777894496918, 0.43214893341064453, 0.20835478603839874, -0.19292877614498138, -0.30408740043640137, 0.14311933517456055, 0.09066521376371384, -0.24468974769115448, -0.32831960916519165, 0.20342393219470978, 0.16105490922927856, 0.2513926923274994, -0.0242498070...
I'm implementing a simple service using datagrams over unix local sockets (AF\_UNIX address family, i.e. **not UDP**). The server is bound to a public address, and it receives requests just fine. Unfortunately, when it comes to answering back, `sendto` fails unless the client is bound too. (the common error is `Transpo...
[ 0.14889998733997345, 0.013856331817805767, 0.2780471444129944, 0.08426624536514282, -0.1720501333475113, -0.04833946377038956, 0.2057536542415619, -0.01226669829338789, -0.3590414524078369, -0.9196426868438721, -0.1383482962846756, 0.3851712644100189, -0.43217068910598755, 0.49448224902153...
they don't have one already. Is such a feature available for datagram oriented sockets? I assume that you are running Linux; I don't know if this advice applies to SunOS or any UNIX. First, the answer: after the socket() and before the connect() or first sendto(), try adding this code: ``` struct sockaddr_un me; me....
[ 0.2149960696697235, 0.20322172343730927, 0.4665994644165039, -0.2221767008304596, -0.10663724690675735, -0.1039215698838234, 0.2316216677427292, -0.15024098753929138, -0.16760101914405823, -0.8179821372032166, -0.17874619364738464, 0.6982766389846802, -0.14767536520957947, 0.36845996975898...
the [Linux source code](http://lxr.linux.no/linux+v2.6.26.5/net/unix/af_unix.c#L925), we see that unix\_dgram\_connect() only calls unix\_autobind() if SOCK\_PASSCRED is set in the socket flags. Since I don't know what SOCK\_PASSCRED is, and it is now 1:00AM, I need to look for another solution. Examining [unix\_bind...
[ 0.31118226051330566, 0.2609882056713104, 0.7522706389427185, 0.06480353325605392, 0.3299271762371063, -0.17070329189300537, 0.27240195870399475, 0.19889400899410248, -0.3301614224910736, -0.8033799529075623, 0.04441997781395912, 0.576565146446228, 0.03567633777856827, 0.05472250655293465, ...
I'm building a java/spring application, and i may need to incorporate a stateful web service call. Any opinions if i should totally run away from a stateful services call, or it can be done and is enterprise ready? Stateful web services are a pain to maintain. The mechanism I have seen for them is to have the first cal...
[ 0.1336805373430252, 0.15604440867900848, 0.05771792307496071, 0.15804779529571533, 0.28548067808151245, -0.1839955747127533, 0.3058222234249115, -0.015135959722101688, -0.1331314742565155, -0.48623618483543396, 0.14131416380405426, 0.5266218185424805, -0.1336570531129837, 0.074863739311695...
call.
[ 0.19060811400413513, -0.009455590508878231, 0.3726089894771576, 0.27435484528541565, -0.02754153683781624, -0.16387124359607697, 0.13579559326171875, 0.23079055547714233, -0.07717741280794144, -0.37327224016189575, -0.3059145212173462, 0.430134654045105, -0.2912980914115906, 0.409516245126...
This question is a follow up on one of my other questions, [Can I legally Incorporating GPL & LGPL, open-sourced software in a proprietary, closed-source project?](https://stackoverflow.com/questions/94346/can-i-legally-incorporating-gpl-lgpl-open-sourced-software-in-a-proprietary-clo) Many of the conditions of the [L...
[ 0.5918185114860535, 0.30942776799201965, 0.2644360065460205, 0.012508316896855831, -0.008717021904885769, -0.4670373499393463, -0.6108447909355164, -0.36425110697746277, -0.38737645745277405, -0.0734047070145607, -0.06387484818696976, 0.6095942258834839, -0.0866699144244194, 0.243013799190...
first place was to prevent the situation where somebody had a binary, but no source to go with it. IANAL, so I can't speak to whether the consultancy-client relationship would constitute a loophole which you could use to avoid passing on source code, but it is certainly against the license's intent to do what you're ...
[ 0.5284396409988403, 0.10364487022161484, -0.07971944659948349, 0.014496718533337116, 0.09750906378030777, -0.18911845982074738, -0.26161086559295654, 0.23386628925800323, 0.180307999253273, 0.19065752625465393, 0.12962138652801514, 0.8324440717697144, 0.02820809744298458, 0.052710842341184...
I know it happens sometime before Load, but during what event exactly? It's loaded into memory between init and load. See t[his article](http://msdn.microsoft.com/en-us/library/ms178472.aspx) for a full break down of the page lifecycle.
[ -0.022836849093437195, 0.10408610850572586, 0.27685195207595825, 0.05784037709236145, 0.1135854497551918, -0.23135532438755035, 0.31813791394233704, 0.40245723724365234, -0.3175192177295685, -0.6821929216384888, -0.07898569852113724, 0.32920587062835693, 0.059284962713718414, 0.15980967879...
What would be a good offline alternative of the online [Lipsum generator](http://www.lipsum.com/feed/html)? It's frustrating when I'm not online and need some placeholder text for testing purpose. A CLI utility would be ideal, so that I can tailor the output to fit my needs. If you have python available, google code ha...
[ 0.3661733567714691, -0.1638866513967514, 0.3444159924983978, 0.18593230843544006, 0.10368642956018448, 0.03946283459663391, 0.15310099720954895, -0.05385331064462662, -0.0960143432021141, -0.40176159143447876, -0.0531654953956604, 0.5263275504112244, -0.2065567523241043, -0.352707237005233...
What is the best way (in C++) to set up a container allowing for double-indexing? Specifically, I have a list of objects, each indexed by a key (possibly multiple per key). This implies a multimap. The problem with this, however, is that it means a possibly worse-than-linear lookup to find the location of an object. I'...
[ 0.031438570469617844, -0.17186623811721802, 0.20217129588127136, 0.20188318192958832, 0.036567363888025284, -0.22497232258319855, -0.119744673371315, -0.1583031713962555, -0.4228129982948303, -0.6438047289848328, 0.1675100177526474, 0.22928540408611298, -0.3553449809551239, 0.1261872798204...
rather some container that maintains an index both by object pointer and coordinate, and that the objects themselves guarantee stable references/pointers. Then each object could store an iterator to the index (including the coordinate), sufficiently abstracted, and know where it is. Boost.MultiIndex seems like the best...
[ 0.08140475302934647, -0.08318141847848892, 0.5031481981277466, 0.3640560209751129, 0.02124226652085781, -0.30281862616539, -0.05724780634045601, -0.15451234579086304, -0.3141004741191864, -0.2694038152694702, 0.04394014924764633, 0.7299566268920898, -0.37305042147636414, -0.199124261736869...
because objects have otherwise no intrinsic ordering, and a pointer can remain constant while the object changes (allowing its use in a Boost MultiIndex, which, IIRC, does provide stable indexing). I'm making several assumptions based on your writeup: * Keys are cheap to copy and compare * There should be only one cop...
[ -0.061875030398368835, 0.0018778659868985415, 0.15781062841415405, 0.20619629323482513, 0.06822513788938522, -0.19711780548095703, -0.00090621697017923, -0.2222476601600647, -0.38445696234703064, -0.5336347818374634, -0.0033982014283537865, 0.8214442133903503, -0.2254251092672348, -0.01478...
a linked list or some other container to maintain a global list of all objects in the system. The objects are allocated on the linked list. * Create one `std::multimap<Key, Object *>` that maps keys to object pointers, pointing to the single canonical location in the linked list. * Do one of: + Create one `std::map<Ob...
[ -0.09064220637083054, -0.02696334756910801, 0.38784751296043396, 0.31108784675598145, -0.06695014983415604, -0.03952508047223091, 0.1327974498271942, -0.003999846987426281, -0.4246799647808075, -0.8042778372764587, -0.23180823028087616, 0.20379307866096497, -0.5041052103042603, 0.185415625...
current `Key` (allowing O(1) lookups). Make sure your code updates this variable when the key is changed. Since your writeup mentioned "coordinates" as the keys, you might also be interested in reading the suggestions at [Fastest way to find if a 3D coordinate is already used](https://stackoverflow.com/questions/72128...
[ -0.15500687062740326, -0.19622260332107544, 0.770482063293457, 0.2823478877544403, 0.5051186680793762, -0.22786357998847961, -0.1629258692264557, 0.07668272405862808, -0.484732985496521, -0.6789640784263611, -0.22837384045124054, 0.5432169437408447, -0.03725988790392876, 0.0385103300213813...
I have a web application where there are number of Ajax components which refresh themselves every so often inside a page (it's a dashboard of sorts). Now, I want to add functionality to the page so that when there is no Internet connectivity, the current content of the page doesn't change and a message appears on the ...
[ 0.4478963017463684, 0.3563300669193268, 0.2961118519306183, 0.2798495292663574, 0.13293051719665527, -0.3384944498538971, 0.11662403494119644, 0.315382719039917, -0.3823900818824768, -0.6162416338920593, 0.2229202389717102, 0.33053314685821533, 0.10056019574403763, 0.3118513822555542, -0...
be to extend the XmlHTTPRequest object with an explicit timeout method, then use that to determine if you're working in offline mode (that is, for browsers that don't support navigator.onLine). Here's how I implemented Ajax timeouts on one site (a site that uses the [Prototype](http://prototypejs.org/"Prototype") libra...
[ 0.16006624698638916, -0.12883113324642181, 0.2650352418422699, -0.31341680884361267, -0.16254524886608124, -0.009496509097516537, 0.30683743953704834, -0.19448760151863098, 0.2708375155925751, -0.8566426634788513, 0.00809269119054079, 0.3722161054611206, -0.15852074325084686, -0.0499323569...
method (if it exists), passing an error code to the function. * */ var xhr = { errorCode: 'timeout', callInProgress: function (xmlhttp) { switch (xmlhttp.readyState) { case 1: case 2: case 3: return true; // Case 4 and 0
[ 0.07532049715518951, -0.1403907686471939, 0.27205514907836914, 0.048983462154865265, 0.27241915464401245, 0.10160969197750092, 0.21592257916927338, -0.6455281376838684, 0.12411375343799591, -0.25896361470222473, -0.07649920135736465, 0.32275500893592834, -0.4094091057777405, 0.085907429456...
default: return false; } } }; // Register global responders that will occur on all AJAX requests Ajax.Responders.register({ onCreate: function (request) { request.timeoutId = window.setTimeout(function () { // If we have hit the timeout and the AJAX request is active...
[ -0.20698152482509613, -0.4089541733264923, 0.45796212553977966, -0.053376100957393646, 0.10625074803829193, -0.01034482754766941, 0.4394434094429016, -0.013483904302120209, -0.11536440998315811, -0.8049395680427551, -0.3575160801410675, 0.7102789878845215, -0.18149109184741974, -0.15668836...
if (xhr.callInProgress(request.transport)) { var parameters = request.options.parameters; request.transport.abort(); // Run the onFailure method if we set one up when creating the AJAX object if (request.options.onFailure) {
[ -0.13247239589691162, -0.263477087020874, 0.3729812502861023, -0.04753168299794197, 0.2712552547454834, 0.08256740123033524, -0.08579470217227936, -0.19457565248012543, -0.11696452647447586, -0.6399646401405334, -0.17859604954719543, 0.4792860746383667, -0.5330538749694824, -0.025283329188...
request.options.onFailure(request.transport, xhr.errorCode, parameters); } } }, // 10 seconds 10000); }, onComplete: function (request) { // Clear the timeout, the request completed ok window.clearTimeout(request.timeoutId);
[ -0.21195188164710999, -0.4071245491504669, 0.7164455652236938, -0.1903628706932068, 0.42124590277671814, 0.26165518164634705, 0.3152120113372803, -0.10248889774084091, -0.09387613087892532, -0.644841730594635, -0.49703577160835266, 0.2715896666049957, -0.13234736025333405, 0.25003886222839...
} }); ```
[ 0.05535417050123215, 0.22359678149223328, 0.33292123675346375, -0.44429904222488403, 0.4482058882713318, -0.16275274753570557, 0.18889392912387848, 0.2862910032272339, 0.3227475583553314, -0.38386330008506775, -0.35699695348739624, 0.9355558753013611, -0.4717769920825958, 0.204942822456359...
I am working on a client proposal and they will need to upgrade their network infrastructure to support hosting an ASP.NET application. Essentially, I need to estimate peak usage for a system with a known quantity of users (currently 250). A simple answer like "you'll need a dedicated T1 line" would probably suffice, b...
[ 0.5814904570579529, -0.06864000111818314, 0.46843618154525757, 0.10796758532524109, 0.02846638299524784, -0.17276102304458618, 0.2872399091720581, 0.030056796967983246, -0.4214462637901306, -0.45234212279319763, 0.07883858680725098, 0.39095965027809143, -0.028353655710816383, 0.06013046205...
the customer, really at a leisurely pace, over a certain time span, and then multiply the bandwidth usage by the number of users and divide by the time. This doesn't seem very scientific. It may be good enough for a proposal, but I'd like to see if there's a better way. I know there are load tools available for test...
[ 0.33110928535461426, 0.08845254778862, 0.398457795381546, -0.08521682769060135, -0.08400125801563263, 0.18815025687217712, 0.03739767521619797, 0.2367383986711502, -0.1799972802400589, -0.4934418499469757, -0.18223103880882263, 0.4882986545562744, -0.21797777712345123, 0.34227341413497925,...
- updated the link]
[ 0.23778772354125977, 0.24587303400039673, 0.02036503329873085, 0.10520589351654053, 0.3163067400455475, -0.3467438817024231, 0.17128673195838928, -0.03232781961560249, -0.06560118496417999, -0.38780614733695984, -0.03960435464978218, 0.29354918003082275, -0.021895598620176315, 0.0521527528...
I've been using Lisp on and off for a while but I'm starting to get more serious about doing some "real" work in Lisp. I'm a huge Vim fan and was wondering how I can be most productive using Vim as my editor for Lisp development. Plugins, work flow suggestions, etc. are all welcome. Please don't say "use emacs" as I'v...
[ -0.012715370394289494, -0.07696808129549026, 0.6838991641998291, -0.01936018280684948, -0.4843277335166931, -0.22342486679553986, -0.1047419086098671, -0.05307517200708389, -0.4423186480998993, -0.4156014323234558, 0.18736465275287628, 0.5660852193832397, -0.5158549547195435, -0.1971717178...
for your favourite lisp, in the file /usr/local/limp/latest/bin/lisp.sh When discussing Lisp these days, it is commonly assumed to be Common Lisp, the language standardized by ANSI X3J13 (see [the HyperSpec](http://l1sp.org/cl), and [Practical Common Lisp](http://gigamonkeys.com/book) for a good textbook) with impleme...
[ -0.15969103574752808, -0.09562739729881287, 0.42790111899375916, 0.06004982814192772, -0.44302549958229065, -0.1509092003107071, -0.06650462746620178, 0.326566219329834, -0.84012770652771, -0.21268311142921448, -0.07711061090230942, 0.4968568682670593, -0.3417922556400299, -0.6928440332412...
previous work of the SlimVim project, namely the ECL (Embeddable Common Lisp) interface, merged with later releases (7.1); Simon has also made patches to 7.2 available yet to be merged. The ECL interface is documented in [if\_ecl.txt](https://svn.jansson.be/limp/vim-ecl/vim/runtime/doc/if_ecl.txt). Short-term work is ...
[ 0.2172204852104187, -0.2308659553527832, 0.8348891139030457, -0.05409985035657883, 0.00927529577165842, -0.41789016127586365, 0.04440096393227577, -0.32375943660736084, -0.19061583280563354, -0.4070776700973511, -0.03215717896819115, 0.6240645051002502, -0.3826322853565216, -0.320232450962...
editor - the frontend). And somewhere in between, it is likely that all of Limp will be rewritten in Common Lisp using the ECL interface, making Limp easier to maintain (VimScript isn't my favourite) and being easier for users to customize. The [official Limp site](https://common-lisp.net/project/limp/) goes down fro...
[ -0.252917617559433, -0.1756826937198639, 0.7128186821937561, 0.015585171058773994, -0.36448344588279724, -0.10159970819950104, 0.21818527579307556, -0.3472217321395874, -0.5870733857154846, -0.4071139991283417, -0.15773102641105652, 0.20947715640068054, -0.2061176747083664, -0.578142404556...
the limp-devel list. If you're into IRC, I'm in #limp on irc.freenode.net as 'tic'. Good luck!
[ 0.036876123398542404, -0.18458567559719086, 0.7272103428840637, 0.2608373165130615, -0.16376204788684845, -0.3415221571922302, 0.14801563322544098, 0.8084101676940918, -0.8621113300323486, -0.49774369597435, 0.1283147633075714, 0.45362865924835205, -0.018586892634630203, -0.108757920563220...
I've recently come across a problem which requires at least a basic degree of image processing, can I do this in Python, and if so, with what? The best-known library is [PIL](http://effbot.org/zone/pil-index.htm). However if you are simply doing basic manipulation, you are probably better off with the Python bindings f...
[ 0.4135322868824005, -0.24513623118400574, 0.33634746074676514, 0.12514768540859222, -0.2510458528995514, -0.03830857574939728, -0.13213779032230377, -0.08894520252943039, -0.1844254583120346, -0.6810279488563538, 0.08156394958496094, 0.5254313349723816, -0.297817200422287, -0.2317740321159...
Apparently xrange is faster but I have no idea why it's faster (and no proof besides the anecdotal so far that it is faster) or what besides that is different about ``` for i in range(0, 20): for i in xrange(0, 20): ``` **In Python 2.x:** * `range` creates a list, so if you do `range(1, 10000000)` it creates a list ...
[ -0.18579524755477905, -0.0016577881760895252, 0.34862157702445984, -0.19610552489757538, -0.21779455244541168, 0.11369320750236511, 0.15616475045681, -0.21852728724479675, -0.12881135940551758, -0.553078293800354, 0.017754878848791122, 0.41378265619277954, -0.31396153569221497, 0.036872629...
I recently wrote a parser in Python using Ply (it's a python reimplementation of yacc). When I was almost done with the parser I discovered that the grammar I need to parse requires me to do some look up during parsing to inform the lexer. Without doing a look up to inform the lexer I cannot correctly parse the strings...
[ 0.07013928145170212, 0.17277313768863678, 0.07214818149805069, -0.21215778589248657, -0.20597407221794128, 0.05155613645911217, 0.43624815344810486, -0.20148693025112152, 0.030989712104201317, -0.36405354738235474, 0.07176071405410767, 0.9001867771148682, -0.44331061840057373, -0.359066396...
maintain/test. So I want to know about some of the other options. In Haskell I would use Parsec, a library of parsing functions (known as combinators). Is there a Python implementation of Parsec? Or perhaps some other production quality library full of parsing functionality so I can build a context sensitive parser in...
[ 0.29986876249313354, -0.13952645659446716, 0.3357659578323364, 0.10116414725780487, -0.20286595821380615, -0.22079667448997498, 0.3243199288845062, 0.12812505662441254, -0.16752301156520844, -0.667963445186615, 0.012334700673818588, 0.6764891743659973, -0.5148541331291199, -0.4000096321105...
as they name it, \* stands for the quantity of lookahead it can cope with).
[ 0.34595510363578796, 0.14126649498939514, 0.17439892888069153, -0.5086848735809326, 0.06282366812229156, 0.684619128704071, 0.39942097663879395, -0.016979100182652473, -0.05210378021001816, -0.5666583180427551, -0.356514036655426, 0.5540679097175598, 0.07267161458730698, 0.1503235548734665...
I have an experiment streaming up 1Mb/s of numeric data which needs to be stored for later processing. It seems as easy to write directly into a database as to a CSV file and I would then have the ability to easily retrieve subsets or ranges. I have experience of sqlite2 (when it only had text fields) and it seemed p...
[ 0.2558024823665619, -0.020506015047430992, 0.3283616900444031, 0.07162021845579147, -0.2926018536090851, -0.18761037290096283, 0.0365348644554615, -0.0031349780037999153, -0.11832349002361298, -0.6906713843345642, 0.17672497034072876, 0.42935773730278015, -0.14924725890159607, 0.1235772594...
be cross platform. If you only need to read/write the data, without any checking or manipulation done in database, then both should do it fine. Firebird's database file can be copied, as long as the system has the same endianess (i.e. you cannot copy the file between systems with Intel and PPC processors, but Intel-Int...
[ 0.20701530575752258, -0.006138986442238092, 0.3220219016075134, 0.18505074083805084, 0.1294170469045639, -0.33348706364631653, -0.08340124040842056, 0.04631492495536804, -0.1960691213607788, -0.5911425948143005, -0.11939569562673569, 0.7078700065612793, -0.44246068596839905, -0.01593557558...
a try, I highly recommend you use IBPP library to access it. It is a very thin C++ wrapper around Firebird's C API. I has about 10 classes that encapsulate everything and it's dead-easy to use.
[ 0.3170420527458191, 0.04319194704294205, -0.14498195052146912, 0.054910287261009216, -0.014474287629127502, -0.0465959832072258, 0.07916323840618134, 0.32065123319625854, 0.1672269105911255, -0.6115111112594604, 0.2615530788898468, 0.3543710708618164, -0.13139408826828003, -0.0175378471612...
Using the method `Application.Restart()` in C# should restart the current application: but it seems that this is not always working. Is there a reason for this Issue, can somebody tell me, why it doesn't work all the time? There could be a lot of reasons for this. It's not that the method doesn't work; rather, many ti...
[ 0.21058200299739838, 0.18635712563991547, 0.2834213674068451, 0.22047770023345947, 0.27622491121292114, -0.31058549880981445, 0.5099468231201172, 0.22915519773960114, -0.40070411562919617, -0.22728613018989563, -0.2841852605342865, 0.5314092636108398, -0.41312113404273987, 0.09261268377304...
may not be closing fast enough to allow the new one to start up. Check your code for gotchas like that. If you're seeing this behaviour within a blank application, then that's more likely to be a problem with the actual function than your code. Check Microsoft's sourcecode of [application restart](https://referenceso...
[ 0.03495653718709946, 0.014055633917450905, 0.4427821636199951, 0.03221027925610542, 0.2729966640472412, -0.21754661202430725, 0.5628094673156738, 0.28620660305023193, -0.42678555846214294, -0.5804051160812378, -0.4567962884902954, 0.2452874332666397, 0.014649600721895695, 0.109626114368438...
When a customer logs in to my site, I need to know their account id and their menu id. This lets me know what data they can see on a page and what menu they get. I don't want to have to read this data over and over. Should I store this in a session variable or customize the membership user and membership provider to co...
[ 0.5816015601158142, 0.047005508095026016, 0.3222958743572235, -0.16595886647701263, 0.10873155295848846, -0.06021132692694664, 0.2957970201969147, 0.026652660220861435, -0.4236129820346832, -0.8097049593925476, 0.044818952679634094, 0.44424140453338623, 0.1140771433711052, 0.02850445359945...
How do I create an index on the date part of DATETIME field? ``` mysql> SHOW COLUMNS FROM transactionlist; +-------------------+------------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +-------------------+------------------+------+---...
[ -0.17983056604862213, 0.11285476386547089, 0.6044884920120239, 0.029353778809309006, 0.2141912877559662, -0.11683709919452667, -0.030671752989292145, -0.6115444898605347, -0.18415015935897827, -0.43338873982429504, 0.010811910964548588, 0.5251842141151428, -0.33176201581954956, 0.151017621...
| YES | MUL | 0 | | | TranNum | int(11) | YES | MUL | 0 | | | TranDateTime | datetime
[ -0.030052747577428818, -0.3780744969844818, 1.0352414846420288, -0.20372451841831207, 0.3506549894809723, -0.10244517773389816, -0.10388226062059402, 0.15819180011749268, -0.2252376228570938, -0.4212402105331421, -0.4401012659072876, 0.41386908292770386, -0.26810652017593384, -0.0778359398...
| NO | | NULL | | | Amount | double | YES | | 0 | | | Action
[ -0.042212728410959244, -0.13722170889377594, 0.13127343356609344, -0.08565700054168701, -0.17720308899879456, 0.1381065398454666, 0.30829036235809326, -0.5798341631889343, -0.3187813460826874, 0.09107516705989838, -0.18032878637313843, 0.5163137316703796, -0.4029970169067383, 0.09273513406...
| smallint(6) | YES | | 0 | | | Uid | int(11) | YES | | 1 | | | AuthId
[ -0.30872753262519836, 0.002715484471991658, 0.31538426876068115, -0.5204635262489319, -0.18224845826625824, 0.2729165852069855, 0.2628944218158722, -0.435348242521286, -0.08312676846981049, -0.4285011291503906, -0.2152346968650818, 0.39947572350502014, -0.27173104882240295, 0.0019930922426...
| int(11) | YES | | 1 | | +-------------------+------------------+------+-----+---------+----------------+ 8 rows in set (0.00 sec) ``` TranDateTime is used to save the date and time of a transaction as it happens My Table has over 1,000,000 records in it and the statement ``` SE...
[ -0.06199686974287033, -0.020368948578834534, 0.7505449652671814, 0.12692885100841522, 0.2531474530696869, 0.06503332406282425, -0.06248464807868004, -0.31965357065200806, -0.48971664905548096, -0.602925717830658, 0.044341009110212326, 0.7387802600860596, -0.06502405554056168, -0.0392244793...
this blog post on "[Why MySQL’s DATETIME can and should be avoided](http://billauer.co.il/blog/2009/03/mysql-datetime-epoch-unix-time/)" If I remember correctly, that will run a whole table scan because you're passing the column through a function. MySQL will obediently run the function for each and every column, bypas...
[ -0.22210907936096191, 0.01579451374709606, 0.6981728672981262, -0.004042873624712229, -0.06655541807413101, -0.2841900587081909, 0.04779281094670296, 0.19709771871566772, -0.3044205904006958, -0.5521315336227417, -0.019240058958530426, 0.3124402165412903, -0.11840884387493134, 0.3316119611...
I just want a quick way (and preferably not using a while loop)of createing a table of every date between date @x and date @y so I can left outer join to some stats tables, some of which will have no records for certain days in between, allowing me to mark missing days with a 0 Strictly speaking this doesn't exactly an...
[ 0.5539346933364868, 0.08831033855676651, 0.31810808181762695, -0.052348993718624115, 0.06223570927977562, -0.09044253826141357, 0.14865761995315552, 0.26430290937423706, -0.38152340054512024, -0.17700350284576416, 0.15838100016117096, -0.033824510872364044, -0.06528335064649582, 0.41104462...
SELECT 1 UNION ALL SELECT 1 + n FROM numbers WHERE n < 500 ) SELECT DATEADD(day,n-1,'2008/11/01') FROM numbers OPTION ( MAXRECURSION 500 ) ```
[ -0.012897707521915436, -0.26624512672424316, 0.17672480642795563, -0.006480677518993616, 0.3806764781475067, 0.42780789732933044, -0.09308537095785141, -0.3325324058532715, 0.014834483154118061, -0.5460982322692871, -0.2862098217010498, -0.029241371899843216, -0.03291093558073044, 0.380872...
Most of my users have email addresses associated with their profile in `/etc/passwd`. They are always in the 5th field, which I can grab, but they appear at different places within a comma-separated list in the 5th field. Can somebody give me a **regex to grab just the email address** (delimeted by commas) from a line...
[ 0.13323460519313812, 0.3819931149482727, 0.6241805553436279, -0.10467610508203506, -0.04020584374666214, 0.2159479558467865, 0.17887350916862488, 0.008827188983559608, -0.3432184159755707, -0.9114716053009033, -0.031187059357762337, 0.4254887104034424, -0.03378932550549507, 0.0132714752107...
I want to track how much traffic I'm getting on an RSS feed that is set up using .Net 2.0 & SQL Server. Is there an industry standard on what metrics I should use, for example, page hits? Feedburner analysis gives you statistics like: [![alt text](https://i.stack.imgur.com/o5Mj5.png)](https://i.stack.imgur.com/o5Mj5....
[ 0.6136553287506104, -0.1755858212709427, 0.6674004197120667, -0.023115377873182297, 0.03856697678565979, 0.06239142641425133, 0.040120504796504974, -0.16202811896800995, -0.24005883932113647, -0.5168443918228149, 0.10380354523658752, 0.5708383917808533, -0.14577020704746246, -0.09435314685...
I'm programming in C++ on Visual Studio 2005. My question deals with .rc files. You can manually place include directives like (#include "blah.h"), at the top of an .rc file. But that's bad news since the first time someone opens the .rc file in the resource editor, it gets overwritten. I know there is a place to make ...
[ 0.6423819065093994, 0.27825480699539185, -0.07468162477016449, -0.09872975200414658, -0.07554543763399124, -0.30307692289352417, 0.25156721472740173, -0.0029929489828646183, -0.19709452986717224, -0.48724696040153503, 0.013693721033632755, 0.7569122314453125, -0.46119046211242676, -0.02797...
so: ``` 2 TEXTINCLUDE BEGIN "#include ""windows.h""\r\n" "#include ""blah.h\r\n" "\0" END ``` Note the following details: * Each line is contained in quotes * Use pairs of quotes, *e.g.*, "" to place a quote character inline * End each line with \r\n * End the TEXTINCLUDE block with "\0" Statements ...
[ 0.35995280742645264, 0.20648282766342163, 0.6533181667327881, -0.05560337379574776, -0.15993568301200867, -0.10686857253313065, 0.15519486367702484, -0.40540772676467896, 0.06213172897696495, -0.4590165913105011, -0.37724778056144714, 0.6931094527244568, -0.3130899965763092, -0.03717214614...
existing rc file does not already include TEXTINCLUDE blocks, use the new file wizard from the Solution Explorer pane to add a new rc file, then use that as a template.
[ 0.6291362047195435, -0.06807653605937958, 0.4127350449562073, 0.22011686861515045, -0.004033577162772417, -0.34774214029312134, 0.26604169607162476, -0.5784435868263245, -0.12309668958187103, -0.7084274888038635, -0.23092815279960632, 0.33980581164360046, -0.5317142605781555, 0.10413603484...
I have a LINQ to SQL generated class with a readonly property: ``` <Column(Name:="totalLogins", Storage:="_TotalLogins", DbType:="Int", UpdateCheck:=UpdateCheck.Never)> _ Public ReadOnly Property TotalLogins() As System.Nullable(Of Integer) Get Return Me._TotalLogins End Get End Property ``` This pr...
[ 0.04652922973036766, 0.14003914594650269, 0.6947006583213806, -0.07930763065814972, 0.1549626886844635, 0.016021592542529106, 0.13496428728103638, -0.10788005590438843, -0.30200913548469543, -0.4364144206047058, -0.037900060415267944, 0.5662862062454224, 0.04536808654665947, 0.526630997657...
Dim user As User = (from u in dc.Users select u where u.UserName = Username)).FirstOrDefault() user._TotalLogins += 1 dc.SubmitChanges() End Sub ... End Class ``` But the call to user.\_TotalLogins += 1 is not being written to the database? Any thoughts on how to get LINQ to see my changes? Set ...
[ 0.40601712465286255, -0.37705570459365845, 0.9730438590049744, -0.209260955452919, 0.06560712307691574, -0.003056944813579321, 0.22624504566192627, -0.18774300813674927, -0.32741326093673706, -0.42181289196014404, -0.11047929525375366, 0.9326918125152588, -0.3584709167480469, 0.07928364723...
publically as a read-only property: ``` Public ReadOnly Property TotalLogins() As System.Nullable(Of Integer) Get Return Me.InternalTotalLogins End Get End Property ```
[ -0.4256267547607422, 0.2315329760313034, 0.1985868364572525, -0.06574874371290207, -0.15674781799316406, 0.07977784425020218, 0.2499156892299652, 0.17851495742797852, -0.2066146731376648, -0.19331583380699158, -0.41148895025253296, 0.2739897072315216, -0.2949012517929077, 0.434805482625961...
I have a console application that will be kicked off with a scheduler. If for some reason, part of that file is not able to be built I need a GUI front end so we can run it the next day with specific input. Is there as way pass parameters to the application entry point to start the console application or the GUI appli...
[ 0.5934649109840393, 0.44321343302726746, 0.20986968278884888, 0.15126773715019226, 0.0479915626347065, -0.02354186400771141, 0.045126188546419144, -0.027121761813759804, -0.2765252888202667, -0.5373910665512085, 0.00042183499317616224, 0.6001914739608765, 0.16149689257144928, 0.13631561398...
Knight posted code to do what you are asking. However, note that many "hybrid" apps actually ship two different executables (look at visual studio- devenv.exe is the gui, devenv.com is the console). Using a "hybrid" approach can sometimes lead to hard to track down issues.
[ 0.4934534728527069, -0.47171080112457275, 0.16559270024299622, 0.34302642941474915, -0.4806203246116638, -0.04807065799832344, 0.06148073449730873, -0.10101523250341415, -0.04968299716711044, -0.41076284646987915, -0.06704480201005936, 0.7641656994819641, -0.28523677587509155, -0.209728747...
If a class defined an annotation, is it somehow possible to force its subclass to define the same annotation? For instance, we have a simple class/subclass pair that share the `@Author @interface.` What I'd like to do is force each further subclass to define the same `@Author` annotation, preventing a `RuntimeExceptio...
[ 0.3776661455631256, -0.08754492551088333, 0.0517459362745285, -0.03157300129532814, -0.018235454335808754, -0.004303205758333206, 0.1787748634815216, -0.383185476064682, -0.05722847953438759, -0.38931652903556824, -0.0026745551731437445, 0.521734356880188, -0.5246275663375854, 0.1937247961...
public static void main( String[] args ) { System.out.println( "The test class was written by " + getInfo( TestClass.class ) ); System.out.println( "The test subclass was written by " + getInfo( TestSubClass.class ) );
[ -0.021649790927767754, -0.17393329739570618, 0.04645527899265289, -0.2716720402240753, 0.08492444455623627, 0.08933435380458832, 0.5883439779281616, 0.03349929302930832, -0.09795433282852173, -0.15092016756534576, -0.49211108684539795, 0.49923235177993774, -0.7219852209091187, 0.2641616165...
} } ``` TestSubClass.java: ``` @Author( name = "bar" ) public abstract class TestSubClass extends TestClass {} ``` I know I can enumerate all annotations at runtime and check for the missing `@Author`, but I'd really like to do this at compile time, if possible. You can do that with JSR 269, at compile time. See :...
[ 0.017723901197314262, 0.5677053928375244, 0.3448061943054199, -0.19345827400684357, -0.07437064498662949, -0.2307046800851822, 0.6828845143318176, -0.254736989736557, -0.006249073427170515, -0.647773265838623, -0.17458732426166534, 0.25365886092185974, -0.4164768159389496, 0.20141324400901...
Had a conversation with a coworker the other day about this. There's the obvious using a constructor, but what are the other ways there? There are four different ways to create objects in java: **A**. Using `new` keyword This is the most common way to create an object in java. Almost 99% of objects are created in ...
[ 0.13080276548862457, 0.18981288373470306, 0.14290307462215424, -0.19202080368995667, 0.001015564426779747, 0.034002359956502914, 0.3344561457633972, -0.1721329391002655, -0.3658786714076996, -0.8681931495666504, -0.11065700650215149, 0.48288774490356445, -0.35309210419654846, 0.27596673369...
used to create a copy of an existing object. ``` MyObject anotherObject = new MyObject(); MyObject object = (MyObject) anotherObject.clone(); ``` **D**. Using `object deserialization` Object deserialization is nothing but creating an object from its serialized form. ``` ObjectInputStream inStream = new ObjectInp...
[ 0.11107303202152252, -0.12719960510730743, 0.4080149829387665, -0.16517320275306702, 0.08403348922729492, -0.12857654690742493, 0.28279706835746765, -0.090080626308918, -0.32664841413497925, -0.7890758514404297, -0.06472837924957275, 0.3809955418109894, -0.6135280132293701, 0.3193271458148...
Does anyone know whether there's a way to mock Entity Data Provider so Unit Tests don't hit the live data? I found this blog but it seems the project hasn't been released: <http://www.chrisdoesdev.com/index.php/archives/62> Thanks Mattwar has a [great article on his blog](http://blogs.msdn.com/mattwar/archive/2008/0...
[ 0.3618910610675812, 0.13229112327098846, 0.22194260358810425, 0.32302406430244446, -0.29038605093955994, -0.27554842829704285, 0.6893814206123352, 0.1654479205608368, -0.2063741534948349, -0.26005858182907104, 0.2812640070915222, 0.30219766497612, 0.12877735495567322, 0.1985136717557907, ...
I'd like to create a hotkey to search for files **under a specific folder** in Windows XP; I'm using AutoHotkey to create this shortcut. Problem is that I need to know a command-line statement to run in order to open the standard Windows "Find Files/Folders" dialog. I've googled for a while and haven't found any page ...
[ 0.18175390362739563, 0.029406381770968437, 0.35285452008247375, 0.07554695755243301, 0.12352783977985382, -0.25885891914367676, 0.41563114523887634, 0.2687777280807495, -0.2233617752790451, -0.7163094282150269, -0.02047504112124443, 0.8008553981781006, -0.09379573911428452, 0.1106702089309...
a folder in XP, so I assume there's some way I could do it on the command line...? from <http://www.pcreview.co.uk/forums/thread-1468270.php> ``` @echo off echo CreateObject("Shell.Application").FindFiles >%temp%\myff.vbs cscript.exe //Nologo %temp%\myff.vbs del %temp%\myff.vbs ```
[ 0.3987075984477997, 0.27379903197288513, 0.43507513403892517, -0.23143459856510162, -0.013777713291347027, -0.16862539947032928, 0.6024449467658997, -0.28834864497184753, -0.4028758108615875, -0.24853529036045074, -0.1632140725851059, 0.4430833160877228, -0.2912713885307312, -0.01583536155...
There's a diagram depicting the difference between traditional MVC and Cocoa MVC here: [Cocoa Design Patterns: The Model-View-Controller Design Pattern](http://developer.apple.com/documentation/Cocoa/Conceptual/CocoaFundamentals/CocoaDesignPatterns/CocoaDesignPatterns.html#//apple_ref/doc/uid/TP40002974-CH6-SW1) Are ...
[ 0.22147132456302643, 0.030707817524671555, 0.10946054756641388, 0.12390674650669098, -0.2611202001571655, -0.15975749492645264, -0.11288841813802719, -0.0082618473097682, -0.6305719017982483, -0.5279800891876221, 0.014144944958388805, 0.5876520872116089, -0.12437628209590912, -0.1717427521...
explained to them, because the loosely-coupled design will just seem "weird" to them. Oh, right - the advantages of that design include greater re-usability of the UI view and model classes (since they won't have any knowledge of each other), slightly simpler code in the view classes, and more of the "application logi...
[ 0.1782049983739853, -0.11341103911399841, 0.48724594712257385, 0.49358829855918884, 0.2057924121618271, -0.37733787298202515, 0.056336551904678345, -0.18602077662944794, -0.17204533517360687, -0.5539199709892273, -0.08079439401626587, 0.29266485571861267, 0.04811827465891838, 0.10254598408...
The documentation indicates that the error: option function will make available: XHR instance, a status message string (in this case always error) and an optional exception object returned from the XHR instance (Book: JQuery in Action) Using the following (in the $.ajax call) I was able to determine I had a "parsererr...
[ -0.16553372144699097, 0.09416381269693375, 0.17546984553337097, 0.11041579395532608, 0.0948534831404686, 0.013154983520507812, 0.4255814552307129, -0.10251422226428986, -0.07206196337938309, -0.6198029518127441, -0.3160174489021301, 0.8411197662353516, -0.16677328944206238, -0.293402403593...
and exception object would be helpful This is a complete $.ajax call: ``` $.ajax({ type: "post", url: "http://myServer/cgi-bin/broker" , dataType: "text", data: { '_service' : 'myService', '_program' : 'myProgram', 'start' : start, 'end' : end }, beforeSend: function() { $("#loading").removeClass("hide");...
[ -0.13996097445487976, -0.13987502455711365, 0.383393794298172, -0.09628243744373322, -0.018180765211582184, 0.06866702437400818, 0.36526551842689514, -0.32043686509132385, -0.21863576769828796, -0.580007016658783, -0.3906692564487457, 0.6218106150627136, -0.3032114803791046, -0.03835760802...
// End ajax method ``` Thanks for the input Looking at the jQuery source code, there are four returned statuses, in additon to **success**: * **timeout** - when your specified timeout is exceeded * **error** - http error, like 404 * **notmodified** - when requested resource was not modified since last request * **pa...
[ -0.29975971579551697, -0.05655159801244736, 0.49233970046043396, 0.09902618825435638, -0.2536819577217102, 0.13528689742088318, 0.14584091305732727, -0.11441266536712646, -0.09011417627334595, -0.5633341670036316, -0.08260351419448853, 0.524899423122406, -0.0235981997102499, -0.32306608557...
In XNA, how do I load in a texture or mesh from a file without using the content pipeline? I believe Texture2D.FromFile(); is what you are looking for. It does not look like you can do this with a Model though. <http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.graphics.texture2d.fromfile.aspx>
[ -0.012944662943482399, -0.3492015302181244, 0.18011464178562164, -0.21374580264091492, -0.20776502788066864, -0.16944564878940582, -0.0788906142115593, 0.012995203025639057, -0.2526475787162781, -0.8819157481193542, 0.15662021934986115, 0.3973257541656494, -0.22702936828136444, 0.023680040...
Suppose I want to open a file in an existing Emacs session using `su` or `sudo`, without dropping down to a shell and doing `sudoedit` or `sudo emacs`. One way to do this is ``` C-x C-f /sudo::/path/to/file ``` but this requires an expensive [round-trip through SSH](http://www.gnu.org/software/tramp/). Is there a mo...
[ -0.006865294650197029, -0.04405738413333893, 0.19097335636615753, -0.06099119782447815, -0.053424980491399765, -0.05246764048933983, 0.2532922625541687, 0.005614477675408125, -0.19283880293369293, -0.6768528819084167, -0.11658372730016708, 0.4421972632408142, -0.23902015388011932, 0.079660...
only pay for that round-trip to SSH when you open the first file. Sudo then caches your credentials, and Emacs saves a handle, so that subsequent sudo-opened files take much less time. I haven't found the extra time it takes to save burdening, either. It's fast enough, IMO.
[ 0.13900844752788544, -0.0492597296833992, 0.19766582548618317, 0.3288220763206482, -0.07027548551559448, 0.055910639464855194, 0.12349216639995575, -0.10251396894454956, -0.1598891317844391, -0.6868429780006409, -0.0667925775051117, 0.4414650499820709, 0.06844565272331238, -0.0399437211453...
What does a JIT compiler specifically do as opposed to a non-JIT compiler? Can someone give a succinct and easy to understand description? A JIT compiler runs **after** the program has started and compiles the code (usually bytecode or some kind of VM instructions) on the fly (or just-in-time, as it's called) into a fo...
[ 0.2975275218486786, -0.0681048184633255, -0.04266614466905594, 0.2847438454627991, -0.3011157512664795, -0.19210153818130493, 0.205061674118042, 0.06494010984897614, 0.12791866064071655, -0.6442776322364807, -0.24782231450080872, 0.3884144425392151, -0.2294672727584839, -0.0050013735890388...
code to machine language **before** the program is first run. To paraphrase, conventional compilers build the whole program as an EXE file BEFORE the first time you run it. For newer style programs, an assembly is generated with pseudocode (p-code). Only AFTER you execute the program on the OS (e.g., by double-clickin...
[ 0.4996695816516876, 0.09064912050962448, -0.13474874198436737, 0.07408850640058517, -0.18473540246486664, -0.08919458836317062, 0.5814616084098816, 0.3038169741630554, 0.11340812593698502, -0.63054358959198, -0.5104336142539978, 0.49924561381340027, -0.4464150667190552, -0.0570938959717750...
Long story short, I have a substantial Python application that, among other things, does outcalls to "losetup", "mount", etc. on Linux. Essentially consuming system resources that must be released when complete. If my application crashes, I want to ensure these system resources are properly released. Does it make sen...
[ 0.236199751496315, 0.3484044671058655, 0.11087646335363388, -0.10577084869146347, 0.3108859062194824, -0.4592248201370239, 0.425996869802475, 0.21368061006069183, -0.3816598951816559, -0.34329113364219666, -0.19961656630039215, 0.6354783177375793, -0.25896844267845154, 0.18683792650699615,...
cleanup() raise ``` Is this something that is typically done? Is there a better way? Perhaps the destructor in a singleton class? I like top-level exception handlers in general (regardless of language). They're a great place to cleanup resources that may not be immediately related to resources consumed inside...
[ 0.5011254549026489, 0.07210686057806015, -0.3699409067630768, 0.17051145434379578, -0.08310095965862274, -0.2279384434223175, 0.2615280747413635, -0.06610256433486938, -0.5347169637680054, -0.48281532526016235, -0.08660861849784851, 0.4578017592430115, -0.10793676972389221, -0.093212492763...
future, otherwise, you may never know about them at all. Just be careful that your top-level handler doesn't throw exceptions!
[ 0.47287946939468384, -0.29304012656211853, 0.028715014457702637, 0.4724578261375427, 0.5115175247192383, -0.3531913161277771, 0.20427970588207245, 0.28279200196266174, -0.32063013315200806, -0.6044615507125854, -0.1482275277376175, 0.33638691902160645, -0.2705411911010742, -0.1092905253171...
There are various ways to maintain user state using in web development. These are the ones that I can think of right now: 1. Query String 2. Cookies 3. Form Methods (Get and Post) 4. Viewstate (ASP.NET only I guess) 5. Session (InProc Web server) 6. Session (Dedicated web server) 7. Session (Database) 8. Local Persis...
[ 0.22330772876739502, 0.17919224500656128, 0.4269894063472748, 0.36338579654693604, -0.06763558089733124, -0.10499715059995651, 0.6233327984809875, 0.03824356943368912, -0.38958975672721863, -0.7470834255218506, 0.16284464299678802, 0.878119945526123, -0.19365637004375458, 0.101346209645271...
what methods to avoid. What I would like to know is what method(s) do you generally use and would recommend or more interestingly which of these methods would you like to avoid in certain scenarios and why? While this is a very complicated question to answer, I have a few quick-bite things I think about when consideri...
[ 0.17969506978988647, -0.18843165040016174, 0.05608988553285599, 0.3473183512687683, -0.20600813627243042, -0.11539280414581299, 0.48987501859664917, -0.05197448655962944, -0.20245864987373352, -0.6336731910705566, 0.13000665605068207, 0.46863749623298645, -0.36390167474746704, -0.034200727...
string state is horribly insecure, difficult to implement, and in order to do it justice, it needs to be tied to some server-side state machine by containing a key to tie the client to the server's maintained state for that client. * Cookie state is more or less the same -- it's just fancier than query string state. Bu...
[ -0.018164940178394318, -0.06572342664003372, 0.25250184535980225, 0.20737318694591522, -0.2447267323732376, -0.32590001821517944, 0.4723837375640869, -0.06331969052553177, -0.1765628457069397, -0.6659102439880371, -0.09756257385015488, 0.1361822634935379, -0.37519872188568115, 0.4195680022...
form to some bit of data on the back end (e.g., "this user is editing record #512, so the form will contain a hidden input with the value 512"). It's not useful for much else, and again, is just another implementation of the same idea behind query string and cookie state. * Session state (any of the ways you describe) ...
[ 0.24939650297164917, -0.05160888284444809, 0.15857155621051788, 0.1759192943572998, -0.08522104471921921, -0.39379385113716125, 0.4370509386062622, -0.08068303763866425, -0.2692885994911194, -0.7960131168365479, -0.19043982028961182, 0.7241992354393005, -0.21092714369297028, -0.03851114958...
on the server; this is where most web frameworks provide either a cookie-based or query string-based key back to the client. (Almost every modern one uses cookies, but falls back on query strings if cookies aren't enabled.) The second caveat is that you need to put some though into how you're storing your state... will...
[ 0.1516544073820114, 0.08987236768007278, 0.08138901740312576, 0.2060215026140213, 0.10128720104694366, -0.029377136379480362, 0.3691708445549011, -0.021594982594251633, -0.2185840606689453, -0.6802751421928406, -0.02228889986872673, 0.40368953347206116, -0.07412628084421158, 0.150962442159...
likely to create security holes and functionality breakage that's been hashed out over time in any of the mature frameworks. So I guess I can't really imagine not wanting to use session-based state for anything but the most trivial reason.
[ 0.20968009531497955, 0.23649676144123077, -0.10527435690164566, 0.3368254601955414, -0.1951548159122467, -0.25729045271873474, 0.6804097890853882, 0.4130013585090637, -0.2485206425189972, -0.5475537776947021, 0.1674160361289978, 0.5230206251144409, -0.13389858603477478, 0.27156123518943787...
We'd like a trace in our application logs of these exceptions - by default Java just outputs them to the console. There is a distinction between uncaught exceptions in the EDT and outside the EDT. [Another question has a solution for both](https://stackoverflow.com/questions/75218/how-can-i-detect-when-an-exceptions-b...
[ 0.30670928955078125, -0.005655916407704353, -0.2650059759616852, -0.022323744371533394, -0.13062946498394012, -0.13952231407165527, 0.2769142687320709, -0.02231932431459427, -0.14563919603824615, -0.38792356848716736, -0.02966400422155857, 0.33176836371421814, -0.44253140687942505, -0.0020...
// don't let the exception get thrown out, will cause infinite looping! } } public static void registerExceptionHandler() { System.setProperty('sun.awt.exception.handler', AWTExceptionHandler.class.getName()) } } ```
[ 0.188650444149971, -0.20789989829063416, -0.02154737338423729, -0.059883810579776764, 0.24903085827827454, -0.12073282152414322, 0.398235946893692, -0.23662875592708588, -0.09122133255004883, -0.5043973922729492, -0.26969826221466064, 0.5312828421592712, -0.4370483160018921, 0.168146744370...
The name of a temporary table such as #t1 can be determined using ``` select @TableName = [Name] from tempdb.sys.tables where [Object_ID] = object_id('tempDB.dbo.#t1') ``` How can I find the name of a table valued variable, i.e. one declared by ``` declare @t2 as table (a int) ``` the purpose is to be able to g...
[ 0.019974617287516594, -0.05573654919862747, 0.4544285535812378, 0.08674956858158112, -0.15730895102024078, 0.06585410237312317, -0.09126577526330948, -0.05891596898436546, -0.28933387994766235, -0.5684217214584351, -0.28860902786254883, 0.06745193153619766, -0.4132997393608093, 0.225622117...
where do you look for table valued variables? --- I realize now that I can't do what I wanted to do, which is write a generic function for formatting table valued variables into html tables. For starters, in sql server 2005 you can't pass table valued parameters: <http://www.sqlteam.com/article/sql-server-2008-table...
[ -0.2731821537017822, 0.1797126978635788, 0.5265783667564392, 0.04638988897204399, -0.3408742845058441, -0.21922825276851654, 0.07428041845560074, -0.10777948051691055, -0.37936291098594666, -0.19115473330020905, 0.406599223613739, 0.5054931044578552, -0.33046218752861023, 0.191946774721145...
I'm looking for the total [commit charge](http://en.wikipedia.org/wiki/Commit_charge). ``` public static long GetCommitCharge() { var p = new System.Diagnostics.PerformanceCounter("Memory", "Committed Bytes"); return p.RawValue; } ```
[ 0.22830112278461456, -0.12355216592550278, 0.2936128079891205, -0.09650614112615585, 0.22628866136074066, 0.046568602323532104, 0.17296290397644043, -0.2036665678024292, -0.31446680426597595, -0.44174906611442566, -0.3532126545906067, 0.8237035274505615, -0.09484127163887024, 0.08314593136...
I'm not really asking about how programmers learn how to program. More about specific technologies. If I wanted to learn Hibernate, how do I know what I should know prior to Hibernate? Should I learn JPA before, during or after Hibernate? Is there a better solution to Hibernate? (And I'm not really looking for informat...
[ 0.7666317820549011, -0.00450812466442585, 0.019015483558177948, 0.41439974308013916, -0.17131559550762177, 0.03070528618991375, 0.33026596903800964, 0.1319163292646408, -0.04337617754936218, -0.6923646926879883, 0.018692128360271454, 0.3319501578807831, 0.16495174169540405, -0.076735071837...