text
stringlengths
0
30.5k
title
stringclasses
1 value
embeddings
listlengths
768
768
to convert to an ASCII string from Unicode, then there's really no direct way to do so, since the Unicode characters won't necessarily exist in ASCII. If you're trying to convert to an ASCII string, try one of the following: 1. Replace the specific unicode chars with ASCII equivalents, if you are only looking to han...
[ -0.06979283690452576, -0.05032610893249512, 0.12065774202346802, -0.07054959237575531, -0.28572049736976624, 0.20059528946876526, 0.14972294867038727, -0.008046876639127731, -0.1388358175754547, -0.6877300143241882, -0.3158397078514099, 0.27643394470214844, -0.39783474802970886, -0.0051669...
What is the best way to parse a float in CSharp? I know about TryParse, but what I'm particularly wondering about is dots, commas etc. I'm having problems with my website. On my dev server, the ',' is for decimals, the '.' for separator. On the prod server though, it is the other way round. How can I best capture this...
[ 0.4604351222515106, 0.08187371492385864, 0.34518957138061523, 0.2192792296409607, -0.24355413019657135, 0.10401614010334015, 0.06377063691616058, 0.004766877740621567, -0.04161010682582855, -0.5023399591445923, 0.08910350501537323, -0.0036408810410648584, -0.12700234353542328, -0.108751773...
I've found it a very good first guess) With that information, you can set the [Thread.CurrentThread.CurrentUICulture](http://msdn.microsoft.com/en-us/library/system.threading.thread.currentuiculture.aspx) at the start of the page. If your input comes from an internal source, you can use the [InvariantCulture](http://m...
[ -0.0238033514469862, -0.3741154670715332, 0.6087416410446167, 0.08726431429386139, -0.0005362960509955883, 0.09528299421072006, -0.15319043397903442, -0.006947800051420927, -0.24739405512809753, -0.39415431022644043, 0.0419621504843235, 0.13684727251529694, -0.07926034182310104, 0.21265378...
I made a Java Applet with some Standard GUI Components on it. I used the [MigLayout](http://www.miglayout.com/) Manager. If I move the mouse slowly over the various GUI Components everything appears to be fine, but if I move the mouse fast, it flickers. What could make that nasty ugly redraw? (Core 2 Duo 6300, 2GB Ra...
[ 0.06325112283229828, 0.20054735243320465, 0.388626366853714, -0.16431982815265656, 0.3056406080722809, 0.06796254962682724, 0.4646967053413391, -0.05650074779987335, -0.14742200076580048, -0.7977786064147949, 0.10326767712831497, 0.8829904198646545, -0.3924371898174286, 0.04379353299736976...
To be more precise, I need to know whether (and if possible, how) I can find whether a given string has double byte characters or not. Basically, I need to open a pop-up to display a given text which can contain double byte characters, like Chinese or Japanese. In this case, we need to adjust the window size than it wo...
[ 0.39697349071502686, 0.1570272594690323, -0.055252715945243835, 0.004500529263168573, 0.05765248462557793, 0.013232617639005184, 0.1703866571187973, 0.28745290637016296, -0.20833240449428558, -0.5235613584518433, -0.37816688418388367, 0.19619333744049072, -0.1845138967037201, -0.1378342211...
examine the character codes at each position: ``` function isDoubleByte(str) { for (var i = 0, n = str.length; i < n; i++) { if (str.charCodeAt( i ) > 255) { return true; } } return false; } ``` This might not be as fast as you would like.
[ -0.20853668451309204, -0.09698852896690369, 0.423053115606308, -0.2227170765399933, 0.12488015741109848, 0.1433001607656479, 0.32795655727386475, -0.30181679129600525, 0.07489155232906342, -0.6248289942741394, -0.27333372831344604, 0.55632084608078, -0.05151047557592392, -0.073520749807357...
I am already excited about document databases and especially about CouchDB's simplicity. But I have a hard time understanding if such databases are a viable option for multi user systems. Since those systems require some kind of relations between records which document databases do not provide. Is it completely the wr...
[ 0.44623440504074097, 0.14063221216201782, 0.2546704113483429, 0.26764315366744995, 0.14826156198978424, -0.5134685039520264, -0.0020345791708678007, 0.04979002848267555, -0.18901221454143524, -0.7171484231948853, 0.21266722679138184, 0.5443187355995178, 0.1213294118642807, 0.19868995249271...
can tag them like "type=post" and "year=2008". My question is how far can I go with this type of tagging? Say can I create an array field with 10.000 names in it? Or is there a better way of doing this? It is a matter of understanding how to think in this document based sense. There was a discussion on the [mailing lis...
[ 0.6418890357017517, -0.06678822636604309, 0.6040776371955872, 0.1772184520959854, -0.03702300041913986, -0.2713856101036072, -0.05552555248141289, -0.1064264103770256, -0.39462554454803467, -0.4903954267501831, 0.3469807803630829, 0.05359087884426117, -0.10977599769830704, 0.23272393643856...
likely want to store separate docs. So in the case of a multi-user system one way of implementing ACL based permissions could be to create 'permission docs' that would be a mapping of user\_id to doc\_id with the appropriate permission indicated. ``` { _id: "permission_doc_1", type: "acl", user: "John", ...
[ 0.11403636634349823, 0.09420114010572433, 0.291831374168396, 0.11323776841163635, 0.055069487541913986, 0.008381661958992481, -0.05355386808514595, -0.1195053905248642, -0.07420866191387177, -0.6228501796722412, -0.07839121669530869, 0.6502122282981873, -0.252103328704834, -0.0600939318537...
be: ``` http://localhost:5984/db/_view/permissions/all?key=["John", "John's Account Info"] ``` Obviously, this would require having some intermediary between the client and couch to make sure permissions were enforced.
[ 0.2198011875152588, 0.307965487241745, 0.3600475490093231, -0.25897565484046936, 0.4019668400287628, -0.17305347323417664, 0.26742422580718994, -0.03095618076622486, -0.2720728814601898, -0.5776817202568054, -0.5017552971839905, 0.6393672823905945, -0.07440633326768875, 0.02041693963110447...
I definitifely like the one at stackoverflow, because it's clean and simple. Also the live preview with code/syntax hilighting is really helpful (and motivating). What is your favourite Javascript Editor Framework and why? I like [widgEditor](http://themaninblue.com/experiment/widgEditor/) because it's very simple and...
[ 0.4465831220149994, -0.15603795647621155, 0.21317869424819946, 0.03256227821111679, -0.4296773374080658, -0.07393759489059448, 0.2586846649646759, -0.023114802315831184, -0.12425683438777924, -0.8202905654907227, 0.35009220242500305, 0.5625272989273071, 0.04876762256026268, 0.0457862503826...
I've searched a lot for an answer for this question in the web: they say it's true, SBCL doesn't work under Vista. But I really need to work with lisp on my home Vista laptop and VM doesn't help really... And CL is not so interesting because of speed... If you have any recommendation, please share! Have you seen these...
[ -0.010798510164022446, 0.37402763962745667, 0.3332024812698364, 0.019297810271382332, -0.05271252989768982, -0.20950239896774292, 0.3878077566623688, 0.07799622416496277, -0.2955949604511261, -0.38657575845718384, -0.15967494249343872, 0.6666832566261292, -0.4059162437915802, 0.02787738107...
I miss it so much (used it a lot in C#). can you do it in C++? Yes, you can. See [here](http://msdn.microsoft.com/en-us/library/b6xkz944(VS.80).aspx). ``` #pragma region Region_Name //Your content. #pragma endregion Region_Name ```
[ -0.3612251281738281, -0.18003793060779572, 0.6993057131767273, 0.10824190825223923, 0.21626220643520355, -0.4300306439399719, 0.21575303375720978, 0.38878148794174194, -0.4198528528213501, -0.5722663402557373, -0.31454408168792725, 0.1566866636276245, -0.014727058820426464, 0.3173281252384...
What's the best way to get a string containing a folder name that I can be certain does **not** exist? That is, if I call `DirectoryInfo.Exists` for the given path, it should return false. EDIT: The reason behind it is I am writing a test for an error checker, the error checker tests whether the path exists, so I wond...
[ 0.4405883848667145, 0.07757462561130524, 0.08976808190345764, 0.1551613211631775, 0.13361378014087677, -0.24040137231349945, 0.33392414450645447, 0.40367671847343445, -0.23252244293689728, -0.45787206292152405, 0.17223788797855377, 0.4498373866081238, -0.13763368129730225, 0.08434035629034...
I am trying to read an Http response stream twice via the following: ``` HttpWebResponse response = (HttpWebResponse)request.GetResponse(); stream = response.GetResponseStream(); RssReader reader = new RssReader(stream); do { element = reader.Read(); if (element is RssChannel) { feed.Channels.Add((RssChannel...
[ 0.19250191748142242, -0.11377132683992386, 0.591688334941864, -0.4153265953063965, -0.09599974006414413, 0.22017927467823029, 0.6592901349067688, -0.48269912600517273, -0.09335201233625412, -0.7423843145370483, -0.10770461708307266, 0.4462129473686218, -0.5565640926361084, 0.08472122997045...
for XML and have access to the raw data (in string format). Any ideas? Copy it into a new MemoryStream first. Then you can re-read the MemoryStream as many times as you like: ``` Stream responseStream = CopyAndClose(resp.GetResponseStream()); // Do something with the stream responseStream.Position = 0; // Do somethin...
[ 0.3130997121334076, -0.216857448220253, 0.6969244480133057, 0.02528480254113674, 0.21083354949951172, -0.02727845311164856, -0.04356479272246361, -0.3316402733325958, -0.12903055548667908, -0.6819949150085449, -0.2680084705352783, 0.535385251045227, -0.39447498321533203, -0.003011554712429...
ms.Write(buffer, 0, count); count = inputStream.Read(buffer, 0, readSize); } ms.Position = 0; inputStream.Close(); return ms; } ```
[ -0.43128275871276855, -0.11020451039075851, 0.8070306181907654, -0.4075152575969696, 0.37009793519973755, 0.4269219934940338, 0.3989887833595276, -0.11179011315107346, -0.18941757082939148, -0.831502377986908, -0.4658014178276062, 0.4105497896671295, -0.41431984305381775, 0.302426189184188...
I'm expanding my Ruby understanding by coding an equivalent of Kent Beck's xUnit in Ruby. Python (which Kent writes in) has an assert() method in the language which is used extensively. Ruby does not. I think it should be easy to add this but is Kernel the right place to put it? BTW, *I know of the existence of the va...
[ 0.4453824460506439, 0.25260335206985474, -0.2278343290090561, -0.11239294707775116, -0.6098282933235168, 0.060077738016843796, 0.4553239643573761, -0.02744107134640217, 0.027361327782273293, -0.3770064115524292, 0.03038540482521057, 0.7595286965370178, -0.11741042882204056, -0.287096112966...
expr ``` and you can implement your own exceptions if you want to provide for more specific exception handling
[ 0.29733511805534363, 0.09696732461452484, 0.009790046140551567, 0.19811128079891205, 0.1308683454990387, -0.3980032801628113, -0.03037198819220066, -0.03910654038190842, -0.2883770167827606, -0.37232059240341187, -0.26031485199928284, 0.38884860277175903, -0.3669265806674957, -0.2072260975...
I am using VB6 and the Win32 API to write data to a file, this functionality is for the export of data, therefore write performance to the disk is the key factor in my considerations. As such I am using the `FILE_FLAG_NO_BUFFERING` and `FILE_FLAG_WRITE_THROUGH` options when opening the file with a call to `CreateFile`....
[ 0.13089615106582642, 0.20799648761749268, 0.3702560067176819, -0.21181620657444, -0.02954576537013054, -0.11263760179281235, 0.09564430266618729, 0.024668769910931587, -0.268469899892807, -0.6978082656860352, -0.08749792724847794, 0.6562649607658386, 0.08769121021032333, 0.072647824883461,...
character zero's padding out the file, how do I set the file size once the last block is written to not include these character zero's? I can use `SetEndOfFile` however this requires me to close the file and re-open it without using `FILE_FLAG_NO_BUFFERING`. I have seen someone talk about `NtSetInformationFile` howeve...
[ 0.3345893621444702, -0.21498103439807892, 0.39979925751686096, -0.05415646731853485, -0.07907456904649734, -0.11258813738822937, 0.053397420793771744, -0.208782359957695, -0.1957009732723236, -0.5448811650276184, 0.34183773398399353, 0.5433953404426575, -0.17284931242465973, 0.144641697406...
maximum performance? They'll certainly result in your data hitting the disk as soon as possible, but that sort of thing doesn't actually help performance - it just helps reliability for things like journal files that you want to be as complete as possible in the event of a crash. For a data export routine like you de...
[ 0.17749275267124176, 0.07004895061254501, 0.09688889235258102, 0.3150348961353302, -0.05944050848484039, -0.28216180205345154, 0.1605132669210434, -0.1508537232875824, -0.46985238790512085, -0.25116944313049316, 0.1811022162437439, 0.8578253984451294, 0.14420291781425476, -0.10390974581241...
those options? Leave in the zero-byte padding logic to make it a fair test. If it turns out that skipping those options is faster, then you can remove the 0-padding logic, and your file size issue fixes itself.
[ 0.19065554440021515, -0.010008672252297401, 0.036980751901865005, 0.3513636291027069, 0.36177316308021545, -0.12062857300043106, 0.10823014378547668, -0.0021117699798196554, -0.45446404814720154, -0.2775306701660156, -0.11005942523479462, 0.6806073188781738, -0.21102657914161682, -0.098333...
**System Description** A plotting component that uses OOXML to generate a document. Plotting component consists of several parts. All parts are written in C++ as exe + dll's, with the exception of the interface to the OOXML document. The latter component is a COM component that was created in C#/.NET. The main reas...
[ 0.26385897397994995, 0.010157406330108643, 0.6453057527542114, 0.36310794949531555, 0.03734995797276497, 0.1104983538389206, -0.18779034912586212, -0.10833486914634705, -0.058250803500413895, -0.697525143623352, -0.14311277866363525, 0.13575081527233124, -0.33171358704566956, -0.0508834645...
Basically this is a binary segment within the OOXML file. For writing this binary segment, the Packaging component apparently uses isolated storage. **Problem** Writing a segment > 8MB results in an exception being thrown "Unable to determine the identity of the domain". On the C++ side this exception contains the ...
[ 0.11789380759000778, 0.22870102524757385, 0.35903945565223694, -0.0034991514403373003, -0.09399779886007309, -0.39034152030944824, 0.09570427983999252, 0.0513782761991024, -0.14481531083583832, -0.6454223990440369, -0.07285451889038086, 0.3224324584007263, -0.24302342534065247, 0.350287586...
maximum permissivity, Creating our own Streams and passing those to the Packaging component ) but every time it resulted in the same exception being thrown. What could we do to make this work? Could it be that when the .NET component is instantiated as a COM component, its AppDomain is alway untrusted? You might try ...
[ 0.38742512464523315, -0.35942620038986206, 0.056177180260419846, 0.18101519346237183, -0.136323019862175, -0.005011587403714657, 0.10011442750692368, -0.3541913330554962, -0.12266010046005249, -0.3609727621078491, -0.03237121179699898, 0.6706522107124329, -0.41746920347213745, -0.039870973...
Is there any simple way to programatically colorize images in .NET? Basically we have a black and white image and need to put a layer of say pink above it and reduce the opacity of that layer to make the picture colorized in pink. You should use the wonderful [ImageMagick](http://midimick.com/magicknet/) library. It ha...
[ 0.23791737854480743, -0.46884438395500183, 0.3307134807109833, 0.3770595192909241, 0.2824890911579132, -0.017711682245135307, -0.038764383643865585, 0.19306965172290802, -0.3222784698009491, -0.581850528717041, 0.2874810993671417, 0.4948084354400635, -0.1362762153148651, -0.009330487810075...
In IIS 6, I can use the Web Service Extensions folder in Inetmgr to allow/prohibit isapi filters, such as ASP.net. I want to be able to do this programmatically (in particular, from an installer script/exe). ![alt text](https://i56.photobucket.com/albums/g192/assaflavie/misc/iis.png?t=1222681203) Any ideas? You shoul...
[ 0.3630596697330475, -0.19486290216445923, 0.6963031888008118, 0.08486634492874146, 0.055837664753198624, -0.3235710561275482, 0.14431650936603546, -0.097845159471035, -0.36815738677978516, -0.814504861831665, -0.040789324790239334, 0.6975129842758179, -0.23951086401939392, 0.04711642861366...
Several frameworks for writing web-based desktop-like applications have recently appeared. E.g. [SproutCore](http://www.sproutcore.com/) and [Cappuccino](http://cappuccino.org/). Do you have any experience using them? What's your impression? Did I miss some other framework? I've seen [related](https://stackoverflow.co...
[ 0.26929235458374023, 0.0188013706356287, 0.009061181917786598, 0.1690734177827835, -0.3174884617328644, -0.11534471809864044, 0.07818280905485153, -0.13648924231529236, -0.43886882066726685, -0.45249006152153015, 0.015487205237150192, 0.5209842324256897, -0.18104614317417145, -0.3220024108...
all high-level frameworks broke down in situations where there are many draggable objects or many drop targets, and in situation where long lists (with >1000 entries) were shown on screen. Part of this is due to issues with IE6 and IE7 (where performance suddenly starts to deteriorate dramatically after DOM trees reac...
[ -0.07059887796640396, 0.11417199671268463, 0.30843523144721985, 0.09211695939302444, -0.44783395528793335, -0.3472413718700409, 0.41948217153549194, 0.015753760933876038, -0.2599063515663147, -0.6597184538841248, -0.28610002994537354, 0.4112822115421295, -0.1673356145620346, -0.09314202517...
simple as possible. * Avoid having many elements in the DOM tree. * Avoid recursive table structure (IE suddenly stops showing them after relatively few levels of nesting). * Remove invisible elements from the DOM tree. * Remove things from the DOM tree before changing them and then re-insert them, rather than changing...
[ 0.2111518532037735, -0.11774855107069016, 0.025852659717202187, -0.1264105588197708, 0.11634933203458786, -0.24199558794498444, 0.834313154220581, -0.40290960669517517, -0.23081685602664948, -0.7765803933143616, -0.6348464488983154, 0.679435133934021, -0.38934364914894104, -0.3455621004104...
I'm trying to find out whether I should be using business critical logic in a trigger or constraint inside of my database. So far I've added logic in triggers as it gives me the control over what happens next and means I can provide custom user messages instead of an error that will probably confuse the users. Is t...
[ 0.2859528362751007, 0.08397310227155685, 0.12138115614652634, 0.20646673440933228, 0.0763036459684372, -0.012791287153959274, 0.22673463821411133, -0.176808699965477, -0.5116402506828308, -0.5321033000946045, 0.019393425434827805, 0.6762663125991821, -0.3256760537624359, 0.0161310434341430...
unless some fact changes (i.e. new requirements). * With triggers you specify how to handle data (in inserts, updates etc.). This is a "non-relational" way of doing things. To explain myself better with an analogy: the proper way to write a SQL query is to specify "what you want" instead of "how to get it" – let the R...
[ 0.7414913177490234, -0.2245190292596817, -0.07400496304035187, 0.3111063241958618, -0.18548263609409332, -0.4005565643310547, 0.05688267573714256, -0.2258819192647934, -0.19038686156272888, -0.32260948419570923, -0.1505270153284073, 0.5925256609916687, -0.22240503132343292, -0.264077037572...
not to say that triggers don't have uses. They do: sometimes you can't use a constraint to specify some fact about your data. It is extremely rare though. If it happens to you *a lot*, then there's probably some issue with the schema.
[ 0.8154938817024231, -0.18341439962387085, -0.07143720984458923, 0.5920991897583008, -0.07954594492912292, -0.5382711887359619, 0.32501474022865295, -0.004148619715124369, -0.2895037829875946, -0.1713317185640335, 0.20098266005516052, 0.27475085854530334, -0.08220186829566956, 0.16269911825...
Should be pretty simple: I have an InputStream where I want to peek at (not read) the first two bytes, i.e. I want the "current position" of the InputStream to stil be at 0 after my peeking. What is the best and safest way to do this? **Answer** - As I had suspected, the solution was to wrap it in a BufferedInputStrea...
[ 0.048911917954683304, -0.0851227194070816, 0.43251997232437134, -0.09485195577144623, -0.09526026993989944, -0.09785719960927963, 0.27511948347091675, -0.0443071648478508, -0.028148377314209938, -0.931178629398346, -0.053453441709280014, 0.22882474958896637, -0.1414075642824173, -0.0593422...
the inputStream ```
[ -0.07861357182264328, 0.41187816858291626, 0.33762454986572266, -0.028342148289084435, -0.11384483426809311, 0.11684953421354294, -0.012326102703809738, 0.192347452044487, 0.11794620752334595, -0.6520023941993713, -0.430616557598114, 0.7149407863616943, -0.31673741340637207, 0.105766803026...
I'm currently generating SQL insert statements from more than one tables, and in the generated data I need to use a CASE statement, like this: ``` select 'INSERT INTO TABLE1 (f1, f2, f3, f4 ...) values (' ||t.f1||',' ||CASE WHEN t.f2 > 0 THEN '1' ELSE '0' END CASE fro...
[ 0.04284226521849632, 0.19351068139076233, 0.17793448269367218, -0.12616276741027832, 0.2596101462841034, 0.16739171743392944, -0.2155969738960266, -0.3196276128292084, 0.04337998479604721, -0.31778743863105774, 0.010269079357385635, 0.5454375147819519, -0.2681078314781189, -0.0666801258921...
point if I want to continue my statement with `... END CASE||','|| ....` I can't run the query anymore, as TOAD complains about not finding the FROM keyword. A quick solution was to separate the ouput into fields, then save it to text, and edit, but there must be a better way. Use END instead of END CASE ``` select '...
[ -0.3563397228717804, 0.1448463499546051, 0.48769494891166687, -0.11256192624568939, -0.14915895462036133, 0.2412661761045456, 0.2814813256263733, -0.2452036291360855, 0.18484508991241455, -0.35381338000297546, 0.015779729932546616, 0.1430164873600006, -0.27390408515930176, 0.03618258610367...
ELSE '0' END||','||t.f2 from table2 t , table3 t3 ```
[ -0.4561847448348999, 0.1261049509048462, 0.408752977848053, -0.14932014048099518, 0.20049408078193665, -0.09580915421247482, 0.06282597780227661, -0.39158472418785095, -0.058749936521053314, -0.24319802224636078, -0.5921090841293335, 0.36339402198791504, -0.2522376775741577, -0.12088163197...
I have a legacy VB6 application that was built using MSDE. As many client's database grow towards the MSDE 2 GB limit they are upgraded to SQL 2005 Express. This has proven very successful until today. I have spent the entire day troubleshooting a client's network on which our application runs unacceptably slowly, w...
[ -0.34397995471954346, 0.4873156249523163, 0.508080244064331, -0.24569223821163177, -0.4280546307563782, -0.09676790982484818, 0.40117353200912476, -0.12366706877946854, -0.12323726713657379, -0.5715229511260986, 0.3378598093986511, 0.5169132351875305, -0.12207421660423279, 0.26000443100929...
our database on both machines. I have even completely reinstalled our application using the SQL2005 Express install routine we now have. It makes no difference whether I restore an old MSDE database or use a newly created SQL 2005 Express one. When running our application and connecting to either machine's local serve...
[ 0.01634829305112362, 0.3421916663646698, 0.4178754985332489, 0.2867908477783203, 0.07638712227344513, -0.005225811619311571, 0.5436704754829407, 0.09861918538808823, -0.14049649238586426, -0.7872172594070435, 0.1085459366440773, 0.5853898525238037, -0.2094990313053131, 0.22117814421653748,...
to running FileMon and ProcessMon on both machines and have even written a little test application to simply connect and query a table in the database. It too runs slowly - (takes about 5 - 6 seconds to connect). The monitors (File and Process) show delays when SQL Server is writing to a log file (c:\program files\mic...
[ -0.12551431357860565, -0.029164180159568787, 0.3368583917617798, 0.11852147430181503, 0.03976298123598099, -0.2783447504043579, 0.4462142288684845, 0.048122502863407135, -0.566954493522644, -0.9201857447624207, 0.32032865285873413, 0.7385308146476746, -0.016565505415201187, -0.099575027823...
is environmental as we have so many sites running what would appear to be the same setup, with no such problems. Can someone tell me what I should be doing to isolate this problem or even offer any clues or suggestions that could help solve this? 'define' operation itself is rather slow - confirmed by xdebug profiler....
[ 0.41592833399772644, -0.06009428948163986, 0.03308732807636261, -0.07432155311107635, -0.14725209772586823, -0.14324040710926056, 0.26573488116264343, -0.42662468552589417, 0.12721103429794312, -0.5432601571083069, 0.16092532873153687, 0.5987988710403442, -0.29517635703086853, 0.0774924680...
Here is another [similar article](http://shwup.blogspot.com/2010/04/about-constants.html). The libraries the author references can be found [here (apc\_define\_constants)](http://sg.php.net/manual/en/function.apc-define-constants.php) and [here (hidef extension)](http://pecl.php.net/package/hidef).
[ 0.5348111391067505, -0.08526170253753662, -0.11404738575220108, 0.16341540217399597, -0.15290582180023193, -0.12597183883190155, 0.01354781724512577, 0.1416412740945816, -0.32602784037590027, -0.2926548421382904, -0.06989534199237823, 0.20046381652355194, -0.18750199675559998, 0.0482959523...
I am am trying to load a SQL table from a flat file. The flat i am talking about is a comma separated file. This has all the data required to populate a table will each column separated by a comma ",". I need some way by which i can load this content into the table faster. If you are using SQL Server, use [`BULK INSERT...
[ 0.12703949213027954, 0.36907538771629333, 0.4733801484107971, 0.005624530836939812, 0.14677442610263824, 0.10070878267288208, -0.13730540871620178, -0.37079986929893494, -0.24217374622821808, -0.6219537854194641, -0.24908192455768585, 0.18044278025627136, 0.013700167648494244, 0.1477276682...
Okay, we know that the following two lines are equivalent - 1. `(0 == i)` 2. `(i == 0)` Also, the first method was encouraged in the past because that would have allowed the compiler to give an error message if you accidentally used '=' instead of '=='. My question is - in today's generation of pretty slick IDE's a...
[ 0.25616198778152466, 0.1633884608745575, 0.045714300125837326, 0.0006340685649774969, -0.16615240275859833, -0.3421069085597992, 0.16588829457759857, 0.033657319843769073, -0.07519687712192535, -0.47970178723335266, 0.12392671406269073, 0.6095658540725708, -0.30720457434654236, 0.072334446...
one, (i == 0), because it feel much more natural when reading it. You ask people, "Are you 21 or older?", not, "Is 21 less than or equal to your age?"
[ -0.04750727862119675, 0.01894279010593891, 0.1760546863079071, 0.14924757182598114, 0.11091787368059158, -0.052574969828128815, 0.1799747496843338, 0.04657427594065666, -0.433158814907074, -0.4652859568595886, -0.17450033128261566, -0.21147029101848602, 0.12714950740337372, 0.0477430745959...
I have integrated SRM 5.0 into Portal. Most of the iviews are IAC i.e., all are ITS based services. The issue is that the Portal Theme does not get reflected on these services after integration. When a BSP or Webdynpro is integrated then the application reflects the Portal Theme when executed from Portal but the ITS ...
[ 0.42480170726776123, -0.02462577633559704, 0.5533487796783447, -0.22921739518642426, -0.09973705559968948, -0.16493777930736542, 0.30801501870155334, -0.22606344521045685, -0.22912423312664032, -0.7418707609176636, -0.19808457791805267, 0.3658130466938019, -0.33393245935440063, 0.266939878...
you only sell it in packages... ``` PACKAGE 1 -> 3 reports, date entry, some other stuff. PACKAGE 2 -> 6 reports, more stuff PACKAGE 3 -> 12 reports, almost all the stuff UBER PACKAGE -> everything ``` I would think it would be easier to setup a table of those packages and link to that. If you sell each module by i...
[ 1.0815321207046509, 0.08208028972148895, 0.5368231534957886, -0.0834110751748085, -0.2475867122411728, -0.045543503016233444, -0.09194115549325943, -0.302744060754776, -0.3672395646572113, -0.36133331060409546, -0.22061890363693237, 0.5664286613464355, -0.23916585743427277, -0.024654854089...
additional field for modification if needed. ``` CUSTOMERS ``` customer_id (pk) ``` MODULES ``` module_id (pk) module_name (reports!) ``` CUSTOMER\_MODULES ``` module_id (pk) (fk -> modules) customer_id (pk) (fk -> customers) customization (configuration file or somesuch?) ``` This makes the most sense to me...
[ 0.14159271121025085, 0.1653357297182083, 0.26907312870025635, -0.13232654333114624, -0.015623316168785095, -0.13030479848384857, -0.2697049379348755, -0.28329113125801086, -0.47543296217918396, -0.4197719395160675, -0.4218296706676483, 0.4859158396720886, -0.1516491174697876, 0.14359153807...
I have a scenario where I need to upload a file from one web application and use it in another one. My setup is the following. * One server, hosting two web applications in IIS - both are ASP.NET * One of the applications is used to administer the other one + a bunch more stuff * I need to upload a file from this admi...
[ 0.41124701499938965, 0.17272885143756866, 0.14879925549030304, 0.11447582393884659, -0.11638618260622025, 0.35333770513534546, -0.008782826364040375, -0.26069051027297974, -0.24708443880081177, -0.7357490658760071, -0.0023972445633262396, 0.23770752549171448, -0.13253892958164215, 0.022467...
and how can I upload the file so that it can be accessed from both web applications? Should I use a service or is there some other way? Here are some related questions I found, but I don't think they cover my particular scenario: [How to handle file uploads to a dedicated image server?](https://stackoverflow.com/...
[ 0.36324435472488403, 0.02517556957900524, 0.4597189426422119, 0.1427108645439148, -0.10085795819759369, -0.034131743013858795, 0.03645017743110657, -0.38979095220565796, -0.527220606803894, -0.7264244556427002, 0.05695095285773277, 0.5594944357872009, -0.17409540712833405, 0.04223246127367...
the virtual path in the db for flexibility
[ -0.03384653478860855, -0.3540537357330322, 0.11264967918395996, 0.48185649514198303, -0.028990747407078743, -0.15128076076507568, -0.011423387564718723, -0.021387407556176186, -0.1724896878004074, -0.7688167095184326, -0.3682234287261963, 0.550792396068573, 0.15868255496025085, -0.03352357...
When I measure request times on "the inside" of an Asp.Net application and compare it to timings on "the outside" of the app, I get different values -- 1000-5000ms strange overheads from time to time. Maybe the requests are beeing queued up in front of IIS? Or something strange is going on in an HttpModule? The qu...
[ 0.6204919219017029, -0.13580140471458435, 0.3076266944408417, 0.19539256393909454, -0.15065404772758484, 0.11976777017116547, 0.483264684677124, -0.43578803539276123, -0.30310603976249695, -0.7037219405174255, 0.3052332103252411, 0.287903368473053, 0.03434539586305618, 0.029590416699647903...
once the IIS delegates the request to the ASP.NET ISAPI module. To get more accuracy you can go to IIS logs.
[ 0.26828038692474365, -0.42809009552001953, 0.4165593087673187, 0.11948387324810028, 0.2469087839126587, -0.5082162618637085, -0.048969969153404236, -0.45387330651283264, -0.07346268743276596, -0.787334680557251, -0.4196169078350067, 0.523444414138794, -0.10947085171937943, -0.1100026294589...
In SQL Server 2005, are there any disadvantages to making all character fields nvarchar(MAX) rather than specifying a length explicitly, e.g. nvarchar(255)? (Apart from the obvious one that you aren't able to limit the field length at the database level) Same question was asked on MSDN Forums: * [Varchar(max) vs Varch...
[ -0.32072746753692627, -0.10247877240180969, 0.4591062068939209, -0.19189688563346863, -0.33921992778778076, 0.042424824088811874, 0.04515209421515465, -0.3030851185321808, -0.27247363328933716, -0.2918471693992615, 0.0501176118850708, 0.5621398091316223, -0.3478442132472992, -0.10945907980...
when dealing with a VARCHAR(MAX) value. (only if the size exceeds 8000) > > > VARCHAR(MAX) or NVARCHAR(MAX) is considered as a 'large value type'. Large value types are usually stored 'out of row'. It means that the data row will have a pointer to another location where the 'large value' is stored...
[ -0.16428974270820618, -0.10405755788087845, 0.4604320824146271, -0.09094266593456268, 0.1498720943927765, 0.025588983669877052, 0.02748945914208889, -0.11530264467000961, -0.3391180634498596, -0.4445180892944336, -0.43258753418922424, 0.2624555826187134, -0.2222219705581665, 0.351841211318...
I have a button on an ASP.NET wep application form and when clicked goes off and posts information a third party web service. I have an UpdateProgress associated with the button. how do disable/hide the button while the progress is visible (i.e. the server has not completed the operation) I am looking at doing th...
[ 0.2619553506374359, -0.06727783381938934, 0.4364114999771118, -0.056864183396101, -0.009408539161086082, -0.0881095752120018, 0.3266546428203583, -0.05144854262471199, -0.17808599770069122, -0.9939157962799072, 0.06395313888788223, 0.30654990673065186, -0.30672919750213623, 0.1119245961308...
the disable them (see how that's done in the link at the bottom). ASP.NET ------- ``` <div id="ButtonBar"> <asp:Button id= ............ </div> ``` Javascript ---------- ``` <script language="javascript"> // Get a reference to the PageRequestManager. var prm = Sys.WebForms.PageRequestManager.getInstance(); ...
[ 0.1453147828578949, -0.15982942283153534, 0.5999897122383118, -0.03134465217590332, 0.2477051317691803, 0.009162325412034988, 0.505744457244873, -0.1999294012784958, -0.10694212466478348, -0.5455253720283508, -0.8050191402435303, 0.5945443511009216, -0.6810413002967834, -0.0548837780952453...
{ $get('ButtonBar').style.visibility = "visible"; } </script> ``` See more about this at [Why my ASP.NET AJAX forms are never submitted twice by Dave Ward](http://encosia.com/2008/03/04/why-my-aspnet-ajax-forms-are-never-submitted-twice/).
[ 0.2885630428791046, -0.18276546895503998, -0.06678260862827301, -0.1244477778673172, -0.38129937648773193, 0.034180160611867905, 0.2927350103855133, 0.01582401804625988, 0.03138991817831993, -0.6249291896820068, -0.28901663422584534, 0.362056702375412, -0.13046608865261078, -0.207570493221...
If I have a script tag like this: ``` <script id = "myscript" src = "http://www.example.com/script.js" type = "text/javascript"> </script> ``` I would like to get the content of the "script.js" file. I'm thinking about something like `document.getElementById("myscript").text` but it doesn't work in this ...
[ 0.3489099144935608, 0.2173878699541092, 0.22104118764400482, -0.08846967667341232, -0.1787734031677246, -0.2563988268375397, 0.1820802092552185, -0.0463765412569046, 0.041320785880088806, -1.020257592201233, 0.007598194293677807, 0.447879433631897, -0.1770152598619461, -0.05381405353546142...
I'm in the process of writing a Java 2D game. I'm using the built-in Java 2D drawing libraries, drawing on a Graphics2D I acquire from a BufferStrategy from a Canvas in a JFrame (which is sometimes full-screened). The BufferStrategy is double-buffered. Repainting is done actively, via a timer. I'm having some performan...
[ 0.39129242300987244, -0.0511474572122097, 0.26497653126716614, -0.07983432710170746, -0.05790691822767258, -0.009822128340601921, -0.005764915607869625, 0.08225936442613602, -0.0445922315120697, -1.173393726348877, 0.14891009032726288, 0.6984545588493347, -0.1377854198217392, -0.0766134560...
any faster if I switch the drawing code to that. In your experience, what is the fastest way to render 2D graphics onto the screen in Java 1.5+? Note that the game is quite far ahead, so I don't want to switch to a completely different method of drawing, like OpenGL or a game engine. I basically want to know how to ge...
[ 0.1539871245622635, 0.10949032008647919, 0.18067562580108643, 0.2244066447019577, -0.08958446234464645, -0.07365437597036362, 0.3246740400791168, 0.06646090000867844, -0.49402159452438354, -0.8754614591598511, 0.21862317621707916, 0.8022619485855103, 0.010993795469403267, -0.21856428682804...
how to fix it. It's not guaranteed to work well on all platforms though. You'll see why in the post.
[ 0.5216581225395203, -0.062157075852155685, 0.045966535806655884, 0.3961670994758606, -0.01982903853058815, 0.07338400930166245, 0.3538724482059479, 0.38526180386543274, -0.049311600625514984, -0.42116573452949524, 0.11685808002948761, 0.28783243894577026, -0.049890629947185516, -0.39186713...
Suppose I have a non-recurring event that needs to be raised X seconds from now such as a timeout. Intuitively it would make sense to create a System.Timers.Timer, set its interval to X\*1000, wire its tick up to the event and start it. Since this is a non-recurring event and you only want it raised once you would then...
[ 0.4841323494911194, -0.3807426691055298, 0.5050303936004639, 0.11636258661746979, 0.14290007948875427, 0.24647517502307892, 0.018498621881008148, -0.002634449163451791, -0.510795533657074, -0.5933132171630859, 0.3720042109489441, 0.4886045455932617, -0.13896344602108002, 0.4685090482234955...
to tick every second (or even millisecond) and on tick poll the system for time and manually raise the target event only once the requisite time has elapsed? Can anyone weigh in on which if either method is best (perhaps there is another option I didn't think of too). Does one method become better than the other if th...
[ 0.3521716594696045, -0.11953894793987274, 0.36985886096954346, 0.03466641902923584, 0.1480991095304489, 0.004659509751945734, 0.2632783353328705, -0.04515336453914642, -0.40868207812309265, -0.6426312923431396, 0.16668187081813812, 0.5185613632202148, -0.2323746532201767, 0.119748026132583...
Object state, TimeSpan dueTime, TimeSpan period ) ```
[ -0.07909982651472092, -0.22542554140090942, 0.2505947947502136, 0.07167534530162811, -0.21437379717826843, 0.14267925918102264, 0.5260276198387146, -0.14935968816280365, 0.02984551526606083, -0.496601939201355, -0.34391140937805176, 0.5470664501190186, -0.09633376449346542, 0.2669752836227...
Is it possible to access a constant value (i.e. a public static final variable defined in a Java class) from a Velocity template? I would like to be able to write something like this: ``` #if ($a lt Long.MAX_VALUE) ``` but this is apparently not the right syntax. There are a number of ways. 1) You can put the val...
[ 0.1603432595729828, -0.33421215415000916, 0.3565013110637665, 0.1762724071741104, -0.15591035783290863, -0.053035009652376175, -0.10904575884342194, -0.00016547582345083356, -0.1319057047367096, -0.4887995421886444, -0.023025330156087875, 0.5767830014228821, -0.2670184075832367, -0.0440969...
few values, 2 for a few classes, 3 for lots of classes and values, and 4 if you are already using VelocityTools and would otherwise use 1 or 2.
[ 0.0395062118768692, -0.632387101650238, 0.6436113119125366, 0.38880085945129395, 0.15384861826896667, 0.18826808035373688, 0.22962863743305206, -0.044286392629146576, -0.0687444731593132, -0.7336195111274719, 0.0048893108032643795, 0.2945960760116577, 0.14888158440589905, -0.25747925043106...
Seems like a simple problem: * I have an SVN repo inside our firewall. * I have an SVN repo outside our firewall. * I have users inside, and outside, the firewall. (no VPN isn't an option :( that'd be too easy) * machines inside the firewall CAN talk to the outside SVN server. But not the other way. * the outside SVN ...
[ 0.14768855273723602, 0.04881414771080017, 0.7220918536186218, 0.0177113339304924, -0.054206497967243195, 0.28787627816200256, 0.3194692134857178, 0.08379276096820831, -0.6822259426116943, -0.5927481055259705, -0.2644768953323364, 0.5836085677146912, -0.10692991316318512, -0.043202556669712...
GIT can do this, but we are using SVN. Anyone done this? I don't mind it being a manual process - there are only a couple of external people, and they don't need updates to-the-minute, two or three times a day would do. I believe apache.org does this, but I can't find docs on HOW they do this. There are a couple of p...
[ 0.7764536142349243, 0.1668565422296524, 0.4758933186531067, 0.3129745125770569, -0.1751450151205063, -0.3256683349609375, 0.22780649363994598, 0.18609172105789185, -0.17866301536560059, -0.5266451239585876, 0.1347859501838684, 0.4984583258628845, 0.024775313213467598, 0.202152281999588, ...
windows, Linux or Mac, as we have all of them. Windows and Mac preferred though. Help! :) :) [update] after 12 months of messing around (and not needing this in the end), the correct answer is, in my opinion, correct. Use git - have one repo which pulls from SVN-A, then push to a new git repo, then push from there to...
[ 0.1725517213344574, -0.222927987575531, 0.7692726850509644, 0.08891310542821884, -0.1229720339179039, 0.02775859460234642, 0.17803284525871277, 0.03198280185461044, -0.38964322209358215, -0.7781426906585693, -0.1473691314458847, 0.8994658589363098, -0.025232592597603798, 0.0599850304424762...
from this external mirror to your internal master repo. git-svn would (I think) require the external developers to use git. I prefer it, but I'd be reluctant to push this on others. SVK, however, allows the external developers to continue using svn. Since the internal repo is only accessible internally, an internal a...
[ 0.18014441430568695, 0.16131389141082764, 0.4430159032344818, -0.054846640676259995, -0.24509942531585693, -0.004298590123653412, 0.2723480463027954, -0.09314434975385666, -0.4231403172016144, -0.3483394682407379, -0.10115823149681091, 0.9304684996604919, 0.06636353582143784, -0.0328083112...
This is clearly not appears like it wouldn't be a best practice. Can someone explain why it would not be a best practice or how this works? Any books or articles providing an explanation would be appreciated. ``` //The constructor public Page_Index() { //create a local value string currentValue = "This is the...
[ -0.01894918456673622, -0.34967559576034546, 0.5690421462059021, -0.0968356803059578, 0.2831197679042816, -0.19388090074062347, 0.14628516137599945, -0.18790024518966675, -0.3477633595466614, -0.5848235487937927, -0.27424970269203186, 0.5947899222373962, -0.4149373769760132, 0.3241098523139...
currentValue = "This is the MODIFIED value"; } ``` The value that is output is the second value *"Modified"*. What part of the compiler magic is making this work? Is this as simple as keeping track of the value on the heap and retrieving it again later? [Edit]: Given some of the comments, changing the original sent...
[ -0.24094121158123016, -0.3273687958717346, 0.7625356316566467, -0.32953280210494995, 0.13909456133842468, -0.03642558306455612, 0.18951159715652466, -0.2081422656774521, -0.32866141200065613, -0.34821581840515137, -0.2905611991882324, 0.6697648763656616, -0.6028744578361511, 0.317064344882...
Foo foo = new Foo(); foo.currentValue = "This is the FIRST value"; this.Load += foo.SomeMethod; foo.currentValue = "This is the MODIFIED value"; } ``` Jon Skeet has a really good write up of this in [C# in Depth](http://www.manning.com/skeet/), and a separate (not as detailed) discussion [here](http://csharpin...
[ -0.17747414112091064, -0.19392512738704681, 0.32211121916770935, -0.45082277059555054, -0.03314470127224922, -0.26131173968315125, 0.20173463225364685, -0.11477695405483246, -0.44147932529449463, -0.26695016026496887, -0.15178346633911133, 0.3474727272987366, -0.6594942808151245, 0.1580787...
What is the difference between a ***framework*** and a ***library***? I always thought of a library as a set of objects and functions that focuses on solving a particular problem or a specific area of application development (i.e. database access); and a framework on the other hand as a collection of libraries center...
[ 0.37380683422088623, 0.21507537364959717, -0.04163346812129021, 0.3812100291252136, -0.06356952339410782, -0.20746104419231415, 0.12638677656650543, -0.11840449273586273, -0.36644479632377625, -0.48330599069595337, -0.3608074486255646, 0.2523020803928375, -0.4412374496459961, 0.16093385219...
will find an actual dynamic library (libWhatever.dylib). The difference between a bare library and the framework on Mac is that a framework can contain multiple different versions of the library. It can contain extra resources (images, localized strings, XML data files, UI objects, etc.) and unless the framework is rel...
[ 0.0726548433303833, -0.1426035463809967, 0.2997813820838928, 0.36863619089126587, 0.11625756323337555, -0.1717207133769989, 0.24574244022369385, -0.056690990924835205, -0.23549644649028778, -0.8448261022567749, -0.3133127689361572, 0.6017102003097534, -0.3586330711841583, -0.03412994742393...
documentation), instead of a bunch of files to move around (a Mac bundle is just a directory on the Unix level, but the UI treats it like a single file, pretty much like you have JAR files in Java and when you click it, you usually don't see what's inside, unless you explicitly select to show the content). Wikipedia c...
[ 0.6365814805030823, 0.2034863382577896, 0.1533380001783371, 0.25577831268310547, 0.07016387581825256, -0.48692548274993896, 0.17650514841079712, -0.25112345814704895, -0.1296975016593933, -0.6607926487922668, -0.40951260924339294, 0.3140519857406616, -0.19071288406848907, 0.097582295536994...
software to help develop and > glue together the different components > of a software project. Various parts > of the framework may be exposed > through an API.. So I'd say a library is just that, "a library". It is a collection of objects/functions/methods (depending on your language) and your application "links"...
[ 0.6438406705856323, 0.17427125573158264, -0.0819036215543747, 0.41719168424606323, 0.07982882112264633, -0.28688180446624756, 0.14054222404956818, -0.1896834671497345, -0.08919187635183334, -0.7902482748031616, -0.14212054014205933, 0.41219091415405273, -0.4299551844596863, 0.2171668410301...
a library, a collection of many libraries, a collection of scripts, or any piece of software you need to create your application. Framework is just a very vague term. Here's an article about some guy regarding the topic "[Library vs. Framework](https://web.archive.org/web/20070504053354/http://www.ddj.com/blog/archite...
[ 0.5718358755111694, 0.1299041211605072, -0.09792682528495789, 0.3183431923389435, -0.14827392995357513, -0.1765465885400772, -0.03171684220433235, -0.16635197401046753, -0.26008155941963196, -0.5742143988609314, 0.06401211768388748, 0.3962966501712799, -0.29750993847846985, 0.5322108268737...
and sub-class it in my code. I don't see how I need a "framework" for that. In some way he rather explains how the term framework is used nowadays. It's just a hyped word, as I said before. Some companies release just a normal library (in any sense of a classical library) and call it a "framework" because it sounds mor...
[ 0.8169986605644226, 0.21706703305244446, -0.17867344617843628, 0.3628228008747101, 0.08278065174818039, -0.4695582985877991, 0.026953184977173805, 0.23919692635536194, -0.13654550909996033, -0.29432448744773865, -0.20557822287082672, 0.2575988471508026, -0.16784138977527618, 0.188826948404...
In the vxWorks shell, there are a number of routines you can use to display information about the system. These routines are usually referred to as **show** routines because they tend to have the form of "xxxShow". Is there a list of these routines available? I work with VxWorks 5.5 and use the symbol lookup functio...
[ 0.647936999797821, 0.13518255949020386, 0.36764079332351685, -0.5211381316184998, -0.005760572385042906, -0.029861057177186012, 0.19072844088077545, 0.027078913524746895, 0.08069510757923126, -0.5795393586158752, -0.04062807932496071, 0.6267359852790833, -0.48397260904312134, -0.1303818970...
is interactive and will prompt you if there is more than one console screen worth of symbols before continuing.
[ 0.08654370158910751, -0.13408799469470978, -0.0044937413185834885, 0.2312164604663849, 0.11667202413082123, -0.1832348108291626, 0.11540727317333221, 0.293936163187027, 0.39747747778892517, -0.8396936655044556, -0.405182421207428, 0.09867152571678162, 0.07221179455518723, -0.12564633786678...
Part of the setup routine for the product I'm working on installs a database update utility. The utility checks the current version of the users database and (if necessary) executes a series of SQL statements that upgrade the database to the current version. Two key features of this routine: * Once initiated, it runs...
[ 0.8822636008262634, 0.29269635677337646, 0.2373560667037964, -0.06974099576473236, 0.27526071667671204, -0.43051692843437195, 0.3028922975063324, -0.13496416807174683, 0.01993722841143608, -0.4671354591846466, -0.10686639696359634, 0.9561054110527039, -0.14219990372657776, -0.1804616451263...
want to add a unique index to one of my tables - yet it's possible that existing data already breaks this rule. I could: * Silently choose what's "right" for the user and discard (or archive) data; or * Ask the user to understand what a unique index is and get them to choose what data goes where Neither option sound...
[ 0.4813365042209625, 0.1683085858821869, -0.16555234789848328, 0.2264813929796219, -0.16781798005104065, 0.014474797993898392, 0.19045056402683258, -0.07693970203399658, -0.27282002568244934, -0.6619258522987366, 0.23590829968452454, 0.18198052048683167, -0.1689574271440506, 0.2935265600681...
unique index. If the index creation fails, let them know it failed, tell them what they need to research, and provide them a script they can run if they find they have a data error that they choose to fix up.
[ 0.22522415220737457, 0.13484109938144684, 0.11693613976240158, 0.3882613778114319, -0.16981028020381927, -0.13334763050079346, 0.06295112520456314, -0.010926580056548119, -0.24661989510059357, -0.5683267712593079, -0.05010319873690605, 0.2188415676355362, -0.15166954696178436, 0.0407463572...
Will .Net 4.0 use a new version of the CLR (v2.1, 3.0) or will it stick with the existing v2.0? Supplementary: Is it possibly going to keep with CLR v2.0 and add DLR v1.0? Update: Whilst this might look like a speculative question which cannot be answered, the VS team appear to be releasing more and more info on VS10...
[ 0.7714236974716187, -0.44685718417167664, 0.6799330711364746, -0.008115457370877266, -0.12636086344718933, -0.4026932716369629, -0.014768372289836407, -0.16860881447792053, 0.027428459376096725, -0.8337154388427734, -0.1067419946193695, 0.8239770531654358, 0.010070969350636005, -0.19441276...
I'm working on some code that uses a pattern in its business and data tiers that uses events to signal errors e.g. ``` resource = AllocateLotsOfMemory(); if (SomeCondition()) { OnOddError(new OddErrorEventArgs(resource.StatusProperty)); resource.FreeLotsOfMemory(); return; } ``` This looked supe...
[ 0.09820829331874847, 0.1066092923283577, 0.008812321349978447, -0.11770344525575638, 0.31199243664741516, -0.035032738000154495, 0.24333499372005463, -0.15144696831703186, -0.3421662747859955, -0.5459399223327637, -0.023818688467144966, 0.3975597321987152, -0.24227920174598694, 0.087178528...
error is kept by this tier. Which makes some kind of sense. The alternative might be something like ``` resource = AllocateLotsOfMemory(); if (SomeCondition()) { BigObject temporary = resource.StatusProperty; resource.FreeLotsOfMemory(); throw new OddException(temporary); } ``` My questions are: ...
[ -0.027691412717103958, 0.021631158888339996, -0.1165991872549057, 0.08640971779823303, -0.23873069882392883, 0.024741381406784058, 0.2737533748149872, -0.1181410625576973, -0.39718306064605713, -0.33342444896698, 0.012652579694986343, 0.25676846504211426, -0.6101197004318237, 0.28824800252...
that you should not be using an event mechanism to recover from fatal errors, but it is a very useful pattern for notification in loosely coupled systems: ``` public class DomainEventStorage<ActionType> { public List<ActionType> Actions { get { var k = string.Format("Domain.Event.Do...
[ 0.12443370372056961, -0.23284734785556793, 0.14269255101680756, -0.025934776291251183, -0.0927988737821579, -0.14092324674129486, 0.32912155985832214, 0.04691725969314575, -0.43121546506881714, -0.4134070575237274, -0.35150471329689026, 0.46184802055358887, -0.31709420680999756, 0.09254699...
GetType().Name, GetType().GetGenericArguments()[0]); if (Local.Data[k] == null) Local.Data[k] = new List<ActionType>(); return (List<ActionType>) Local.Data[k]; } }
[ -0.1578414887189865, -0.5047812461853027, 0.3310483396053314, -0.31823140382766724, 0.0738406851887703, 0.1929408311843872, 0.40609580278396606, -0.4093635678291321, -0.3051747679710388, -0.24712437391281128, -0.45821699500083923, 0.5676392912864685, -0.4425071179866791, 0.1691712737083435...
public IDisposable Register(ActionType callback) { Actions.Add(callback); return new DomainEventRegistrationRemover(() => Actions.Remove(callback) ); } } public class DomainEvent<T1> : IDomainEvent where T1 : class { private readonly DomainEventStorage<Action<T1>> _impl = new Do...
[ -0.11642298847436905, -0.34882187843322754, 0.25469067692756653, 0.18928810954093933, 0.05800057575106621, 0.15792857110500336, 0.2625301480293274, -0.4484498202800751, -0.07370749861001968, -0.5786049365997314, -0.11764071136713028, 0.7418084144592285, -0.6061086654663086, 0.1718472540378...
public void Raise(T1 args) { foreach (var action in Actions) { action.Invoke(args); } } } ``` And to consume: ``` var fail = false; using(var ev = DomainErrors.SomethingHappened.Register(c => fail = true) { //Do something with your domain here } ```
[ 0.3625774383544922, -0.13404591381549835, 0.2921867370605469, -0.13375656306743622, 0.045918069779872894, 0.0699983611702919, 0.41126683354377747, -0.3813844621181488, -0.449470579624176, -0.3415414094924927, -0.06573091447353363, 0.8291996121406555, -0.2780761420726776, 0.1108565554022789...
I've always handled optional parameters in JavaScript like this: ``` function myFunc(requiredArg, optionalArg){ optionalArg = optionalArg || 'defaultValue'; // Do stuff } ``` Is there a better way to do it? Are there any cases where using `||` like that is going to fail? Your logic fails if optionalArg is pass...
[ 0.15695181488990784, -0.18345199525356293, 0.16329120099544525, -0.2979925274848938, -0.09146153926849365, -0.174845889210701, 0.3385215401649475, -0.17593570053577423, -0.052917104214429855, -0.45605021715164185, -0.1907982975244522, 0.801246166229248, -0.22968082129955292, -0.48834514617...
I am thinking about using Microsoft Unity for my Dependency Injection tool in our User Interface. Our Middle Tier already uses Castle Windsor, but I am thinking I should stick with Microsoft. Does anyone have any thoughts about what the best Dependency Injection tool is? * [Autofac](http://www.autofac.org/) * [Cast...
[ 0.11882085353136063, -0.04162072017788887, -0.11908470839262009, -0.017612766474485397, -0.03848375007510185, 0.026053061708807945, 0.17265595495700836, -0.29122185707092285, -0.30758094787597656, -0.5863000154495239, -0.030144426971673965, 0.23453381657600403, -0.24585992097854614, -0.033...
support common widely used scenarios (lifecycle management, proper container nesting, XML and code configuration, interception, fast resolution). I'd recommend to pick between Castle (widely used and have a lot of integration libraries) and Autofac (lightweight, fast and has proper container nesting, but is not that w...
[ -0.1434956192970276, 0.05086129531264305, -0.3555048108100891, 0.15173786878585815, 0.24147257208824158, -0.3267800211906433, 0.4059480130672455, -0.14549988508224487, -0.0751672089099884, -0.6000514626502991, 0.004359296523034573, 0.36576488614082336, -0.3617767095565796, -0.2667658030986...
I have an ASP .NET 2.0 website connected to a SQL Server 2005 database. The site is pretty simple and stores information about staff, including salary. What is the best way to encrypt the salary value so no-one (including myself) can ever see what it is, except for the authorised staff using the web-app? I don't wan...
[ 0.40959692001342773, 0.2289075404405594, 0.14318597316741943, -0.009677247144281864, -0.35729891061782837, 0.1337961107492447, 0.24337780475616455, -0.18297310173511505, -0.28909897804260254, -0.33201754093170166, 0.41213855147361755, 0.3952469229698181, 0.1570006161928177, 0.0089028049260...
the browser and the web server? Many thanks! Anthony SSL is probably your best bet to keep someone from sniffing, but be aware that it is still possible. As for the other bit, SQL Server 2005 supports table-level encryption out of the box. [Here's an article on it](http://blogs.technet.com/keithcombs/archive/2005/11...
[ -0.2306375652551651, 0.10436872392892838, 0.12841132283210754, -0.017161790281534195, -0.44015005230903625, -0.09545712172985077, 0.2730337679386139, -0.09325093775987625, -0.4619079828262329, -0.019260374829173088, 0.1651180237531662, 0.6589639782905579, 0.021459782496094704, -0.387982070...
As I understand it, `.bat` is the old 16-bit naming convention, and `.cmd` is for 32-bit Windows, i.e., starting with NT. But I continue to see .bat files everywhere, and they seem to work exactly the same using either suffix. Assuming that my code will never need to run on anything older than NT, does it really matter...
[ 0.45515474677085876, 0.3311077058315277, -0.28944921493530273, -0.13901948928833008, -0.46614253520965576, 0.4130709171295166, 0.07995648682117462, -0.11310165375471115, -0.38604944944381714, -0.4850021302700043, -0.26821035146713257, 0.13543538749217987, -0.2959733307361603, 0.25357136130...