text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
result = func(*args, **kwargs)
# Some str functions return lists, ints, etc
if isinstance(result, basestring:
return DerivedClass(result)
return result
return partial(call_me_later)
``` | [
-0.13439644873142242,
-0.3846617639064789,
0.5242393016815186,
-0.24501796066761017,
-0.2392520159482956,
-0.04316074028611183,
0.2676744759082794,
-0.38371822237968445,
-0.05226695165038109,
-0.45455312728881836,
-0.24526849389076233,
0.5007871985435486,
0.058992255479097366,
0.3798842728... | |
I'm sure it's something really stupid, but I just don't see it..
`pData.LocationHours` is of type `BaseLocationHoursDataSet.LocationHoursDataTable`. Yet when I hover the cursor over `l`, all I see is "`(range variable) TSource l`" - why is that?? Why doesn't linq know what it's dealing with? I try the same thing with... | [
0.16829757392406464,
0.06618667393922806,
0.6237562298774719,
-0.23192520439624786,
0.17270170152187347,
-0.25395074486732483,
0.13884353637695312,
-0.0725531056523323,
-0.2838819622993469,
-0.40512993931770325,
-0.10100466758012772,
0.1604187786579132,
-0.5240864157676697,
0.2181378602981... | |
TSource l
select new ListItem
{
Value = l, //ignore the fact that I didn't specify a property - that's the problem, that none of the properties of the object show up.
Text = l
} | [
0.15692304074764252,
-0.21360036730766296,
0.5415608286857605,
-0.23210066556930542,
-0.18443097174167633,
0.08275479823350906,
-0.020486725494265556,
0.1325433999300003,
-0.17489074170589447,
-0.6320406794548035,
0.01341251377016306,
0.32069864869117737,
-0.610326886177063,
0.089017957448... | |
).ToArray<ListItem>();
}
```
.
**UPDATE:**
The problem is that it doesn't know what l is. Instead of showing me the correct type (I expect to see LocationHoursRow), I see "TSource l".. What is that? Why doesn't it knwo what l is in the "`from l in pData.LocationHours`" line?
I think maybe you would need l.Field:
`... | [
0.05412862449884415,
-0.20033030211925507,
0.6450156569480896,
-0.2995394468307495,
0.07168084383010864,
-0.08978154510259628,
0.009703663177788258,
-0.10135523974895477,
-0.10063271969556808,
-0.6187461614608765,
-0.10640455037355423,
0.5691224932670593,
-0.35918673872947693,
0.0390076898... | |
code snippet that might help. It is using generic dataset for reference.
```
DataSet ds = new DataSet();
FillOrders(ds);
DataTable orders = ds.Tables["SalesOrderHeader"];
var ordersQuery = orders.ToQueryable();
var query = from o in ordersQuery
where o.Field<bool>("OnlineOrderFlag") == true
select new { SalesOrderI... | [
0.03362550213932991,
-0.1868191361427307,
0.5406560897827148,
-0.10782140493392944,
0.1241321712732315,
0.25603654980659485,
0.31000036001205444,
-0.2016514390707016,
-0.3333362936973572,
-0.5241900682449341,
-0.6131585240364075,
0.38540443778038025,
-0.26746097207069397,
0.310823649168014... | |
I have changes to a file, plus a new file, and would like to use git stash to put them away while I switch to another task. But git stash by itself stashes only the changes to the existing file; the new file remains in my working tree, cluttering up my future work. How do I stash this untracked file?
To stash your work... | [
0.42361047863960266,
0.10074509680271149,
0.37459883093833923,
-0.08761884272098541,
-0.009753399528563023,
0.17999958992004395,
0.07989048212766647,
-0.17806558310985565,
-0.4528140723705292,
-0.7540831565856934,
-0.27958405017852783,
0.39654436707496643,
0.08425185829401016,
0.1566111892... | |
all files, including **untracked** and **ignored** files. This bahaviour changed in 2018, so make sure your git is up to date.
---
**Warning: there seems to be (or have been) situations in which contents of ignored directories could be deleted permanently. [See this archived website for more information](http://web.a... | [
0.1300523579120636,
0.07184584438800812,
0.6388622522354126,
0.021381231024861336,
0.07027840614318848,
-0.370766282081604,
0.7374134063720703,
0.36073610186576843,
-0.5894082188606262,
-0.338498592376709,
-0.611530601978302,
0.12466457486152649,
-0.5951402187347412,
0.44564753770828247,
... | |
I'm having trouble establishing an "on" state for a tab of this menu. I ended up migrating from using UL and LI due to IE 6 issues with display. Am now using a table.
Table works very well in target browsers with a rollover color bug in Opera but the rest are good.
Thing is I need to have an "on" state for the loaded... | [
0.30194661021232605,
0.02298249676823616,
0.346159428358078,
-0.24114404618740082,
-0.079386405646801,
0.2822478711605072,
0.5426626205444336,
0.20813149213790894,
-0.3080211877822876,
-1.0848008394241333,
0.06300579756498337,
0.4716172218322754,
-0.2036549597978592,
0.0961674228310585,
... | |
border="0" cellspacing="0" cellpadding="0" class="tabs">
<tr>
<td class="tabs"><a href="page.php" class="tabs">First Link</a></td>
<td class="tabs"><a href="page.php" class="tabs">Another Link</a> </td>
<td class="tabOn"><a href="page.php" class="tabOn">A Third Link Which is Longer</a>
</td>
</... | [
-0.017112139612436295,
-0.3514189124107361,
0.8989065885543823,
0.09976360201835632,
-0.14758844673633575,
0.13202491402626038,
0.1476968228816986,
-0.5493117570877075,
-0.2622212767601013,
-0.5272411704063416,
-0.18347854912281036,
0.34137576818466187,
-0.20232388377189636,
0.002326450543... | |
padding-top:7px;
height:17px;
text-decoration: none;
margin-top:1px;
white-space:nowrap;
}
/* NORMAL STATE */
table.tabs {
border-collapse: collapse;
}
table.tabs td {
width:140px;
height:29px;
border: 1px solid #fff;
background:url(/images/tabOverBG.jpg) repeat-x;
background-position:... | [
-0.46545079350471497,
-0.06770915538072586,
1.0866597890853882,
0.04371297359466553,
-0.06519941240549088,
0.37339839339256287,
0.6748903393745422,
-0.3345526158809662,
-0.3589152991771698,
-0.42030641436576843,
-0.5764123797416687,
0.2247508317232132,
-0.20210228860378265,
0.1174826025962... | |
color: #000;
background-color: #fff;
background-image:none;
}
```
what you have to do is change the order of the css, first the general tag and the classes. And applying the same classes table.tabs (so the css doesn't override properties), You can save space but not writing the same properties twice in .tabOn:
... | [
-0.032935842871665955,
-0.12915314733982086,
0.5851426124572754,
-0.07360630482435226,
-0.1122715100646019,
0.2876073122024536,
0.49944114685058594,
-0.4294656813144684,
-0.36184635758399963,
-0.4377041757106781,
-0.4410160779953003,
0.337444931268692,
-0.3256645202636719,
0.09147528558969... | |
padding: 6px;
height:17px;
text-decoration: none;
margin-top:4px;
white-space:nowrap;
}
table.tabs td a:link, table.tabs td a:visited {
color: #fff;
}
table.tabs td a:hover, table.tabs td a:active, table.tabs td:hover {
color: #000;
background-color: #fff;
background-image:none;
}
table.tabs td.... | [
-0.439150869846344,
-0.13787806034088135,
0.9856647253036499,
-0.029122143983840942,
-0.2392459511756897,
0.5343852043151855,
0.21836766600608826,
-0.21012073755264282,
-0.3511752188205719,
-0.5111605525016785,
-0.5803622603416443,
0.3538700044155121,
-0.3903872072696686,
-0.09019494056701... | |
I have asked other AI folk this question, but I haven't really been given an answer that satisfied me.
For anyone else that has programmed an artificial neural network before, how do you test for its correctness?
I guess, another way to put it is, how does one debug the code behind a neural network?
Correctness is a ... | [
0.22194555401802063,
-0.041881244629621506,
-0.3247639238834381,
0.3435058891773224,
-0.005468577146530151,
0.001998231979086995,
0.45589372515678406,
-0.03792526572942734,
0.05938424542546272,
-0.23913852870464325,
0.08186311274766922,
0.8351805210113525,
0.1302807331085205,
-0.1385817527... | |
feedback loop in the middle which lets you know if the neural network is functioning appropriately.
This is of-course the case only for neural networks that are large enough where a direct proof of correctness is not possible. It is possible to *prove* that a neural network is correct through analysis if you are attem... | [
0.07663228362798691,
-0.32627299427986145,
-0.10454554855823517,
0.4929460883140564,
-0.3461918830871582,
0.11884703487157822,
0.08309482038021088,
-0.009725796058773994,
-0.24983930587768555,
-0.3735769987106323,
-0.06191176921129227,
0.4486478865146637,
-0.11368782073259354,
0.3170922398... | |
I am working on a web project as a Web Site, rather than a Web Application. How can I use a different config file depending on where it is hosted from, so the local version uses my local SQL install, but the published version uses the live database? e.g. connectionStrings.config ignored (not published), connectionStrin... | [
0.7169185280799866,
0.02947729080915451,
-0.058037567883729935,
-0.029674988240003586,
0.01515654381364584,
-0.27214452624320984,
0.11545862257480621,
-0.025464829057455063,
-0.3053071200847626,
-0.650941014289856,
0.07605459541082382,
0.4735363721847534,
-0.11118201911449432,
0.0237713549... | |
like Nant or MSBuild and CruiseControl or TeamBuild.
I also posted [something](https://stackoverflow.com/questions/428573/managing-complex-web-config-files-between-deployment-environments/435082#435082) here a while back on supporting complex config deployments | [
-0.0832337886095047,
-0.3201068043708801,
0.24768447875976562,
0.044015925377607346,
0.021629102528095245,
-0.3412598669528961,
0.05630972236394882,
0.30025753378868103,
-0.7314499616622925,
-0.6743797659873962,
-0.031154433265328407,
0.5456689596176147,
-0.1518758237361908,
-0.17817874252... | |
By default the back button uses as a text on it a title of a viewcontroller.
Can I change text on the back button without changing a title of a view controller?
I need this because I have a view controller which title is too long to display and in this case I would like to display just "Back" as a caption for back butt... | [
-0.37639889121055603,
-0.133409321308136,
0.5439630746841431,
-0.19833062589168549,
-0.0845293179154396,
0.03775870054960251,
0.385640412569046,
0.0014188406057655811,
-0.19517375528812408,
-0.6545506715774536,
-0.2995324432849884,
0.8996728658676147,
-0.0712585598230362,
0.055668096989393... | |
My application is mostly organised in *layers* so I found that something like the [APR memory pools](http://apr.apache.org/docs/apr/1.3/group__apr__pools.html) would be the best way.
While reading on SO about `C++ placement new` posts [here](https://stackoverflow.com/questions/222557/cs-placement-new) & [here](https:/... | [
0.15828844904899597,
0.11958179622888565,
0.20786604285240173,
-0.13822847604751587,
-0.04351404681801796,
0.08630978316068649,
-0.09167041629552841,
-0.2484348714351654,
-0.44574522972106934,
-0.7479290962219238,
-0.012077925726771355,
0.20114141702651978,
-0.037711016833782196,
-0.111122... | |
as suggested [Ferrucico](https://stackoverflow.com/users/4086/ferruccio) [here](https://stackoverflow.com/questions/362953/what-are-uses-of-the-c-construct-placement-new/363537#363537).
I know of another good hierarchical memory allocator, but it calls `malloc` underneath the covers.
> [talloc](http://talloc.samba.org... | [
-0.25315406918525696,
-0.2279471606016159,
0.46595948934555054,
0.13025274872779846,
-0.028578558936715126,
0.09839516878128052,
-0.2225062996149063,
-0.1428307145833969,
-0.7016656398773193,
-0.7734413146972656,
-0.07884722203016281,
0.24699245393276215,
-0.21990035474300385,
0.0856277346... | |
adjusted MMAP_THRESHOLD.
*/
#ifndef DEFAULT_MMAP_THRESHOLD_MIN
#define DEFAULT_MMAP_THRESHOLD_MIN (128 * 1024)
#endif
#ifndef DEFAULT_MMAP_THRESHOLD_MAX
/* For 32-bit platforms we cannot increase the maximum mmap
threshold much because it is also the minimum value for the
maximum heap size and its alignme... | [
-0.10962726175785065,
-0.20076780021190643,
0.4746497869491577,
-0.16436520218849182,
0.020332669839262962,
0.0231130700558424,
0.2916746437549591,
-0.39694151282310486,
-0.3509503901004791,
-0.8660514950752258,
-0.22798919677734375,
0.6435263752937317,
-0.26202890276908875,
-0.19772079586... | |
pieces will be allocated using `mmap`. This can be changed with `mallopt(M_MMAP_MAX, count)`, but using many `mmap`s has an overhead.
The environment variables `MALLOC_MMAP_THRESHOLD_` etc. will also set these options.
Obviously, memory that `malloc` allocates with `mmap` is freed with `munmap`. I'm not sure if any o... | [
0.04077870771288872,
-0.04586577042937279,
0.11831716448068619,
0.01810278743505478,
0.1114702895283699,
0.01525148469954729,
-0.07467620819807053,
-0.1907694786787033,
-0.18220467865467072,
-0.7877275347709656,
-0.24891254305839539,
0.4621577262878418,
-0.2566176950931549,
0.0929965153336... | |
How can I convert a grayscale value (0-255) to an RGB value/representation?
It is for using in an SVG image, which doesn't seem to come with a grayscale support, only RGB...
Note: this is not RGB -> grayscale, which is already answered in another question, e.g. [Converting RGB to grayscale/intensity](https://stackover... | [
0.22063584625720978,
-0.08704303950071335,
0.544942319393158,
0.14803823828697205,
-0.22155311703681946,
0.10381313413381577,
0.001953520579263568,
-0.5255712866783142,
-0.19321425259113312,
-0.784498393535614,
0.06047656759619713,
0.6927834749221802,
-0.008830727078020573,
0.0601225569844... | |
device that you're using. | [
0.47138357162475586,
0.362525075674057,
0.13516557216644287,
0.3789812922477722,
0.6831397414207458,
-0.3471652865409851,
-0.23924225568771362,
-0.20737996697425842,
-0.32561951875686646,
-0.34300497174263,
-0.00945171620696783,
0.5590053200721741,
-0.2864387333393097,
0.018147757276892662... | |
When looking at Ext JS, I don't get the feeling that it's meant for the same things as jQuery and Mootools.
Whilst jQuery and Mootools help with the general workings of a site, Ext JS seems to be focussed on tables and storing data, plus manipulating it.
So, is this observation correct, or is Ext Js fit for the same ... | [
0.04638068377971649,
-0.20099565386772156,
0.2492469996213913,
0.022461548447608948,
-0.2967030107975006,
-0.03430803120136261,
0.10647116601467133,
0.2827431857585907,
0.023866545408964157,
-0.7945964336395264,
-0.20078910887241364,
0.629949688911438,
-0.3625057339668274,
-0.1680932790040... | |
under the GPL 3. Both are ultimately managed by Ext, LLC, including all changes to the libraries. Ext has a dedicated development team and support staff, and those utilizing the commercial license with a support contract have full support for help and issue resolution. Aside from that, the Ext control classes (and all ... | [
0.09952312707901001,
0.0194933470338583,
0.7228137850761414,
-0.1502632349729538,
-0.0013317220145836473,
-0.48430147767066956,
0.21253639459609985,
-0.10781651735305786,
0.04878726974129677,
-0.6925426125526428,
-0.4746096730232239,
0.7882832884788513,
-0.6145308613777161,
-0.152976334095... | |
I remember reading somewhere about multiproc builds in VS2008, only I can't find the article now. Does anyone know how to turn this on, or even if it is possible?
There are two ways to parallelize a build in VS2008.
The first is to run several project builds in parallel. The setting is in Tools->Options->Projects and ... | [
0.3384668231010437,
-0.14692357182502747,
0.5003585815429688,
0.10504072904586792,
-0.09624806046485901,
0.14000160992145538,
0.2440660297870636,
-0.30378246307373047,
-0.4808715283870697,
-0.5994494557380676,
0.2050412893295288,
0.4838162362575531,
-0.3707747459411621,
0.20833542943000793... | |
Note that this feature interacts rather oddly with precompiled headers, and you'll have to jump through some hoops to combine the two. | [
0.4729272127151489,
-0.21575121581554413,
-0.4832819104194641,
0.2362685203552246,
0.026551401242613792,
-0.4701734185218811,
0.3520280122756958,
0.11583984643220901,
-0.21855807304382324,
-0.3679794669151306,
0.04621455445885658,
0.2222372442483902,
-0.09796113520860672,
-0.01109959837049... | |
I have what I'm pretty sure is a bug in the optimizer in Visual studio 2005. The problem is with an STL map.
Here's the relevant code:
```
MyMapIterator myIt = m_myMap.find(otherID);
if (myIt != m_myMap.end() && myIt->second.userStatus == STATUS_A)
{
//Prints stuff. No side-effects whatsoever.
}
else if (myIt !... | [
-0.02954050339758396,
-0.055363353341817856,
0.45039719343185425,
-0.16329051554203033,
0.068425752222538,
-0.024844525381922722,
0.3618796467781067,
-0.15294264256954193,
-0.06203574687242508,
-0.7247162461280823,
0.01867845095694065,
0.6670159101486206,
-0.4878745973110199,
-0.1432821005... | |
and disabling global optimizations "fixed it" Now, nothing works. I get a:
```
Microsoft Visual Studio C Runtime Library has detected a fatal error in [...]
Press Break to debug the program or Continue to terminate the program.
```
This happens on the **first MyMapIterator::operator-> of the last else if**
The ma... | [
-0.10094081610441208,
0.3003821074962616,
0.4846979081630707,
-0.18697474896907806,
0.23243464529514313,
0.14821799099445343,
0.5856301188468933,
0.12287873774766922,
-0.1290210336446762,
-0.38872507214546204,
-0.468100368976593,
0.858913004398346,
-0.3694353401660919,
0.07412903010845184,... | |
same file, but this is, to me, the one that rules out most other possibilities. I used to think it was a buffer overflow that was stomping on my map, but take a look back at the code. I am positive that no other thread is stomping on it, and this is 100% reproductible.
So, what do I do from here. This is not performa... | [
0.3245813548564911,
0.011967462487518787,
0.365143358707428,
0.08880321681499481,
0.4429357051849365,
-0.06766027212142944,
0.14754720032215118,
-0.057172760367393494,
-0.4030398726463318,
-0.5176761746406555,
0.14311403036117554,
0.7415761947631836,
-0.1882515549659729,
-0.049611054360866... | |
nicest code. The point is, it should still work, and if that fails, anything else can.
**EDIT**
The last else-if doesn't generate any jump !
```
if (myIt != m_myMap.end() && myIt->second.userStatus == STATUS_A)
009270BE mov ecx,dword ptr [this]
009270C4 add ecx,0Ch
009270C7 lea eax,[... | [
-0.4328683912754059,
-0.14657895267009735,
0.7083319425582886,
0.08721987903118134,
0.29197949171066284,
0.05407536029815674,
0.7110011577606201,
-0.09293472766876221,
0.029905743896961212,
-0.8490247130393982,
-0.1778847724199295,
0.6213845014572144,
-0.46022310853004456,
-0.2439693361520... | |
esi,eax
009270D4 lea edi,[myIt]
009270D7 call std::_Tree<std::_Tmap_traits<unsigned __int64,lux::Foo,std::less<unsigned __int64>,std::allocator<std::pair<unsigned __int64 const ,lux::Foo> >,0> >::const_iterator::operator!= (8A2220h)
009270DC movzx ecx,al
009270DF test ecx,ecx
009270... | [
-0.4009293019771576,
0.15699979662895203,
0.4498530626296997,
-0.05218266323208809,
0.0474386103451252,
0.46426922082901,
0.33014121651649475,
-0.6979792714118958,
0.06227516010403633,
-0.8413081169128418,
-0.2049727588891983,
0.6169427037239075,
-0.4313829243183136,
-0.27096089720726013,
... | |
cmp dword ptr [eax+8],1
009270EF jne lux::Bar::DoStuff+0E4h (927154h)
{
Stuff
}
else if (myIt != m_myMap.end() && myIt->second.userStatus == STATUS_B)
00927154 mov ecx,dword ptr [this]
0092715A add ecx,0Ch
0092715D lea eax,[ebp-98h]
00927163 call | [
-0.10718897730112076,
0.12301930040121078,
0.8551209568977356,
-0.010780921205878258,
0.3155372142791748,
0.22290228307247162,
0.2719479203224182,
-0.34706467390060425,
-0.26873716711997986,
-0.5773287415504456,
-0.5041894912719727,
0.48138076066970825,
-0.21199223399162292,
-0.02059999294... | |
std::_Tree<std::_Tmap_traits<unsigned __int64,lux::Foo,std::less<unsigned __int64>,std::allocator<std::pair<unsigned __int64 const ,lux::Foo> >,0> >::end (8A21E0h)
00927168 mov esi,eax
0092716A lea edi,[myIt]
0092716D call std::_Tree<std::_Tmap_traits<unsigned __int64,lux::Foo,std::less<uns... | [
-0.4411580562591553,
0.2812100946903229,
0.23929177224636078,
-0.11517491191625595,
0.0358789786696434,
0.467806339263916,
0.3787861466407776,
-0.6864786744117737,
0.035113461315631866,
-0.6489011645317078,
-0.30710574984550476,
0.5219613909721375,
-0.292337030172348,
-0.10805901139974594,... | |
esi,[myIt]
0092717C call std::_Tree<std::_Tmap_traits<unsigned __int64,lux::Foo,std::less<unsigned __int64>,std::allocator<std::pair<unsigned __int64 const ,lux::Foo> >,0> >::iterator::operator-> (8A21F0h)
00927181 cmp dword ptr [eax+8],2
00927185 jne lux::Bar::DoStuff+17Ah (9271EAh)
{... | [
-0.07165105640888214,
-0.11110816895961761,
0.6807752847671509,
-0.10621059685945511,
0.15261027216911316,
0.3751000463962555,
0.24285537004470825,
-0.5384352207183838,
0.008757580071687698,
-0.7749119997024536,
-0.27451178431510925,
0.5430340766906738,
-0.3152274489402771,
0.0237096473574... | |
ecx,0Ch
009271F3 lea eax,[ebp-0A0h]
009271F9 call std::_Tree<std::_Tmap_traits<unsigned __int64,lux::Foo,std::less<unsigned __int64>,std::allocator<std::pair<unsigned __int64 const ,lux::Foo> >,0> >::end (8A21E0h)
009271FE mov esi,eax
00927200 lea edi,[myIt]
00927203 call ... | [
-0.3657851815223694,
0.013614289462566376,
0.5639370679855347,
0.0029151972848922014,
0.08266042917966843,
0.41011425852775574,
0.13427720963954926,
-0.794098436832428,
-0.02367272786796093,
-0.5378808379173279,
-0.15960048139095306,
0.601574182510376,
-0.5133945941925049,
-0.1726521998643... | |
std::_Tree<std::_Tmap_traits<unsigned __int64,lux::Foo,std::less<unsigned __int64>,std::allocator<std::pair<unsigned __int64 const ,lux::Foo> >,0> >::iterator::operator-> (8A21F0h)
{
//Stuff in the condition and after
```
Well guys. After much pain and tears. To fix it at least temporarily I had to re... | [
0.15212327241897583,
0.05601795017719269,
0.3744069039821625,
-0.05307634919881821,
0.16307333111763,
0.23098212480545044,
0.3883901834487915,
-0.3989149332046509,
-0.14891000092029572,
-0.6704503893852234,
-0.2456922084093094,
0.3815634548664093,
-0.2545827329158783,
0.013050563633441925,... | |
}
else if (myIt->second.userStatus == STATUS_B && myIt->second->foo == FOO_A)
{
//Prints stuff. No side-effects whatsoever.
}
else if (myIt->second.userStatus == STATUS_B && myIt->second->foo == FOO_B && /*other meaningless conditions */)
{
//Prints stuff. No side-effects w... | [
0.31328144669532776,
0.23531216382980347,
0.11032185703516006,
-0.19226732850074768,
0.2726491093635559,
-0.11845836043357849,
0.39396610856056213,
-0.2988049387931824,
-0.28689131140708923,
-0.47328242659568787,
-0.17862993478775024,
0.7079452276229858,
-0.5261594653129578,
0.107405357062... | |
if (myIt->second.userStatus == STATUS_A)
{
//Prints stuff. No side-effects whatsoever.
}
else if (myIt->second.userStatus == STATUS_B && myIt->second->foo == FOO_A)
{
//Prints stuff. No side-effects whatsoever.
}
else if (myIt->second.userStatus == STATUS_B && myIt->se... | [
0.3517295718193054,
0.1195894330739975,
0.1859222799539566,
-0.027546873316168785,
0.550774335861206,
-0.14625844359397888,
0.1058029979467392,
-0.19671888649463654,
-0.3333474397659302,
-0.5941754579544067,
-0.28988781571388245,
0.4275425374507904,
-0.48388341069221497,
-0.088749051094055... | |
side-effects whatsoever.
}
}
```
Yes. Doubling the if resulted in a jump instruction being emitted after the test. | [
0.3262563645839691,
0.004150045104324818,
0.08011352270841599,
0.15907946228981018,
-0.05700850114226341,
-0.36171039938926697,
0.0020860095974057913,
-0.07378898561000824,
0.17457014322280884,
-0.12766864895820618,
0.059225816279649734,
0.520540177822113,
-0.36584174633026123,
-0.00810223... | |
I have an internal WPF client application that accesses a database.
The application is a central resource for a Support team and as such includes Remote Access/Login information for clients. At the moment this database is not available via a web interface etc, but one day is likely to.
The remote access information i... | [
0.3145909905433655,
0.225438192486763,
0.5313565135002136,
-0.12367469072341919,
0.24280232191085815,
-0.09773751348257065,
0.09054020047187805,
-0.2611621618270874,
-0.28738516569137573,
-0.46930575370788574,
0.010944325476884842,
0.452474981546402,
0.14406746625900269,
0.1373445689678192... | |
and then provide support. Hope this is making sense.
So the dilemma is that I don't want to store the usernames and passwords in cleartext on the database to ensure that if the DB was ever compromised, I am not then providing access to our client's networks to whomever gets the database.
I have looked at two-way encr... | [
0.26331907510757446,
0.3605082631111145,
0.21129564940929413,
0.04634765535593033,
0.05213918536901474,
0.018951665610074997,
0.5199031829833984,
-0.14418929815292358,
0.0663793683052063,
-0.47656941413879395,
-0.1301683485507965,
0.5273949503898621,
-0.020287418738007545,
0.16972522437572... | |
stored in the application, I have used a salt that is stored in the db, but all have their weaknesses, ie if the app was reflected it exposes the salts etc.
How can I secure the usernames and passwords in my database, and yet still provide the ability for my support consultants to view the information in the applicati... | [
0.29339736700057983,
0.3670206069946289,
0.39362579584121704,
0.15960319340229034,
0.022550547495484352,
0.024876581504940987,
0.44632259011268616,
-0.23715564608573914,
-0.07723589986562729,
-0.6502496004104614,
0.019545862451195717,
0.5826272368431091,
0.01808154210448265,
0.102075852453... | |
we need to enter them in at the time of remoting to them.
Anybody have some theories on what would be the best approach here?
**update**
The function I am trying to build is for our CRM application that will store the remote access details for the client. The CRM system provides call/issue tracking functionality and ... | [
0.2718479335308075,
0.20544540882110596,
0.49591562151908875,
0.28257492184638977,
0.3402492105960846,
-0.23410668969154358,
0.0504775196313858,
-0.06581506133079529,
-0.1921919286251068,
-0.5106061697006226,
0.15279436111450195,
0.6897953152656555,
0.014986093156039715,
0.0438667871057987... | |
was originally going to post this idea, but [erickson beat me to it](https://stackoverflow.com/questions/835826/a-security-encryption-dilemma/836442#836442). However, it may be worth while to post some pseudo code to elaborate, so I suppose my time answering the question isn't completely wasted...
Things you will need... | [
-0.0021141045726835728,
0.33632132411003113,
0.5346729159355164,
0.22908852994441986,
-0.13630232214927673,
-0.36191117763519287,
0.17879727482795715,
-0.4105319380760193,
-0.28756287693977356,
-0.4048558175563812,
-0.10081256926059723,
0.29334011673927307,
-0.010893452912569046,
-0.125637... | |
INTEGER,
authentication_hash BINARY,
authentication_salt BINARY,
public_key BINARY,
encrypted_private_key BINARY,
decryption_key_salt BINARY,
PRIMARY KEY(user_id)
)
CREATE TABLE secrets (
secret_id INTEGER,
-- WHATEVER COLUMNS YOU REQUIRE TO ACCURATELY MODEL YOUR PASSWORDS (CLIENT ... | [
-0.07102915644645691,
0.3028757870197296,
0.5663166642189026,
0.394225150346756,
0.217765673995018,
-0.025150705128908157,
-0.17580339312553406,
-0.11364409327507019,
-0.3063125014305115,
-0.4827941954135895,
-0.1563110202550888,
0.5105289220809937,
-0.027920939028263092,
0.459921956062316... | |
a user can begin using this system, they must be registered.
```
function register_user(user_id, user_password) {
authentication_salt = generate_random_salt()
authentication_hash = hash(authentication_salt, user_password);
(public_key, private_key) = asymmetric_cipher_generate_random_key_pair();
decr... | [
-0.20182494819164276,
0.49510619044303894,
0.37508919835090637,
-0.19846782088279724,
0.22791998088359833,
-0.22287356853485107,
0.34385916590690613,
-0.20547693967819214,
-0.05036104843020439,
-0.6345304250717163,
-0.17855767905712128,
0.27827492356300354,
-0.26503199338912964,
0.50564920... | |
decryption_key_salt) VALUES (:user_id, :authentication_hash, :authentication_salt, :public_key, :encrypted_private_key, :decryption_key_salt)")
}
```
The user can sign in to the system.
```
function authenticate_user(user_id, user_password)
correct_authentication_hash = query("SELECT authentication_hash FROM use... | [
-0.260660320520401,
0.296743780374527,
0.4657278060913086,
0.1418561041355133,
0.20382969081401825,
-0.21671096980571747,
0.2530848979949951,
-0.3173341155052185,
0.29056450724601746,
-0.31937670707702637,
-0.36299169063568115,
0.21895137429237366,
-0.04257164150476456,
0.3351265788078308,... | |
=> secret_data,
public_key => recipient_public_key
)
execute("INSERT INTO granted_secrets (secret_id, recipient_id, encrypted_data) VALUES (:secret_id, :recipient_id, :encrypted_secret_data)")
}
```
Finally, a user that have been granted access to a secret (the recipient) can retrieve it.
```
void r... | [
-0.47673460841178894,
0.2802053689956665,
0.24746879935264587,
0.11346302926540375,
0.17012999951839447,
0.004649942275136709,
0.2832775115966797,
-0.2740771174430847,
-0.013669918291270733,
-0.39995214343070984,
-0.5202417969703674,
0.32082125544548035,
-0.049187611788511276,
0.4525346755... | |
key => recipient_decryption_key
)
encrypted_secret_data = query("SELECT encrypted_data FROM granted_secrets WHERE secret_id = :secret_id AND recipient_id = :recipient_id")
secret_data = asymmetric_cipher_decrypt(
input => encrypted_secret_data,
private_key => recipient_private_key
... | [
-0.003949157427996397,
0.14148831367492676,
0.3340037167072296,
0.25426095724105835,
-0.005573210772126913,
-0.20406070351600647,
0.29216110706329346,
-0.15267673134803772,
-0.03207498788833618,
-0.41759103536605835,
-0.20292137563228607,
0.6048758029937744,
0.0903564915060997,
0.393830418... | |
I am creating a app from a tutorial in a book, but I noticed a problem, when the preference window i created is opened and then closed it won't open again, how can i fix this?
Thanks.
EDIT: I saw another post about this but was still un-answered, so i was wondering if you could answer this for me.
EDIT: I am talking... | [
0.4832192659378052,
0.12028089910745621,
0.14438705146312714,
0.06510639935731888,
-0.21179594099521637,
0.3956949710845947,
0.06374462693929672,
0.2880670726299286,
-0.27582085132598877,
-0.7501444220542908,
0.24092456698417664,
0.08856657892465591,
-0.29062315821647644,
-0.10365347564220... | |
For Mac OS X, the Panel which is being used as a preference pane is in a separate nib file.
EDIT: Here's the code, it's complicated as the tutorial made you create 4 files.
**1) Preferences\_Delegate.h**
```
#import <Cocoa/Cocoa.h>
@class PreferenceController;
@interface Prefernces_Delegate : NSObject {
Prefere... | [
-0.41448166966438293,
0.02878221496939659,
0.44505774974823,
-0.10205669701099396,
-0.07091864198446274,
0.27320924401283264,
-0.1913844496011734,
-0.19060982763767242,
-0.11727270483970642,
-0.8338935375213623,
-0.34273621439933777,
0.35634419322013855,
-0.4030848741531372,
-0.05590463429... | |
IBOutlet NSButton *checkbox;
}
- (IBAction)changeNewEmptyDoc:(id)sender;
@end
```
**4) PreferencesController.m**
```
#import "PreferenceController.h"
@implementation PreferenceController
- (id)init
{
if (![super initWithWindowNibName:@"Preferences"])
return nil;
return self;
}
- (void)windowDidLoad... | [
-0.2623104453086853,
-0.3687371611595154,
0.5143299698829651,
-0.17540670931339264,
0.11578038334846497,
0.11516351997852325,
0.21879145503044128,
-0.27192580699920654,
-0.040930066257715225,
-1.1105778217315674,
-0.08425118029117584,
0.5027806758880615,
-0.3012810945510864,
0.205514639616... | |
I have spent the afternoon trying to wrap my mind around how to translate the following query into LINQ, but I can't quite get there.
```
declare @productId int; set @productId = 3212;
select * from InformationData data where productId = @productId and orgId = 1
and exists(
select id from (
select coalesc... | [
-0.03414761647582054,
-0.1412351429462433,
0.5999717712402344,
-0.19987010955810547,
0.13611045479774475,
-0.011166784912347794,
-0.07016733288764954,
-0.4218194782733917,
0.16087090969085693,
-0.76383376121521,
-0.08383476734161377,
0.17585690319538116,
-0.3628755807876587,
-0.04890544712... | |
left outer join InformationData id1 on id1.productId = id.productId and id1.attributeId = id.attributeId and id1.language = 1
left outer join InformationData id2 on id2.productId = id.productId and id2.attributeId = id.attributeId and id2.language = 2
left outer join InformationData id3 on id3.productId... | [
-0.7415708899497986,
0.12558552622795105,
0.6638808250427246,
-0.0019522574730217457,
-0.04936934635043144,
0.2941012680530548,
-0.22747309505939484,
-0.4847354590892792,
0.12335766851902008,
-0.6112877130508423,
-0.19856877624988556,
0.27855634689331055,
-0.33437925577163696,
0.1005909442... | |
does not exist in language 1, it is fetched in language 2, and if 2 does not exists it is fetched for language 0 which is a global translation.
I can get the inner query mostly correct (except from id1.language = 1, I can't seem to get it to join on a member of the table I'm joining to, any ideas?)
This is my code (L... | [
-0.27873581647872925,
-0.16046658158302307,
0.7401356101036072,
-0.16440075635910034,
0.13718737661838531,
0.14532902836799622,
0.10492090880870819,
-0.30448204278945923,
0.011375884525477886,
-0.7083714008331299,
-0.0804622620344162,
0.26472365856170654,
-0.3632966876029968,
-0.1628943234... | |
ProductId = p.Key.ProductId, AttributeId = p.Key.AttributeId }
)
join x1 in InformationData on new { a = data.ProductId, b = data.AttributeId } equals new { a = x1.ProductId, b = x1.AttributeId } into f1
from r1 in f1.DefaultIfEmpty()
where r1.Language == 1
join x2 in InformationData on new ... | [
-0.4607885181903839,
-0.23342081904411316,
0.5910845398902893,
0.012841110117733479,
0.04443687945604324,
0.3974163234233856,
-0.028087567538022995,
-0.08666510879993439,
0.08401471376419067,
-0.7005064487457275,
-0.3963499069213867,
0.49458828568458557,
-0.4221652150154114,
0.039963852614... | |
in f2.DefaultIfEmpty()
where r2.Language == 2
join x3 in InformationData on new { a = data.ProductId, b = data.AttributeId } equals new { a = x3.ProductId, b = x3.AttributeId } into f3
from r3 in f3.DefaultIfEmpty()
where r3.Language == 2
select new { Id = ((int?)r1.Id) ?? ((int?)r2.Id) ... | [
-0.417709082365036,
-0.2804247736930847,
0.9672923684120178,
-0.23988701403141022,
-0.1313488632440567,
0.12221039086580276,
0.21720701456069946,
-0.5795697569847107,
-0.15079858899116516,
-0.5513439178466797,
-0.20950202643871307,
0.7038900256156921,
-0.4012632966041565,
0.098369471728801... | |
= 2
DECLARE @p3 Int SET @p3 = 1
-- EndRegion
SELECT COALESCE([t2].[id],COALESCE([t3].[id],[t4].[id])) AS [Id]
FROM (
SELECT [t0].[productId], [t0].[attributeId]
FROM [InformationData] AS [t0]
WHERE [t0].[productId] = @p0
GROUP BY [t0].[productId], [t0].[attributeId]
) AS [t1]
LEFT OUTER JOIN [Inform... | [
-0.3888762593269348,
-0.2896636426448822,
0.6440634727478027,
-0.10411877930164337,
0.06488680094480515,
0.12149202078580856,
0.11268667131662369,
-0.45867833495140076,
0.15767644345760345,
-0.5294443964958191,
-0.4095706641674042,
0.3228195011615753,
-0.3925648629665375,
-0.29556593298912... | |
together with the rest of the query, maybe I'm just tired buy I keep getting it to do a lot of CROSS APPLY's. Does anyone have any suggestions?
Well after a good nights sleep and some crunching things got a bit brighter and I found the solution :) For anyone that is curious here it is
```
(
from i in InformationD... | [
0.2453983724117279,
-0.18220862746238708,
0.5367504358291626,
-0.009894470684230328,
0.041934527456760406,
-0.1420007050037384,
0.055216774344444275,
-0.009059472940862179,
-0.057832252234220505,
-0.7877774834632874,
0.13285021483898163,
0.24198313057422638,
0.004983569495379925,
0.1622415... | |
new { d.ProductId, d.AttributeId } into p select new { ProductId = p.Key.ProductId, AttributeId = p.Key.AttributeId }
)
join x1 in InformationData on new { a = data.ProductId, b = data.AttributeId, c = 1} equals new { a = x1.ProductId, b = x1.AttributeId, c = x1.Language } into f1
from r1 in... | [
-0.2881532907485962,
-0.21231335401535034,
0.6367549896240234,
-0.11429981887340546,
0.04949072748422623,
0.39619049429893494,
0.011319601908326149,
-0.3272168040275574,
-0.0834890604019165,
-0.7158769965171814,
-0.35990893840789795,
0.6218279004096985,
-0.3454248309135437,
-0.042806990444... | |
2 } equals new { a = x2.ProductId, b = x2.AttributeId, c = x2.Language } into f2
from r2 in f2.DefaultIfEmpty()
join x3 in InformationData on new { a = data.ProductId, b = data.AttributeId, c = 0 } equals new { a = x3.ProductId, b = x3.AttributeId, c = x3.Language } into f3
from r3 in f3... | [
-0.3571586310863495,
-0.23969674110412598,
0.48973971605300903,
-0.22550268471240997,
-0.16353093087673187,
0.11857452988624573,
0.2140224128961563,
-0.5063701272010803,
-0.08625383675098419,
-0.6571100950241089,
-0.2773188650608063,
0.5562173128128052,
-0.44490525126457214,
-0.01556848920... | |
((int?)r2.Id) ?? r3.Id }
).Any(d => d.Id == i.Id)
select i
).Dump();
```
And here is the generated SQL
```
-- Region Parameters
DECLARE @p0 Int SET @p0 = 3212
DECLARE @p1 Int SET @p1 = 1
DECLARE @p2 Int SET @p2 = 2
DECLARE @p3 Int SET @p3 = 0
-- EndRegion
SELECT [t0].[id] AS [Id], [t0].[attributeId] AS [Att... | [
-0.24596121907234192,
-0.48962634801864624,
0.547294020652771,
-0.0488092340528965,
0.08450508117675781,
0.07063819468021393,
0.23477496206760406,
-0.54164057970047,
0.11457555741071701,
-0.5968832969665527,
-0.2500435709953308,
0.17739237844944,
-0.2881610095500946,
0.07454828917980194,
... | |
SELECT COALESCE([t3].[id],COALESCE([t4].[id],[t5].[id])) AS [value]
FROM (
SELECT [t1].[productId], [t1].[attributeId]
FROM [InformationData] AS [t1]
WHERE [t1].[productId] = @p0
GROUP BY [t1].[productId], [t1].[attributeId]
) AS [t2]
LEFT OUTE... | [
-0.41307541728019714,
-0.379461407661438,
0.18651437759399414,
0.1409023404121399,
0.22624938189983368,
0.3957580029964447,
-0.20944058895111084,
-0.40601682662963867,
0.3782472312450409,
-0.6709877848625183,
-0.4002509117126465,
0.2304755300283432,
-0.2732071876525879,
-0.1171721965074539... | |
[t3] ON ([t2].[productId] = [t3].[productId]) AND ([t2].[attributeId] = [t3].[attributeId]) AND (@p1 = [t3].[language])
LEFT OUTER JOIN [InformationData] AS [t4] ON ([t2].[productId] = [t4].[productId]) AND ([t2].[attributeId] = [t4].[attributeId]) AND (@p2 = [t4].[language])
LEFT OUTER JOIN [Informatio... | [
-0.280114084482193,
0.1568499505519867,
0.27314651012420654,
-0.0005799169302918017,
0.17598053812980652,
0.3074144124984741,
0.11265666782855988,
-0.20103977620601654,
0.1041923314332962,
-0.6194471120834351,
-0.6599956750869751,
0.5454211235046387,
-0.3064921200275421,
0.203970804810524,... | |
I am working on this mvc project following Rob Connery's storefront video series and applying the techniques.
On the filtering and extensions methods, i started repeating myself a lot such as:
```
public static Sponsor WithID(this IQueryable<Sponsor>qry, int ID)
{
return qry.SingleOrDefault(s => s.ID== ID);
}
pub... | [
0.4858270287513733,
-0.1301848292350769,
0.6603648066520691,
-0.07502809911966324,
-0.28220367431640625,
-0.3579438626766205,
0.07509547472000122,
-0.4864480793476105,
-0.19273234903812408,
-0.7764295935630798,
-0.008341353386640549,
0.46482348442077637,
-0.6206551790237427,
0.486415326595... | |
public int ID { get; }
}
```
Then you can write:
```
public static T WithID<T>(this IQueryable<T> source, int id)
where T : IInt32Identifiable
{
return source.SingleOrDefault(s=> s.ID == id);
}
```
Of course, you'll have to make all the appropriate classes implement the interface - but that's usually easy; ... | [
0.04587524011731148,
-0.24193252623081207,
0.19407986104488373,
0.0019748806953430176,
-0.2942681610584259,
-0.2126876413822174,
0.22209715843200684,
-0.10597545653581619,
0.09504159539937973,
-0.8222994804382324,
-0.13899430632591248,
0.7208511829376221,
-0.5342265367507935,
0.23675161600... | |
How to write queries to do the followings in SubSonic/C#?
select isNull(col, someDefaultValue) from table
select x =
case
when (condition) then col1
else col2
end
from table
Try:
```
[System.AppDomain]::CurrentDomain.SetData("APP_CONFIG_FILE", $config_path)
``` | [
-0.4396391808986664,
-0.062444236129522324,
0.7319175004959106,
-0.0527513213455677,
0.210792675614357,
0.030476458370685577,
0.2690237760543823,
-0.3398362398147583,
0.021007772535085678,
-0.5979056358337402,
-0.14836981892585754,
0.4809652864933014,
-0.35486990213394165,
-0.1333956122398... | |
This is weird. I added a brand new Web Application project to my solution in Visual Studio 2008.
Created a master page. Made zero modifications.
Created a new webform. Set its master page to the MP I just created.
Still, no modifications. No markup. No user controls. No references. Nothing. However when I try to ru... | [
0.20382165908813477,
0.14229464530944824,
0.6041256785392761,
0.3729163706302643,
-0.13179069757461548,
-0.18104900419712067,
0.2163015604019165,
-0.10594890266656876,
-0.3503154516220093,
-0.5491698384284973,
0.08823993057012558,
0.2798662781715393,
-0.46177801489830017,
0.219935193657875... | |
System.Web.UI.MasterPage.CreateMaster(TemplateControl owner, HttpContext context, VirtualPath masterPageFile, IDictionary contentTemplateCollection) +8665016
System.Web.UI.Page.get_Master() +51
System.Web.UI.Page.ApplyMasterPage() +15
System.Web.UI.Page.PerformPreInit() +45
System.Web.UI.Page.ProcessRequest... | [
0.1494942456483841,
-0.05433210730552673,
0.39498159289360046,
-0.09449481219053268,
0.012300939299166203,
0.05445349961519241,
0.22220563888549805,
-0.6767444014549255,
-0.37765032052993774,
-0.7989292740821838,
-0.33272477984428406,
0.2438988983631134,
-0.23346751928329468,
0.16383971273... | |
</div>
</form>
</body>
</html>
```
The master page:
```
<%@ Master Language="VB" AutoEventWireup="false" CodeBehind="Site1.master.vb" Inherits="WebUI.Site1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.or... | [
0.4093954861164093,
0.24687641859054565,
0.3843691349029541,
-0.14373533427715302,
-0.19362275302410126,
-0.09166650474071503,
-0.0682467669248581,
-0.6943306922912598,
-0.4344618022441864,
-0.7683002948760986,
-0.5984951257705688,
0.2038121521472931,
0.09202846139669418,
0.066702991724014... | |
form, which is what you have for your current web form (is this what you did?). You need to select Web Content Form and then select the master page you want attached to it. | [
0.59522545337677,
-0.21819397807121277,
0.6379706263542175,
0.3093007802963257,
-0.027791306376457214,
-0.35543304681777954,
0.04082169756293297,
-0.27922675013542175,
-0.06824516505002975,
-0.7208762764930725,
-0.14720936119556427,
0.3612275719642639,
-0.21296188235282898,
-0.080974578857... | |
I need something like Lucene to do an optimized full text search in Cocoa. I am working on an Iphone app to search through a database.
Anybody has any luck with other databases. Any help is appreciated.
So far, I can only find this.
<http://github.com/tcurdt/lucenekit/tree/master>
According to your comment:
"..I am ... | [
0.16128356754779816,
0.1864584982395172,
0.032587677240371704,
0.12823355197906494,
-0.2562409043312073,
-0.16151529550552368,
0.04230249673128128,
0.46445173025131226,
-0.10434436798095703,
-0.6318041682243347,
0.057813093066215515,
0.32647886872291565,
-0.1706577092409134,
0.124883234500... | |
I have a pointer to a given class. Lets say, for example, the pointer is:
```
0x24083094
```
That pointer points to:
```
0x03ac9184
```
Which is the virtual function table of my class. That makes sense to me. In windbg, everything looks correct.
I delete said pointer. Now at `0x24083094` is:
```
0x604751f8
```... | [
-0.1990123689174652,
0.2442474067211151,
0.27546265721321106,
0.07699624449014664,
-0.09764943271875381,
-0.22380615770816803,
0.44831448793411255,
0.04008815437555313,
-0.2427699714899063,
-0.6370776295661926,
0.042610280215740204,
0.2508888244628906,
-0.0017552098724991083,
0.44994366168... | |
under visual studio 2003.
I know I can't rely on that value being set, even if it does appear to be consistent, but can I rely on it being different? I.e., `0x03ac9184` will not be at `0x24083094` if the pointer is deleted, right? What is put there? It Could be anything, but `0x03ac9184` will definitely not be there ... | [
0.1094806119799614,
0.22217042744159698,
0.39351996779441833,
0.05116649717092514,
-0.39046236872673035,
-0.23939447104930878,
0.4912445545196533,
-0.16369859874248505,
-0.41665035486221313,
-0.30187180638313293,
-0.07718006521463394,
1.0088117122650146,
-0.26844295859336853,
-0.1485812664... | |
Essentially, I am trying to fix a bug where a pointer gets deleted out from under me. It's a long story, I won't go into the details.
Basically, I am trying to detect that I am in this situation, so I can exit gracefully from my function. I suppose the easiest and best way is to just figure out who actually owns this... | [
0.22066104412078857,
0.1930035799741745,
0.1555614322423935,
0.23152559995651245,
0.23761506378650665,
-0.0835326761007309,
0.19245009124279022,
0.4099978506565094,
-0.26015910506248474,
-0.6571001410484314,
-0.037515994161367416,
0.4551301598548889,
-0.11353138089179993,
0.068445973098278... | |
code we have a class called 'BogusObject' that essentially acts as a tray catching people that accidentally dereference freed objects. Basically, we hook our own delete functions and bash the BogusObject class into the vtable of any freed class.
Then if someone calls something they get a nice message saying something... | [
0.4464149475097656,
0.24119685590267181,
0.074444979429245,
0.19581882655620575,
-0.24400511384010315,
-0.4072849154472351,
0.8088290095329285,
0.2903256118297577,
-0.20630650222301483,
-0.5327284932136536,
-0.11825915426015854,
0.3463652431964874,
-0.4714287221431732,
0.3092440366744995,
... | |
up getting the nice message saying something is wrong! But I am now of the opinion that it is a coincidence.
For some reason the runtime is putting that `0x604751f8` value in this pointer when it is deleted, and that just happens to correspond with the one class that has a purpose to catch situations like this!
Nothi... | [
0.46702659130096436,
-0.02360384725034237,
0.4010172486305237,
0.14451734721660614,
0.001326605211943388,
-0.4168213903903961,
0.3965350389480591,
0.29494524002075195,
-0.5919929146766663,
-0.5700925588607788,
-0.09652478247880936,
0.3212243318557739,
-0.4215441048145294,
0.085353389382362... | |
that value popping up in your program mysteriously, you can assume that somewhere you are referencing deleted memory. See [this answer](https://stackoverflow.com/questions/370195/when-and-why-will-an-os-initialise-memory-to-0xcd-0xdd-etc-on-malloc-free-new/370362#370362) for a list of values under one compiler.
It's a... | [
0.39017874002456665,
0.17937320470809937,
0.32776129245758057,
0.22530078887939453,
0.35366666316986084,
-0.3039487302303314,
0.14934328198432922,
0.25169748067855835,
-0.49751269817352295,
-0.46067485213279724,
-0.2858272194862366,
0.46195733547210693,
-0.12863382697105408,
0.073533684015... | |
is what it is, and get them to guarantee that it will not change. And even then, know that your code is now tied to one compiler's behaviour. In C++, accessing unallocated memory is undefined and evil.
Edit:
You can't even rely on that value changing after a delete. There's nothing that says a compiler needs to modify... | [
0.34302812814712524,
0.06979717314243317,
0.06946432590484619,
0.02133420668542385,
0.007596734911203384,
-0.20722506940364838,
0.3909223973751068,
0.09389044344425201,
-0.31025442481040955,
-0.304196298122406,
-0.18220341205596924,
0.5169997215270996,
-0.38644853234291077,
0.1090869531035... | |
Can anyone tell me how to execute a .bat file from a PHP script?
I have tried:
```
exec("C:\[path to file]");
system("C:\[path to file]");
```
Nothing is working. I've checked the PHP manuals and googled around but can't find a good answer. Anyone know where I'm going wrong?
I'm running Windows 2003 Server and ha... | [
0.40119031071662903,
0.23940958082675934,
0.10990811139345169,
0.14019381999969482,
-0.3292916417121887,
-0.3460082411766052,
0.5780412554740906,
-0.048497702926397324,
-0.002444106386974454,
-0.6760429739952087,
-0.03139820322394371,
0.9421849250793457,
-0.17006580531597137,
-0.0110573647... | |
I have a somewhat weird requirement to be able to listen to a number of network interfaces from Java on a Linux machine and determine if one of them receives UDP packets of a certain type. The output data which I need is the IP address of the interface in question. Is there any way to do this in Java?
Listening on th... | [
0.3172009587287903,
0.046166449785232544,
0.07604022324085236,
0.07856177538633347,
-0.1962537169456482,
-0.3625919818878174,
0.3317843973636627,
0.04653438925743103,
-0.22934359312057495,
-0.8077573776245117,
0.18520183861255646,
0.6602662205696106,
-0.18978968262672424,
-0.03612963110208... | |
(new DatagramSocket(port, address)) doesn't receive the packets at all. This case deserves a code example which shows what I'm trying to do:
```
Enumeration interfaces = NetworkInterface.getNetworkInterfaces();
while (interfaces.hasMoreElements()) {
NetworkInterface ni = (NetworkInterface) interfaces.nextElement();
... | [
-0.02316989377140999,
0.011986975558102131,
0.7504863142967224,
-0.03178052976727486,
-0.02256682515144348,
-0.22457469999790192,
0.7613027691841125,
-0.2951279580593109,
-0.40108048915863037,
-1.273351788520813,
-0.28903183341026306,
0.6014667749404907,
-0.09794896841049194,
0.48747846484... | |
also tried to to initialize the socket with the broadcast address constructed based on the beginning of the real IP of the interface and the rest according to the correct netmask:
```
byte [] mask = { (byte)255, 0, 0, 0 };
byte[] addrBytes = InetAddress.getByName("126.5.6.7").getAddress();
for (int i=0; i < 4; i++) {... | [
0.05908309295773506,
0.08909464627504349,
0.5860351920127869,
-0.18762177228927612,
-0.4467681348323822,
-0.03085344098508358,
0.5766579508781433,
-0.24585315585136414,
-0.10107599943876266,
-0.8151548504829407,
-0.22128000855445862,
0.5869051218032837,
-0.27515527606010437,
0.138012543320... | |
8.10 this worked, as well as with the Red Hat release (RHEL 4.x) I am dealing with.
Apparently not receiving the packets while bound to a certain local IP is the [correct behaviour](http://www.developerweb.net/forum/showthread.php?t=5722), although in windows this works. I need to get it working on Linux (RHEL and Ubu... | [
0.0695527046918869,
-0.060389455407857895,
0.4963689148426056,
-0.2104228436946869,
-0.26703596115112305,
-0.39132288098335266,
0.7200251817703247,
0.09876658022403717,
-0.2937476336956024,
-0.8274833559989929,
-0.26089224219322205,
0.716934859752655,
-0.477312833070755,
-0.038821835070848... | |
so hard to disable IPV6 that I gave up, and that bit me.
To listen to broadcast messages from a certain interface, I'll first create the "broadcast version" of the interface's IP address:
```
byte [] mask = { (byte)255, 0, 0, 0 };
byte[] addrBytes = InetAddress.getByName("126.5.6.7").getAddress();
for (int i=0; i < ... | [
0.04118076711893082,
-0.16033166646957397,
0.5240209102630615,
-0.17855054140090942,
-0.2942088544368744,
-0.07568637281656265,
0.6044102907180786,
-0.3862990438938141,
-0.12043818831443787,
-0.8072197437286377,
-0.15912020206451416,
0.6056378483772278,
-0.508478045463562,
-0.0295118018984... | |
port), and it works. But not without passing the following system properties to the JVM:
```
-Djava.net.preferIPv6Addresses=false -Djava.net.preferIPv4Stack=true
```
I have no idea how IPV6 manages to break listening to broadcasts, but it does, and the above parameters fix it. | [
0.0902409628033638,
0.03404874727129936,
0.6601371169090271,
-0.03594588115811348,
0.022053187713027,
-0.3293117880821228,
0.6619091033935547,
-0.08166182041168213,
-0.1476256251335144,
-0.4876829981803894,
-0.2249484658241272,
0.9867795705795288,
-0.27348047494888306,
0.2665747106075287,
... | |
After reading [Hibernate: hbm2ddl.auto=update in production?](https://stackoverflow.com/questions/221379/hibernate-hbm2ddl-autoupdate-in-production) some questions arose.
First of all, the reason for I'm using Hibernate is to be database vendor independent (no need to write 10 versions of the "same" sql query, eg. tsq... | [
0.5097693204879761,
0.41053611040115356,
0.35211095213890076,
-0.33601656556129456,
-0.36317798495292664,
-0.11698839068412781,
0.5750210285186768,
-0.22539106011390686,
0.01548943854868412,
-0.4127698540687561,
0.15044145286083221,
0.6112893223762512,
-0.4614158570766449,
0.09403906762599... | |
dependent". (This statement could be false if "all" (atlast the databases Hibernate support) are implementing the [DDL](http://docs.rinet.ru/O8/glossary.htm) (The subset of SQL used for defining and examining the structure of a database.) equal).
Do all changes in development/staging mode and transfer and execute scrip... | [
0.6276351809501648,
0.021301783621311188,
0.6954006552696228,
-0.1579073965549469,
-0.3597305715084076,
-0.1936846524477005,
0.41728267073631287,
-0.41280198097229004,
0.06603188067674637,
-0.5506300330162048,
0.12325596064329147,
1.029401421546936,
-0.6117140650749207,
-0.0398091748356819... | |
I have a specific case in mind, but the question applies in general too. How do you deal with data in Excel when the amount of data is arbitrary?
In my specific case, I have a program which generates between 1 and 10 sets of data, each set consisting of 5 arbitrarily (but equally) long arrays (or you could consider it... | [
0.3492238223552704,
0.24635285139083862,
0.1957492083311081,
0.21364843845367432,
-0.07606063783168793,
0.1417357176542282,
-0.19424980878829956,
-0.5192064642906189,
-0.21256685256958008,
-0.5846869349479675,
0.021034307777881622,
0.5075287818908691,
-0.2143687903881073,
-0.20349867641925... | |
would like to do this with as little VBA as possible (none would be best). The idea is that the end users of these reports should be able to change the format (or generate a whole new report of the same data) without me having to change my program.
Basically, the reports should be something like 1-10 tables, with one ... | [
0.3372421860694885,
0.03894733265042305,
0.20518837869167328,
0.35794582962989807,
-0.0490495041012764,
0.053740233182907104,
-0.1778779774904251,
-0.3120444416999817,
-0.32740330696105957,
-0.5400131940841675,
0.20125727355480194,
0.40123531222343445,
-0.16778363287448883,
-0.251412093639... | |
darn thing in VBA?
This could potentially be useful:
<http://www.exceluser.com/solutions/variablelists_xl12.htm>
I ended up going with this technique. I just copied down my formulas further than I could possibly ever need and wrote a little VBA function to hide the rows that weren't being used. It's not the most eleg... | [
0.4361942410469055,
-0.022901274263858795,
0.2600284516811371,
-0.10689516365528107,
-0.10288911312818527,
0.00001058567977452185,
0.3837120532989502,
-0.21025602519512177,
-0.22160197794437408,
-0.0933755412697792,
0.3722899258136749,
0.6007611155509949,
-0.3025360107421875,
0.04335594549... | |
I am trying to add an ID HTML attribute to a form using ASP.NET MVC and VB.NET
```
<%Html.BeginForm("Create", "Model", "", "", New With {.id = "CreateForm"})%>
```
This gives me a type error, since .id is expecting an Integer, not a string. How do add an ID attribute to my form?
I believe you need something like th... | [
0.3903128206729889,
0.1268097460269928,
0.43496885895729065,
-0.165651336312294,
-0.23822925984859467,
-0.14904455840587616,
0.29816603660583496,
-0.4349282383918762,
0.16408222913742065,
-0.9043572545051575,
0.1208265870809555,
0.43740782141685486,
-0.43977823853492737,
0.1212247088551521... | |
for the BeginForm method.
[Html.BeginForm](http://msdn.microsoft.com/en-us/library/dd460542.aspx) | [
-0.1824725866317749,
-0.23614181578159332,
0.4007578194141388,
-0.17477251589298248,
0.14336997270584106,
-0.10731663554906845,
0.2888680696487427,
-0.27788761258125305,
0.036383628845214844,
-0.5530633926391602,
-0.5842598676681519,
0.19550193846225739,
0.02400875650346279,
-0.09802591800... | |
I'm using Test::Unit with shoulda to test a controller.
Since I'm just testing the controller I dont wanna the view to be rendered.
I'm stubbing some objects, some errors are throw when the view is rendered, but the test shouldn't fail, because the controller is correct.
So, theres any way to disable the rendering o... | [
0.2817333936691284,
0.13552825152873993,
0.19446301460266113,
-0.00620674854144454,
0.006478884257376194,
-0.12297958880662918,
0.5070003867149353,
-0.15903905034065247,
0.09472806751728058,
-0.8204651474952698,
-0.13911083340644836,
0.8670294284820557,
-0.35401663184165955,
-0.08672197163... | |
I have been unable to persist a nullable enum using NHibernate with Fluent NHibernate configuration. NHibernate attempts to save a string representation of the enum and I get the error
```
System.Data.SqlClient.SqlException: Conversion failed when converting the
nvarchar value 'VGS' to data type tinyint.
```
The pr... | [
0.11036434769630432,
-0.06678451597690582,
0.2561357319355011,
-0.05901242792606354,
-0.02365371584892273,
0.19347508251667023,
0.3741746246814728,
-0.19013188779354095,
-0.035668887197971344,
-0.6811290383338928,
-0.0187369454652071,
0.587135910987854,
-0.3423244059085846,
0.4889247715473... | |
bug or unsupported feature in NHibernate?
If I can't make this work I'm going to add an Undefined value to my enum as a workaround.
This was a [bug and it's been fixed](http://code.google.com/p/fluent-nhibernate/issues/detail?id=168). | [
0.21649472415447235,
0.1707458645105362,
0.1611098051071167,
-0.11430045962333679,
0.07435491681098938,
0.14220890402793884,
0.5181576013565063,
0.24489519000053406,
-0.0475318543612957,
-0.313624769449234,
-0.0933336541056633,
0.6729384064674377,
-0.419283390045166,
0.20593677461147308,
... | |
The error label displays till the width of the table. As this:
[alt text http://img518.imageshack.us/img518/8864/width1.jpg](http://img518.imageshack.us/img518/8864/width1.jpg)
How can I display it till the text of the label? This is the css:
```
label.error { color: red; font-size:16px; font-family:Nyala; backg... | [
0.05817686766386032,
0.1527000367641449,
0.6274868845939636,
-0.17602787911891937,
-0.09442964196205139,
0.12023195624351501,
0.23000285029411316,
-0.23632922768592834,
-0.36934998631477356,
-0.49389252066612244,
-0.10166825354099274,
0.2963438630104065,
-0.29778799414634705,
0.18572586774... | |
margin: 0 auto;
}
label {display: inline-block;
width: 48%;
text-align: right;
}
input {display: inline-block;
width: 50%; | [
-0.3683088719844818,
0.031771671026945114,
0.4906971752643585,
-0.0297988411039114,
-0.14916503429412842,
0.48496007919311523,
0.00973031297326088,
-0.23801685869693756,
0.14176441729068756,
-0.5023704767227173,
-0.2270856499671936,
0.4952572286128998,
0.017110848799347878,
-0.179765835404... | |
}
.errorMsg
{display: block;
width: 51%;
margin: 0 0 0.5em 49%;
color: #f00;
background-color: #ffa
}
</style>
...
<div id="container"> | [
-0.27271559834480286,
-0.008307185024023056,
0.30401408672332764,
-0.09931924939155579,
0.2476138025522232,
0.26853322982788086,
0.031190313398838043,
-0.1988033950328827,
-0.2306250035762787,
-0.49290162324905396,
-0.18829958140850067,
0.30375808477401733,
-0.12003558874130249,
0.14127844... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.