text
stringlengths
0
30.5k
title
stringclasses
1 value
embeddings
listlengths
768
768
and that way you promise that you've written that single method to clean up your unmanaged resources: ``` public void Dispose() { Win32.DestroyHandle(this.CursorFileBitmapIconServiceHandle); } ``` And you're done. **Except you can do better.** --- What if your object has allocated a 250MB **[System.Drawing.Bitm...
[ 0.4900634288787842, 0.21470801532268524, 0.1222948431968689, 0.23778657615184784, 0.08642784506082535, -0.25625696778297424, 0.13570600748062134, -0.333503782749176, -0.46566590666770935, -0.6498692035675049, -0.07305249571800232, 0.3660130500793457, -0.2846415638923645, 0.3037296831607818...
that connection sitting open, waiting for the GC to finalize the object. If the user has called `Dispose()` (meaning they no longer plan to use the object) why not get rid of those wasteful bitmaps and database connections? So now we will: * get rid of unmanaged resources (because we have to), and * get rid of manag...
[ 0.4309893250465393, 0.05442485213279724, 0.18311738967895508, 0.28150007128715515, 0.30529874563217163, -0.5432398915290833, 0.2957489490509033, -0.1877164989709854, -0.2756052315235138, -0.6695333123207092, -0.2517620027065277, 0.641007125377655, -0.5096213221549988, 0.4282255172729492, ...
this.databaseConnection.Dispose(); this.databaseConnection = null; } if (this.frameBufferImage != null) { this.frameBufferImage.Dispose(); this.frameBufferImage = null; } } ``` And all is good, **except you can do better**! --- What if the person **forgot** to call `Dispose()` on your ...
[ 0.42993953824043274, 0.16942842304706573, 0.4641065299510956, 0.034114181995391846, 0.4211454689502716, -0.5433818101882935, 0.47645384073257446, -0.16636548936367035, -0.29092323780059814, -0.6891130805015564, -0.2800890803337097, 0.7374110221862793, -0.48948362469673157, 0.23970788717269...
any managed objects you use (e.g. the `Bitmap` and the `DbConnection`). If the person forgot to call `Dispose()`, we can *still* save their bacon! We still have a way to call it *for* them: when the garbage collector finally gets around to freeing (i.e. finalizing) our object. > **Note:** The garbage collector will e...
[ 0.1451321542263031, -0.10816681385040283, 0.32540714740753174, 0.3071407675743103, -0.051135629415512085, -0.4530200958251953, 0.23168008029460907, 0.06979311257600784, -0.6292216181755066, -0.6845649480819702, -0.538068950176239, 0.28232407569885254, -0.3220992684364319, 0.509930670261383...
our object by the Garbage collector is the *perfect* time to free those pesky unmanaged resources. We do this by overriding the `Finalize()` method. > **Note:** In C#, you don't explicitly override the `Finalize()` method. > You write a method that *looks like* a **C++ destructor**, and the > compiler takes that to be...
[ 0.34459352493286133, -0.0013050558045506477, 0.30201584100723267, 0.26170146465301514, 0.2765674889087677, -0.1676035225391388, 0.2700423002243042, -0.1764458566904068, -0.1392085701227188, -0.6427558064460754, -0.3286435306072235, 0.4600997269153595, -0.12766492366790771, 0.29602000117301...
know the order in which two objects are destroyed. It is entirely possible that in your `Dispose()` code, the **managed** object you're trying to get rid of (because you wanted to be helpful) is no longer there: ``` public void Dispose() { //Free unmanaged resources Win32.DestroyHandle(this.gdiCursorBitmapStream...
[ 0.36732372641563416, -0.13914096355438232, 0.03239139914512634, 0.07963083684444427, 0.35711029171943665, -0.4585955739021301, 0.45054757595062256, -0.2069660723209381, -0.40962281823158264, -0.7983639240264893, -0.31193822622299194, 0.7312827706336975, -0.45102405548095703, 0.463924407958...
//<-- crash, GC already destroyed it this.frameBufferImage = null; } } ``` So what you need is a way for `Finalize()` to tell `Dispose()` that it should **not touch any managed** resources (because they *might not be there* anymore), while still freeing unmanaged resources. The standard pattern to do this i...
[ 0.12576481699943542, -0.3162638247013092, 0.2840874195098877, -0.08373869210481644, 0.25812360644340515, -0.28614744544029236, 0.2037135809659958, -0.3033248782157898, -0.19104284048080444, -0.5370776057243347, -0.44683024287223816, 0.5177685022354126, -0.14573895931243896, 0.2491701841354...
is tradition to call it `Dispose(Boolean)`: ``` protected void Dispose(Boolean disposing) ``` But a more helpful parameter name might be: ``` protected void Dispose(Boolean itIsSafeToAlsoFreeManagedObjects) { //Free unmanaged resources Win32.DestroyHandle(this.CursorFileBitmapIconServiceHandle); //Free ma...
[ 0.29145708680152893, -0.10273934155702591, 0.028279056772589684, 0.1626373827457428, 0.36748331785202026, -0.4567232131958008, 0.24261248111724854, -0.22255539894104004, -0.3865465819835663, -0.6446169018745422, -0.28241676092147827, 0.6652078032493591, -0.2266385704278946, 0.5554636716842...
this.databaseConnection = null; } if (this.frameBufferImage != null) { this.frameBufferImage.Dispose(); this.frameBufferImage = null; } } } ``` And you change your implementation of the `IDisposable.Dispose()` method to: ``` public void Dispose() { Dispose(true); //I a...
[ 0.19510069489479065, -0.13599419593811035, 0.3533385992050171, -0.05345749855041504, 0.22073884308338165, -0.247369185090065, 0.4239678382873535, -0.4491760730743408, -0.1122332215309143, -0.5662931203842163, -0.22799983620643616, 0.7055634260177612, -0.5171170830726624, 0.3144900202751159...
an object that implements `Dispose`, then don't forget to call their **base** Dispose method when you override Dispose: ``` public override void Dispose() { try { Dispose(true); //true: safe to free managed resources } finally { base.Dispose(); } } ``` And all is good, **excep...
[ 0.3849663734436035, 0.16260358691215515, 0.21973608434200287, -0.05564126744866371, 0.3892844617366791, -0.615888237953186, 0.4798436164855957, -0.3258156180381775, -0.25031447410583496, -0.6660244464874268, -0.4493255615234375, 0.7618498206138611, -0.2483440786600113, 0.13808326423168182,...
will then call `Dispose` again. Not only is this wasteful, but if your object has junk references to objects you already disposed of from the **last** call to `Dispose()`, you'll try to dispose them again! You'll notice in my code I was careful to remove references to objects that I've disposed, so I don't try to cal...
[ 0.3389381468296051, 0.1771775633096695, 0.3317020833492279, -0.037431083619594574, 0.09887907654047012, -0.20159485936164856, 0.24708878993988037, -0.18328244984149933, -0.4360138177871704, -0.741202175617218, -0.009251103736460209, 0.7714716792106628, -0.3206000328063965, 0.41886299848556...
//Free unmanaged resources Win32.DestroyHandle(this.CursorFileBitmapIconServiceHandle); //<--double destroy ... } ``` The way you fix this is tell the garbage collector that it doesn't need to bother finalizing the object – its resources have already been cleaned up, and no more work is needed. You do this by ...
[ 0.272616446018219, 0.03331752493977547, 0.2593332827091217, -0.04086368903517723, 0.2015470564365387, -0.45975261926651, 0.17946043610572815, -0.3109009563922882, -0.33486121892929077, -0.6365474462509155, -0.5226172804832458, 0.8112382888793945, -0.3693617582321167, 0.32682666182518005, ...
everything's taken care of. Couldn't I use Finalize to cleanup unmanaged resources? ------------------------------------------------------- The documentation for [`Object.Finalize`](https://msdn.microsoft.com/en-us/library/system.object.finalize.aspx) says: > The Finalize method is used to perform cleanup operations...
[ 0.11441224068403244, -0.09749595075845718, 0.40592247247695923, 0.21642696857452393, 0.4386247396469116, -0.24075426161289215, 0.1689184457063675, -0.39895910024642944, -0.3873869776725769, -0.612929105758667, -0.5245927572250366, 0.508476197719574, -0.06523677706718445, 0.1570880115032196...
automatically calls the destructor of its base class. } ``` The problem with that is you have no idea when the garbage collector will get around to finalizing your object. Your un-managed, un-needed, un-used native resources will stick around until the garbage collector *eventually* runs. Then it will call your final...
[ -0.07906623929738998, -0.20692020654678345, 0.2883492410182953, -0.08936411887407303, 0.13591256737709045, -0.24257224798202515, 0.363141268491745, -0.4317519962787628, -0.22132548689842224, -0.8858707547187805, -0.48671117424964905, 0.6143441200256348, -0.21327337622642517, 0.328114449977...
get to know, and control, when unmanaged resource are cleaned up. Their destruction is *"deterministic"*. --- To answer your original question: Why not release memory now, rather than for when the GC decides to do it? I have a facial recognition software that *needs* to get rid of 530 MB of internal images **now**, s...
[ 0.27265623211860657, -0.20545053482055664, 0.4242148697376251, 0.5053568482398987, 0.3862973153591156, -0.2841492295265198, 0.15332098305225372, 0.03050706908106804, -0.3533605635166168, -0.46650972962379456, -0.3933083117008209, 0.4342260956764221, -0.14238569140434265, 0.2015423923730850...
by Pearson Publishing](http://ptgmedia.pearsoncmg.com/images/0201634465/samplechapter/chap01.pdf) * magnet: 84bf0b960936d677190a2be355858e80ef7542c0 In 35 pages he explains the problems of using binary objects, and invents COM before your eyes. Once you realize the *why* of COM, the remaining 300 pages are obvious, an...
[ -0.08761753141880035, 0.1571572870016098, -0.008065507747232914, 0.3799847960472107, -0.17067745327949524, 0.16000902652740479, 0.37862494587898254, -0.11204610764980316, -0.04158243164420128, -0.49938711524009705, -0.18723836541175842, 0.3203458786010742, -0.3862580955028534, -0.089216932...
I wanna rewrite links like `index.php?page=entry&id=15&action=edit` to `entry/15/edit`. This is how my .htaccess looks like now: ``` # Turn the Rewrite engine on RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f # Rewrite rules RewriteRule ^([^/]*)(/([^/]*)/?)([^/]*)?$ index...
[ 0.05635698139667511, 0.2269715964794159, 0.7439359426498413, -0.11611476540565491, 0.18843108415603638, 0.08872159570455551, 0.6823404431343079, -0.1671135574579239, -0.31646597385406494, -0.7681574821472168, 0.09231783449649811, 0.6737950444221497, -0.38362008333206177, 0.2808585464954376...
Pretty simple question, I'm writing an XML document and i'm not sure how to write "]]>" without it being seen as the end of the section. You can do it like this: ``` ]]>]]&gt;<![CDATA[ ``` This ends up breaking the CDATA section in two parts, but it's what you have to do.
[ 0.15667898952960968, 0.2057850956916809, 0.2824890911579132, -0.002989970613270998, -0.11351872980594635, -0.5028098821640015, 0.1414143294095993, -0.13015232980251312, 0.0861339122056961, -0.21002764999866486, -0.33518514037132263, 0.3183387517929077, -0.29116544127464294, -0.161757111549...
The scenario is this. A web page contains: * some DIVs whose visibility can be toggled with a javascript (fired from an hyperlink) * a Submit button, whose response takes about 5 seconds The hyperlink code is ``` <a href="javascript:void null;" onclick="MyFunction()">foo</a> ``` The User: 1. Presses Submit. 2. Wh...
[ -0.15329605340957642, -0.29552584886550903, 0.6255465745925903, -0.20937161147594452, -0.3509218990802765, -0.08720730245113373, 0.4617646336555481, -0.1257597655057907, -0.1216132715344429, -0.8558401465415955, -0.2930539846420288, 0.5987148880958557, -0.3899361193180084, -0.1060319095849...
we navigate to the next page. Does anyone know what might be causing this? Is it a known IE6 issue? Yup, this is the **IE6** issue with **GET** requests *triggered from a Javascript action* on a *hyperlink* (**where the href is set to 'javascript:...'**). > e.g. if your JavaScript calls > `someForm.submit()` and the...
[ 0.10679461807012558, 0.015501783229410648, 0.8465038537979126, 0.11745808273553848, -0.11296168714761734, -0.251552939414978, 0.7249787449836731, -0.06807529181241989, -0.007279315497726202, -0.8443160057067871, -0.22917219996452332, 0.6132490634918213, -0.3316216468811035, 0.2744738459587...
^^^^^^^^^^^^^ ```
[ 0.007464627269655466, 0.749384880065918, 0.34604713320732117, 0.04298064857721329, -0.06451241672039032, -0.22499163448810577, 0.13112232089042664, -0.150346577167511, 0.011548292823135853, -0.5231331586837769, -0.36329707503318787, 0.30899155139923096, -0.31332945823669434, 0.283604949712...
Can you make file copying faster through multiple threading? **Edit**: To clarify, suppose you were implementing CopyFile(src, tgt). It seems logical that under certain circumstances you could use multiple threads to make it go faster. **Edit** Some more thoughts: Naturally, it depends on the HW/storage in question....
[ 0.6459200382232666, -0.1781846433877945, 0.1434784084558487, 0.4304686486721039, -0.016395585611462593, -0.0837227925658226, -0.19493570923805237, 0.12421372532844543, -0.6642012596130371, -0.8524843454360962, 0.22449062764644623, 0.6743823885917664, -0.13578394055366516, 0.037196900695562...
(up to 2x) when reading/writing from different disks, why isn't this the default implementation of CopyFile? (or is it?) You can see a benefit particularly if the files are on different devices in which case the I/O can be very effectively overlapped. However, there are also cases where where you could easily cause th...
[ 0.1790354698896408, -0.21471528708934784, 0.5338929295539856, 0.4060295820236206, 0.07632575184106827, -0.35724112391471863, -0.19448073208332062, -0.07859673351049423, -0.5309295058250427, -0.7966907024383545, -0.04702301323413849, 0.9728200435638428, -0.262398898601532, -0.08140482008457...
of CopyFile? (or is > it?) I don't know the internals of `CopyFile()`, but I wouldn't be surprised if they do not do it for a couple reasons: 1. if they were to implement it using an additional thread (or threads) that might be a bit more intrusive to a process than is appropriate (especially if the process is singl...
[ 0.6157055497169495, 0.11319978535175323, 0.10530277341604233, 0.11855349689722061, 0.027204131707549095, -0.4003888964653015, 0.3136800229549408, 0.008756939321756363, -0.3916242718696594, -0.49282699823379517, -0.008757311850786209, 0.666109025478363, -0.4612926244735718, 0.14239834249019...
to generically determine when you'll get a benefit as opposed to a detriment. This is not to say it couldn't or shouldn't be done (or even that it isn't done - I don't know) - these are just a couple possible reasons why it might not be done.
[ 0.9199291467666626, -0.013790084049105644, 0.25566956400871277, 0.10732454806566238, -0.25338271260261536, -0.13925187289714813, 0.2448989301919937, -0.18074220418930054, -0.02997283637523651, -0.21700096130371094, 0.3895650804042816, 0.40862494707107544, -0.019270217046141624, 0.106816776...
I was looking at Blogengine.NET today and he has an interesting setup for Themes, figured I wanted to do something similar, however.. I can't make it work at all. For each theme he has a folder like: /themes/Indigo/ /themes/Standard/ /themes/Mobile/ Each theme contains a site.master and they all have their own cod...
[ 0.35568293929100037, 0.06492803245782852, 0.40130189061164856, 0.12567107379436493, -0.18800002336502075, -0.13862918317317963, 0.11606781929731369, -0.00028096651658415794, -0.49584197998046875, -0.7963714003562927, 0.010020716115832329, 0.3416869342327118, -0.499677836894989, 0.410199940...
I thought it didn't work ``` Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) has multiple definitions with identical signatures ``` I'm pretty new to this but is there a way to make this work or is it something that just works in C#? I would like to get different masterpages and userco...
[ 0.3606295883655548, -0.051841434091329575, 0.32628750801086426, 0.22224950790405273, -0.1426771581172943, -0.32186925411224365, 0.47075507044792175, -0.14906257390975952, -0.4608425199985504, -0.7274534106254578, 0.02425445429980755, 0.3012860417366028, -0.16724608838558197, 0.239453539252...
in a .NET Web Application. Maybe someone else can explain why, I just know that's the case. So this works in a .NET Web Site: ``` Me.MastePageFile = "~/themes/" & Theme & "/site.master" ``` But it won't work in a .NET Web Applications since there can only be one site.master. Makes me wonder if there is another goo...
[ 0.4519818425178528, 0.1539549082517624, 0.398411363363266, 0.17624157667160034, -0.19929082691669464, -0.47462719678878784, 0.30174288153648376, 0.054289527237415314, -0.2683001756668091, -0.8766732215881348, -0.16515237092971802, 0.47652268409729004, -0.27552279829978943, 0.23716846108436...
I'm creating my own JavaScript Array-like object and I have methods that call closures. I was just wondering where was the most efficient place to define a closure. For example, imagine I have a map function and a chop function: ``` MyObject.prototype = { map: function(fn) { ... applies fn to each element ... }; ...
[ -0.41964834928512573, 0.004436633549630642, -0.09528134763240814, -0.2565526068210602, -0.012874978594481945, 0.40740734338760376, -0.04165567085146904, 0.10801516473293304, -0.2475874125957489, -0.8274065256118774, -0.14894120395183563, 0.2711459994316101, -0.5252245664596558, -0.01631495...
function(fn) { ... applies fn to each element ... }; __chop: function(element) { ... chop off last character ... } chop: function() { this.map(this.__chop) }; } ``` The second one is more efficient. This ``` chop: function() { map( function(element) { ... chop off last characte...
[ -0.5384907722473145, -0.360458105802536, 0.34189850091934204, -0.4296811819076538, -0.03478863835334778, 0.3587581515312195, -0.06071016192436218, -0.40734878182411194, -0.0953284353017807, -0.6536946296691895, -0.5237413048744202, 0.8167070746421814, -0.3784012198448181, -0.29923340678215...
lingering references to the new object, it can be immediately gargage collected, but it's still bad practice to create more objects than necessary. I'd suggest the following pattern: ``` MyObject.prototype = (function() { function map(fn) { ... } function chopElement(element) { ... } function chop() { ...
[ -0.22178925573825836, -0.1580572873353958, 0.12179451435804367, -0.15524828433990479, 0.08076690882444382, 0.0708942860364914, -0.07391034066677094, 0.007897673174738884, -0.33460307121276855, -0.9671927690505981, -0.28868696093559265, 0.333619087934494, -0.38293394446372986, -0.0396851226...
I have some JS code which generates the following object, ``` return { "type": "some thing", "width": 2, "colour": "#AA12BB", "values": [2,3,4] } ``` The creation of this isn't a problem. In writing the test for the method that returns this am having a problem accessing the width/type attributes: ...
[ 0.2280084490776062, 0.21053627133369446, 0.18108296394348145, -0.1918996125459671, -0.18998190760612488, 0.01766950637102127, 0.5039499998092651, -0.22969920933246613, -0.04474212974309921, -0.2849055528640747, -0.29813912510871887, 0.594459056854248, -0.16322846710681915, -0.0920851081609...
thing', jsonObj["type"]); assertEquals(2, jsonObj["width"]); ```
[ -0.07085774093866348, 0.008514628745615482, 0.28157371282577515, -0.2155599445104599, -0.2617449164390564, 0.07226172089576721, 0.720171332359314, -0.45898300409317017, -0.05888678506016731, -0.14903032779693604, -0.40086400508880615, 0.9317298531532288, 0.02971944771707058, 0.019608501344...
If I am setting the Text property of a Form from a non-UI thread, then I need to use Invoke to avoid a cross-thread error. But, I can read the Text property without using Invoke. Is this safe? If I try to read the Handle property of a Form I get a cross-threading error. If I read the IsDisposed property of a Form it wo...
[ 0.4732896089553833, -0.15677990019321442, 0.45598581433296204, 0.12034905701875687, 0.04069160297513008, -0.4771873354911804, 0.38067129254341125, -0.38309893012046814, -0.04665879160165787, -0.7614344954490662, 0.02114873193204403, 0.7499820590019226, -0.021155035123229027, -0.04310017824...
use [`Invoke`](http://msdn.microsoft.com/en-us/library/system.windows.forms.control.invoke.aspx) when accessing UI objects. Use [`InvokeRequired`](http://msdn.microsoft.com/en-us/library/system.windows.forms.control.invokerequired.aspx) property to find out if you are in fact, in a different thread.
[ 0.22777295112609863, -0.3472863435745239, 0.25472816824913025, 0.11927886307239532, 0.13789652287960052, -0.3719809353351593, 0.30816203355789185, 0.1168845146894455, -0.38833102583885193, -0.5581201314926147, -0.24735775589942932, 0.26494425535202026, -0.13741174340248108, 0.2816056013107...
Rules like "A parent object will have up to 2 children" could be enforced in database using triggers. But would it be a good idea to duplicate the rule if this rule is already enforced in the domain layer. In which cases duplication of such rules are justified? Are there any alternative to avoid such duplication? Is ...
[ 0.4910326302051544, 0.04743167757987976, 0.033804211765527725, 0.4636637270450592, 0.2136049121618271, -0.4393547773361206, 0.3958909213542938, -0.10725515335798264, -0.6918613910675049, -0.37041783332824707, 0.1370018720626831, -0.011473873630166054, -0.3903524875640869, 0.428097724914550...
by 2 threads operating simultaneously on the same parent. Unless you actually lock the database table or somehow serialize the child addition process, either of which create a real lack of scalability. You don't mention the RDBMS so it's hard to give you a solution. **EDIT:** I agree with those who say that trigge...
[ 0.8327597975730896, 0.12482013553380966, -0.045609697699546814, 0.2462456077337265, 0.017220614477992058, -0.29073959589004517, 0.2796589732170105, -0.2150903344154358, -0.48967695236206055, -0.3027995228767395, 0.10315622389316559, 0.1008509024977684, -0.522404134273529, 0.432028919458389...
a trigger because your middle tier never does DML, it just calls database procedures or packages which encapsulate your CRUD. RIght?!
[ 0.6550359725952148, -0.16343821585178375, 0.4335140287876129, 0.3055586814880371, 0.20261818170547485, -0.5947412252426147, -0.06998050212860107, -0.1883348822593689, -0.14107103645801544, 0.0033774920739233494, 0.00064870371716097, 0.4693344533443451, -0.13047081232070923, 0.0897644534707...
How can I *iterate* over a string in Python (get each character from the string, one at a time, each time through a loop)? As Johannes pointed out, ``` for c in "string": #do something with c ``` You can iterate pretty much anything in python using the `for loop` construct, for example, `open("file.txt")` ret...
[ 0.32136422395706177, -0.272962749004364, 0.11140447109937668, 0.021569250151515007, -0.1567646861076355, 0.02003159001469612, 0.21655549108982086, -0.10488837957382202, -0.013923860155045986, -0.37958163022994995, -0.19472366571426392, 0.2952100336551666, -0.16438791155815125, -0.037794865...
but the idea behind it is really simple. There's a simple iterator protocol that can be applied to any kind of object to make the `for` loop work on it. Simply implement an iterator that defines a `next()` method, and implement an `__iter__` method on a class to make it iterable. (the `__iter__` of course, should re...
[ 0.10862690210342407, 0.035607773810625076, 0.10409527271986008, 0.0557817667722702, 0.25879859924316406, -0.07060609012842178, 0.0014991897623986006, -0.3268488645553589, -0.2832350432872772, -0.25176629424095154, -0.19196750223636627, 0.6684720516204834, -0.37336474657058716, 0.0633953288...
**Duplicate of** *[What's the BEST way to remove the time portion of a datetime value (SQL Server)?](https://stackoverflow.com/questions/2775)* I have a column that tracks when things are created using a datetime, but I'd like to generate a report that groups them by day, so I need a way of nulling out the time compon...
[ 0.2507587671279907, -0.022949911653995514, 0.3924345374107361, 0.005494971293956041, 0.24200597405433655, -0.02691132016479969, -0.02551651932299137, 0.12141118198633194, -0.42762354016304016, -0.4810342490673065, 0.1630447506904602, 0.1512151062488556, -0.3677275776863098, 0.3512463569641...
I'm rendering some HTML in a QT QLabel. The HTML looks like this: ``` <pre>foo\tbar</pre> ``` (note that I've put "\t" where there is a tab chracter in the code). This renders fine, but the tab character appears to be rendered as eight spaces, whereas I want it to be redered as 4. How can I change this **without h...
[ -0.06057818979024887, 0.09765501320362091, 0.6193900108337402, -0.1488138884305954, -0.32285866141319275, 0.6793636083602905, 0.17680682241916656, -0.015385229140520096, -0.2674611508846283, -0.7538789510726929, 0.009657072834670544, 0.12175005674362183, -0.0943605825304985, -0.02941505052...
characters. **We strongly discourage using horizontal tabs** in preformatted text since it is common practice, when editing, to set the tab-spacing to other values, leading to misaligned documents. It's implementation-defined, essencially. Most, if not all, browsers/renderers use eight spaces for tabs. This cannot be ...
[ -0.20447777211666107, 0.1429794579744339, 0.4146479666233063, 0.04812262952327728, -0.15484066307544708, 0.637306809425354, 0.11163915693759918, -0.004009793046861887, -0.14648789167404175, -0.5666190385818481, -0.3204324543476105, 0.10376991331577301, -0.03959378972649574, -0.262802124023...
for each character in line { if character is a tab { remove tab character do { add a space character
[ -0.43079766631126404, -0.29142534732818604, 0.2233608067035675, -0.1364666074514389, 0.12298864871263504, 0.5394756197929382, 0.06863381713628769, -0.001991374883800745, 0.14798283576965332, -0.5499083399772644, -0.399932324886322, 0.19258475303649902, -0.3870231509208679, -0.0199085250496...
++position_in_line } while position_in_line % 8 != 0 } else { ++position_in_line } } } } ``` In case you're curious, HTML3 specifies the use of [eight-character tabs](http://www.w3.org/MarkUp/html3/specialchars.html): > Within <PRE>, the tab should ...
[ -0.16792792081832886, -0.10117021948099136, 0.5735159516334534, -0.30316200852394104, -0.16917291283607483, 0.6150348782539368, -0.07737980782985687, -0.16456809639930725, -0.2180681675672531, -0.41494494676589966, -0.43794846534729004, 0.3511943817138672, -0.2747005820274353, -0.241411179...
position to the next position which is a multiple of 8 on the same line; that is, col := (col+8) mod 8.
[ -0.6810367107391357, -0.3708011507987976, 0.7255373597145081, -0.3025609850883484, -0.019028715789318085, 0.14547866582870483, 0.09511229395866394, -0.15011855959892273, -0.3112757205963135, -0.48395997285842896, -0.3680914044380188, 0.27741801738739014, -0.15572553873062134, -0.0047566280...
I have a char\* buffer and I am interested in looking at the first byte in the char\* buffer, what is the most optimal way to go about this. EDIT: Based on the negative votes I might want to explain why this question, I am aware of methods but in the code base that I have been looking for getting first byte people do...
[ 0.2993573844432831, 0.13518039882183075, -0.0965033769607544, 0.10176534205675125, -0.1162133663892746, 0.07920051366090775, 0.07316356897354126, 0.1615716814994812, -0.19804492592811584, -0.6227430105209351, 0.0693494901061058, 0.3925528824329376, -0.2547392249107361, 0.06098746880888939,...
I'm struggling to find a good reference application for ASP.NET MVC. By "reference", I specifically mean an application that flexes all of the framework's features in the Microsoft-sanctioned manner, such as: * Master pages * Partial views * Strongly-typed models * Authentication * Custom routes * etc... The open sou...
[ 0.4104543924331665, 0.15900100767612457, 0.22672274708747864, -0.021929236128926277, -0.2445506751537323, -0.07306808233261108, 0.10207142680883408, -0.17784146964550018, -0.35768556594848633, -0.6051851511001587, -0.10946309566497803, 0.48842960596084595, -0.09745831042528152, -0.16723421...
How do I draw a text string onto the screen using GLUT / OpenGL drawing functions? There are two ways to draw strings with GLUT [glutStrokeString](https://linux.die.net/man/3/glutstrokestring) will draw text in 3D [![alt text](https://i.stack.imgur.com/5CSHu.gif)](https://i.stack.imgur.com/5CSHu.gif) (source: [uwa...
[ 0.12080834805965424, -0.0695970430970192, 0.6436845064163208, -0.2035708874464035, -0.5570324659347534, 0.2560954988002777, 0.24615752696990967, -0.39220795035362244, -0.15999792516231537, -1.0024462938308716, -0.11029701679944992, 0.557235598564148, -0.04078686982393265, -0.15128643810749...
I am using my iPhone as a development device. Whenever I run an application on the iPhone with Instruments (Instruments->Launch Executable->my app), the app is launched but I get the error mentioned in the subject in Instruments. I have tried removing the device from xcode and adding it again as a development device b...
[ 0.31125330924987793, -0.007799004670232534, 0.5979233980178833, -0.06344475597143173, 0.29898256063461304, 0.2758724093437195, 0.2628292143344879, -0.2243061661720276, -0.11802015453577042, -0.7595568895339966, 0.02541234716773033, 0.5562032461166382, -0.09395505487918854, 0.03073437884449...
make sure the option is checked in your Entitlements.plist file (though Apple developer portal says it should be unchecked - which it should ideally be, if your mobileprovision file wants it checked, keep it checked) Strange, I had to use an Entitlements.plist with the "get-task-allow" checked for Debug profile and un...
[ 0.42968517541885376, -0.44187840819358826, 0.12378030270338058, 0.3565647304058075, 0.23338831961154938, -0.15309132635593414, 0.2924481928348541, -0.0142041752114892, -0.1995721161365509, -0.748719334602356, -0.16377319395542145, 0.45771393179893494, -0.07471806555986404, -0.2850967347621...
The statement is: ``` //Pass the copy onto the child controller self.childController.theFoodFacilityCopy = [self.theFoodFacility copy]; ``` My property is set to: ``` @property (nonatomic, retain) FoodFacility *theFoodFacilityCopy; ``` The reason I think I have a leak is because `copy` retains the value and then ...
[ 0.09361139684915543, -0.1496022641658783, 0.6160637140274048, 0.05617458373308182, 0.471793532371521, -0.02631973661482334, -0.03838729113340378, 0.021028950810432434, 0.06927977502346039, -0.3115248680114746, -0.1836821436882019, 0.7286921143531799, -0.05509312450885773, 0.318915426731109...
treat it identically after that.
[ 0.2256033718585968, 0.23544429242610931, -0.019233861938118935, -0.018598735332489014, -0.26685044169425964, 0.023723600432276726, -0.05222897231578827, 0.1989634782075882, 0.10150697082281113, -0.27241355180740356, 0.3359713554382324, 0.4966891407966614, 0.23882190883159637, -0.0386290811...
There have been a few questions asked along this line stackoverflow such as [What are the advantages and disadvantages of using the GAC](https://stackoverflow.com/questions/23578/what-are-the-advantages-and-disadvantages-of-using-the-gac) and [When and when-not to install into the GAC?](https://stackoverflow.com/quest...
[ 0.29245415329933167, 0.2195480912923813, 0.07084490358829498, -0.15771223604679108, -0.04182487726211548, -0.2367148995399475, 0.12338721752166748, -0.24795646965503693, -0.30258455872535706, -0.3016815483570099, -0.07500792294740677, 0.531805694103241, 0.02961830049753189, 0.0384502410888...
you can: > What this boils down to is that any of the shared spots for updates, whether it's a COM CLSID, windows\system32 or the GAC, are dangerous and should be avoided. And this is why the preferred .NET deployment scenario is "xcopy deployment," i.e. having your own private copy of each DLL that you test and deplo...
[ 0.4316160976886749, 0.10203611850738525, 0.2762138247489929, -0.10322156548500061, 0.085530124604702, -0.3617985248565674, 0.29162031412124634, -0.017182357609272003, -0.4574541747570038, -0.6422888040542603, -0.4115196764469147, 0.7743133306503296, -0.48559650778770447, -0.061779938638210...
true. But if that's the case, why do you care? I mean, if there's a new assembly available but your app isn't picking it up, what difference does it make? > > > "Aha again!, you say. "I can put a publisher policy into the GAC along with my assembly so that apps *are* updated automatically!" That's true, too, but now,...
[ 0.6915068626403809, 0.42280521988868713, 0.02669687196612358, 0.2466077357530594, -0.16568833589553833, -0.29493802785873413, 0.3640851378440857, 0.24682912230491638, -0.4297921359539032, -0.2748628854751587, -0.07875292003154755, 0.8429508209228516, -0.15698856115341187, -0.02611079812049...
one that takes MS hundreds of man-years at each new release of the .NET Framework. And even with those hundreds of man-years of testing, we still don't always get it right. If this is a testing responsibility that you're willing to live with, I admire you. Personally, I don't have the moral fortitude to shoulder this b...
[ 0.6144670248031616, -0.039258603006601334, -0.3967532515525818, 0.241277813911438, -0.0928393304347992, -0.10696513950824738, 0.5349925756454468, 0.03868741914629936, 0.06671034544706345, -0.6950989365577698, 0.35665953159332275, 0.2616518437862396, 0.04722759127616882, 0.04979816451668739...
Short story. This site was created by a friend of mine, who did not know that much C# or asp. And was firstly created in VS 2k3. When i converted it to VS 2k8 these errors started to crop up, there was also other issues with compiling that i managed to sort out ( Seemed to be released to VS 2k8 wanted design files ) E...
[ 0.27045878767967224, -0.08030800521373749, 0.05346810072660446, 0.48199793696403503, -0.39239177107810974, -0.07869938015937805, 0.3010006844997406, 0.06563276052474976, -0.06861813366413116, -0.4154399633407593, 0.16036061942577362, 0.4282156825065613, -0.2583785355091095, -0.116604268550...
The file '/TestSite/Default.aspx.cs' does not exist. > > > Source Error: > > > Line 1: `<%@ Page Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" > CodeFile="Default.aspx.cs" Inherits="GuildStats._Default" %>` > > > Line 2: > > > Line 3: `<asp:Content ID="Content1" ContentPlaceHolderID="M...
[ -0.004664645064622164, 0.09488053619861603, 0.5820345282554626, -0.04354645311832428, 0.05407531559467316, -0.08535554260015488, 0.35504698753356934, -0.4575991928577423, -0.3199731111526489, -0.5729063153266907, -0.3531820774078369, 0.49411168694496155, -0.1305486559867859, 0.198262438178...
I want to store times in a database table but only need to store the hours and minutes. I know I could just use DATETIME and ignore the other components of the date, but what's the best way to do this without storing more info than I actually need? You could store it as an integer of the number of minutes past midnight...
[ 0.6713833212852478, 0.22112450003623962, 0.3409867286682129, 0.06650174409151077, 0.3947642743587494, -0.06383033841848373, 0.03941210359334946, -0.10935220867395401, -0.10416875034570694, -0.7283339500427246, 0.37477657198905945, 0.5847236514091492, 0.007943897508084774, 0.459790199995040...
Can an `ObjectDataSource` have multiple `SortExpression's`? Well, you can have only 1 sort expression at any given time, but you can sort on multiple fields: > .Sort = "column1 asc, column2 asc"
[ -0.1562379002571106, -0.2417403757572174, 0.41396787762641907, 0.1311873346567154, -0.0844728946685791, 0.07807359099388123, 0.03583783283829689, -0.15379422903060913, -0.3264584243297577, -0.5504146814346313, -0.12055472284555435, 0.0868142694234848, -0.4829552173614502, -0.14639246463775...
If I have the following code: ``` Style defaultStyle = (Style)FindResource("MyTestStyle"); ``` Is there a way to get the name of the style (i.e. reverse-lookup)? Something like: ``` string name = defaultStyle.SomeMagicLookUpFunction() ``` Where name would evaluate to "MyTestStyle." Is this possible? I've created...
[ -0.03352358192205429, -0.1046302393078804, 0.32882067561149597, -0.054684072732925415, 0.29557156562805176, -0.06922402232885361, 0.05382870137691498, -0.12908023595809937, 0.18189552426338196, -0.7670902609825134, -0.1199708953499794, 0.7551411390304565, 0.010055731050670147, 0.0953156203...
== resourceItem) { return key.ToString(); } } return null; } } ``` you can call it using the following ``` string name = ResourceHelper.FindNameFromResource(this.Resources, defaultStyle); ``` Every `FrameworkElement` has it's own `.Resources` dictionary,...
[ -0.036236800253391266, -0.22396723926067352, 0.28495079278945923, -0.06749904155731201, 0.267397403717041, -0.0001844016369432211, 0.19211345911026, -0.07871542870998383, -0.002633520867675543, -0.8690563440322876, -0.12945713102817535, 0.40380221605300903, 0.0019242017297074199, 0.3151147...
methods to the static class to recursively traverse all the dictionaries in a window (application ?)
[ -0.17208370566368103, -0.033955562859773636, -0.04000236466526985, 0.3760937452316284, 0.09474606812000275, 0.060608457773923874, 0.22569388151168823, -0.05380555987358093, -0.1717808097600937, -0.45936834812164307, -0.24588824808597565, 0.3946588635444641, -0.3432338237762451, -0.05390876...
In C, I can allocate a register for a variable, for example: ``` register int i = 0; ``` I am aware that Java is an interpreted language, and is many many abstractions away from the CPU. Is there any mechanism available to even request (and if the architecture doesn't allow it, so what) that my variable remains in ...
[ 0.17121076583862305, 0.17407716810703278, 0.03729894012212753, -0.10266293585300446, 0.003023492405191064, -0.19195041060447693, 0.03745119273662567, 0.036578524857759476, -0.10586413741111755, -0.3321664035320282, -0.036825139075517654, 0.5754607915878296, -0.3630709946155548, -0.13565288...
from being used, such as applying the `volatile` modifier to a member variable.
[ 0.07081189751625061, -0.18741518259048462, -0.31737738847732544, -0.006652494892477989, 0.10506119579076767, -0.5627944469451904, 0.21662384271621704, -0.14881445467472076, -0.12483455240726471, 0.0937202200293541, -0.6296425461769104, 0.35308837890625, -0.41523897647857666, 0.476434469223...
i have some questions about Maven 2 and i hope somebody can clear things up for me: 1. made a new thread about that (link: [Maven 2 plugin, build + surefire](https://stackoverflow.com/questions/540697/maven-2-plugin-build-surfire)) 2. Is it possible to define a profile several times with diffrend values (such as use a...
[ 0.4452977478504181, -0.1743561327457428, 0.31502124667167664, -0.19126282632350922, -0.4434727132320404, -0.1900213658809662, 0.5112504363059998, -0.37728238105773926, -0.16967134177684784, -0.6433013081550598, 0.2770766317844391, 0.5484597682952881, -0.2658071219921112, -0.486158758401870...
i now make a new project which is packed as pom and do all things in there which my projects have common and let them inherit from this parent pom. I actually think this is good because it makes my pom files thinner but on the other hand i have a parent project which is just a pom file. 4. Does somebody have expierince...
[ 0.05618796497583389, -0.09571556746959686, 0.14866507053375244, 0.02925962395966053, -0.13186924159526825, 0.25402796268463135, 0.12809790670871735, 0.05601935833692551, -0.39124226570129395, -0.6612472534179688, 0.3012707531452179, 0.2813090682029724, -0.12715652585029602, 0.0399783886969...
who actually worked .. kinda. I'm feeling like i'm using the wrong jar files or don't know what i really need (i thought it would be ok to get java-client-driver, do i need seleneium-server or rc too?) I hope it is okay that i make one thread with kinda 4 questions (at least they are all about maven 2). Thanks in adva...
[ 0.6357640027999878, -0.034771375358104706, -0.26251059770584106, 0.38562726974487305, -0.6099460124969482, -0.07578301429748535, 0.5795221328735352, 0.015907932072877884, -0.18066364526748657, -0.38610124588012695, 0.17349667847156525, 0.47290143370628357, -0.014044064097106457, 0.14114056...
I'm trying to make the jump to running my development tools in virtual machines and am wondering about any tips as far as setting up such an environment Some specifics: * I am using VirtualBox. * My host pc is WindowsXP * I am looking to install Vista in the VM. * I will need VS 2008 with all the standard stuff that ...
[ 0.7681230306625366, 0.24343106150627136, 0.39129188656806946, -0.013926058076322079, -0.21246594190597534, -0.048425786197185516, 0.5239789485931396, 0.29628604650497437, -0.13992850482463837, -0.899077832698822, 0.14155228435993195, 0.625964879989624, 0.050706617534160614, 0.2973305881023...
the VM Some specific questions that I have: * How much room should I allot for the virtual hard drive? I set up 12GB for it on the first attempt but after a standard VS2008 install (which kept failing) I would have been left with only 500 MB * How much base memory should I allot for the VM? * Any other tips/tricks/ad...
[ 0.37033915519714355, 0.09529267251491547, 0.8450064659118652, -0.06277576088905334, -0.08986928313970566, -0.05238715559244156, -0.11022619158029556, -0.09361185133457184, -0.6079251170158386, -0.5055010318756104, 0.09059014171361923, 0.9682639837265015, -0.10859200358390808, 0.23567742109...
is enabled (usually enabled by default but might have to twiddle it in the BIOS) * Virtual Box Expansion pack for usb device support * 2 HDDs a large storage one in my laptop's DVD slot via an HDD caddy and a fast 100GB SSD where my Ubuntu and main VM reside Guest: * Windows 7 * VS 2010, and tons of other stuff * Car...
[ -0.09578811377286911, -0.10258123278617859, 0.8662970662117004, 0.26620835065841675, 0.11599849909543991, -0.1901496946811676, 0.15945038199424744, -0.019490594044327736, -0.2481575310230255, -0.6942259073257446, -0.29190951585769653, 0.6333430409431458, 0.0849425196647644, 0.0847941264510...
the OS and all software on it + A smaller 5GB one for code. This one is set to shareable mode since all code is in source control anyways I don't want to use snapshots with this drive and I want to attach it to other VMs. [Reading the manual was super helpful for this](http://www.virtualbox.org/manual/ch05.html#hdimag...
[ 0.2737472653388977, 0.026396505534648895, 0.286248117685318, 0.4003277122974396, -0.09819688647985458, -0.24373988807201385, 0.1172691062092781, 0.07107694447040558, -0.2824292778968811, -0.7626168727874756, 0.05391664430499077, 0.995335578918457, -0.2912465035915375, 0.2447146326303482, ...
work. I was working for years with a slow hard disk and constantly having problems that I would have to restore the VM to recover from, now everything zips along 99% of the time.
[ 0.6228626370429993, -0.06994401663541794, 0.3311192989349365, 0.24206720292568207, 0.2969539165496826, -0.13425444066524506, 0.27015864849090576, 0.3185817003250122, -0.4921340346336365, -0.2847129702568054, -0.07639721035957336, 0.6900116801261902, -0.03329034522175789, 0.0362525396049022...
How does windowing work in qt embedded, where Qt is drawing directly to a framebuffer instead of through a separate windowing system? Can I run multiple programs at once? Do I get compositing and the little [x] button, maximizing and so forth? You need to run one application as the server to provide window management f...
[ 0.5470191240310669, -0.03554224595427513, 0.4752061367034912, -0.15416252613067627, -0.2910178601741791, -0.108225516974926, -0.14079201221466064, -0.1664198637008667, -0.16581127047538757, -0.7975245118141174, -0.022453637793660164, 0.7761702537536621, -0.29894939064979553, 0.175964355468...
I'm trying to put a rails face on a legacy database. It is an old Sybase 11 database installation. I've gotten an ODBC connection working that uses unixODBC and FreeTDS to work. I'm also using the activerecord-odbc-adapter gem. I've had to use set\_table\_name and set\_primary\_key to make it work so far. However, non...
[ 0.27258405089378357, 0.11030100286006927, -0.0677415281534195, -0.009775213897228241, -0.15052200853824615, -0.07309108972549438, 0.4402226507663727, 0.10068942606449127, -0.21318253874778748, -0.837917685508728, 0.24094614386558533, 0.7070115208625793, -0.27937301993370056, 0.453732520341...
can do or check to make that work? If I can, that would save me some work writing SQL. Thank you. Edit: Console Output: ``` Person.find_by_last_name("Smith") NoMethodError: undefined method `find_by_last_name' for Person(Table doesn't exist):Class from /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gem...
[ -0.23193113505840302, 0.2802516222000122, 0.14561116695404053, 0.03546874597668648, 0.302991658449173, -0.13252726197242737, 0.45263251662254333, -0.21598093211650848, -0.1164068877696991, -0.24224203824996948, -0.2871069610118866, 0.4779326319694519, -0.21084155142307281, 0.11464453488588...
case sensitive. I have the same exact issue with my legacy database. Try this to watch it work: ``` Person.find_by_Last_Name("Smith") ``` That should do the trick. I have code that I have written to fix issues like this. It's a little monkey-patch for ActiveRecord that you can insert into the specific models that ...
[ -0.0226321779191494, 0.25655269622802734, 0.11450529098510742, -0.30859991908073425, 0.32203346490859985, -0.059961237013339996, 0.06563865393400192, -0.04651319235563278, -0.21952256560325623, -0.6892334818840027, -0.19398941099643707, 0.6597959399223328, -0.3510866165161133, 0.1570713967...
cattr_accessor :downcase_legacy_field_names, :instance_writer => false @@downcase_legacy_field_names = false end end ``` The code above creates a new accessor on ActiveRecord called downcase\_legacy\_field\_names. It defaults to false. When this accessor is set to true at the top of a model it will trigger the ...
[ -0.4285731613636017, 0.018819821998476982, 0.961887001991272, -0.15588289499282837, 0.18188601732254028, 0.13518214225769043, 0.1857839971780777, -0.4323745667934418, -0.36480724811553955, -0.5282902717590332, -0.19663254916667938, 0.5657347440719604, -0.45640721917152405, 0.29636758565902...
as the value. This makes it possible to do O(1) lookups in respond_to? to check if a given method for attribute # is available. def column_methods_hash #:nodoc: @dynamic_methods_hash ||= column_names.inject(Hash.new(false)) do |methods, attr| attr_final = downcase_legacy_field_names ? attr.to_s.d...
[ -0.34565797448158264, -0.3172488212585449, 0.8538960814476013, -0.012312361039221287, 0.21104493737220764, 0.16711539030075073, -0.1213425025343895, -0.6143634915351868, -0.3086578845977783, -0.2713184654712677, -0.24638348817825317, 0.4824875295162201, -0.16417263448238373, 0.364679515361...
methods["#{attr_final}?".to_sym] = attr_name methods["#{attr_final}_before_type_cast".to_sym] = attr_name methods end end # adapted from: http://wiki.rubyonrails.org/rails/pages/HowToUseLegacySchemas def downcase_legacy_field_methods column_names.each do |name| next if nam...
[ -0.01888132654130459, -0.019010109826922417, 0.374164879322052, 0.09192334860563278, 0.05947660282254219, -0.06433553248643875, 0.19917891919612885, -0.7700514793395996, -0.17560838162899017, -0.11684346944093704, -0.22048649191856384, 0.3331775963306427, -0.19673052430152893, 0.1048990413...
define_method("#{a}=".to_sym) do |value| write_attribute(name, value) end define_method("#{a}?".to_sym) do self.send("#{name}?".to_sym) end end end end ActiveRecord::Base.downcase_legacy_field_names = true ``` This code was adapted from: <http://wiki.rubyonrails.o...
[ 0.23263971507549286, -0.3627113997936249, 0.2567492425441742, -0.06864303350448608, 0.11979957669973373, -0.37085503339767456, 0.1915178745985031, -0.5571804046630859, -0.0070074512623250484, -0.4325549900531769, 0.20542296767234802, 0.6202037334442139, -0.3542749881744385, 0.1562509238719...
because we would be messing with ActiveRecord's ability to convert our dynamic finders (and other methods) to proper SQL statements for the legacy database. The second method, `downcase_legacy_field_methods`, is a new method that will actually generate the code that the downcase'd method will execute. All of the abov...
[ 0.31043580174446106, 0.2097066044807434, 0.2845962345600128, -0.04988764226436615, 0.39036625623703003, -0.2840140759944916, 0.44982051849365234, -0.0033007110469043255, -0.3942239284515381, -0.7244290709495544, -0.04144906997680664, 0.7311030626296997, -0.556663453578949, 0.00798899587243...
look something like this: ``` class LegacyDatabaseModel < ActiveRecord::Base downcase_legacy_field_methods def cubits_to_feet #conversion code goes here end end ```
[ 0.13870428502559662, -0.33202430605888367, 0.32955029606819153, 0.08503739535808563, 0.42604443430900574, -0.13146847486495972, 0.08486589044332504, -0.08463883399963379, -0.3224480450153351, -0.9374502301216125, -0.13625559210777283, 0.19766926765441895, 0.012919461354613304, -0.013340853...
I know that I can use a Mouse callback function for when a user clicks the mouse, but what if I want to know the current x/y position without the user clicking? Will I have to use a different callback that gets called on any mouse movement and keep track of the x/y myself or is there a function I can call within GLUT/...
[ 0.1425066739320755, -0.14465837180614471, 0.5064084529876709, -0.075110524892807, -0.16938385367393494, -0.006081558298319578, 0.24232074618339539, -0.1546064168214798, -0.21556787192821503, -0.415403813123703, 0.11497117578983307, 1.041864275932312, -0.19636593759059906, 0.235174626111984...
I am looking for a way to limit SmtpAppender to limit number of emails sent in case of same error is occurred multiple times in a defined time span. I don't know if it is even possible, any help will be appreciated I have not tried this extended SMTP appender, but it seems to be be what you need. <http://mail-archive...
[ 0.28132057189941406, -0.13376739621162415, 0.5128771066665649, 0.083617202937603, -0.16130226850509644, -0.43294569849967957, 0.46364128589630127, 0.2112940400838852, -0.39756280183792114, -0.48350465297698975, 0.09107282012701035, 0.34404128789901733, -0.3086520731449127, 0.14637826383113...
Let's imagine I have a collection of nodes that I use for my Renderer class later on. Then I have a Visitor class that can visit node or whole collection. It's simple because my collection of nodes it's simply a wrapper to the std::list with few extra methods. The problem is I'd like to have a tree like structure for ...
[ 0.023348025977611542, -0.026492537930607796, 0.14527004957199097, 0.07753685116767883, -0.14262829720973969, 0.519020676612854, 0.07631716132164001, 0.3549829125404358, -0.38126087188720703, -0.8630547523498535, 0.12011329084634781, 0.16668207943439484, -0.1671316921710968, 0.4395113587379...
Composite. How can I use together Visitor and Composite? I've read that its often a good combo but my implementations look pretty bad... I'm missing sth. I have something very similar implemented for our system. I wanted a way to compose hierarchy of geometrical object and render them into the volume. I used composite...
[ -0.36406704783439636, -0.01726469025015831, 0.3983522653579712, -0.1186644658446312, -0.25995415449142456, 0.5261505842208862, -0.10431982576847076, -0.17829351127147675, -0.4802781045436859, -0.8466121554374695, 0.26207488775253296, 0.06108176335692406, -0.3826623558998108, 0.269379973411...
ReportVisitor (dumped node info into text). Your base class will need to accept both base and specialized node types. So yes, combo works and I have working code but I agree that design takes more effort than what you would read online (Wiki or toy example). Hope this helps
[ 0.4963892102241516, -0.394787073135376, 0.09932585060596466, 0.3536292612552643, -0.09508150070905685, -0.32788118720054626, 0.3008529543876648, -0.11008746922016144, 0.12215316295623779, -0.8325510621070862, 0.02471882663667202, 0.48604723811149597, -0.12344122678041458, -0.27870741486549...
We actually have burned static/archived copies of our asp.net websites for customers many times. We have used [WebZip](http://www.spidersoft.com/) until now but we have had endless problems with crashes, downloaded pages not being re-linked correctly, etc. We basically need an application that crawls and downloads sta...
[ 0.7063566446304321, 0.1650560200214386, 0.08951273560523987, 0.22456593811511993, -0.14887148141860962, -0.3008609712123871, 0.24989470839500427, 0.3888735771179199, -0.42568835616111755, -0.3449733555316925, 0.06383738666772842, 0.23491650819778442, -0.20650649070739746, 0.137396484613418...
tried a few other applications and have been really unimpressed Does anyone have archive software they would recommend? Does anyone have a really simple process they would share? In Windows, you can look at [HTTrack](http://www.httrack.com/). It's very configurable allowing you to set the speed of the downloads. But y...
[ 0.6500287652015686, 0.03152422606945038, 0.27952757477760315, 0.29947003722190857, 0.011741431429982185, -0.5916563868522644, 0.16505353152751923, 0.16553837060928345, -0.5222382545471191, -0.752993106842041, 0.09723538905382156, 0.5541985630989075, -0.025290505960583687, 0.237531915307044...
non-aggressive when it downloads so it doesn't waste your bandwidth and the bandwidth of the site.
[ 0.10479848831892014, -0.15608377754688263, -0.042051129043102264, 0.09670822322368622, -0.196846604347229, -0.20695969462394714, 0.4430374503135681, 0.4411437213420868, 0.07482961565256119, -0.3485187292098999, -0.022142443805933, 0.6750419735908508, -0.08271922171115875, -0.31075718998908...
Is it possible to play a sound notification using Google Web Toolkit which will be translated to Javascript? Thanks. Since GWT 2.2 you can play audio with: `com.google.gwt.media.client.Audio` class. API: <http://google-web-toolkit.googlecode.com/svn/javadoc/2.2/com/google/gwt/media/client/Audio.html> Sample: ``` pri...
[ 0.15111930668354034, 0.12850695848464966, 0.21697025001049042, -0.04254228249192238, -0.0926358625292778, -0.26023536920547485, 0.33421871066093445, -0.5521661043167114, -0.06175289303064346, -0.420370876789093, -0.1724614053964615, 1.0798908472061157, -0.2887972295284271, 0.26309278607368...
I have a certain PHP script that calls exec() to execute a command to convert a PDF to JPG. This command works fine in bash. To preempt your initial troubleshooting guesses, note the following: * safe\_mode = Off * Permission on the directory containing the PDF and the script is set to 777, and this directory is also...
[ 0.21073676645755768, 0.20007716119289398, 0.45986467599868774, -0.061748504638671875, -0.21257810294628143, -0.2692687213420868, 0.33069854974746704, -0.17707978188991547, -0.10611847043037415, -0.5958160161972046, -0.0839514285326004, 0.8772906064987183, -0.15365594625473022, -0.046426501...
default returns nothing. When I call this PHP script from the browser (visiting <http://www.example.com/script.php>), exec() does not execute its argument. *IMPORTANT*: I know that there are no issues with my script or the way I have constructed the bash command, because from bash, I can execute the script with 'php'...
[ -0.14562533795833588, 0.011122030206024647, 0.2953900098800659, -0.20513373613357544, -0.21063755452632904, -0.053089965134859085, 0.4049580991268158, 0.055228590965270996, -0.08507558703422546, -0.6210653781890869, 0.01900828257203102, 1.0100997686386108, -0.22689704596996307, 0.040233548...
and remembers how to fix it! Thank you in advance for any assistance you can provide. Alex Add `2>&1` to the end of your command to redirect errors from stderr to stdout. This should make it clear what's going wrong.
[ 0.18466955423355103, 0.4549266993999481, 0.38283050060272217, 0.21563363075256348, 0.01576465554535389, 0.10951311886310577, 0.446338415145874, 0.09406734257936478, -0.09044786542654037, -0.8498963713645935, -0.33603140711784363, 0.6555582880973816, -0.1178785115480423, -0.0522622019052505...
I have a "copy" stored procedure for a database. During the copy, I backup the database with something like: ``` exec('backup database [' + @source + '] ' + 'to disk = N''' + @backupdir + '\copybackup'' ' + 'with noformat, noinit, name=N''copybackup-full'', ' + 'SKIP, NOREWIND, NOUNLOAD, STATS = 1...
[ 0.1784868836402893, 0.36018580198287964, 0.4234798848628998, 0.12965670228004456, 0.2229117453098297, -0.02713605761528015, 0.26219257712364197, -0.03525584563612938, -0.07864599674940109, -0.500204861164093, -0.40856292843818665, 0.6521413922309875, -0.2033427208662033, 0.3528977036476135...
+ @backupdir + '\copybackup'' ' + 'with file = 1, ' + 'move N''' + @source + ''' to N''' + @dbdir + '\' + @dest + '.mdf'', ' + 'move N''' + @source + '_log'' to N''' + @dbdir + '\' + @dest + '_log.ldf'', ' +
[ -0.13125471770763397, -0.12530796229839325, 0.4164251983165741, -0.04586610198020935, 0.038950640708208084, 0.2161952704191208, 0.21666790544986725, -0.48615866899490356, 0.0180731862783432, -0.6155304908752441, -0.6100664138793945, 0.5356982946395874, -0.4969479739665985, 0.15069027245044...
'NOUNLOAD, REPLACE, STATS = 10;'); ``` So all is well and good. Except, now I'm left with a file at @backupdir\copybackup that I really don't want. How do I get rid of it? Since this is a stored procedure, I *really* don't want to have to wrap it all in a batch file or some other hokey thing on the server itself. ...
[ 0.2003326565027237, 0.5135337114334106, 0.41199949383735657, -0.2129252403974533, -0.14602826535701752, -0.18222294747829437, 0.4958377182483673, 0.2443867176771164, -0.3820149898529053, -0.5792636275291443, -0.05967195704579353, 0.5387732982635498, -0.2674136757850647, 0.28213515877723694...
is no event, but if all else fails, you could try and check the Wifi hardware state by reading it's registry key: ``` int key = (int)Registry.GetValue("HKEY_LOCAL_MACHINE\\System\\State\\Hardware", "WiFi", -1); ```
[ 0.034695714712142944, -0.06667175143957138, 0.4197852611541748, 0.1373131424188614, 0.36521151661872864, -0.1401422768831253, 0.29454505443573, 0.13116455078125, -0.23690460622310638, -0.7616057991981506, -0.3832223415374756, 0.7285665273666382, -0.15175199508666992, 0.059608444571495056, ...