text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
+ "', now " + b);
// Test Underflow
// System.out.println("Got '" + b.get() + "', now " + b);
// Back to start, let's shift on one
b.add("Foo");
b.get();
}
}
}
``` | [
0.3109889626502991,
0.15962430834770203,
0.261953741312027,
-0.4796423614025116,
0.07942777127027512,
-0.0854601114988327,
0.2586480677127838,
-0.3374851644039154,
0.05986815318465233,
-0.3280080556869507,
-0.33602175116539,
0.6650388240814209,
-0.422102153301239,
0.15592218935489655,
0.... | |
I want to find the highest AutoIncremented value from a field. (its not being fetched after an insert where I can use `@@SCOPE_IDENTITY` etc)
Which of these two queries would run faster or gives better performance.
`Id` is the primary key and `autoincrement` field for `Table1`. And this is for Sql Server 2005.
```
SE... | [
-0.1405988335609436,
0.04487460479140282,
0.4591464400291443,
0.06450799852609634,
-0.11117132753133774,
-0.06987778842449188,
-0.07106149941682816,
-0.2229287028312683,
-0.10067757964134216,
-0.4404325485229492,
0.026395801454782486,
0.9385431408882141,
-0.31224149465560913,
-0.0081365015... | |
the performance would be affected if
1. Id is a clustered index + primary key.
2. Id is a clustered index and not primary key.
3. Id is a non clustered index ASC + primary key.
4. Id is a non clustered index ASC and not primary key.
5. Id is a non clustered index DESC + primary key.
6. Id is a non cl... | [
0.04893646761775017,
-0.25919127464294434,
0.21186423301696777,
0.5351091623306274,
0.26473602652549744,
0.11694872379302979,
0.1299087554216385,
-0.19663500785827637,
-0.004949834663420916,
-0.6126813888549805,
-0.22708387672901154,
0.7129713892936707,
-0.3290647268295288,
0.0792921558022... | |
practice,
```
SELECT TOP 1 Id FROM Table1 ORDER BY Id DESC
```
will more probably use a `PRIMARY KEY INDEX`.
Also, this one is more extendable if you will decide to select some else column along with `id`.
An actual plan on `MAX()` says:
```
SELECT <- AGGREGATE <- TOP <- CLUSTERED INDEX SCAN
```
, while plan fo... | [
0.05574952811002731,
0.0679599940776825,
0.2358977198600769,
0.0935707613825798,
-0.12693539261817932,
0.2686697840690613,
0.026509856805205345,
-0.18393751978874207,
-0.2826261818408966,
-0.46963128447532654,
-0.12736283242702484,
0.4306979179382324,
-0.3759845197200775,
0.058346319943666... | |
rows
SET LANGUAGE ENGLISH
SET STATISTICS TIME ON
SET STATISTICS IO ON
PRINT 'MAX'
SELECT MAX(id) FROM master
PRINT 'TOP 1'
SELECT TOP 1 id FROM master ORDER BY id DESC
PRINT 'MAX'
SELECT MAX(id) FROM master
PRINT 'TOP 1'
SELECT TOP 1 id FROM master ORDER BY id DESC
PRINT 'MAX'
SELECT MAX(id) FROM master
PRINT 'TOP 1'
... | [
-0.3377484083175659,
-0.13673411309719086,
0.5537938475608826,
-0.0349920280277729,
-0.19740627706050873,
0.47372955083847046,
0.1580386906862259,
-0.3337540328502655,
-0.05585167184472084,
-0.5646181106567383,
-0.33416858315467834,
0.6318698525428772,
-0.32098615169525146,
-0.178054332733... | |
time = 1 ms.
SQL Server Execution Times:
CPU time = 0 ms, elapsed time = 1 ms.
SQL Server Execution Times:
CPU time = 0 ms, elapsed time = 1 ms.
MAX
SQL Server Execution Times:
CPU time = 0 ms, elapsed time = 20 ms.
(строк обработано: 1)
Table 'master'. Scan count 3, logical reads 32655, physical reads ... | [
-0.45289650559425354,
0.02319655939936638,
0.7991089820861816,
-0.010166722349822521,
0.23223404586315155,
0.17664223909378052,
0.3438444137573242,
-0.14535680413246155,
-0.5138372778892517,
-0.22540518641471863,
-0.18713383376598358,
0.37907272577285767,
-0.17810578644275665,
-0.083560571... | |
CPU time = 0 ms, elapsed time = 1 ms.
(строк обработано: 1)
Table 'master'. Scan count 3, logical reads 32655, physical reads 0, read-ahead reads 2, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.
SQL Server Execution Times:
CPU time = 6813 ms, elapsed time = 3449 ms.
MAX
SQL Server Execution... | [
-0.27095603942871094,
0.08102162182331085,
0.7809522747993469,
0.03488048538565636,
0.23996606469154358,
0.34152403473854065,
0.28147587180137634,
-0.3390190899372101,
-0.4200970232486725,
-0.27313143014907837,
-0.15613827109336853,
0.3844461739063263,
-0.047626297920942307,
0.020441362634... | |
Times:
CPU time = 5359 ms, elapsed time = 2714 ms.
TOP 1
SQL Server Execution Times:
CPU time = 0 ms, elapsed time = 1 ms.
(строк обработано: 1)
Table 'master'. Scan count 3, logical reads 32655, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.
SQL Serv... | [
-0.5230376124382019,
-0.04127024486660957,
0.7851793766021729,
0.12267576158046722,
0.23496702313423157,
0.23871034383773804,
0.3785378038883209,
-0.15502174198627472,
-0.43546420335769653,
-0.287297785282135,
-0.22446198761463165,
0.41232022643089294,
-0.09719327837228775,
-0.036042347550... | |
reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.
SQL Server Execution Times:
CPU time = 5406 ms, elapsed time = 2726 ms.
TOP 1
SQL Server Execution Times:
CPU time = 0 ms, elapsed time = 1 ms.
(строк обработано: 1)
Table 'master'. Scan count 3, logical reads 326... | [
-0.4115464389324188,
0.1363372951745987,
0.6928483247756958,
-0.10550402104854584,
0.24614669382572174,
0.3147992789745331,
0.2617543339729309,
-0.19531747698783875,
-0.3515334129333496,
-0.32047775387763977,
-0.19901901483535767,
0.2782790958881378,
-0.06329594552516937,
-0.00485901534557... | |
= 0 ms, elapsed time = 1 ms.
(строк обработано: 1)
Table 'master'. Scan count 3, logical reads 32655, physical reads 0, read-ahead reads 85, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.
SQL Server Execution Times:
CPU time = 5392 ms, elapsed time = 2709 ms.
TOP 1
SQL Server Execution Times... | [
-0.5016041398048401,
0.07615037262439728,
0.7468500733375549,
0.047072116285562515,
0.2106589376926422,
0.26782071590423584,
0.2977711856365204,
-0.2945720851421356,
-0.5122283101081848,
-0.051411498337984085,
-0.2855752110481262,
0.20255862176418304,
-0.1403084099292755,
-0.02664494514465... | |
CPU time = 6766 ms, elapsed time = 3387 ms.
MAX
SQL Server Execution Times:
CPU time = 0 ms, elapsed time = 1 ms.
(строк обработано: 1)
Table 'master'. Scan count 3, logical reads 32655, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.
SQL Server Execution... | [
-0.5259838104248047,
-0.009215550497174263,
0.7709773778915405,
0.1275044083595276,
0.23161977529525757,
0.24857671558856964,
0.30597013235092163,
-0.16387400031089783,
-0.4181253910064697,
-0.19105373322963715,
-0.17224252223968506,
0.40094515681266785,
-0.15793801844120026,
-0.0816241800... | |
read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.
SQL Server Execution Times:
CPU time = 6797 ms, elapsed time = 3494 ms.
``` | [
-0.3052598536014557,
0.1011565551161766,
0.46760520339012146,
-0.19983874261379242,
0.15381543338298798,
0.14605136215686798,
0.2638714015483856,
-0.1076277494430542,
-0.10994649678468704,
-0.46592384576797485,
-0.15730009973049164,
0.2643510699272156,
0.08189766854047775,
0.16678710281848... | |
Suppose you have a sorted range (x to y) of values in an array.
```
x = 3;
y = 11;
array == 3, 4, 5, 6, 7, 8, 9, 10, 11
```
But it is possible that some values are duplicated and some are missing, so you might have:
```
array == 4, 5, 5, 5, 7, 8, 9, 10, 10
```
What's the best way in your language to find all dup... | [
-0.22480306029319763,
0.15117239952087402,
0.2943938076496124,
-0.25548410415649414,
-0.04343780502676964,
0.22438876330852509,
0.33196622133255005,
-0.4302465617656708,
-0.3916383683681488,
-0.5561689734458923,
-0.05683393403887749,
0.32137396931648254,
-0.3178084194660187,
-0.14181211590... | |
int kFirstNumber = 3; // first number expected in array
int main()
{
vector<int> myVector;
// fill up vector, skip values at the beginning and end to check edge cases
for(int x = kFirstNumber + 5; x < kLastNumber - 5; x++)
{
if(x % 12 != 0 && x % 13 != 0 && x % 17 != 0)
myVecto... | [
-0.14714400470256805,
-0.5010852217674255,
0.7132371664047241,
-0.4493445158004761,
-0.041935473680496216,
0.3729826807975769,
0.3263653516769409,
-0.2654646039009094,
-0.16097892820835114,
-0.6790520548820496,
-0.16222843527793884,
0.23168903589248657,
-0.4002542197704315,
0.0882265567779... | |
else if(x % 9 == 0)
{
myVector.push_back(x); // add duplicates
myVector.push_back(x);
}
else if(x % 16 == 0)
{
myVector.push_back(x); // add multiple duplicates | [
0.12304342538118362,
0.17580322921276093,
0.39077457785606384,
0.0033190292306244373,
-0.10462680459022522,
0.5071468353271484,
0.2515992522239685,
0.05607130751013756,
-0.456100732088089,
-0.6070669889450073,
0.21442264318466187,
0.3527967035770416,
-0.5326225757598877,
0.3049128353595733... | |
myVector.push_back(x);
myVector.push_back(x);
myVector.push_back(x);
}
}
// put the results in here
vector<int> missingValues;
vector<int> duplicates;
// YOUR CODE GOES HERE
// validate missingValues for false positives
for(int x | [
-0.21775488555431366,
-0.002701693447306752,
0.5742706656455994,
-0.05969594419002533,
0.0010818886803463101,
0.22912009060382843,
0.34394851326942444,
-0.08272667974233627,
-0.1537044197320938,
-0.6627583503723145,
-0.09905404597520828,
0.3919120728969574,
-0.314225435256958,
0.2266231924... | |
= 0; x < (int) missingValues.size(); ++x)
{
if(binary_search(myVector.begin(), myVector.end(), missingValues.at(x)))
cout << "Oh noes! You missed an unmissed value. Something went horribly, horribly wrong.";
}
// validate duplicates (I think... errr)
vector<int>::iterator vecItr = m... | [
-0.05691074952483177,
0.007169906049966812,
0.2984919250011444,
0.0646706372499466,
0.19479140639305115,
0.3211117684841156,
0.2804131507873535,
-0.09766845405101776,
-0.5206782817840576,
-0.47821536660194397,
0.045601993799209595,
0.48987430334091187,
-0.35096532106399536,
0.4749281704425... | |
if(*vecItr != *dupItr)
cout << "Oh noes! Something went horribly, horribly wrong.";
// oh god
while(++dupItr != duplicates.end() && *(--dupItr) == *(++dupItr) && *vecItr == *(++vecItr));
++vecItr;
}
return 0;
}
```
I didn't test the validation parts much, so ... | [
0.3797558546066284,
0.2230759710073471,
0.15615792572498322,
0.0626089796423912,
0.15787601470947266,
0.028326693922281265,
0.6948220729827881,
-0.25570619106292725,
-0.1461677849292755,
-0.2975929379463196,
-0.021724456921219826,
0.444352924823761,
-0.11000589281320572,
0.1024853885173797... | |
them (especially with the duplicates one).
I will post my own solution as an answer.
Since you've marked it language-agnostic, here's the algorithm I'd use.
```
# Get numbers and sort them in ascending order.
input x,y;
input number[1..n];
sort number[1..n];
# Set dups and missing to empty sets.
dups = [];
missin... | [
-0.33554863929748535,
0.23052215576171875,
0.3049166202545166,
-0.04499739781022072,
-0.21565386652946472,
0.3973487913608551,
0.21105392277240753,
-0.5375404357910156,
-0.42560744285583496,
-0.8927650451660156,
-0.24891145527362823,
0.14186395704746246,
-0.5367769002914429,
0.081205688416... | |
.. n:
# If number same as last and not already in dups set, add it.
if number[i] == number[i-1] and not dups.contains(number[i]):
if number[i] >= x and number[i] <= y:
dups.add(number[i])
# If number not last number plus one, add all between the two
# to missing set.
if numb... | [
0.05579077824950218,
-0.06766070425510406,
0.0977216362953186,
-0.13943375647068024,
0.004785122349858284,
0.05792492255568504,
0.2655082046985626,
-0.4169105589389801,
-0.3589589595794678,
-0.4825635254383087,
-0.1936192661523819,
0.26865389943122864,
-0.47269776463508606,
0.0866141021251... | |
+ 1 .. number[i] - 1:
if j >= x and j <= y:
missing.add(j)
``` | [
0.1001267284154892,
0.11536220461130142,
0.12829574942588806,
-0.29414263367652893,
-0.1405620574951172,
-0.20665524899959564,
0.21042728424072266,
-0.3258790671825409,
-0.08138027042150497,
-0.15070360898971558,
-0.32353055477142334,
0.34624361991882324,
-0.6722778677940369,
0.00653632776... | |
I don’t understand or see the need for regular expressions.
Can some explain them in simple terms and provide some basic examples where they could be useful, or even critical.
Use them where you need to use/manipulate *patterns*. For instance, suppose you need to recognise the following pattern:
* Any letter, A-Z, ei... | [
0.44180747866630554,
0.13658557832241058,
0.05297541990876198,
0.20744198560714722,
-0.0012986405054107308,
0.13289523124694824,
0.4381342828273773,
0.1568985879421234,
-0.3173771798610687,
-0.6364490389823914,
-0.16965451836585999,
0.14266009628772736,
-0.20575346052646637,
-0.20705221593... | |
a regular expression, you describe the *pattern* (rather than the code to validate it) and let the regex engine do the work for you.
The pattern here would be something like
```
[A-Za-z]{5,6}[0-9]{3}[a-z]
```
(There are other ways of expressing it too.) Grouping constructs make it easy to match a whole pattern and... | [
0.3171842396259308,
-0.04082045331597328,
0.15409916639328003,
0.363952100276947,
-0.21847234666347504,
-0.16625432670116425,
0.3844161927700043,
-0.028504500165581703,
-0.05389505624771118,
-0.585861086845398,
-0.2916456460952759,
0.7643344402313232,
-0.33600059151649475,
-0.4270923733711... | |
which can make the patterns really slow against particular input, and these gotchas aren't obvious at all
* Some people overuse regular expressions massively (and some underuse them, of course). The worst example I've seen was where someone asked (on a C# group) how to check whether a string was length 3 - this is clea... | [
0.42053771018981934,
-0.3328782916069031,
0.08114274591207504,
0.10402724891901016,
-0.5875073671340942,
-0.006027203984558582,
0.9079286456108093,
0.11085589975118637,
-0.48294439911842346,
-0.45639732480049133,
-0.18916818499565125,
0.1586865931749344,
-0.5612950921058655,
-0.14321170747... | |
languages the backslash itself needs escaping. | [
0.12434855848550797,
0.25703781843185425,
-0.07629276812076569,
-0.07682269811630249,
0.21774305403232574,
0.2459753453731537,
0.7618392109870911,
0.5493277311325073,
-0.3816862404346466,
-0.5172422528266907,
-0.4472983777523041,
0.5117265582084656,
-0.1912153959274292,
-0.2846458554267883... | |
I have a timer on a windows form (C# 3.0, .net 3.5 SP1, VS2008 SP1, Vista) that seems to work even after it is stoppped. The code is:
```
using System;
using System.Windows.Forms;
namespace TestTimer
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
... | [
0.5081425309181213,
-0.0865291953086853,
0.5078190565109253,
-0.32584866881370544,
0.25632017850875854,
-0.04229693114757538,
0.2031729817390442,
-0.28387340903282166,
0.30112239718437195,
-0.7221507430076599,
0.04769441485404968,
0.32093608379364014,
-0.0865643098950386,
0.145600274205207... | |
private DateTime deadline;
private void StartTimer()
{
deadline = DateTime.Now.AddSeconds(4);
timer1.Start();
}
private void timer1_Tick(object sender, EventArgs e)
{
int secondsRemaining = (deadline - DateTime.Now).Seconds; | [
0.15256130695343018,
-0.5190300941467285,
0.2452620565891266,
-0.19263115525245667,
0.17164024710655212,
0.16920526325702667,
0.268003910779953,
0.017757343128323555,
-0.476141095161438,
-0.27619534730911255,
-0.20031683146953583,
0.3566870391368866,
-0.2708567976951599,
0.482544869184494,... | |
if (secondsRemaining <= 0)
{
timer1.Stop();
timer1.Enabled = false;
MessageBox.Show("too slow...");
}
else | [
0.0941363126039505,
-0.4943726062774658,
0.48670580983161926,
-0.309882789850235,
0.4045069217681885,
0.057809535413980484,
0.6267607808113098,
0.011348826810717583,
-0.19379374384880066,
-0.42454373836517334,
-0.4268929064273834,
0.3359554708003998,
-0.1885034292936325,
0.1999751478433609... | |
{
label1.Text = "Remaining: " + secondsRemaining.ToString() + (secondsRemaining > 1 ? " seconds" : " second");
}
}
}
}
```
Even after the timer1.Stop() is called, I keep reeciving MessageBoxes on the screen. When I press esc, it stops. Howevere, I've expected that only one mess... | [
0.13561154901981354,
-0.0420360267162323,
0.7279565334320068,
-0.31277406215667725,
0.2687828540802002,
-0.11986193060874939,
0.7170318961143494,
-0.2291603833436966,
-0.3868892788887024,
-0.6470839381217957,
-0.2661356031894684,
0.7107477784156799,
-0.1476287841796875,
0.2849302589893341,... | |
change the behavior.
Thanks
I could be wrong, but is MessageBox.Show() a blocking operation (that waits for you to dismiss the dialog)? If so, just move the Show() call to after the Stop/Enabled lines? | [
0.26381099224090576,
-0.30063867568969727,
0.4693947434425354,
0.05488383024930954,
0.0786808431148529,
-0.12719090282917023,
0.4857783317565918,
0.18332213163375854,
-0.21194852888584137,
-0.5232921838760376,
0.07185951620340347,
0.20986269414424896,
-0.566839337348938,
0.1246130988001823... | |
In a c# threading app, if I were to lock an object, let us say a queue, and if an exception occurs, will the object stay locked? Here is the pseudo-code:
```
int ii;
lock(MyQueue)
{
MyClass LclClass = (MyClass)MyQueue.Dequeue();
try
{
ii = int.parse(LclClass.SomeString);
}
catch
{
MessageB... | [
-0.187932088971138,
-0.1738288402557373,
0.4275343716144562,
-0.3349683880805969,
0.3332924544811249,
0.1870657354593277,
0.29120567440986633,
-0.03324594721198082,
-0.18762366473674774,
-0.29461127519607544,
-0.3307158052921295,
0.33102643489837646,
-0.6617999076843262,
0.0704360008239746... | |
// li is now assigned
} else {
// input string is dodgy
}
```
The lock will be released for 2 reasons; first, `lock` is essentially:
```
Monitor.Enter(lockObj);
try {
// ...
} finally {
Monitor.Exit(lockObj);
}
```
Second; you catch and don't re-throw the inner exception, so the `lock` never actually see... | [
-0.12380804866552353,
-0.3201369345188141,
0.33031806349754333,
-0.17193949222564697,
0.2418513298034668,
-0.40174686908721924,
0.4756428003311157,
-0.029034635052084923,
-0.22153566777706146,
-0.5280845761299133,
-0.4955002963542938,
0.49102768301963806,
-0.4641765058040619,
0.10017447173... | |
I have a superclass which has a bunch of variables.
e.g.
```
string s1= ""; string s2= ""; string s3= "";
```
...etc
I'd like to guarantee that these variables get overridden (assigned something useful) in the subclass that inherits from this superclass, at compile time.
is there an elegent way of doing this?
Ma... | [
0.1577976942062378,
0.027054885402321815,
0.2769738435745239,
-0.004669365007430315,
0.05003871023654938,
-0.2482452690601349,
0.4073260724544525,
-0.26770922541618347,
-0.12413637340068817,
-0.42803293466567993,
-0.24356073141098022,
0.5137067437171936,
-0.31731948256492615,
0.19907522201... | |
private fields anyway, so the derived class couldn't set them directly anyway, right? :) | [
0.3372586667537689,
-0.3603533208370209,
0.14932014048099518,
0.42727404832839966,
-0.15459801256656647,
0.014297032728791237,
-0.18729904294013977,
0.06777936220169067,
-0.23726364970207214,
-0.05672353133559227,
-0.2750393748283386,
0.4025709629058838,
-0.10400797426700592,
-0.0580191351... | |
What I am using in CSS is
```
form fieldset
{
height : 300px;
}
```
but I have
```
<fieldset><legend>ONE</legend></fieldset>`
<fieldset><legend>TWO</legend></fieldset>
```
The problem is both field sets are being applied the same height.
Is there a way to apply different heights to different fieldsets f... | [
0.21910211443901062,
0.20791327953338623,
0.15785223245620728,
-0.09290513396263123,
-0.2261969894170761,
-0.17225521802902222,
0.07211822271347046,
-0.5019852519035339,
-0.28398722410202026,
-0.7490348219871521,
0.020066330209374428,
0.2816268503665924,
0.038285497575998306,
0.06777910143... | |
to the page
In CSS you reference a class like
```
.bluefieldset{}
```
OR
```
fieldset.bluefieldset{}
```
for the ID you use the hash like
```
#f1
```
OR
```
fieldset#f1{}
``` | [
-0.10915335267782211,
0.2224898785352707,
0.19816575944423676,
0.09210450202226639,
-0.11954142153263092,
-0.33654844760894775,
-0.21900983154773712,
0.3275207281112671,
-0.2180350124835968,
-0.5941416621208191,
-0.10043163597583771,
0.13584710657596588,
-0.33664143085479736,
0.06088978052... | |
Is it only possible if I rename the file? Or is there a `__module__` variable to the file to define what's its name?
Yes, you should rename the file. Best would be after you have done that to remove the `oldname.pyc` and `oldname.pyo` compiled files (if present) from your system, otherwise the module will be importable... | [
0.3022385239601135,
0.24321864545345306,
0.22533683478832245,
0.017147107049822807,
0.44708025455474854,
-0.14649613201618195,
0.18877911567687988,
0.05240364745259285,
-0.24815382063388824,
-0.5018080472946167,
-0.41585975885391235,
0.4581053853034973,
-0.18880896270275116,
0.634512305259... | |
I have two sets of JQuery Accordions within a single DIV tag. At the moment when the page loads both these Accordions are displayed one below the other. However, I only want one of these Accordions to be displayed when the HTML page loads. How can I hide one while making the other one visible?
Give them different ident... | [
0.17022690176963806,
-0.16384349763393402,
0.2916944622993469,
-0.04119838774204254,
0.015123073942959309,
0.32776665687561035,
-0.028290895745158195,
-0.14598014950752258,
-0.3818771541118622,
-0.816308856010437,
0.34913212060928345,
0.5741106271743774,
-0.17459501326084137,
0.08941427618... | |
Half a year ago, I installed Visual Studio 2008 and SQL Server 2008. I don't quite remember which I installed first, but since then I am unable to connect to any file-based SQL server databases from the Visual Studio IDE. I think it was related to a bug in Visual Studio, the fact that I had previously installed Visual ... | [
0.00484850537031889,
0.12266658991575241,
0.1640588939189911,
0.027188125997781754,
-0.3283165693283081,
-0.11651907116174698,
0.16834305226802826,
0.08555866032838821,
-0.07740116864442825,
-0.6087602972984314,
0.3144160509109497,
0.8168501257896423,
-0.39030158519744873,
0.10750748217105... | |
Uninstall both Visual Studio and SQL Server, then reinstall SQL Server and afterwards Visual Studio?
B) Just uninstall Visual Studio and update to VS Team System?
Thanks,
Adrian
I install the Developer Edition of SQL Server instead of the SQL Server Express edition that comes with VS2008. I find that the install work... | [
0.178529292345047,
-0.14979517459869385,
0.40411460399627686,
0.14097316563129425,
-0.39532768726348877,
-0.21580973267555237,
0.44728797674179077,
-0.1451285481452942,
0.018134770914912224,
-0.8194103837013245,
-0.12215061485767365,
0.6943220496177673,
-0.4156132638454437,
-0.194826275110... | |
and SQL Server Express may be necessary, but I believe it was enough just to uninstall SQL Server Express and (re)install SQL Server Developer edition. | [
-0.09351328760385513,
0.0156183997169137,
0.3013286292552948,
0.12476132810115814,
-0.17654752731323242,
-0.47483596205711365,
0.24232403934001923,
0.14944225549697876,
0.1912972331047058,
-0.46433278918266296,
-0.1402624547481537,
0.5110177397727966,
-0.381361186504364,
-0.201949819922447... | |
I feel dumb asking this question, but I can't find solution to this myself.
When I open several files in editor and switch between them, I have problem finding currently opened file in project or files tree.
I used Eclipse before and every time I changed a tab with file, the project tree set focus for the same file. ... | [
0.40991976857185364,
-0.21674738824367523,
0.12886910140514374,
0.16724927723407745,
-0.2301200032234192,
-0.23059844970703125,
0.1282196044921875,
0.19032566249370575,
-0.248604878783226,
-0.7214310765266418,
0.24459828436374664,
0.540420651435852,
0.1420672982931137,
0.14651063084602356,... | |
you to do this automatically, like there is in
Eclipse, but this menu entry allows you to do it upon request.
[edit]: also working: in the file > right mouse button > select in > projects | files | classes | favourites
[edit 2]: <http://forums.netbeans.org/topic8420.html> : This feature is not available till NetBeans... | [
0.39451465010643005,
-0.4024198055267334,
0.4673180878162384,
-0.07493067532777786,
-0.004075040575116873,
-0.5201085805892944,
0.20722262561321259,
0.03956153616309166,
-0.47085028886795044,
-0.6038223505020142,
-0.3076353073120117,
0.845425546169281,
-0.09500674903392792,
-0.384842097759... | |
Using Resharper, I extracted an interface of an existing class. This class has some attributes set on a few members, and Resharper also put these on the interface members.
Can I delete these attributes from the interface?
Attributes on an interface aren't inherited when implementing an interface right?
They aren't use... | [
0.2522510588169098,
-0.15435203909873962,
0.2631707191467285,
0.14442165195941925,
0.036501724272966385,
0.06084305793046951,
0.10471450537443161,
-0.5763310194015503,
-0.07283979654312134,
-0.7631614208221436,
0.0922144278883934,
0.7730134129524231,
-0.11863888055086136,
0.255703598260879... | |
I am currently writing a Windows application in C# that will add documents to a document library list. I am trying to reference Microsoft.Sharepoint, however I do not see the COM or .NET library inside visual studio 2005 add references lists. What dll do I need to reference and where can I find this?
Thanks,
Alex
To ... | [
0.49942460656166077,
0.40869125723838806,
0.20400074124336243,
0.2652217745780945,
-0.09697861224412918,
-0.30645596981048584,
0.02827531471848488,
0.40287426114082336,
-0.21696513891220093,
-0.8032850623130798,
0.3087889552116394,
0.46624207496643066,
0.09397990256547928,
0.18876227736473... | |
[Visual studio extensions for windows sharepoint services](http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=b2c0b628-5cab-48c1-8cae-c34c1ccbdc0a) | [
0.09325996786355972,
-0.21367622911930084,
0.3977128267288208,
0.020140042528510094,
0.0574413426220417,
-0.033856384456157684,
0.016772864386439323,
0.09452583640813828,
-0.4959639310836792,
-0.5142878890037537,
-0.5719706416130066,
0.2943861186504364,
-0.16484621167182922,
0.323966443538... | |
I have the need to allocate large blocks of memory with new.
I am stuck with using new because I am writing a mock for the producer side of a two part application. The actual producer code is allocating these large blocks and my code has responsibility to delete them (after processing them).
Is there a way I can ensu... | [
0.32757967710494995,
0.34627026319503784,
-0.012095794081687927,
0.052622854709625244,
0.06324074417352676,
0.4210149943828583,
0.2391061931848526,
-0.364498496055603,
-0.5091149806976318,
-0.6344205737113953,
0.16051797568798065,
0.3270358741283417,
0.03659636154770851,
0.3187573254108429... | |
am getting 27 to allocate. I am getting a std::bad\_alloc exception.
This is: C++, GCC on Linux (32bit).
With respect to *new* in C++/GCC/Linux(32bit)...
It's been a while, and it's implementation dependent, but I believe *new* will, behind the scenes, invoke *malloc()*. *Malloc()*, unless you ask for something excee... | [
0.051694341003894806,
0.26507633924484253,
0.4794026017189026,
-0.3814485967159271,
-0.09982646256685257,
0.05904442071914673,
0.1355513632297516,
-0.29345273971557617,
-0.274851530790329,
-0.7704622149467468,
-0.35427388548851013,
0.6568228006362915,
-0.2784106135368347,
-0.14524810016155... | |
At that point, when you first read or write to that memory, if the kernel cannot allocate memory pages to your process, it kills your process.
This can be a problem on a shared computer, when your colleague has a slow core leak. Especially when he starts knocking out system processes.
So the fact that you are seeing ... | [
0.4349057972431183,
0.10414708405733109,
0.02997523918747902,
0.0427568182349205,
-0.17457132041454315,
-0.20105606317520142,
0.25377440452575684,
0.02684423141181469,
-0.5659281015396118,
-0.9526672959327698,
-0.03341817110776901,
0.33128777146339417,
-0.24722014367580414,
0.3695882558822... | |
Do you have enough memory available?
As others have suggested, have you checked *limit/ulimit/getrusage()* for hard & soft constraints?
What does your code look like, exactly? I'm guessing *new ClassFoo [ N ]*. Or perhaps *new char [ N ]*.
What is *sizeof(ClassFoo)*? What is *N*?
Allocating 64\*288000 (17.58Meg) sh... | [
0.13303548097610474,
-0.05546439811587334,
-0.12787701189517975,
0.23628906905651093,
0.19120779633522034,
0.0691097229719162,
0.21341602504253387,
-0.020227231085300446,
-0.6396139860153198,
-0.45332813262939453,
-0.02518145926296711,
0.5315112471580505,
-0.3220159411430359,
-0.0253082215... | |
compilers installed? Are you using the wrong include or library paths?
Are you linking against stale object files? Do you simply need to recompile your all your source files?
Can you create a trivial test program? Just a couple lines of code that reproduces the bug? Or is your problem elsewhere, and only showing up h... | [
0.5926805138587952,
0.30982768535614014,
-0.3113400936126709,
0.25452113151550293,
-0.22083741426467896,
-0.1560051590204239,
0.3517538011074066,
0.23782896995544434,
-0.42488187551498413,
-0.5902377367019653,
0.021106252446770668,
0.5613575577735901,
-0.6182454824447632,
0.060451485216617... | |
I have a base class and a derived class. Each class has an .h file and a .cpp file.
I am doing dynamic\_cast of the base class object to the derived class in the following code:
h files:
```
class Base
{
public:
Base();
virtual ~Base();
};
class Derived : public Base
{
public:
Derived(){};
void ... | [
0.2094039022922516,
0.05677960440516472,
0.5342586040496826,
-0.2002740353345871,
0.11123088747262955,
0.1450529396533966,
0.08034311234951019,
-0.5626930594444275,
0.13673841953277588,
-0.534295380115509,
-0.1474045217037201,
0.2955722212791443,
-0.1339636892080307,
0.28331077098846436,
... | |
dynamic_cast<Derived*>(pointerToBaseObject)
}
```
From some strange reason, the casting fails (returns NULL). However, the casting succeeds if I move the implementation of Derived class's constructor from .h to the .cpp file.
What can cause it?
The compiler is gcc 3.1, on Linux-SUSE. BTW, I see this behavior only o... | [
0.031138166785240173,
-0.33209115266799927,
0.3699333965778351,
-0.05218759924173355,
-0.18379756808280945,
0.01743997074663639,
0.4424518942832947,
-0.17043685913085938,
-0.2973538041114807,
-0.4574460983276367,
0.1818941831588745,
0.6586214900016785,
-0.6440697312355042,
-0.0215795300900... | |
the problem.
The only thing I can think of is that due to some weird bug everything gets inlined and no vtable gets generated. But if you put the constructor in the C++ file, the compiler decides not to inline everything, triggering the creation of a vtable, causing your cast to work.
But this is very wild guesswork,... | [
0.3550560772418976,
0.12241631001234055,
0.1847423017024994,
0.2502284646034241,
-0.11557580530643463,
-0.17001043260097504,
0.37853050231933594,
0.1321018934249878,
-0.3098994195461273,
-0.22334887087345123,
-0.04470663145184517,
0.6997811198234558,
-0.4145796000957489,
0.2107107341289520... | |
that's a typo)
But after seeing the code, the only thing I can think of is that gcc (wrongly) inlines everything and doesn't generate a vtable for Derived. For what it's worth, this runs fine compiled with gcc 4.0
3.1 is over 7 years old by now... if there's any possibility to upgrade I'd go for it. | [
0.19177208840847015,
-0.020870881155133247,
0.6633074283599854,
0.10310421884059906,
-0.16630351543426514,
-0.48093825578689575,
0.3507360517978668,
0.04325084015727043,
-0.16157516837120056,
-0.318399041891098,
0.30108842253685,
0.6676039695739746,
-0.1013014018535614,
0.3562197983264923,... | |
I've a DataSet with 3 DataTables:
> dtPerson
>
>
> dtSalary
>
>
> dtFriend
Every person has salaries, and every person has one friend.
I've added a column dcHisFriend into dtSalary and would like to display friend name of a person owning specified salary.
So dtPerson has a column NAME, dtSalary has column VALUE... | [
-0.12810049951076508,
-0.07300001382827759,
0.5639583468437195,
0.2420027256011963,
-0.018009983003139496,
0.5969495177268982,
-0.22267594933509827,
-0.3191766142845154,
-0.29629653692245483,
-0.6460376381874084,
0.43332284688949585,
0.5226390361785889,
0.1298464685678482,
0.09039895236492... | |
no way how to access any other row in "Expression" in DataColumn.
The only way, how to achieve similar behaviour is hook to DataColumnChanged event on DataTables where are source data and then set the computed value to the regular column (=column without expression). | [
-0.0945124626159668,
-0.10631030052900314,
0.4762665927410126,
0.4010336697101593,
0.17274247109889984,
-0.037829916924238205,
0.24528567492961884,
-0.002060284838080406,
-0.15613779425621033,
-0.6167131066322327,
-0.1848631352186203,
0.38893675804138184,
-0.3311196565628052,
0.00181058875... | |
We have an Progress OpenEdge (<http://en.wikipedia.org/wiki/Progress_4GL>) develop team in the company I work for.
I'm the only c# developer there and really like it. So now the manager asks me to learn programming in OpenEdge. He doesn't want me to become a good OpenEdge programmer but he wants the team members to un... | [
0.6652695536613464,
0.4224497973918915,
0.3469334840774536,
0.04096732288599014,
-0.25911664962768555,
-0.14873576164245605,
0.18164631724357605,
0.24600768089294434,
-0.14601506292819977,
-0.6255344152450562,
0.038802146911621094,
0.3581045866012573,
0.20707571506500244,
0.300649672746658... | |
would profit from or should I stay away from it.
1. OpenEdge is a powerful framework for building CRUD applications; but it is a niche skill with no SAP-like salary premium for possessing it; conversely decent OpenEdge developers are hard to get hold of for bog standard rates - it would not be unknown for a manager to ... | [
0.3530381917953491,
-0.11409968137741089,
0.13239097595214844,
0.15066193044185638,
-0.3130224645137787,
-0.40053510665893555,
-0.14463099837303162,
-0.04493251442909241,
0.13062483072280884,
-0.47304511070251465,
0.06194040924310684,
0.6405476927757263,
-0.19160610437393188,
-0.0460157431... | |
make sense.
So, bearing those points in mind:
It's worth learning the basics to enrich your understanding of your core competencies, along the lines of "What should they of England know, who only England know?". You may also find the ease of data access eye-opening.
It is not worth spending too much time distracted ... | [
0.40504634380340576,
-0.052866581827402115,
-0.07812588661909103,
0.1485888957977295,
0.33928021788597107,
-0.2561623156070709,
0.4017869234085083,
0.17640922963619232,
-0.2202543169260025,
-0.31624528765678406,
-0.2695362865924835,
0.3728754222393036,
0.35753965377807617,
0.20144632458686... | |
The function gluPerspective() can be used to set near Z and far Z clipping planes.
I want to draw a scene clipped at a certain far Z plane,
and draw another scene beyond this Z plane.
Is it possible to do this clipping twice per frame?
1. OpenEdge is a powerful framework for building CRUD applications; but it is a nic... | [
0.11456365138292313,
-0.5112941861152649,
0.6712625026702881,
0.234219029545784,
-0.38535112142562866,
-0.20755794644355774,
-0.2117224931716919,
-0.0680428072810173,
-0.03455303981900215,
-0.5877153277397156,
-0.009110268205404282,
0.749535322189331,
-0.5438530445098877,
-0.04664701223373... | |
(OpenEdge language) is different enough a language from the mainstream to be interesting for an inquisitive programmer and for your bosses arguments for everyone to understand where the others are coming from to make sense.
So, bearing those points in mind:
It's worth learning the basics to enrich your understanding ... | [
0.02128586918115616,
0.12731389701366425,
0.22183796763420105,
0.015550416894257069,
-0.05961061641573906,
-0.2996163070201874,
0.37647876143455505,
0.22135230898857117,
-0.2343299239873886,
-0.21314705908298492,
-0.3974379301071167,
0.36293065547943115,
0.13748766481876373,
-0.16004104912... | |
Is there anyway to add an ID or a unique identifier to a JLabel?
Thanks all
JLabel has a setName method that is inherited from java.awt.Component. You could use this for an ID. | [
0.44539737701416016,
-0.12170953303575516,
-0.05852755904197693,
0.31046316027641296,
-0.27338433265686035,
-0.3310801684856415,
0.24821104109287262,
0.05677199736237526,
-0.07918766885995865,
-0.4077310264110565,
0.258274644613266,
0.3656189739704132,
-0.1273893415927887,
0.04823592677712... | |
The unix **`tee`** command splits the standard input to stdout AND a file.
What I need is something that works the other way around, merging several inputs to one output - I need to concatenate the stdout of two (or more) commands.
Not sure what the semantics of this app should be - let's suppose each argument is ... | [
0.44896751642227173,
0.04685642570257187,
0.08553051948547363,
-0.2662511169910431,
-0.25840234756469727,
-0.06288792937994003,
-0.011760332621634007,
-0.15312102437019348,
-0.12027876824140549,
-0.4832814037799835,
0.13769492506980896,
0.8268386125564575,
-0.5884321928024292,
-0.034727957... | |
to the file, but I want to do this in one go (actually, I want to pipe the merged outputs to another program).
Also, I *could* roll my own, but I'm lazy whenever I can afford it :-)
Oh yeah, and it would be nice if it worked in Windows (although I guess any bash/linux-flavored solution works, via UnxUtils/msys/etc)... | [
0.3213841915130615,
-0.11848228424787521,
0.15660244226455688,
-0.025923775508999825,
-0.037335705012083054,
-0.06263290345668793,
0.41138848662376404,
0.03817468881607056,
-0.16648238897323608,
-0.5500431060791016,
-0.17828001081943512,
0.5433059334754944,
-0.33244141936302185,
-0.1699903... | |
I am considering starting an e-business, but I am undecided as to which language to choose to write the core of the website in.
I would prefer to avoid the Microsoft route of ASP.NET and C# due the costs, and I also just prefer to develop on Linux :-)
Basically, I was weighing up between using PHP or Ruby on Rails. M... | [
0.5659026503562927,
0.16899947822093964,
0.02629184164106846,
0.08777433633804321,
-0.06451937556266785,
0.059847015887498856,
0.16635209321975708,
0.49067649245262146,
-0.06657377630472183,
-0.7779268026351929,
0.08295119553804398,
0.5486729741096497,
-0.17285029590129852,
-0.032732076942... | |
kick-start the business, but I am unfamiliar with Python and also reluctant to rely heavily on Google to support everything.
I was wondering if their is a benefit to using Rails in terms of development time, cleaner, more maintainable code, bearing in mind that we would have to learn both Ruby and Rails.
Another thin... | [
0.5752196907997131,
0.03889130428433418,
-0.11807722598314285,
0.15166553854942322,
-0.31682533025741577,
-0.39062753319740295,
0.2996291220188141,
0.27518922090530396,
-0.21784229576587677,
-0.2033073902130127,
-0.2109067738056183,
0.31597909331321716,
0.056571345776319504,
-0.25431215763... | |
not important which language you will use, but Rails is a framework, and PHP is a language.
I recommend you to use a PHP framework like Symphony if you want to use PHP, or Rails if you choose Ruby. | [
0.39681336283683777,
0.0007119868532754481,
-0.32337599992752075,
0.3252028226852417,
-0.19397033751010895,
-0.05627768486738205,
0.23170356452465057,
0.4832763671875,
-0.24201123416423798,
-0.6922760605812073,
0.3509308099746704,
0.38390854001045227,
-0.2869375944137573,
-0.15176193416118... | |
I am creating an app with ASP.NET MVC and I have the need for a wizard style interface on one of my pages.
Here is what I'm doing so far:
I have created a page with 5 divs. All have "display: none" set in the css file. When the user hits the page for the first time, I use jquery to show the first step using:
```... | [
0.28909972310066223,
0.06902918219566345,
0.6828784346580505,
-0.17692320048809052,
-0.15072554349899292,
-0.12584543228149414,
0.46536755561828613,
-0.3243398368358612,
0.06043187901377678,
-0.9182920455932617,
-0.311824232339859,
0.6650496125221252,
-0.2486385852098465,
-0.00466241361573... | |
Everything is working fine except if I'm on step 2, 3, 4, 5 and hit the back button, it takes me all the way back to the page I was on before when I really just want to go to the previous step.
How can I make this work? I've seen some examples using "#" and creating links on the page, but not sure if there is a better... | [
0.42068183422088623,
-0.14233708381652832,
0.1831369549036026,
0.19812723994255066,
0.14975495636463165,
-0.1846722960472107,
0.4057129919528961,
0.2625240385532379,
-0.3064028024673462,
-0.8777176737785339,
0.3880525231361389,
0.6807717680931091,
-0.11601922661066055,
-0.14172124862670898... | |
use PHP, or Rails if you choose Ruby. | [
0.4701423645019531,
-0.08628012239933014,
-0.3015640079975128,
0.20436003804206848,
-0.418163001537323,
0.09246362745761871,
0.3036127984523773,
0.49672749638557434,
-0.2468268871307373,
-0.5404075384140015,
0.023552503436803818,
0.5079523324966431,
-0.2162541002035141,
-0.1517721712589264... | |
Did any one encountered a scenario where application under high memory allocation load performed second generation collection every 100 seconds ?
We using 64-bit server with 8-16 GB of physical memory.
Application has several GB of data what is stored in cache and can't be cleaned from it because it's actually used ... | [
0.02228885143995285,
-0.09977389872074127,
0.08320048451423645,
0.3641633093357086,
-0.29350584745407104,
-0.008616737090051174,
0.15829090774059296,
-0.19952747225761414,
-0.5485867261886597,
-0.4509929120540619,
0.08546401560306549,
0.28833019733428955,
0.03281915932893753,
0.20084576308... | |
and using a lot of objects, then yes: GC will get busy... if it is hitting gen-2, then it sounds like you've got a *lot* of mid/long-life objects hanging around...
I'm assuming that memory usage is fairly stable? The above *could* indicate some kind of pseudo-leak (perhaps holding onto too many objects via static even... | [
0.2140701413154602,
0.02125377580523491,
0.11887449771165848,
0.30155694484710693,
-0.09990876913070679,
-0.18377581238746643,
-0.02120356634259224,
0.02501261606812477,
-0.5567967891693115,
-0.5656165480613708,
-0.03814026713371277,
0.72724449634552,
-0.2218121737241745,
0.116676382720470... | |
I have set my database fields "username" and "email" to unquie, when using the code below this only works if the "username" already exists, an error is then echoed. If they email exists the user gets a mysql duplicate error, when the same error as above should be shown.
```
<?php
require_once ( 'connection.php' );
$... | [
0.2471027374267578,
0.2919269800186157,
0.6640414595603943,
-0.2509332597255707,
0.33217230439186096,
-0.1664009541273117,
0.20262418687343597,
-0.3797212541103363,
-0.05025523900985718,
-0.6416058540344238,
-0.06485313922166824,
0.4130477011203766,
-0.39435049891471863,
0.4516982138156891... | |
(!mysql_query($query))
{
die('Error: ' . mysql_error());
}
echo "You are signed up, please follow the link on your email to active your account.";
}
else
{
echo "Username or Email already exists"."<br><a href=\"sign_up.php\">Try Again</a></br>";
}
?
```
Thanks
Try switching
```
WHERE username = '... | [
0.367391437292099,
0.2795421779155731,
0.2710738182067871,
-0.35228729248046875,
0.059405580163002014,
-0.1577775478363037,
0.3967016041278839,
-0.4707345962524414,
-0.34376007318496704,
-0.4469010531902313,
-0.04429643228650093,
0.2959045171737671,
-0.20150592923164368,
0.0976442247629165... | |
separate unique indexes on those columns. Your code checks for the combination of username and email to be unique.
**Edit 2**: Also, I think you might want to look into the concepts of [SQL Injection](http://en.wikipedia.org/wiki/SQL_injection) and [Concurrency](http://en.wikipedia.org/wiki/Concurrency_(computer_scie... | [
0.4298253357410431,
0.1424677073955536,
0.06751260161399841,
0.19784122705459595,
-0.24447205662727356,
-0.2522743344306946,
0.03873395174741745,
0.16382993757724762,
-0.4396438002586365,
-0.45474347472190857,
0.17800049483776093,
0.5261871814727783,
-0.1506185531616211,
0.0508301332592964... | |
On my system, the caption of a groupbox is always a dark blue colour, how do I change this?
The answer to [How do you change the color of the border on a group box?](https://stackoverflow.com/questions/76455/how-do-you-change-the-color-of-the-border-on-a-group-box) shows how I can override the drawing of the caption a... | [
0.3909628689289093,
-0.07715056091547012,
0.2769394516944885,
-0.05240457132458687,
0.057461269199848175,
0.060001272708177567,
0.15499554574489594,
-0.2261665016412735,
-0.1703404039144516,
-0.7137496471405029,
0.021274466067552567,
0.07037431746721268,
-0.19942206144332886,
-0.0957752540... | |
Most things I read about Unit Tests is about testing your classes and their behaviour. But how do you test saving data to a database and reading data from a database. In our project saving and reading data is done through services that are used by a Flex Application (using WebORB as a gateway). For instance, a service ... | [
0.7857491970062256,
-0.008099299855530262,
-0.17366139590740204,
0.31126701831817627,
-0.15373089909553528,
0.05939861387014389,
0.39693912863731384,
-0.1257559210062027,
-0.12470627576112747,
-0.5587747097015381,
0.22582121193408966,
0.43721890449523926,
0.301158607006073,
0.1852234005928... | |
data already in the database. In some of our tests we first need to save a lot of testdata to the database before being able to test reading stuff...
The same thing is valid for Stored Procedures. How do you test sp's if there's no data in the database. Reality is that to test certain stored procedures, we need data i... | [
0.39818909764289856,
0.01001774799078703,
0.02705305628478527,
0.23315496742725372,
-0.031286440789699554,
0.0189018864184618,
0.49441856145858765,
-0.5999177098274231,
-0.27793365716934204,
-0.4450320303440094,
0.332057386636734,
0.3909994065761566,
0.04092715308070183,
-0.136547207832336... | |
an external dependency on your test framework
It *may* also be a code smell that your classes are not separating db related work from other work, e.g. business logic. However it may not, we have a framework test which verifies that the automatically generated SQL script returns the expected incremented identity value ... | [
0.6501076817512512,
0.21609435975551605,
0.10506169497966766,
0.24051515758037567,
-0.11994761973619461,
-0.30359944701194763,
0.32999303936958313,
-0.10444227606058121,
-0.01343412697315216,
-0.28567183017730713,
0.25544285774230957,
0.681257426738739,
-0.23722173273563385,
0.216028451919... | |
since so much other code relies on it.
Depending on your test framework, you should mark these tests as [Database] related, allowing you to separate them from other tests. | [
0.7359121441841125,
0.19055059552192688,
-0.3768797814846039,
0.38902342319488525,
0.19733041524887085,
-0.3671369254589081,
0.02905057556927204,
-0.14622126519680023,
0.0072611295618116856,
-0.32935380935668945,
0.15057960152626038,
0.38620805740356445,
-0.027374939993023872,
0.0534417778... | |
I recently read about <http://php.net/pcntl> and was woundering how good that functions works and if it would be smart to use multithreading in PHP since it isn't a core function of PHP.
I would want to trigger events that don't require feedback through it like fireing a cronjob execution manually.
All of it is suppo... | [
0.5322558879852295,
0.06150199845433235,
0.032492704689502716,
-0.009406331926584244,
-0.21241961419582367,
-0.29840466380119324,
0.00027031812351197004,
0.07987909764051437,
-0.027489401400089264,
-0.5722930431365967,
0.2735391855239868,
0.984697163105011,
-0.2462872415781021,
-0.00035656... | |
shell scripts, but not on web pages - at least not without using a hack like [calling a forking script with exec](http://joseph.randomnetworks.com/archives/2005/10/21/fake-fork-in-php/) or similar.
[edit]
I just found a page explaining [why mod\_php cannot fork](http://www.mail-archive.com/php-bugs@lists.php.net/msg95... | [
0.45947265625,
0.21745117008686066,
-0.1499013751745224,
-0.00694668386131525,
0.004290915559977293,
-0.42149776220321655,
0.2779593765735626,
0.20914864540100098,
-0.2033851444721222,
-0.25838130712509155,
0.14272281527519226,
0.6912527680397034,
-0.3309829533100128,
0.26530522108078003,
... | |
We have the need for a web-based wiki-like rich editor able to preserve original markup. At the moment a given custom markup is being converted to html for display and edit (allowing people to edit html in case of links and similar) then converted back to the specific markup when saving. This is obviously error prone a... | [
0.5949835777282715,
0.057118773460388184,
0.3145940899848938,
0.24256713688373566,
0.33271321654319763,
-0.2512845993041992,
0.13474597036838531,
0.01435039658099413,
-0.38253578543663025,
-0.6828112602233887,
-0.07602118700742722,
0.5179318189620972,
-0.28073039650917053,
-0.1119127348065... | |
at the moment in your experience?
This is a long discussion.
My advise is to use a JavaScript with good XHTML output. Don't use flash or silverlight at all.
For my project I've used the YUI text Editor and everything worked really good. Try it here : <http://developer.yahoo.com/yui/examples/editor/skinning_editor.htm... | [
0.35212379693984985,
-0.5819045305252075,
-0.03772487863898277,
0.31460532546043396,
-0.47714415192604065,
-0.05809171497821808,
0.04295222833752632,
0.25111329555511475,
-0.08412076532840729,
-0.9654804468154907,
0.21165154874324799,
0.48647138476371765,
0.19393116235733032,
-0.0666751340... | |
I set up LINQ-to-SQL / NorthWind in WPF.
The ListBox shows data but the DataGrid doesn't (no errors, just doesn't display anything).
I referenced WPFToolkit.dll.
Why is the DataGrid not displaying the data that ListBox can?
**XAML:**
```
<Window x:Class="TestLinq343.Window1"
xmlns="http://schemas.microsoft.com... | [
-0.06061280518770218,
0.13924682140350342,
0.7673736214637756,
-0.1312817633152008,
-0.12175760418176651,
-0.04388358071446419,
-0.04985857754945755,
-0.6241220235824585,
-0.2580581307411194,
-0.167833149433136,
0.0640311911702156,
0.2643074691295624,
-0.20631258189678192,
-0.0050270548090... | |
<TextBlock Text=": "/>
<TextBlock Text="{Binding ProductName}"/>
</StackPanel>
</DataTemplate>
</Window.Resources>
<Grid>
<dg:DataGrid x:Name="TheDataGrid" AutoGenerateColumns="True"></dg:DataGrid>
<ListBox x:Name="TheListBox" ItemTemplate="{StaticResource Sho... | [
-0.24769514799118042,
-0.02959510311484337,
0.36026811599731445,
-0.007261887192726135,
-0.17891307175159454,
0.07700176537036896,
0.13195694983005524,
-0.6438054442405701,
-0.0650191381573677,
-0.5027199387550354,
-0.252232164144516,
0.3678022027015686,
-0.36316290497779846,
0.14477007091... | |
{
public Window1()
{
InitializeComponent();
NorthwindDataContext db = new NorthwindDataContext();
var sortedProducts =
from p in db.Products
orderby p.UnitsInStock descending | [
-0.5520672798156738,
-0.4617692828178406,
0.6470900177955627,
-0.1992269903421402,
0.06666853278875351,
0.16532373428344727,
0.4866580069065094,
-0.2211657166481018,
-0.33113962411880493,
-0.6792974472045898,
-0.513072669506073,
0.007510069757699966,
-0.31192782521247864,
0.139857321977615... | |
select p;
TheDataGrid.ItemsSource = sortedProducts;
TheListBox.ItemsSource = sortedProducts;
}
}
}
```
It was just a XAML issue, this fixes it:
```
<ScrollViewer>
<StackPanel>
<dg:DataGrid x:Name="TheDataGrid"/>
<ListView x:Name="TheListView" ItemTemplate="{Sta... | [
-0.6064513921737671,
-0.07251246273517609,
0.6651597023010254,
-0.10507253557443619,
-0.16879387199878693,
0.05530121177434921,
0.11609691381454468,
-0.4823067784309387,
-0.20324240624904633,
-0.593995213508606,
-0.4375097453594208,
0.34761109948158264,
-0.38668474555015564,
0.142095044255... | |
I'm looking for a free UML tool that runs on Windows and lets me create simple diagrams very fast, with as little mouse fiddling as possible.
I have no need for code generation or fancy stuff, just UML style boxes with arrows.
What I would like is something that for example lets me add a new class with a keyboard sho... | [
0.2682275176048279,
-0.01211332157254219,
-0.15065118670463562,
0.45817193388938904,
0.16907905042171478,
-0.042330462485551834,
-0.037878330796957016,
0.622439980506897,
-0.26614242792129517,
-0.6931461691856384,
0.28565123677253723,
0.17035771906375885,
-0.1438198983669281,
0.10845815390... | |
to drag an item from a toolbox to the surface, double click the item, enter the name, grab the mouse again, click the ok button, rince and repeat.
For Eclipse there is [TextUML](http://abstratt.com/) that lets you create diagrams using a textual notation, but I want it for .Net development and I don't want to run Ecli... | [
0.5363370180130005,
-0.26227420568466187,
0.2310251146554947,
0.027079753577709198,
-0.5211871862411499,
0.0498490184545517,
-0.07389944046735764,
-0.018655557185411453,
-0.4286181330680847,
-0.6492266058921814,
0.23428648710250854,
0.3744739592075348,
-0.1375439614057541,
-0.0904674679040... | |
[GraphViz](http://www.graphviz.org/). It allows you to enter textual descriptions and the current Windows version is now able to provide a graphical preview of the text file. You can choose different shape types and it will allow you produce diagrams even as fancy as the following one.
I have a full-blown UML tool (t... | [
0.19252222776412964,
-0.0007736862171441317,
0.917185366153717,
-0.062358591705560684,
-0.39038559794425964,
-0.12447930872440338,
0.3746664822101593,
0.16172060370445251,
-0.521474301815033,
-0.8242460489273071,
0.025514136999845505,
0.3767077326774597,
-0.13241486251354218,
0.10309806466... | |
edge[style=invisible arrowhead=none]
Mac[label="On Macintosh\nonly" color=blue fontcolor=blue]
Next[label="Next Version" color=grey fontcolor=grey]
Mac->Next
}
edge [color=black fontcolor=black]
node [weight=bold fontsize=14 color=black fontcolor=black]
/* docs */
node[ shape=box3d]
AppMakerv2[label="AppM... | [
-0.7580464482307434,
0.04815259948372841,
0.5472217798233032,
-0.04468882828950882,
-0.13438893854618073,
0.2793424725532532,
0.1874959021806717,
-0.38019993901252747,
-0.1448061615228653,
-0.646483302116394,
-0.25578927993774414,
0.601771891117096,
-0.28710126876831055,
0.0272544361650943... | |
**Background:**
I have a web application for which I need to do database auditing for insert/deletes/updates (and maybe reads). I use LINQ as my ORM. Using some ideas I found on the web I've come up with a way of using attributes to decorate my entities which have associated audit tables. The audit table itself is req... | [
0.4084663987159729,
0.45979613065719604,
0.6203502416610718,
0.40336325764656067,
0.1695088893175125,
-0.1994767040014267,
0.029241545125842094,
-0.20665721595287323,
-0.34554749727249146,
-0.18516923487186432,
-0.15694913268089294,
0.41161051392555237,
0.19076699018478394,
-0.151850074529... | |
my data context is abstract and I inherit and override SubmitChanges in my concrete implementation. The abstract data context actually derives from an AbstractAuditableDataContext which extends DataContext and adds a CurrentUser property with placeholders for the current user id and name. By default these are 0 and "sy... | [
0.08752717822790146,
0.2744620144367218,
0.7608816027641296,
0.10165901482105255,
0.11873814463615417,
-0.1173638254404068,
0.17992471158504486,
-0.14512380957603455,
0.09520036727190018,
-0.6345659494400024,
-0.0030033960938453674,
0.4367563724517822,
-0.11727280914783478,
0.0745718777179... | |
a utility class that gets injected in the AuditUtility that checks to see if the CurrentUser has been set and, if not, fills it in. For testing I'd mock this out, but in the live application it would probably use lazy-loading and get/set it in the session. Or should I modify the data context factory (used by all contro... | [
0.23493383824825287,
-0.2671314775943756,
0.013717097230255604,
0.17671075463294983,
-0.0018150275573134422,
-0.058896079659461975,
0.06179005652666092,
-0.36226990818977356,
-0.07530031353235245,
-0.5172598361968994,
0.06464529037475586,
0.6544120907783508,
-0.4079451560974121,
-0.1512164... | |
me to do "on behalf of" auditing.
I realize that this is somewhat subjective, but I'd appreciate any thoughts/experiences you might contribute.
Thanks.
I ended up creating an CurrentUserUtilityBase class that has a GetAuditUser method that takes the current data context and retrieves the user object that corresponds ... | [
0.10075286030769348,
0.001418303232640028,
0.47186607122421265,
0.1673651486635208,
-0.028974073007702827,
-0.11340665072202682,
0.2129959911108017,
-0.310940146446228,
-0.03400859981775284,
-0.33943793177604675,
0.17791321873664856,
0.6002082824707031,
-0.16267581284046173,
0.122631832957... | |
context. The factory methods for my data context's use the current user utility to inject the current user for the context into the context after it is created. | [
0.2783920466899872,
0.14179368317127228,
0.33323901891708374,
0.046078648418188095,
-0.04878799244761467,
0.32285821437835693,
-0.06688518077135086,
-0.11728829145431519,
0.09708588570356369,
-0.42673712968826294,
0.16674019396305084,
0.5134327411651611,
-0.21919378638267517,
0.08628975600... | |
Could someone take the time to explain me the language underpinnings here :
```
int foo = myObject.SomeList.Count;
for (int i = 0 ; i < foo ; i++)
{
myObject.SomeList.Add(bar);
}
```
goes into an infinite loop because `foo` references a value that keeps being incremented. Modifying the first line to:
```
int foo ... | [
0.1404934674501419,
0.19216734170913696,
0.11730753630399704,
-0.143907368183136,
0.14562223851680756,
0.022842299193143845,
0.519122302532196,
0.18084542453289032,
-0.1710921674966812,
-0.4451602101325989,
-0.0485745370388031,
0.4281221330165863,
-0.1291550248861313,
0.13052663207054138,
... | |
indeed what I thought initially while debugging this. Hence my surprise when the cast fixed it. What actually happened is that I was misled by Visual Studio into thinking I had fixed it when there was actually a problem of synchronization between edited code and executed code, which led to wrong conclusions.
I tried th... | [
0.7153295278549194,
0.1267387568950653,
0.40887412428855896,
-0.1523132026195526,
0.08522887527942657,
0.1838824450969696,
0.3169770836830139,
-0.06773896515369415,
-0.28567856550216675,
-0.540231466293335,
0.14282430708408356,
0.5949589014053345,
-0.32753878831863403,
0.030907602980732918... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.