text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
the Visual Studio Debugger get confused by this and cannot figure out how to attach to the correct process. You can work around this by disabling the process growth feature of LCIE. Here's how:
>
>
> 1. Open RegEdit
> 2. Browse to HKEY\_LOCALMACHINE -> SOFTWARE -> Microsoft -> Internet Explorer -> Main
> 3. Add a dwo... | [
0.1897333413362503,
-0.23141780495643616,
0.4408259391784668,
-0.02310694009065628,
-0.3170931041240692,
-0.40367427468299866,
0.144948348402977,
-0.05867091566324234,
-0.275068998336792,
-0.5418844223022461,
-0.2729828655719757,
0.7227997183799744,
-0.39742511510849,
-0.026063883677124977... | |
turn off protected mode.
Credit: Brad Sullivan, Program Manager, Visual Studio Debugger, MSFT
Source: <http://social.microsoft.com/Forums/en-US/vsdebug/thread/e2c795cd-b7a0-4fad-b7c9-b1ca40d7302e> | [
0.2951619327068329,
0.18649344146251678,
-0.1290665566921234,
0.018164116889238358,
0.3848039209842682,
-0.1546027958393097,
0.3718457818031311,
-0.04556828737258911,
-0.048049602657556534,
-0.09150739014148712,
-0.8474676609039307,
0.7930153012275696,
-0.2669731676578522,
0.02632275223731... | |
I have two tables. Those tables have two relation between them.
```
Table 1
* ID_XPTO (PK)
* Detail
Table 2
* ID_XPTO (FK) (PK)
* ID_XPTO2 (FK) (PK)
```
Those two relations exists.
```
Table 1 -< Table2
Table 1 -< Table2
```
My question is that I need to delete some row in table 1. I'm currently do... | [
-0.060001544654369354,
0.3624916672706604,
0.603300154209137,
-0.19441315531730652,
-0.2411942332983017,
0.2836352288722992,
-0.20826458930969238,
-0.3754160404205322,
-0.29206860065460205,
-0.5852438807487488,
0.025321314111351967,
0.49429482221603394,
-0.20709341764450073,
0.000341385748... | |
@ID_XPTO
delete from Table
where ID_XPTO in (select xptoTable2from @table)
```
I know that I could use ON DELETE SET NULL on table2. On that way I could then search for all rows with null value on ID\_XPTO2 and delete them, but DBA does not wants to use it.
Is there some better solution to do this process?
You have... | [
0.2368411272764206,
0.10686920583248138,
0.39856457710266113,
-0.04003823921084404,
-0.4871096909046173,
-0.11207017302513123,
0.29518547654151917,
-0.4102163314819336,
-0.11732228845357895,
-0.4606725871562958,
0.10553212463855743,
0.7918516993522644,
-0.24255487322807312,
0.0550792552530... | |
constraints (I understand your DBA has nixed this option).
* Write a trigger `BEFORE DELETE` on Table1, to delete or set NULL any reference in Table2. Check with your DBA to see if this is any more acceptable than the cascading RI constraints.
Finally, I would advise talking to your DBA and asking the same question yo... | [
0.09528811275959015,
0.04248383641242981,
0.48538199067115784,
-0.015721535310149193,
-0.009709171019494534,
-0.0834309458732605,
0.05234755948185921,
-0.137166365981102,
-0.3919439911842346,
-0.648195743560791,
-0.1598283350467682,
0.7594279646873474,
-0.28358402848243713,
0.0383387021720... | |
I want to get a new string from the third character to the end of the string, e.g. `myString[2:end]`. If omitting the second part means 'till the end', and if you omit the first part, does it start from the start?
```
>>> x = "Hello World!"
>>> x[2:]
'llo World!'
>>> x[:2]
'He'
>>> x[:-2]
'Hello Worl'
>>> x[-2:]
'd!'
>... | [
0.04189459607005119,
-0.22054708003997803,
0.6407407522201538,
-0.3090507686138153,
-0.09363455325365067,
-0.09063740819692612,
0.23405738174915314,
0.03265373408794403,
0.040562890470027924,
-0.6553075909614563,
-0.38577428460121155,
0.3417986035346985,
-0.03703760355710983,
0.22486855089... | |
I want to create Windows Service that acts as a HTTP listener and can handle around 500 clients. Are there any special considerations for this kind of service.
I am a little confused between the HTTPListener class and the TCPListener class. Which one to use for a Windows Service that will:
1. Accept the client connec... | [
0.285861611366272,
0.0794927105307579,
0.4419860541820526,
-0.20219020545482635,
-0.09489251673221588,
-0.06800208985805511,
0.2582244575023651,
-0.2629919946193695,
-0.07950930297374725,
-0.815834641456604,
-0.010674388147890568,
0.535487174987793,
-0.17264395952224731,
0.3506797552108764... | |
listener);
private void OnRequestReceive(IAsyncResult result)
{
HttpListener listener = (HttpListener)result.AsyncState;
// Call EndGetContext to complete the asynchronous operation.
HttpListenerContext context = listener.EndGetContext(result);
HttpListenerRequest request = context.Request;
}
```... | [
-0.13826194405555725,
-0.13786347210407257,
0.5982435345649719,
-0.24434170126914978,
-0.2198624461889267,
0.26550015807151794,
0.4817792773246765,
-0.6762716174125671,
-0.4036688208580017,
-0.7054177522659302,
0.02080678939819336,
0.7549471259117126,
-0.45502620935440063,
0.38251394033432... | |
can accept multiple connections concurrently (see comment). However IIS's other facilities to host code would avoid reinventing the wheel. So unless there are very specific requirements that preclude IIS, why not take the easy path?
For serious use, use IIS, creating an Http Handler (a class that implements IHttpHandl... | [
0.007074593100696802,
-0.3263775706291199,
0.16931100189685822,
0.28331804275512695,
-0.15406674146652222,
-0.0764322429895401,
0.1951095163822174,
-0.2326841652393341,
-0.4463062286376953,
-0.9743462204933167,
-0.15695928037166595,
0.33553364872932434,
-0.3079126477241516,
0.0916526913642... | |
processing, in step 3, includes another HTTP call, I doubt using HttpListner will be able to handle the load without ensuring every operation is asynchronous (getting context and request, performing the onward HTTP request and then sending the response)... which will lead to some more difficult coding.
Unless there is... | [
-0.17068324983119965,
-0.2901068925857544,
0.4217053949832916,
-0.07924546301364899,
-0.39518770575523376,
-0.020237255841493607,
0.16193222999572754,
-0.7987476587295532,
-0.2228238582611084,
-0.6329020857810974,
-0.11293776333332062,
0.41811230778694153,
-0.3461577892303467,
-0.226197630... | |
I am currently designing a font engine for an embedded display. The basic problem is the following:
I need to take a dynamically generated text string, look up the values from that string in a UTF-8 table, then use the table to point to the compressed bitmap array of all the supported characters. After that is comple... | [
-0.13508152961730957,
0.30906954407691956,
0.3902055025100708,
-0.05918266624212265,
0.0289296954870224,
0.3854316771030426,
0.10104462504386902,
-0.13285961747169495,
0.34089574217796326,
-0.7980437278747559,
0.08547291904687881,
0.6124109029769897,
-0.5069335103034973,
0.0009298201184719... | |
have the ability to add the needed glyphs later on for localization purposes. All development is being done in C and assembly.
The glyph size is a maximum of 16 bits wide by 16 bits tall. We will probably need to have support for the whole of the Basic Multilingual Plane (3 bytes), as some of our larger customers are ... | [
-0.01269253809005022,
0.23311272263526917,
0.4882628917694092,
0.008028056472539902,
-0.11415815353393555,
0.010705645196139812,
0.3118060827255249,
0.1654379814863205,
-0.19137923419475555,
-0.6553013920783997,
-0.48197564482688904,
0.24288278818130493,
-0.3104035258293152,
-0.18346346914... | |
of the Unicode space will be enough for you. If your bitmap table has, say U+0020 through U+007E at positions 0x00 to 0x5E and U+00A0 through U+00FF at positions 0x5F to 0xBE and U+1200 through U+1241 at 0xBF to 0xFF, you could do something like the code below (which isn't tested, not even compile-tested).
bitmapmap c... | [
0.18599273264408112,
0.12032605707645416,
0.5378377437591553,
0.14670751988887787,
-0.013606920838356018,
0.38770341873168945,
0.10112565755844116,
-0.7155112028121948,
-0.1275617927312851,
-0.43455392122268677,
-0.0544399693608284,
0.32012051343917847,
-0.4016713798046112,
-0.093335233628... | |
says how long this series is.
The first part of the while loop iterates through UTF-8 input and builds up a Unicode code point in ucs2char. Once a complete character is found, the second part searches for that character in one of the ranges mentioned in bitmapmap. If it finds an appropriate bitmap index, it adds it to... | [
0.034807316958904266,
-0.03879612684249878,
0.7073032855987549,
-0.25633102655410767,
0.12612271308898926,
0.12213047593832016,
0.10866603255271912,
0.06527046114206314,
0.021940212696790695,
-0.32378721237182617,
-0.22522898018360138,
0.21667642891407013,
-0.06190228834748268,
0.124217398... | |
about three cut-and-pastes from C89
// Assuming an unsigned short is 16-bit
unsigned short bitmapmap[]={0x0020, 0x005E,
0x00A0, 0x0060,
0x1200, 0x0041,
0x0000};
int | [
0.20840752124786377,
-0.12418492138385773,
0.10182385891675949,
-0.04242248833179474,
0.17668429017066956,
0.7143438458442688,
0.21024452149868011,
-0.3270864188671112,
-0.08150220662355423,
-0.19942134618759155,
0.04832667112350464,
0.31994113326072693,
-0.17878693342208862,
0.02316354028... | |
utf8_to_bitmap_indexes(unsigned char *utf8, unsigned short *indexes)
{
int bitmapsfound=0;
int utf8numchars;
unsigned char c;
unsigned short ucs2char;
while (*utf8)
{
c=*utf8;
if (c>=0xc0)
{
utf8numchars=0;
while (c&0x80)
{ | [
0.07431204617023468,
-0.14178216457366943,
0.6993874311447144,
-0.33793866634368896,
0.31039711833000183,
0.15500183403491974,
0.3329016864299774,
-0.28575626015663147,
-0.0856785774230957,
-0.24435992538928986,
-0.5248833894729614,
0.7809158563613892,
-0.32884442806243896,
0.1554161310195... | |
utf8numchars++;
c<<=1;
}
c>>=utf8numchars;
ucs2char=0;
}
else if (utf8numchars && c<0x80)
{ | [
-0.40284785628318787,
-0.10641555488109589,
0.6867032051086426,
-0.3570568561553955,
0.19207610189914703,
-0.028223587200045586,
0.17537835240364075,
-0.20684465765953064,
-0.06867985427379608,
-0.3636994957923889,
-0.463470995426178,
0.7409669756889343,
-0.21373718976974487,
0.19063919782... | |
// This is invalid UTF-8. Do our best.
utf8numchars=0;
}
if (utf8numchars)
{
c&=0x3f;
ucs2char<<=6;
ucs2char+=c;
utf8numchars--; | [
-0.11255032569169998,
0.12398751825094223,
0.47288236021995544,
-0.2380955070257187,
0.5007750988006592,
-0.15239879488945007,
0.6084191203117371,
-0.14211060106754303,
0.12616777420043945,
-0.4223063886165619,
-0.38313180208206177,
0.6630848050117493,
-0.17871280014514923,
0.0853423029184... | |
if (utf8numchars)
continue; // Our work here is done - no char yet
}
else
ucs2char=c;
// At this point, we have a complete UCS-2 char in ucs2char
unsigned short bmpsearch=0; | [
0.21825134754180908,
-0.09908833354711533,
0.43776026368141174,
-0.41217243671417236,
0.4028491675853729,
-0.2668571472167969,
0.41420334577560425,
0.04887208342552185,
0.0316348522901535,
-0.25150957703590393,
-0.3203609585762024,
0.4880920648574829,
-0.19183854758739471,
0.22973999381065... | |
unsigned short bmpix=0;
while (bitmapmap[bmpsearch])
{
if (ucs2char>=bitmapmap[bmpsearch] && ucs2char<=bitmapmap[bmpsearch]+bitmapmap[bmpsearch+1])
{
*indexes++ = bmpix+(ucs2char-bitmapmap[bmpsearch]);
bitmapsfound++;
break; | [
0.3328368067741394,
-0.21187354624271393,
0.23200957477092743,
-0.1806972771883011,
0.3360796570777893,
0.06394852697849274,
0.5411631464958191,
-0.354992538690567,
-0.058936957269907,
-0.061929475516080856,
-0.3245457410812378,
0.4655279815196991,
-0.4812766909599304,
-0.01920429244637489... | |
}
bmpix+=bitmapmap[bmpsearch+1];
bmpsearch+=2;
}
}
return bitmapsfound;
}
```
EDIT: You mentioned that you need more than the lower 16 bits. s/unsigned short/unsigned int/;s/ucs2char/codepoint/; in the above code and it can then do the whole Unicode space. | [
0.09402550011873245,
-0.030009526759386063,
0.417908251285553,
-0.25257813930511475,
0.17422355711460114,
-0.08054591715335846,
0.26368966698646545,
-0.24440522491931915,
-0.20095166563987732,
-0.4639447331428528,
-0.3009697496891022,
0.47957301139831543,
-0.3498474955558777,
-0.2628297209... | |
We are experiencing an Oracle Deadlock (org.hibernate.util.JDBCExceptionReporter - ORA-00060: deadlock detected while waiting for resource) error. It has been suggested that the issue is with a process that is performing readonly operations using Hibernate while another process is performing an update on the same row.
... | [
0.18153145909309387,
0.05070970579981804,
0.02389397844672203,
0.09800238162279129,
0.16775156557559967,
-0.1477375328540802,
0.15254594385623932,
-0.13517335057258606,
-0.2625449299812317,
-0.3047585189342499,
-0.057920776307582855,
0.5417102575302124,
-0.23414187133312225,
0.207622736692... | |
is: Does Hibernate, when no explicit transaction management is defined, try to get a read/write lock on a row even if only a "load" of an object is performed. No Save/Update is performed.
Is it possible that defining a transaction around the service that is loading data, and then specifically saying READONLY on the tr... | [
0.10226690769195557,
-0.0467536598443985,
0.2684940993785858,
-0.10351158678531647,
0.22442838549613953,
-0.24725647270679474,
0.03381860628724098,
-0.4473276138305664,
-0.13992753624916077,
-0.38386985659599304,
-0.15131045877933502,
0.6182873249053955,
-0.4024839699268341,
0.267763853073... | |
return (PurchaseOrderData)getHibernateTemplate().get(PurchaseOrderData.class, id);
}
}
```
The Spring configuration for the service calling this method is:
```
<bean id="orderDataService"
class="com.example.orderdata.HibernatePurchaseOrderDataService">
<property name="sessionFactory" ref="orderDataSess... | [
-0.24609129130840302,
0.006954981479793787,
0.6134310364723206,
-0.20157402753829956,
0.12580285966396332,
0.13411946594715118,
-0.13154543936252594,
-0.4507732689380646,
-0.06771130114793777,
-0.5074434280395508,
-0.41312792897224426,
0.6075382232666016,
0.06620161235332489,
0.21976356208... | |
</property>
</bean>
```
The actual deadlock is occurring on one of the PurchaseOrderItem records being loaded by the call to the load the PurchaseOrder.
Would this cause a deadlock if the record being loaded was locked by another process? And if so - would adding a transaction wrapper such as the one below solve the... | [
0.10345898568630219,
0.08391863852739334,
0.336244136095047,
-0.06803753226995468,
0.19301339983940125,
-0.20611630380153656,
-0.1403154879808426,
-0.46966680884361267,
-0.27227941155433655,
-0.4571141004562378,
-0.15738937258720398,
0.7340433597564697,
-0.09466588497161865,
0.410796463489... | |
<prop key="*">PROPAGATION_REQUIRED,readOnly</prop>
</props>
</property>
</bean>
```
Update: The DataBase team has seen trace messages on the server that seem to indicate that our "readonly" process is actually writing to the database automatically. There are logged "UPDATE" commands that are performed on the ... | [
0.5314210057258606,
-0.12396925687789917,
0.44408929347991943,
0.07320430129766464,
0.11302672326564789,
-0.48103299736976624,
0.44155481457710266,
-0.21970658004283905,
-0.29831016063690186,
-0.4896136224269867,
-0.05500805377960205,
0.570447564125061,
-0.26602524518966675,
-0.23666660487... | |
solution might be to use a transaction wrapper with readOnly on it...
We finally determined that the solution was to wrap it in a readOnly transaction.
I am not clear why, we were not using the setters at all (simply reading the data) - nothing was getting changed in the database. But for some reason Hibernate was try... | [
0.041411641985177994,
-0.1255912482738495,
0.38938575983047485,
-0.045215707272291183,
0.008607877418398857,
-0.31396880745887756,
0.1518562287092209,
-0.2996010184288025,
-0.4482983946800232,
-0.5431047677993774,
-0.07317805290222168,
0.3326855003833771,
-0.4677557051181793,
0.19708780944... | |
<!-- all methods require a transaction -->
<prop key="*">PROPAGATION_REQUIRED,readOnly</prop>
</props>
</property>
``` | [
-0.01156777422875166,
-0.24279993772506714,
0.42583832144737244,
0.35727831721305847,
0.0984172597527504,
-0.20161333680152893,
0.24767665565013885,
-0.6716515421867371,
-0.1504124253988266,
-0.36959919333457947,
-0.4459085762500763,
0.7306376695632935,
-0.26600614190101624,
0.054746970534... | |
I have image, and on mouse over it fades in two arrows (on the left and right sides), then on mouseout it fades those arrows out. My problem is that when the user hovers over the arrows, the image considers it a mouseout (since the arrows float above the image), and fades the arrows out, causing an infinate loop of fad... | [
0.16871783137321472,
0.01022381242364645,
0.5443569421768188,
-0.1289396584033966,
-0.0371253602206707,
0.16766886413097382,
0.22802843153476715,
-0.07587417960166931,
-0.14539393782615662,
-0.848613440990448,
0.4122662842273712,
0.46634986996650696,
-0.04858620464801788,
0.247359693050384... | |
some code:
```
$(".arrow").mouseover(function() {
overArrow = 1;
$("#debug_oar").text(1)
})
$(".arrow").mouseout(function() {
overArrow = 0;
$("#debug_oar").text(0)
})
$("#image").mouseout(function() {
$(".arrow").fadeOut(250,function() { $(".arrow").remove();})
})
$("#image").mouseover(functio... | [
0.03591587394475937,
-0.08498705923557281,
0.7780457139015198,
-0.374532550573349,
0.05370748043060303,
0.14497771859169006,
0.3535945415496826,
-0.33153530955314636,
0.09448819607496262,
-0.3904813826084137,
-0.19181832671165466,
0.6945937275886536,
-0.26618120074272156,
0.129047557711601... | |
width = $("#image").width()
pos = $("#image").position();
// Calculate positioning
nHeight = height/2
y = pos.top + nHeight - (aHeight/2)
// Position the left arrow
$("#lArrow").css("top",y)
$("#lArrow").css("left",pos.left+10)
// Now the right...
... | [
-0.2741277515888214,
-0.02474794164299965,
0.7385327816009521,
-0.19765408337116241,
-0.385624498128891,
0.30465537309646606,
0.19390155375003815,
-0.2077549248933792,
-0.2252298891544342,
-0.20750924944877625,
-0.008523821830749512,
0.5433927774429321,
0.02850668877363205,
-0.020523888990... | |
$("#rArrow").css("left",pos.left+width-aWidth-20)
// Display 'em
$(".arrow").fadeIn(250);
// Debug info
$("#debug_x").text(pos.left)
$("#debug_y").text(y)
$("#debug_height").text(height)
}
})
```
Thanks
For those who are interested in the final code:
```
$("#image... | [
-0.003926869947463274,
0.18967658281326294,
0.8279188871383667,
-0.16622307896614075,
-0.02590569294989109,
0.1285790503025055,
0.5132211446762085,
-0.548570990562439,
0.16214604675769806,
-0.41479992866516113,
-0.2431991994380951,
0.6954306960105896,
-0.15609590709209442,
-0.0322327278554... | |
= $("#image").height()
width = $("#image").width()
pos = $("#image").position();
// Calculate positioning
nHeight = height/2
y = pos.top + nHeight - (aHeight/2)
// Position the left arrow
$("#lArrow").css("top",y)
$("#lArrow").css("left",pos.left+10)
// Now the right...
$("#rArro... | [
-0.24162963032722473,
-0.06782478839159012,
0.9669615626335144,
-0.33474844694137573,
-0.13355699181556702,
0.35713985562324524,
0.24224892258644104,
-0.4312291443347931,
-0.08851127326488495,
-0.24324257671833038,
-0.08046654611825943,
0.6987195014953613,
-0.22354185581207275,
-0.04784471... | |
{ $(".arrow").remove();})
})
```
Try to call [stopPropagation()](http://docs.jquery.com/Events/jQuery.Event#event.stopPropagation.28.29) on your events, or use an alternative event that stops propagation by default like, [mouseenter](http://docs.jquery.com/Events/mouseenter), [mouseleave](http://docs.jquery.com/Events... | [
-0.20135092735290527,
-0.24281486868858337,
0.4793437719345093,
-0.24495646357536316,
0.19104599952697754,
0.00636068731546402,
0.24467651546001434,
-0.05712009593844414,
-0.5872085094451904,
-0.3820432424545288,
-0.2413753718137741,
0.6101768612861633,
-0.4561607241630554,
0.0633125081658... | |
Is it possible to capture the warnings that Javadoc prints when run via the `javadoc` Ant task? I don't see an output attribute such as the one in the task. There seem to be warnings that Checkstyle just isn't catching and it'd be nice to snag that output in a file.
Seems strange this wouldn't be capturable, hopefully... | [
0.10380517691373825,
-0.06163511425256729,
-0.20561331510543823,
-0.10546960681676865,
-0.17031462490558624,
-0.16388042271137238,
0.12067325413227081,
-0.013492075726389885,
-0.5815678238868713,
-0.6776864528656006,
0.15258800983428955,
0.41611409187316895,
-0.4788234233856201,
-0.1681007... | |
action="stop"/>
<target/>
```
If you have:
```
MyObject *o = NULL;
o->func();
```
What happens next depends on whether `func` is virtual. If it is, then it will crash, because it needs an object to get the vtable from. But if it's not virtual the call proceeds with the this pointer set to NULL.
I believe the stan... | [
-0.02357914298772812,
-0.34600433707237244,
0.11355983465909958,
-0.2342224419116974,
0.0035039756912738085,
-0.20974285900592804,
0.41306599974632263,
-0.024458536878228188,
-0.4771620035171509,
-0.3319213092327118,
-0.44746553897857666,
0.7137942314147949,
-0.5689405202865601,
-0.0122097... | |
returns NULL in that case.
You might want to write a reusable helper function:
```
void CheckNotNull(void *p)
{
if (p == NULL)
throw NullPointerException();
}
```
You can then use that at the start of a function to check all its arguments, including `this`:
```
CheckNotNull(this);
``` | [
-0.20554186403751373,
-0.05333800986409187,
0.2249678522348404,
-0.42951884865760803,
0.11092691123485565,
0.08521638065576553,
0.19301560521125793,
0.0456671379506588,
-0.07945527136325836,
-0.3585379123687744,
-0.36899620294570923,
0.531865656375885,
-0.4934977889060974,
0.06496267765760... | |
Introduction a.k.a. what do I intend to do
------------------------------------------
*feel free to skip this part, no real information is comprised in here*
Because of the lack of a good, free (as in speech) `vim`-Mode for the otherwise excellent JavaEditor in Eclipse(3.4), I'm thinking about writing one. The availa... | [
0.05462726205587387,
-0.07293694466352463,
0.30193430185317993,
0.08050046116113663,
-0.2583819031715393,
-0.17510494589805603,
0.09478343278169632,
0.12917371094226837,
-0.10465292632579803,
-0.5461776852607727,
-0.22922223806381226,
0.6787724494934082,
-0.22399775683879852,
-0.2469790130... | |
it's the wrong way of writing a completely new editor based on [`TextEditor`](http://help.eclipse.org/stable/topic/org.eclipse.platform.doc.isv/reference/api/org/eclipse/ui/editors/text/TextEditor.html), because you will then loose the cool features the standard JavaEditor gives you for free (such as 'organize imports'... | [
0.016998793929815292,
-0.17896682024002075,
0.34344592690467834,
-0.12783043086528778,
-0.03125513717532158,
-0.4001317620277405,
0.014197149313986301,
0.07661920040845871,
-0.1420813351869583,
-0.44259488582611084,
-0.14445842802524567,
0.5838472247123718,
-0.3748564124107361,
-0.08314506... | |
still under heavy development and does not have all features you are looking for, but I am working hard on it and I am always open for feature and enhancement requests.
The plugin is called [Vrapper](http://vrapper.sourceforge.net).
It is FOSS and follows the principles you describe, although I don't think it is much ... | [
0.3893320858478546,
-0.22434109449386597,
0.7503359317779541,
-0.12793317437171936,
-0.14556197822093964,
-0.3125607967376709,
0.12182813882827759,
0.1095174252986908,
-0.19264903664588928,
-0.5222015976905823,
-0.15229134261608124,
0.700323760509491,
-0.24322350323200226,
0.21912039816379... | |
On [this url](http://centralpa.floorcoveringsinternational.com/), the text below the Flash piece in the footer will sometimes disappear in IE7, if you slowly scroll up and down a few times. It is difficult to reproduce, but it seems to be related to the flash covering up part of the window and then not refreshing after... | [
0.26146072149276733,
-0.07707665860652924,
0.4862363040447235,
0.01446856651455164,
0.18158462643623352,
-0.23025397956371307,
0.3272153437137604,
0.5035687685012817,
-0.6957852244377136,
-0.5919974446296692,
-0.17661097645759583,
-0.08608204126358032,
-0.19490842521190643,
0.3549718856811... | |
While looking over various PHP libraries I've noticed that a lot of people choose to prefix some class methods with a single underscore, such as
```
public function _foo()
```
...instead of...
```
public function foo()
```
I realize that ultimately this comes down to personal preference, but I was wondering if an... | [
0.3902404308319092,
0.24691641330718994,
-0.1588912159204483,
-0.09369776397943497,
-0.4894723892211914,
-0.22710607945919037,
0.5192634463310242,
0.2673029899597168,
-0.35820090770721436,
-0.07544504106044769,
-0.016560863703489304,
0.20549814403057098,
-0.47046706080436707,
0.28797388076... | |
(a language) I'm not familiar with or that there may be good reasoning behind it that I would benefit from knowing.
Any thoughts, insights and/or opinions would be appreciated.
It's from the bad old days of Object Oriented PHP (PHP 4). That implementation of OO was pretty bad, and didn't include things like private me... | [
-0.03293183818459511,
0.38689950108528137,
0.09721633046865463,
-0.3610483705997467,
-0.33715105056762695,
-0.1207117959856987,
0.41626250743865967,
0.5037351846694946,
-0.13803042471408844,
0.03474445268511772,
0.05581848695874214,
0.3668842017650604,
-0.5010562539100647,
-0.2322406917810... | |
causes that. | [
0.4563247859477997,
0.29244545102119446,
-0.10225999355316162,
0.05076435208320618,
0.10850264877080917,
-0.07866822928190231,
0.17374907433986664,
0.25241777300834656,
0.0647231861948967,
-0.43261978030204773,
0.37706443667411804,
0.11747866123914719,
-0.1562366783618927,
0.03039521910250... | |
Is there an object in Java that acts like a Map for storing and accessing key/value pairs, but can return an ordered list of keys and an ordered list of values, such that the key and value lists are in the same order?
So as explanation-by-code, I'm looking for something that behaves like my fictitious OrderedMap:
```... | [
-0.04954598844051361,
-0.1628650277853012,
0.1500224620103836,
-0.27346271276474,
0.14105841517448425,
0.06960827857255936,
0.26318973302841187,
-0.41390711069107056,
-0.5848067998886108,
-0.39721956849098206,
-0.30157291889190674,
0.5000602006912231,
-0.2858893573284149,
0.066118486225605... | |
== value);
}
```
The [SortedMap](https://docs.oracle.com/javase/8/docs/api/java/util/SortedMap.html) interface (with the implementation [TreeMap](https://docs.oracle.com/javase/8/docs/api/java/util/TreeMap.html)) should be your friend.
The interface has the methods:
* [`keySet()`](https://docs.oracle.com/javase/8/do... | [
-0.4190218448638916,
0.11332134902477264,
0.650610625743866,
0.0033960510045289993,
0.28346699476242065,
-0.08832484483718872,
0.13465756177902222,
-0.20295703411102295,
-0.19652755558490753,
-0.7456420660018921,
0.00682247057557106,
0.8994505405426025,
-0.1566714346408844,
-0.101230271160... | |
I am new to C#. Here is a hard-coded thing I got working:
```
InputProperty grantNumber = new InputProperty();
grantNumber.Name = "udf:Grant Number";
grantNumber.Val = "571-1238";
Update update = new Update();
update.Items = new InputProperty[] { grantNumber };
```
Now I want to generalize this to support an indefi... | [
0.23416298627853394,
0.06012929975986481,
0.7704052925109863,
-0.1496051400899887,
0.06499980390071869,
-0.11305392533540726,
0.2442975640296936,
-0.7529182434082031,
0.011891878210008144,
-0.4394148886203766,
-0.2781207859516144,
0.504632294178009,
-0.18269316852092743,
0.1408635824918747... | |
of InputProperty objects
int i = 0;
foreach (string key in nvPairs.Keys)
{
metaData[i] = new InputProperty(); // compiler complains on this line
metaData[i].Name = "udf:" + key;
foreach (string value in nvPairs.GetValues(key))
metaData[i].Val = value;
}
updat... | [
-0.10235562920570374,
-0.08296798169612885,
0.5629464387893677,
0.027940649539232254,
0.2989484667778015,
0.24803107976913452,
0.21406733989715576,
-0.4170745611190796,
-0.28018465638160706,
-0.4391893148422241,
-0.6600489616394043,
0.6626566052436829,
-0.40372034907341003,
0.4858100116252... | |
// return the Update object
}
```
Since the size of your Items collection can vary, you should use a collection type like `List<T>` or `Dictionary<K,V>` instead of an array. | [
0.11741757392883301,
-0.2298763394355774,
0.13643059134483337,
0.22898101806640625,
0.03480316698551178,
-0.16290263831615448,
-0.03506816551089287,
0.02131655067205429,
-0.1933964192867279,
-0.6215031743049622,
-0.2966984212398529,
0.46220436692237854,
-0.21883536875247955,
0.182886555790... | |
I suspect that I will shortly have a need to write an "integration" library that will need to call an OLE object on Windows from Java.
I have done Java to C/C++ integration on windows before (using C/C++ and JNI) - so I'm not new to that part of the equation.
However; I'd like to try out writing a C/C++ wrapper aroun... | [
0.14311712980270386,
0.02983872964978218,
0.3100382685661316,
-0.18855099380016327,
-0.15259775519371033,
-0.2471817284822464,
0.27003002166748047,
-0.18310803174972534,
-0.012732518836855888,
-0.840955376625061,
-0.06569662690162659,
0.7011308670043945,
-0.5489583611488342,
-0.23196908831... | |
OLE Objects (e.g. Excel, Word, etc.)"
2. If my presumption about #1 is correct, I need a "test" application that provides an OLE object that I can call - what are suggestions for something that would be good practice?
The session ID has to be carried along in some way in order that the same session can be used over sev... | [
0.3197159171104431,
0.16087324917316437,
0.6529571413993835,
-0.14450988173484802,
-0.23135855793952942,
-0.11480193585157394,
0.3273392915725708,
-0.23131142556667328,
-0.21579422056674957,
-0.6775946021080017,
-0.2632153332233429,
0.6331028938293457,
-0.3954474627971649,
0.03247527405619... | |
load the right session and session data.
See also [Is my understanding of PHP sessions correct?](https://stackoverflow.com/questions/523703/is-my-understanding-of-php-sessions-correct) | [
0.08021965622901917,
0.049864910542964935,
0.015091842971742153,
0.40066564083099365,
-0.07257398217916489,
-0.28405630588531494,
0.44992130994796753,
-0.15652519464492798,
-0.36077579855918884,
-0.2707907557487488,
0.010543768294155598,
0.751885175704956,
-0.029182730242609978,
-0.3936335... | |
I need to implement some versioning for deployment for the app I support where I can copy the site to say c:\inetpub\wwwroot\app\_v2 and then switch the virtual directory from c:\inetpub\wwwroot\app\_v1.
Is there a way to change the physical path for a virtual directory in IIS from the command line?
Edit:
i found t... | [
-0.026730742305517197,
0.036763448268175125,
0.6669793725013733,
0.04284200817346573,
0.134528249502182,
0.10890406370162964,
0.28368085622787476,
-0.02821812592446804,
-0.49059373140335083,
-0.9703295230865479,
-0.183785080909729,
0.6107978224754333,
-0.37889406085014343,
0.14703981578350... | |
6.
Yes, look at WMI scripting.
<http://learn.iis.net/page.aspx/163/managing-applications-and-application-pools-on-iis-7-with-wmi/>
<http://www.aspfree.com/c/a/IIS/IIS-60-Getting-Information-Using-WMI/3/>
Nick | [
0.09993919730186462,
0.10866806656122208,
0.4911191165447235,
0.2573432922363281,
0.21451535820960999,
-0.34297361969947815,
0.14203813672065735,
-0.2507427930831909,
-0.31564071774482727,
-0.6044583916664124,
-0.19297611713409424,
0.6820659637451172,
0.011669144965708256,
0.27310919761657... | |
I have a .NET web app that utilizes the FogBugz API to write problem tickets to our FB server... it uses the *new* command and... among all the other attributes... uses the *sCustomerEmail* argument to send the user's e-mail with the ticket.
My question is this: Is there a way that I can get a list (via the API, of co... | [
0.5193402767181396,
0.08951441198587418,
0.45874708890914917,
0.3366117477416992,
0.015807000920176506,
-0.27487045526504517,
0.010011833161115646,
0.1864461451768875,
-0.23371879756450653,
-0.7101297974586487,
0.2492906004190445,
0.22416569292545319,
-0.3056536316871643,
0.339108556509017... | |
maybe see hints in the API docs but nothing concrete.
Thanks for any suggestions
Yes, you need to send a custom search to the API, passing in the email address as the correspondent axis.
So, once you've got a logon token:
```
https://example.fogbugz.com/api.asp?cmd=logon&email=jdoe@example.com&password=SecretPwd
``... | [
-0.044093843549489975,
0.12180189043283463,
0.7378079295158386,
0.1012178584933281,
-0.08651097863912582,
0.26753470301628113,
0.052856605499982834,
0.2662316560745239,
-0.17155225574970245,
-0.4803134799003601,
0.2071406990289688,
0.2749495506286621,
-0.2980498671531677,
0.453514933586120... | |
sure whether this was what you wanted or the case number), the title (sTitle) and the date the case was opened (dtOpened).
Technically you don't need to ever ask for the ixBug column as it's always available as an attribute of each case element returned in the xml, but sometimes it's easier to have these things as an ... | [
0.12415759265422821,
0.12899664044380188,
0.6121379137039185,
0.19058914482593536,
-0.10619001090526581,
-0.1275424212217331,
-0.018038855865597725,
-0.04582305997610092,
-0.15365031361579895,
-0.44266700744628906,
-0.10149862617254257,
0.5067722797393799,
-0.07658376544713974,
-0.07803297... | |
Times farthest in the past and farthest in the future that can be represented?
Is it absolute moments in time, or distance in time from the present moment?
I couldn't find it in the [docs for the Time class](http://www.noobkit.com/show/ruby/ruby/ruby-core/time.html).
Does it depend on the system? If so, how can I ac... | [
0.013352202251553535,
-0.08835991472005844,
0.42354410886764526,
-0.004349227994680405,
0.41084781289100647,
0.11775504797697067,
0.11711949110031128,
0.4525194466114044,
-0.24731354415416718,
-0.6674402952194214,
0.1604175716638565,
-0.22783583402633667,
0.25206518173217773,
0.71299964189... | |
to look up the definition of a word, it's nice to just do something like:
```
definition['pernicious']
```
Instead of trying to figure out the correct numeric index that the definition would be stored at.
*This answer assumes that by "hash" you're basically just referring to an associative array.* | [
0.3266362249851227,
0.17432160675525665,
-0.0388774573802948,
0.03547028452157974,
-0.35719960927963257,
-0.13763271272182465,
0.3952750265598297,
0.1679917871952057,
-0.1384740173816681,
-0.47672033309936523,
-0.15369008481502533,
0.2705014646053314,
-0.13951781392097473,
0.27101925015449... | |
I am trying to set up as a front end reverse proxy with Haproxy forwarding requests to Apache web servers in the back end. My problem is that I have been unsuccessful in getting it to work with SSL requests using Apache.
I know that Haproxy can not handle SSL requests so I am trying to set up Apache to accept the cli... | [
0.24917888641357422,
0.35686126351356506,
0.2282763421535492,
-0.14360490441322327,
-0.3776856064796448,
-0.10761715471744537,
0.3539448380470276,
0.028481943532824516,
-0.1901305913925171,
-0.5927601456642151,
0.14837928116321564,
0.2538091838359833,
-0.2647920250892639,
0.439968109130859... | |
of the Apache and Haproxy config please?
What do you mean with "do something bad and then change their name"? If you're implying that users can post content, for instance, with their name attached, and then change their name and the name attached to their posts won't change as well, then I think you need to reconsider ... | [
0.4881397783756256,
0.16068613529205322,
0.019225267693400383,
0.1564042717218399,
-0.3278611898422241,
-0.5186288356781006,
0.4527721405029297,
-0.11064477264881134,
-0.19759361445903778,
-0.3590765595436096,
-0.0192120298743248,
0.5256088376045227,
-0.5933800935745239,
0.2524808049201965... | |
your username is irrelevant to the problem. Let's say my username is Foo and I troll some thread somewhere, then change my name to Bar. As long as people can see what I've posted (eg. a post history page), then it doesn't matter whether I used to be called Foo or not, Bar is associated now with posts made before that w... | [
0.8034345507621765,
0.4718204140663147,
0.4146861433982849,
-0.18962332606315613,
-0.3228899836540222,
0.07485255599021912,
0.21893103420734406,
0.5156911611557007,
-0.4205092191696167,
-0.44838055968284607,
0.22306543588638306,
0.3778379261493683,
-0.40112507343292236,
0.37890884280204773... | |
When I write papers or documentation it makes think using LaTeX or OpenOffice is overkill as I usually only need some markup elements (bold, headlines, lists, ...) . I'd like to write my documents using a wiki style markup as this is very efficient.
For example:
```
= Introduction =
'''HTML''' is a markup language...... | [
0.2850026786327362,
0.3919011950492859,
0.09441772103309631,
0.0472530722618103,
-0.3672257363796234,
-0.3752707839012146,
0.024940691888332367,
-0.09536562114953995,
-0.1239902451634407,
-0.9401790499687195,
-0.2243146449327469,
0.5750066637992859,
-0.1518426239490509,
-0.2045098692178726... | |
to TeX and then to PDF/PS.
You might find that [MarkDown](http://daringfireball.net/projects/markdown/) gets pretty close to what you want.
MarkDown is a simple technique for marking up text files so that they can be post-processed into other forms. One of the nice things about MarkDown is their goal that a marked-up ... | [
0.42372336983680725,
-0.03240860998630524,
0.26781994104385376,
0.07324659824371338,
-0.4422979950904846,
-0.6735307574272156,
-0.02214653231203556,
-0.14852026104927063,
0.031414665281772614,
-0.5462820529937744,
-0.28957656025886536,
0.2006371170282364,
-0.06728998571634293,
-0.165321499... | |
up with tags or
> formatting instructions.
[PanDoc](http://johnmacfarlane.net/pandoc/) looks like it might be good companian tool to convert the MarkDown straight into PDF files. There may well be other choices - PanDoc is just the best tool I found with a quick Google search. | [
0.5606720447540283,
-0.08516544848680496,
0.08906594663858414,
0.11960697174072266,
-0.012382580898702145,
-0.1974644958972931,
0.10800816118717194,
0.2139362245798111,
-0.62019282579422,
-0.46020159125328064,
-0.0488281324505806,
-0.037092842161655426,
-0.21873673796653748,
0.026120807975... | |
I'm trying to use this tool
<https://swingexplorer.dev.java.net/>
to find some information out about an applet's swing structure. Unfortunately, I didn't develop the applet. I've pulled the jars for the applet from the cache, but there are several hundred .class files in the jars, and I don't know which one has the m... | [
0.5829912424087524,
0.5493398308753967,
0.17364197969436646,
-0.20576351881027222,
-0.11055472493171692,
0.27452126145362854,
0.16524174809455872,
-0.3864067792892456,
-0.49061745405197144,
-0.5976689457893372,
0.2918855845928192,
-0.03151413053274155,
0.07741880416870117,
-0.1326748430728... | |
an [Applet](http://docs.oracle.com/javase/6/docs/api/java/applet/Applet.html) (or [JApplet](http://docs.oracle.com/javase/6/docs/api/javax/swing/JApplet.html)) is more complicated than *start and run until the program is finished* so there is no single `main` method. It will be managed by the browser ([lifecycle tutori... | [
0.13925835490226746,
0.11551903933286667,
0.23258011043071747,
-0.30911898612976074,
0.033130962401628494,
0.09637738764286041,
0.22679701447486877,
-0.2800183892250061,
-0.41898566484451294,
-0.3901534676551819,
-0.6965084075927734,
0.3720535635948181,
-0.28566253185272217,
-0.29694494605... | |
I need to build a simple webservice to get data in and out of a HR System over the Internet (it's a hosted solution). I am using IIS and ASP.Net with .Net 2.0.
Having looked into it, there are several ways of making the webservice secure - I am after some advice on which method to choose, with some views on pros and c... | [
0.4205402135848999,
0.07726316899061203,
0.5192111730575562,
-0.03471066430211067,
-0.1565796583890915,
-0.42593914270401,
0.18201033771038055,
-0.3093174397945404,
0.1124316081404686,
-0.8000672459602356,
-0.07711797952651978,
0.5614830851554871,
-0.20508040487766266,
-0.01698964647948742... | |
far my preferred option due to the relative simplicity. Also, for historical reasons, I will need to consume the webservice from VBScript of all things, so the ability to just deal with simple SOAP is a bonus.
*However, are there any caveats? Am I going to have clients complaining this is a security risk?*
Using WCF ... | [
0.29730284214019775,
0.00813228078186512,
0.4846438467502594,
0.004159646108746529,
-0.3274489939212799,
-0.397677481174469,
0.3371877670288086,
0.07232543081045151,
-0.09330819547176361,
-1.1383771896362305,
0.1532522588968277,
0.43477338552474976,
-0.06899260729551315,
0.2967770695686340... | |
for authentication. Is this correct or have I got it completely wrong?
I suspect this will be a much bigger job, at least implementation wise. Also, I won't be able to access the Webservice directly from VBScript, so will have to write a dll it call call and then deploy that locally - correct?
Is this even availa... | [
0.18951843678951263,
-0.1452467441558838,
0.3631085157394409,
0.16492009162902832,
-0.3640671670436859,
-0.38956359028816223,
0.5617707371711731,
-0.19590424001216888,
-0.15652717649936676,
-0.3682457208633423,
0.04257747903466225,
0.5658636093139648,
-0.27568796277046204,
-0.2748971283435... | |
in a UID to the method call
is a poor cousin of the SoapHeader so
I won't use that.
*I would be very grateful for any advice on the best approach to this problem. If anyone has a good argument why Soap Headers are secure then I would love to hear it, as that seems like the simplest to use, as long as it is "secure eno... | [
0.17644090950489044,
-0.05903002992272377,
0.4785037040710449,
0.2704799771308899,
-0.28980615735054016,
-0.43926045298576355,
0.403421550989151,
-0.296508252620697,
0.04167961701750755,
-0.7705581188201904,
-0.04255986213684082,
0.293912798166275,
-0.04808606579899788,
0.28847914934158325... | |
the user is in a group. If you don't mind compiling the group name into the code, you can even use the [PrincipalPermissionAttribute](http://msdn.microsoft.com/en-us/library/system.security.permissions.principalpermissionattribute.aspx) on your service methods so it'd be completely declarative.
By using Windows, you g... | [
-0.05145425722002983,
-0.14776434004306793,
0.40804797410964966,
0.3125837445259094,
-0.3597021996974945,
-0.564012348651886,
0.6513490080833435,
-0.09085547924041748,
-0.2387247383594513,
-0.22566352784633636,
-0.2884143590927124,
0.3537783622741699,
-0.08049702644348145,
-0.0018224645173... | |
to enforce security checks.
**Edit:**
Maybe you think securing the ASMX is hacky because that's the only step you're looking at? I'd agree! A webservice that only depends that you've denied anonymous sounds very weak indeed. The webservice code itself should demand group membership *after* the authentication is done... | [
0.33680564165115356,
-0.1239694356918335,
0.08987288177013397,
0.10225261747837067,
0.057517409324645996,
-0.4400298297405243,
0.4088914692401886,
-0.2001553326845169,
-0.19933821260929108,
-0.17439702153205872,
-0.011379423551261425,
0.532920241355896,
-0.08862464874982834,
-0.39348641037... | |
I have an existing django web app that is in use. I have to radically migrate one key model in my design to a completely new design, but I want to cache all of the existing data for that model and migrate them to the new records in production when ready to deploy.
I can afford to bring my website down for a few hours ... | [
0.5138263702392578,
0.5147152543067932,
0.03797142952680588,
0.13106422126293182,
0.27741578221321106,
-0.28533363342285156,
-0.025953806936740875,
-0.10485796630382538,
-0.32051724195480347,
-0.7004809975624084,
0.2538224756717682,
0.1912842094898224,
-0.2722738981246948,
0.19825710356235... | |
format, such as SQL, JSON, XML
2) Migrate the model to the new format
3) Reload the data into the new model using a conversion script
I also thought of trying to store all of the existing data in some other model called "OldModel" (if Model is the name of the existing model) and then migrating the data live.
There is ... | [
0.3055163621902466,
-0.013296596705913544,
0.3710072338581085,
0.23088447749614716,
0.238882377743721,
-0.06514999270439148,
-0.016751937568187714,
-0.16481299698352814,
-0.34409570693969727,
-0.9500477910041809,
-0.0641884133219719,
0.2717094421386719,
-0.23776929080486298,
0.260881990194... | |
it as many times as necessary during development and staging testing before the "big deploy". It can be source controlled, diffed, etc. It can also, therefore, be called from a larger deployment script. Of course, we back up production before running it :-)
If your database does journaling, using the old-fashioned met... | [
0.4218085706233978,
-0.007500932551920414,
0.11482224613428116,
0.0744367241859436,
0.21154436469078064,
-0.47329139709472656,
-0.12727759778499603,
-0.0939866155385971,
-0.1980142593383789,
-0.4581984281539917,
-0.2022547721862793,
0.6981893181800842,
0.013352942653000355,
-0.004995048046... | |
database without having to offload or reload vast amounts of data. This way even a complicated migration can take seconds, rather than hours. | [
0.004565101582556963,
0.0055703395046293736,
0.1322048008441925,
0.6384145617485046,
0.36531519889831543,
-0.28501901030540466,
0.07374871522188187,
-0.0044932435266673565,
-0.5220903754234314,
-0.6223053336143494,
-0.17963311076164246,
0.08552674949169159,
-0.05683630704879761,
0.48840329... | |
For pupose of explaining let's say that I have a Company object which has an Address property of type Address. so it would be something like:
```
public class Company
{
Address CompanyAddress;
}
public class Address
{
int Number;
string StreetName;
}
```
Now I have a method that works with an... | [
0.12858599424362183,
0.21091702580451965,
0.18493720889091492,
-0.09570595622062683,
0.14498575031757355,
0.16084899008274078,
-0.13817322254180908,
0.001500976155512035,
0.05379883199930191,
-0.5180648565292358,
-0.17983314394950867,
0.2516651749610901,
-0.32109352946281433,
0.48499506711... | |
internalObject = objectType.GetProperty("Address");
Type internalType = internalObject.GetType();
PropertyInfo singleProperty = internalType.GetProperty("StreetName");
return singleProperty.GetValue(internalObject, null).ToString();
}
```
The problem is that internalType is never Address but "System.Ref... | [
-0.36927977204322815,
0.2447865605354309,
0.442728191614151,
-0.15881626307964325,
0.0562153160572052,
0.11861292272806168,
0.4739342927932739,
-0.36562177538871765,
-0.09643552452325821,
-0.5282436013221741,
-0.29696187376976013,
0.82163006067276,
-0.34337514638900757,
0.3826243579387665,... | |
= internalObject.GetType();
PropertyInfo singleProperty = internalType.GetProperty("StreetName");
return singleProperty.GetValue(internalObject, null).ToString();
}
``` | [
0.11853203177452087,
-0.028777655214071274,
0.2295452207326889,
-0.3786734640598297,
0.07878460735082626,
0.08939099311828613,
0.5381578207015991,
-0.42947977781295776,
0.007791433483362198,
-0.5173326134681702,
-0.26757198572158813,
0.64616858959198,
-0.4043883979320526,
0.309729725122451... | |
I'm writing a program under MS Visual C++ 6.0 (yes, I know it's ancient, no there's nothing I can do to upgrade). I'm seeing some behavior that I think is really weird. I have a class with two constructors defined like this:
```
class MyClass
{
public:
explicit MyClass(bool bAbsolute = true, bool bLocation = false... | [
0.12363164871931076,
0.07843266427516937,
0.3065955638885498,
-0.22145520150661469,
-0.05976534262299538,
0.0663696900010109,
0.3718993663787842,
0.12794989347457886,
-0.08459588140249252,
-0.7497627139091492,
-0.3056786358356476,
0.3941977620124817,
-0.6149735450744629,
0.1018612161278724... | |
see, I added the `explicit` keyword to it in the hopes that it wouldn't do that... no dice. It would appear to prefer the conversion from `const char *` to `bool` over the conversion to `RWCString`, which has a copy constructor which takes a `const char *`. Why does it do this? I would assume that given two possible ch... | [
0.19590595364570618,
0.30332690477371216,
0.15220193564891815,
-0.16227713227272034,
-0.3722570538520813,
-0.1894247829914093,
0.14786562323570251,
0.09242738783359528,
0.011885153129696846,
-0.20675677061080933,
-0.08554461598396301,
0.654363214969635,
-0.3666968047618866,
0.3922961354255... | |
used with literals a lot and that's a lot of extra typing (plus a really easy mistake to make).
Explicit will not help here as the constructor is not a part of the implicit conversion, just the recipient.
There's no way to control the preferred order of conversions, but you could add a second constructor that took a c... | [
0.09605086594820023,
-0.1596447229385376,
0.2591222822666168,
-0.16684791445732117,
-0.27315273880958557,
0.24257029592990875,
0.6203690767288208,
-0.07763095200061798,
-0.022397823631763458,
-0.3470102846622467,
-0.10257627815008163,
0.6056886911392212,
-0.653026282787323,
0.0848198905587... | |
m_bLocation;
};
``` | [
-0.21168896555900574,
0.15811239182949066,
0.1773572713136673,
-0.33481332659721375,
0.45584550499916077,
0.04549736529588699,
0.0014638735447078943,
0.10287405550479889,
-0.18893201649188995,
-0.4220964014530182,
-0.5240804553031921,
0.30239471793174744,
-0.6701989769935608,
0.25720655918... | |
I've seen the question asked "can you run Monit on Windows?", and unless you want to use a VM, the answer appears to be no.
So...are there any small footprint monit-like applications actually for Windows OS's? What I'm looking for is not only monitoring (of which there are hundreds of apps), but also the ability to ex... | [
0.5261606574058533,
-0.15747706592082977,
0.07687972486019135,
0.1884736865758896,
0.28399235010147095,
-0.11546827107667923,
0.193124920129776,
0.336785227060318,
-0.6638535261154175,
-0.4512346684932709,
0.11503244191408157,
0.9064652919769287,
-0.2611444294452667,
-0.24292173981666565,
... | |
so the heavyweight/expensive solutions aren't desired.
I didn't find anything out there that fit my needs, so I learned a little Powershell scripting and rolled a solution that should be useful to others as well. Assuming a Windows platform (otherwise use monit!), Powershell is really powerful and easy.
**sample-moni... | [
0.21507427096366882,
0.03770800679922104,
0.6227744817733765,
0.19354483485221863,
0.46901658177375793,
-0.4282529056072235,
0.47935566306114197,
0.07230215519666672,
-0.5059886574745178,
-0.5668381452560425,
-0.4782668352127075,
0.8106911182403564,
-0.11929208040237427,
-0.160578101873397... | |
= "c:\temp\heartbeat.log"
# used to indicate that the service has failed since the last time we checked.
$FailureLogFile = "c:\temp\failure.log"
# END USER-EDITABLE VARIABLES
###################################################
# create the log file if it doesn't already exist.
if (!(Test-Path $LogFile)) {
New-It... | [
0.2899259328842163,
0.2553301453590393,
0.6050017476081848,
-0.2342728078365326,
0.537388026714325,
-0.13005056977272034,
0.9548956751823425,
0.05683082342147827,
-0.12776198983192444,
-0.42495885491371155,
-0.40534624457359314,
0.5498476028442383,
0.0131957633420825,
0.11999350786209106,
... | |
if (Test-Path $FailureLogFile) {
Remove-Item $FailureLogFile
}
}
else {
"Fail`t`t" + $startTime.DateTime + "`t`t" + ($endTime - $startTime).TotalSeconds + " seconds" >> $LogFile
# restart the service if this is the first time it's failed since the last successful check.
if (!(Test-Path $Failu... | [
0.03592761233448982,
-0.18531259894371033,
0.3649771511554718,
-0.22259166836738586,
0.40547335147857666,
-0.09428490698337555,
0.8703678846359253,
-0.07671148329973221,
-0.1841951310634613,
-0.5284597873687744,
-0.5968536734580994,
0.6854570508003235,
-0.09547296911478043,
0.3159561753273... | |
}
}
```
The only logic in this script is that it will only try to restart the service once after an initial failure. This is to prevent a situation where a service takes a while to restart, and while it's restarting, the monitor keeps seeing the failure and restarts again (bad infinite loop). Otherwise you can do jus... | [
0.21346458792686462,
-0.06389125436544418,
0.20593522489070892,
-0.05049552395939827,
0.21724334359169006,
-0.21462494134902954,
0.6761286854743958,
0.39902234077453613,
-0.39954423904418945,
-0.5567871928215027,
-0.04173596203327179,
0.7250111103057861,
-0.3655537962913513,
0.230572938919... | |
a little flaky. I used windows Task Scheduler, executing it like so:
Program: Powershell.exe
arguments: -command "C:\projects\foo\scripts\monitor.ps1" -noprofile
Start In: C:\projects\foo\scripts
You could also use a more robust scheduler like VisualCron, plug it into a windows service, or via an application server s... | [
0.38172993063926697,
-0.03917243704199791,
0.17914140224456787,
0.036701545119285583,
0.11024453490972519,
-0.09903378784656525,
0.017718829214572906,
0.28347140550613403,
-0.25677016377449036,
-0.508111298084259,
0.017711216583848,
0.6343558430671692,
-0.12602736055850983,
0.0596023239195... | |
I'm trying to use jQuery and JSON with a C# Web Service that I wrote. No matter what, the following code will only output in XML.
**Webservice Code**
```
[WebMethod]
[ScriptMethod(ResponseFormat = ResponseFormat.Json)]
public string HelloWorld() {
return "Hello World!";
}
```
I also have these attributes assign... | [
0.08125346153974533,
-0.02084239199757576,
0.5788953304290771,
-0.07154098153114319,
-0.05047711730003357,
-0.19099855422973633,
0.4372134208679199,
0.20510004460811615,
-0.20802445709705353,
-0.45953038334846497,
-0.19572769105434418,
0.6876900792121887,
-0.36717838048934937,
0.0037050801... | |
"text/xml". Anything I'm missing?
**EDITS:** In response to a couple answers:
If I have the datatype as just "json" the content is still XML and jQuery also will not call my callback function. If I add the "&callback=?" to the url, IIS throws a HTTP 500 error.
My class does inherit from "System.Web.Services.WebServi... | [
0.07269638031721115,
0.11579257994890213,
0.2493327558040619,
0.22739407420158386,
-0.3599061369895935,
-0.4206446707248688,
0.5369330644607544,
0.21834105253219604,
-0.17091408371925354,
-0.5463159084320068,
-0.2802302837371826,
0.5036231875419617,
-0.08195465803146362,
0.2128298133611679... | |
or something similar.
Thanks for all your help!
As far as I know, the ScriptService attribute just allows the service to automatically create a JavaScript proxy (by appending /js to the endpoint address - ScheduleComputerDS.asmx/js in your case). It does not allow you to call the operations on the service the way you'... | [
0.40555325150489807,
-0.16859139502048492,
0.09398655593395233,
0.17428167164325714,
-0.09813977777957916,
-0.2554393708705902,
0.37611907720565796,
0.45688652992248535,
-0.27304816246032715,
-0.9954712390899658,
-0.049226850271224976,
0.2632136940956116,
-0.16526097059249878,
0.1660317480... | |
I have C# code to populate a dropdown list in Silverlight which works fine except when there are duplicates. I think because `IEnumerable<Insurance.Claims>` is a collection, it filters out duplicates. How would I code my LINQ query to accept duplicates?
My Sample Data looks like:
Code => CodeName
FGI Field Ge... | [
0.47488248348236084,
0.35908299684524536,
0.36585015058517456,
-0.02494896575808525,
0.08098964393138885,
-0.0974852591753006,
-0.07784662395715714,
-0.37666749954223633,
-0.25514936447143555,
-0.49060818552970886,
0.15155558288097382,
0.6451680660247803,
-0.1866113245487213,
0.21409215033... | |
select c);
DataServiceQuery<Insurance.Claims> dataServiceQuery =
claim as DataServiceQuery<Insurance.Claims>;
dataServiceQuery.BeginExecute((asyncResult) =>
{
results = dataServiceQuery.EndExecute(asyncResult);
if (results == null)
{
// Error
}
else
{
// Code to populate S... | [
0.381888747215271,
-0.20623067021369934,
0.5589187741279602,
-0.0613543763756752,
-0.01905253529548645,
-0.004918702412396669,
0.04514336958527565,
-0.37913212180137634,
-0.13208439946174622,
-0.29257720708847046,
-0.25083670020103455,
0.9991167783737183,
-0.33020925521850586,
-0.135481551... | |
appears when your reference a library path that doesn't exist - which is weird! | [
0.48494479060173035,
-0.10259256511926651,
0.34856948256492615,
0.24830442667007446,
-0.028369532898068428,
-0.35202556848526,
0.3319331407546997,
0.7686501741409302,
-0.3185057044029236,
-0.5347559452056885,
0.0075616068206727505,
-0.12993408739566803,
-0.03095068968832493,
0.236903965473... | |
I'm in a world of pain with this one, and I'd very much appreciate it if someone could help out.
I have a DataContext attached to a single test table on a database. The test table is as follows:
```
CREATE TABLE [dbo].[LinqTests](
[ID] [bigint] IDENTITY(1,1) NOT NULL,
[StringValue] [varchar](255) NOT NULL,
... | [
0.024974623695015907,
0.11371270567178726,
0.510657012462616,
-0.08088933676481247,
0.004411119502037764,
0.11342839151620865,
0.06805063039064407,
-0.5171395540237427,
-0.06572720408439636,
-0.576381266117096,
-0.11331696808338165,
0.36300599575042725,
-0.2899048328399658,
0.1576595157384... | |
an UPDATE, I always get a ChangeConflictException with an empty ObjectChangeConflict.MemberConflicts collection. Here is the code used:
```
var dataContext = new UniversityDataContext();
dataContext.Log = Console.Out;
for (int i = 1; i <= 1; i++) {
var linqTest = dataContext.LinqTests.Where(l => (l.ID == i)).Firs... | [
-0.2786625921726227,
-0.16306601464748383,
0.9766826033592224,
-0.12328895926475525,
0.2820073068141937,
0.06761189550161362,
0.14323987066745758,
-0.1938270777463913,
-0.06506528705358505,
-0.732406735420227,
-0.37855517864227295,
0.6332509517669678,
-0.1012134924530983,
0.273281484842300... | |
DateTimeValue = DateTime.UtcNow,
StringValue = "I am in loop " + i + "."
};
dataContext.LinqTests.InsertOnSubmit(linqTest);
}
}
try {
dataContext.SubmitChanges(ConflictMode.ContinueOnConflict);
}
catch (ChangeConflictException exception) {
Console.WriteLine("Optimistic concurren... | [
-0.1731533259153366,
-0.4618392288684845,
0.6296406984329224,
-0.14706093072891235,
0.42475977540016174,
0.1370784491300583,
0.4909907877445221,
-0.37747207283973694,
-0.08260691910982132,
-0.44653603434562683,
-0.2563243806362152,
0.42300429940223694,
-0.4407152533531189,
0.18206685781478... | |
([DateTimeValue] = @p2) AND (NOT ([BooleanValue] = 1))
-- @p0: Input BigInt (Size = 0; Prec = 0; Scale = 0) [1]
-- @p1: Input VarChar (Size = 15; Prec = 0; Scale = 0) [I am in loop 1.]
-- @p2: Input DateTime (Size = 0; Prec = 0; Scale = 0) [3/19/2009 7:54:26 PM]
-- @p3: Input VarChar (Size = 34; Prec = 0; Scale = 0) [I... | [
-0.2179095298051834,
-0.07701177150011063,
0.9371452331542969,
-0.0697939544916153,
0.05096292123198509,
-0.16534346342086792,
0.5860544443130493,
-0.17304885387420654,
-0.549812376499176,
-0.378343403339386,
0.026362279430031776,
0.3412806987762451,
-0.16310326755046844,
0.216003105044364... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.