text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
expressions, while the one I have in jetty does. | [
0.36249369382858276,
0.2714131772518158,
-0.4300999939441681,
0.008671983145177364,
-0.1694280207157135,
0.18391965329647064,
0.3526920974254608,
0.4024684429168701,
-0.6673712730407715,
-0.651663601398468,
-0.242823526263237,
0.7134369611740112,
-0.04447586089372635,
-0.18009774386882782,... | |
I recently read a discussion regarding whether managed languages are slower (or faster) than native languages (specifically C# vs C++). One person that contributed to the discussion said that the JIT compilers of managed languages would be able to make optimizations regarding references that simply isn't possible in la... | [
0.10501917451620102,
0.2434409260749817,
-0.4193536937236786,
0.360382080078125,
-0.19985273480415344,
-0.004402216523885727,
0.25944018363952637,
0.20877638459205627,
-0.37219345569610596,
-0.8690695762634277,
0.007957061752676964,
0.4101698696613312,
-0.04850935563445091,
-0.122658520936... | |
it can in some or many cases offer better performance than static compilation, as many optimizations are only feasible at run-time:
>
>
> 1. The compilation can be optimized to the targeted CPU and the operating system model where the application runs. For example JIT can choose SSE2 CPU instructions when it detects ... | [
0.20321603119373322,
-0.27189451456069946,
-0.02748231031000614,
0.15998448431491852,
-0.33272087574005127,
0.026898900046944618,
0.1932351142168045,
-0.1512276530265808,
-0.09293971955776215,
-0.5875399112701416,
-0.15614202618598938,
0.28813886642456055,
-0.4059291481971741,
-0.053827989... | |
recompile for optimum performance. However, some static compilers can also take profile information as input.
> 3. The system can do global code optimizations (e.g. inlining of library functions) without losing the advantages of dynamic linking and without the overheads inherent to static compilers and linkers. Specifi... | [
-0.2532578408718109,
-0.2686783969402313,
0.4844141900539398,
0.23832616209983826,
-0.22923563420772552,
-0.05921275168657303,
0.38739487528800964,
-0.3464537560939789,
-0.34145140647888184,
-0.6277294754981995,
-0.3147183656692505,
0.6487039923667908,
-0.5469290018081665,
-0.0926541760563... | |
can't think of something related directly to the use of references instead of pointers. | [
0.39840036630630493,
0.36369574069976807,
0.006489675957709551,
0.30229195952415466,
-0.01771947368979454,
-0.10197149962186813,
0.11144856363534927,
0.15091614425182343,
-0.16598862409591675,
-0.37219396233558655,
0.21369647979736328,
0.28567805886268616,
-0.029215212911367416,
0.10735753... | |
Setup is following:
Drupal project, one svn repo with trunk/qa/production-ready branches, vhosts for every branch, post-commit hook that copies files from repository to docroots.
Problem is following: Drupal website often relies not only on source code but on DB data too (node types, their settings, etc.).
I'm looki... | [
0.41353434324264526,
0.010521425865590572,
0.2775966227054596,
0.1255890130996704,
-0.061988890171051025,
-0.339308500289917,
0.06253022700548172,
-0.21440549194812775,
-0.3430519104003906,
-0.4422202408313751,
-0.2009533941745758,
0.4421722888946533,
-0.17369605600833893,
0.18760944902896... | |
adapt some kind of build tool (like Apache Ant) or unit testing framework. And it would be very great, if this tool know about drupal, so in scripts I can do things like `variable_set()`, `drupal_execute()`.
Any ideas? Or should I start coding right now instead of asking this? :)
It sounds like you've already got some... | [
0.5867276191711426,
-0.013863948173820972,
-0.057175371795892715,
0.2737340033054352,
-0.01830211840569973,
-0.2031800001859665,
0.11048786342144012,
0.09935365617275238,
-0.19742438197135925,
-1.2620397806167603,
0.34504494071006775,
0.612592875957489,
-0.4576655328273773,
-0.128092065453... | |
seems the way to go.
My approach to this is to use sql patch files (files containing the sql statements to upgrade the db schema/data) with a version number at the start of the filename. The database then contains a table with config info in (you may already have this) that includes info on which version the database ... | [
0.646876871585846,
0.16747847199440002,
0.5353061556816101,
-0.18876583874225616,
0.04468340426683426,
-0.2680138647556305,
0.15358160436153412,
0.04195622354745865,
-0.04379265755414963,
-0.8927055597305298,
0.06354378908872604,
0.7928365468978882,
-0.10877165198326111,
0.0925449877977371... | |
have a patch for is newer than the version the db is at, and applies it/them (in order) if so.
The db patch should always finish by updating aforementioned the version number in the config table.
This approach can be extended to include the ability to set up a new database based on a full dump file and then applying ... | [
0.5823037624359131,
0.1437353789806366,
0.5374937653541565,
-0.17195817828178406,
0.16351783275604248,
-0.5806788802146912,
0.2272653877735138,
-0.21786922216415405,
-0.05030897632241249,
-0.8332428336143494,
-0.5122426152229309,
0.5817920565605164,
-0.00953513290733099,
-0.156749486923217... | |
I am adding a custom background image to my navigation bar by creating an image view and doing a `[navigationController.navigationBar addSubview:imageView]`.
The background comes in fine. But as soon as I do this, my other navigation items start behaving in a strange manner. Sometimes the `navigationItem.title` appear... | [
0.40204307436943054,
-0.10033417493104935,
0.4760773479938507,
0.21034280955791473,
-0.03177465870976448,
-0.17011013627052307,
0.3399166464805603,
0.2128608673810959,
-0.47888731956481934,
-0.6699503064155579,
0.19203071296215057,
0.530084490776062,
-0.35925230383872986,
0.314918100833892... | |
until -viewWillAppear:, and using -sendSubviewToBack: after adding it. | [
-0.18001693487167358,
-0.42826002836227417,
0.815123975276947,
-0.06942621618509293,
0.04250071942806244,
-0.2899412512779236,
0.25730758905410767,
0.1907975822687149,
-0.0196226816624403,
-0.3196484446525574,
-0.4510824382305145,
0.7292576432228088,
-0.20026397705078125,
-0.06247481703758... | |
I'm reading "[Pro JavaScript Techniques](http://jspro.org/)" by [John Resig](https://en.wikipedia.org/wiki/John_Resig), and I'm confused with an example. This is the code:
```
// Create a new user object that accepts an object of properties
function User( properties ) {
// Iterate through the properties of the objec... | [
-0.022890131920576096,
0.3061211109161377,
0.18872907757759094,
-0.12464900314807892,
-0.07077132165431976,
-0.18689697980880737,
0.12971855700016022,
-0.499843031167984,
-0.26499229669570923,
-0.6491632461547852,
-0.21685831248760223,
0.4443468749523163,
-0.5090441703796387,
0.22773046791... | |
"set" + i ] = function(val) {
properties[i] = val;
};
})(); }
}
// Create a new user object instance and pass in an object of
// properties to seed it with
var user = new User({
name: "Bob",
age: 44
});
// Just note that the name property does not exist, as it's private
// within the properties object
alert... | [
0.33046072721481323,
0.00901106558740139,
0.3223685622215271,
-0.21108776330947876,
0.41228288412094116,
0.11152233928442001,
0.2022286057472229,
-0.47873154282569885,
-0.30512988567352295,
-0.7635750770568848,
-0.06996050477027893,
0.4243827164173126,
0.019018342718482018,
0.4505122601985... | |
functions
user.setage( 22 );
alert( user.getage() == 22 );
```
Now running that in the [Firebug](https://en.wikipedia.org/wiki/Firebug_%28software%29) console (on Firefox 3) throws that *user.getname()* is not a function. I tried doing this:
```
var other = User
other()
window.getname() // --> This works!
```
And ... | [
-0.02838669903576374,
0.005660390947014093,
0.47912412881851196,
-0.3212893307209015,
-0.0429074689745903,
-0.12461290508508682,
0.5082115530967712,
-0.3756970763206482,
-0.14701908826828003,
-0.5363920331001282,
-0.2209857702255249,
0.6386547088623047,
-0.6039119958877563,
-0.026340318843... | |
did. So in case there's someone else interested in the "whys", here they are:
**Why does 'this' changes inside the anonymous function?**
A new function, even if it is an anonymous, declared inside an object or another function, *always changes the scope*, in this case returning to the global scope ([window](https://d... | [
0.5720893740653992,
0.10571540892124176,
0.46123820543289185,
-0.18149788677692413,
0.36096447706222534,
-0.12100629508495331,
0.09470471739768982,
-0.06525664031505585,
-0.29979801177978516,
-0.5975459814071655,
-0.18493643403053284,
0.37661266326904297,
-0.1448870450258255,
0.31853342056... | |
the last, because it has already iterated for all the properties... and it will always return properties[i] which is the last value, in this case the age.
*Solution:* save the `i` value in a variable like this
```
for ( i in properties ) { (function(){
var j = i
// From now on, use properties[j]
``` | [
-0.00850075762718916,
0.02728087082505226,
0.44477298855781555,
-0.19633246958255768,
0.38220563530921936,
-0.04828104376792908,
0.14396804571151733,
-0.15206003189086914,
-0.056059300899505615,
-1.0459696054458618,
-0.34711676836013794,
0.6382364630699158,
0.17353025078773499,
0.612273514... | |
Is there any performance penalty for the following code snippet?
```
for (int i=0; i<someValue; i++)
{
Object o = someList.get(i);
o.doSomething;
}
```
Or does this code actually make more sense?
```
Object o;
for (int i=0; i<someValue; i++)
{
o = someList.get(i);
o.doSomething;
}
```
If in byte c... | [
0.1217246875166893,
0.13280372321605682,
0.10332100838422775,
-0.20405089855194092,
-0.2308037281036377,
-0.045214589685201645,
0.41563332080841064,
-0.18315620720386505,
-0.23006175458431244,
-0.6183971762657166,
-0.14086396992206573,
0.5581758618354797,
-0.28958284854888916,
-0.038785684... | |
I'm using SQL Server 2005.
I have a field that must either contain a unique value or a NULL value. I think I should be enforcing this with either a `CHECK CONSTRAINT` or a `TRIGGER for INSERT, UPDATE`.
Is there an advantage to using a constraint here over a trigger (or vice-versa)? What might such a constraint/trigge... | [
-0.15190939605236053,
0.14253243803977966,
0.3291221559047699,
-0.169273242354393,
-0.12080651521682739,
-0.31215158104896545,
0.0371580645442009,
-0.1357739418745041,
-0.31838807463645935,
-0.377664178609848,
0.15748904645442963,
0.7246487736701965,
-0.46885645389556885,
0.099817529320716... | |
simply make sure this maximum is 1.
Constraint:
```
field is null or dbo.fn_count_maximum_of_field(field) < 2
```
**EDIT I can't remember right now -- and can't check it either -- whether the constraint check is done before the insert/update or after. I think after with the insert/update being rolled back on fai... | [
0.10443249344825745,
-0.019886285066604614,
0.6480411291122437,
-0.14412641525268555,
0.12820614874362946,
-0.056277643889188766,
0.21942223608493805,
-0.7173855900764465,
-0.30592402815818787,
-0.402509868144989,
-0.34641796350479126,
0.7663581967353821,
-0.34358513355255127,
-0.041041128... | |
count(*) as occurrences
from dbo.tbl
where field = @field
group by field
) tmp
```
This should be reasonably fast if your column as a (non-unique) index on it. | [
0.3191310167312622,
0.2217666059732437,
0.4278397858142853,
-0.15678277611732483,
-0.07308737188577652,
-0.21723271906375885,
0.20424796640872955,
-0.2708413302898407,
-0.18162988126277924,
-0.3476888835430145,
-0.03129732608795166,
0.29322096705436707,
-0.3507433235645294,
0.2495263218879... | |
Let's say I have a class like this:
```
class ApplicationDefs{
public static final String configOption1 = "some option";
public static final String configOption2 = "some other option";
public static final String configOption3 = "yet another option";
}
```
Many of the other classes in my application are using these o... | [
0.17057043313980103,
-0.06676781177520752,
0.26015010476112366,
-0.1271338313817978,
0.035778339952230453,
-0.003980961628258228,
0.09090857952833176,
-0.0573362335562706,
-0.18648122251033783,
-0.6830436587333679,
-0.12416983395814896,
0.8013260960578918,
-0.33981049060821533,
0.168391913... | |
people know about this. i.e.
```
public static final String configOption1 = "some option".intern();
```
This will prevent the compile time inline. Since it is referring to the exact same string that the compiler will place in the perm, you aren't creating anything extra.
As an alternative you could always do
```
p... | [
0.05173622816801071,
-0.04248527064919472,
0.3335762023925781,
0.0015642178477719426,
-0.11610453575849533,
-0.34405356645584106,
0.13835148513317108,
-0.03200368210673332,
-0.33823564648628235,
-0.3938562870025635,
-0.26807495951652527,
0.45329493284225464,
-0.24581918120384216,
0.0762763... | |
We are experiencing an exceedingly hard to track down issue where we are seeing ClassCastExceptions *sometimes* when trying to iterate over a list of unmarshalled objects. The important bit is *sometimes*, after a reboot the particular code works fine. This seems to point in the direction of concurrency/timing/race con... | [
0.3378790318965912,
-0.3886725604534149,
-0.04713098704814911,
0.48554813861846924,
0.0435631088912487,
-0.09781038016080856,
0.02337971143424511,
0.15842300653457642,
-0.4179422855377197,
-0.6552836298942566,
0.11857238411903381,
0.35337206721305847,
-0.18925155699253082,
0.34045070409774... | |
are creating their JAXBContext at the same time.
In any case I would appreciate any pointers towards an explanation for what could cause these *intermittent* ClassCastExceptions. The intermittent is important since they indicate that the code itself is normally working fine but that some external factor seems to influ... | [
0.3733604848384857,
0.19744862616062164,
0.18090036511421204,
-0.30583202838897705,
0.15543390810489655,
-0.2547064423561096,
0.6175698637962341,
-0.1214531734585762,
-0.23545558750629425,
-0.6145225167274475,
-0.14802640676498413,
0.299810528755188,
-0.5702343583106995,
0.1765443831682205... | |
BTW).
Given that the actual object unmarshalling went fine, is it even physically possible for JAXB to leave ElementNSImpl objects inside of nested collections?
Runtime environment:
* JAXB 2.1
* OSGi
* Spring DM
* The JAXBContext is initialised with the ClassLoader of the bundle containing the classes to be marshall... | [
0.040405262261629105,
-0.2572857439517975,
0.2588644027709961,
-0.051492005586624146,
0.2019609659910202,
-0.009597858414053917,
0.27437880635261536,
-0.23549528419971466,
0.06790442764759064,
-0.46866729855537415,
-0.10977663099765778,
0.39924001693725586,
-0.423578679561615,
0.0418381690... | |
I'm planning to use MS entity framework for new web apps (come on EF v2!).
So does it make sense to plan ahead by adding timestamp columns to all entity tables in existing and future databases, to support concurrency checks? Is there any reason why it would be a *bad* idea to have a timestamp column in every table?
N... | [
0.36597925424575806,
0.17566634714603424,
0.5429980754852295,
0.1432717740535736,
0.1991828829050064,
-0.00711430050432682,
0.14525112509727478,
0.10014021396636963,
-0.38940563797950745,
-0.7990395426750183,
0.37046629190444946,
0.3951190412044525,
-0.3793908357620239,
0.00072496454231441... | |
One word of caution - if you ever select into a temp-table/table-var for processing, you need to use `varbinary(8)`, not `timestamp`, in the temp table - otherwise your temp table will get its own unique timestamps upon update ;-p
As you acknowledge, `timestamp` only helps with concurrency. Despite the name, it has no... | [
0.23171289265155792,
-0.20958828926086426,
0.18056082725524902,
-0.1143932119011879,
-0.09208781272172928,
-0.2892276644706726,
0.27322083711624146,
-0.0784502848982811,
-0.33957234025001526,
-0.46600645780563354,
0.013859200291335583,
0.4025225341320038,
-0.38977596163749695,
0.2028489857... | |
I'm creating a Q&A application in CakePHP, and I want to exclude my associations in some cases. Imagine the following:
I'm listing all questions on the first page using $this->Question->findAll();. Since I have the following association in my model:
```
public $hasMany = array('Answer' =>
array('className' =>... | [
0.0007929806597530842,
0.10541536659002304,
0.14846323430538177,
-0.092666856944561,
0.15937797725200653,
-0.11081351339817047,
0.0928642675280571,
-0.12113191187381744,
-0.077743761241436,
-0.6749506592750549,
-0.21628160774707794,
0.22469612956047058,
-0.3210679590702057,
0.3555950224399... | |
'exclusive' => false,
)
);
```
All answers will get selected at the start page, which is not optimal. How could i do to exclude the answers in this particular method?
Thanks
I quick look at the [CakePHP API](http://api.cakephp.org) reveals that you've got an [unbindModel](http://api.cakephp.org/class_mod... | [
-0.04886416345834732,
-0.10391532629728317,
0.31456756591796875,
0.21039500832557678,
-0.2548917829990387,
-0.17406964302062988,
0.25274401903152466,
-0.3419991731643677,
-0.35062745213508606,
-0.5921890735626221,
-0.3259194493293762,
0.5493466854095459,
-0.13338440656661987,
0.24449469149... | |
I got a table with a custom TableCellEditor (extending DefaultCellEditor) with a JFormattedTextField as the editor component.
Now I got problem: when I press a separate button while editing. When the button is pressed, the editor remains "open and active" while I'd want it to stop editing so that the changes made woul... | [
-0.039723824709653854,
-0.10399384796619415,
0.49059879779815674,
-0.14346975088119507,
0.16180971264839172,
-0.18848419189453125,
0.4421886205673218,
0.03076142631471157,
-0.41266581416130066,
-0.5102941989898682,
-0.18662118911743164,
0.7621842622756958,
-0.4153192639350891,
0.0263496227... | |
I am writing a console program in C#.
Is there a way I can use a Console.Clear() to only clear certain things on the console screen?
Here's my issue:
I have a logo (I put it on screen using Console.WriteLine()) and a 2d array which I want to keep constant and clear everything below it.
You could use a custom method ... | [
0.2850798964500427,
0.19293677806854248,
0.8884530663490295,
-0.2034420371055603,
0.27035951614379883,
-0.07395754009485245,
0.089173324406147,
-0.062181293964385986,
0.11654780805110931,
-0.616411566734314,
-0.1960110068321228,
0.4773971438407898,
-0.16628199815750122,
0.0603393130004406,... | |
Console.SetCursorPosition(x, y + --height);
Console.Write(new string(' ',width));
}
Console.SetCursorPosition(curLeft, curTop);
}
``` | [
-0.3172197639942169,
-0.07443550229072571,
0.7924399971961975,
-0.13243836164474487,
0.21463878452777863,
0.18229986727237701,
0.17397089302539825,
-0.07114913314580917,
-0.06713147461414337,
-0.5296735763549805,
-0.5687382817268372,
0.5481642484664917,
-0.3236313462257385,
-0.083766758441... | |
Hey there, I've got a block of HTML that I'm going to be using repeatedly (at various times during a users visit, not at once). I think that the best way to accomplish this is to create an HTML div, hide it, and when needed take its innerHTML and do a replace() on several keywords. As an example HTML block...
```
<div... | [
0.12145370244979858,
0.014465403743088245,
0.5459241271018982,
-0.027293819934129715,
-0.2355760931968689,
-0.03208509460091591,
0.2857011556625366,
-0.05747465416789055,
-0.33344656229019165,
-0.5902178287506104,
-0.12786898016929626,
0.3348977565765381,
-0.3840906620025635,
-0.1479631960... | |
some_var_with_id);
```
It just feels like I've chosen a stupid way to do this. Does anyone have any suggestions on how to do this faster, smarter, or better in any way? This code will be executed fairly often during a users visit, sometimes as often as once every 3-4 seconds.
Thanks in advance.
I doubt there will be... | [
0.6706719398498535,
0.11502581834793091,
0.04191670939326286,
-0.04706631973385811,
-0.18452709913253784,
-0.019877925515174866,
0.418535441160202,
0.2610742151737213,
-0.08701564371585846,
-0.6239564418792725,
0.06541001796722412,
0.4555005729198456,
-0.08382516354322433,
0.02801040001213... | |
the most elegant way to write this. Besides - what are you worried about? Memory usage? It's abundant and Javascript has a decent memory manager. Execution speed? Then you must have some gigantic string. IMHO this is good. | [
-0.030564678832888603,
0.0332961231470108,
0.103333979845047,
0.1001429408788681,
-0.11672687530517578,
-0.28268373012542725,
0.24364623427391052,
0.0008716061129234731,
-0.29906153678894043,
-0.8294681906700134,
0.14477308094501495,
0.4382879137992859,
-0.1681913435459137,
-0.204934552311... | |
Like the question says, if I have a request for a page on my site like this
<http://somename.something.here/Dada.aspx>
to something like this
<https://somename.something.here/Dada.aspx>
I prefer to (a) not redirect local connections (to ease development under VS), and (b) use a UriBuilder instead of a string.Replace... | [
-0.08787134289741516,
-0.1191338449716568,
0.6710002422332764,
-0.30137014389038086,
-0.26822781562805176,
-0.018834983929991722,
0.3422178626060486,
-0.22554762661457062,
-0.18168719112873077,
-0.8589839339256287,
-0.3522651791572571,
0.24071134626865387,
-0.4612051546573639,
0.5257099866... | |
I have a set of five boolean values. If more than one of these are true I want to excecute a particular function. What is the most elegant way you can think of that would allow me to check this condition in a single if() statement? Target language is C# but I'm interested in solutions in other languages as well (as lon... | [
0.19765128195285797,
0.11663371324539185,
0.16425059735774994,
-0.06954392790794373,
-0.08421999961137772,
0.16689269244670868,
0.07937165349721909,
-0.19495037198066711,
-0.07614234834909439,
-0.2542113959789276,
0.04798128083348274,
0.5006902813911438,
-0.2961733937263489,
0.050623521208... | |
would require converting the separate booleans to a byte (via a bitArray?) and that seems a bit (pun intended) clumsy... *[edit]Sorry, that should have been* `if(myByte & (myByte - 1))` *[/edit]*
Note: This is of course very close to the classical "population count", "sideways addition" or "Hamming weight" programming... | [
0.3949104845523834,
-0.10643787682056427,
0.053378794342279434,
-0.07241309434175491,
-0.13328184187412262,
0.11624573916196823,
0.15896263718605042,
-0.2586999535560608,
-0.24778175354003906,
-0.27918094396591187,
-0.10558547079563141,
0.16652783751487732,
-0.24991796910762787,
0.10569851... | |
(bool4? 1:0) + (bool5? 1:0) > 1)
// do something
```
or a generalized method would be...
```
public bool ExceedsThreshold(int threshold, IEnumerable<bool> bools)
{
int trueCnt = 0;
foreach(bool b in bools)
if (b && (++trueCnt > threshold))
return true;
retu... | [
0.1720227152109146,
-0.0035745997447520494,
0.4015117287635803,
-0.39933398365974426,
0.11478915065526962,
-0.19194629788398743,
0.717177152633667,
-0.8055906295776367,
0.2230907827615738,
-0.26062482595443726,
-0.31388169527053833,
0.5923373699188232,
-0.18658117949962616,
0.0083433957770... | |
}
```
or using LINQ as suggested by other answers:
```
public bool ExceedsThreshold(int threshold, IEnumerable<bool> bools)
{ return bools.Count(b => b) > threshold; }
```
EDIT (to add Joel Coehoorn suggestion:
(in .Net 2.x and later)
```
public void ExceedsThreshold<T>(int threshold,
... | [
-0.12431058287620544,
0.03911595791578293,
0.21808888018131256,
0.015329230576753616,
-0.04138755053281784,
0.026105592027306557,
0.2090781331062317,
-0.6295157670974731,
-0.04472305625677109,
-0.47765281796455383,
-0.03196195140480995,
0.4032468795776367,
-0.2929706275463104,
-0.081578508... | |
IEnumerable<bool> bools)
{ if (ExceedsThreshold(threshold, bools)) action(parameter); }
```
or in .Net 3.5 and later:
```
public void ExceedsThreshold(int threshold,
Action action, IEnumerable<bool> bools)
{ if (ExceedsThreshold(threshold, bools)) action(); }
```
or as an extension to `IEn... | [
-0.24252843856811523,
-0.25505968928337097,
0.8120178580284119,
-0.3164656162261963,
0.11763780564069748,
-0.19419002532958984,
0.3026970326900482,
-0.7653185725212097,
-0.032525476068258286,
-0.5981085896492004,
-0.2415776550769806,
0.7240802049636841,
-0.3103562593460083,
-0.021053437143... | |
}
```
usage would then be:
```
var bools = new [] {true, true, false, false, false, false, true};
if (bools.ExceedsThreshold(3))
// code to execute ...
``` | [
0.1025850921869278,
0.07778283208608627,
0.402377724647522,
-0.3651767373085022,
0.12964414060115814,
-0.16770565509796143,
0.6059010624885559,
-0.6200516819953918,
-0.10361166298389435,
-0.4628254473209381,
-0.3424372673034668,
0.7739605903625488,
-0.290591835975647,
0.10677912086248398,
... | |
I have a windows service that runs fine, but I have to have it run under a special user account.
Currently I go into services and change the logon as section, but for deployment this has to be done more professionally.
Is there a way for me to have it logon as a custom user account programatically, or during the inst... | [
0.7913363575935364,
0.21604004502296448,
0.37060901522636414,
-0.22768445312976837,
0.2726127505302429,
-0.20427285134792328,
0.2935878336429596,
0.16794635355472565,
-0.45579466223716736,
-0.6182429194450378,
-0.08385604619979858,
0.5076488852500916,
-0.060425322502851486,
0.2024438381195... | |
your code you can specify it there..
```
public class MyServiceInstaller : Installer
{
private ServiceInstaller servInst;
private ServiceProcessInstaller servProcInst;
public MyServiceInstaller () { InitializeComponent(); }
#region Component Designer generated code
private... | [
-0.06690046936273575,
-0.31893932819366455,
0.7276406288146973,
-0.417026162147522,
0.35790401697158813,
0.013632453046739101,
0.4873771369457245,
-0.14948518574237823,
-0.030818888917565346,
-0.9732205271720886,
-0.8013166189193726,
0.4895143210887909,
-0.26219311356544495,
0.527293264865... | |
servProcInst = new ServiceProcessInstaller();
// -----------------------------------------------
servProcInst.Account = ServiceAccount.LocalSystem; // or whatever accnt you want
servProcInst.Username = null; // or, specify a specifc acct here
servProcInst.Password = null... | [
-0.3398921489715576,
-0.34520798921585083,
0.8595930933952332,
-0.32832905650138855,
-0.0024438523687422276,
0.10275884717702866,
0.4676634669303894,
-0.15096968412399292,
-0.5017693042755127,
-0.654111385345459,
-0.4231603443622589,
0.27007418870925903,
-0.44045114517211914,
0.41901093721... | |
new InstallEventHandler(this.AfterServProcInstall);
servInst.ServiceName = "MyService";
servInst.DisplayName = "Display name for MyService";
servInst.Description = " Description for my service";
servInst.StartType = ServiceStartMode.Automatic;
servInst.AfterIn... | [
0.2041061371564865,
-0.19184277951717377,
0.7440013885498047,
-0.32027706503868103,
0.17289948463439941,
0.048464033752679825,
0.7584811449050903,
-0.22947737574577332,
-0.05529369041323662,
-0.7904677391052246,
-0.7316362857818604,
0.7316131591796875,
-0.20808376371860504,
0.1956774741411... | |
new InstallEventHandler(this.AfterServiceInstall);
Installers.AddRange(new Installer[] { servProcInst, servInst });
}
#endregion
}
private void AfterServiceInstall(object sender, InstallEventArgs e) { }
private void AfterServProcInstall(object sender, InstallEventArgs e) { }
``` | [
0.05678176134824753,
-0.31849542260169983,
0.8166694641113281,
-0.40891799330711365,
0.31751707196235657,
-0.27237045764923096,
0.5359376668930054,
-0.13728481531143188,
0.036731522530317307,
-0.7613780498504639,
-0.654159665107727,
0.815527081489563,
-0.5212688446044922,
0.023113496601581... | |
Is there anyone who has used or looked into using Jitterbit as well as BizTalk? If so, what are some pros and cons of each, and which one did you go with as your final solution?
Specifically, I'm looking for SAP integration, but any input would be appreciated.
I've done a fair bit of integration with SAP, starting wit... | [
0.24965669214725494,
-0.14704512059688568,
-0.029144378378987312,
0.29391130805015564,
-0.09932205826044083,
0.15244190394878387,
-0.2715969383716583,
0.08532693982124329,
-0.3139767646789551,
-0.5498500466346741,
0.3231582045555115,
0.3696596920490265,
-0.26231133937835693,
0.168426245450... | |
and Tibco. Webmethods won out based on licensing and capability, though BizTalk and Netweaver both had very high marks.
Jitterbit was not part of the evaluation - in fact I had to look it up to be sure I understood your question.
If your goal is just to be able to call an RFC, the .NET SAP connector works well.
If y... | [
0.4362325072288513,
0.09398762881755829,
-0.02513069473206997,
0.20683111250400543,
-0.4681706130504608,
-0.347494512796402,
-0.04398958012461662,
-0.11466958373785019,
-0.30699461698532104,
-0.41290873289108276,
0.03157074749469757,
0.48263436555862427,
-0.3293668031692505,
0.172913342714... | |
coding.
My recommendation is to avoid Jitterbug and Mule for the enterprise for now - unless Open Source is actually a popular thing at your place of employment. Netweaver and BizTalk are very robust, polished products.
If you are looking for something you can ship easily, then Jitterbug may make more sense. Though g... | [
1.1284942626953125,
0.050125665962696075,
-0.31001123785972595,
0.3392913341522217,
-0.02240368165075779,
-0.3404465615749359,
-0.09975980222225189,
0.30859386920928955,
-0.16456788778305054,
-0.6922584176063538,
-0.15472182631492615,
0.5608716607093811,
-0.284705251455307,
-0.061286494135... | |
I'm using HTTPService with a POST operation to submit a Base64 encoded file (taken from bitmap data within the app) but I could really do with getting some idea of the progress of the POST operation (e.g. like the FileReference.upload()).
I don't think this is possible, but it would be awesome if it is (via any means,... | [
0.4293597638607025,
-0.12172576785087585,
0.3466283679008484,
0.20424126088619232,
-0.17441202700138092,
-0.26476189494132996,
0.4068986475467682,
0.0847674310207367,
-0.07124042510986328,
-0.7246546149253845,
-0.1237504705786705,
0.725976288318634,
-0.35047996044158936,
0.3366241455078125... | |
var req : URLRequest = new URLRequest("PUT YOUR URL HERE")
var loader : URLLoader = new URLLoader();
var params : URLVariables = new URLVariables();
params.WHATEVER = WHATEVER YOU WANT IT TO BE;
req.data = params;
req.method = URLRequestMethod.POST;
loader.addEventListener(ProgressEvent.PR... | [
0.15532171726226807,
0.05389978364109993,
0.9922698140144348,
-0.019929414615035057,
-0.24579797685146332,
0.15220868587493896,
0.5691635012626648,
-0.4069473147392273,
-0.34184882044792175,
-0.47128555178642273,
-0.3596501350402832,
0.4660983085632324,
-0.23675735294818878,
0.437432110309... | |
actionscript and use the above code. | [
0.051519159227609634,
-0.024022873491048813,
0.2900046110153198,
-0.05802459642291069,
-0.3143438398838043,
-0.21529553830623627,
0.2150428742170334,
0.04686006158590317,
-0.09625784307718277,
-0.6231402158737183,
-0.5993880033493042,
0.49219128489494324,
-0.5281757712364197,
-0.3178264796... | |
We have a custom section in my app.config file related to our IoC container class. How can I get intellisense when editing the config file for this section, as well as getting rid of the compiler messages informing me of the missing schema.
I found this question here: [app.config configSections custom settings can not... | [
0.0824967697262764,
0.2688746452331543,
0.13284187018871307,
0.2565917670726776,
0.1251985877752304,
-0.0072478679940104485,
0.38096433877944946,
-0.13295325636863708,
-0.2754727005958557,
-0.523736834526062,
-0.2141502946615219,
0.447924941778183,
-0.350137323141098,
0.08383599668741226,
... | |
xmlns attribute before running the application. Is that really the only/best way?
Here is an example of a simple file:
```
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
<section name="ServiceContainers"
type="LVK.IoC.RegistrationsSectionHandler, LVK"/>
</configSections>
<S... | [
-0.22178733348846436,
-0.16785776615142822,
0.4358998239040375,
0.03399784862995148,
-0.05968630313873291,
-0.28042176365852356,
-0.01603720150887966,
-0.16390176117420197,
-0.18310685455799103,
-0.9042794108390808,
-0.21270568668842316,
0.19834767282009125,
-0.08945772796869278,
0.0079087... | |
attributes for it.
XML Intellisense will not automatically work for a custom configuration section.
Visual Studio may report warnings on compilation complaining that the attributes of the custom configuration section are not defined. These warnings may be ignored.
If you want XML IntelliSense support for a custom c... | [
0.1361333429813385,
-0.09720158576965332,
0.47406381368637085,
0.012026471085846424,
-0.08820817619562149,
-0.09570657461881638,
-0.007045535836368799,
-0.05163418874144554,
-0.12651114165782928,
-0.9007739424705505,
-0.08917281776666641,
0.6035273671150208,
-0.21911154687404633,
-0.271085... | |
directory in the Xml\Schemas subdirectory. | [
-0.30726996064186096,
0.13856203854084015,
0.3182775676250458,
0.06649421900510788,
0.2058621048927307,
-0.26356184482574463,
-0.2012489140033722,
0.15848560631275177,
-0.11219026893377304,
-0.8033583164215088,
-0.5869584679603577,
0.15200167894363403,
-0.560551106929779,
0.220743045210838... | |
I've downloaded the svntask for ant from tigris.org, so it is the "official" one.
I have a simple task to update my entire project
```
<target name="prepare">
<svn username="user" password="pass">
<update>
<fileset dir="."/>
</update>
</svn>
</target>
```
Running ... | [
0.21637484431266785,
0.09998249262571335,
0.6532806754112244,
-0.1763891577720642,
-0.3152849078178406,
-0.046820010989904404,
0.6878911852836609,
0.0630226731300354,
0.038251277059316635,
-0.9643299579620361,
-0.05896184593439102,
0.4118223786354065,
-0.25432589650154114,
-0.1436469703912... | |
no updates to bring down from the server)
I've also tried chaning the method that svntask uses to interface with subversion, I've tried both the svnkit method and the command line method.
Any ideas why this may be taking so long? Obviously this is unacceptably slow.
Thanks
By using the nested `<fileset>` the command... | [
0.299025297164917,
-0.20345669984817505,
0.7482420206069946,
0.10503119975328445,
-0.31072133779525757,
-0.21813246607780457,
0.5463154315948486,
0.22829431295394897,
-0.27712130546569824,
-0.8159664869308472,
-0.1745849847793579,
0.9012981057167053,
-0.3494970202445984,
0.1199068352580070... | |
</svn>
```
And, if that doesn't work, turn on `-verbose` or `-debug` and see if you can get more information about what is happening during the task. | [
-0.02462134137749672,
-0.0009595454321242869,
0.12068919092416763,
0.0829830914735794,
-0.13935261964797974,
-0.2765420079231262,
0.3771297037601471,
0.6207987666130066,
-0.13434447348117828,
-0.7560791969299316,
-0.6697712540626526,
0.6264393329620361,
0.0027579618617892265,
-0.0341216325... | |
I’m working on an in-house app that tracks a bunch of tasks. I wanted to have a simple task monitor that would list the task name and the task’s status. I need this to look just a little nice, I’m no designer so whatever I do is going to suck, but a basic text display won’t work for the project requirements.
What I am... | [
0.5481146574020386,
0.04237073287367821,
0.2246948778629303,
0.20305226743221283,
0.18061880767345428,
-0.03592320531606674,
0.12140373885631561,
0.1489478349685669,
-0.23956887423992157,
-0.7970447540283203,
0.3585954010486603,
0.7511342167854309,
-0.23762217164039612,
-0.0967591926455497... | |
the ‘progress panels’ is selectable. So to implement this I thought it would be simple to just use a list of JPanels each with a JProgressBar and a JLabel, each of which can just accept focus to determine if it and others are selected. I thought this was going to be an easy task, but if I use a JList it just displays t... | [
0.09293310344219208,
-0.2540111243724823,
0.4151086211204529,
0.27861398458480835,
-0.42202675342559814,
-0.04943035542964935,
0.048559755086898804,
-0.1382683366537094,
-0.3590344786643982,
-0.696953296661377,
-0.2942247688770294,
0.3043341040611267,
-0.3303500711917877,
-0.25292241573333... | |
that I just have not found? Or is there a better method for doing this? I don’t want to re-invent the wheel, but I thought this was just going to be simple.
It sounds like what you may be looking for is an [`JList`](http://java.sun.com/javase/6/docs/api/javax/swing/JList.html).
You can add your items to the `JList`'s ... | [
0.34388694167137146,
0.02378031052649021,
0.47459036111831665,
-0.013678534887731075,
0.0017213301034644246,
0.08970959484577179,
-0.05481162294745445,
-0.2126844972372055,
-0.4523508846759796,
-0.34457841515541077,
-0.22350633144378662,
0.42527127265930176,
-0.05737505853176117,
0.2636635... | |
to make your custom `ListCellRenderer` be able to display your "task" in the `JList` the way you want to have it show on the `JList`.
Take a look into the [Writing a Custom Cell Renderer](http://java.sun.com/docs/books/tutorial/uiswing/components/list.html#renderer) section from the [How to Use Lists](http://java.sun.... | [
0.2799566686153412,
-0.1713351607322693,
0.5906633138656616,
-0.22289595007896423,
-0.29376065731048584,
0.08055155724287033,
0.16556940972805023,
-0.5378325581550598,
-0.4432620406150818,
-0.5844225883483887,
-0.19515091180801392,
0.6751629114151001,
-0.23356276750564575,
-0.2404492050409... | |
instantiate your `JPanel` in this method and return it as the `Component`. | [
-0.06971554458141327,
-0.3469967246055603,
0.08399778604507446,
0.27171260118484497,
-0.35995617508888245,
-0.18011389672756195,
0.018693022429943085,
0.16058997809886932,
0.171109139919281,
-0.31665122509002686,
-0.2688334882259369,
0.2691289484500885,
-0.34885650873184204,
0.004610380157... | |
I have two arrays containing the same elements, but in different orders, and I want to know the extent to which their orders differ.
The method I tried, didn't work. it was as follows:
For each list I built a matrix which recorded for each pair of elements whether they were above or below each other in the list. I th... | [
0.30595868825912476,
0.20967471599578857,
0.1455373764038086,
-0.26191776990890503,
-0.3279024064540863,
0.3307778537273407,
-0.09213309735059738,
-0.6513473987579346,
-0.4138917326927185,
-0.3933376967906952,
0.34453636407852173,
0.2448180913925171,
-0.6871629357337952,
0.0721990987658500... | |
1:
1 2 3 4
1 1 1 1
2 1 1
3 1
4
list 2:
1 2 3 4
1 1 1 1
2 0 1
3 1
4
```
Since the only difference is the order of elements 2 and 3, these should be deemed to be very similar. The Pearson Correlation Coefficient for those two matrices is 0, suggesting they are not correlated at all. I gue... | [
0.38725847005844116,
0.16130436956882477,
0.19113418459892273,
-0.23268742859363556,
-0.33219724893569946,
-0.07531192153692245,
0.04044914245605469,
-0.6035528182983398,
-0.18195253610610962,
-0.1851155310869217,
0.2023209035396576,
-0.1569943130016327,
-0.5251251459121704,
0.124858602881... | |
correlation coefficient, but some other kind of similarity measure. Edit distance, perhaps?
Can anyone suggest anything better?
Mean square of differences of indices of each element.
```
List 1: A B C D E
List 2: A D C B E
```
Indices of each element of List 1 in List 2 (zero based)
```
A B C D E
0 3 2 1 4
```
I... | [
0.10430315881967545,
0.17557327449321747,
0.48406338691711426,
0.10442063957452774,
-0.46674996614456177,
0.03320634737610817,
-0.08320654928684235,
-0.48123079538345337,
-0.05452178791165352,
-0.3911456763744354,
0.39186719059944153,
0.4727088510990143,
-0.35466477274894714,
0.44763302803... | |
suppose I declare a dynamic array like
```
int *dynArray = new int [1];
```
which is initialized with an unknown amount of int values at some point.
How would I iterate till the end of my array of unknown size?
Also, if it read a blank space would its corresponding position in the array end up junked?
Copying Inp... | [
0.03159729018807411,
-0.28731879591941833,
0.051039136946201324,
-0.10901167243719101,
0.043131023645401,
-0.061303894966840744,
0.36372652649879456,
-0.1172846257686615,
-0.1338331699371338,
-0.3124726712703705,
-0.16984710097312927,
0.3542024493217468,
-0.45597603917121887,
0.19731545448... | |
int lineSize = line.size();
const char *aux;
aux=line.data();
int index=0;
while (index<=lineSize){
mySynonyms[index]=aux[index];
index++;
}
```
I thought that the array aux would end up junked if there was a large blank space between the two number... | [
-0.05647626146674156,
-0.2970161437988281,
0.25468629598617554,
-0.1423439234495163,
0.13950923085212708,
0.3458350598812103,
0.5946500301361084,
-0.1392579823732376,
-0.19493012130260468,
-0.35747942328453064,
-0.20366181433200836,
0.3936749994754791,
-0.36219722032546997,
0.0672360733151... | |
was wondering if there was a way to iterate till an undefined end in this type of array. Thanks for you answers.
No portable way of doing this. Either pass the size together with the array, or, better, use a standard container such as `std::vector` | [
0.4610329270362854,
-0.23223313689231873,
0.13661600649356842,
0.29300031065940857,
-0.19204550981521606,
0.1729440689086914,
0.012142722494900227,
0.15104113519191742,
-0.47294843196868896,
-0.46709543466567993,
0.12466269731521606,
0.46390998363494873,
-0.1410260796546936,
0.035434145480... | |
I have this:
```
If String.IsNullOrEmpty(editTransactionRow.pay_id.ToString()) = False Then
stTransactionPaymentID = editTransactionRow.pay_id 'Check for null value
End If
```
Now, when `editTransactionRow.pay_id` is Null Visual Basic throws an exception. Is there something wrong with this code?
If you are using... | [
0.15437430143356323,
0.1670401692390442,
0.35242801904678345,
-0.23716965317726135,
-0.10709064453840256,
-0.33749762177467346,
0.28239232301712036,
-0.3763037323951721,
0.14409838616847992,
-0.6639273762702942,
-0.20102286338806152,
0.6674425005912781,
-0.3454146981239319,
0.0905339494347... | |
'Abbreviated for clarity
End Property
```
The GetValue method is returning DBNull which cannot be converted to a short. | [
0.022102810442447662,
-0.1513211876153946,
0.3747822046279907,
-0.08727993071079254,
-0.3133860230445862,
-0.273775190114975,
0.3054705560207367,
0.06702929735183716,
0.3558334708213806,
-0.33289337158203125,
-0.673515796661377,
0.6262142658233643,
-0.18161030113697052,
0.12396544218063354... | |
How do you round a Double down to the nearest integer in VB .NET?
This is pretty old, but the accepted answer of using `Math.Truncate` is technically incorrect: Truncate rounds *towards zero*, not down. For example, -1.5 is rounded to -1 instead of -2.
In order to always round *down*, use `Math.Floor`. | [
0.22063124179840088,
-0.18323293328285217,
0.3273453414440155,
0.0025107478722929955,
-0.2133277803659439,
-0.022983109578490257,
0.19928023219108582,
-0.3527878224849701,
-0.5603971481323242,
-0.24656011164188385,
-0.018155619502067566,
0.11465271562337875,
-0.21251001954078674,
-0.058227... | |
I have a Windows application written in C++ that occasionally evaporates. I use the word evaporate because there is nothing left behind: no "we're sorry" message from Windows, no crash dump from the Dr. Watson facility...
On the one occasion the crash occurred under the debugger, the debugger did not break---it showed... | [
0.3282936215400696,
0.4373408257961273,
0.1211516335606575,
0.010106431320309639,
-0.007356112357228994,
0.09324191510677338,
0.45895156264305115,
0.09684065729379654,
-0.2900013327598572,
-0.5273868441581726,
-0.22140993177890778,
0.3001374304294586,
-0.36242949962615967,
0.32187864184379... | |
for exceptions and a full dump if the application crashes. | [
0.29322192072868347,
-0.08775074034929276,
-0.04643845558166504,
0.11772415786981583,
0.30802837014198303,
-0.5786489844322205,
0.3800649046897888,
0.18782125413417816,
-0.32408806681632996,
-0.24726104736328125,
-0.7373473644256592,
0.22182519733905792,
-0.295551061630249,
-0.105726994574... | |
I have developed a build system on MSBuild (NET 3.0) and cc.net to perform continuous integration builds of a Visual Studio 2008 application, however a developer on the team recently added a VSTS unit test project to the mix. Is there any SDK or add-in provided by microsoft to allow this to be compiled on a non-team sy... | [
0.5917550325393677,
0.2192552387714386,
-0.10353710502386093,
-0.14581799507141113,
-0.2122674584388733,
-0.20648710429668427,
0.30378982424736023,
-0.31622976064682007,
-0.08435989171266556,
-0.5920842885971069,
0.03414914011955261,
0.7283294200897217,
0.07306303083896637,
-0.040790062397... | |
why many people choose something like [NUnit](http://www.nunit.org), [xUnit.NET](http://www.codeplex.com/xunit) or [MbUnit](http://www.mbunit.com/) over MSTest. | [
0.2861984968185425,
-0.22890165448188782,
0.025937935337424278,
0.22289752960205078,
-0.2508671283721924,
0.1760266274213791,
0.11507643014192581,
0.299911767244339,
-0.22412553429603577,
-0.6143226623535156,
0.044249676167964935,
0.20167572796344757,
-0.36481496691703796,
0.16058281064033... | |
I'm trying to resize dynamically a `CMFCPropertySheet` to add a custom control at the bottom of each page.
As all Property Pages are not of the same height, I have a mechanism to increase the size if necessary.
For this, I have overridden the `OnActivatePage` method and by using `SetWindowPos`, I can resize the sheet,... | [
0.06750941276550293,
-0.09663678705692291,
0.9429110884666443,
-0.04122294485569,
0.09810929000377655,
0.005292072892189026,
0.23413313925266266,
-0.19671761989593506,
-0.2085745483636856,
-0.5352082252502441,
-0.04488024115562439,
0.5517287254333496,
-0.21064308285713196,
0.15830139815807... | |
the sheet.
OneNote style [OneNote http://www.freeimagehosting.net/uploads/th.ec91600664.jpg](http://www.freeimagehosting.net/uploads/th.ec91600664.jpg)
Outlook style [Outlook http://www.freeimagehosting.net/uploads/th.319b6938ab.jpg](http://www.freeimagehosting.net/uploads/th.319b6938ab.jpg)
Any idea? A MFC Feature ... | [
0.3189972937107086,
-0.009078777395188808,
0.11871878057718277,
0.21805182099342346,
-0.3977032005786896,
-0.049370914697647095,
0.2648240029811859,
-0.26670515537261963,
-0.05412568897008896,
-0.523952305316925,
0.013960565440356731,
0.4353156089782715,
-0.1472366899251938,
-0.09308050572... | |
Apparently I can't move files on different volumes using Directory.Move.
I have read that I have to copy each file individually to the destination, then delete the source directory.
Do I have any other option?
Regardless of whether or not Directory.Move (or any other function) performed the move between volumes, it w... | [
0.100006103515625,
0.10915157943964005,
0.6200740337371826,
0.20702409744262695,
0.23086856305599213,
0.027211079373955727,
-0.13610102236270905,
-0.25104600191116333,
-0.43905603885650635,
-0.6570013761520386,
-0.04458019882440567,
0.5628045201301575,
0.030068574473261833,
0.3823557794094... | |
perform a move, or copy+delete when necessary. | [
-0.16550569236278534,
-0.10146339237689972,
-0.09752468764781952,
0.1125410720705986,
0.11534853279590607,
-0.26708900928497314,
0.4257458746433258,
0.04377166926860809,
0.11541024595499039,
-0.2978624403476715,
-0.7566056251525879,
0.33583593368530273,
-0.38647088408470154,
-0.18128722906... | |
I'm running on win2003 server, PHP 526, via the cmd-line.
I have a cmdline string:
```
$cmd = ' "d:\Prog Files\foo.exe" -p "d:\data path\datadir" ';
```
Trying to do this in php code
```
$out = `$cmd`; # note use of backticks AKA shell_exec
```
results in a failure by foo.exe as it interprets the -p ar... | [
-0.015214957296848297,
0.4664676785469055,
0.4986901581287384,
-0.05249444767832756,
0.0839761346578598,
0.027364587411284447,
0.39267468452453613,
-0.09503839164972305,
-0.0022302621509879827,
-0.8212215304374695,
0.08229610323905945,
0.43089231848716736,
-0.344477117061615,
0.23356445133... | |
your platform (I'm guessing you're on Windows). | [
0.31749650835990906,
0.04854319244623184,
0.209457129240036,
0.4745352864265442,
-0.07367534190416336,
-0.07572464644908905,
-0.06953772157430649,
0.09451135993003845,
-0.4018476903438568,
-0.7159959673881531,
0.14422014355659485,
0.8599869608879089,
0.3838355243206024,
-0.1173441931605339... | |
[BCL](http://msdn.microsoft.com/en-us/netframework/aa569603.aspx)
Specifically, am I breaking the EULA by doing this?
Why bother using reflector? [Just look at the original source code](http://weblogs.asp.net/scottgu/archive/2008/01/16/net-framework-library-source-code-now-available.aspx)!
After more research, I foun... | [
0.5328290462493896,
0.3562529385089874,
0.3416416049003601,
-0.0584351122379303,
-0.02061544358730316,
-0.6175644993782043,
0.31083860993385315,
-0.1492605060338974,
-0.03207409381866455,
-0.07485233247280121,
-0.34482434391975403,
0.24129383265972137,
-0.17087334394454956,
0.4207576215267... | |
appears that technically it is not legal to look at the .NET Framework source code via Reflector. Even though you can look at the original code... an interesting paradox. | [
0.668068528175354,
0.22160986065864563,
0.29534855484962463,
0.08488142490386963,
-0.05304776877164841,
-0.5529112219810486,
0.463544636964798,
-0.00030245183734223247,
-0.13976144790649414,
-0.43608590960502625,
0.06095694750547409,
0.6153255701065063,
-0.13460007309913635,
0.283875405788... | |
How can you join between a table with a sparse number of dates and another table with an exhaustive number of dates such that the gaps between the sparse dates take the values of the previous sparse date?
Illustrative example:
```
PRICE table (sparse dates):
date itemid price
2008-12-04 1 $1
2008-12-11... | [
-0.2674832344055176,
0.13143229484558105,
0.44503623247146606,
0.08646737784147263,
-0.08437127619981766,
-0.07361045479774475,
0.005427235271781683,
-0.2277972549200058,
-0.25936493277549744,
-0.3614738881587982,
-0.18879446387290955,
0.49989572167396545,
0.15112072229385376,
0.5071631669... | |
12345
2008-12-05 1 23456
2008-12-08 1 34567
2008-12-09 1 ...
2008-12-10 1
2008-12-11 1
2008-12-12 1
2008-12-15 1
2008-12-16 1
2008-12-17 1
2008-12-18 1
```
Desired result:
```
date price volume_amt
2008-12-04 $1 12345
2008-12-05 $1 23456
2008-12-08 $1 34567
20... | [
0.052958618849515915,
0.06880977004766464,
0.4644968509674072,
0.18405187129974365,
-0.24291804432868958,
-0.033755481243133545,
0.14491522312164307,
-0.72718745470047,
0.14007794857025146,
-0.13362187147140503,
-0.278873085975647,
0.5664768218994141,
0.027687784284353256,
-0.1147531643509... | |
correlated subquery that accomplishes the desired result. (Correlated subquery = a subquery that contains a reference to the outer query.)
This will work; however, I should have noted that the platform I'm using is MySQL, for which correlated subqueries are poorly optimized. Any way to do it without using a correlated... | [
-0.08613169938325882,
-0.12574425339698792,
0.46282142400741577,
0.37363946437835693,
-0.21647655963897705,
0.09413349628448486,
-0.26024138927459717,
-0.26113834977149963,
0.19434016942977905,
-0.43370798230171204,
0.2068587690591812,
0.5262514352798462,
-0.2849978506565094,
0.26849469542... | |
p1.item_id)
LEFT OUTER JOIN Price p2
ON (v.`date` >= p2.`date` AND v.item_id = p2.item_id
AND p1.`date` < p2.`date`)
WHERE p2.item_id IS NULL;
```
This query matches Volume to all rows in Price that are earlier, and then uses another join to make sure we find only the most recent price.
I tested this on MySQL ... | [
-0.12689577043056488,
-0.18681135773658752,
0.6404760479927063,
0.047371964901685715,
-0.10168971121311188,
0.37720543146133423,
-0.290178507566452,
-0.4543750286102295,
-0.020732542499899864,
-0.7121940851211548,
0.027824878692626953,
0.5957189202308655,
0.07424185425043106,
0.45634564757... | |
`(item_id, date)` may be better in this case. Here's the EXPLAIN output for that:
```
+----+-------------+-------+------+---------------+---------+---------+-----------------+------+--------------------------------------+
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | ... | [
-0.3308321237564087,
0.2737012803554535,
0.6493542790412903,
0.19350267946720123,
0.06528404355049133,
-0.18099117279052734,
0.15422022342681885,
-0.4052610993385315,
-0.1139504536986351,
-0.6192747354507446,
-0.46802130341529846,
0.3712654709815979,
-0.17272664606571198,
0.137038126587867... | |
| NULL | NULL | NULL | 6 | |
| 1 | SIMPLE | v | ref | item_id | [
-0.1312258541584015,
0.152159184217453,
0.2644202411174774,
-0.031820718199014664,
-0.10943712294101715,
-0.1344175934791565,
0.15781168639659882,
-0.507396936416626,
-0.14128893613815308,
-0.09698548913002014,
-0.43488097190856934,
0.3984515964984894,
-0.5175775289535522,
0.24387519061565... | |
| item_id | 22 | test.p1.item_id | 3 | Using where |
| 1 | SIMPLE | p2 | ref | item_id | item_id | 22 | test.v.item_id | 1 | Using where; Using index; Not exists |
+----+-------------+-------+------+---------------+---------+---------+-----------------+------+... | [
-0.20967845618724823,
0.22194603085517883,
0.3746681213378906,
0.008241291157901287,
-0.1251901239156723,
-0.012793166562914848,
0.5883893370628357,
-0.45652681589126587,
-0.19006229937076569,
-0.30145734548568726,
-0.3704013526439667,
0.3795233964920044,
-0.3007941246032715,
0.18262708187... | |
very small data set, and the optimization may depend on larger data sets. You should experiment, analyzing the optimization using a larger data set.
**edit:** I pasted the wrong EXPLAIN output before. The one above is corrected, and shows better use of the `(item_id, date)` index. | [
0.14421021938323975,
-0.06799240410327911,
-0.01818958669900894,
0.35520386695861816,
0.1762532889842987,
-0.05626605078577995,
0.2860919237136841,
0.05529027432203293,
0.05305713787674904,
-0.7353073954582214,
-0.20433957874774933,
0.2527078688144684,
-0.35050374269485474,
0.1391860544681... | |
In a previous SO question, it was mentioned that USB devices can be mounted using the following approach in Windows:
MOUNTVOL C:\USB: \\?\Volume{ebc79032-5270-11d8-a724-806d6172696f}\
My question is what is that String starting with \\?\Volume called, and what is the best way to retrieve that. I would rather not use ... | [
0.343646377325058,
-0.3028396666049957,
0.39842909574508667,
0.1818365901708603,
0.08555614948272705,
-0.3551618754863739,
-0.257142037153244,
-0.4006848633289337,
-0.395853728055954,
-0.4906892776489258,
-0.10490617901086807,
0.9043117165565491,
-0.29515284299850464,
0.0651407316327095,
... | |
be straightforward. Actually mounting the device should NOT be straightforward since Java (and .NET) are both designed to abstract away the hardware.
I recommend that you pick a more appropriate tool for this. Either choose to simply invoke another process to run the mount command (knowing that it won't be portable), ... | [
0.5473452210426331,
0.12991909682750702,
0.2688435912132263,
0.0897713229060173,
0.05541075021028519,
-0.32979410886764526,
0.12404486536979675,
-0.5245136022567749,
-0.1475173830986023,
-0.3488785922527313,
-0.09509401768445969,
1.1814374923706055,
-0.19378870725631714,
-0.316570729017257... | |
OS. So, yes, including a private JVM install is viable and perhaps desirable.
NOTE: The question includes the mount command for the USB device, which tends to emphasize that aspect as a primary requirement. | [
0.24494019150733948,
0.09500045329332352,
0.5123409628868103,
0.06006572023034096,
0.21048909425735474,
-0.5435271859169006,
0.0817539244890213,
-0.09861987084150314,
0.034537214785814285,
-0.42167529463768005,
-0.44446665048599243,
1.0082168579101562,
-0.22058448195457458,
-0.140063747763... | |
I am writing a DLL with mixed C/C++ code. I want to specify the ordinals of the functions I'm exporting. So I created a .DEF file that looks like this
```
LIBRARY LEONMATH
EXPORTS
sca_alloc @1
vec_alloc @2
mat_alloc @3
sca_free @4
vec_free @5
mat_free @6
...
```
I would... | [
0.37278562784194946,
0.039382077753543854,
0.25186431407928467,
-0.16386058926582336,
-0.2711261510848999,
-0.01935710944235325,
-0.12933100759983063,
-0.11785654723644257,
-0.23357735574245453,
-0.6233998537063599,
-0.18857704102993011,
0.43536704778671265,
-0.5848882794380188,
0.01565250... | |
Walker to add the mangled names of my functions to the .DEF file:
```
??0CScalar@@QAE@XZ @25
??0CScalar@@QAE@O@Z @26
??0CScalar@@QAE@ABV0@@Z @27
??1CScalar@@QAE@XZ @28
```
But this has failed. Any ideas why this could be happening?
---
**EDIT:** kauppi made a good observation, so I'm ... | [
-0.025213949382305145,
0.21907778084278107,
0.11479749530553818,
0.07332776486873627,
-0.00640246644616127,
0.22098663449287415,
0.6244527697563171,
-0.34138140082359314,
-0.1582745760679245,
-0.5580432415008545,
0.3444637656211853,
0.39781293272972107,
-0.5599498152732849,
0.0328723974525... | |
call exported C++ functions from C code.
Well, I don't have experience with ordinals (which look like some ugly, compiler-specific thing), but I can help you with making C++/C code compatible.
Suppose, in C++, that your header file looks like this:
```
class MyClass
{
void foo(int);
int bar(int);
double b... | [
0.383998304605484,
-0.13651135563850403,
0.41395682096481323,
-0.3268962502479553,
-0.2892138361930847,
-0.21759717166423798,
0.03529653325676918,
0.046579305082559586,
-0.007819633930921555,
-0.32243502140045166,
-0.026583729311823845,
0.7054739594459534,
-0.7683179378509521,
0.0800196528... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.