text
stringlengths
0
30.5k
title
stringclasses
1 value
embeddings
listlengths
768
768
An html template is compiled into the application as a resource. A **fragment** of the HTML template looks like: ``` <A href="%PANELLINK%" target="_blank"> <IMG border="0" src="%PANELIMAGE%" style="%IMAGESTYLE%"> </A><BR> %CAPTIONTEXT% ``` i like it like this because the larger resource HTML file contains styling...
[ 0.1527142971754074, 0.06916817277669907, 0.4680734872817993, -0.33214071393013, -0.3697919249534607, -0.14291217923164368, 0.24212150275707245, -0.24754492938518524, -0.232316792011261, -0.884222149848938, -0.33119794726371765, 0.5095019340515137, -0.11986009031534195, -0.19844156503677368...
<IMG border="0" src="%PANELIMAGE%" style="%IMAGESTYLE%"> %ANCHORENDTAGPREFIX%</A>%ANCHORENDTAGPOSTFIX%CAPTIONPREFIX%<BR> %CAPTIONTEXT%%CAPTIONPOSTFIX% ``` with the idea that i could use the pre and postfixes to turn the HTML code into: ``` <!--<A href="%PANELLINK%" target="_blank">--> <IMG border="0" src="%PANELI...
[ -0.410715788602829, 0.0046935975551605225, 0.8395634889602661, -0.21698585152626038, -0.1613607257604599, 0.010607626289129257, 0.16026702523231506, -0.7303893566131592, -0.08467233926057816, -0.5761228203773499, -0.19923876225948334, 0.6503261923789978, -0.2589755356311798, -0.34269562363...
access to a trustworthy HTML DOM parser. If the HTML was instead xhtml i would use various built-in/nativly available xml DOM parsers. --- Considered Technique Nº4 ------------------------ What i actually have so far is: ``` private const String htmlEmptyTemplate = @"<!DOCTYPE HTML PUBLIC ""-//W3C//DTD HTML 4....
[ -0.267896831035614, 0.25053825974464417, 0.847297191619873, 0.22130616009235382, -0.016101857647299767, -0.14610795676708221, 0.258452832698822, -0.6184237003326416, 0.06979473680257797, -0.6319304704666138, -0.15166087448596954, 0.7166640162467957, -0.0013879465404897928, -0.1300693154335...
@" <DIV style=""text-align:center;"">"+Environment.NewLine+ @" %ContentArea%"+Environment.NewLine+ @" </DIV>" + Environment.NewLine + @"</BODY>" + Environment.NewLine + @"</HTML>"; private const String htmlAnchorStartTag = @"<A href=""%PANELLINK%"" target=""_blank"">"; //Image is forbidden...
[ 0.22127671539783478, 0.0470416396856308, 0.652556300163269, -0.061986736953258514, -0.1839897781610489, 0.18816480040550232, 0.7839694023132324, -0.13046693801879883, -0.2745075523853302, -0.6945130228996277, -0.1544448286294937, 0.4520856738090515, -0.4110482633113861, 0.09387163072824478...
maintain - and it will makes things difficult on the next guy. i'm hoping for another solution - since i **am** the next guy. What about this: Store XML as your fragment: ``` <fragment type="link_img_caption"> <link href="%PANELLINK%" /> <img src="%PANELIMAGE%" style="%IMAGESTYLE%" /> <caption text="%CAPTIONTEXT...
[ 0.07828892022371292, 0.18607287108898163, 0.6382213234901428, 0.30265963077545166, 0.11028829216957092, -0.3419647514820099, 0.23459167778491974, -0.31524744629859924, 0.05909107252955437, -0.2696724236011505, -0.09795302152633667, 0.8529691696166992, -0.2435712069272995, -0.03485734388232...
<xsl:when test="link[@href != '']"> <a href="{link/@href}" target="_blank"> <img src="{img/@src}" style="{img/@style}" border="0" /> </a> </xsl:when> <xsl:otherwise> <img src="{img/@src}" style="{img/@style}" border="0" /> </xsl:otherwise> </xsl:choose> <xsl:i...
[ 0.03771791607141495, -0.16953399777412415, 0.6077036261558533, -0.1045788899064064, 0.0013912151334807277, -0.21157504618167877, 0.11542167514562607, -0.7103713750839233, -0.19134294986724854, -0.5888010859489441, -0.09019044786691666, 0.38880568742752075, -0.13172119855880737, -0.10859540...
fragment types could be added because of the `type` attribute. There is much room to improve this, so look at it as an example of how it *could* be done. Output: ``` <a href="%PANELLINK%" target="_blank"> <img src="%PANELIMAGE%" style="%IMAGESTYLE%" border="0"> </a> <br> %CAPTIONTEXT% ``` and, if the link href is...
[ -0.11492884159088135, -0.14031799137592316, 0.3882924020290375, 0.06998700648546219, -0.34581002593040466, -0.10625810921192169, -0.04822033271193504, -0.40402671694755554, -0.18091225624084473, -0.7776700854301453, -0.4363911747932434, 0.17263752222061157, -0.025793906301259995, 0.2112600...
I have a windows service written in dotNet. There is a worker service that spawns worker threads using various Delegate.BeginInvokes. When the service crashes are those threads going to be cleaned up automatically? And if so, when? All threads created by your process are inside that process. When your application crash...
[ 0.48488447070121765, 0.09548935294151306, 0.05726628005504608, 0.05918091535568237, 0.08612612634897232, 0.13510175049304962, 0.1381709724664688, 0.30818143486976624, -0.24510511755943298, -0.8376505374908447, 0.03628223389387131, 0.3414081931114197, -0.3774009943008423, 0.3152489960193634...
and how fast Windows dumps the process. All robust versions of Windows (2000+) should have your process segregated, so when it dies the whole process space is dumped and the memory is reclaimed. If you were accessing unmanaged resources at the time of the crash, then the whole picture changes and the answer is "it dep...
[ 0.35005873441696167, -0.08187514543533325, 0.12890522181987762, 0.17499777674674988, 0.38521215319633484, 0.2166208028793335, -0.3308781683444977, -0.007289339788258076, -0.4371072053909302, -0.4377824068069458, 0.03214604780077934, 0.4859545826911926, 0.056401487439870834, 0.1024738550186...
I use `ftp_put / ftp_nb_put` to upload files from my PHP server to another machine. I am frequently (90% of the time) getting absurd error messages like: ``` Warning: ftp_nb_put(): 2 matches total Warning: ftp_nb_put(): Transfer complete Warning: ftp_nb_continue(): Opening BINARY mode data connection ``` Now errors...
[ 0.217021644115448, 0.30438026785850525, 0.26246827840805054, -0.22526276111602783, 0.008868779987096786, -0.06996241211891174, 0.734237790107727, 0.14309284090995789, -0.3848954141139984, -0.7080909013748169, -0.022948671132326126, 0.5648989081382751, -0.35729047656059265, 0.18969357013702...
the server had. PHP does not diagnose such problems correctly and outputs seemingly random snippets from the communication between servers. Not actually a programming question, rather a "server fault" issue (or rather a "get a better webhoster" issue).
[ 0.2801043391227722, 0.21936842799186707, 0.1743144392967224, 0.28736382722854614, -0.47407203912734985, -0.11525814235210419, 0.5298990607261658, 0.32119205594062805, 0.06427983939647675, -0.17249298095703125, -0.045592084527015686, -0.04382702335715294, -0.2579891085624695, 0.057729635387...
I have two complex (i.e. objects with string, int, double, List and other home made data type) objects of the same type. I would like to compare the content of both of them to ensure that they are identical. Note: The object doesn't implement .Equals (I have no control on that) and doesn't implement IComparable. Is t...
[ 0.1079225093126297, -0.11377400159835815, 0.0434982106089592, 0.36980947852134705, -0.3186299204826355, -0.07526078820228577, 0.24911296367645264, 0.1354956030845642, -0.0832248330116272, -0.7969852685928345, 0.3317450284957886, 0.44191840291023254, -0.34575504064559937, 0.2890037000179291...
a child that implemented IComparable, that might be ideal.
[ -0.24553896486759186, -0.22774967551231384, -0.11125196516513824, 0.5802529454231262, -0.1552196741104126, 0.32216206192970276, -0.08184537291526794, -0.05478997156023979, 0.12722674012184143, -0.3941773474216461, 0.29119905829429626, 0.37902259826660156, -0.18663685023784637, 0.0492237582...
I have a problem related to the [subset sum problem](http://en.wikipedia.org/wiki/Subset_sum_problem) and am wondering if the differences make it easier, i.e. solvable in a reasonable amount of time. Given a value V, a set size L, and a sequence of numbers [1,N] S, how many size L subsets of S sum to less than V? Thi...
[ 0.287950724363327, -0.24949206411838531, 0.18452967703342438, 0.08842931687831879, -0.3057069778442383, 0.2659010589122772, -0.157724991440773, -0.40813323855400085, -0.24576415121555328, -0.7304326295852661, -0.1238943412899971, 0.3422955572605133, -0.30985045433044434, 0.0160059370100498...
there any reasonably efficient algorithm to solve this? Edit: Obviously, this can be done in O(N choose L) using a combination generating algorithm. What I'm really interested in is clever hacks to significantly speed it up past that. (The decision version of) your problem is still NP-complete. The idea is that if we ...
[ 0.05197681114077568, -0.2544366121292114, 0.03432701155543327, 0.1601872742176056, -0.0888419970870018, 0.04882044345140457, -0.02385472133755684, -0.15491501986980438, -0.3962724208831787, -0.6443120241165161, -0.1575051099061966, 0.45413243770599365, -0.44036442041397095, -0.133560463786...
could solve the subset sum problem. [This is not a complete proof, because it's a [Turing reduction](http://en.wikipedia.org/wiki/Turing_reduction), not a [many one reduction](http://en.wikipedia.org/wiki/Many-one_reduction).] However, there is a simple **dynamic programming** solution that runs in time O(nLV). [The r...
[ -0.3208407163619995, -0.4483577609062195, -0.043325792998075485, -0.04400002956390381, -0.22048498690128326, 0.2817727327346802, 0.2206689864397049, -0.45621582865715027, -0.30768316984176636, -0.5672180652618408, -0.052587926387786865, 0.1619212031364441, -0.20890215039253235, -0.12224300...
i): ``` num[0][0][i] = 1 for v = 1 to V: for k = 1 to L: num[v][k][i] = num[v][k][i-1] + num[v-S[i]][k-1][i-1] ``` where S[i] is the ith element in your sequence. (Any set of size k that sums to v either doesn't use S[i], so it's counted in num[v][k][i-1], or it uses S[i] which means that...
[ -0.1106095239520073, -0.044442612677812576, 0.11640214174985886, -0.2477089911699295, -0.3070911765098572, 0.27214697003364563, 0.20220807194709778, -0.7003670930862427, -0.2838994860649109, -0.4695877134799957, -0.4563572406768799, -0.026574470102787018, -0.27113470435142517, 0.1230270490...
count num[v][L][|S|] for each v less than V; that's your answer. Also, you can omit the third subscript if you do it carefully (run your loop downwards for each i, etc.); I only included it for clarity.
[ 0.41203364729881287, -0.17650392651557922, 0.5242249965667725, -0.2990587651729584, -0.28413280844688416, 0.21241961419582367, 0.2916373610496521, -0.47383639216423035, -0.3129219710826874, -0.16758757829666138, -0.13130709528923035, 0.1943320333957672, -0.24071960151195526, 0.067686296999...
Can I put my "bin" folder with all of its .dll files at a higher level then the IIS Local Path/web root for the site? I need to keep my dll files in a directory outside of my project is this possible, I tried to use a virtual directory but .net seems to ignore it. Can I use a virtual directory for my bin folder? **D...
[ 0.41913604736328125, -0.11558976769447327, 0.10842592269182205, 0.26167571544647217, -0.11756768822669983, -0.3745666444301605, 0.351179838180542, -0.10101133584976196, -0.38758769631385803, -0.7671440839767456, -0.041358668357133865, 0.5104278326034546, -0.23805159330368042, 0.24609071016...
I would like information on algorithms that can help identify commonality and differences between sets of overlapping data. Using stackoverflow's tag system as an example: Let's say this question has been given 5 tags. Let's say there are 1000 other questions that have at least one of these tags. Of these 1000 quest...
[ 0.5452877879142761, -0.010817447677254677, 0.12926295399665833, 0.5543912053108215, -0.12914131581783295, -0.04540698975324631, -0.038089536130428314, -0.4346997141838074, -0.18015192449092865, -0.38360595703125, 0.2274933010339737, 0.16553987562656403, -0.12631013989448547, 0.043022964149...
of interest]. where [list of tags that might be of interest] are frequently occuring tags that aren't in my orginal list. Code examples in c# if possible :) I don't know of any specific algorithms or data structures, but I could suggest a basic way of handling this: Assumption: each entry has five unique tags. * Col...
[ 0.3690846264362335, 0.23765477538108826, 0.37515512108802795, -0.06952103972434998, 0.1287633329629898, -0.01030343770980835, -0.07904041558504105, -0.4519941806793213, -0.19119836390018463, -0.5016629695892334, -0.09593714028596878, 0.4259561002254486, -0.4336858093738556, -0.001695442013...
two loops (if possible): ``` for each entry if any tag in original_tags tag_list[tag]++ end for next in tag_list tag_count[tag_list[next]] += next end ``` This should produce a sparse array of concatenated tag names (ok, I didn't include a separator, but hey it's pseudo code :-). Keep the highest ...
[ 0.2087690830230713, -0.02963901497423649, -0.051643505692481995, -0.028704581782221794, -0.1184820830821991, 0.016859637573361397, 0.6194881796836853, -0.21309280395507812, -0.26458820700645447, -0.6593726873397827, -0.04993024095892906, 0.3794061839580536, -0.647987961769104, -0.189973935...
Consider this sample code: ``` <div class="containter" id="ControlGroupDiv"> <input onbeforeupdate="alert('bingo 0'); return false;" onclick="alert('click 0');return false;" id="Radio1" type="radio" value="0" name="test" checked="checked" /> <input onbeforeupdate="alert('bingo 1'); return false;" onclick="alert(...
[ 0.18188729882240295, 0.02813410945236683, 0.10152511298656464, -0.4164714515209198, 0.2434777319431305, 0.11376656591892242, 0.5518175363540649, -0.9944145679473877, 0.3064020872116089, -0.25011324882507324, -0.3243391215801239, 0.720525324344635, -0.4112381041049957, -0.058873891830444336...
false;" onclick="alert('click 5');return false;" id="Radio6" type="radio" value="5" name="test" /> </div> ``` On FireFox 2 and 3, putting the `return false` on the click event of a radio button prevents the value of it and of all the other radio buttons in the group from changing. This effectively makes it read-o...
[ 0.22106115520000458, 0.26805543899536133, 0.16054153442382812, -0.37531206011772156, 0.12347084283828735, -0.5936679840087891, 0.7834826111793518, -0.4487156271934509, 0.1570414900779724, -0.39037784934043884, -0.2666347026824951, 0.8379239439964294, -0.44109389185905457, 0.165738940238952...
because of the 'return false' on the click event. [According to MSDN](http://msdn.microsoft.com/en-us/library/ms536913(VS.85).aspx), the [`onbeforeupdate`](http://msdn.microsoft.com/en-us/library/ms536908(VS.85).aspx) event fires on all controls in the control group before the click event fires and I assumed that was...
[ -0.2018735557794571, 0.11189068853855133, 0.355745404958725, -0.17446409165859222, 0.1682618111371994, -0.4918172359466553, 0.5356466770172119, -0.4034929573535919, -0.2987542748451233, -0.06249352544546127, -0.3021039068698883, 0.7333942651748657, -0.4694238603115082, 0.04326184093952179,...
this is a simplified example, we are actually using jQuery to set event handlers and handle this. **Update:** If you add this event to one of the radio buttons: ``` onmousedown="alert('omd'); return false;" ``` The alert box pops up, you close it, and the click event *never fires*. So we thought we had it figured...
[ 0.11500988900661469, -0.11097072809934616, 0.3080102503299713, -0.04872802272439003, 0.18097980320453644, -0.5877217650413513, 0.859336256980896, -0.2628999650478363, -0.21096113324165344, -0.3902585208415985, -0.25923997163772583, 1.0259764194488525, -0.3822002410888672, -0.04050374776124...
theory even though it's rarely true), so I tried this: ``` onmousedown="for (i=0; i<100000; i++) {;}; return false;" ``` You click, it pauses for a while, then the other radio button clears and then the click event fires. Aaargh! **Update:** Internet Explorer sucks. Unless someone comes up with a good idea, we're ...
[ 0.3762497901916504, -0.1870296150445938, 0.41915056109428406, -0.06938300281763077, -0.09667257964611053, -0.48077112436294556, 0.5348907709121704, 0.013541041873395443, 0.09401070326566696, -0.41462576389312744, 0.07119608670473099, 0.7131180167198181, -0.5013293623924255, 0.2223246544599...
checkbox jQuery plug-in that replaces the checkboxes and radio buttons with shiftable images. That means that we can control the view of the disabled controls. PITA but it works.
[ 0.010645205155014992, -0.3422965407371521, 0.262466698884964, 0.2693634331226349, -0.013445192947983742, -0.1668555587530136, 0.3910280168056488, 0.23629344999790192, -0.009229415096342564, -0.6120795011520386, 0.10869333148002625, 0.6648244261741638, -0.39731547236442566, -0.3407768309116...
I have two raw sound streams that I need to add together. For the purposes of this question, we can assume they are the same bitrate and bit depth (say 16 bit sample, 44.1khz sample rate). Obviously if I just add them together I will overflow and underflow my 16 bit space. If I add them together and divide by two, the...
[ 0.4879664480686188, 0.2444010078907013, 0.15547531843185425, -0.07000375539064407, -0.1288076788187027, 0.2974732220172882, 0.5180200338363647, -0.407879501581192, -0.039836931973695755, -0.6258469223976135, 0.15030360221862793, 0.3220187723636627, -0.10787958651781082, 0.29804545640945435...
what's the correct method to add these sounds together in my software mixer? * Am I wrong and the correct method is to lower the volume of each by half? * Do I need to add a compressor/limiter or some other processing stage to get the volume and mixing effect I'm trying for? -Adam You should add them together, but cli...
[ 0.8165885210037231, 0.32828083634376526, 0.2793041467666626, -0.010841873474419117, -0.07565280795097351, 0.3347257971763611, 0.3429698646068573, -0.6377993822097778, -0.1463172286748886, -0.44308948516845703, 0.3571162223815918, 0.804998517036438, -0.14466911554336548, 0.2064708024263382,...
red 'clip' light on a mixer...) You could implement a more "proper" compressor/limiter, but without knowing your exact application, it's hard to say if it would be worth it. If you're doing lots of audio processing, you might want to represent your audio levels as floating-point values, and only go back to the 16-bi...
[ 0.5512309670448303, 0.1731535643339157, 0.4889076352119446, 0.2466452419757843, -0.07185104489326477, 0.017040986567735672, -0.20827238261699677, -0.49695885181427, 0.00556647265329957, -0.24120789766311646, 0.1543990671634674, 0.7078844904899597, -0.13144448399543762, 0.034002646803855896...
Currently I am designing a website and I am finding it VERY difficult to display the website perfect on ALL browsers. Is there any rules, suggestions etc to follow? Thanks It is practically impossible to get a website to look exactly the same on all browsers and platforms. Number one reason is that fonts are rendere...
[ 0.5662044882774353, 0.19601504504680634, 0.2764661908149719, 0.032444752752780914, -0.14134390652179718, 0.11994335055351257, 0.4416152834892273, 0.36623668670654297, -0.29328441619873047, -0.9609251618385315, 0.25515007972717285, 0.4686664044857025, -0.10717098414897919, -0.01763112656772...
amount of effort for the potential gain. We start development for Firefox. If we get that one right, the rest of the browsers are very close. IE is the real tricky one to get right most of the time. I recommend that you tell your client or yourselves that IE 6 is not really a requirement anymore. Make sure you start ...
[ 0.6198081970214844, -0.07722074538469315, 0.1566733866930008, 0.0921093225479126, -0.3163539469242096, -0.2774425745010376, 0.26275479793548584, 0.06398726254701614, -0.012773439288139343, -1.006723403930664, -0.15345518290996552, 0.6962931156158447, -0.20012061297893524, -0.25302413105964...
away the browser differences and let you concentrate on the code for your project.
[ 0.43329301476478577, 0.11370426416397095, 0.02271699160337448, 0.22420178353786469, 0.09722346067428589, -0.15635356307029724, 0.11028220504522324, 0.4518830478191376, 0.14029204845428467, -0.5929015874862671, 0.22967840731143951, 0.5586320757865906, 0.1997693032026291, -0.2255120724439621...
I am trying to work out how to get the value of table cell for each row using jQuery. My table looks like this: ``` <table id="mytable"> <tr> <th>Customer Id</th> <th>Result</th> </tr> <tr> <td>123</td> <td></td> </tr> <tr> <td>456</td> <td></td> </tr> <tr> <td>789</td> <...
[ 0.09691432118415833, 0.3193231523036957, 0.3802417814731598, -0.25787022709846497, -0.11400561779737473, 0.25802966952323914, -0.2181224673986435, -0.32337960600852966, -0.20615462958812714, -0.7716673016548157, 0.31852036714553833, 0.29831546545028687, -0.10211478173732758, 0.056469213217...
I need to do this to get it looping through each row, but I'm not sure how to get the value of the first cell in the row. ``` $('#mytable tr').each(function() { var cutomerId = } ``` If you can, it might be worth using a class attribute on the TD containing the customer ID so you can write: ``` $('#mytable tr')...
[ 0.24103295803070068, -0.046502575278282166, 0.5986921787261963, -0.13886573910713196, 0.176242396235466, 0.35553720593452454, 0.21125684678554535, -0.2760280668735504, -0.044427163898944855, -0.48818525671958923, 0.029221510514616966, 0.6578506231307983, -0.35980066657066345, 0.11496665328...
you move around the columns, or even put the customer ID into a `<span>`, provided you keep the class attribute with it. By the way, I think you could do it in one selector: ``` $('#mytable .customerIDCell').each(function() { alert($(this).html()); }); ``` If that makes things easier.
[ 0.3057440221309662, -0.20872817933559418, 0.6156948208808899, -0.30315154790878296, -0.10472065955400467, 0.01696516014635563, -0.11945628374814987, -0.12450182437896729, -0.3117010295391083, -0.5555543303489685, -0.07405470311641693, 0.6449894309043884, -0.343117356300354, -0.076324008405...
``` @Column(name="DateOfBirth") private Date dateOfBirth; ``` I specifically need the above code to create a column named "DateOfBirth," instead Hibernate gives me a column named date\_of\_birth. How can I change this? Is there a web.xml property? I came across DefaultNamingStrategy and ImprovedNamingStrategy, but no...
[ 0.06983711570501328, 0.13944832980632782, 0.43332454562187195, -0.19826489686965942, -0.18051031231880188, 0.043501079082489014, -0.010897336527705193, 0.010008207522332668, 0.04198893532156944, -0.6308806538581848, 0.06667885929346085, 0.36317718029022217, -0.30643537640571594, 0.44922471...
the column names "employeename", "employeerole", "departmentlocation". I hate it because all my beans properties had to be without camel case. Database columns separated by "\_" will be used to properly camelCase as you have just seen.
[ 0.014160191640257835, 0.46187645196914673, 0.11650700122117996, 0.09721186757087708, 0.1193244457244873, -0.009315216913819313, -0.11013705283403397, 0.362520694732666, -0.337686687707901, -0.5799412131309509, 0.37135204672813416, 0.5536062717437744, -0.36738377809524536, 0.452581167221069...
I did see the question about setting the proxy for the JVM but what I want to ask is how one can utilize the proxy that is already configured (on Windows). Here is a demonstration of my issue: > > 1. Go to your Control Panel->Java and set a proxy address. > > 2. Run the following simple applet code (I'm using the Ec...
[ 0.31947675347328186, -0.1512477546930313, 0.5818632245063782, -0.19321000576019287, -0.28547677397727966, 0.022378288209438324, 0.3124839961528778, -0.5430800318717957, -0.1349487602710724, -0.8698307275772095, -0.17080862820148468, 0.534006655216217, -0.3689933717250824, -0.10425402969121...
message = props.getProperty("http.proxyHost", "NONE"); message = (message.length() == 0)? "NONE": message; } public void paint(Graphics g) { g.drawString(message, 20, 20); } } ``` The Applet displays "NONE" without regard to the settings you've placed in the Java Control Panel. ...
[ -0.07172354310750961, 0.13822007179260254, 0.6041426658630371, -0.563534677028656, 0.07895972579717636, 0.3156823515892029, 0.47957244515419006, 0.1753252148628235, -0.2689270079135895, -0.960201621055603, -0.1588231474161148, 0.5787871479988098, -0.35656866431236267, -0.09197623282670975,...
Panel would still be an acceptable solution. Thanks! It is possible to detect the proxy using the [ProxySelector](http://java.sun.com/j2se/1.5.0/docs/api/java/net/ProxySelector.html) class and assign the system proxy by assigning environment variables with the [setProperty method of the System class](http://java.sun.c...
[ -0.18748554587364197, -0.09525666385889053, 0.8918261528015137, -0.16898810863494873, -0.05679187923669815, 0.25128334760665894, 0.2772076427936554, -0.4060719311237335, -0.14638139307498932, -0.7359814047813416, -0.24863532185554504, 0.5226431488990784, -0.11310097575187683, -0.1006404533...
InetSocketAddress addr = (InetSocketAddress) proxy.address(); if (addr == null) { System.out.println("No Proxy"); } else { System.out.println("proxy hostname: " + addr.getHostName()); System.setProperty("http.proxyHost", addr.getHostName()); System.out.pr...
[ -0.7002637386322021, -0.11703307181596756, 0.7641342878341675, -0.1842675656080246, -0.028331398963928223, 0.3751473128795624, 0.36357635259628296, -0.0740726962685585, -0.23028330504894257, -0.9119007587432861, -0.48488426208496094, 0.3056906759738922, -0.3348032236099243, 0.4273445904254...
} } } ```
[ 0.033695679157972336, 0.4034728407859802, 0.1949702352285385, -0.15257494151592255, 0.4299153685569763, -0.20141436159610748, 0.07711705565452576, 0.4467844069004059, 0.3091506361961365, -0.5090379118919373, -0.3048633635044098, 0.5600791573524475, -0.33611243963241577, 0.3141762912273407,...
I Have following code: Controller: ``` public ActionResult Step1() { return View(); } [AcceptVerbs(HttpVerbs.Post)] public ActionResult Step1(FormCollection form) { TempData["messageStatus"] = new Random().Next(1, 1000); return RedirectToAction("Step1"); } ``` View: ``` <%=TempData["messag...
[ -0.2396484911441803, -0.4939813017845154, 0.6503819227218628, 0.016343027353286743, -0.15115860104560852, 0.14553247392177582, 0.3616684377193451, -0.44966423511505127, -0.2774864435195923, -0.7334083318710327, -0.104065902531147, 0.28998443484306335, -0.30285170674324036, 0.02123369649052...
about this issue? I'm guessing you're running into caching problems. It's not a problem with redirect to action. All RedirectToAction does is issues a redirect response to your browser telling it to request Step01. Then your browser makes a request for Step01. In that case, your browser might have Step01 cached. So yo...
[ -0.3117784261703491, -0.47910478711128235, 0.3595373332500458, -0.16069522500038147, -0.22599613666534424, 0.2005961835384369, 0.3819832503795624, -0.45242804288864136, -0.3166310489177704, -0.4779719114303589, -0.20911230146884918, 0.4957934319972992, -0.507829487323761, -0.02391449175775...
arbitrary value.
[ -0.20362983644008636, 0.005397985689342022, 0.15289734303951263, 0.09975945949554443, -0.13173119723796844, -0.33720383048057556, -0.25618499517440796, -0.02691849321126938, 0.05148520693182945, -0.35340574383735657, -0.04364054650068283, 0.5279600620269775, -0.5712395310401917, 0.24539659...
I've got a C# program with values in a config file. What I want is to store ampersands for an url value like... ``` <appSettings> <add key="myurl" value="http://www.myurl.com?&cid=&sid="/> </appSettings> ``` But I get errors building my site. The ampersand is not allowed. I've tried various forms of escaping the a...
[ 0.3858788013458252, 0.39397087693214417, 0.5583750009536743, 0.11123420298099518, 0.05540664866566658, 0.10116143524646759, 0.2479625642299652, -0.2960042953491211, -0.15086032450199127, -0.39671769738197327, -0.052543457597494125, 0.44515711069107056, -0.19634683430194855, 0.2608133852481...
Normally to attach a debuger to a running jvm you would need start the jvm with arguments such as the following: ``` > java -Xdebug -Xrunjdwp:transport=dt_socket,address=1000,server=y,suspend=n ``` Now if I want to debug a process that wasn't started in debug mode, what can I do? This situation arrises when a produ...
[ 0.28721919655799866, 0.12489061057567596, 0.10375512391328812, -0.06110258400440216, -0.11091729998588562, -0.21413250267505646, 0.02201198972761631, -0.15820267796516418, -0.3564349114894867, -0.20220227539539337, -0.4429764151573181, 0.44996652007102966, -0.6361976265907288, 0.5663054585...
like jdb to attach to already running JVMs unless they were started in debug mode from the JVM man page > **Another way to use jdb is by attaching it to a Java VM that is > already running. A VM that is to be > debugged with jdb must be started with > the following options:** You may be able to use [jsadebugd](htt...
[ 0.24391205608844757, 0.24767528474330902, 0.15301454067230225, -0.1159537136554718, -0.1874777376651764, -0.2698182165622711, 0.029001910239458084, -0.3313867449760437, -0.28661760687828064, -0.6773644089698792, -0.2426011860370636, 0.3059752583503723, -0.37775880098342896, 0.3110930919647...
connector name withe arg can be found using `jdb -listconnectors`.
[ 0.3257383406162262, 0.2968592345714569, 0.20398396253585815, -0.23832353949546814, -0.2379913032054901, -0.10141424089670181, -0.31179487705230713, -0.37191420793533325, -0.15314897894859314, -0.5576102137565613, -0.1759982407093048, 0.2223609983921051, -0.3865155577659607, 0.3286971151828...
I'd like to automate data entry into Excel spreadsheets. User data will exist on a web site, and when the user requests it, that data will need to be injected into an Excel spreadsheet. The complication is that the format of the Excel spreadsheet can vary significantly between users - it'll be user defined. I've been ...
[ 0.5300176739692688, 0.02866361476480961, -0.016246341168880463, 0.043633464723825455, 0.030661512166261673, -0.0770219936966896, -0.3208840489387512, -0.08445970714092255, -0.03479510173201561, -0.7762784361839294, -0.12524458765983582, 0.49671101570129395, -0.4281550645828247, -0.25836625...
seem like they could work, but given that I simply want to put values into certain cells, they seem like overkill. I'm also worried about re-writing the user's spreadsheet after processing; seems like an opportunity to introduce errors into the process. Is there a way to tell excel to merge the data from one sheet int...
[ 0.6845123171806335, -0.010339265689253807, -0.1028415635228157, 0.17694926261901855, 0.1127869263291359, 0.07445674389600754, -0.08029012382030487, -0.03698412701487541, -0.22204333543777466, -0.8515297174453735, 0.24876628816127777, 0.34803467988967896, -0.44300487637519836, -0.0397106520...
your data. Quick overview [here](http://www.rgagnon.com/javadetails/java-0516.html) <http://jxls.sourceforge.net/>
[ 0.06885544210672379, 0.015382867306470871, 0.3140795826911926, -0.13054446876049042, 0.05896295979619026, -0.12568332254886627, 0.3853735029697418, -0.25375398993492126, -0.546612560749054, -0.5594457983970642, -0.16950388252735138, 0.22487804293632507, 0.013486928306519985, -0.07663740962...
I'm using C++ .NET 2.0 I have 2 forms the first one is declared as follow ``` #include "stdafx.h" namespace myNamespace{ public ref class frmMain : public System::Windows::Forms::Form { /*... snip ...*/ public void addNewRow(String^ text){ /*... snip... */ } public void launchSubForm() ...
[ 0.4804096519947052, -0.004395836964249611, 0.605729341506958, -0.44057032465934753, -0.11774569004774094, -0.1554311364889145, 0.05011720955371857, -0.3266390860080719, -0.051091983914375305, -0.6931967735290527, -0.23409828543663025, 0.38315513730049133, -0.37501060962677, 0.0435982458293...
frmMain; public ref class SubForm : public System::Windows::Forms::Form { frmMain^ myMain; SubForm ( frmMain^ pMain){ myMain = pMain; } /*... snip ...*/ public void exportRows(String^ text){ /*... snip... */ } myMain->addNewRow("myNewText"); <--- This line causes c...
[ -0.13117368519306183, -0.19020769000053406, 0.8967527151107788, -0.06417640298604965, 0.04327620193362236, 0.11403176188468933, 0.5288556218147278, -0.41868942975997925, -0.1638094037771225, -0.3218417465686798, -0.3746587634086609, 0.82731693983078, -0.12813612818717957, -0.00243694614619...
"frmMain.h" ``` Now to the question! The line in SubForm causes the compiler to tell me "use of undefined type myNamespace::frmMain I really have no clue about why the "ref class frmMain" doesnt solve this problem This is because *both* of these header files include "stdafx.h", and stdafx.h includes "SubForm.h" *bef...
[ 0.14409244060516357, -0.07762721925973892, 0.5558160543441772, -0.25059330463409424, -0.2284412682056427, -0.1421266496181488, 0.5096455812454224, -0.15730544924736023, -0.0432305634021759, -0.6230330467224121, -0.26828470826148987, 0.7643452286720276, -0.22101235389709473, 0.1208050772547...
can define: ``` public void SubForm::exportRows(String^ text) { /*... snip ...*/ myMain->addNewRow("myNewText"); } ``` in SubForm.cpp, and everything should work out splendidly. --- **edit:** Good Object-Oriented design involves separating interface from implementation, and the best way to to this in C++ is...
[ 0.20473049581050873, 0.010116789489984512, 0.25992968678474426, 0.057778336107730865, -0.040502943098545074, -0.08919323980808258, 0.19536811113357544, -0.1893959641456604, 0.09715437889099121, -0.9527407884597778, -0.11512532830238342, 0.6842599511146545, -0.5115947723388672, -0.094181485...
are the implementation of your classes.
[ 0.4817807078361511, 0.10757636278867722, -0.24214492738246918, 0.27552035450935364, 0.20586726069450378, -0.0933518260717392, 0.2719365358352661, 0.04918579384684563, 0.11010728776454926, -0.5990870594978333, -0.21669574081897736, 0.5761688351631165, 0.008388852700591087, -0.50295609235763...
Simple question, and probably reflects my inexperience with CSS, but... When creating a style sheet I like to explicitly specify the '\*' wild card, so: ``` *.TitleText { ``` instead of just ``` .TitleText { ``` I find it reminds me that TitleText is applied to "any" tag, and can be overridden by a subsequent h1...
[ 0.38948363065719604, 0.00007881823694333434, -0.0033453975338488817, -0.006732082925736904, -0.08059332519769669, -0.42529696226119995, 0.2976417541503906, -0.06187446042895317, -0.06255283206701279, -0.38558945059776306, -0.12170641124248505, 0.5067721009254456, -0.10369458794593811, -0.0...
in terms of the style outcome, there are a couple other factors to keep in mind. Using `*` increases the file size ================================= If you do not use a CSS minifier (gets rid of unneeded data such as extra whitespace) that removes unneeded asterisks, using `*` every time a tag is not specified leads ...
[ 0.32667648792266846, 0.0029371909331530333, 0.05679347366094589, 0.2144203782081604, 0.12312665581703186, -0.04927033185958862, 0.39170315861701965, -0.03795170411467552, -0.12790228426456451, -0.7526713013648987, -0.054974447935819626, 0.6583957076072693, -0.17977198958396912, -0.21453535...
a bug you won't discover for years), I would suggest not including unneeded asterisks when writing new styles and removing unneeded asterisks when editing old styles. Using `*` can lead to confusion =============================== Using `*` when it's unneeded can lead to confusion, especially when someone new is work...
[ 0.19829942286014557, 0.07703497260808945, 0.03447658196091652, -0.05163450539112091, 0.4224154055118561, -0.3152913451194763, 0.1498938649892807, -0.027072971686720848, -0.30358797311782837, -0.8922813534736633, -0.26197686791419983, 0.5183789134025574, -0.893820583820343, -0.0192650705575...
within * an `article` element */ article *.alert { /* ... */ } ``` If there is 100% consistency in a project (and the style is known by all individuals working on the project), then the first example would never happen (it would be `article * *.alert` instead). However, this is an ideal situation and will more than...
[ 0.2790244519710541, 0.21821801364421844, 0.35139402747154236, 0.07918699830770493, 0.002369446912780404, -0.46902236342430115, 0.591184139251709, -0.08038981258869171, -0.17688505351543427, -0.5524105429649353, -0.31271180510520935, 0.5716572403907776, -0.10765262693166733, -0.023102307692...
style incorrectly and produce code that doesn't match the selectors (or vice-versa). Therefore, I'd suggest sticking to the standard that I have seen the most (read: *exclusively*) in projects and websites: *Do **not** use the asterisk if it's not required*. A quick look at the source of some well known websites (e.g...
[ 0.8406117558479309, 0.22927777469158173, 0.16205668449401855, 0.2036832720041275, -0.38870155811309814, -0.39620518684387207, 0.40244969725608826, 0.20352581143379211, -0.16974881291389465, -0.5703496932983398, -0.21213524043560028, 0.3966953158378601, -0.2207857370376587, -0.2049436122179...
that have a parent other than body). Not only is this the unwritten standard (and less likely to cause confusion), but it also decreases the file size of style sheets, which increases the loading speed of the website.
[ 0.5904430150985718, 0.20566482841968536, 0.4790586829185486, 0.2022426426410675, 0.0896696150302887, -0.6133320331573486, 0.3880310654640198, -0.01986965909600258, -0.21042458713054657, -0.6853129267692566, -0.47560736536979675, 0.125470370054245, 0.07583671063184738, -0.03530982509255409,...
Can it be assumed a evaluation order of the function parameters when calling it in C ? According to the following program, it seems that there is not a particular order when I executed it. ``` #include <stdio.h> int main() { int a[] = {1, 2, 3}; int * pa; pa = &a[0]; printf("a[0] = %d\ta[1] = %d\ta[2] ...
[ -0.08380332589149475, -0.08535550534725189, -0.08545685559511185, -0.6960035562515259, -0.1984284222126007, 0.3605743944644928, 0.6422399878501892, -0.48029837012290955, 0.05064580217003822, -0.12114261835813522, -0.31534522771835327, 0.6578695178031921, -0.5291182398796082, -0.06110080704...
/* Result: a[0] = 2 a[1] = 2 a[2] = 2 */ pa = &a[0]; printf("a[0] = %d\ta[1] = %d\ta[2] = %d\n",*(pa++),*(++pa), *(pa)); /* a[0] = 2 a[1] = 2 a[2] = 1 */ } ``` No, function parameters are not evaluated in a defined order in C. See Martin York's answers to [What are all the common undefined behaviour ...
[ -0.120321124792099, 0.09052089601755142, 0.12746617197990417, -0.2538812756538391, -0.1493602842092514, 0.20950180292129517, 0.24871233105659485, -0.5087871551513672, -0.18077223002910614, 0.10797390341758728, -0.45824772119522095, 0.620033860206604, -0.5661447644233704, 0.0223120078444480...
I have a script that needs to run after tomcat has finished starting up and is ready to start deploying applications. I'm using `$TOMCAT_HOME/bin/startup.sh` which returns immediately. How can I wait until tomcat has finished starting up? There are probably several ways to do this. The trick we use is: ``` #!/bin/bash...
[ 0.5097455978393555, 0.19950902462005615, 0.38135701417922974, -0.011479342356324196, 0.24663208425045013, -0.35771578550338745, 0.5003761649131775, -0.21194690465927124, -0.08916152268648148, -0.5715682506561279, -0.0561070516705513, 1.0064446926116943, 0.014177827164530754, -0.19006398320...
I have a simple piece of code: ``` public string GenerateRandomString() { string randomString = string.Empty; Random r = new Random(); for (int i = 0; i < length; i++) randomString += chars[r.Next(chars.Length)]; return randomString;
[ -0.06695166230201721, -0.258685827255249, 0.1598324328660965, -0.3446584939956665, -0.07837232202291489, -0.01322524156421423, 0.23863351345062256, -0.522821843624115, 0.09715274721384048, -0.3205372989177704, 0.08734840154647827, 0.4389849901199341, -0.27671146392822266, 0.450255215167999...
} ``` If i call this function to generate two strings, one after another, they are identical... but if i debug through the two lines where the strings are generated - the results are different. does anyone know why is it happening? This is happening, because the calls happen very close to each other (during the same ...
[ 0.22896385192871094, -0.13871312141418457, -0.09596206992864609, -0.04745544493198395, 0.14023420214653015, -0.0029742734041064978, -0.09696251153945923, 0.0017011513700708747, -0.10208053141832352, -0.5667651295661926, 0.3683663308620453, 0.29325658082962036, -0.32000732421875, 0.42939621...
object. **2. Always use the same Random object** - only construct it once. Personally, I would use the second approach. It can be done by making the Random object static, or making it a member of the class.
[ 0.134811133146286, -0.2875451445579529, -0.27505797147750854, 0.24097460508346558, -0.4316277801990509, -0.2321263998746872, 0.03632643073797226, 0.44031715393066406, -0.2113005518913269, -0.6409371495246887, 0.012582330033183098, 0.21798640489578247, -0.32687196135520935, 0.25244304537773...
In my application I have a `UITextField` inside a `UITableViewCell`. If I click inside the text field and add some text I find that if try to move the insertion point it works the first time but fails on subsequent attempts. I am completely unable to move the selection; no "magnifying glass" appears. Even more curious...
[ 0.16412432491779327, 0.014202790334820747, 0.6659185886383057, 0.028811857104301453, -0.03387394919991493, -0.041526682674884796, 0.19474825263023376, 0.0048747193068265915, -0.012409799732267857, -0.7771968245506287, -0.1263134479522705, 0.5583087205886841, -0.33879873156547546, 0.2424242...
SDK. Click "text fields" and then "edit" and play around with the text boxes. I've done a lot of digging on this but it's pretty hard to Google for! The best references I've found are on [Apple's support board](http://discussions.apple.com/thread.jspa?messageID=8280094) and [MacRumors formum](http://forums.macrumors.c...
[ 0.0570603609085083, 0.18568086624145508, 0.30052149295806885, 0.22775347530841827, 0.09474994987249374, -0.125746950507164, 0.16661904752254486, 0.09895782917737961, -0.41241782903671265, -0.5729475021362305, -0.15463131666183472, 0.4625450074672699, -0.19464239478111267, 0.015939641743898...
benzado's suggestion, I tried building my application using the 2.0, 2.1 and 2.2 SDKs. I got the same behaviour in all versions. (Actually, something related but not the same broke in 2.2 but that's probably another question!) I spent a lot of time on this but I finally think that I have it nailed. The trick is that t...
[ 0.11293677985668182, 0.2568206787109375, 0.6064906120300293, -0.020076340064406395, -0.06162858009338379, -0.10466079413890839, 0.061474498361349106, -0.6015502214431763, -0.3420795202255249, -0.5704029202461243, 0.04118720069527626, 0.3850858211517334, -0.10543002933263779, 0.071524091064...
work. Does this still qualify as a bug? Perhaps. At the very least Apple's SDK documentation should be updated. I've raised a bug report with Apple to cover this (rdar://6462725).
[ 0.5685386061668396, 0.32087022066116333, 0.13156700134277344, 0.08588019758462906, 0.4181678891181946, -0.38328877091407776, 0.2829987704753876, 0.0684841200709343, -0.3518404960632324, -0.4243026673793793, -0.10576052963733673, 0.387320339679718, 0.16215044260025024, -0.05542220175266266,...
I am working on someone else's PHP code and seeing this pattern over and over: (pseudocode) ``` result = SELECT blah1, blah2, foreign_key FROM foo WHERE key=bar if foreign_key > 0 other_result = SELECT something FROM foo2 WHERE key=foreign_key end ``` The code needs to branch if there is no related row in th...
[ 0.35191062092781067, 0.13604484498500824, 0.2662963569164276, -0.289275199174881, -0.1861032396554947, 0.032063648104667664, 0.3934066593647003, -0.1441025584936142, -0.3352559208869934, -0.4783405661582947, 0.1646580845117569, 0.23346224427223206, -0.175869882106781, 0.3649303615093231, ...
count for one reason and increasing the query count for another reason *both* gave performance improvements. In the same application! For certain combinations of table size, database configuration and how often the foreign table would be queried, doing the two queries can be much faster than a LEFT JOIN. *But experien...
[ 0.022805510088801384, -0.16423645615577698, 0.18907755613327026, 0.16797533631324768, -0.37268248200416565, -0.02258755825459957, 0.17204277217388153, -0.25567540526390076, -0.4969525635242462, -0.8762524127960205, 0.41088324785232544, 0.31696879863739014, -0.055546898394823074, -0.1572213...
I'm trying to figure out the best lower-budget home office development hardware setup. My laptop is aging. My latest idea is that I would like a very powerful desktop paired with a less-powerful laptop. The idea being that the desktop would do the heavy lifting while the laptop would allow me to work untethered (but w...
[ 0.38551202416419983, 0.12461403012275696, 0.30031654238700867, 0.19734293222427368, 0.40162599086761475, 0.1964854747056961, 0.07857576012611389, 0.26940351724624634, -0.3926897943019867, -0.9464173913002014, 0.22690674662590027, 0.46205443143844604, 0.34091484546661377, 0.1763674467802047...
beefy server (making it look like a poor man's datacentre / set of less powerful servers). Another benefit is that you can do some testing with the laptop as the browser client and the desktop as server - this can sometimes show up issues that you won't see with testing on localhost (especially if your network goes d...
[ -0.09651469439268112, -0.0939471572637558, 0.27735599875450134, 0.19602994620800018, -0.1746872365474701, -0.18679940700531006, 0.1903085708618164, -0.021005524322390556, -0.08107702434062958, -0.7290958166122437, 0.15505464375019073, 0.6029762625694275, 0.1811649650335312, -0.275459468364...
In the application I'm writing using a combination of development environments and languages, I have need of accessing a cookie from two different subdomains, each on a separate host. The cookie is being set on `www.mydomain.com` using the PHP code that follows, and I'm attempting to access it from `distant.mydomain.c...
[ -0.09664242714643478, 0.36103302240371704, 0.5923520922660828, -0.1148320659995079, 0.2511023283004761, -0.07807503640651703, 0.1850155144929886, 0.04808709770441055, 0.007169229444116354, -0.7579999566078186, -0.03353884443640709, 0.25320112705230713, -0.07764146476984024, 0.3502205610275...
verified that the cookie that is set is for `mydomain.com` (by checking my Firefox cookies). I can't think of any reason this wouldn't be working. Using the same `setcookie` code, I have an old application running exclusively on the `www.mydomain.com` host, and that application is able to access the cookie across dom...
[ 0.585220456123352, 0.2288014441728592, 0.6557815074920654, 0.0788387879729271, 0.2188529670238495, -0.5264120101928711, 0.2846054434776306, 0.03994481638073921, -0.1108144223690033, -0.5049698352813721, 0.19313091039657593, 0.2633211314678192, -0.21670733392238617, 0.43449845910072327, -...
Windows Server 2003 If there is any further information I can provide in order to better describe the problem, please let me know! For the benefit of anyone reading this question the code and information contained in the original post are exactly correct and work fine. The problem is when you introduce other technol...
[ 0.010597886517643929, 0.40908491611480713, 0.13640964031219482, 0.04837564378976822, -0.21058791875839233, -0.337178111076355, 0.5673154592514038, 0.13801336288452148, -0.26726630330085754, -0.40659040212631226, -0.12243429571390152, 0.6819652915000916, -0.6290827989578247, -0.229667603969...
sending `$_COOKIE` to the log in order to find out what was there. I also checked out `$_SERVER` and `$_GET`. It was the emptiness of `$_GET` that tipped me off that the setup I am attempting to use is not as straightforward as I had thought. It was that mistaken understanding that led to not including the information...
[ 0.45775043964385986, 0.4539872109889984, 0.050946373492479324, 0.06005116179585457, -0.1296907216310501, -0.5192797780036926, 0.29200008511543274, 0.2534474730491638, -0.3327767252922058, -0.4699075222015381, 0.05918809026479721, 0.4669737219810486, -0.2883201837539673, 0.27923446893692017...
Can I load an stand alone aspx page in another stand alone aspx page using System.Reflection? I am using the ASP.NET 2.0 Web site project model. Try using [BuildManager.CreateInstanceFromVirtualPath](http://msdn.microsoft.com/en-us/library/system.web.compilation.buildmanager.createinstancefromvirtualpath.aspx). Sampl...
[ 0.37711942195892334, -0.23543071746826172, 0.022819742560386658, 0.022768063470721245, -0.25044476985931396, -0.11444953083992004, 0.23635929822921753, -0.4076460897922516, -0.3227124810218811, -0.6870167255401611, 0.12461748719215393, 0.34721484780311584, -0.13364975154399872, -0.10973640...
How can I determine if I'm in the final loop of a For Each statement in VB.NET? The generally, collections on which you can perform `For Each` on implement the [`IEnumerator`](http://msdn.microsoft.com/en-us/library/system.collections.ienumerator.aspx) interface. This interface has only two methods, `MoveNext` and `Res...
[ 0.3323841392993927, -0.23018117249011993, 0.3892998695373535, 0.15629063546657562, 0.2147987186908722, -0.09876135736703873, -0.06665853410959244, -0.3805353045463562, -0.29543352127075195, -0.6132122278213501, -0.26785993576049805, 0.42635577917099, -0.016532449051737785, 0.28690588474273...
`False` and the iteration is exited. From the above explanation, it is clear that the `For Each` does not track the current position in the collection and so **the answer to your question is a short *No***. If, however, you still desire to know if you're on the last element in your collection, you can try the followi...
[ 0.26670730113983154, 0.012708502821624279, 0.2955816090106964, 0.15131348371505737, 0.2686687111854553, -0.005059330724179745, 0.27475404739379883, -0.16230489313602448, -0.24421365559101105, -0.2560965418815613, -0.3075060546398163, 0.28432008624076843, 0.05291081964969635, 0.303061097860...
important to know that calling [`Last()`](https://learn.microsoft.com/en-us/dotnet/api/system.linq.enumerable.last) on a collection **will enumerate the entire collection**. It is therefore not recommended to call `Last()` on the following types of collections: * Streaming collections * Computationally expensive colle...
[ 0.11036993563175201, -0.24564409255981445, 0.22280822694301605, 0.2884313464164734, 0.10840342938899994, -0.1655602604150772, -0.03341541811823845, -0.1826927214860916, -0.5440273284912109, -0.7177221179008484, -0.5657017230987549, 0.314576655626297, -0.15453699231147766, 0.244491875171661...
As IEnumerable(Of T)) As IEnumerable(Of (value As T, index As Integer, isFirst As Boolean, isLast As Boolean)) Using e = collection.GetEnumerator() Dim index = -1 Dim toYield As T If e.MoveNext() Then index += 1 toYield = e.Current End If
[ -0.09143567830324173, -0.5796216726303101, 0.8787543773651123, -0.1533309817314148, 0.10968127101659775, 0.08944039046764374, -0.03756904602050781, -0.5404160022735596, -0.03405214101076126, -0.2936078608036041, -0.5281758904457092, 0.4367404580116272, -0.3326716125011444, 0.34013107419013...
While e.MoveNext() Yield (toYield, index, index = 0, False) index += 1 toYield = e.Current End While Yield (toYield, index, index = 0, True) End Using End Function ``` Here is a sample usage: ``` Sub Main() Console.WriteLine("Index Value IsFirst IsLa...
[ -0.425519734621048, -0.23686468601226807, 0.822884202003479, -0.2015642374753952, 0.3279360830783844, 0.0667828842997551, -0.37384918332099915, -0.2628607451915741, -0.014975504018366337, -0.20119602978229523, -0.2201390564441681, 0.4751388728618622, 0.02188720554113388, 0.4233354032039642...
Console.WriteLine("----- ----- ------- ------") Dim fibonacci = {0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89} For Each i In fibonacci.EnumerateEx() Console.WriteLine(String.Join(" ", $"{i.index,5}", $"{i.value,5}",
[ -0.2473244071006775, -0.4643098711967468, 1.017709493637085, 0.002058271551504731, 0.48859113454818726, 0.37562766671180725, -0.010283407755196095, -0.19689929485321045, 0.10811790823936462, -0.6185365915298462, -0.09553069621324539, 0.3236590027809143, -0.22579196095466614, 0.347539991140...
$"{i.isFirst,-7}", $"{i.isLast,-6}")) Next Console.ReadLine() End Sub ``` **Output** ``` Index Value IsFirst
[ -0.5985077619552612, -0.12867479026317596, 0.8689820170402527, -0.11228200793266296, 0.5507224798202515, -0.16017426550388336, 0.0945606380701065, 0.005282754078507423, 0.21755582094192505, -0.8291622400283813, -0.30409443378448486, 0.7954214215278625, -0.07367606461048126, 0.4635145962238...
IsLast ----- ----- ------- ------ 0 0 True False 1 1 False False 2 1 False False 3 2 False False 4 3
[ -0.2523777186870575, -0.06795356422662735, 0.7669336795806885, -0.038453325629234314, -0.10952678322792053, 0.17372474074363708, 0.21773657202720642, -0.5070632696151733, -0.27160099148750305, 0.48722368478775024, 0.2320796102285385, 0.6636749505996704, -0.1624140739440918, 0.0362054444849...
False False 5 5 False False 6 8 False False 7 13 False False 8 21 False False 9 34 False False
[ 0.12279848754405975, 0.6517399549484253, -0.16914986073970795, -0.0990387350320816, -0.2524506151676178, 0.23268534243106842, 1.2531325817108154, -0.2474692016839981, -0.1304173320531845, 0.5027421116828918, -0.1057574599981308, 0.01149841584265232, 0.18403641879558563, 0.3848401606082916,...
10 55 False False 11 89 False True ```
[ 0.48256510496139526, 0.9635403752326965, -0.031070731580257416, -0.026151740923523903, -0.36005881428718567, 0.1840783804655075, 0.6946732401847839, -0.1887623518705368, 0.16432927548885345, -0.002091740956529975, -0.03567243367433548, 0.29610762000083923, 0.06306207180023193, -0.325996816...
Environment: Windows 2003 Server (32 bit); IIS6, ASP.NET 2.0 (3.5); 4Gb Ram; 1 Worker Process We have a situation where we have a very large System.XmlDocument is being loaded into memory, and then it heads into a complied XSL transform. What is happening is when a web request comes in the server is sitting in an idl...
[ -0.25344979763031006, 0.10022798925638199, 0.5129878520965576, 0.11230534315109253, -0.17457711696624756, -0.23240596055984497, 0.20872429013252258, -0.002535348292440176, -0.15541112422943115, -0.6327570080757141, -0.18269942700862885, 0.8713283538818359, -0.4703505337238312, -0.092952758...
to Perfmon). The related questions I have are: 1) At what level in the stack is this out of memory limitation being met? OS? IIS? ASP.NET? worker process? Is this a per individual web request limit? 2) Is this limit configurable somewhere? 3) Why can’t this web request access the full available system memory? 1) I...
[ 0.15129584074020386, 0.15038135647773743, 0.47420164942741394, 0.09613461047410965, 0.06793327629566193, 0.04117431491613388, 0.26634761691093445, -0.47404175996780396, -0.349634051322937, -0.5791808366775513, -0.005838386248797178, 0.6268211603164673, -0.13504372537136078, 0.1805422902107...
the total address space. 2) Probably but don't forget that memory fragmentation may play a role in getting to out of memory faster than you think, e.g. if there is a memory request for a contiguous 1000 Mb piece of memory then this may not necessarily be found in the current memory. 3) Have you examined dump data to ...
[ 0.14276468753814697, -0.0640968456864357, 0.14617860317230225, 0.3791954219341278, 0.13945958018302917, 0.0016917524626478553, -0.003583692479878664, -0.005549353547394276, -0.5811471939086914, -0.6947659850120544, -0.07037210464477539, 0.4000691771507263, 0.10740053653717041, 0.0875105932...
I am using VMware Workstation 6.5 on Windows Vista x64. I would like to automate some of the VM management tasks. I know that there is a COM API (<http://www.vmware.com/support/developer/vix-api/>) available which I could use directly. Is there a C# wrapper for this COM API? Thanks, Arnie ArnieZ. Any COM DLL can be...
[ 0.7662524580955505, 0.09977497160434723, 0.2675659656524658, 0.11648429930210114, -0.09701310098171234, -0.13747528195381165, -0.0742470845580101, 0.02087939716875553, -0.32551756501197815, -0.904460072517395, 0.057855334132909775, 0.8144087791442871, -0.31465354561805725, 0.08679160475730...
remember to use the .NET Marshaling API to decrease reference counts when you are done using them, otherwise you will cause memory leaks. I've wrapped the interop implementation in another library that implements IDisposable on its objects so that cleanup is handled automatically before, but if it is a large library, ...
[ 0.3265257775783539, -0.06450440734624863, -0.2537665367126465, 0.388977587223053, 0.28648102283477783, -0.4622509181499481, 0.22418227791786194, -0.07866494357585907, -0.2038608342409134, -0.8680881857872009, 0.015329300425946712, 0.46328991651535034, -0.3090543746948242, -0.05542413517832...
I am trying to send some data from a LINQ query in C# to an Excel speed sheet using OLE I have a query like this: ``` Var data = from d in db.{MyTable} where d.Name = "Test" select d; ``` I have the Excel OLE object working fine, I just can't figure out how to populate the cells in Excel with ...
[ 0.1327887773513794, 0.29158535599708557, 0.26406893134117126, -0.07845909893512726, -0.28849318623542786, -0.02573220245540142, 0.22917243838310242, -0.15616951882839203, -0.0024626830127090216, -0.9630283117294312, 0.06421443074941635, 0.3280637860298157, -0.49063631892204285, -0.01106435...