text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
I Have a Gridview . I wanted to display data from Webservice via Ajax calls in ASP.net Please ,let me know the solution for this. Thanks in Advance.
How about converting it to a list, then choosing the correct one from it. Since SelectedItem doesn't seem to work, you may want to try setting SelectedValue.
```
var prod... | [
0.602263867855072,
-0.3075892925262451,
0.3314918577671051,
-0.020751990377902985,
0.08184612542390823,
-0.0266159325838089,
-0.17597436904907227,
-0.32124361395835876,
-0.2083415985107422,
-0.8772440552711487,
0.023019591346383095,
0.3406401574611664,
-0.08597760647535324,
0.2622924745082... | |
ProductId = p.ProductID,
Name = p.Name
}).ToList();
comboBox1.DataSource = productList;
comboBox1.DisplayMember = "Name";
comboBox1.ValueMember = "ProductId";
comboBox1.SelectedValue = 5;
``` | [
-0.1745666265487671,
-0.5466700196266174,
0.561152458190918,
-0.17384684085845947,
0.46322163939476013,
0.37093985080718994,
-0.004844531416893005,
-0.4682832360267639,
0.022671863436698914,
-0.6312305927276611,
-0.6097124814987183,
0.19771499931812286,
-0.22484125196933746,
0.234521180391... | |
I like the look and feel of the WordPress editor (version 2.7), and I would like to use it in another web application that is written in ASP.NET. I've used TinyMCE before, and I've even extended it in the past. However, I can't seem to get the Wordpress configuration to work!
I've downloaded the entire WordPress packa... | [
0.15088030695915222,
0.17441147565841675,
0.5371057391166687,
-0.2897008955478668,
0.07994652539491653,
0.006049151532351971,
0.2570130228996277,
0.05678872764110565,
-0.08061310648918152,
-0.850727915763855,
-0.0327472947537899,
0.6960460543632507,
-0.26532435417175293,
0.0804876163601875... | |
execution are identical with the WordPress demonstration site that I've based this from.
I'm not a Javascript newbie (at all), but I can't seem to figure out why this is not working. Has anybody tried to do this before? What am I missing?
A demo of what I am talking about is [here](http://demo.opensourcecms.com/wordp... | [
0.44900989532470703,
-0.02037717029452324,
0.12027426064014435,
-0.2138146460056305,
-0.12502892315387726,
-0.032916825264692307,
0.36482930183410645,
-0.5439105033874512,
-0.19485381245613098,
-0.993610143661499,
-0.014170036651194096,
0.7405237555503845,
-0.23796479403972626,
-0.06406101... | |
p in db.products
select new {
ProductId = p.ProductID,
Name = p.Name
}).ToList();
comboBox1.DataSource = productList;
comboBox1.DisplayMember = "Name";
comboBox1.ValueMember = "ProductId";
comboBox1.SelectedValue = 5;
``` | [
0.11743826419115067,
-0.4833723306655884,
0.5398426651954651,
-0.3555057942867279,
0.055186185985803604,
0.4123803377151489,
0.03170201927423477,
-0.7028844356536865,
0.12421207875013351,
-0.6949892044067383,
-0.5503089427947998,
0.1280583292245865,
-0.07295668870210648,
0.4081259965896606... | |
I was looking through some code from the [SDL](http://www.libsdl.org) library and came across a function declared like this:
```
LRESULT CALLBACK WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
```
Now, I'm a Delphi coder. No hablo C muy bien, senor. But I remember enough syntax from my college courses to... | [
0.015571195632219315,
0.07519847899675369,
0.3911879062652588,
-0.24193604290485382,
-0.24901461601257324,
-0.13993600010871887,
-0.3992035388946533,
0.24416637420654297,
-0.23846179246902466,
-0.26505064964294434,
-0.24559266865253448,
0.6221534609794617,
-0.2707577347755432,
-0.082352340... | |
why C doesn't work that way? Or does it mean something different?
The "CALLBACK" is a calling convention. There are other kinds of calling conventions. CALLBACK is the same as \_\_stdcall.
<http://www.codeguru.com/cpp/cpp/cpp_mfc/callbacks/article.php/c10557>
Some more information at Raymond Chen's blog:
<http://blo... | [
0.0847613587975502,
-0.011242534033954144,
-0.05988477170467377,
-0.13791760802268982,
-0.0731642097234726,
-0.21085962653160095,
-0.07666153460741043,
-0.14629563689231873,
-0.2837638556957245,
0.15195916593074799,
-0.43773555755615234,
0.528739869594574,
-0.5395693778991699,
0.1291388422... | |
I need to display a list of records from a database table ordered by some numeric column. The table looks like this:
```
CREATE TABLE items (
position int NOT NULL,
name varchar(100) NOT NULL,
);
INSERT INTO items (position, name) VALUE
(1, 'first'),
(5, 'second'),
(8, 'third'),
(9, 'fourth'),
(15, 'fifth'),
(20,... | [
0.091425321996212,
0.2756383419036865,
0.5041981935501099,
-0.0010102838277816772,
0.16348682343959808,
0.41376230120658875,
0.042727965861558914,
-0.40200161933898926,
-0.15823467075824738,
-0.6459179520606995,
-0.057440221309661865,
0.2756166458129883,
-0.14612361788749695,
0.46622395515... | |
1, 5, 8, 9
```
In other words the last record becomes the first and so on. Can you think of a way to do this in SQL?
I'm using MySQL but an example in any SQL database will do.
Thanks
See how this works for you. Uses generic SQL so it should be valid for MySql (untested) as well.
```
DECLARE @user_sort INTEGER
SET... | [
-0.06276600807905197,
0.023243416100740433,
0.549412727355957,
-0.1359197050333023,
0.07220939546823502,
0.1911907196044922,
-0.0694253221154213,
-0.5193610191345215,
-0.3838464319705963,
-0.687536358833313,
-0.13700281083583832,
0.3379651606082916,
-0.06460553407669067,
0.3902516663074493... | |
- rownumber < (@user_sort % maxrows) THEN 1 ELSE 2 END, position
```
Note:
\* If the user provided sort index is greater than the row count, the value will wrap to within the valid range. To remove this functionality, remove the "% maxrows" from the ORDER BY.
***Results:***
**SET @user\_sort = 0**
```
position ... | [
-0.34746071696281433,
0.025278495624661446,
1.0121747255325317,
-0.18718789517879486,
-0.052148107439279556,
0.36191654205322266,
0.07224994897842407,
-0.7516283988952637,
-0.34447553753852844,
-0.3614903390407562,
-0.21605448424816132,
0.6088337302207947,
0.18597659468650818,
0.2162719815... | |
sixth
1 first
5 second
8 third
9 fourth
```
**SET @user\_sort = 9**
```
9 fourth
15 fifth
20 sixth
1 first
5 second
8 third
``` | [
-0.2987520098686218,
-0.09427670389413834,
0.4104636311531067,
0.013630738481879234,
-0.6476903557777405,
0.5315622091293335,
0.23340828716754913,
-0.35652050375938416,
-0.425788938999176,
-0.538111686706543,
0.290146142244339,
0.2682698369026184,
0.5011293292045593,
0.29637154936790466,
... | |
I'm trying to convert a time info I reveive as a UTC string to a timestamp using `std::mktime` in C++. My problem is that in `<ctime>` / `<time.h>` there is no function to convert to UTC; mktime will only return the timestamp as local time.
So I need to figure out the timezone offset and take it into account, but I ca... | [
0.10919486731290817,
-0.18202237784862518,
0.43340882658958435,
0.06542790681123734,
0.13168545067310333,
0.0036100444849580526,
0.12620903551578522,
0.07273147255182266,
-0.05609665811061859,
-0.6465628743171692,
-0.020625362172722816,
0.40140974521636963,
-0.2667834460735321,
0.275015294... | |
environment variable beforehand (setenv) and get the UTC timezone.
[Windows tzset](https://learn.microsoft.com/en-us/cpp/c-runtime-library/reference/tzset?view=msvc-160)
Can also try looking at various home-made [utc-mktimes, mktime-utcs, etc.](http://www.koders.com/c/fidB1A0A680FBCF84DDC534E66371053D726A5546EB.aspx?... | [
0.27994829416275024,
-0.16905932128429413,
0.33233779668807983,
0.24691860377788544,
0.3562266528606415,
-0.1279541254043579,
0.1941671520471573,
-0.025596531108021736,
-0.16462120413780212,
-0.5911130309104919,
-0.1540341079235077,
0.5964816212654114,
-0.09937694668769836,
0.1750944703817... | |
Suppose I have an object representing a person, with getter and setter methods for the person's email address. The setter method definition might look something like this:
```
setEmailAddress(String emailAddress)
{
this.emailAddress = emailAddress;
}
```
Calling `person.setEmailAddress(0)`, then, would g... | [
0.08707954734563828,
-0.029500992968678474,
0.427718847990036,
-0.19024258852005005,
-0.2420562356710434,
0.11384674161672592,
0.12668000161647797,
-0.26774582266807556,
0.11176516860723495,
-0.7001085877418518,
-0.34029704332351685,
0.2223966121673584,
-0.17657729983329773,
0.010315201245... | |
names ... you get the idea. Yet these data types are most often stored as "just strings".
Returning to my person object, suppose I modify `setEmailAddress()` like so
```
setEmailAddress(EmailAddress emailAddress)
// ...
```
where `EmailAddress` is a class ... whose constructor takes a string representation of a... | [
0.18392693996429443,
0.3198918104171753,
0.3871566653251648,
0.07110447436571121,
0.0036825290881097317,
-0.059896353632211685,
0.23824875056743622,
-0.10764242708683014,
-0.030954010784626007,
-0.5835720896720886,
-0.00015399069525301456,
0.38091230392456055,
-0.08220355212688446,
0.50824... | |
string becomes important.
So I ask all of you, how do you deal with strings that have structure? And how do you make your structural expectations clear in your interfaces?
Thank you.
**Welcome to the world of programming!**
I don't think your question is a symptom of an error on your part. Rather it is a **basic pro... | [
0.3974807560443878,
0.19898033142089844,
0.25920188426971436,
0.06905657052993774,
-0.4724952280521393,
-0.30150148272514343,
0.172293558716774,
0.07916383445262909,
-0.3069218099117279,
-0.5847342014312744,
-0.18647783994674683,
0.3088254928588867,
-0.09133325517177582,
0.2564875185489654... | |
tricky. The regular expressions various people offer accepting an email address, for example, are generally either "too tight" (don't accept everything) or "too loose" (accept illegal things). [The first google hit](http://www.regular-expressions.info/email.html) for 'regex "email address"', for example says:
> The re... | [
0.10915039479732513,
-0.15454354882240295,
0.5909193158149719,
0.030599182471632957,
-0.05192402005195618,
-0.2535492479801178,
0.3204917013645172,
0.10767783224582672,
-0.20446209609508514,
-0.39519426226615906,
-0.30364200472831726,
0.5986162424087524,
-0.4260629713535309,
-0.22758601605... | |
address
> that this regex doesn't match.
The fact is the what is or isn't a valid email address is a complex problem, one that a given program might or might not want to solve. The problem of URLs is even worse, especially given the possibility of malicious URLS.
Ideally, you can have a library or system-call which... | [
0.19116050004959106,
-0.06616056710481644,
0.23032580316066742,
0.4350578188896179,
-0.10934027284383774,
-0.14450161159038544,
0.43867021799087524,
0.08914318680763245,
-0.10173166543245316,
-0.7110059261322021,
-0.2251511961221695,
0.5281561613082886,
-0.19746853411197662,
0.119228899478... | |
appropriate system call for a given "meaningful string" either.
I would say that there no a generic solution to the problem of strings-with-structure. Rather, it is a basic problem that appears right when you design your application. In the process of **[gathering requirements](http://c2.com/cgi/wiki?RequirementsGath... | [
0.23228660225868225,
0.04997231811285019,
0.39209476113319397,
0.2674822509288788,
0.18764522671699524,
-0.2536090612411499,
0.10202671587467194,
-0.1552799493074417,
-0.22492188215255737,
-0.7285395860671997,
-0.2916063070297241,
0.5923715829849243,
-0.12964002788066864,
0.009651440195739... | |
may in fact grow in ways that none of you thought of. Thus the application needs to be a *little* more flexible than what seems like the minimum BUT only a little. It should also not be so flexible you get bogged down.
Now, if you decide that you need to validate/interpret etc a given string, putting that string into... | [
0.5280032157897949,
-0.048619344830513,
0.2510453164577484,
0.3087497651576996,
-0.1530325710773468,
-0.2477494180202484,
0.1444849818944931,
-0.0006821210263296962,
-0.3899299204349518,
-0.5496128797531128,
0.04126276820898056,
0.5067079663276672,
-0.11052311211824417,
-0.0508290752768516... | |
decisions is thus an art - there are no dogmatic answers that work here. | [
0.13020800054073334,
0.10712303966283798,
-0.2856214940547943,
0.3622188866138458,
0.012351257726550102,
0.3199489712715149,
-0.10205786675214767,
-0.3091045022010803,
-0.11544367671012878,
-0.6910186409950256,
-0.16893069446086884,
0.7519224286079407,
-0.007818974554538727,
-0.31345531344... | |
I can't seem to figure out how to access POST data using WSGI. I tried the example on the wsgi.org website and it didn't work. I'm using Python 3.0 right now. Please don't recommend a WSGI framework as that is not what I'm looking for.
I would like to figure out how to get it into a fieldstorage object.
Assuming you ... | [
0.3690255582332611,
0.16068674623966217,
0.3974432051181793,
-0.21570010483264923,
-0.22908951342105865,
-0.11730813980102539,
0.1055140346288681,
0.11202800273895264,
-0.19096700847148895,
-0.7504268288612366,
-0.013579407706856728,
0.36041995882987976,
-0.35065707564353943,
0.19359809160... | |
only have POST data in there.
post_env = env.copy()
post_env['QUERY_STRING'] = ''
post = cgi.FieldStorage(
fp=env['wsgi.input'],
environ=post_env,
keep_blank_values=True
)
``` | [
0.08118443936109543,
0.049084004014730453,
0.5021995306015015,
0.10649127513170242,
0.21423697471618652,
0.0720372349023819,
0.22958146035671234,
-0.017790118232369423,
-0.15630599856376648,
-0.7543460130691528,
-0.4193328619003296,
0.25070247054100037,
-0.43627381324768066,
0.103995546698... | |
I've written an Microsoft Excel add-in in .NET using [Add-in Express](http://www.add-in-express.com), and deployed it to about 50 different user sites, all running Office 2003 on Windows XP. The add-in works fine at the majority of sites, but in a few cases, Excel seems to disable the add-in after a while, and they hav... | [
0.012016350403428078,
0.15342316031455994,
0.3854719400405884,
-0.23943999409675598,
-0.08577341586351395,
0.10037431120872498,
0.23221604526042938,
-0.0066602216102182865,
-0.00032682035816833377,
-0.6420682668685913,
-0.08893794566392899,
0.4129665791988373,
-0.4702773094177246,
-0.32824... | |
for here is just a general method to find out why Excel disables an add-in. In my situation, the add-in is running at remote sites, and I've had limited access to troubleshoot. I did look in the event log and didn't spot anything. I also have error logging in my add-in, and that hasn't caught anything.
Any suggestions... | [
0.6564583778381348,
0.1043252944946289,
0.02182256057858467,
0.010904975235462189,
-0.09404974430799484,
-0.41382932662963867,
0.522899866104126,
0.23891176283359528,
-0.43520545959472656,
-0.359436959028244,
-0.2177012711763382,
0.5331022143363953,
-0.4485434293746948,
-0.1171068474650383... | |
addin had a fatal error, would you like to disable it?" (as Chris points out).
I find that users will invariably just click yes, so they can get on with their work. It might be worth talking to your users and see if they have seen something like this.
Obviously there is an underlying problem with the addin that you w... | [
0.5814887285232544,
0.01144464686512947,
0.04251610487699509,
0.2916680574417114,
-0.12391548603773117,
-0.024731259793043137,
0.2586999833583832,
0.28184717893600464,
-0.2862808108329773,
-0.4571293592453003,
0.07691165059804916,
0.5056070685386658,
-0.3527558147907257,
-0.061494372785091... | |
is going on.
* Talking to users and find out conditions that led to hang/crash in Excel, so you can try and reproduce the problem (if this is a crash then logging might not help much).
* Blocking calls in your addin or in code that you are calling that might lead to a user killing a non-responsive Excel?
Good luck tra... | [
0.5962944626808167,
0.2513276934623718,
0.29254257678985596,
0.015712935477495193,
-0.11840707808732986,
-0.32761329412460327,
0.4047847092151642,
0.02194269932806492,
-0.3341013491153717,
-0.40039730072021484,
0.0024385752622038126,
0.48872488737106323,
-0.3566977381706238,
-0.12576350569... | |
you select the Require Application Extensions to be signed by Trusted Publisher check box. In some situations, the dynamic-link library (.dll) (Dynamic Link Library: A set of routines that can be called from Visual Basic procedures and are loaded and linked into your application at run time.) file that contains the add... | [
0.5850017070770264,
-0.028613613918423653,
0.6308476328849792,
0.06405641883611679,
0.33665379881858826,
-0.23917819559574127,
0.3271365761756897,
-0.543070375919342,
-0.03761753439903259,
-0.6763672828674316,
-0.5852553844451904,
0.44673866033554077,
-0.5012412667274475,
-0.17545659840106... | |
other add-in check boxes are made unavailable. | [
0.3400402367115021,
0.07014258205890656,
0.10498689860105515,
0.151924729347229,
0.6759828329086304,
0.02010590210556984,
0.21119721233844757,
0.04572134464979172,
-0.1504470854997635,
-0.5567070245742798,
-0.22148920595645905,
-0.2646849751472473,
-0.29957953095436096,
-0.2741786539554596... | |
Does anyone know how get a listing of all files changed in multiple changesets in Visual Studio Team System 2005? I basically want to see a listing of all files changed from the start of a development effort till the end.
With the power tools installed:
```
# get-tfschangeset doesn't support arrays, so you have to loo... | [
-0.07915500551462173,
-0.2193184643983841,
0.4070337414741516,
-0.12404371798038483,
-0.049835700541734695,
-0.023675892502069473,
0.32765433192253113,
-0.3031626343727112,
-0.5015566349029541,
-0.7755225300788879,
0.16063667833805084,
0.4929296374320984,
-0.4871293306350708,
-0.1971180438... | |
I have a `User.create` action that provisionally registers a new user and sends an email with a generated password. What is the most Rails-like way to complete that action? I want to do everything exactly right from now on. No more nonsense. This time I'm serious.
I'm thinking these are the options...
1. Create a vie... | [
0.4334205985069275,
0.014460629783570766,
0.24178968369960785,
-0.2387014925479889,
-0.22414681315422058,
0.0007689664489589632,
0.21474288403987885,
-0.05199578031897545,
-0.05004468560218811,
-0.8857136964797974,
0.09113072603940964,
0.337007999420166,
-0.16842177510261536,
-0.0076693692... | |
a message in the flash.
Or something else...?
This is more of a user experience question.
Leave the create action as something that just creates and has no output (or just a simple `201 Created` header if created by an API call). Do a `redirect_to` to either:
1. A thanks page telling them how to wait and what will h... | [
0.5709660053253174,
-0.08081898838281631,
0.4115293025970459,
0.04280468076467514,
-0.26259174942970276,
-0.12385901063680649,
0.3386726975440979,
-0.14276711642742157,
-0.18098151683807373,
-0.5646602511405945,
-0.30125269293785095,
0.4129406213760376,
-0.4824190139770508,
-0.145755395293... | |
format.xml { render :head => :created }
end
end
```
For instance. | [
0.016989732161164284,
-0.17701201140880585,
0.49557510018348694,
0.15191000699996948,
-0.21039751172065735,
-0.5087082982063293,
-0.21326808631420135,
0.0744798555970192,
-0.025186045095324516,
-0.8594634532928467,
-0.42825034260749817,
0.33671602606773376,
0.07689952850341797,
0.209014460... | |
I am very new to screen and I have hit C-Something instead of C-a. Now I cannot detach or do any other commands. What can I do to detatch my screen session?
Possibly you got `C-s` (s for "stop") try `C-q` to resume... | [
0.22432470321655273,
0.31350159645080566,
0.4501917362213135,
-0.18652920424938202,
0.02618584781885147,
-0.1502508819103241,
0.5242533683776855,
0.15736137330532074,
-0.20590125024318695,
-0.504643440246582,
-0.09592437744140625,
0.6964470744132996,
0.06613850593566895,
0.227353036403656,... | |
I'm trying to figure out how to do this, and I"m stumped. I'm sure it's something simple that I'm just missing.
Say I have a table that is a collection of names, and I want to check if a subset of those names exist like this:
```
var names = new List{ "John", "Steven", "Mary"};
var dbNames = from n in Db.Names
... | [
0.27280449867248535,
0.371551513671875,
0.14889472723007202,
-0.04925881698727608,
0.012530691921710968,
-0.13543717563152313,
0.18076100945472717,
-0.4822077751159668,
-0.41614386439323425,
-0.5765803456306458,
0.05004386603832245,
0.190934956073761,
-0.4641362130641937,
-0.12423422187566... | |
good place to start. | [
0.2842349708080292,
0.4063313901424408,
-0.06318474560976028,
0.018068479374051094,
0.16797053813934326,
-0.16819645464420319,
0.1531141847372055,
0.26614871621131897,
0.019214028492569923,
-0.16372036933898926,
0.2680804431438446,
0.12089347094297409,
0.23446427285671234,
0.08442233502864... | |
I want to unserialize a `session_encode()`'d string of session data to my own array (i.e. not to `$_SESSION`.)
There doesn't appear to be an in-built function that handles this. There's `session_decode()` but it writes directly to the `$_SESSION` super-global. There's `unserialize()` but it returns false on `session_e... | [
0.22652825713157654,
0.21832752227783203,
0.24302123486995697,
-0.07418539375066757,
-0.03536964952945709,
-0.22910362482070923,
0.5492500066757202,
0.02256702445447445,
-0.13775840401649475,
-0.6043144464492798,
0.14995908737182617,
0.7530791759490967,
-0.26578637957572937,
0.172215849161... | |
I want to use `printf` to display hex numbers in the form `0x###`, but if the number is 0, I want to omit the `0x` part.
```
printf("%#x", number);
```
Note that this does **exactly** what you want. If the value of number is 0, it prints 0, otherwise it prints in hex. Example:
```
int x = 0;
int y = 548548;
printf(... | [
0.17615914344787598,
0.35185882449150085,
0.2735786437988281,
-0.13655692338943481,
0.03695644438266754,
0.20013990998268127,
0.2353426218032837,
-0.20003055036067963,
-0.10226567089557648,
-0.46437981724739075,
-0.3976081311702728,
0.46506965160369873,
-0.4908635914325714,
0.0358280725777... | |
I asked a previous question [here](https://stackoverflow.com/questions/530787/simple-http-web-server) but after reading the answers realised I hadn't done a very good job of defining my requirements.
Here's what I'm after:
* Cross platform
* Drag, drop and start
* Preferably a single file
So to sum up I want somethi... | [
0.270771324634552,
0.1744273155927658,
0.41918307542800903,
-0.26552215218544006,
-0.0825619176030159,
-0.04857371002435684,
0.23999381065368652,
-0.31850457191467285,
-0.4301568269729614,
-0.5624687075614929,
-0.3179281949996948,
0.5835680365562439,
-0.4887915253639221,
-0.275321871042251... | |
serv = BaseHTTPServer.HTTPServer(('', port), SimpleHTTPServer.SimpleHTTPRequestHandler)
except:
continue
else:
print ("Launched on port " + str(port))
serv.serve_forever()
raise Exception("No ports available")
launchServer([80] + range(8000, 9000))
```
For... | [
0.39329612255096436,
-0.25867605209350586,
0.5890594720840454,
-0.335725873708725,
-0.05386332795023918,
-0.09077731519937515,
0.31438902020454407,
-0.23074981570243835,
-0.22608289122581482,
-0.5814169645309448,
-0.520544171333313,
0.430023729801178,
-0.5060995221138,
0.3051014542579651,
... | |
I have a datetime field in a Sybase table, and need to use it in Perl for doing some calculations (differences to make sure I'm picking up the records that are at least 'n' mins apart). Now, if I simply do a select `<datetime field`>, Sybase returns a human readable field which is no use to me. I was looking at some wa... | [
0.1536027044057846,
-0.05636489391326904,
0.43603113293647766,
0.09511786699295044,
0.12743113934993744,
-0.08381251245737076,
-0.2522309124469757,
0.20491163432598114,
-0.36468538641929626,
-0.6332158446311951,
0.13090790808200836,
0.3316078782081604,
-0.27629879117012024,
0.2412171363830... | |
was datediff, which serves my purpose fine. In fact, I am using that as a workaround for now. The problem with datediff is because of the limitation on integer, it's capped at 68 years. I know my code probably won't be around till that time, but why introduce such a time-based limit on my own?
Is there a way to get ar... | [
0.07662894576787949,
0.178429514169693,
0.726911723613739,
-0.22012656927108765,
-0.10176118463277817,
-0.044308293610811234,
0.2619526982307434,
0.3626980781555176,
-0.529877781867981,
-0.3553832173347473,
0.4010864496231079,
0.24353769421577454,
-0.10259201377630234,
0.3984890878200531,
... | |
There seems to be a lot of stress/load testing tool that support AJAX.
I am wondering how well does these tool implemented.
Do they only record http request and replay it?
Is it the right way to test AJAX app?
How does google test their ajax apps?
If you are worried about functionality only, something like [W... | [
0.49947047233581543,
-0.06397484242916107,
-0.04632772505283356,
0.29469361901283264,
-0.497530072927475,
-0.14659883081912994,
0.37819886207580566,
-0.19608062505722046,
-0.17472027242183685,
-0.6110675930976868,
0.12078658491373062,
0.6892286539077759,
0.08611126244068146,
-0.09097460657... | |
testing your javascript you could use something like qunit as described by a fellow LosTechian [in this posting](http://[4]). This is a pretty inventive use of an nunit addin and qunit for integrating js unit tests.
By pure coincidence, the same person that posted that qunit testing blog post just posted one yesterday... | [
0.46831125020980835,
0.1056530624628067,
-0.4444057047367096,
0.27966171503067017,
-0.17879801988601685,
-0.2741890549659729,
0.48118075728416443,
-0.013075659051537514,
0.05259242653846741,
-0.6012402176856995,
0.3902563452720642,
0.30389857292175293,
-0.11070287972688675,
-0.121729299426... | |
I am trying to perform the following SQL using LINQ and the closest I got was doing cross joins and sum calculations. I know there has to be a better way to write it so I am turning to the stack team for help.
```
SELECT T1.Column1, T1.Column2, SUM(T3.Column1) AS Amount
FROM T1
INNER JOIN T2
ON T1.T1ID = ... | [
0.03318864479660988,
0.23344440758228302,
0.5242101550102234,
-0.4883961081504822,
-0.15937088429927826,
0.2622610032558441,
0.10990181565284729,
-0.598312497138977,
0.09051995724439621,
-0.6046169996261597,
0.14698708057403564,
0.5383289456367493,
-0.14331388473510742,
0.17387913167476654... | |
from T2 in context.T2
from T3 in context.T3
where T3.T3ID == T3.T3ID
group T3 by T2.T1ID into gT2T3
from T1 in context.T1
where gT2T3.Key.Equals(T1.T1ID) | [
-0.44135797023773193,
-0.38873130083084106,
0.2771598696708679,
-0.1940777748823166,
-0.35446131229400635,
0.32385575771331787,
0.41425758600234985,
-0.6823579668998718,
-0.01867034286260605,
-0.5901334285736084,
-0.4505460560321808,
0.3026820719242096,
-0.4378332793712616,
0.1533026099205... | |
select new { T1.Column1,T1.Column2,Amount = gT2T3.Sum(t => t.Column1)};
```
I know there has to be a better way to write it, I just do not know how, any help would be great!
Try this:
```
var total = from T1 in context.T1
join T2 in context.T2 on T1.T2ID equals T2.T2ID
join T3 in context.T3 o... | [
-0.18779772520065308,
-0.33322224020957947,
0.3994993269443512,
-0.1456598937511444,
-0.04424179345369339,
0.16150443255901337,
0.31349679827690125,
-0.6601201295852661,
-0.18929244577884674,
-0.6574447154998779,
-0.04532414302229881,
0.629967212677002,
-0.12833145260810852,
0.071764171123... | |
new { T1.Column1, T1.Column2 } into g
select new {
Column1 = T1.Column1,
Column2 = T2.Column2,
Amount = g.Sum(t3 => t3.Column1)
};
``` | [
-0.31170719861984253,
-0.2421499490737915,
0.5293663144111633,
-0.3892210125923157,
0.08632207661867142,
0.3098548352718353,
0.020640959963202477,
-0.6029801368713379,
-0.22777096927165985,
-0.5497800707817078,
-0.36339855194091797,
0.5724145174026489,
-0.23575761914253235,
0.1333248466253... | |
I'm currently involved in a project developing applications primarily for Linux (Fedora 10). However, it might be the case later on that we will have to port these applications to Mac OS X and Windows and we don't want to be caught out by choosing the wrong GUI toolkit.\*
For a variety of legacy reasons we are locked ... | [
0.47332993149757385,
0.23705485463142395,
0.0013578706420958042,
-0.11775267124176025,
0.1787784993648529,
-0.1038542091846466,
0.08538925647735596,
0.33102139830589294,
-0.1596893072128296,
-0.8685956597328186,
0.19566072523593903,
0.7061781287193298,
-0.40475139021873474,
0.0161953903734... | |
far (just developing on Linux) there isn't much difference between them. However, there's a limit to the depth I can go in a short time. This is why I'm asking for help.
The particular features of interest to us are:
* Frameless windows
* custom shaped windows (i.e. not rectangular)
* aesthetically pleasing
Does any... | [
0.3579559326171875,
0.00032579427352175117,
0.05610689893364906,
0.062187712639570236,
0.3112306594848633,
-0.05878577008843422,
-0.16097456216812134,
0.2547767162322998,
-0.04430919140577316,
-0.7359222769737244,
0.1797790229320526,
0.6705113649368286,
0.4224608838558197,
0.12171651422977... | |
options will do. I promise not to write any cross-platform specific code until I have to :)
**Update 11 Feb:** Thanks for the great answers. For those that are curious, we will probably go with Jambi. It was mostly the style sheet functionality that won me over as they make easy a lot of the custom widget shape stuff ... | [
0.18188302218914032,
-0.17043045163154602,
0.38442251086235046,
0.24558359384536743,
0.007416827138513327,
-0.25650882720947266,
0.17089875042438507,
0.2696762681007385,
-0.3341696858406067,
-0.8683769702911377,
-0.009415208362042904,
0.815567672252655,
-0.003883352968841791,
-0.3767932653... | |
with Vinegar: Don't rule out Swing. I've developed both with Swing and with SWT, but not with Qt. With Swing, your code will be automatically cross-platform. With SWT, your code is cross-platform with a little effort, although not that much effort. Are you going to implement a local application, an Applet, or a Web Sta... | [
0.1322248876094818,
-0.019193395972251892,
0.30314379930496216,
-0.12217855453491211,
-0.11980704963207245,
-0.09488455206155777,
-0.032122645527124405,
-0.060674458742141724,
0.2791403532028198,
-0.7678754329681396,
0.25931593775749207,
0.5759300589561462,
-0.2480597347021103,
-0.20539732... | |
doing and what your goals are. This means that Swing has a greater breadth of widgets. However, there are a few things that SWT does that Swing doesn't do as well (or at all) -- such as launch the system's native browser and execute JavaScript scripts in this browser.
If you consider SWT, consider it carefully. If you... | [
0.680390477180481,
-0.22528262436389923,
0.1890469342470169,
0.20713816583156586,
-0.2993188202381134,
-0.3816300630569458,
0.26476606726646423,
-0.22433002293109894,
-0.3428100645542145,
-0.5845615267753601,
-0.041992247104644775,
0.25647175312042236,
-0.008289886638522148,
-0.19886218011... | |
about Qt Jambi.
Note that support should be a consideration in your decision. With SWT, there is a smaller community supporting it. With Swing, a larger community, but this does not mean that fixes will get more quickly into a development release. With Qt Jambi and with SWT, if a bug is fixed, you just distribute upda... | [
0.6321463584899902,
-0.019258080050349236,
0.057228125631809235,
0.1939527988433838,
0.0952191948890686,
-0.672314465045929,
0.3163221776485443,
-0.02110937610268593,
-0.22048446536064148,
-0.4371830224990845,
-0.28675997257232666,
0.5609563589096069,
-0.32892292737960815,
-0.1742953509092... | |
I don't know about either way, but it may depend on your intended use -- for example, are you distributing a GPL application, or a commercially licensed one.
Good luck. | [
0.6441904306411743,
0.21096809208393097,
0.19823327660560608,
0.4081993103027344,
0.06869187951087952,
-0.7258644700050354,
0.011551149189472198,
0.6296762228012085,
-0.1659035086631775,
-0.35510754585266113,
0.09293569624423981,
0.4519517123699188,
0.10502967238426208,
-0.0398678518831729... | |
I need to dynamically create mathematical expressions in ASP.NET much like:
[This](http://rogercortesi.com/eqn/index.php)
I have seen [mimeTeX](http://www.forkosh.com/mimetex.html) however, was curious if anyone knew of other solutions? I would like to use [TeX](http://en.wikipedia.org/wiki/TeX) without needing LaTeX... | [
0.26212480664253235,
-0.10680379718542099,
0.27148139476776123,
-0.09837926179170609,
-0.12601850926876068,
0.09058346599340439,
0.20897677540779114,
-0.19064392149448395,
-0.0019439153838902712,
-0.7462778091430664,
0.32060661911964417,
0.579077959060669,
-0.19354456663131714,
-0.12763719... | |
is that it uses all native widgets. (familiar Look-and-feel.) The disadvantage of SWT is that it uses all native widgets. (not as many widgets as Swing has) Whether this is more an advantage or a disadvantage depends on what you are doing and what your goals are. This means that Swing has a greater breadth of widgets. ... | [
0.2219778299331665,
-0.016071904450654984,
0.1411937177181244,
0.1856621354818344,
-0.30133670568466187,
-0.4092214107513428,
0.2558829188346863,
-0.2312803566455841,
-0.22636041045188904,
-0.5722375512123108,
-0.128635972738266,
0.31587040424346924,
-0.18040847778320312,
-0.14331991970539... | |
needs (such as executing JavaScript in a browser window that was launched by your application), then it may be your best choice. However, if Swing can entirely meet your needs, it may be a better choice.
Hopefully someone else can provide information about Qt Jambi.
Note that support should be a consideration in your... | [
0.47975486516952515,
-0.12065475434064865,
-0.08257809281349182,
0.1510450690984726,
-0.0985107272863388,
-0.3570168614387512,
0.324432909488678,
-0.14237894117832184,
-0.3368750214576721,
-0.744928240776062,
-0.25722256302833557,
0.4114752411842346,
-0.31868305802345276,
-0.25736838579177... | |
application. With Swing, you have to wait for an updated JRE. Neither is necessarily a dealbreaker, but it has to be considered.
Licensing fees may or may not be a consideration. SWT and Swing, of course, do not have licensing fees Jambi I don't know about either way, but it may depend on your intended use -- for exam... | [
0.709923505783081,
0.12501829862594604,
0.6844103336334229,
0.22557717561721802,
-0.04599733650684357,
-1.0135542154312134,
-0.08521945029497147,
-0.2759520411491394,
-0.3682222068309784,
-0.42037123441696167,
-0.14136819541454315,
0.48893168568611145,
0.0952521413564682,
-0.04579456150531... | |
> **Possible Duplicate:**
>
> [fb like button creates a white background on page onload in all ie versions](https://stackoverflow.com/questions/6438502/fb-like-button-creates-a-white-background-on-page-onload-in-all-ie-versions)
I have a site where portions of the content are loaded into IFrames.
The problem I'm ... | [
0.09089690446853638,
0.2785398066043854,
0.20449620485305786,
-0.4122031629085541,
0.009455610997974873,
0.007992231287062168,
0.5154493451118469,
0.42035937309265137,
-0.18149542808532715,
-1.0034018754959106,
-0.1675804853439331,
0.15334002673625946,
-0.3973134458065033,
0.24141180515289... | |
here - is there a good way to keep the page from rendering until the contents are ready to be displayed?
**UPDATE:** Looks like the "white area" bit I'm describing is IE-specific.
It's not too hard:
`<iframe id="IFR" src="time.php" style="background-color: #f00;" />`
Edit: I neglected to test in IE -- it does work i... | [
0.37264272570610046,
0.06717341393232346,
0.21659862995147705,
-0.3554956018924713,
0.013523537665605545,
-0.03342505171895027,
0.4225788116455078,
-0.13661502301692963,
-0.1980711668729782,
-0.8190190196037292,
-0.16361543536186218,
0.32624906301498413,
-0.3385586738586426,
0.110782839357... | |
Background: I'm creating a very simple chatroom-like ASP.NET page with C# Code-Behind. The current users/chat messages are displayed in Controls located within an AJAX Update Panel, and using a Timer - they pull information from a DB every few seconds.
I'm trying to find a simple way to handle setting a User's status... | [
0.39608779549598694,
-0.08063149452209473,
0.4349655508995056,
0.007302150130271912,
0.0020288194064050913,
-0.010623948648571968,
0.15752030909061432,
0.5346041321754456,
-0.24842479825019836,
-0.6961168050765991,
0.028372032567858696,
0.40936094522476196,
-0.09300849586725235,
0.00788754... | |
course the trouble is, I'd still have to test this hidden form variable in my Code-Behind somewhere to do the final Server-Side DB Query, effectively setting the User offline.
I may be completely obfusticating this likely simple problem! and of course I'd appreciate any completely different alternative suggestions.
T... | [
0.3378148078918457,
0.15659962594509125,
0.31935006380081177,
0.15551257133483887,
-0.22787891328334808,
-0.46568822860717773,
0.7320050597190857,
0.25696226954460144,
-0.15495222806930542,
-0.3268178701400757,
0.05851559713482857,
0.5140063762664795,
-0.07494580745697021,
0.47118017077445... | |
this is with a "dead man's switch." Since you said that they are pulling information from the database every few seconds, use that opportunity to store (in the database) a timestamp for the last time you heard from a given client.
Every minute or so, on the server, do a query to find clients that have not polled for a... | [
0.42116063833236694,
-0.13694681227207184,
0.4112487733364105,
0.20646707713603973,
0.18304342031478882,
-0.08175525814294815,
-0.03435111418366432,
0.2494390457868576,
-0.599632978439331,
-0.5933755040168762,
0.14771494269371033,
0.37567436695098877,
-0.012043673545122147,
0.1899829655885... | |
If I have a commercial site belonging to a Japanese company which will use Katakana or Kanji *(non ASCII characters)* for the keyword they wish to obtain good search results in google, does it still matter to put the closest english word on the site DNS Name?
like:
if the search word is "homepage" in Katakana: ホームペー... | [
0.5766788721084595,
0.14393697679042816,
0.19900475442409515,
0.17477993667125702,
-0.21587875485420227,
-0.26372700929641724,
-0.0207144133746624,
-0.08104833215475082,
-0.22194232046604156,
-0.2349034994840622,
-0.11273131519556046,
0.5184503793716431,
0.15730515122413635,
-0.09246864169... | |
is still weak in a lot of tools I would think that a Japanese DNS name would bring less hits than an English one.
On another side, in my experience the content and proper tagging of the content is way-way more important than the domain name itself to attract traffic. | [
0.37361347675323486,
0.06667620688676834,
0.35310396552085876,
0.297096848487854,
-0.46382230520248413,
-0.5345011353492737,
0.21396403014659882,
0.4369218647480011,
-0.17667007446289062,
-0.23531383275985718,
-0.19672243297100067,
0.28460264205932617,
0.3342074453830719,
0.387875437736511... | |
So I am working on a project which uses ASP.NET. I am trying to call Cache["key"] but the compiler complains about how System.Web.Caching.Cache is "nat valid at this point".
If I call Cache obj = new Cache(); the obj is always null.
I can access HttpContext.Current.Cache - but this doesnt let me specify an absolute e... | [
0.1664668470621109,
0.02090187557041645,
0.5139595866203308,
-0.1799641251564026,
0.2157370001077652,
-0.17276744544506073,
0.4559365510940552,
-0.12803636491298676,
-0.3032769560813904,
-0.7662476897239685,
0.1171928346157074,
0.42199185490608215,
-0.20855949819087982,
0.6618740558624268,... | |
exampleItem,
Nothing,
DateTime.Now.AddHours(1), | [
0.15294070541858673,
0.03196238353848457,
-0.15678851306438446,
-0.16819369792938232,
0.13445967435836792,
0.134904146194458,
0.43573838472366333,
0.11506745964288712,
-0.2624220550060272,
-0.5280439257621765,
-0.20883937180042267,
0.2940951883792877,
-0.6834911108016968,
0.143207371234893... | |
System.Web.Caching.Cache.NoSlidingExpiration);
```
The exact same code should also work with HttpContext.Current.Cache. | [
-0.035490069538354874,
-0.09045810252428055,
0.28831472992897034,
0.07565376907587051,
0.2282843440771103,
-0.35757511854171753,
0.535983681678772,
0.07337960600852966,
-0.18288247287273407,
-0.9023346900939941,
-0.25590530037879944,
0.14599746465682983,
-0.34130048751831055,
0.27273306250... | |
I have a stream object, and I want to create and output xml using some kind of xml stream, based on data in my input stream. I haven't done much work with streams, so I am trying to learn how to do this as efficiently as possible. The idea is that I do not want to load the entire input stream in memory, then create the... | [
0.44718655943870544,
0.14493750035762787,
0.23127630352973938,
0.17886792123317719,
-0.23283828794956207,
0.04038373380899429,
-0.11885746568441391,
0.12609785795211792,
0.057390354573726654,
-0.6116970777511597,
0.150443896651268,
0.45319506525993347,
-0.08957310020923615,
0.3432011306285... | |
read in the input stream, the xml stream is built and the data read from the input stream is discarded. Additionally, I would like to architect it so that the xml stream isn't built completely then passed out, but instead the xml stream can be read as it is being built. Does anyone have some code samples, or good resou... | [
0.4578886926174164,
-0.2016511708498001,
0.2505233883857727,
0.4005979895591736,
-0.10975854843854904,
-0.18163162469863892,
-0.11329092085361481,
0.03279468044638634,
0.012674903497099876,
-0.8021148443222046,
0.009472936391830444,
0.4755432605743408,
-0.1463187336921692,
0.05305912345647... | |
stream to use to your code as an argument, you could hook up a memory stream, or a file stream or just about anything without the XML formatting code needing to know. The XmlTextWriter will periodically flush the data (so it wont stick around unless nothing reads it from the stream), just remember to do a final flush/c... | [
0.18511183559894562,
-0.2261890172958374,
0.4645739197731018,
0.29351603984832764,
-0.1829318404197693,
0.05581880733370781,
-0.10607119649648666,
0.028910867869853973,
0.2790120840072632,
-0.7815102934837341,
0.060452960431575775,
0.6131678223609924,
-0.16488435864448547,
-0.0562756508588... | |
will be reading it. So you end up with a loop (or loops) that is reading a bit, doing some processing, then writing to the XmlTextWriter all at once. | [
0.4448656141757965,
-0.2979348599910736,
0.3584822118282318,
0.3118254840373993,
0.016810433939099312,
-0.32944512367248535,
-0.03720764070749283,
-0.037093985825777054,
-0.023615652695298195,
-0.6383331418037415,
-0.14639590680599213,
0.17355604469776154,
-0.25928956270217896,
-0.16214644... | |
I am trying to port this line from MS SQL Server to SQLite
```
IF NOT EXISTS(SELECT 1 FROM EVENTTYPE WHERE EventTypeName = 'ANI Received')
INSERT INTO EVENTTYPE (EventTypeName) VALUES ('ANI Received');
```
It seems that SQLite does not support IF NOT EXISTS or at least I can't make it work.
Am I missing somethi... | [
-0.09679597616195679,
-0.12082695960998535,
0.3145747184753418,
-0.16784460842609406,
-0.026911508291959763,
-0.19162820279598236,
0.2738628089427948,
-0.21072028577327728,
-0.07295509427785873,
-0.5715962648391724,
-0.028157955035567284,
0.5944520831108093,
-0.4051332175731659,
-0.0025154... | |
I'm looking for an optimization library. My two requirements are that it does not use JNI and that it does not have license restrictions preventing it from being used on multiple computers commercially.
The only one I've found that meets these requirements is Choco, but it is unusably buggy.
Since I couldn't find any o... | [
0.2516014575958252,
0.40950891375541687,
0.02260877937078476,
0.0187290757894516,
0.09893785417079926,
0.019869618117809296,
0.08441486209630966,
0.047152094542980194,
0.06251170486211777,
-0.4804864525794983,
0.1309843212366104,
0.362486332654953,
-0.5751360654830933,
-0.11021412163972855... | |
I'm trying to identify the scanners attached to the computer. One of the possible solutions is to use WIA (Windows Image Acquisition Automation Library).
These were my actions so far:
* Download wiaaut.dll
* Copy it to system32
* Register it with "regsvr32 wiaaut.dll" (successfully)
* Add reference to my project in V... | [
0.2625191807746887,
-0.00016775995027273893,
0.7918995022773743,
-0.23497042059898376,
0.05785025283694267,
-0.1114376112818718,
0.2664133608341217,
-0.38464945554733276,
-0.250712126493454,
-0.9308783411979675,
-0.1396203637123108,
0.7694869041442871,
-0.1516299992799759,
0.17293220758438... | |
{
if (p.Name == "Name")
{
deviceName = ((WIA.IProperty)p).get_Value().ToString();
Console.WriteLine(deviceName);
} | [
-0.33827292919158936,
-0.21854300796985626,
0.7077822089195251,
-0.14267279207706451,
0.8025040030479431,
0.13995873928070068,
0.29626989364624023,
-0.3311101198196411,
-0.008332495577633381,
-0.5291314125061035,
-0.5403743386268616,
0.7452345490455627,
-0.1307668685913086,
0.2237795442342... | |
}
}
}
```
However, the manager.DeviceInfos is always empty. I have 2 scanners attached, one of them shows in Control Panel->Scanners and Cameras, one doesn't, and both show under "Imaging Devices" in Device manager.
Any suggestion on why none are appearing in WIA.DeviceManager.DeviceInfos?
Running on Windows XP... | [
0.04466879367828369,
-0.23268331587314606,
0.7862825989723206,
-0.07792776077985764,
0.024233484640717506,
-0.17593011260032654,
0.13377811014652252,
-0.21788744628429413,
-0.4249707758426666,
-1.0112477540969849,
-0.07648462057113647,
0.7155922651290894,
-0.2659119665622711,
0.24266858398... | |
{
try
{
object selectUsingUI;
WiaClass = new WIALib.WiaClass();
CollectionClassDevices = (WIALib.CollectionClass)WiaClass.Devices;
if (WiaClass.Devices.Count == 0)
return false; | [
0.1675122082233429,
-0.5307536721229553,
0.4659939706325531,
-0.12170592695474625,
0.278964638710022,
0.057151004672050476,
0.7683811187744141,
-0.4680674076080322,
-0.1181999072432518,
-0.5879924893379211,
-0.29181092977523804,
0.4988745152950287,
-0.2893117368221283,
0.3381759226322174,
... | |
selectUsingUI = System.Reflection.Missing.Value;
ItemClass = (WIALib.ItemClass)WiaClass.Create(ref selectUsingUI);
if (ItemClass == null)
return false;
return true;
}
catch (System.Exception exp)
{ | [
-0.08930084854364395,
-0.6575425863265991,
0.1066238209605217,
-0.17753681540489197,
-0.08796042948961258,
0.16474024951457977,
0.8133734464645386,
-0.4616013169288635,
-0.2453438937664032,
-0.14706511795520782,
-0.2555827498435974,
0.3776101768016815,
-0.3380535840988159,
0.34039178490638... | |
return false;
}
}
#endregion
#region Capture
public System.Drawing.Image Capture()
{
try
{
CollectionClassPics = ItemClass.GetItemsFromUI(WIALib.WiaFlag.SingleImage, WIALib.WiaIntent.ImageTypeColor) as WIALib.CollectionClass;
if (CollectionClassPics =... | [
0.10432548820972443,
-0.786353349685669,
0.5134246945381165,
-0.005385403987020254,
0.15415801107883453,
0.005313319619745016,
0.459420382976532,
-0.18357928097248077,
-0.23921625316143036,
-0.7197527289390564,
-0.3156640827655792,
0.2537460923194885,
-0.35829928517341614,
0.36359590291976... | |
return null;
ItemClass = (WIALib.ItemClass)System.Runtime.InteropServices.Marshal.CreateWrapperOfType(CollectionClassPics[0], typeof(WIALib.ItemClass));
string imageFileName = System.IO.Path.GetTempFileName();
ItemClass.Transfer(imageFileName, false);
System.Drawing.Imag... | [
-0.05962357670068741,
-0.30123767256736755,
0.4638836979866028,
-0.007897645235061646,
0.0887092724442482,
0.21919867396354675,
0.5850932002067566,
-0.5352154970169067,
-0.47905397415161133,
-0.6125316023826599,
-0.38019049167633057,
0.5174956917762756,
-0.4400670826435089,
0.1647437512874... | |
catch (System.Exception exp)
{
return null;
}
}
#endregion
}
```
} | [
-0.04843178763985634,
-0.4706832468509674,
0.15650106966495514,
-0.04040004685521126,
0.1616021990776062,
-0.2620120942592621,
0.23855163156986237,
0.19012926518917084,
-0.0002618989965412766,
-0.36765041947364807,
-0.25633102655410767,
0.24455034732818604,
-0.5510281324386597,
0.285602241... | |
I've built a very simple chatroom-like ASP.NET application which displays current Online/Offline users:
I have a Table with a DateTime column used as a TimeStamp. Every time a user causes a Postback or similar Get event, I update the TimeStamp. I want to, on the server, create a periodic process of some sort that I ca... | [
0.4665341079235077,
0.09835398942232132,
0.42569804191589355,
-0.10353510826826096,
0.16097551584243774,
-0.19737277925014496,
-0.0357898585498333,
0.2900087237358093,
-0.44858068227767944,
-0.4826979637145996,
0.1564374417066574,
0.07565255463123322,
-0.05295289307832718,
0.08873643726110... | |
"Offline".
Any suggestions would be appreciated.
You could create a Sql Server Agent Job that runs periodically.
<http://msdn.microsoft.com/en-us/library/ms187910.aspx>
<http://msdn.microsoft.com/en-us/library/ms186273.aspx> | [
0.0005167410708963871,
-0.37367138266563416,
0.24121905863285065,
0.27305811643600464,
0.23702538013458252,
-0.31012165546417236,
0.4016057848930359,
0.3718394637107849,
-0.07849887013435364,
-0.49958139657974243,
-0.2800292670726776,
0.3855816423892975,
-0.05719936639070511,
0.01591685786... | |
I have a table in SQLite:
```
CREATE TABLE "EventType"
(
[EventTypeID] INTEGER PRIMARY KEY,
[EventTypeName] VARCHAR(50) NOT NULL UNIQUE
);
```
Since EventTypeID is an integer and a primary key, that automatically makes it an auto-incrementing column, and that works fine.
I'd like to insert a row into the table an... | [
-0.08284754306077957,
0.13418357074260712,
0.7403415441513062,
-0.14606007933616638,
0.01791379414498806,
-0.021036116406321526,
0.03501538559794426,
-0.32450130581855774,
-0.3194914162158966,
-0.5986946225166321,
0.17457646131515503,
0.559863805770874,
-0.18224115669727325,
0.089083604514... | |
a way to do that.
[Does SQLite support SCOPE\_IDENTITY?](https://stackoverflow.com/questions/304543/does-sqlite-support-scopeidentity)
> Check out the [FAQ](http://www.sqlite.org/faq.html#q1). The
> [sqlite3\_last\_insert\_rowid()](http://www.sqlite.org/c3ref/last_insert_rowid.html)
> function will do it. Careful of... | [
0.3483993709087372,
-0.09516329318284988,
0.5197815895080566,
-0.10120701789855957,
0.0844515711069107,
-0.3430876135826111,
0.5848950743675232,
-0.47390249371528625,
-0.28564608097076416,
-0.49043986201286316,
-0.00410322705283761,
0.657634437084198,
-0.1746366024017334,
-0.12948934733867... | |
I love to organize my code, so ideally I want one class per file or, when I have non-member functions, one function per file.
The reasons are:
1. When I read the code I will always
know in what file I should find a
certain function or class.
2. If it's one class or one non-member
function per header file, then I won'... | [
0.30234378576278687,
0.15267519652843475,
-0.33490297198295593,
-0.08179314434528351,
-0.052591487765312195,
-0.07236683368682861,
0.30027106404304504,
-0.30892452597618103,
-0.43189767003059387,
-0.8045254945755005,
-0.14497268199920654,
0.3448319137096405,
-0.4697691798210144,
0.18856987... | |
project, most functions access a certain number of templated other library functions. So that code will be compiled over and over, once for each implementation file. Compiling my whole project currently takes 45 minutes or so on one machine. There are about 50 object files, and each one uses the same expensive-to-compi... | [
0.6288697123527527,
0.023701781406998634,
0.27424192428588867,
-0.08095645904541016,
-0.04041583463549614,
0.4005850553512573,
0.32911738753318787,
-0.5191478729248047,
-0.21574486792087555,
-0.6891477704048157,
-0.09145820140838623,
0.300741583108902,
-0.18398727476596832,
0.0559682548046... | |
... }
void bar(double d) { std::vector<int> w; ... }
```
Again, the advantage would be that I can include just the foo function or just the bar function, and compilation of the whole project will be faster because `foobar.cpp` is *one* file, so the `std::vector<int>` (which is just an example here for some other expe... | [
0.3345261812210083,
0.07305072247982025,
0.3403153717517853,
-0.3665914535522461,
-0.07398112863302231,
0.09961294382810593,
0.21480058133602142,
-0.42791780829429626,
-0.27430617809295654,
-0.6049593687057495,
-0.03736243396997452,
0.5471641421318054,
-0.4737049639225006,
0.16114260256290... | |
I'm curious what your opinions are!
IMHO, you should combine items into logical groupings and create your files based on that.
When I'm writing functions, there are often a half a dozen or so that are tightly related to each other. I tend to put them together in a single header and implementation file.
When I write... | [
0.48547738790512085,
-0.07206180691719055,
-0.2782733142375946,
0.3546822667121887,
-0.3165833055973053,
0.2791529595851898,
-0.05644021928310394,
-0.161818265914917,
-0.37062105536460876,
-0.5428369641304016,
0.2885501980781555,
0.3158976435661316,
-0.0840122401714325,
-0.0998222008347511... | |
there and I need to break it up. | [
0.12334652990102768,
0.41251426935195923,
0.03569946810603142,
-0.13612379133701324,
-0.14752064645290375,
-0.3915265202522278,
0.1452587991952896,
0.31072738766670227,
-0.13218072056770325,
-0.17295436561107635,
0.3367796540260315,
0.23860350251197815,
0.0240673515945673,
0.50693148374557... | |
Frequently I'm brainstormed with programming ideas that I would like to directly code. More or less like "Wow, that algorithm will rock! I need to write it now!".
For this kind of "impulse" to write, I use <http://www.jarte.com/> that is a cool portable text editor. If I'm near a cybecafe or a friend computer, I just ... | [
0.2052670568227768,
0.10548429936170578,
0.1816016137599945,
0.20795823633670807,
0.007950053550302982,
-0.257297545671463,
0.007381828501820564,
0.1152975782752037,
-0.17226174473762512,
-0.8179317712783813,
0.05443773418664932,
0.9680936336517334,
0.10390201210975647,
-0.2280993014574051... | |
Syntax Highlight/intellisense is good, but not required
5) Free
Is there something like this?
[alt text http://sts.bkukr.de/l-davoss/blog/Lists/Blog/Attachments/21/SharpdevelopPortable.jpg](http://sts.bkukr.de/l-davoss/blog/Lists/Blog/Attachments/21/SharpdevelopPortable.jpg)
Sharp Develop Portable:
Dave [blogged](ht... | [
0.06391815096139908,
-0.20609302818775177,
0.33003097772598267,
0.1576332002878189,
-0.3784070611000061,
-0.5074945688247681,
0.6240373253822327,
0.2649059593677521,
-0.020299259573221207,
-0.6131401062011719,
-0.432449072599411,
0.8360409736633301,
-0.1481000930070877,
-0.4395526647567749... | |
I am trying to run a set of test cases through one of our internal applications. I need to be able to automate these tests and run them through the command line and log various things. The problem is that the existing code does not separate the view from the controller and throws MessageBoxes and Alerts everywhere that... | [
0.5381312370300293,
-0.0067018973641097546,
0.2502550482749939,
-0.006918265484273434,
0.29542312026023865,
-0.06834983080625534,
0.5796406865119934,
0.05277577415108681,
-0.14224059879779816,
-0.6651024222373962,
-0.06927849352359772,
0.367373526096344,
-0.18382088840007782,
0.23507016897... | |
a `Console.WriteLine()` or a `MessageBox.Show()`. But as you can imagine this has cascaded into a lot of changes and dirty if-else blocks.
Sadly, it doesn't look feasible to sit down and separate the logic from the view at this stage. So I was wondering if there was a way to detect the context in which the application... | [
0.2125619798898697,
-0.08747196197509766,
0.26699113845825195,
0.004967806860804558,
0.15143389999866486,
-0.1159275695681572,
0.10830441862344742,
-0.21230898797512054,
-0.044732701033353806,
-0.564000129699707,
-0.12299036234617233,
0.5425950288772583,
-0.47476890683174133,
0.15201936662... | |
also welcome.
Assign is renamed to Assign\_ because of a mapping in tlibimp.sym, a INI-format text file in the same directory as `tlibimp`.
Another piece of logic continuously appends '\_' until the name is unique with respect to prior global names `tlibimp` has found. All enumeration members are interpreted as global... | [
-0.4037622809410095,
0.04461998865008354,
0.6049038171768188,
-0.17004480957984924,
-0.13892316818237305,
-0.12829193472862244,
0.08702953159809113,
0.0434480682015419,
-0.15408600866794586,
-0.9048725366592407,
-0.21254155039787292,
0.0644393116235733,
-0.09047704935073853,
0.181511193513... | |
This one is nasty complicated to solve.
I have a table containing date ranges, each date range has a priority. Highest priority means this date range is the most important.
Or in SQL
```
create table #ranges (Start int, Finish int, Priority int)
insert #ranges values (1 , 10, 0)
insert #ranges values (2 , 5 , 1... | [
0.09208198636770248,
0.19412963092327118,
0.5484808087348938,
0.23418116569519043,
0.3344970643520355,
0.07790713757276535,
-0.14791004359722137,
-0.5152990221977234,
-0.0341750830411911,
-0.3871959447860718,
0.07269927114248276,
0.4569838047027588,
-0.19992458820343018,
0.2338127493858337... | |
10 0
2 5 1
3 4 2
1 5 0
200028 308731 0
```
I would like to run a series of SQL queries on this | [
0.15441001951694489,
0.6739412546157837,
0.29526108503341675,
-0.15810778737068176,
-0.1005343645811081,
-0.27504560351371765,
0.20711791515350342,
0.21996769309043884,
0.11121673882007599,
-0.4348835051059723,
0.09185674786567688,
0.1840633898973465,
-0.18220949172973633,
0.03769628331065... | |
table that will result in the table having no overlapping ranges, it is to take the highest priority ranges over the lower ones. Split off ranges as required, and get rid of duplicate ranges. It allows for gaps.
So the result should be:
```
Start Finish Priority
----------- ----------- -----------
1 ... | [
-0.04885422810912132,
0.0713600441813469,
0.4916229546070099,
-0.04819253832101822,
0.18897129595279694,
-0.025810392573475838,
-0.19729094207286835,
-0.4267750084400177,
-0.2533707022666931,
-0.5346009731292725,
-0.20988179743289948,
0.46023136377334595,
0.11238671839237213,
0.06520836055... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.