text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
There are enough resources on how to convert an expression tree into postfix notation, and it's not that hard.
But I have to parse a postfix expression into an expression tree.
The expression is:
> A 2 ^ 2 A \* B \* - B 2 ^ + A B - /
I don't really have a clue on how to interpret the expression. Does someone has a ... | [
-0.14581327140331268,
0.07308921217918396,
0.15443898737430573,
0.05408430099487305,
0.04841099679470062,
0.043139535933732986,
0.16654497385025024,
-0.3251247704029083,
0.10810693353414536,
-0.5379729270935059,
-0.22604423761367798,
0.347230464220047,
-0.26931631565093994,
-0.282791495323... | |
any direction
2. For operators, pop the necessary operands off the stack, create a node with the operator at the top, and the operands hanging below it, push the new node onto the stack
For your data:
1. Push A onto the stack
2. Push 2 onto the stack
3. Pop 2 and A, create ^-node (with A and 2 below), push it on the ... | [
-0.3297940194606781,
-0.29928621649742126,
1.07930588722229,
0.12238555401563644,
0.12254374474287033,
0.026482144370675087,
-0.0631847083568573,
-0.11391208320856094,
-0.10901333391666412,
-0.3205486834049225,
-0.11071203649044037,
0.46226921677589417,
-0.44788751006126404,
-0.35361793637... | |
Bitmap _Dummy = new Bitmap(16, 16, PixelFormat.Format24bppRgb);
static Font _Font = new Font("Arial", 12);
void Main()
{
var elementsAsString = "A 2 ^ 2 A * B * - B 2 ^ + A B - / 2 ^";
var elements = elementsAsString.Split(' ');
var stack = new Stack<Node>();
foreach (var element in elements)
... | [
-0.16086235642433167,
-0.46541696786880493,
0.5082089304924011,
-0.24263134598731995,
0.18574991822242737,
0.3297673761844635,
0.3434126079082489,
-0.5278183221817017,
-0.3795468509197235,
-0.3540458381175995,
-0.47751620411872864,
0.32275390625,
-0.5021852850914001,
0.004595836158841848,
... | |
Node leftOperand = stack.Pop();
stack.Push(new Node(element, leftOperand, rightOperand));
}
else
stack.Push(new Node(element));
Visualize(stack.Pop());
}
void Visualize(Node node)
{
node.ToBitmap().Dump();
}
class Node
{
public Node(string value)
: this(val... | [
-0.2879369556903839,
-0.3598833978176117,
0.4236038029193878,
-0.20982106029987335,
0.4903930723667145,
0.21137283742427826,
0.27319401502609253,
-0.16765308380126953,
-0.2662912905216217,
-0.6012579202651978,
-0.39122188091278076,
0.19679179787635803,
-0.3823188841342926,
0.10582209378480... | |
{
Value = value;
Left = left;
Right = right;
}
public string Value;
public Node Left;
public Node Right;
public Bitmap ToBitmap()
{
Size valueSize;
using (Graphics g = Graphics.FromImage(_Dummy))
{ | [
-0.030376331880688667,
-0.35489484667778015,
0.39126068353652954,
-0.06747551262378693,
0.09271497279405594,
0.3378821015357971,
0.14305073022842407,
-0.28048503398895264,
-0.3209982216358185,
-0.46129876375198364,
-0.39387816190719604,
0.6776576638221741,
-0.2715610861778259,
-0.015944456... | |
var tempSize = g.MeasureString(Value, _Font);
valueSize = new Size((int)tempSize.Width + 4, (int)tempSize.Height + 4);
}
Bitmap bitmap;
Color valueColor = Color.LightPink;
if (Left == null && Right == null)
{
bitmap = new Bitmap(valueSize.Width, valueSize... | [
-0.038587361574172974,
-0.35397064685821533,
0.703222393989563,
-0.39474332332611084,
0.0972607210278511,
0.35667532682418823,
0.3622376024723053,
-0.5450291037559509,
-0.18288852274417877,
-0.6252762675285339,
-0.5825135707855225,
0.4470368027687073,
-0.5541553497314453,
-0.05881976708769... | |
valueColor = Color.LightGreen;
}
else
{
using (var leftBitmap = Left.ToBitmap())
using (var rightBitmap = Right.ToBitmap())
{
int subNodeHeight = Math.Max(leftBitmap.Height, rightBitmap.Height); | [
-0.0919894278049469,
-0.4122844338417053,
0.36864155530929565,
-0.0903991311788559,
0.18747498095035553,
0.10733448714017868,
0.44344043731689453,
-0.45212259888648987,
-0.08426155149936676,
-0.28757792711257935,
-0.29770582914352417,
0.37378036975860596,
-0.2148638516664505,
0.08210151642... | |
bitmap = new Bitmap(
leftBitmap.Width + rightBitmap.Width + valueSize.Width,
valueSize.Height + 32 + subNodeHeight);
using (var g = Graphics.FromImage(bitmap)) | [
-0.35918036103248596,
-0.39171940088272095,
0.5497225522994995,
-0.18044975399971008,
-0.0517117902636528,
0.23054270446300507,
0.1640530377626419,
-0.36905553936958313,
-0.29373249411582947,
-0.5338303446769714,
-0.43943172693252563,
0.5503901243209839,
-0.457708477973938,
-0.123197861015... | |
{
int baseY = valueSize.Height + 32;
int leftTop = baseY; // + (subNodeHeight - leftBitmap.Height) / 2;
g.DrawImage(leftBitmap, 0, leftTop); | [
-0.3110712170600891,
-0.2178855836391449,
0.2705129384994507,
-0.3554769456386566,
0.3320770859718323,
-0.05668550729751587,
0.378863662481308,
-0.4258367419242859,
-0.15501771867275238,
-0.08310497552156448,
-0.7142788171768188,
0.3372756838798523,
-0.15568168461322784,
-0.231984809041023... | |
int rightTop = baseY; // + (subNodeHeight - rightBitmap.Height) / 2;
g.DrawImage(rightBitmap, bitmap.Width - rightBitmap.Width, rightTop);
g.DrawLine(Pens.Black, bitmap.Width / 2 - 4, valueSize.Height, leftBitmap.Width / 2, leftTop);
g.DrawLine(Pens.Black, bi... | [
-0.3923245668411255,
-0.21995759010314941,
0.4542273283004761,
-0.11753803491592407,
0.028895733878016472,
0.3098737299442291,
0.1410338133573532,
-0.5058645009994507,
-0.1822303831577301,
-0.21113644540309906,
-0.6542665362358093,
0.4594866633415222,
-0.28308171033859253,
-0.4115534424781... | |
}
}
}
using (var g = Graphics.FromImage(bitmap))
{
float x = (bitmap.Width - valueSize.Width) / 2;
using (var b = new SolidBrush(valueColor)) | [
0.068160779774189,
-0.37459972500801086,
0.6578166484832764,
-0.21281133592128754,
0.10995782166719437,
0.30880704522132874,
0.28382736444473267,
-0.563201904296875,
-0.06899697333574295,
-0.3938726782798767,
0.20525050163269043,
0.591141939163208,
-0.37218916416168213,
0.03763968497514725... | |
g.FillRectangle(b, x, 0, valueSize.Width - 1, valueSize.Height - 1);
g.DrawRectangle(Pens.Black, x, 0, valueSize.Width - 1, valueSize.Height - 1);
g.DrawString(Value, _Font, Brushes.Black, x + 1, 2);
}
return bitmap;
}
}
bool IsOperator(string s)
{
switch (s)
{
... | [
-0.05531861260533333,
-0.38868728280067444,
0.5109856724739075,
-0.3141460120677948,
0.04790503904223442,
0.5011926889419556,
0.07248704880475998,
-0.6382400989532471,
-0.010669979266822338,
-0.3659512996673584,
-0.28095853328704834,
0.3055564761161804,
-0.46138086915016174,
0.113503940403... | |
"/":
case "^":
case "+":
case "-":
return true;
default:
return false;
}
}
```
Output:
 | [
-0.4346705377101898,
0.31484708189964294,
0.5304796099662781,
-0.2949931025505066,
0.4331185519695282,
0.0742216482758522,
0.04439104348421097,
-0.1185135766863823,
-0.4604959487915039,
-0.33975932002067566,
-0.5107439160346985,
0.7351993322372437,
-0.35295742750167847,
-0.0323901511728763... | |
I am using an XMLTextReader to process an XML file (as opposed to an XMLDocument). I use XMLTextReader so I can use the option to ignore all whitespace.
At certain points I want to read in a node using ReadSubtree. This returns an XMLReader. How can I convert this to a XMLTextReader so I can use the ignore whitespace ... | [
0.10503500699996948,
-0.03309766203165054,
0.3539997935295105,
-0.013655451126396656,
-0.14556322991847992,
-0.12100818008184433,
0.22452883422374725,
-0.05540537089109421,
-0.08519989252090454,
-0.8308562636375427,
0.05019712075591087,
0.44541263580322266,
-0.49141377210617065,
0.20275422... | |
By the way. The ReadSubtree returns an XmlSubtreeReader which is derived from the XmlReader, so you can't cast it to an XmlTextReader directly. | [
0.2662019729614258,
-0.00005231523027759977,
0.2623599171638489,
0.1659148782491684,
-0.17576994001865387,
-0.3786172866821289,
0.23500901460647583,
0.12387652695178986,
0.09502306580543518,
-0.7840797901153564,
-0.21808092296123505,
0.34961235523223877,
-0.3239959180355072,
0.172673970460... | |
I've got some trouble with displaying pdfs in IE7 (which were generated by R&OS' ezpdf).
IE7 with Acrobat Reader 8.1.2. says "The page cannot be displayed"
Other Browsers (like FF3/Acrobat 8.1.2. or IE6/Acrobat 7) have no problem with the file.
The following headers are returned by the server:
> Date: Thu, 08 Jan 2... | [
-0.14706017076969147,
0.48087742924690247,
1.30315101146698,
-0.07080386579036713,
-0.21807244420051575,
-0.37240809202194214,
0.43496817350387573,
0.06667837500572205,
-0.2772182822227478,
-0.42624378204345703,
-0.006627753842622042,
0.35248905420303345,
-0.23270012438297272,
0.3212036490... | |
Content-Length: 4750
>
> Keep-Alive: timeout=5, max=100
>
> Connection: Keep-Alive
>
> Content-Type: application/pdf
Does anybody know how to fix this problem?
> Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
> Pragma: no-cache
...so IE won't store the file in the Temporary... | [
0.20063713192939758,
0.18957294523715973,
0.6536242365837097,
0.14327412843704224,
0.1070718914270401,
-0.4684380292892456,
0.30862921476364136,
0.07444719225168228,
-0.2192467898130417,
-0.7510074973106384,
-0.6800562143325806,
0.27012407779693604,
-0.17226126790046692,
0.2264088839292526... | |
add a '?randomstring' parameter to the URL. Also consider adding a "Content-Disposition: attachment; filename=..." header, which will stop a plug-in trying and failing to display the file in the browser UI. | [
0.12415354698896408,
-0.34194472432136536,
0.08499723672866821,
0.1683693826198578,
-0.1266055852174759,
-0.3958183526992798,
0.06929133832454681,
0.20725132524967194,
-0.03648494556546211,
-0.5713469982147217,
-0.44067105650901794,
0.21566328406333923,
-0.22852107882499695,
0.295993179082... | |
I'm trying to export a program in Eclipse to a jar file.
In my project I have added some pictures and PDF:s. When I'm exporting to jar file, it seems that only the `main` has been compiled and exported.
My will is to export everything to a jar file if it's possible, because then I want to convert it to an extradita... | [
0.4137406051158905,
0.3239976167678833,
-0.12098157405853271,
-0.06859025359153748,
-0.2061997801065445,
-0.11482024937868118,
0.2858610153198242,
0.3857453167438507,
-0.27303504943847656,
-0.8267977237701416,
-0.03359158709645271,
0.6256482601165771,
-0.22059862315654755,
0.19091786444187... | |
(pictures, configuration files, etc...), see screenshot below.
[](https://i.stack.imgur.com/IsQZv.jpg) | [
-0.05880076810717583,
0.24849720299243927,
0.4843166172504425,
-0.04483167827129364,
-0.06827142089605331,
-0.014749210327863693,
0.35081902146339417,
-0.12356298416852951,
-0.4602881073951721,
-0.6404445767402649,
-0.5482831001281738,
0.3701816201210022,
-0.15449438989162445,
0.1513079702... | |
Right now we are using PostgreSQL 8.3 (on Linux) as a database backend to our Ruby on Rails web application.
Considering that on PostgreSQL database we actively use row level blocking and PL/PGSQL, what can we employ to secure our data -- I mean tools, packages, scripts, strategies -- to successfully replicate the dat... | [
0.5090844631195068,
0.23292382061481476,
0.27980753779411316,
0.18561428785324097,
-0.30162662267684937,
-0.275581419467926,
0.2424711287021637,
-0.1429353505373001,
-0.27628329396247864,
-0.8071256279945374,
0.20726527273654938,
0.5474737882614136,
-0.28394582867622375,
0.4354425966739654... | |
to backup data to file system.
Thanks a lot.
There are a few tools for master-slave (and master-multislave) scenarios, usually trigger-based. [Slony-I](http://slony.info/) has already been mentioned (is stable and solid, but a bit difficult to operate). People having problems with Slony-I wrote
[Londiste](https://deve... | [
0.40576720237731934,
-0.24561285972595215,
0.4022830128669739,
0.27138346433639526,
0.18242983520030975,
-0.23593977093696594,
0.060560885816812515,
0.16333310306072235,
-0.5858456492424011,
-0.2380918711423874,
-0.0638195276260376,
0.1445898562669754,
-0.14465337991714478,
-0.075083233416... | |
Question title says it all really - a lot slower than VS2005, with a noticeable (0.5 sec) delay on each key press.
It makes stepping through code a pain.
As Joe90 says, SP1 might help; In addition, do you find that performance improves if you close unnecessary windows in the IDE? Do you have source control integration... | [
0.37256312370300293,
-0.2445242553949356,
0.5035072565078735,
0.2708527445793152,
-0.03616717830300331,
-0.12204252928495407,
0.1923898458480835,
-0.44554856419563293,
-0.2655629515647888,
-0.40414535999298096,
0.08228050917387009,
0.5070101022720337,
0.25739923119544983,
-0.19720435142517... | |
I have a project I am doing some maintenance work on and have got the solution files etc and attempted to build it and have got the following error:-
Error 4 Could not load file or assembly 'TinyMCETextBox' or one of its dependencies. The system cannot find the file specified.
This is a .net 2.0 project. Can anyone g... | [
0.5930064916610718,
0.028530962765216827,
0.04686064273118973,
0.055369582027196884,
0.04772534593939781,
-0.23203115165233612,
0.3471467196941376,
0.041417207568883896,
-0.18619689345359802,
-0.7020140290260315,
0.0543547086417675,
0.37915799021720886,
-0.36251476407051086,
0.278464972972... | |
I referenced this dll but still seem to get the same errors. Can anyone point me in the right direction?
Cheers
As Joe90 says, SP1 might help; In addition, do you find that performance improves if you close unnecessary windows in the IDE? Do you have source control integration, and if so, what provider do you use (TFS... | [
0.25706738233566284,
-0.0052336095832288265,
0.44271165132522583,
0.26688840985298157,
-0.11916901916265488,
-0.44888317584991455,
0.15531110763549805,
-0.15600530803203583,
-0.28471651673316956,
-0.602811872959137,
-0.042977750301361084,
0.6627327799797058,
0.34184396266937256,
-0.1709080... | |
Is there any tricky way to use Java reserved words as variable, method, class, interface, package, or enum constant names?
No, there is no way. That's why they're labeled "reserved". | [
0.02022595889866352,
0.10790388286113739,
-0.16915377974510193,
0.36685001850128174,
0.035270240157842636,
-0.12730394303798676,
0.04017822816967964,
0.27014032006263733,
-0.31250062584877014,
-0.06952004134654999,
-0.046919599175453186,
0.174099862575531,
-0.11833572387695312,
0.276800632... | |
I have the following RegEx
```
id=(.*?) | id="(.*?)"
```
The reason for this is I am trying to replace Ids from the browsers DOM using JavaScript. IE, however strips quotes from element atributes as it appears not to require them in the DOM
The problem I have is that the backrefererences from each alternate stateme... | [
0.1566239893436432,
0.2042115479707718,
0.3831592798233032,
-0.132903590798378,
-0.15145689249038696,
0.005955719854682684,
0.14046700298786163,
-0.5503333210945129,
0.271023690700531,
-0.5770852565765381,
0.09831035882234573,
0.5634541511535645,
-0.3728954792022705,
0.07204281538724899,
... | |
| $2
--------------------------------
id="test1" | test1 |
id=test2 | | test2
```
I just want both backreferences to be added to $1
For your example the following should work:
```
<parameter>
<parameterName value="@Oid" />
<dbType value="Guid" />
<layout type="log4net.Layout.RawPropertyLayou... | [
0.03255783021450043,
0.03728293254971504,
0.07621457427740097,
0.17084725201129913,
0.001097051426768303,
-0.031452346593141556,
-0.050688933581113815,
-0.35833755135536194,
0.054266031831502914,
-0.7791532874107361,
0.2687909007072449,
0.51458340883255,
-0.2786358892917633,
0.047965582460... | |
If I have a simple piece of data to store (an integer or string for example) I might choose to store that in ViewState, or using a HiddenField control.
Why would I choose one over the other?
ViewState
* Hard for the user to decode (thought not impossible), which might be desirable
HiddenField
* Value can be used i... | [
0.4239127039909363,
-0.09673388302326202,
0.22682945430278778,
0.2094140201807022,
-0.10654541850090027,
0.052341360598802567,
0.12281308323144913,
-0.02945021167397499,
-0.06761462986469269,
-0.6506645083427429,
0.2300160676240921,
0.69336998462677,
-0.36372268199920654,
0.147172182798385... | |
Mostly just because there are third party tools ([like this one](http://www.strangeloopnetworks.com/products/AS1000/)) which understand ViewState and which won't understand your custom hidden field. | [
0.5036759376525879,
-0.26260891556739807,
0.32418152689933777,
0.37933751940727234,
0.18841570615768433,
-0.3643399178981781,
0.269060879945755,
0.1856660544872284,
-0.22815239429473877,
-0.297838032245636,
0.31687483191490173,
0.19598999619483948,
-0.13885875046253204,
0.24917230010032654... | |
I would like to provide a horizontal scroll to a textarea in my HTML page. The scroll should appear without wrapping, if I type a long line without a line break. A few friends suggested using overflow-y CSS attribute, which did not work for me. The browsers that I use are IE 6+ and Mozilla 3+.
To set no wrapping, you w... | [
0.5461195707321167,
0.11277752369642258,
0.48601022362709045,
-0.3449733257293701,
-0.22822418808937073,
0.0741276741027832,
0.24399855732917786,
0.04091716185212135,
-0.08209044486284256,
-0.9100328683853149,
-0.04103972390294075,
0.3232578933238983,
-0.2019941210746765,
0.296167552471160... | |
Is there any difference in the performance of the following three SQL statements?
```
SELECT * FROM tableA WHERE EXISTS (SELECT * FROM tableB WHERE tableA.x = tableB.y)
SELECT * FROM tableA WHERE EXISTS (SELECT y FROM tableB WHERE tableA.x = tableB.y)
SELECT * FROM tableA WHERE EXISTS (SELECT 1 FROM tableB WHERE tab... | [
0.13326308131217957,
0.11592594534158707,
0.048452988266944885,
-0.05557288974523544,
-0.227869912981987,
0.09104781597852707,
0.291866660118103,
-0.44553083181381226,
-0.015194742009043694,
-0.35587960481643677,
-0.02743450738489628,
0.7317668199539185,
-0.5350807905197144,
-0.12107964605... | |
not evaluated in an EXISTS clause - you could try:
```
SELECT *
FROM tableA
WHERE EXISTS (SELECT 1/0
FROM tableB
WHERE tableA.x = tableB.y)
```
...and should expect a divide by zero error, but you won't because it's not evaluated. This is why my habit is to specify NULL in an ... | [
0.22244574129581451,
0.26762694120407104,
-0.32734575867652893,
-0.15971389412879944,
-0.07472077012062073,
-0.18788935244083405,
0.6057300567626953,
-0.02907758578658104,
-0.038369931280612946,
-0.38464033603668213,
-0.25231829285621643,
0.24352510273456573,
-0.6592626571655273,
0.2088053... | |
EXISTS (SELECT NULL
FROM tableB
WHERE tableA.x = tableB.y)
```
All that matters in an EXISTS clause is the FROM and beyond clauses - WHERE, GROUP BY, HAVING, etc.
This question wasn't marked with a database in mind, and it should be because vendors handle things differently -- so te... | [
0.4320693910121918,
0.45849138498306274,
0.24826085567474365,
-0.02179824933409691,
-0.1056995615363121,
-0.44388723373413086,
0.6185758113861084,
-0.15527723729610443,
0.02283417619764805,
-0.42386558651924133,
-0.264646977186203,
0.18668390810489655,
-0.47610530257225037,
0.2998178899288... | |
I am reviewing the flags we have for our MSVC projects, and I can't get enough documentation on the following features:
* Use Link Time Code Generation (/ltcg)
* enable function level linking (/Gy)
* Eliminate Unreferenced Data (/OPT:REF)
* Remove Redundant COMDATs (/OPT:ICF)
* optimize for windows98 No (/OPT:NOWIN98)... | [
0.35304003953933716,
-0.024303186684846878,
0.24399380385875702,
-0.12724420428276062,
-0.029277954250574112,
-0.20969420671463013,
0.24263256788253784,
-0.0054312339052557945,
-0.38413935899734497,
-0.7532641291618347,
-0.13724349439144135,
0.5109952092170715,
-0.2170068621635437,
0.02581... | |
you have seperate release and debug builds as discussed [here](https://stackoverflow.com/questions/420343/separate-debug-and-release-builds). If you have a combined debug/release build you will need function level linking in order to use edit and continue in the debugger, which most developers will want.
Of the others... | [
0.30499517917633057,
-0.07759295403957367,
0.20044270157814026,
-0.018557671457529068,
-0.13210591673851013,
-0.23635193705558777,
0.43914490938186646,
0.12913058698177338,
-0.38903144001960754,
-0.4577898681163788,
-0.4839401841163635,
0.5380604863166809,
-0.2271336019039154,
0.1046404466... | |
If I am to follow [What should a developer know *before* building a public web site?](https://stackoverflow.com/questions/72394/what-should-a-developer-know-before-building-a-public-web-site) on authentication, then what options do I have ?
I have never used PEAR, and I'm not about to start. I have read about [phpGALC... | [
0.4376223087310791,
0.08352281898260117,
-0.012256084010004997,
-0.1350620687007904,
-0.07714483141899109,
-0.07101304084062576,
0.08821391314268112,
0.02702341414988041,
-0.1539945751428604,
-0.5094671845436096,
0.3328663408756256,
0.5243449807167053,
0.0625290796160698,
0.018296301364898... | |
there something better ?
If you want a language, then PHP5.
> *I'm not a big fan of using a single tinyint value which desides what a
> user can and cannot do, besides its
> not very flexible.*
That depends... Are you referring to using the value as an integer or as a bitfield?
If you're using it simply as a numbe... | [
0.4255671799182892,
-0.2647536098957062,
0.15768694877624512,
0.3090520203113556,
-0.2761688828468323,
0.005635024048388004,
0.208573579788208,
0.11249471455812454,
-0.35643553733825684,
-0.4284713566303253,
0.16355659067630768,
0.6298593878746033,
-0.13024410605430603,
-0.0655471161007881... | |
in any combination for any user. I'd call that flexible. And, if 8 capabilities isn't enough for you, it's trivial to change the tinyint (8 bits) to a smallint (16 bits/capabilities), int (32 bits), or bigint (64 bits), which should be more than sufficient for just about any application most of us are likely to write. | [
-0.011040780693292618,
-0.35489127039909363,
0.3118877708911896,
0.1456983983516693,
0.15520548820495605,
0.21440555155277252,
0.14179627597332,
-0.2596519887447357,
-0.37627360224723816,
-0.6929910778999329,
-0.008848247118294239,
0.3978983163833618,
-0.1156626045703888,
-0.12150970846414... | |
We're planning to use standard ASP.NET user authentication for our application. However, by default this requires us to have our user database on our web server in the App\_Data folder.
This is usually a **big** no-no for us - our databases are all behind the firewall and all access is done via a WCF Service layer.
I... | [
0.5676101446151733,
0.1053297221660614,
0.3394578695297241,
0.10155507922172546,
0.1976439207792282,
-0.2744198739528656,
0.3246334493160248,
-0.025974800810217857,
-0.0243359487503767,
-0.5705786347389221,
-0.09530659019947052,
0.3342737555503845,
-0.16384762525558472,
0.03252942860126495... | |
Server 2005
Yes, you should worry. No, there is no out-of-the-box solution. ASP.NET only ships with a SQL Membership Provider and an Active Directory membership provider [(reference)](https://web.archive.org/web/20210513220018/http://aspnet.4guysfromrolla.com/articles/120705-1.aspx). You will have to use a custom membe... | [
-0.14754348993301392,
-0.08894732594490051,
0.4482118785381317,
0.06236155331134796,
-0.3139931857585907,
-0.24878378212451935,
0.3588979244232178,
0.08996190130710602,
-0.414614200592041,
-0.2698557376861572,
-0.01136698480695486,
0.3441847562789917,
-0.2543666362762451,
-0.08536845445632... | |
Did anyone try that feature and has some feedback? Or Does anyone know some useful samples to look up?
I have tried this feature some months ago, but I don't use it anymore (just because I don't need it, not because it is not a good feature).
Basically, you define n Axis, each axis is a property with several values.
... | [
0.10193359106779099,
0.20284515619277954,
0.2208171933889389,
-0.20321397483348846,
0.02729264460504055,
0.2705900967121124,
0.043226003646850586,
-0.4193035066127777,
-0.21484403312206268,
-0.39457762241363525,
0.6027300357818604,
0.7479535937309265,
-0.19950316846370697,
0.26631626486778... | |
the JVM is launched with -Ddatabase=oracle)
* with JDK 1.5, with the property database=oracle
* with JDK 1.6, with the property database=oracle
* with JDK 1.4, with the property database=mysql
* with JDK 1.5, with the property database=mysql
* with JDK 1.6, with the property database=mysql
Then, once everything is fin... | [
-0.0008853718754835427,
-0.02012549713253975,
0.7134691476821899,
-0.2812795042991638,
-0.11791941523551941,
-0.15409399569034576,
0.16217482089996338,
-0.18187852203845978,
-0.14097613096237183,
-0.618330180644989,
-0.14006875455379486,
0.6694187521934509,
-0.18184520304203033,
0.20079900... | |
In my example, the application must take into account the "database" property itself. Eventually, a good idea is to use this property to enable a particular profile in the Maven2 configuration, if you project is mavenized (see [here](http://maven.apache.org/guides/introduction/introduction-to-profiles.html) for more de... | [
0.3947131335735321,
0.002212155144661665,
0.13380809128284454,
0.11064537614583969,
0.2610757350921631,
-0.29337966442108154,
0.2951117157936096,
-0.06662052124738693,
-0.09491229057312012,
-0.7837196588516235,
-0.07518547773361206,
0.6374416351318359,
-0.06120285764336586,
0.0365121662616... | |
I'm writing an application that is currently a pure QT4 app. It is designed to run cleanly on both Linux and Windows.
However I plan to integrate it a bit into KDE in future and here come the problems with localization/translations.
QT4 uses its own tr()/tr().arg().arg() mechanism and .ts/.qm files.
KDE4 uses gettext... | [
0.25027263164520264,
0.06229725852608681,
0.8377410769462585,
-0.22475403547286987,
-0.3581116497516632,
-0.03394828736782074,
0.5601204037666321,
-0.0017555454978719354,
0.20916810631752014,
-0.9484884142875671,
-0.1789870411157608,
0.6459918022155762,
-0.37880560755729675,
0.113300144672... | |
When a user request comes in, I can use Context.Request.UserHostAddress to get the user's IP address. How can I get the IP address of the website/server at runtime? I have some reporting code that can be used by multiple websites on the same server, and each website uses a different IP address. So I need to be able to ... | [
0.1196584403514862,
0.01830979250371456,
0.7431793808937073,
0.10081129521131516,
-0.03403845429420471,
-0.032533079385757446,
0.26990294456481934,
-0.3039279878139496,
-0.36256885528564453,
-0.917387843132019,
-0.11557301133871078,
0.3903902769088745,
-0.26974573731422424,
0.2140250653028... | |
I want to handle F1-F12 keys using JavaScript and jQuery.
I am not sure what pitfalls there are to avoid, and I am not currently able to test implementations in any other browsers than Internet Explorer 8, Google Chrome and Mozilla FireFox 3.
Any suggestions to a full cross-browser solution? Something like a well-tes... | [
0.18995456397533417,
0.11037586629390717,
0.060266025364398956,
0.00185915466863662,
-0.08722299337387085,
0.06610281020402908,
0.3128443658351898,
0.09531307965517044,
-0.2901037335395813,
-0.5795716047286987,
0.17561206221580505,
0.6007447242736816,
-0.13951709866523743,
-0.1085769236087... | |
This is my first post and I'm quite a novice on C++ and compiling in general.
I'm compiling a program which requires some graphs to be drawn. The program create a *.dat file and then i should open gnuplot and write plot '*.dat'. That's fine.
Is there a way to make gnuplot automatically open and show me the plot I nee... | [
0.41708025336265564,
-0.13793131709098816,
0.3317694067955017,
0.467903196811676,
-0.526593029499054,
-0.27670857310295105,
0.12770791351795197,
0.2966005802154541,
-0.158316969871521,
-0.6288866996765137,
0.039147961884737015,
0.1225709319114685,
-0.3603668510913849,
0.006935304030776024,... | |
This would let you spawn a gnuplot process and just just write to it like any other FILE\*.
If you have datapoints to plot, you can pass them inline with the *plot "-" ...* option. Similarly, you may want to explore *set data style points/lines/linespoints/etc* options.
---
Without pause or persist, gnuplot will ter... | [
0.11648644506931305,
-0.40099284052848816,
0.6398450136184692,
0.19055692851543427,
-0.3347730338573456,
-0.1286802738904953,
-0.21951699256896973,
0.13732513785362244,
-0.3354768753051758,
-0.8135298490524292,
-0.20923160016536713,
0.2656576335430145,
-0.5855896472930908,
0.25864204764366... | |
the file!
You may want to use *set size 2,2* to make a larger graph. Some *set terminal* variants also allow you to specify the size. | [
0.2605539858341217,
-0.2342943549156189,
0.593643844127655,
0.035781122744083405,
-0.015492741949856281,
-0.2743021249771118,
0.01760846935212612,
0.17365184426307678,
-0.5972710847854614,
-0.7149720788002014,
-0.2445833683013916,
0.2887330949306488,
-0.4367196261882782,
0.0339863970875740... | |
I am looking at improving a package that I believe not to be threadsafe when its input is shared between multiple worker threads. According to TDD principles, I should write some tests that fail in the first instance, and these would certainly be useful in assessing the problem.
I realise that this is not a simple thi... | [
0.3922910988330841,
-0.08023229241371155,
0.027753125876188278,
0.02589322254061699,
-0.033763986080884933,
-0.06398975104093552,
0.04585877060890198,
-0.13670088350772858,
-0.1211811825633049,
-0.7638335824012756,
0.12298866361379623,
0.4835495352745056,
-0.20989899337291718,
0.0568827874... | |
I knew in advance exactly where the existing implementation fell down, and thus was able to cook up a nice set of tests that covered it.
However, if you're not at the point where you know exactly what the problem is, is there a good way of going about writing a test that stands a good chance of throwing up any potenti... | [
0.34309351444244385,
0.17478936910629272,
-0.27006620168685913,
0.24729536473751068,
-0.013786804862320423,
-0.03137616068124771,
0.28904569149017334,
-0.061701878905296326,
-0.2732972800731659,
-0.3696514964103699,
0.19361957907676697,
0.6701334714889526,
-0.08184274286031723,
-0.16665084... | |
test, only run with multiple worker threads as appropriate?
Any offers on tools/best practices/philosophy in general would be welcome.
Forget getting good results by testing for concurrency problems. Attempt to reduce synchronization and make the problem smaller. Then use as high as possible library support to do sync... | [
0.5108959674835205,
-0.11172572523355484,
-0.12257887423038483,
0.4266228973865509,
-0.17102806270122528,
-0.20110638439655304,
0.44044801592826843,
-0.12230364978313446,
-0.2737700045108795,
-0.6341066360473633,
0.11672167479991913,
0.5963786244392395,
-0.16397050023078918,
-0.08804176002... | |
not testing any units anymore. (Remember, you already had that part covered)
If your concurrency model gets complicated check out tools suited for that like [SPIN](http://spinroot.com/spin/whatispin.html). | [
0.44286468625068665,
-0.35104304552078247,
0.08008281886577606,
0.24278555810451508,
0.19122090935707092,
-0.6305471062660217,
0.3187641203403473,
0.11112853139638901,
-0.4279297888278961,
-0.28598734736442566,
0.2914366126060486,
0.20234210789203644,
-0.12316861003637314,
0.15150377154350... | |
Can you guys tell me the difference between them?
By the way, is there something called C++ library or C library?
The `C++ Standard Library` and `C Standard Library` are the libraries that the C++ and C Standard define that is provided to C++ and C programs to use. That's a common meaning of those words, i haven't eve... | [
0.6895539164543152,
0.31875160336494446,
-0.0211990624666214,
0.243916317820549,
-0.018254457041621208,
-0.23741814494132996,
-0.10621537268161774,
0.08263347297906876,
-0.25359073281288147,
-0.31205564737319946,
-0.2530227303504944,
0.7009113430976868,
-0.13021603226661682,
-0.16045519709... | |
by certain parts of the C++ language, such as memory allocation (5.3.4, 5.3.5) and exception processing (clause 15).
`C++ Runtime Library` and `C Runtime Library` aren't so equally used. Some say a runtime library is the part that a program uses at *runtime* (like, the code that implements `std::type_info` or the code... | [
0.36199405789375305,
-0.08266441524028778,
0.07902555912733078,
0.06828049570322037,
-0.12322337180376053,
-0.20146596431732178,
-0.09678090363740921,
-0.049175117164850235,
-0.41695448756217957,
-0.49692302942276,
-0.33504223823547363,
0.32788872718811035,
-0.6252830028533936,
-0.00806637... | |
shared library or dynamically linked library are better terms for that.
`C++ Library` and `C Library` are very broad terms. They just mean that a library is written in C++ and/or C.
The above is not only limited to C++ and/or C. There are python libraries and there is a python [Standard Library](http://docs.python.o... | [
0.4360382556915283,
-0.1130845919251442,
-0.2158566564321518,
0.3150668144226074,
-0.20505458116531372,
-0.33276697993278503,
-0.20519787073135376,
0.37169358134269714,
-0.5562527179718018,
-0.4563934803009033,
-0.25485265254974365,
0.2883433699607849,
-0.2661123275756836,
0.21310620009899... | |
consider the following http request:
```
GET /defects?group-by=priority
```
I would like the returned collection(feed) of defects to be grouped by their priority. i.e. the returned feed consists of defects(resources) and group infromation.
I thought about something that will return the groups' titles and count befo... | [
0.06975211203098297,
0.08375140279531479,
-0.0337277352809906,
0.15134267508983612,
-0.161479189991951,
0.24731089174747467,
-0.004409984219819307,
-0.2553737461566925,
-0.3250686526298523,
-0.6033216118812561,
-0.38521644473075867,
0.28750181198120117,
-0.20249706506729126,
0.414202749729... | |
will return collection of groups and their count, and then the client can query the defects resource for the data itself. But this design is cumbersome and requires extra round trips, not to mention possible consistency problems when defects was added\removed between the call to the group resource and the defects resou... | [
0.0469476580619812,
0.025160226970911026,
0.10231755673885345,
0.1778351068496704,
-0.2647528648376465,
-0.03379013016819954,
0.2421450912952423,
-0.2998906970024109,
-0.259097158908844,
-0.5492298007011414,
-0.10500715672969818,
0.4601958096027374,
-0.40888136625289917,
-0.206888914108276... | |
so I am looking for a pattern more inherent in the RESTful approach.
I don't think what you are asking for is possible.
If the client is expecting a collection of defects, then you can order by priority, but
```
a group of defects != a defect
```
So you can't return a collection of groups.
You could add a nasty h... | [
0.2270307093858719,
0.21095068752765656,
-0.2964225113391876,
0.068138986825943,
-0.1502227634191513,
-0.02290118858218193,
0.22488969564437866,
0.11409801244735718,
-0.31213149428367615,
-0.5345243215560913,
-0.16506578028202057,
0.6148213148117065,
-0.47778046131134033,
0.065681718289852... | |
and counting of the resources
in each group. | [
0.10834813117980957,
0.46378034353256226,
-0.2799849510192871,
0.10815896093845367,
0.18834996223449707,
0.28017809987068176,
-0.060170263051986694,
-0.3303599953651428,
-0.33800747990608215,
-0.5195682048797607,
0.22966733574867249,
0.5814157128334045,
-0.056932736188173294,
-0.1660519689... | |
In my project I have put all my css classes in the style sheets.
The structure I am following was
Have a global.css file, which will have all the global styles.
And then for each .aspx page one style sheet which will be particular for that file.
Although I am talking about the asp.net this should not make any di... | [
0.2041032314300537,
0.03362337127327919,
0.11482921242713928,
0.10276748985052109,
-0.25399982929229736,
-0.046370942145586014,
0.007245676126331091,
0.09935200959444046,
-0.49697569012641907,
-0.6798579096794128,
0.1376212239265442,
0.10062946379184723,
-0.11227394640445709,
-0.0674941912... | |
.aspx page seems to defeat its purpose, namely reusability, etc. I suppose if each page is really that unique from a style perspective, maybe it's necessary, but I'd work on getting away from that format.
I usually have a master css file, then perhaps additional ones for other major portions of my site (such as a priv... | [
0.516994833946228,
0.05676821246743202,
0.370152086019516,
0.17311161756515503,
-0.2409398853778839,
-0.5404279828071594,
0.1857745498418808,
0.2718563377857208,
-0.30154016613960266,
-0.6330128908157349,
-0.03719649836421013,
0.08200226724147797,
-0.07986901700496674,
-0.15096421539783478... | |
For a little background, I work for a firm that develops web-based enterprise social media platforms. We have a diverse clientele and our mantra is that we bring our clients closer to their clients. Basically, usability should be a very, very important consideration for us throughout the product lifecycle.
However, my... | [
0.7637027502059937,
0.46059587597846985,
0.12860792875289917,
0.09759165346622467,
0.020295128226280212,
0.01680709980428219,
0.37591543793678284,
0.2532612979412079,
-0.03296976909041405,
-0.5376811027526855,
0.12149115651845932,
0.6217617988586426,
0.25826361775398254,
0.0415674373507499... | |
change this, because I see Usability as saving us money in many ways: decreased QA iterations, building our business knowledge for future product development, increased sales confidence, etc.
The problem, though, is that nobody seems very interested. Management is concerned about the overhead incurred by changing our... | [
0.6245508790016174,
0.28357425332069397,
0.23259156942367554,
0.38398051261901855,
0.022936787456274033,
0.0482131764292717,
0.18712007999420166,
0.34830164909362793,
-0.20863156020641327,
-0.6218660473823547,
0.06752686947584152,
0.5783765316009521,
0.2117077261209488,
0.1852233111858368,... | |
advance!
Managers and sales people, especially in this climate, have exactly one thing on their mind: how to make the most amount of money with the least amount of effort.
You will need hard sales or financial numbers to show real ROI to your execs. Otherwise, all of the talking in the world isn't going to move them. ... | [
0.4993191063404083,
0.022037502378225327,
0.1795629858970642,
0.21075604856014252,
0.3806755244731903,
0.17720748484134674,
-0.15863144397735596,
0.12663114070892334,
-0.21804144978523254,
-0.6884653568267822,
-0.023477330803871155,
0.7336252331733704,
0.3912063539028168,
0.184086456894874... | |
I am writing a website in my spare time for an educational facility and from what I've read on the statistics of this place they seem to have many disabled students studying there. Simply put, I'm setting up an account system where students can log in and receive basic information about their courses, allowing them to ... | [
1.0236806869506836,
0.48065000772476196,
0.04155537858605385,
-0.040064286440610886,
0.26919496059417725,
0.02189459837973118,
0.4294775724411011,
0.4283299148082733,
-0.3019048571586609,
-0.32781991362571716,
0.19421282410621643,
0.22993315756320953,
0.4534893333911896,
-0.041462432593107... | |
to be accessible to those with disabilities. The code is perfectly fine, apart from one problem; the CAPTCHA.
As far as I am aware most CAPTCHAs are image-based, which will make those using screen readers struggle. On top of that, ones that support sound readings may not work too well as in many buildings there are no... | [
0.37656134366989136,
0.20171193778514862,
0.1755644977092743,
0.34872913360595703,
0.2686808705329895,
-0.077339306473732,
0.7822951674461365,
0.03624039515852928,
-0.3840791583061218,
-0.5408995747566223,
0.011129560880362988,
0.49165672063827515,
-0.23282192647457123,
-0.2589742839336395... | |
but it's still an interesting question for those that have an interest in accessibility. Does anyone know of a good way to keep spammers out and users in within this environment?
First of all, yes you are 100% correct that it is an issue. Any captcha that provides images with garbled text are NOT accessible to screenre... | [
0.5148193836212158,
0.24474039673805237,
0.36822938919067383,
0.34363341331481934,
-0.33592239022254944,
-0.496544748544693,
0.5532476902008057,
0.10228410363197327,
-0.11768176406621933,
-0.6041131615638733,
0.026967037469148636,
0.6276315450668335,
-0.19526715576648712,
0.038619022816419... | |
have a "can't see the image" link, that takes them to a less secure captcha, if you really need to have one. It really depends on the purposes of your site. Simple math can work, but it is a bit harder to do.
But given your system, I'd almost say that you limit the system to authenticated users for input, and then no... | [
0.5678941011428833,
-0.2007911056280136,
0.2563825249671936,
0.1694074124097824,
-0.15557104349136353,
-0.35182052850723267,
0.6346936225891113,
0.29712405800819397,
-0.4893668591976166,
-0.413526326417923,
-0.22666896879673004,
0.2432611584663391,
-0.34497442841529846,
-0.0003777142846956... | |
Ok. So I am pretty new a this. I have a datatable that I want to pass to a stored procedure for further manipulation. I have read some stuff on the web and it looks like I should be able to convert the datatable to XML and then pass that to the stored procedure. What am I doning wrong? I have SQL server 2005. The data ... | [
0.2684122323989868,
0.29340121150016785,
0.3763459622859955,
0.0020317761227488518,
-0.04896096885204315,
-0.1571892946958542,
0.10775721073150635,
0.02313867211341858,
-0.4112052917480469,
-0.5152161717414856,
0.18693163990974426,
0.5641092658042908,
-0.16582511365413666,
0.30562144517898... | |
Dim ds As New DataSet
ds.Tables.Add(dt)
Dim x As XmlDocument
x.LoadXml(dt.DataSet.GetXml)
Dim ta As New dsTestTableAdapters.TESTRxTableAdapter
ta.ProcessFile(x)
End Sub
```
The Stored procedure looks like this...
```
ALTER PROCEDURE [dbo].[ProcessFile]
(
@x XML
)
AS
BEGIN
'DO ... | [
0.2981674373149872,
-0.443193644285202,
0.7394077181816101,
-0.04448610171675682,
-0.2999243438243866,
-0.20064617693424225,
0.4009769558906555,
-0.4934581518173218,
-0.05839044600725174,
-0.33355027437210083,
-0.3962714970111847,
0.35541146993637085,
-0.4809955060482025,
0.33118936419487,... | |
With my aspect, I track the changes on certain collections by advising certain method calls on instances of `java.util.Set`, notably `add(Object)` and `remove(Object)`. Since the changes are not reflected in the collection itself, invocations of `Set.contains(Object)` or `Set.size()` return wrong results.
Therefore I ... | [
0.45427149534225464,
0.029949191957712173,
0.18739426136016846,
-0.2542896568775177,
0.16703392565250397,
0.02584032155573368,
0.2993829548358917,
-0.3473864495754242,
0.011260404251515865,
-0.42459166049957275,
-0.021979747340083122,
0.8685182929039001,
-0.5092918872833252,
-0.04337275773... | |
&& !add(/*...*/) {
if (notApplicable())
return proceed(c);
return proceed(getUpToDateCollection());
}
// matches Collection.contains(Object), ...
* around(Collection c, Object arg) : call(* Collection.*(*)) && target(c) && args(arg)
&& !remove(/*...*/) && !add(/*...*/) {
if (notApplic... | [
0.1102781593799591,
0.19203315675258636,
0.6083582639694214,
-0.3682222366333008,
0.35188528895378113,
0.17690996825695038,
0.3319520950317383,
-0.5440618991851807,
0.13913016021251678,
-0.37555554509162903,
-0.1266716718673706,
1.0162150859832764,
-0.4476548731327057,
-0.13677653670310974... | |
be woven for both pointcuts, much like this:
```
* around(Object[] args): call(* Collection.*(..)) && args(arr) {...}`
```
Is this possible at all? I have the feeling it's not, because in one of the pointcuts I expose the argument (and subsequently use it in the advice) and in the other there is no argument, so it s... | [
0.13527047634124756,
-0.13126903772354126,
0.3667401969432831,
0.05355843901634216,
0.006937518250197172,
-0.1546042114496231,
0.3171018660068512,
-0.21383178234100342,
-0.34110555052757263,
-0.8335111737251282,
0.0418161079287529,
0.22714650630950928,
-0.2835511267185211,
0.00684396410360... | |
I'd like to profile a program that forks and spawns several child processes. I want to see how much time is spent in some of the functions. What profiler can handle this job?
[Oprofile](http://oprofile.sourceforge.net/news/) works well for this. | [
0.4360160231590271,
-0.04458175227046013,
-0.12757077813148499,
0.22251419723033905,
0.2906606197357178,
0.02280743233859539,
-0.12291577458381653,
0.3401738405227661,
-0.21597686409950256,
-0.4738781750202179,
0.3088725507259369,
0.5360859036445618,
0.1378192901611328,
-0.0265057925134897... | |
Just a general question about what the best practice is:
```
public void Foo()
{
int x = 5;
myControl.Click += (o, e) =>
{
x = 6;
};
}
```
Notice, I'm using the `x` variable inside my lambda event handler.
OR:
```
public class Bar
{
private int x = 5;
public void Foo()
{
... | [
0.2369767725467682,
-0.07111931592226028,
0.41464465856552124,
-0.318754106760025,
0.31857892870903015,
-0.18559306859970093,
0.2426043599843979,
-0.27488577365875244,
-0.17904390394687653,
-0.4628283977508545,
-0.32449135184288025,
0.8214017152786255,
-0.37284228205680847,
0.0825117677450... | |
}
private void myControl_Click(object sender, EventArgs e)
{
x = 6;
}
}
```
Here, `x` is a private member of the class, and therefore I have access to it in my event handler.
Now let's say I don't need `x` anywhere else in the code (for whatever reason), which method is the better way to go?
It... | [
-0.1794310063123703,
-0.10221320390701294,
0.04569356143474579,
-0.14627960324287415,
0.14535538852214813,
-0.2035212218761444,
0.2821093499660492,
0.09999819099903107,
-0.023670533671975136,
-0.5502970218658447,
-0.13965873420238495,
0.5703710913658142,
-0.39218810200691223,
0.33012345433... | |
I think that using a closure in terms of your first example serves no purpose since X isn't used anywhere, so it's hard to determine based on your examples.
That being said, it is generally best to treat event handlers (that you create in code) as you would variables. Scope them as narrowly as you can, and refactor th... | [
0.4234113097190857,
-0.3541155457496643,
0.528872549533844,
-0.18025143444538116,
-0.03522372618317604,
-0.14119572937488556,
0.1451406180858612,
-0.09049385786056519,
-0.501377284526825,
-0.5722576379776001,
-0.03823203220963478,
0.5659663081169128,
-0.5849801301956177,
0.141534686088562,... | |
List<Action<string>> callBacks;
public MyClass()
{
callBacks = new List<Action<string>>();
myButton.Click += myButton_Click;
}
private myButton_Click(object sender, EventArgs e)
{
foreach (Action<string> callBack in callBacks)
{
callBack("Button was clicked");
}
}
public void Subscribe(Act... | [
-0.016480600461363792,
-0.5201390981674194,
0.6329436302185059,
-0.44837167859077454,
-0.18057025969028473,
0.40094953775405884,
0.27097150683403015,
-0.37875744700431824,
-0.47785571217536926,
-0.38823479413986206,
-0.3495346009731293,
0.5227441191673279,
-0.5821354985237122,
0.0090258559... | |
I've been developing a very large LOB app using my flavor of M-V-VM which I call M-V-MC (Model-View-ModelController), which is a kind of a combination between M-V-C and M-V-VM. I had posted [this answer](https://stackoverflow.com/questions/322612/what-are-the-most-common-mistakes-made-in-wpf-development#322679) regardi... | [
0.13363294303417206,
-0.00007602151890750974,
0.6557533144950867,
-0.08822648972272873,
-0.12476692348718643,
0.24729037284851074,
0.0013187326258048415,
-0.3291153907775879,
-0.5994005799293518,
-0.33698782324790955,
-0.14615879952907562,
0.40414944291114807,
-0.1410970240831375,
0.073131... | |
Solution: create an event in
> the VM for the View to subscribe to?
When I originally started M-V-VM development I had this notion that EVERYTHING should live in the ViewModel, and have studied a lot of examples from guys like [Josh Smith](http://joshsmithonwpf.wordpress.com/) and [Karl Shifflett](http://karlshifflet... | [
0.244578555226326,
-0.3670097887516022,
0.3759307861328125,
0.031524498015642166,
0.03924340382218361,
0.04431033134460449,
0.1269100457429886,
-0.06646096706390381,
-0.20107734203338623,
-0.6960759162902832,
-0.21346509456634521,
0.5269688367843628,
-0.4188371002674103,
0.1077517122030258... | |
Clicking the button fires the EditCustomerCommand which opens a popup window which allows me to edit all the properties of the CustomerVM. Where does this EditCustomerCommand live? If it involves opening a window, (UI functionality), shouldn't it be defined in the code-behind of the view?
 does show new content in the current window, NewWindow() creates a new Window, populates it with the content and shows it.
Of course my viewmodels have no clue which view to show. But they do know which viewmodel they want to show, so according to your example when D... | [
-0.19730310142040253,
-0.8388763070106506,
0.6786293387413025,
0.39466702938079834,
0.2316853106021881,
-0.4419909715652466,
-0.07910637557506561,
0.036036256700754166,
-0.47604575753211975,
-0.5520861744880676,
0.024409446865320206,
0.6197470426559448,
-0.2834591269493103,
0.4735499322414... | |
the navigation service?**
My viewmodel class has a property for the navigation controller:
```
public class ViewModel
{
public INavigation Navigator { get; set; }
[...]
}
```
When a viewmodel is attached to a window (or whatever displays the view), the window will set the Navigator property, so the viewmodel ca... | [
0.2095792591571808,
-0.17270824313163757,
0.665642261505127,
0.10327300429344177,
-0.027843859046697617,
-0.14419130980968475,
0.1517336517572403,
-0.058047059923410416,
0.1396116018295288,
-0.9539251327514648,
-0.022425293922424316,
0.8043416738510132,
-0.397260457277298,
0.12974521517753... | |
the name of the view, but it works *cough*
Type vt = Type.GetType(vmt.AssemblyQualifiedName.Replace("ViewModel, ", "View, "));
return (FrameworkElement)Activator.CreateInstance(vt, viewmodel);
}
```
Of course the view needs a constructor accepting the viewmodel as parameter:
```
public partial class ValidateCus... | [
-0.18396355211734772,
-0.18355602025985718,
0.8114631175994873,
-0.2807284891605377,
-0.16439194977283478,
0.20730765163898468,
0.3128792941570282,
-0.1414899230003357,
-0.047900792211294174,
-0.7378731966018677,
-0.35515567660331726,
0.5597606897354126,
-0.14455053210258484,
0.24375395476... | |
}
public MainWindow(ViewModel newcontrol)
{
InitializeComponent();
NewContent(newcontrol);
}
#region INavigation Member
public void NewContent(ViewModel newviewmodel)
{
newviewmodel.Navigator = this;
FrameworkElement ui = App.CreateView(newviewmodel);
this.Content = ui;
this.DataCo... | [
-0.17422273755073547,
-0.33211833238601685,
1.1041754484176636,
-0.0919400304555893,
0.15599201619625092,
-0.029962224885821342,
0.4170371890068054,
-0.21236652135849,
-0.14961925148963928,
-1.020054817199707,
-0.44659605622291565,
0.5136700868606567,
-0.3171652555465698,
0.380422949790954... | |
can be mocked easily.
I'm not really sure if this is a perfect solution, but it works nicely for me right now. Any ideas and comments are welcome! | [
0.32375290989875793,
0.21383854746818542,
0.32888203859329224,
0.39768773317337036,
-0.07887070626020432,
-0.0075888424180448055,
0.18073566257953644,
0.3790542781352997,
0.011820252984762192,
-0.5391759872436523,
0.05099374055862427,
0.45567071437835693,
0.15405108034610748,
0.08803472667... | |
When a select field is changed, I would like to loop through all of the input values in the form it belongs to using jQuery. This doesn't work below, but I can't figure out exactly how to do this.
```
$("select.mod").change(function(){
$(this).parent().get(0).$(":input").each(function(i){
alert(this.name + " =... | [
0.1266217976808548,
-0.2793942391872406,
0.3937288224697113,
-0.32490071654319763,
0.21828213334083557,
0.03389093279838562,
0.15356417000293732,
-0.23005588352680206,
-0.0484139546751976,
-0.5979244112968445,
-0.32146626710891724,
0.4380073547363281,
-0.5938228964805603,
0.306113481521606... | |
element; but the first one might not be the form tag. I'd try this:
```
$("select.mod").change(function(){
$(this).parents('form') // For each element, pick the ancestor that's a form tag.
.find(':input') // Find all the input elements under those.
.each(function(i) {
alert(this.name ... | [
0.04966835305094719,
-0.22343797981739044,
0.18785810470581055,
-0.2809917628765106,
0.28445589542388916,
0.07731950283050537,
0.17456024885177612,
-0.4946524500846863,
-0.003578810254111886,
-0.7720643877983093,
-0.15255703032016754,
0.2818277180194855,
-0.4942215085029602,
-0.01101001538... | |
bigger problems than a jQuery selector... | [
-0.25552666187286377,
0.22008895874023438,
-0.2852354645729065,
-0.01067377720028162,
-0.3206174075603485,
-0.028037594631314278,
-0.24952398240566254,
-0.274506539106369,
-0.07947960495948792,
-0.6466943025588989,
0.13137532770633698,
0.30732306838035583,
-0.030819926410913467,
0.15659277... | |
I just bought a new, sub-US$1,000 laptop, one aimed squarely at the consumer, non-developer market and, looking over the specs, was surprised to find that it came standard with a dual-core processor.
This led me to the question: with multicore machines becoming the norm, is it *ever* correct to write a single-threaded... | [
0.32368576526641846,
0.09445606917142868,
-0.0865221619606018,
0.16872714459896088,
0.1519179493188858,
0.08800184726715088,
0.1511230170726776,
0.330102801322937,
-0.35971856117248535,
-0.4210946559906006,
0.0002873688063118607,
0.6569790840148926,
-0.20008093118667603,
0.1461804360151291... | |
across cores when no guidance is given by the application as to how to optimize such a split?
Since threading always adds extra complexity to applications, **I believe that single threaded applications will always have their place.**
Not even when single core processors are completely obsolete will single threaded pro... | [
0.3015439510345459,
0.004007133189588785,
0.2717028558254242,
0.3252328634262085,
0.10072772204875946,
-0.2996402382850647,
0.4512752890586853,
0.3853816092014313,
-0.7332974672317505,
-0.6309273838996887,
-0.1776524931192398,
0.1095854640007019,
-0.22066690027713776,
0.4291202425956726,
... | |
good reason not too.** | [
0.6389268040657043,
0.17543843388557434,
0.10357973724603653,
0.11266685277223587,
0.25592145323753357,
-0.14007754623889923,
0.47879794239997864,
-0.21004511415958405,
-0.16320212185382843,
-0.13528187572956085,
0.11859135329723358,
0.6576112508773804,
0.08051633834838867,
-0.073594443500... | |
I'm in Eclipse writing Java. I come from Visual Studio with Resharper writing C#.
When Content Assist comes up, I see all the private members of a class, even though I'm not editing that class. Is there a way I can turn that off?
It's really distracting.
Window -> Preferences -> Java -> Editor ->Content Assist -> Hid... | [
0.3288160264492035,
0.06061236560344696,
0.0929267406463623,
-0.10532138496637344,
-0.4405899941921234,
-0.12867829203605652,
-0.039460714906454086,
0.0674017071723938,
-0.0003728540614247322,
-0.8323525786399841,
0.09847179800271988,
0.4274985194206238,
-0.09444480389356613,
-0.0992475971... | |
I have a friend who has code like this in his wordpress files:
> Blockquote
> \x66\x75\x6e\x63\x74\x69
> Blockquote
And so on...
How do I decode this? Is there an online tool to do it?
You can decode it online using the 'Hex to ASCII' tool at:
<http://www.yellowpipe.com/yis/tools/encrypter/index.php>
You don't p... | [
0.4548236131668091,
0.047794148325920105,
-0.1988397091627121,
0.058965153992176056,
-0.03799014538526535,
0.12579642236232758,
0.35254526138305664,
0.17312325537204742,
-0.07082834839820862,
-0.9209617376327515,
-0.07949358969926834,
-0.1144527941942215,
-0.4760802984237671,
-0.1808115839... | |
I have the following SQL Statement. I need to select the latest record for each System.Id using the System.RevisedDate
```
SELECT [System.Id],[System.RevisedDate], [System.Title], [System.State], [System.Reason], [System.CreatedDate], [System.WorkItemType], [System.TeamProject],
[Microsoft.V... | [
0.17206335067749023,
-0.04146520793437958,
0.6882484555244446,
0.11226243525743484,
0.2075825184583664,
0.24877268075942993,
-0.07602787762880325,
-0.3574816882610321,
-0.15076486766338348,
-0.7057528495788574,
0.07347405701875687,
0.12796522676944733,
0.11949312686920166,
0.16634328663349... | |
([System.TeamProject] NOT LIKE '%Sandbox%')
```
Can you please help?
Try this:
```
SELECT * FROM WorkItems w
JOIN (
SELECT [System.Id],MAX([System.RevisedDate])
FROM WorkItems
WHERE ([System.WorkItemType] = 'Change Request')
AND ([System.CreatedDate] >= '09/30/2008')
AND ([System.TeamProject] NOT LIKE '%Delete... | [
-0.16610252857208252,
-0.3616146445274353,
0.2452785074710846,
-0.04588906839489937,
0.10977974534034729,
0.22657103836536407,
0.007982837036252022,
-0.40618616342544556,
-0.19118507206439972,
-0.7505487203598022,
-0.03867873176932335,
0.3595232665538788,
-0.24330347776412964,
0.0826100930... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.