text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
Just finishing off an update to an application written in VB.NET that used to run fine under CE.NET 4.2. Deployment platform is now Windows Mobile 6.1.
The application runs in full screen, however whenever a new form is opened, the task bar, i.e. the bar with the start button comes to the fore and then the new form t... | [
0.544212818145752,
0.09116474539041519,
0.7937226891517639,
-0.3919450640678406,
0.08829304575920105,
-0.1911284178495407,
0.33390459418296814,
-0.05530567467212677,
-0.4325593411922455,
-0.6782235503196716,
-0.08943767845630646,
0.518177330493927,
-0.011305046267807484,
0.1390152126550674... | |
like `/Wix/processing-instruction('define')` may work for an XPath (whether or not MSBuild recognizes that, I don't know).
By plugging that into [SketchPath](http://pgfearo.googlepages.com/), I was able to click around in it and test various XPaths to see what would select that element. | [
0.2630363702774048,
-0.270521879196167,
-0.026547422632575035,
-0.035332318395376205,
0.19046948850154877,
-0.1875074803829193,
0.0796719491481781,
0.1178109273314476,
0.13870912790298462,
-0.4830617606639862,
0.21791505813598633,
0.45899155735969543,
-0.4448356628417969,
-0.30222296714782... | |
What does the **utmscr** and/or **utmcct** values mean in reference to the Http cookie Server variable? Are they acronyms or short for something?
We are getting Elmah errors with the title "System.Web.HttpException: Unable to validate data." In each Elmah error message, the Http Cookie server variable value contains a... | [
0.264841228723526,
0.49198880791664124,
0.1375415176153183,
0.19102564454078674,
-0.010070511139929295,
-0.018433047458529472,
0.7208035588264465,
0.061713773757219315,
-0.1902642697095871,
-0.46033018827438354,
0.08558271080255508,
0.28231531381607056,
-0.09480331093072891,
0.572096407413... | |
page. We think the error is related to view state. Any thoughts? Thanks!
My guess, like [that of dr. evil](https://stackoverflow.com/questions/821321/what-does-the-utmscr-or-utmcct-values-mean-in-reference-to-the-http-cookie-server/821330#821330), is that it's something to do with Google Analytics or [gaforflash](http:... | [
0.3793294429779053,
0.0023501641117036343,
0.6318587064743042,
0.10054466128349304,
-0.36527127027511597,
-0.09202441573143005,
0.3608933985233307,
-0.007560563739389181,
-0.23536959290504456,
-0.46814805269241333,
-0.17280621826648712,
0.5150214433670044,
-0.4123626947402954,
-0.204339116... | |
* <tr><td>utmcsr - campaign source</td></tr>
* <tr><td>utmgclid - google ad click id</td></tr>
* <tr><td>utmccn - campaign name</td></tr>
* <tr><td>utmcmd - campaign medium</td></tr>
* | [
-0.2152710109949112,
-0.05156509205698967,
0.7394445538520813,
-0.136217400431633,
-0.5371174812316895,
0.21084870398044586,
-0.3000512421131134,
-0.1908407360315323,
-0.14380230009555817,
-0.6707243919372559,
-0.21491286158561707,
0.4672350585460663,
-0.2639126479625702,
0.011431312188506... | |
<tr><td>utmctr - keywords</td></tr>
* <tr><td>utmcct - ad content description</td></tr>
* </table>
* should be in this order : utmcid=one|utmcsr=two|utmgclid=three|utmccn=four|utmcmd=five|utmctr=six|utmcct=seven
*
*/
```
That, or something related... | [
-0.03624667227268219,
0.025926556438207626,
0.8590530753135681,
-0.06531833857297897,
-0.3671771287918091,
0.19106736779212952,
0.11608253419399261,
-0.45265862345695496,
0.1304474025964737,
-0.5037558078765869,
-0.30974340438842773,
0.4134518504142761,
-0.2158755660057068,
0.4084326028823... | |
where your values are coming from. | [
0.5350130200386047,
0.13307176530361176,
-0.24399280548095703,
0.09969381988048553,
0.12603849172592163,
-0.023903312161564827,
0.036289531737565994,
0.018958164379000664,
-0.23853911459445953,
-0.48195868730545044,
0.14810068905353546,
0.5957385897636414,
0.1379821002483368,
0.09387192130... | |
I can add an attribute to items in a RadioButtonList item like so:
```
PaymentMethodDropDownList.Items[0].Attributes.Add("onclick", "javascript:showNoMethods();");
PaymentMethodDropDownList.Items[1].Attributes.Add("onclick", "javascript:showCreditCardMethod();");
PaymentMethodDropDownList.Items[2].Attributes.Add("oncl... | [
0.05530859902501106,
-0.02702021226286888,
0.6388086676597595,
-0.024176200851798058,
0.07641314715147018,
-0.19556176662445068,
0.20030184090137482,
-0.5587548017501831,
0.17712120711803436,
-0.4995686113834381,
-0.037451546639204025,
0.9993003606796265,
-0.1440831869840622,
0.01234545558... | |
"showCreditCardMethod();");
```
Also, this is a little bit more complicated and requires a custom javascript function to perform a different action depending on the option selected. Here's an example:
```
PaymentMethodDropDownList.Attributes.Add("onchange",
"handleDropDow... | [
0.40071141719818115,
-0.41111040115356445,
0.5898742079734802,
0.01646733097732067,
0.10476280748844147,
0.0005583708989433944,
0.03308262676000595,
-0.48017191886901855,
-0.2121993601322174,
-0.3440963327884674,
0.1115565150976181,
0.7200384736061096,
-0.049863290041685104,
-0.18926975131... | |
are "CreditCard" and "SendPayment".
```
<script type="text/javascript">
function handleDropDownEvents(e){
if(e.value == "CreditCard"){
showCreditCardMethod();
}
else if(e.value == "SendPayment"){
showSendPaymentMethod();
}
}
</script>
``` | [
0.25878721475601196,
0.07149743288755417,
0.5089002847671509,
-0.16933102905750275,
0.24166801571846008,
-0.1699698120355606,
-0.12479398399591446,
-0.4251590967178345,
-0.056386109441518784,
-0.390742689371109,
-0.3122233748435974,
0.5676481127738953,
0.025905543938279152,
0.0551193468272... | |
In my program after clicking on the button - selected ListView entries should be copied to RichTextBox. ListView contains contact information, and the effect I want to accomplish is similar to the one in Oultook (when choosing contacts from contact book). Part of my code that serves this purpose looks like that:
```
... | [
0.20849600434303284,
-0.1918012946844101,
0.6121928095817566,
-0.22580695152282715,
0.252824991941452,
-0.1090986430644989,
0.17988449335098267,
-0.20515355467796326,
-0.14415204524993896,
-0.8510362505912781,
-0.13663536310195923,
0.5547777414321899,
-0.23377633094787598,
0.17331272363662... | |
if (contactsTextBox.TextLength != 0) contactsTextBox.Text += "; ";
start = contactsTextBox.TextLength;
contactsTextBox.Text += contactsListView.SelectedItems[i].Text + " " + contactsListView.SelectedItems[i].SubItems[1].Text + " [" + contactsListView.SelectedItems[i].SubItems[2].Text + "]";
... | [
-0.40638020634651184,
-0.2930290997028351,
0.6822196245193481,
-0.33228084444999695,
0.25465697050094604,
0.3006117641925812,
-0.025203602388501167,
-0.49345749616622925,
0.03744038939476013,
-0.9195139408111572,
-0.569996178150177,
0.56112140417099,
-0.31909775733947754,
-0.20592392981052... | |
contactsTextBox.DeselectAll();
contactsTextBox.SelectionFont = new Font(contactsTextBox.SelectionFont, FontStyle.Regular);
}
}
```
Unfortunately somehow FontStyle is inherited by entire text and everything I enter after entry from ListView is also underlined.
So my question is - how to underl... | [
-0.17290087044239044,
0.17826558649539948,
0.6743136644363403,
-0.29422032833099365,
0.021450625732541084,
-0.0913500115275383,
0.2320428043603897,
-0.20961689949035645,
-0.060574062168598175,
-0.5881333351135254,
-0.1182076558470726,
0.8840497136116028,
-0.28686511516571045,
-0.0615067519... | |
for (int i = 0; i < contactsListView.SelectedItems.Count; i++)
{
if (contactsTextBox.TextLength != 0) contactsTextBox.Text += "; ";
start = contactsTextBox.TextLength;
contactsTextBox.Text += contactsListView.SelectedItems[i].Text +" " + contactsListView.SelectedItems[i].SubI... | [
-0.22588849067687988,
-0.4386727213859558,
0.6454316973686218,
-0.2602274715900421,
0.37146416306495667,
0.25358083844184875,
0.08498826622962952,
-0.627278208732605,
-0.008916759863495827,
-0.7355268597602844,
-0.4254100024700165,
0.6154009699821472,
-0.3830052614212036,
-0.20839880406856... | |
";
this.contactsTextBox.SelectionStart = 0;
this.contactsTextBox.SelectionLength = this.contactsTextBox.Text.Length-1;
contactsTextBox.SelectionFont = new Font(contactsTextBox.SelectionFont, FontStyle.Underline);
this.contactsTextBox.SelectionLength = 0;
```
Total hack, but basically, ... | [
0.2175527662038803,
-0.05806291103363037,
0.7268114686012268,
-0.16256394982337952,
0.16975389420986176,
0.19474166631698608,
0.3277767598628998,
-0.5143194198608398,
-0.1473284363746643,
-0.6215770244598389,
-0.5298251509666443,
0.7288030385971069,
-0.331566721200943,
-0.13891908526420593... | |
Currently my method involves creating a context processor
which is then included sitewide. However, I notice I have
problems accounting for daylight saving time changes. I live
outside of the U.S. BTW and my server is in the U.S. but its
time zone is set to mine. However since we don't account for
daylight saving time,... | [
0.4913026988506317,
0.02817634493112564,
0.43297693133354187,
0.04960922524333,
0.12296964973211288,
-0.13821151852607727,
0.29975807666778564,
0.13377195596694946,
-0.38272249698638916,
-0.8922781944274902,
-0.018847839906811714,
0.0165603905916214,
-0.08297648280858994,
0.135494723916053... | |
based on what your TIME\_ZONE variable is set to in your settings.py, not what you have set on the server. For example, one server may serve multiple Django-powered sites, each with a separate time-zone setting.
See: <http://docs.djangoproject.com/en/dev/ref/settings/#time-zone>.
Just make sure you set your TIME\_ZON... | [
0.36997032165527344,
0.20401059091091156,
0.6520123481750488,
-0.0007914812304079533,
0.15132638812065125,
-0.14793646335601807,
0.2599480152130127,
0.30627840757369995,
-0.44669556617736816,
-0.7671614289283752,
-0.12510591745376587,
0.39709287881851196,
-0.23261640965938568,
0.1368136107... | |
in a format like 9:30am. | [
0.20376816391944885,
-0.06726952642202377,
0.3737001419067383,
-0.34624719619750977,
0.04491204768419266,
-0.24701690673828125,
0.4622954726219177,
0.6546981930732727,
0.1037270724773407,
-0.5595093965530396,
-0.33550700545310974,
0.2952877879142761,
-0.009268205612897873,
-0.1592869609594... | |
I have the following three tables:
[alt text http://img16.imageshack.us/img16/5499/linqtosqlquery.jpg](http://img16.imageshack.us/img16/5499/linqtosqlquery.jpg)
With LinqToSql I would like to retrieve a list of InventoryItems where (pointsName="Level" AND pointsValue <= maxStoreLevel) AND pointsName="Buy Price" and
... | [
-0.15903566777706146,
0.11846327781677246,
0.533953070640564,
0.12482409179210663,
0.054380543529987335,
0.08948109298944473,
-0.03541010990738869,
-0.2085084319114685,
0.02341492474079132,
-0.5752626061439514,
-0.09518880397081375,
1.0463966131210327,
0.31528326869010925,
-0.1405662000179... | |
1 where pointsName="Level" and also has a point called "Buy Price" therefore it's row should be returned (same goes with any other Inventoryitems with the same criteria)
OK, so this isn't as pretty as the lambda expressions and I'm still a little fuzzy on what exactly the where clause needs to be since PointsName can't... | [
0.13984470069408417,
-0.37342536449432373,
0.15704283118247986,
-0.05923143029212952,
-0.062195491045713425,
-0.21199223399162292,
-0.18590492010116577,
-0.24531236290931702,
-0.031123442575335503,
-0.41471415758132935,
0.20557352900505066,
0.7440599799156189,
-0.16263730823993683,
0.00696... | |
this and modify it as needed. Let me know what I'm missing...
```
var items = (From items in context.InventoryItems
join itemPoints in context.InventoryItemPoints on items.InventoryItemID equals itemPoints.InventoryItemID
join points in context.Points on itemPoints.pointsID equals points.poin... | [
-0.3578629195690155,
-0.040952540934085846,
0.5695025324821472,
0.12104788422584534,
0.3081984519958496,
0.27775347232818604,
0.008837764151394367,
-0.2056005895137787,
-0.1767258644104004,
-0.5448480248451233,
-0.20530681312084198,
0.5589264035224915,
0.03443415090441704,
0.33776277303695... | |
wouldn't return rows as there was no way for the points name to have both values but based off your subsequent update, I think what you need is:
```
var items = (From items in context.InventoryItems
join levelItemPoints in context.InventoryItemPoints on items.InventoryItemID equals levelItemPoints.Invento... | [
-0.18447323143482208,
0.08241169154644012,
0.6281558871269226,
0.08177272975444794,
0.25686028599739075,
0.2732791304588318,
0.029779696837067604,
-0.18474896252155304,
-0.08331404626369476,
-0.5284011363983154,
0.05067536234855652,
0.43893951177597046,
0.01969507709145546,
0.2890041470527... | |
join pricePoints in context.Points on priceItemPoints.pointsID equals pricePoints.pointsID
where (levelPoints.pointsName == "Level" && levelItemPoints.pointsValue == maxStoreLevel) && pricePoints.pointsName == "Buy Price"
select items).Distinct();
``` | [
-0.3717148005962372,
-0.016070857644081116,
0.7154386043548584,
0.15993228554725647,
0.0038492060266435146,
0.1095062717795372,
-0.003138225292786956,
-0.268435537815094,
0.0045510102063417435,
-0.6550242900848389,
-0.27908506989479065,
0.4511503577232361,
0.00762544060125947,
0.5417374968... | |
I'm just beginning to dive into VBA and I've hit a bit of a roadblock.
I have a sheet with 50+ columns, 900+ rows of data. I need to reformat about 10 of those columns and stick them in a new workbook.
How do I programmatically select every non-blank cell in a column of book1, run it through some functions, and drop ... | [
0.42426106333732605,
0.28484025597572327,
0.5042084455490112,
-0.10697760432958603,
0.04824565723538399,
0.16938169300556183,
0.1821521371603012,
-0.5947617888450623,
-0.3746817409992218,
-0.4801965355873108,
0.15078715980052948,
0.28940364718437195,
-0.2400793433189392,
0.1008529737591743... | |
have been ignored.
```
Option Explicit
Public Sub exportDataToNewBook()
Dim rowIndex As Integer
Dim colIndex As Integer
Dim dataRange As Range
Dim thisBook As Workbook
Dim newBook As Workbook
Dim newRow As Integer
Dim temp
'// set your data range here
Set dataRange = Sheet1.Range(... | [
0.2751835584640503,
-0.11459626257419586,
0.7952447533607483,
-0.276008665561676,
-0.014737514778971672,
-0.047598280012607574,
0.05160302668809891,
-0.2674795389175415,
-0.2504125237464905,
-0.44030478596687317,
-0.5144013166427612,
0.4990703761577606,
-0.48142731189727783,
0.140036150813... | |
For colIndex = 1 To dataRange.Columns.Count
newRow = 0
For rowIndex = 1 To dataRange.Rows.Count
With dataRange.Cells(rowIndex, colIndex)
'// ignore empty cells
If .value <> "" Then
newRow = newRow + 1 | [
-0.2072078287601471,
-0.16234014928340912,
0.7685328125953674,
-0.3195648491382599,
0.08125898987054825,
0.39078736305236816,
0.21531535685062408,
-0.15037770569324493,
-0.5014331936836243,
-0.29006439447402954,
0.05756857991218567,
0.15859374403953552,
-0.5598692297935486,
0.4187145829200... | |
temp = doSomethingWith(.value)
newBook.ActiveSheet.Cells(newRow, colIndex).value = temp
End If
End With
Next rowIndex
Next colIndex
End Sub
```
```
Private Function doSomethingWith(aValue)
'// This is where you would compute a different value
'// for u... | [
0.12329650670289993,
-0.2758280634880066,
0.5593600273132324,
-0.07774481177330017,
0.07745762914419174,
0.1442476063966751,
0.35419824719429016,
-0.4078792631626129,
-0.20828662812709808,
-0.4899175763130188,
0.161434143781662,
0.6214991807937622,
-0.5046513080596924,
0.0440140925347805,
... | |
the new workbook
'// In this example, I simply add one to it.
aValue = aValue + 1
doSomethingWith = aValue
End Function
``` | [
0.23559977114200592,
0.1673201024532318,
0.6897101998329163,
-0.38895848393440247,
0.16219152510166168,
0.10694938153028488,
0.08130601793527603,
-0.5692779421806335,
0.0825778916478157,
-0.9717296361923218,
-0.16729150712490082,
0.7246897220611572,
-0.36899229884147644,
0.0782376900315284... | |
I am using Rhino mocks for unit test mocking of objects. Our DAL uses codesmith to generate code from .netTiers templates, which creates these DataRepository classes that contain all the methods for CRUD type transaction to the datasource. In unit testing, I am trying to mock this data repository object which has no in... | [
0.46930205821990967,
0.44784995913505554,
-0.10814371705055237,
0.13011662662029266,
-0.658949613571167,
0.30967584252357483,
-0.04977305606007576,
0.09038351476192474,
-0.38232195377349854,
-0.6179279685020447,
0.539975643157959,
0.4938225746154785,
0.07391845434904099,
0.3210014998912811... | |
a while, as no one has stepped up and written a mock DataRepository implementation for netTiers yet (to my knowledge).
As I don't care too much for the record-replay steps of TypeMock and RhinoMocks, I've opted for the newer Moq, which will happily mock either the DataRepository classes or the Service layer calls them... | [
0.3488193154335022,
-0.2116098552942276,
0.29859670996665955,
0.014421705156564713,
-0.25118380784988403,
-0.06564048677682877,
0.31583160161972046,
0.7343485951423645,
-0.22600050270557404,
-0.366534024477005,
0.22641392052173615,
0.8853237628936768,
0.24387913942337036,
0.045329637825489... | |
I am having problems with SQL Server dropping a connection after I have dropped and re-created a given database and the next time I try to execute a command against a new connection on that same database, I get:
> A transport-level error has occurred when sending the request to the server. (provider: Shared Memory Pro... | [
0.10975732654333115,
-0.021410806104540825,
0.32811564207077026,
0.0018570276442915201,
0.14262166619300842,
-0.07903552055358887,
0.09552764147520065,
0.0779130831360817,
-0.33120203018188477,
-0.7678480744361877,
-0.000986557686701417,
0.27808380126953125,
-0.42091017961502075,
0.3575858... | |
was forcibly closed by the remote host.)
Here are the steps to repro the problem:
1. Open a connection to a database and execute a sql command
2. Drop the database
3. Re-Create the database
4. Open a new connection to the same database and attempt to run a command against it
Result: I receive an exception
Here is t... | [
-0.10473313927650452,
0.007202891167253256,
0.6274049878120422,
0.023149685934185982,
0.22658300399780273,
-0.01487298496067524,
0.3484233021736145,
-0.4304717779159546,
-0.28074315190315247,
-0.33539530634880066,
-0.27049094438552856,
0.3887663185596466,
-0.5943903923034668,
0.46313524246... | |
Microsoft.SqlServer.Management.Smo.Server(".");
server.ConnectionContext.ExecuteNonQuery(sql);
server.ConnectionContext.Disconnect();
sql = File.ReadAllText("PathToDotSqlFile..."));
server = new Microsoft.SqlServer.Management.Smo.Server(".");
server.ConnectionContext.ExecuteNonQuery(sql);
server.ConnectionContext.Disc... | [
-0.13215970993041992,
0.0791681557893753,
0.7407544851303101,
-0.15505395829677582,
0.173363596200943,
-0.09536398202180862,
0.5540887713432312,
-0.11975205689668655,
-0.3036145865917206,
-0.6430357098579407,
-0.43257445096969604,
0.39848509430885315,
-0.4287172853946686,
0.571210741996765... | |
realize it was closed by the server (presumably because of the database it is connected to being dropped) until you try to execute another command against it.
Note that if I don't do the first step of executing the initial query, and I just drop the database, re-create it, and execute a command, I do not receive this ... | [
0.10341458022594452,
0.022035283967852592,
0.33027276396751404,
-0.0007566837011836469,
0.23842088878154755,
-0.40014615654945374,
0.35136866569519043,
-0.1570873111486435,
-0.40953510999679565,
-0.6513877511024475,
-0.3006364405155182,
0.450743705034256,
-0.2955158054828644,
0.31900137662... | |
-Q \"Alter Database DBNAME set single_user with rollback immediate drop database DBNAME\"");
var p = Process.Start(info);
p.WaitForExit();
info = new ProcessStartInfo("sqlcmd.exe", " -i " + PathToDotSqlFile);
p = Process.Start(info);
p.WaitForExit();
```
And that did not help.
Is there a way to create a new SqlConn... | [
0.19953365623950958,
0.04619836434721947,
0.504490315914154,
-0.033411964774131775,
0.06450065225362778,
-0.13071389496326447,
0.39689818024635315,
-0.2512827217578888,
-0.1843634396791458,
-0.6607424020767212,
0.02831842750310898,
0.45292216539382935,
-0.40437474846839905,
0.4142584800720... | |
you request a connection with the same connection string. This could be the reason why your "new" connection is stale.
You could try to turn off this behaviour by adding `pooling=false` as parameter to your connection string. | [
0.7064151763916016,
-0.21000175178050995,
0.07213794440031052,
0.08363629877567291,
0.06530795991420746,
-0.369772344827652,
0.31004056334495544,
-0.030638722702860832,
-0.112595334649086,
-0.5219046473503113,
0.16206417977809906,
0.35636696219444275,
-0.41573938727378845,
0.51266938447952... | |
Here is an example of my input csv file:
```
...
0.7,0.5,0.35,14.4,0.521838919218
0.7,0.5,0.35,14.4,0.521893472678
0.7,0.5,0.35,14.4,0.521948026139
0.7,0.5,0.35,14.4,0.522002579599
...
```
I need to select the top row where the last float > random number. My current implementation is very slow (script has a lot o... | [
-0.14943982660770416,
0.11797790229320526,
0.4769887328147888,
-0.08463865518569946,
-0.07593386620283127,
0.15994635224342346,
0.23107023537158966,
-0.2836953103542328,
-0.05329130217432976,
-0.620478630065918,
0.18934224545955658,
0.1822134405374527,
-0.21862933039665222,
0.1095379367470... | |
do it like this:
```
import bisect
float_list = [line[-1] for line in foo]
index = bisect.bisect(float_list, random.random())
if index < len(float_list)
result = foo[index]
else:
result = None # None exists
```
The float list has to be ordered for this to work. | [
-0.06289225071668625,
-0.15731360018253326,
0.4064501225948334,
-0.33329716324806213,
-0.039875417947769165,
-0.27002671360969543,
0.0020693601109087467,
-0.2724647521972656,
-0.11249053478240967,
-0.14484210312366486,
-0.07431544363498688,
0.5252562761306763,
-0.5168851017951965,
0.015835... | |
I am using a `System.DateTime` object to allow a user to select a date range. The user is only able to select a date (not time) using a third party calendar so I will need to automatically specify the time of day it should use (ie: 00:00:00 or 23:59:59) after the date is chosen.
How can I specify the time after the da... | [
0.6057740449905396,
0.002919515362009406,
0.6579312682151794,
-0.05276530981063843,
0.2712140679359436,
0.01903332956135273,
-0.01460416242480278,
0.0012104716151952744,
-0.016102569177746773,
-0.6475167274475098,
0.061897020787000656,
0.31724125146865845,
-0.06318353861570358,
0.193814009... | |
time of 00:00:00 and `endDate` have a time of 23:59:59 to account for the entire days.
To get the last instant for today:
```
DateTime d = new DateTime(Now.Year, Now.Month, Now.Day);
d = d.AddDays(1);
d = d.AddTicks(-1);
```
---
In response to your edit, here's what I would do:
```
DateTime start = new DateTime(No... | [
0.45115557312965393,
-0.17789694666862488,
0.7834030389785767,
-0.0903790146112442,
0.27564406394958496,
0.13411065936088562,
0.07355736196041107,
0.07900870591402054,
-0.05318102985620499,
-0.7352200150489807,
-0.11591814458370209,
0.3447314202785492,
-0.08761297166347504,
0.5351187586784... | |
Symptom:
Some users cannot successfully POST, most can successfully POST.
When the error occurs, users are redirected to the site's Shared/Error page.
Technologies used:
IIS v6
Windows Server 2003
asp.net v3.5
asp.net mvc framework v1.0
jQuery
linq
sql server 2005
Authentication: Windows wi... | [
-0.35784482955932617,
0.023818563669919968,
0.4989679753780365,
-0.07817617058753967,
-0.33041560649871826,
0.02817363664507866,
0.5350573062896729,
-0.2707463204860687,
-0.15721864998340607,
-0.2902975380420685,
0.08130937069654465,
0.4214564263820648,
-0.22506697475910187,
-0.01621662452... | |
System.Web, Version=2.0.3600.0, Culture=neutral,
 PublicKeyToken=b03f5f7f11d50a3a" connectionStringName="ADConnString" connectionUsername="" connectionPassword=""/>
</providers>
</membership>
```
Here's the link from the view that kicks off the Save
`<a href="javascript:void(documen... | [
-0.01829686015844345,
-0.3206624984741211,
0.6593457460403442,
0.05257933586835861,
-0.19903315603733063,
-0.13208195567131042,
0.4047110676765442,
-0.06422236561775208,
-0.4055260121822357,
-0.802562952041626,
-0.136285662651062,
0.5031028985977173,
-0.12916694581508636,
0.100455544888973... | |
type: form.method,
url: form.action,
data: $(form).serialize(),
dataType: "html",
error: function(error) { | [
-0.062444668263196945,
0.0010240440024062991,
0.37532520294189453,
-0.00009289285662816837,
-0.09304698556661606,
0.11836153268814087,
0.4302748739719391,
-0.0917959213256836,
-0.03694925457239151,
-0.3093588352203369,
-0.3588101267814636,
0.39960774779319763,
-0.4574514627456665,
0.117324... | |
alert(error);
}
}
);
}
```
Here's part of the controller method:
```
[AcceptVerbs(HttpVerbs.Post)]
public ActionResult CurrentLineItems(FormCollection thisForm)
// Get the forecast from the session
BusinessLogic.ForecastBL thisForecast = (BusinessLogic.ForecastBL)HttpCont... | [
-0.3228117525577545,
-0.6531558036804199,
0.7224184274673462,
0.0272904634475708,
0.35606881976127625,
-0.11045118421316147,
0.12684620916843414,
-0.028402365744113922,
-0.3370697796344757,
-0.4303526282310486,
-0.04384747892618179,
0.6133912801742554,
-0.2762819826602936,
0.12217025458812... | |
to db stuff here
return View("CurrentLineItems", ViewData["LineItemSummary"]);
}
else
{
return Redirect("../Shared/Error");
}
```
A note abt the above code...I'm pretty sure that pulling the forecast object out of the session is not causing the error, at least I... | [
0.23066414892673492,
-0.2162315547466278,
0.5022757053375244,
-0.26820120215415955,
-0.024415643885731697,
-0.22835193574428558,
0.5417882204055786,
-0.25344395637512207,
0.12832039594650269,
-0.4438348412513733,
-0.06881161034107208,
0.625846803188324,
-0.21865962445735931,
0.376069635152... | |
save, cannot save when they open the page and then immediately attempt to save.
The class also has these attributes:
```
[HandleError]
[Authorize]
public class ForecastController : Controller
{
```
The site has, in IIS properties, in Authentication Methods:
Enable anonymous access unchecked and Integrated Windo... | [
-0.23725973069667816,
-0.059209976345300674,
0.5938005447387695,
0.11324699223041534,
0.12151063233613968,
-0.06244556978344917,
0.5866943597793579,
0.05483245104551315,
-0.311629056930542,
-0.7331278324127197,
-0.31653913855552673,
0.45765507221221924,
-0.5488313436508179,
0.4897059500217... | |
401 1 0
469 2009-04-28 16:41:16 W3SVC1100645706 192.168.10.22 GET /Shared/Error - 443 DOMAIN\username XX.XX.XX.XX Mozilla/4.0+(compatible;+MSIE+7.0;+Windows+NT+5.1;+GTB5;+.NET+CLR+1.1.4322) 404 0 0
Here's those same lines stripped down for hopefully better readability:
2009-04-28 16:41:15 POST /Forecast/Current... | [
-0.11724039167165756,
0.13402952253818512,
0.7627259492874146,
0.1585048884153366,
-0.08870342373847961,
0.2961638271808624,
0.43005484342575073,
-0.1354682594537735,
-0.32181304693222046,
-0.30310311913490295,
-0.1700073927640915,
0.5314949154853821,
-0.30995601415634155,
-0.0543289035558... | |
what is causing the first POST above...the one that is making it to the web server without the DOMAIN\username info and getting a 401 error?
Also why the 302 error?
Seems like I'm asking for two POSTS...but I don't quite grasp why the browser is sending two POST requests? (of course...I suspect my code, but can't qu... | [
-0.010974397882819176,
0.11295706778764725,
-0.018101869150996208,
0.11262516677379608,
-0.2348945438861847,
-0.009039662778377533,
0.49047985672950745,
0.30598190426826477,
-0.2471933811903,
-0.7066407799720764,
0.21067963540554047,
0.40427541732788086,
-0.4339810013771057,
0.060597270727... | |
issue...
`<input type="submit" value="Save This Month" title="Saves this month only" class="submitBtn"/>`
Since the input button is inside the form I want to submit...it hits the Post controller action and saves the data then displays the view... | [
0.2452344000339508,
0.18496659398078918,
0.9189386367797852,
-0.3126278817653656,
-0.13431857526302338,
-0.052871327847242355,
0.0629609003663063,
-0.09626840800046921,
-0.2609435021877289,
-0.413254052400589,
-0.12753263115882874,
0.2819613516330719,
-0.1107960194349289,
0.196329891681671... | |
I know you can use a .net reflector to view code created with .net but if I put something in the comments for my own personal reminder is that compiled in the exe as well.
I don't intend to release the source code for my application and i know the 100% safe bet is to just remove everything I don't want out but I was j... | [
0.8991751670837402,
0.21687714755535126,
0.22391439974308014,
0.005190390162169933,
-0.32786136865615845,
-0.19486533105373383,
0.26375019550323486,
0.32514432072639465,
-0.13662023842334747,
-0.7574141025543213,
0.2721913158893585,
0.5425851941108704,
-0.16292186081409454,
0.4119103252887... | |
I am not able to figure out this simple thing in ASP.NET MVC:
I have two tables:
```
Customer:
CustomerID
FirstName
LastName
AddressID
AddressTemporaryID
Address:
AddressID
Street
City
```
I have my relations(FK) set in DB and trying to use Entity Framework. My navigation proper... | [
-0.5603663921356201,
0.1548657864332199,
0.8850682973861694,
-0.008563225157558918,
-0.3693138360977173,
0.25182366371154785,
0.047367971390485764,
-0.17704428732395172,
-0.1700478345155716,
-0.7557098269462585,
-0.06109670177102089,
0.18862590193748474,
-0.22915922105312347,
0.49441406130... | |
{
return db.Customers;
}
}
```
And my HomeController has this:
```
public ActionResult Index()
{
var query = customerRepository.FindAllCustomers();
return View(query);
}
```
But how can I access values in my View? I can see item.Adresses.Street/item.Adresses1.Street with Intellisense in ... | [
-0.23427239060401917,
-0.0759558230638504,
0.4914696216583252,
-0.12211065739393234,
-0.1371588408946991,
0.49982354044914246,
0.387308806180954,
-0.49747776985168457,
-0.21288074553012848,
-0.7814765572547913,
-0.011382900178432465,
0.5421804189682007,
-0.15770889818668365,
0.171827211976... | |
<%= Html.Encode(item.Surname) %>
</td>
<td>
<%= Html.Encode(item.Adresses.Street) %>
</td>
<td>
<%= Html.Encode(item.Adresses1.Street) %>
</td>
</tr>
<% } %>
```
I am completely lost. I tried to search everywhere but without any success.
**NOTE:** I wrote this in 2010, the browsers... | [
0.21743328869342804,
0.027132993564009666,
0.18882448971271515,
0.006845072377473116,
-0.25000685453414917,
-0.34092944860458374,
0.8013362288475037,
0.037819232791662216,
-0.00968907494097948,
-0.4858242869377136,
0.09347052872180939,
-0.01161138154566288,
-0.4321177303791046,
0.330862879... | |
issue.
**WARNING:** It is 2017 now I still get points on this now and then, please only use this for research purposes. I currently have no idea how to detect image loading status, but there are probably much more graceful ways of doing it than this... at least I seriously hope there are. I highly recommend NOT using ... | [
0.3557436764240265,
-0.1571614295244217,
0.838578462600708,
0.2554837763309479,
-0.0642976462841034,
-0.7321372032165527,
0.3171214759349823,
0.32570385932922363,
-0.5841943621635437,
-0.49813368916511536,
-0.06126650050282478,
0.6331879496574402,
0.006933040916919708,
0.2227257788181305,
... | |
and reading up on some of the new and fun stuff vanilla JS has to offer.
---
I'm a bit late to this party, maybe this answer will help someone else...
If you're using jQuery don't bother with the stock event handlers (onclick/onmouseover/etc), actually just stop using them altogether. Use the event methods they prov... | [
0.6104846000671387,
-0.17998163402080536,
0.15485718846321106,
0.15938198566436768,
-0.4425347149372101,
-0.17472271621227264,
0.10323566943407059,
-0.14623817801475525,
-0.18816669285297394,
-0.5012794137001038,
0.03628816083073616,
0.49940773844718933,
0.03938107192516327,
-0.28217974305... | |
then append it to the body.
```
var img = $('<img src="test.jpg" />');
img.load(function() {
alert('Image Loaded');
});
$('body').append(img);
```
---
This will alert, after the image is inserted into the body, again, doing what you told it to: create an image, set an event (no src set, so it hasn't loaded), ap... | [
0.2615956962108612,
-0.102013498544693,
0.5831466317176819,
-0.1957387775182724,
-0.03955169767141342,
0.10542957484722137,
0.2661901116371155,
-0.4994089901447296,
-0.10183853656053543,
-0.4905932545661926,
-0.3279648423194885,
0.634283721446991,
-0.7609649300575256,
-0.14610198140144348,... | |
load: function() {
alert('Image loaded.');
},
error: function() {
alert('Error thrown, image didn\'t load, probably a 404.');
}
});
$('body').append(img);
img.attr('src','test.jpg');
```
---
Per the request by @ChrisKempen ...
Here is a non-event driven way of determining if the images a... | [
0.4085128605365753,
-0.225541889667511,
0.345989465713501,
0.040251053869724274,
-0.06836767494678497,
0.00749834394082427,
0.3742031455039978,
-0.6176778674125671,
-0.38315171003341675,
-0.14672264456748962,
-0.14765460789203644,
0.7421426773071289,
-0.3919403851032257,
0.1081887334585189... | |
this.naturalHeight === 0 || this.complete === false) {
alert('broken image');
}
});
``` | [
0.2540031969547272,
-0.07652036100625992,
0.42947593331336975,
-0.24724020063877106,
0.45295608043670654,
-0.3402302861213684,
0.7740445733070374,
-0.09082290530204773,
-0.0045191096141934395,
-0.44967395067214966,
-0.523806095123291,
0.8294827938079834,
-0.49314025044441223,
0.23559762537... | |
When a user wants to choose a certain UITabBar item, I want first to check if he can choose it. And if he cannot, then show an alert.
There is a delegate method that is being raised when a user chooses a certain item, but it doesn't work when an item is disabled.
What is the best way to achieve this?
Thanks.
This is... | [
0.408170223236084,
-0.03551175072789192,
0.29199305176734924,
0.17241065204143524,
-0.4016991853713989,
-0.18229790031909943,
0.16685433685779572,
-0.19655343890190125,
-0.2771699130535126,
-0.5769444704055786,
-0.17866238951683044,
0.3869033753871918,
-0.4632780849933624,
0.09784701466560... | |
an error/warning rather than performing the desired action is if it can only be determined at the last moment that the action is impossible to perform. | [
0.14625196158885956,
-0.04467375949025154,
0.045557908713817596,
0.07262232154607773,
0.24985213577747345,
-0.004167093895375729,
0.7773553133010864,
-0.07058335095643997,
-0.08964881300926208,
-0.14628897607326508,
-0.38762927055358887,
0.4956509470939636,
-0.23319946229457855,
-0.1255496... | |
.NET [code access security](https://stackoverflow.com/questions/737995/what-is-code-access-security-in-net) has been around for a long time, yet it seems to hardly ever be used in the real world.
To my way of thinking, this seems like an excellent concept, and one I had not seen prior to .NET. (Does it exist in other ... | [
0.40180468559265137,
-0.1440323293209076,
0.28796496987342834,
0.2714978754520416,
0.008028121665120125,
-0.591589093208313,
0.19426403939723969,
0.6039524078369141,
-0.3262215852737427,
-0.6121315956115723,
-0.0871439278125763,
0.1818867176771164,
-0.022121332585811615,
0.1043622642755508... | |
Microsoft gave no guidance and best practices on how to use code access security. So it never really took off. They never explained why you would want to protect your code. What happens when an exception occurs, how is it recovered from. I think those are the main problems.
Don't confuse this with data access security... | [
0.28644657135009766,
0.26481491327285767,
-0.15179087221622467,
0.33617347478866577,
-0.0967753529548645,
-0.3616696298122406,
0.21126915514469147,
0.564865231513977,
-0.13431762158870697,
-0.26620662212371826,
0.09552273899316788,
0.44984152913093567,
0.0735870748758316,
0.125546336174011... | |
How can I have a text file (or XML file) represented as a whole string, and search for (or match) a particular string in it?
I have created a BufferedReader object:
```
BufferedReader input = new BufferedReader(new FileReader(aFile));
```
and then I have tried to use the Scanner class with its option to specify di... | [
0.19888755679130554,
-0.09016747772693634,
0.6889299154281616,
-0.0754934623837471,
-0.23829884827136993,
0.04466617479920387,
0.038903091102838516,
-0.46995070576667786,
-0.21528281271457672,
-0.8555328845977783,
-0.04401946812868118,
0.46002674102783203,
-0.35150742530822754,
0.205611452... | |
I want to process, I have
```
</review><review>
```
and I would like to say: if you find "`<review>`" anywhere in the text, do something with the following next lines (or piece of text) until you find "`</review>`". The problem is that `<review>` and `</review>` are on different places in the text, and sometimes glu... | [
0.21036820113658905,
0.002106443280354142,
0.31645435094833374,
0.00838363915681839,
-0.21698616445064545,
-0.0687377080321312,
0.08958035707473755,
0.14156848192214966,
-0.19126811623573303,
-0.7511622905731201,
-0.15822194516658783,
0.26981931924819946,
-0.2611916959285736,
0.16697698831... | |
string (at least this was my impressions from what I have read about them). Could you tell me what structures/methods/classes I should use in this case? Thank you.
Don't try to parse XML with regular expressions; it leads only to pain. There are a lot of very nice [existing](http://java.sun.com/javase/6/docs/api/javax/... | [
0.10143090784549713,
0.014552932232618332,
0.26970210671424866,
-0.16234846413135529,
-0.42228662967681885,
-0.34715643525123596,
0.2926756739616394,
-0.23418466746807098,
-0.25987523794174194,
-0.6422625780105591,
-0.09144614636898041,
0.23692728579044342,
-0.5859543085098267,
-0.10421774... | |
I know how to write the basic c# code to send emails, but I'm wondering about any larger issues involved. Are there things I should avoid? Best practices? etc
Thanks!!
* Make sure you use a hosting service which will not disable your account because of the amount of email you send.
* Add some kind of audit or logging ... | [
0.7155621647834778,
0.36752787232398987,
0.22767287492752075,
0.04974260926246643,
-0.22033634781837463,
-0.24221475422382355,
0.6076900959014893,
-0.0029983650892972946,
-0.29490017890930176,
-0.6935353875160217,
0.13393180072307587,
0.38910171389579773,
-0.13520744442939758,
-0.211468920... | |
out a mail to everyone each time someone posts, offer the possiblity of daily digests.
* As others have pointed out, use threading to send a high amount of mail | [
0.5470625758171082,
0.007435870356857777,
0.12051676213741302,
0.07885795831680298,
-0.5201939344406128,
0.24598917365074158,
0.26909103989601135,
0.1398409754037857,
-0.3718361258506775,
-0.5323972105979919,
-0.16858087480068207,
-0.16937841475009918,
-0.3134281635284424,
0.07736990600824... | |
I like a library released under [BSD license](http://www.opensource.org/licenses/bsd-license.php). This library is not actively maintained since late 2007.
* Can I fork the library and relicensing under an Creative Commons license?
* The original author must be informed?
* Are there problems other than these?
**EDIT... | [
0.6245552897453308,
0.23733995854854584,
0.3785918653011322,
-0.006912238895893097,
-0.2514621913433075,
-0.35720908641815186,
0.1881662756204605,
0.38319024443626404,
-0.3806702196598053,
-0.5539183020591736,
0.1588001847267151,
0.31915929913520813,
-0.42542746663093567,
0.685571432113647... | |
Microsoft adopted BSD networking code at one time. If you looked at the appropriate displays, you'd find the notices required by the license. On the other hand, Microsoft's copy was also under whatever license Microsoft used, and Microsoft's modifications were neither Free nor Open Source software.
Unless it's some we... | [
0.7915884256362915,
0.4183749556541443,
-0.018054142594337463,
0.209109365940094,
0.007529112976044416,
-0.7444121837615967,
0.09697229415178299,
0.41484448313713074,
-0.020988047122955322,
-0.1370677947998047,
-0.011806157417595387,
0.3742764890193939,
-0.3743326663970947,
0.1850627958774... | |
want to relicense it? I don't know which CC license you're interested in, and there's a great variety of them, but what's the benefit here? | [
0.9002003073692322,
0.2359924614429474,
0.11669750511646271,
0.5593218207359314,
0.4358765482902527,
-0.5641971230506897,
-0.08972648531198502,
0.17287677526474,
-0.32424840331077576,
0.23860599100589752,
0.5357409119606018,
0.21603579819202423,
-0.0016907331300899386,
0.44124162197113037,... | |
I'm starting programming in MATLAB and I have some problems creating a buffer matrix. I'm trying to do the following:
I'm continuously obtaining an image from a webcam and after segmentation I obtain the centroid of a moving target. I need to store the centroid data for processing but I don't want it to occupy too muc... | [
0.07701533287763596,
-0.14636482298374176,
0.27602073550224304,
0.09173907339572906,
0.05007512494921684,
0.32752111554145813,
-0.2419893890619278,
-0.2021406590938568,
-0.05813998356461525,
-0.9456314444541931,
0.029534554108977318,
0.09472397714853287,
-0.12703371047973633,
0.18671201169... | |
(t) and a previous data in time (t-1).
```
buffSize = 10;
circBuff = nan(1,buffSize);
for newest = 1:1000;
circBuff = [newest circBuff(1:end-1)]
end
```
I have tested this, it takes no appreciable time to run in MATLAB. The profiler did not find any bottlenecks with the code. | [
0.044260088354349136,
-0.27143779397010803,
0.6830010414123535,
-0.2953747808933258,
-0.04922272264957428,
-0.07149085402488708,
0.26904669404029846,
-0.31443077325820923,
-0.10030513256788254,
-0.6300359964370728,
-0.01416061632335186,
0.6551883220672607,
0.12579560279846191,
0.2688171863... | |
I've got a Visual Studio Excel Workbook project. When I publish the workbook and examine the source of the workbook (I open WinZip and check custom.xml), I see the tag \_AssemblyLocation, which corresponds to the publish path.
Is there a way to read \_AssemblyLocation from my .NET code?
I'd like to be able to read th... | [
0.27181318402290344,
0.19468176364898682,
0.5888257026672363,
-0.29642602801322937,
-0.15539968013763428,
-0.002607190515846014,
0.16906963288784027,
-0.273028701543808,
-0.24196985363960266,
-0.6732127070426941,
-0.1324169933795929,
0.5921089053153992,
-0.11506467312574387,
0.107218414545... | |
bottlenecks with the code. | [
0.18947412073612213,
0.16724632680416107,
0.148609921336174,
0.3485426604747772,
-0.025525912642478943,
-0.4223111569881439,
0.2526090145111084,
0.018137117847800255,
-0.06821535527706146,
-0.1334957480430603,
-0.10923405736684799,
0.3968510627746582,
-0.14183056354522705,
-0.2663166821002... | |
I am trying to get the latest record inserted in a SQL table based on its CreatedDate. For instance, in the table below, I would like to get the third row.
```
A B C 2009-05-04 19:30:52.847
A B D 2009-05-04 19:30:55.050
A B E 2009-05-04 19:30:57.003
```
I have a working query, but I am wondering i... | [
0.29812687635421753,
0.4477148652076721,
0.44660425186157227,
0.22082269191741943,
-0.004859707318246365,
0.025447852909564972,
0.19021189212799072,
-0.0664721205830574,
-0.27382656931877136,
-0.7409374713897705,
0.2893385887145996,
0.3688507080078125,
0.14988921582698822,
0.24081233143806... | |
to do this?
```
CREATE TABLE TestTable (
ColumnA NVARCHAR(10),
ColumnB NVARCHAR(10),
ColumnC NVARCHAR(10),
CreatedDate DATETIME DEFAULT Getutcdate())
INSERT INTO TestTable(ColumnA, ColumnB, ColumnC) VALUES ('A', 'B', 'C');
INSERT INTO TestTable(ColumnA, ColumnB, ColumnC) VALUES ('A', 'B', 'D');... | [
0.35015642642974854,
0.05046459287405014,
0.029185758903622627,
-0.07562343776226044,
0.27403485774993896,
0.03686177730560303,
0.34176766872406006,
-0.5190882086753845,
0.20390701293945312,
-0.4999634623527527,
-0.1591213196516037,
0.3004962205886841,
-0.33182960748672485,
0.1542723178863... | |
WHERE ColumnA = 'A'
AND ColumnB = 'B'
GROUP BY ColumnA, | [
-0.4828685224056244,
0.4609605073928833,
0.04249153286218643,
-0.21730926632881165,
-0.23684249818325043,
-0.0051049436442554,
0.21568892896175385,
-0.15359461307525635,
-0.39269205927848816,
-0.36031126976013184,
-0.42792946100234985,
-0.4476531147956848,
-0.39603546261787415,
0.210768073... | |
ColumnB)
```
Thanks!
you can also write
```
SELECT top 1 *
FROM TestTable
order by CreatedDate desc
``` | [
-0.1348540484905243,
0.36881837248802185,
0.2504864037036896,
0.12167912721633911,
-0.00783021654933691,
-0.09254319220781326,
0.2365884631872177,
-0.07229509949684143,
-0.05880235508084297,
-0.40792348980903625,
-0.27909547090530396,
0.2603875398635864,
-0.16024883091449738,
-0.0268096588... | |
How do I make SQL SERVER 2005 to ignore the backslash in the following search:
```
select [description] from MyTable where contains([description], '3/4 and bear')
```
It is blowing off on "/"!
try using '"3/4 and bear'" | [
-0.2090902179479599,
0.3279411494731903,
0.3539692163467407,
-0.14346298575401306,
-0.27979663014411926,
-0.5603070855140686,
0.3734094798564911,
-0.21873436868190765,
-0.0820663720369339,
-0.00785935390740633,
0.1926296502351761,
0.44472381472587585,
-0.22973288595676422,
-0.0492230989038... | |
I'm studying for my operating systems final and was wondering if someone could tell me why the OS needs to switch into kernel mode for syscalls?
A syscall is used specifically to run an operating in the kernel mode since the usual user code is not allowed to do this for security reasons.
For example, if you wanted to ... | [
0.12801261246204376,
-0.09507206082344055,
0.20553776621818542,
0.2673892080783844,
0.22714313864707947,
0.01853480190038681,
-0.12362439930438995,
0.20402157306671143,
-0.3269868493080139,
-0.3491708040237427,
-0.10912986099720001,
0.43332046270370483,
-0.16144013404846191,
0.277154177427... | |
processes.
It's a way of sandboxing you. So you send a syscall requesting the operating system to allocate memory, and that happens at the kernel level.
Edit: I see now that the [Wikipedia article](http://en.wikipedia.org/wiki/System_call) is surprisingly useful on this | [
0.18595567345619202,
0.11482531577348709,
0.0504729337990284,
0.26809215545654297,
0.1522178202867508,
0.16576921939849854,
-0.1439790278673172,
0.06204837188124657,
-0.5506268739700317,
-0.5919082760810852,
-0.24063199758529663,
0.38510313630104065,
-0.1297835409641266,
0.1758315414190292... | |
I'm just starting my first C++ project. I'm using [Visual Studio 2008](https://stackoverflow.com/questions/820213/new-to-c-should-i-use-visual-studio). It's a single-form Windows application that accesses a couple of databases and initiates a WebSphere MQ transaction. I basically understand the differences among ATL, M... | [
0.09696541726589203,
0.06475628167390823,
0.3509361743927002,
-0.09211257845163345,
-0.16469170153141022,
-0.22639451920986176,
-0.13899098336696625,
0.05229812487959862,
-0.28676629066467285,
-0.5321729779243469,
-0.014596214517951012,
0.5913784503936768,
-0.2970460057258606,
-0.039188154... | |
only/best option, which should I choose?
It depends on your needs.
Using the CLR will provide you with the most expressive set of libraries (the entire .NET framework), at the cost of restricting your executable to requiring the .NET framework to be installed at runtime, as well as limiting you to the Windows platform... | [
-0.0610358901321888,
-0.016956854611635208,
0.5617819428443909,
-0.04796946421265602,
0.1192919984459877,
-0.18963195383548737,
0.09086493402719498,
-0.03464461490511894,
-0.11130280792713165,
-0.426113098859787,
-0.3533322215080261,
0.7868577837944031,
-0.26391616463661194,
-0.32808345556... | |
you many "extras," such as access to the .net libraries, full garbage collection, etc.
ATL & MFC are somewhat trickier to decide between. I'd refer you to [MSDN's page for choosing](http://msdn.microsoft.com/en-us/library/bk8ytxz5(VS.80).aspx) in order to decide between them. The nice thing about ATL/MFC is that you d... | [
0.13816140592098236,
-0.07910820841789246,
0.31054893136024475,
0.24341298639774323,
-0.1641138792037964,
-0.1753188818693161,
0.044602859765291214,
-0.12782658636569977,
-0.39694857597351074,
-0.699389636516571,
-0.17417427897453308,
0.934624969959259,
-0.32797083258628845,
-0.30828180909... | |
I'm currently using the validation code listed [here](https://stackoverflow.com/questions/127477/detecting-wpf-validation-errors) in an application. I'd like to selectively validate a page. What I mean by that is this: I have a form that's databound with validation rules attached. I also have a checkbox that, when chec... | [
0.3520386517047882,
0.28292611241340637,
0.45680975914001465,
-0.12915900349617004,
-0.04838316887617111,
-0.24872834980487823,
0.24897092580795288,
-0.0827663317322731,
-0.30690550804138184,
-0.4690362215042114,
-0.01578807830810547,
0.23618188500404358,
-0.3063070476055145,
0.45028707385... | |
readonly DependencyProperty SkipValidationProperty =
DependencyProperty.RegisterAttached("SkipValidation", typeof(bool), typeof(Validator),
new UIPropertyMetadata(false));
public static bool GetSkipValidation(DependencyObject obj)
{
return (bool)obj.GetValue(SkipValidationProperty);
... | [
-0.1678505837917328,
-0.19718612730503082,
0.4800410866737366,
-0.17441795766353607,
0.3010208010673523,
0.23654328286647797,
0.43740442395210266,
-0.25158485770225525,
-0.17498664557933807,
-0.532139003276825,
-0.5268739461898804,
0.5283359289169312,
-0.5223392844200134,
0.158653765916824... | |
//Rest of the validation code
}
}
```
Then you could do something as simple as:
```
<StackPanel>
<TextBox x:Name="txt" local:Validator.SkipValidation="{Binding IsChecked, ElementName=cbx}" />
<CheckBox x:Name="cbx" >Skip Validate?</CheckBox>
</StackPanel>
``` | [
0.2334146946668625,
0.1663115918636322,
0.3655734360218048,
-0.05769060552120209,
-0.014931373298168182,
-0.3804064393043518,
-0.09810470044612885,
-0.39891839027404785,
-0.5004400610923767,
-0.24140502512454987,
-0.18999212980270386,
0.0544276125729084,
-0.27172961831092834,
-0.0616011619... | |
Its been a while I have ready Mcconnell's "[Code Complete](http://cc2e.com/)". Now I read it again in Hunt & Thomas' "[The Pragmatic Programmer](http://www.pragprog.com/titles/tpp/the-pragmatic-programmer)": Use assertions! *Note: Not Unit Testing assertions, I mean `Debug.Assert()`.*
Following the SO questions [When ... | [
0.11413009464740753,
0.01742282137274742,
0.1257578283548355,
-0.12352566421031952,
0.016913797706365585,
-0.24873003363609314,
0.15454161167144775,
-0.4009210169315338,
-0.036325011402368546,
-0.3479401171207428,
0.048412226140499115,
0.6122727990150452,
0.5971691012382507,
0.251830250024... | |
I do feed classes and methods with `null`s and "impossible" dummy input (like an empty string).
Such tests are explicitly documenting, that they don't rely on some specific input. *Note: I am practicing what Meszaros' "xUnit Test Patterns" is describing as [Minimal Fixture](http://xunitpatterns.com/Minimal%20Fixture.h... | [
0.4528650939464569,
0.16894017159938812,
-0.47447046637535095,
-0.08351580053567886,
-0.33967605233192444,
-0.12632091343402863,
0.3751312494277954,
-0.07718261331319809,
-0.07672054320573807,
-0.499524861574173,
0.27952706813812256,
0.45837607979774475,
0.004875288810580969,
0.09424747526... | |
could be *really* useful? Maybe I just overestimate the usefulness of assertions? Or maybe my way of testing needs to be revisited?
Edit: [Best practice for debug Asserts during Unit testing](https://stackoverflow.com/questions/409955/best-practice-for-debug-asserts-during-unit-testing) is very similar, but it does no... | [
0.6359780430793762,
0.22723649442195892,
-0.2650303542613983,
0.23962290585041046,
-0.18627072870731354,
-0.023536166176199913,
0.3891141712665558,
-0.22086463868618011,
0.02680535800755024,
-0.32546642422676086,
0.02407173253595829,
0.682403564453125,
0.37383589148521423,
0.03105625137686... | |
makes asserts redundant. In theory. In parctice, they're still useful for debugging your tests, and for catching attempts by future developers who might try to use interfaces not according to their intended semantics.
In short, they just serve a different purpose from unit tests. They're there to catch mistakes that b... | [
0.6576308012008667,
0.41368919610977173,
0.2246716469526291,
0.5045244097709656,
-0.12896476686000824,
-0.3890114426612854,
0.5787633657455444,
-0.32205432653427124,
0.12770530581474304,
-0.09360641241073608,
0.03957020491361618,
0.9511435031890869,
0.2512303590774536,
0.22647997736930847,... | |
tests when under pressure than it is to disable all the assertions and runtime checks in a piece of code. | [
0.5051835775375366,
0.02266066148877144,
-0.1675315499305725,
0.35838979482650757,
0.20987693965435028,
-0.524543046951294,
0.7831016182899475,
-0.44665947556495667,
0.27160292863845825,
-0.5857011675834656,
-0.20428137481212616,
0.36235806345939636,
0.15578599274158478,
-0.093776315450668... | |
I am working on a legacy app in VB6 and am wondering what the easiest way would be to implement this requested feature - client wants ability to preview a document being sent to the printer as a PDF. No problem - there are plenty of PDF printer drivers out there that one can use. However, a necessary condition of this ... | [
0.3005712628364563,
0.026341989636421204,
0.4551907479763031,
0.22578449547290802,
-0.11813810467720032,
-0.3703637421131134,
-0.03010386787354946,
-0.011809905990958214,
-0.2604338526725769,
-0.7445709109306335,
-0.00038738251896575093,
0.6835224032402039,
0.08561499416828156,
0.245314255... | |
addition, client does not want to see a "Save As..." dialog. The ideal function of the feature is that a button is clicked, and what would have been sent straight to the printer is instead instantly previewed as a PDF that pops up with no further interaction with the user other than the user's initial pressing of a but... | [
0.22034721076488495,
-0.2772408127784729,
0.4487939774990082,
0.384999543428421,
-0.09109745174646378,
-0.20705662667751312,
-0.14997637271881104,
0.14461994171142578,
-0.22856836020946503,
-0.6852748394012451,
-0.10179363936185837,
0.607915997505188,
-0.14087428152561188,
0.14148311316967... | |
file". I do not want this - I want something that takes the data that is going right *to the printer* and pop it up as a PDF without a Save As
Now, CutePDF *seems* to have something like what I am looking for with their Custom PDF Writer (<http://www.cutepdf.com/Solutions/pdfwriter.asp>), but a) they do not seem to ha... | [
0.4541527032852173,
0.022608544677495956,
0.5317286252975464,
0.2747819721698761,
0.06983528286218643,
-0.29491668939590454,
0.04880736395716667,
0.0645325779914856,
-0.2958388924598694,
-0.6556271314620972,
0.06026488542556763,
0.44185617566108704,
-0.3916049897670746,
0.2198028266429901,... | |
I am open to any software as long as it gets this done, be it commercial, shareware, open source, whatever, so long as it satisfies the requirements of:
* Must be a PDF printer (i.e. take the data going to the printer and turn it into a PDF)
* must be completely transparent to end user (i.e. user must not have to chan... | [
0.7184774279594421,
0.17055939137935638,
0.5841084718704224,
0.04179266467690468,
-0.277809739112854,
-0.594256579875946,
0.05574521794915199,
0.10556788742542267,
0.07840413600206375,
-0.8209620118141174,
-0.46059611439704895,
0.4290217161178589,
0.07156053930521011,
0.04941045492887497,
... | |
and installed along with the app without the end user having to run another setup program
any ideas?
Thanks in advance :)
We've started using Bio PDF Writer, available here: www.biopdf.com.
It does offer the ability to silently install (which we do). It also offers the capability to write out to a pdf file silently,... | [
0.8025301098823547,
-0.0816943570971489,
0.35402432084083557,
0.2555863857269287,
-0.04122038185596466,
-0.10529651492834091,
0.13728874921798706,
-0.2502391040325165,
-0.10410473495721817,
-0.8082478642463684,
0.16054803133010864,
0.5199575424194336,
-0.2415236085653305,
-0.16962811350822... | |
decent and they do have a trial version (that, as far as I can tell, has no limitations to it). | [
0.6273576617240906,
0.21438010036945343,
-0.04901253059506416,
0.1730787605047226,
-0.021945564076304436,
-0.021056141704320908,
0.6991318464279175,
0.5393409729003906,
-0.07082296907901764,
-0.2741827070713043,
0.28545451164245605,
0.7405256628990173,
0.4786205291748047,
-0.18667133152484... | |
I'm using the Microsoft Sync Framework to synchronize a SQL Server database with a SQL Compact SDF file on the Windows Mobile 5 emulator. We have a 2 gig SD card in the actual device we're deploying on so we'd like to store our database file there. However, when I map a shared folder as the storage card in the Windows ... | [
0.13745446503162384,
0.1691126823425293,
0.5635724663734436,
0.04562554880976677,
0.25130730867385864,
-0.03741589933633804,
0.02700498327612877,
0.043867629021406174,
0.1980724185705185,
-0.7516717314720154,
-0.0017856587655842304,
0.6600867509841919,
-0.27090710401535034,
0.1430799961090... | |
going to store the database on the internal device storage, however, it's limited to 32 MB and I can't find a way to increase it. Does anyone know how to increase the storage space on the emulator. I'm talking storage space not RAM :).
Otherwise, does anyone know how to get past the bug of not being able to have a SQL... | [
0.054592568427324295,
0.22880259156227112,
0.42470261454582214,
0.24946080148220062,
0.2566848397254944,
0.03671468049287796,
0.025208309292793274,
0.037120115011930466,
-0.21073560416698456,
-0.37779587507247925,
0.23690535128116608,
0.7832201719284058,
-0.4004114270210266,
-0.03641958162... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.