text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
that:
```
var pixiesDrummer = Music.GetCompany("4ad.com")
.IfNotNull(rc => rc.GetBand("Pixes"))
.IfNotNull(band => band.GetMember("David"));
```
Hey presto, if any of those transitions return null, pixiesDrummer will be null.
Wouldn't it be great if we could do exte... | [
0.10679090023040771,
-0.2875804901123047,
0.27419427037239075,
-0.2337672859430313,
0.17881812155246735,
-0.08469986915588379,
0.2368214875459671,
-0.44674843549728394,
-0.06167134642601013,
-0.24730536341667175,
-0.27148646116256714,
0.6987294554710388,
-0.41403329372406006,
-0.0442615300... | |
this:
```
var pixiesDrummer = Music.GetCompany("4ad.com")
| rc => rc.GetBand("Pixes")
| band => band.GetMember("David");
```
Also wouldn't it be great if System.Void was defined as a type and Action was really just Func<..., Void>?
**Update:** [I blogged a little about... | [
0.26433640718460083,
-0.2430170327425003,
0.14232206344604492,
0.009710689075291157,
-0.13446637988090515,
-0.14532741904258728,
0.4733251929283142,
-0.33265000581741333,
-0.2612936198711395,
-0.1334163248538971,
-0.1308545619249344,
0.3772936463356018,
-0.23426088690757751,
-0.14473801851... | |
F# pipe-forward operator in C#?"
Pipe-forward is:
```
let (|>) x f = f x
```
In other words, it lets you write a function and its first argument in the opposite order: argument followed by function. It's just a syntactic helper that assists with readability, allowing you to make use of infix notation with any funct... | [
-0.3217014670372009,
0.12509189546108246,
0.7642157673835754,
-0.3300386667251587,
-0.2290719896554947,
0.16866132616996765,
-0.06491436809301376,
-0.6784364581108093,
0.04548007994890213,
-0.4226230978965759,
0.09940432757139206,
0.731507420539856,
-0.2167297750711441,
-0.1514563858509063... | |
a bonus but could also be made available for non-extension methods as it is in Java).
So C# already solves the same problem in a different way. | [
-0.13523295521736145,
-0.3432673513889313,
0.21125634014606476,
0.36028629541397095,
-0.15194617211818695,
-0.42493686079978943,
0.18801650404930115,
-0.17408795654773712,
-0.4493120610713959,
-0.3091629445552826,
-0.15051433444023132,
0.6720555424690247,
0.0006298861117102206,
-0.21673201... | |
Session transcript:
```
> type lookma.c
int main() {
printf("%s", "no stdio.h");
}
> cl lookma.c
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 14.00.50727.762 for 80x86
Copyright (C) Microsoft Corporation. All rights reserved.
lookma.c
Microsoft (R) Incremental Linker Version 8.00.50727.762
Copyright (C)... | [
0.24346105754375458,
0.20290294289588928,
0.41433581709861755,
-0.09765710681676865,
-0.13446368277072906,
-0.3170444965362549,
0.6634047627449036,
-0.026299074292182922,
-0.0776929259300232,
-0.12508419156074524,
-0.5131675004959106,
0.6747923493385315,
-0.6005611419677734,
0.128208756446... | |
<stdio.h>` or an equivalent declaration. "Anything it likes" includes working correctly as one of the options; that seems to be the option chosen by your example.
In practice, the code will work OK with most practical compilers even without the formal declaration of the `printf()` function.
As was pointed out by qrdl... | [
0.5705309510231018,
-0.09230497479438782,
0.04733313247561455,
-0.13088899850845337,
-0.04177754744887352,
-0.05518094077706337,
0.40969571471214294,
-0.2761384844779968,
0.10242623090744019,
-0.4144369661808014,
-0.1031586080789566,
1.024253487586975,
-0.3763962686061859,
-0.3312812447547... | |
strict C99 compatibility mode by default because there is too much code that would not compile like that.
Chris Young commented:
> To clarify, my comment was on C99 removing implicit declarations. By saying "implicit int", I think you are referring to the C89 feature of allowing declarations such as foo(void); to mea... | [
0.2892104685306549,
0.12713992595672607,
0.1516299992799759,
-0.3672369420528412,
-0.17891626060009003,
-0.23440995812416077,
0.6700090765953064,
-0.27921730279922485,
-0.12099616974592209,
-0.057678449898958206,
-0.17853914201259613,
0.8796420693397522,
-0.7953828573226929,
-0.03606924787... | |
C99 require a prototype in scope for functions that take a variable number of arguments.
To illustrate:
```
extern int pqr();
int main(void)
{
int i = pqr(1, 3);
return i;
}
```
Without the first line, this is a correct C89 fragment with an implicit declaration of the function `pqr()` as a function that ret... | [
-0.32899510860443115,
-0.13572828471660614,
0.14515286684036255,
0.0448579341173172,
-0.1373036652803421,
0.07473129034042358,
0.4202391505241394,
-0.0003885817714035511,
0.02093665488064289,
-0.20261487364768982,
-0.3604394495487213,
0.2604319155216217,
-0.5885576009750366,
0.080851726233... | |
the function is explicitly declared and has an explicit `int` return type - but it still has unspecified arguments. I believe that is valid C99 - albeit not wholly desirable. Certainly, GCC (3.4.4) accepts it with the options '`-std=c99 -pedantic`". Ideally, the function declaration should include the full prototype. (... | [
-0.12190937995910645,
0.04701713100075722,
0.31777867674827576,
-0.14254732429981232,
0.09270495176315308,
0.12381742149591446,
0.03696757182478905,
-0.07681622356176376,
0.13403242826461792,
0.051825374364852905,
-0.455121785402298,
0.6566434502601624,
-0.3651358485221863,
-0.158259034156... | |
Does anybody know why the following code only has effect in FF?
```
$(document).ready(function() {
$('#powerSearchSubmitButton').click(function() {
startLoad();
});
});
function startLoad() {
$('.message').each(function(i) {
$(this).animate({ opacity: 0 }, 500);
});
};
```
... | [
0.18484950065612793,
-0.17792676389217377,
0.6169361472129822,
-0.06445785611867905,
0.024986518546938896,
-0.0439097099006176,
0.37202873826026917,
-0.34997138381004333,
-0.24978576600551605,
-0.6981762051582336,
-0.23840156197547913,
0.7013485431671143,
-0.47108525037765503,
-0.002501650... | |
to update the treeview.
See [my threading article](http://pobox.com/~skeet/csharp/threads/winforms.shtml) for example of doing background work in another thread and then marshalling back. The article was written pre-C#2, so these days it's slightly less clunky. You can also use [BackgroundWorker](http://msdn.microsoft... | [
0.3243931531906128,
-0.2565811574459076,
0.20517322421073914,
0.1723637729883194,
0.10111042112112045,
0.04050556942820549,
0.2522317171096802,
-0.015843048691749573,
-0.7754718661308289,
-0.46181848645210266,
0.1410003900527954,
0.2815636694431305,
-0.10733802616596222,
-0.216381505131721... | |
Specifically, once I get the WCAG Anaylsis warnings for a website into my warnings window I can't get rid of them, until I close down studio. When building another project in the same solution they stay there.
Anyone got any ideas?
I came across this question yesterday looking for an easy answer. While closing the sol... | [
0.6003050208091736,
0.41309329867362976,
0.114383265376091,
-0.06321730464696884,
0.15777729451656342,
0.046288467943668365,
0.24249626696109772,
0.1246219351887703,
-0.33734068274497986,
-0.6499875783920288,
0.3010658025741577,
0.3699977695941925,
-0.20530571043491364,
0.30595770478248596... | |
I've recently started maintaining someone else's JavaScript code. I'm fixing bugs, adding features and also trying to tidy up the code and make it more consistent.
The previous developer used two ways of declaring functions and I can't work out if there is a reason behind it or not.
The two ways are:
```
var functio... | [
0.5771370530128479,
0.08407191187143326,
0.14607876539230347,
-0.26517462730407715,
-0.005063415504992008,
-0.20919427275657654,
0.4231211841106415,
-0.06212868168950081,
0.028336266055703163,
-0.6778212189674377,
0.09905894100666046,
0.7134574055671692,
-0.4538153111934662,
0.201762422919... | |
done with the other?
The difference is that `functionOne` is a function expression and so only defined when that line is reached, whereas `functionTwo` is a function declaration and is defined as soon as its surrounding function or script is executed (due to [hoisting](http://adripofjavascript.com/blog/drips/variable-a... | [
-0.01489939447492361,
-0.339274525642395,
0.41266369819641113,
-0.182960644364357,
0.057853057980537415,
-0.1813412457704544,
0.12382259964942932,
-0.40394559502601624,
-0.050845224410295486,
-0.2655269503593445,
-0.49152031540870667,
0.8030989170074463,
-0.5495136380195618,
0.032660994678... | |
// note this block!
function functionThree() {
console.log("Hello!");
}
}
functionThree(); // ReferenceError
``` | [
-0.23524907231330872,
0.29582977294921875,
0.49735185503959656,
-0.15300121903419495,
0.3065352737903595,
-0.16619879007339478,
0.35661283135414124,
-0.21237054467201233,
-0.03835742548108101,
-0.473791241645813,
-0.3325570225715637,
0.3466986119747162,
-0.4018963575363159,
0.3740416169166... | |
Is this still the recommended library in use? ThickBox 3.1
The `rel` attribute is supposed to describe the relationship of the link to the current document. It should have one of the values described [here](http://www.w3.org/TR/html401/types.html#type-links). A DIV is a block-level grouping element, whereas a SPAN is a... | [
0.403024286031723,
-0.12764601409435272,
1.005386233329773,
-0.03601298853754997,
-0.19322480261325836,
-0.32139167189598083,
-0.013333532959222794,
-0.32752880454063416,
-0.24060803651809692,
-0.6283942461013794,
-0.2540939152240753,
0.23140046000480652,
-0.3036339282989502,
0.05321113392... | |
I would suggest giving the DIV fixed width and height -- either always or when one of the classes that displays an image is used. Use the width and height of your background image if you want the whole thing displayed. You may also need to give it some content as well, but I don't think so.
Here is what class1 would l... | [
0.37909388542175293,
-0.2214891016483307,
0.239003986120224,
-0.06595880538225174,
0.15378978848457336,
0.10882075130939484,
-0.15121948719024658,
-0.040172796696424484,
-0.1141447052359581,
-0.6991723775863647,
-0.14304721355438232,
0.409188449382782,
-0.3154159486293793,
-0.0780649930238... | |
background-image:url('1.jpg');
width: 60px;
height: 30px;
}
div .class1 span { display: none;}
``` | [
0.23627522587776184,
-0.11738722026348114,
0.5452774167060852,
0.10770283639431,
0.1065279021859169,
0.36442649364471436,
0.04164387285709381,
0.05826602876186371,
-0.36526334285736084,
-0.40566760301589966,
-0.3940408527851105,
0.5227479934692383,
-0.32683247327804565,
-0.2398887127637863... | |
How can I implement `OpenID` feature in ASP NET2.0?
Looks like there are some .NET options here: <http://wiki.openid.net/Libraries> | [
0.20868559181690216,
-0.27637121081352234,
0.21784915030002594,
0.32519441843032837,
-0.19795872271060944,
-0.3547508120536804,
0.18514420092105865,
0.04170922189950943,
-0.1759651154279709,
-0.8122375011444092,
-0.0803460031747818,
0.41118866205215454,
-0.285754531621933,
0.03496720641851... | |
Can you tell me if there anybody has implemented a **custom validator for checking that one of two (or N)** input fields are filled?
```
"Insert phone number or email address"
```
I'm using ASP.NET (Ajax) 3.5, the ajaxToolkit:ValidatorCalloutExtender (and jQuery if it's necessary).
Oh, sure, about 10 minutes late... | [
0.17818601429462433,
0.11178213357925415,
-0.05862751603126526,
0.13508719205856323,
-0.11186209321022034,
-0.11444396525621414,
0.3009922206401825,
0.052118271589279175,
-0.39132964611053467,
-0.6041670441627502,
0.10188712179660797,
0.4018382132053375,
-0.15737415850162506,
-0.2340781688... | |
> **Possible Duplicate:**
>
> [How can a C++ windows dll be merged into a C# application exe?](https://stackoverflow.com/questions/72264/how-can-a-c-windows-dll-be-merged-into-a-c-sharp-application-exe)
Is anybody aware of a program that can pack several DLL and a .EXE into one executable. I am not talking about .N... | [
0.16002818942070007,
-0.02645944245159626,
-0.14856727421283722,
-0.021982859820127487,
-0.06649255752563477,
-0.21342775225639343,
0.06491954624652863,
0.01558077521622181,
-0.5143893361091614,
-0.633755087852478,
0.06589744240045547,
0.33990195393562317,
-0.44146332144737244,
0.102438375... | |
ILMerge: specific to .NET
* [NETZ](http://madebits.com/netz/): specific to .NET
* [UPX](http://upx.sourceforge.net/): does DLL compression but not multiple DLL + EXE packing
* [FileJoiner](http://www.file-joiner.com/):
> Almost got it. It can pack executable + anything into one exe but when opened, it will launch the ... | [
0.13764597475528717,
-0.34113845229148865,
0.5340529084205627,
-0.12098084390163422,
-0.3635970652103424,
-0.035196453332901,
-0.019600100815296173,
-0.35636094212532043,
-0.23061831295490265,
-0.6702565550804138,
-0.27247533202171326,
0.4730478823184967,
-0.596947193145752,
0.029336255043... | |
them. No magic bullet.
So, what I want is not possible.
Unless...
We change something in the OS. Thanks Conrad for pointing me to [ThinInstall](http://www.vmware.com/products/thinapp/overview.html), which virtualise the application and the OS loading mechanism. With ThinInstall, it is possible to pack everything in ... | [
0.47691628336906433,
-0.1984676867723465,
0.4416429102420807,
0.3835582137107849,
-0.020012596622109413,
0.025769054889678955,
0.05866513028740883,
0.11571960151195526,
-0.5119193196296692,
-0.6587437987327576,
-0.2900145947933197,
0.49946096539497375,
-0.21104854345321655,
0.2769769132137... | |
I was chatting to someone the other day who suggested that Rails and PHP are the most suitable platforms for web applications, and to avoid Java. My background is mainly Java, and I know that it is considered by some to be too verbose and "heavyweight", but is used occasionally (e.g. by LinkedIn).
So I'm wondering whe... | [
0.6619604825973511,
0.02362913265824318,
-0.2895488142967224,
-0.03242727741599083,
-0.33484184741973877,
-0.10716842114925385,
0.16483594477176666,
0.550294816493988,
-0.3923436999320984,
-0.5451565980911255,
0.09849610179662704,
0.2752479016780853,
-0.17346850037574768,
-0.01370604708790... | |
what you would do differently.
**Some background** *(added later)*:
Tim O'Reilly coined the phrased "Web 2.0" and here is his definition: <http://www.oreillynet.com/lpt/a/6228>
I think it's the "End of the release cycle" and "Lightweight programming model", involving rapid iterations and simplified deployment, where ... | [
0.5836927890777588,
-0.17029103636741638,
-0.025134211406111717,
-0.07660655677318573,
-0.2634940445423126,
-0.21870237588882446,
0.13297869265079498,
0.031450070440769196,
-0.3240355849266052,
-0.6384555101394653,
-0.03205934539437294,
0.5734272003173828,
-0.4406731426715851,
-0.223513141... | |
first one doesn't have anything to do with technology, and everything to do with the service itself you're providing. again, you can use anything you want.
why are these two mixed in the same therm? and more to your point: why are dynamic languages assumed 'more appropriate' for it? i'd guess it's just a temporal coin... | [
0.32773375511169434,
-0.2508643865585327,
-0.08281168341636658,
0.30109575390815735,
-0.30351924896240234,
-0.23625852167606354,
-0.26663318276405334,
0.44218161702156067,
-0.4017588794231415,
-0.6335475444793701,
0.04372253268957138,
0.7462945580482483,
-0.45820990204811096,
0.08801138401... | |
least while working. when selling to the VCs and PHBs use any and all buzzwords that come near! | [
0.6393009424209595,
0.21866506338119507,
0.13901329040527344,
0.07511036098003387,
-0.1300962269306183,
-0.3488830029964447,
0.12121826410293579,
0.5050206780433655,
0.037137627601623535,
-0.291852205991745,
-0.24627278745174408,
0.583549439907074,
0.2663986086845398,
-0.14231611788272858,... | |
I JOIN 2 tables
for example
```
table_A
+---------+-----------+-----------+
| user_id | ticket_id | user_name |
+---------+-----------+-----------+
table_B
+-----------+-------------+
| ticket_id | ticket_name |
+-----------+-------------+
```
If I run the following query:
```
SELECT
table_A.user_id
, table_... | [
-0.12301328033208847,
0.053644727915525436,
0.5467730760574341,
0.025542786344885826,
-0.11129871010780334,
-0.10871880501508713,
0.07564648985862732,
-0.3642542362213135,
0.06456882506608963,
-1.036126732826233,
0.16146045923233032,
0.29885080456733704,
-0.5190699100494385,
0.239091575145... | |
setting that would make the test server throw an error just like the live server?
P.S.
MySQL version on *Test server*: `5.0.32-Debian_7etch5-log`
MySQL version on *Live server*: `5.0.41-community-log`
There are a similar issues with MS SQLServer where version 2000 is accepting some ambiguous queries and the 2005... | [
0.27024000883102417,
0.17328231036663055,
-0.0832848772406578,
-0.07133525609970093,
-0.3490283191204071,
-0.17930425703525543,
0.5496017932891846,
-0.1701459139585495,
0.06100120395421982,
-0.5661619901657104,
0.1417115181684494,
0.5629061460494995,
-0.4107254147529602,
0.2012064307928085... | |
This is related to a chapter from [beautiful code](https://rads.stackoverflow.com/amzn/click/com/0596510047).
And in that chapter I read about the nested `if`s.
The author was talking about deeply nested `if`s as originator of bugs and less readable.
And he was talking about replacing nested `if`s with `case` statemen... | [
-0.2270236313343048,
0.01037702988833189,
-0.42030736804008484,
-0.10553435236215591,
-0.09885488450527191,
-0.17295658588409424,
0.013387097045779228,
-0.242665097117424,
-0.016034960746765137,
-0.7273547053337097,
-0.21003694832324982,
0.26920226216316223,
-0.537146806716919,
0.276108026... | |
more and more things before settling on a return value. | [
0.1517602801322937,
0.07254350930452347,
0.15328247845172882,
0.18840697407722473,
0.06348557025194168,
0.32438287138938904,
-0.22675180435180664,
0.09067078679800034,
-0.09699131548404694,
-0.46969279646873474,
0.08401498943567276,
0.5405921936035156,
0.36394187808036804,
0.38723152875900... | |
I have an interface called Dictionary which has a method `insert()`. This interface is implemented by class `BSTree`, but I also have a class `AVLTree` which is a child class of `BSTree`. `AVLTree` redefines the `insert()` so it suits it's needs. Now if I type the following code:
```
Dictionary data=new AVLTree();
dat... | [
0.13180312514305115,
0.18058477342128754,
0.051269449293613434,
-0.1689862161874771,
-0.07040786743164062,
-0.10614880174398422,
0.027836153283715248,
-0.09539246559143066,
-0.004921282641589642,
-0.7378419041633606,
0.09419959038496017,
0.8091190457344055,
-0.4444564878940582,
0.082491308... | |
wrong without looking at the code.. maybe you could post interesting part? Such as the method's signature, class declaration, etc.. My guess is that you haven't used the same signature for both methods. | [
0.630207359790802,
0.017615031450986862,
0.0589267835021019,
0.5157548785209656,
-0.09213774651288986,
-0.3573371171951294,
0.2542288601398468,
0.23758664727210999,
-0.117916040122509,
-0.3694399893283844,
0.22647954523563385,
0.026012679561972618,
-0.08794497698545456,
0.3106839954853058,... | |
I have a form with a few buttons which execute code when pressed like running validations on the database.
Some code can run for a few minutes so is there any way to show the time remaining or a message to display the % of process completed?
Or pop out a message when code evaluation starts and the message should disa... | [
0.5412594676017761,
0.1346997767686844,
0.214957132935524,
-0.001319113653153181,
0.09558989852666855,
0.09849736839532852,
0.3359287679195404,
-0.21267636120319366,
0.008969148620963097,
-0.540574848651886,
0.3348146080970764,
0.32731544971466064,
-0.08072434365749359,
0.03844708204269409... | |
percentage (as an integer, not a decimal).
```
'foo, being the ProgressBar
me.foo = 70 '70%
```
There is some good info here on another method: <http://www.granite.ab.ca/access/progressbar.htm> | [
0.26483070850372314,
0.4811994135379791,
0.34642526507377625,
-0.36998626589775085,
-0.23805122077465057,
0.599060595035553,
0.14348800480365753,
-0.38280758261680603,
0.07950698584318161,
-0.11388595402240753,
0.10794441401958466,
0.5702227354049683,
0.15865753591060638,
0.053653385490179... | |
I'm running tomcat and have some jsp pages that display a subset of a table. I show 20 rows at a time on a single page. When the table has large amounts of data, the jsp page doesn't render. I'm guessing that the ResultSet is using a client side cursor. I've worked with ASP in the past, and we always used server side f... | [
-0.10377883166074753,
0.1390947848558426,
0.4964587986469269,
-0.0788879469037056,
-0.5725290179252625,
0.2821389138698578,
-0.04744087532162666,
0.009771532379090786,
-0.2949957549571991,
-0.6383929252624512,
0.13650695979595184,
0.41197410225868225,
-0.27237075567245483,
0.24023655056953... | |
doesn't explicitly allow for setting client vs server-side cursors, so different drivers implement it in different ways. Here are the other links that helped:
[Fetch Size](http://blog.lishman.com/2008/03/jdbc-fetch-size.html)
[Cursors](http://wiki.gxtechnical.com/commwiki/servlet/hwiki?Client+and+server+cursors+-+u... | [
-0.40598759055137634,
-0.12914320826530457,
0.5506963133811951,
0.07232066243886948,
-0.6103495955467224,
0.2138427197933197,
-0.2550714612007141,
-0.39069512486457825,
-0.5088478922843933,
-0.254248708486557,
0.23882462084293365,
0.5474313497543335,
-0.2367529422044754,
0.1102654933929443... | |
I need to create a rectangle bubble with rounded corners with text inside, like a cartoon speech bubble. I need the bubble to expand horizontally and vertically depending on the size of the text it contain. I would like the speech arrow and the radius of the rounded corners to remain constant.
I could simply use a pat... | [
0.4154064953327179,
0.12106461822986603,
0.8032448887825012,
0.22957909107208252,
-0.09779264777898788,
0.024021398276090622,
0.13506735861301422,
-0.03623658046126366,
0.09052851796150208,
-0.7843776941299438,
0.02850775606930256,
0.3426097631454468,
-0.020245635882019997,
0.3154071271419... | |
version of the cartoon bubble user-control. I've added a rectangle without a stroke to Jobi Joy's version to hide the end of path lines, instead of trying to make then appear flush with the rectangle.
```
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="40"/>
</Gr... | [
-0.2314448207616806,
-0.4627739489078522,
0.9734392762184143,
0.022005796432495117,
-0.0558040477335453,
0.19586609303951263,
-0.19299767911434174,
-0.024425208568572998,
-0.17815813422203064,
-0.670443594455719,
-0.032674189656972885,
0.3509747385978699,
-0.3993629813194275,
-0.2540630996... | |
<Rectangle Fill="#FF686868" RadiusX="10" RadiusY="10" Margin="1"/>
<TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="25" Text="Hello World" TextWrapping="Wrap"/>
</Grid>
```
Use this XAML, You can create a PopUp or a ContentControl and can give this Grid as the con... | [
-0.3479389548301697,
0.11405139416456223,
0.6940969824790955,
-0.006576321087777615,
-0.05363026261329651,
0.0002499407855793834,
0.015027622692286968,
-0.05778774246573448,
-0.4301214814186096,
-0.7270161509513855,
-0.4354410469532013,
0.15903501212596893,
-0.25448310375213623,
-0.0492971... | |
Stroke="#FF000000" RadiusX="10" RadiusY="10"/>
<Path Fill="#FF686868" Stretch="Fill" Stroke="#FF000000" HorizontalAlignment="Left" Margin="30,-1.6,0,0" Width="25" Grid.Row="1"
Data="M22.166642,154.45381 L29.999666,187.66699 40.791059,154.54395"/>
<TextBlock HorizontalAlignment="Center" Vertic... | [
-0.7236268520355225,
-0.10976842790842056,
0.7625123262405396,
0.09019925445318222,
-0.19291533529758453,
0.46279504895210266,
-0.11590304970741272,
-0.21485240757465363,
-0.34467440843582153,
-0.5914630889892578,
-0.025152843445539474,
0.22271126508712769,
0.07372989505529404,
-0.06356181... | |
I'd like to output html controls using xslt, but I need to be able to name the controls so that I can get at them when the form posts back.
I'd like to be able to name the radio button `"action_" + _case_id`.
```
<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="data.xsl"?>
<NewDataSet>
... | [
0.030540550127625465,
0.01505973655730486,
0.7544944286346436,
-0.10507894307374954,
-0.15275633335113525,
-0.22075261175632477,
0.3393716812133789,
-0.5754730701446533,
-0.3015619218349457,
-0.38301244378089905,
-0.19557656347751617,
0.8040239214897156,
-0.44096696376800537,
-0.1040777042... | |
<input type="radio" name="?" value="Yes" /> memo to follow
</div>
</xsl:template>
</xsl:stylesheet>
```
Use:
**```
<input type="radio" name="{concat('action_', /*/*/*/case_id)}"
value="No" checked ="true"/>
```**
In case your xml document changes it may be necessary to substitute the "\*" chars above with mo... | [
0.28641900420188904,
0.07217447459697723,
0.556460440158844,
-0.18180689215660095,
0.3206043541431427,
-0.2892285883426666,
0.3281213641166687,
-0.5431719422340393,
-0.03232325240969658,
-0.5369207859039307,
-0.5734127759933472,
0.6026064157485962,
-0.17838943004608154,
0.07731135934591293... | |
In C#, if I declare an auto-implemented property, why do I have to declare BOTH the get and set part?
i.e.
```
public string ThisWorks { get; set; }
public string ThisDoesnt { get; }
```
Isn't this just syntactic sugar - i.e. the compiler inserts a private field for the property? So why the problem?
Curious.
If ... | [
-0.016261553391814232,
0.21682368218898773,
-0.10305875539779663,
0.043769240379333496,
-0.10821571946144104,
-0.31897345185279846,
0.08756670355796814,
-0.0071932473219931126,
-0.062358930706977844,
-0.2639743685722351,
-0.5065420866012573,
0.5609786510467529,
-0.6387266516685486,
-0.2014... | |
How do I trigger a delay, let's say I want to call a method (once) in 3 seconds from now, and how do I cancel that call if I need to?
You can also use `-[NSObject performSelector:awithObject:afterDelay:]`, and `+[NSObject cancelPreviousPerformRequestsWithTarget:selector:object]`. | [
-0.0009107363875955343,
-0.42743438482284546,
0.19504573941230774,
0.0047951736487448215,
0.15257318317890167,
0.12019579112529755,
0.1823500543832779,
-0.29301565885543823,
-0.2244262993335724,
-0.10875304043292999,
0.12192287296056747,
0.7071746587753296,
-0.14298661053180695,
-0.1807983... | |
I need to edit (using javascript) an SVG document embedded in an html page.
When the SVG is loaded, I can access the dom of the SVG and its elements. But I am not able to know if the SVG dom is ready or not, so I cant' perform default actions on the SVG when the html page is loaded.
To access the SVG dom, I use this ... | [
0.07085025310516357,
-0.03742900490760803,
0.7912775874137878,
-0.21940991282463074,
0.18163546919822693,
-0.12030216306447983,
0.2522176504135132,
-0.3529614806175232,
-0.17505961656570435,
-0.7574664950370789,
-0.5276185274124146,
0.7341184020042419,
-0.3216532766819,
0.00519138108938932... | |
null. I just need to know when it is not null, so I can start manipulate it.
Do you know if there is a way to do it?
You could try polling every so often.
```
function checkReady() {
var svg = document.getElementById("chart").getSVGDocument();
if (svg == null) {
setTimeout("checkReady()", 300);
} e... | [
0.14230020344257355,
-0.18420808017253876,
0.5548900961875916,
0.12326616793870926,
0.1574661135673523,
-0.06671858578920364,
0.4342780113220215,
-0.2946692705154419,
-0.0024967421777546406,
-0.6258266568183899,
-0.1613796502351761,
0.40871506929397583,
-0.5627084374427795,
0.0065041370689... | |
I'm hopeless at Javascript. This is what I have:
```
<script type="text/javascript">
function beginrefresh(){
//set the id of the target object
var marquee = document.getElementById("marquee_text");
if(marquee.scrollLeft >= marquee.scrollWidth - parseInt(marquee.style.width)) {
... | [
-0.02952352724969387,
0.0757661685347557,
0.7963463068008423,
-0.15704868733882904,
0.10982818156480789,
0.2433018535375595,
0.28225603699684143,
-0.15754131972789764,
-0.0760248452425003,
-0.6972854137420654,
-0.04926961660385132,
0.6596603989601135,
-0.1251911222934723,
0.345144808292388... | |
movement
setTimeout("beginrefresh()", 10);
}
</script>
```
It scrolls to the left but I need it to repeat relatively seamlessly. At the moment it just jumps back to the beginning. It might not be possible the way I've done it, if not, anyone have a better method?
Here is a jQuery plugin with a lot of fea... | [
-0.30764123797416687,
-0.5494784116744995,
1.001657247543335,
-0.022130975499749184,
-0.18722453713417053,
0.1487353891134262,
-0.13278834521770477,
-0.08526568114757538,
-0.5938365459442139,
-0.6067632436752319,
0.05548283830285072,
0.3229683041572571,
0.03150348737835884,
-0.146583169698... | |
I need to bitwise shift a value 64 times in JavaScript. But JavaScript starts rounding after `32`.
For example:
```
for(var j = 0; j < 64; j++)
{
mask = mask << 1;
console.log(mask);
}
```
This prints value from `0` to `1073741824` but then rounds of and starts printing `0`.
"In Java, the bitwise operators ... | [
0.024598145857453346,
-0.12750397622585297,
0.29699844121932983,
-0.35082995891571045,
0.02094540372490883,
0.18113970756530762,
0.10717154294252396,
-0.6257164478302002,
0.21483385562896729,
-0.6338369250297546,
0.07877010852098465,
0.6713133454322815,
-0.28687822818756104,
-0.17401006817... | |
fast. In JavaScript, they are very far from the hardware and very slow. JavaScript is rarely used for doing bit manipulation." - Douglas Crockford, [Javascript: The Good Parts](http://safari.oreilly.com/9780596517748/bitwise_operators)
The point is that you don't really have any reason to use bitwise operators. Just m... | [
-0.21676090359687805,
-0.15988898277282715,
0.12011212855577469,
0.0869675800204277,
0.06360656023025513,
-0.13611356914043427,
0.1973763406276703,
-0.1600250005722046,
-0.25291040539741516,
-0.7446901202201843,
-0.13488279283046722,
0.5720036625862122,
-0.2505030333995819,
-0.356786936521... | |
This should be easy for many of you, but for me it's just another bit of rust needing to be chipped away as I get back into basic Java coding. Using bloody associative arrays for so long in other languages have turned me nice and spoiled. :P
My problem is simple: I'm storing a set of objects, each containing a string ... | [
0.12501120567321777,
0.1480197161436081,
0.14989057183265686,
-0.20774857699871063,
-0.2878081798553467,
0.16692087054252625,
-0.1718633770942688,
-0.1578611433506012,
-0.32163017988204956,
-0.5846980810165405,
-0.15653608739376068,
0.2258593589067459,
-0.36099132895469666,
-0.097954735159... | |
I would like to do this as formally and/or efficiently as possible.
Is there something already available in the Java standard libraries for this?
there is a great [writeup on java collections](http://java.sun.com/docs/books/tutorial/collections/index.html) which covers most of your needs.
short advice concerning this... | [
0.2104712724685669,
0.17959287762641907,
0.27383390069007874,
0.00038830743869766593,
-0.02849655970931053,
0.24548010528087616,
0.1303688883781433,
-0.4625870883464813,
-0.2904593050479889,
-0.5372436046600342,
-0.14180336892604828,
0.5171722173690796,
-0.21314828097820282,
-0.13792137801... | |
In Visual Studio as most of you will have noticed that related file can be collapsed in to one. E.G.
* Form1.cs
+ Form1.Designer.cs
I'm creating a DAL library and will be splitting partial classes in to several files such as:
* SomeTableClass.cs
+ SomeTableClass.Generated.cs
+ SomeTableClass.SomethingElse.cs
Is ... | [
0.0923999771475792,
-0.11828693747520447,
0.4232214689254761,
0.0008916398510336876,
-0.5589825510978699,
0.11824455112218857,
0.025747310370206833,
0.030975572764873505,
-0.5517104268074036,
-0.7961026430130005,
0.04992329329252243,
0.2637931704521179,
-0.1724058836698532,
-0.014081927016... | |
may have to poke around to find the right one for you. | [
0.35677236318588257,
0.08947198837995529,
-0.24412496387958527,
0.28905194997787476,
0.19391730427742004,
0.1556020975112915,
0.13711467385292053,
0.25564345717430115,
-0.2940524220466614,
-0.29193177819252014,
0.19717852771282196,
-0.006610135547816753,
0.06546115130186081,
0.058775719255... | |
I've been doing some performance testing around the use of System.Diagnostics.Debug, and it seems that all code related to the static class Debug gets completely removed when the Release configuration is built. I was wondering how the compiler knows that. Maybe there is some class or configuration attribute that allows... | [
0.3976495563983917,
-0.07681503891944885,
0.012719840742647648,
-0.2046194225549698,
-0.05637776106595993,
-0.239082932472229,
0.48192769289016724,
-0.07194092124700546,
0.0028164018876850605,
-0.583303689956665,
-0.22034291923046112,
0.7059465646743774,
-0.494660884141922,
0.2654227018356... | |
the string "DEBUG" to any method and calls to that item will only be present in DEBUG builds.
This differs from using the #ifdef approach as this allows you to release methods for use by other people in their DEBUG configurations (like the Debug class methods in the .NET framework). | [
0.3934508264064789,
-0.07624973356723785,
-0.0043717543594539165,
-0.04871339350938797,
-0.026123374700546265,
-0.23103198409080505,
0.39684826135635376,
-0.18725204467773438,
-0.11316164582967758,
-0.44362688064575195,
-0.46144792437553406,
0.469404935836792,
-0.46023061871528625,
0.25540... | |
I need to declare an array of pointers to functions like so:
```
extern void function1(void);
extern void function2(void);
...
void (*MESSAGE_HANDLERS[])(void) = {
function1,
function2,
...
};
```
However, I want the the array to be declared as constant -- both the data in the array and the pointer to the ... | [
0.15789227187633514,
-0.004852441605180502,
0.3169741928577423,
-0.258973628282547,
0.12211693078279495,
0.11186946928501129,
0.3042139708995819,
-0.17183196544647217,
-0.2360607236623764,
-0.35507503151893616,
-0.21137955784797668,
0.6698562502861023,
-0.6307991743087769,
0.20725236833095... | |
is a technique to remember how to build such type. First try to read pointers starting from their name and read from right to left.
How to declare that stuff without help?
---------------------------------------
### Arrays
```
T t[5];
```
is an *array of 5 T*. To make T a function type, you write the return-type ... | [
-0.028364967554807663,
-0.18054428696632385,
0.2288939654827118,
-0.015245887450873852,
-0.09181182831525803,
0.06971345841884613,
0.18290340900421143,
-0.3419734239578247,
-0.02803737111389637,
-0.5428926348686218,
-0.25023478269577026,
0.6034532189369202,
-0.4061950147151947,
0.062595240... | |
change the return-type to be a pointer to void. You have to use parentheses:
```
void (*t[5])(void);
```
and this will actually work. *t is an array of 5 pointers to functions returning void and taking no parameters*.
Great! What about an array of pointers to arras? That's very similar. The element type appears a... | [
0.009212475270032883,
-0.07101909816265106,
0.35476458072662354,
-0.17081157863140106,
0.0728129893541336,
0.10462749004364014,
0.2045215219259262,
-0.447816401720047,
-0.16409778594970703,
-0.3649750351905823,
0.0771275982260704,
0.8973543047904968,
-0.31219422817230225,
-0.22104124724864... | |
functions too. Let's declare a function taking an int that returns a pointer to another function taking no parameter and returning void:
```
void (*f(int))(void);
```
we need parentheses again for he same reason as above. We could now call it, and call the returned function pointed to again.
```
f(10)();
```
##... | [
-0.005927357356995344,
-0.1642904132604599,
0.08717715740203857,
-0.25844240188598633,
-0.25540414452552795,
-0.00788603350520134,
0.15491972863674164,
-0.09434271603822708,
-0.10782672464847565,
-0.3518354594707489,
-0.16545139253139496,
0.7357933521270752,
-0.6196949481964111,
-0.0657466... | |
(*(*f(int))(bool))(double);
```
You could do so endless times. Indeed, you can also return a pointer to an array just like you can a pointer to a function:
```
int (*(*f(int))(bool))[3];
```
This is a *function taking int returning a pointer to a function taking bool returning a pointer to an array of 3 int*
What... | [
0.05233025923371315,
0.09981990605592728,
0.22507241368293762,
-0.2828129827976227,
-0.23108360171318054,
-0.049006011337041855,
0.2076192945241928,
-0.29149508476257324,
-0.01265100110322237,
-0.42905616760253906,
-0.19803573191165924,
0.6299378871917725,
-0.5507764220237732,
0.1216027587... | |
end up pointing to at the end. The `c` stands for either const or not const. For example
```
int const * const * name;
```
will declare name to have the type *pointer to a constant pointer to a constant int*. You can change `name`, but you cannot change `*name`, which would be of type
```
int const * const
```
... | [
-0.10820155590772629,
0.18413788080215454,
0.5119020938873291,
-0.1506541222333908,
0.06837297230958939,
-0.12633481621742249,
0.02686816267669201,
-0.1876073181629181,
0.09797630459070206,
-0.2790127992630005,
-0.1595475971698761,
0.44786182045936584,
-0.2891150414943695,
0.35652416944503... | |
appeared after the star. Note that we cannot put a `const` before the star in this case, since **there are no pointers to constant functions**. Functions simply can't be const as that would not make sense. So the following is not valid:
```
void (const * t[5])(void);
```
Conclusion
----------
The C++ and C way of d... | [
-0.2929200232028961,
-0.14732445776462555,
0.36472076177597046,
-0.0714210718870163,
-0.495633989572525,
0.24410571157932281,
-0.0896240845322609,
0.22372931241989136,
-0.21166786551475525,
-0.4670691192150116,
-0.23786793649196625,
0.40505915880203247,
-0.23558054864406586,
0.473699659109... | |
I need to learn about Postgresql. I'm trying to branch an application framework which is dependent on Oracle to use Postgresql. I can easily find communities of Java and JavaScript programmers via the web. Oracle communities a little more difficult, but between OTN and AskTom, I do pretty well. But Postgresql seems few... | [
0.7064876556396484,
0.2436477541923523,
-0.06388576328754425,
0.326241135597229,
-0.3057211935520172,
-0.11829867213964462,
0.20077010989189148,
0.32917696237564087,
-0.12462499737739563,
-0.5959598422050476,
0.33092057704925537,
0.41774559020996094,
0.1152963861823082,
0.08181416243314743... | |
a large group.
Have you tried the [Postgres newsgroup](http://groups.google.com/group/comp.databases.postgresql.general/topics)?
There's also [a community page](http://www.postgresql.org/community/) on the official Postgres website with links to IRC, forums, mailing lists, etc. | [
0.28767046332359314,
-0.0569869726896286,
0.09786160290241241,
0.05240493267774582,
-0.37591084837913513,
-0.11182606965303421,
0.1356174498796463,
0.4846285581588745,
-0.5103173851966858,
-0.30957287549972534,
-0.3362234830856323,
0.1695028692483902,
-0.07253621518611908,
0.02062952518463... | |
I have a web site that is a customer to customer (C2C) service. Example, a user is looking for a hockey card of Gordie Howe and another customer wants to sell a Gordie Howe hockey card. If they sell the card 100$, I'd like to have 90$ that goes to the seller and 10$ that goes to me for providing the service (some kind ... | [
0.8991637229919434,
0.25599005818367004,
0.12522895634174347,
-0.0035299137234687805,
-0.026178983971476555,
0.0858108401298523,
-0.1475548893213272,
0.36373797059059143,
-0.14364942908287048,
-0.6836385130882263,
0.31051403284072876,
0.0321107842028141,
0.08650609105825424,
0.334296464920... | |
In the case when I want to check, if a certain entry in the database exists I have two options.
I can create an sql query using COUNT() and then check, if the result is >0...
...or I can just retrieve the record(s) and then count the number of rows in the returned rowset. For example with $result->num\_rows;
What's ... | [
0.20428411662578583,
0.012523964047431946,
0.18976688385009766,
-0.04355539008975029,
-0.09413140267133713,
0.06379750370979309,
0.1735588014125824,
-0.3053080439567566,
-0.19131119549274445,
-0.6555757522583008,
0.101718470454216,
0.6178110837936401,
-0.39345112442970276,
0.26705947518348... | |
to exhaustively
search all of the records/indexes to
give you the exact answer) or
2. have NULL entries (for the same
reason)
If you are COUNT'ing based on a WHERE clause that is guaranteed to produce a single record (or 0) *and* the DBMS knows this (based upon UNIQUE indexes), then it ought to be just as efficient. B... | [
0.2818198502063751,
-0.06642716377973557,
0.275709331035614,
0.1660880446434021,
-0.16489513218402863,
-0.2485947608947754,
0.4542367160320282,
-0.265671044588089,
-0.427324503660202,
-0.5324946641921997,
-0.02787140943109989,
0.5837329626083374,
-0.4151291847229004,
0.06275065988302231,
... | |
send data to the client, the client has to buffer it and do some work
2. You may bump out things in the DBMS MRU/LRU data cache that are more important
3. Your DBMS will (generally) have to do more disk I/O to fetch record data that you will never use
4. You have more network activity
Of course, if you want to DO some... | [
0.25211867690086365,
-0.29895758628845215,
0.3948785960674286,
0.2608826458454132,
-0.25004324316978455,
-0.18503497540950775,
0.10797320306301117,
-0.06718815863132477,
-0.49165603518486023,
-0.71176677942276,
-0.04020028933882713,
0.6666610836982727,
-0.21841828525066376,
0.0742106512188... | |
According to [this site](http://www.builderau.com.au/program/perl/soa/Obtain-user-group-and-process-information-in-Perl/0,339028313,339222142,00.htm) I can simply write
```
$user = getlogin();
```
but the group handling functions seem not to be able to accept a username/userid as a parameter. Should I really iterat... | [
-0.14181923866271973,
0.171944260597229,
0.3169129192829132,
-0.3119450509548187,
-0.1399264931678772,
-0.0031314450316131115,
0.42260876297950745,
-0.5040785670280457,
-0.04333100840449333,
-0.6184119582176208,
-0.19385941326618195,
0.3812624216079712,
-0.31967324018478394,
0.034349702298... | |
%s (%d)\n", $user, $uid, $group, $gid;
```
Something simpler like
```
my $group = getgrgid $(
```
would also work, since $( and $) already should contain the GID and the EGID.
Finally the getgroups function defined in the POSIX module,
```
use POSIX qw(getgroups)
```
as suggested by dsw, should also allow you ... | [
-0.06965457648038864,
-0.2276139110326767,
0.2120116502046585,
-0.08939514309167862,
-0.07635930180549622,
0.06854946911334991,
0.06524872034788132,
0.06314779072999954,
-0.036559589207172394,
-0.7037129998207092,
-0.40592026710510254,
0.543251633644104,
-0.45056062936782837,
-0.1793422549... | |
Is there a simple process in SQL 2005 for spitting all of my stored procedures out to individual .sql files. I'd like to move them into VSS, but am not too excited by the prospect of clicking on each one to get the source, dumping it into a text file and so on..
In SQL Management Studio right click on the database, go ... | [
0.3171772062778473,
0.12233544886112213,
-0.15252183377742767,
0.12995406985282898,
-0.22769047319889069,
-0.3815986216068268,
0.040660012513399124,
0.028310971334576607,
-0.1624184101819992,
-0.5308969616889954,
0.31605467200279236,
0.5033588409423828,
-0.22179049253463745,
0.052647911012... | |
I am trying to find a way to get the source code for (user defined) PHP functions in a string.
For normal code this is easy, using reflection I can find the file and line numbers where the function is defined; then I can open the file and read the function source code.
This will not work if a function is defined in e... | [
0.5184718370437622,
0.2591601312160492,
0.13002566993236542,
-0.15980713069438934,
-0.32130444049835205,
0.05793920159339905,
0.6748489737510681,
-0.43894439935684204,
0.007977730594575405,
-0.34622105956077576,
0.1745622307062149,
0.4139018654823303,
-0.30601274967193604,
-0.0156173845753... | |
new ReflectionFunction('myfunction');
echo $a;
$b = new ReflectionFunction('myevalfunction');
echo $b;
```
**Output:**
```
Function [ <user> <visibility error> function myfunction ] {
@@ test.php 3 - 5
}
Function [ <user> <visibility error> function myevalfunction ] {
@@ test.php(11) : eval()'d code 2 - 4
}
``... | [
0.3585312068462372,
-0.08671382814645767,
0.8561462163925171,
0.12904666364192963,
-0.14642934501171112,
0.24054138362407684,
0.40136078000068665,
-0.4023100733757019,
-0.005027538165450096,
-0.6949518918991089,
0.0966918095946312,
0.2223423421382904,
-0.1377834528684616,
-0.05143213644623... | |
see the library in action at [www.optimap.net](http://www.optimap.net) | [
0.4259794056415558,
-0.7043023705482483,
-0.17671820521354675,
0.2178552746772766,
-0.09817736595869064,
-0.1917908936738968,
-0.12526649236679077,
0.14946989715099335,
-0.5802959203720093,
-0.6665644645690918,
-0.5426161289215088,
0.2659970223903656,
-0.10051988810300827,
-0.3192096650600... | |
I'm trying to inverse a matrix with version Boost boost\_1\_37\_0 and MTL mtl4-alpha-1-r6418. I can't seem to locate the matrix inversion code. I've googled for examples and they seem to reference lu.h that seems to be missing in the above release(s). Any hints?
[@Matt](https://stackoverflow.com/users/8643/matt-cruiks... | [
-0.0157131589949131,
0.10520181059837341,
0.3707138001918793,
-0.2774602174758911,
-0.26813367009162903,
0.18990999460220337,
0.20907026529312134,
-0.12909407913684845,
-0.14695514738559723,
-0.596444845199585,
0.08286342769861221,
0.4800097346305847,
-0.3792625367641449,
-0.08748981356620... | |
what you have to do with the pivots, though. From the [documentation](http://www.osl.iu.edu/research/mtl/reference/html/index.html).
And yeah, like you said, it looks like their documentations says you need lu.h, somehow:
> **How do I invert a matrix?**
>
>
> The first question you should ask
> yourself is whether... | [
0.3039904832839966,
-0.2091374695301056,
0.35206979513168335,
0.07308226078748703,
-0.16177761554718018,
0.31022846698760986,
-0.27946722507476807,
-0.2614642381668091,
-0.3649919927120209,
-0.7367259860038757,
0.37305721640586853,
0.4506412148475647,
-0.10679350048303604,
-0.2681715786457... | |
matrix and then perform forward and
> backward triangular solves with the
> factors. More about solving linear
> systems is given below. If you really
> want to invert a matrix, there is a
> function `lu_inverse()` in mtl/lu.h.
If nothing else, you can look at [lu.h on their site](http://www.osl.iu.edu/research/m... | [
-0.04684216529130936,
-0.16214342415332794,
0.4451759159564972,
-0.1881805807352066,
-0.10833600908517838,
0.324584424495697,
-0.15205231308937073,
-0.33858421444892883,
-0.33184921741485596,
-0.7757453322410583,
-0.032058749347925186,
0.27373769879341125,
-0.3399657607078552,
0.0665562599... | |
When do you start to consider a code base to be getting too large and unwieldy?
When it's over 100 lines. Joke. This is probably the hardest question to answer, because it's very individual.
But if you structure the application well and use different layers for i.e. interfaces, data, services and front-end you will au... | [
0.46127623319625854,
-0.026569044217467308,
0.20617768168449402,
0.5299431085586548,
-0.1840348094701767,
-0.02665724791586399,
0.3913790285587311,
-0.24404402077198029,
-0.2914887070655823,
-0.8443291187286377,
0.11586474627256393,
0.09051257371902466,
-0.16064955294132233,
-0.11585004627... | |
is possibility of replication, split it from the current peice and make it re-usable.
Re-using code is the basics of all good structure.
And splitting up into different layers will help the base to become more and more flexible and modular. | [
0.4904715120792389,
0.15605638921260834,
0.09838373214006424,
0.3065517842769623,
0.06527639180421829,
0.06336753815412521,
0.1645345389842987,
-0.38836973905563354,
-0.28272393345832825,
-0.7608733177185059,
-0.13585956394672394,
0.16454245150089264,
-0.03905035927891731,
0.11413199454545... | |
Is it possible to store encrypted connection string so it can be used from server-side vbscript?
Was there an equivalent of web.config in 'the good old days'?
As I dust off the ol' memory banks...
I recall that in classic ASP systems, we would put the connection string (and most other config settings) in the Windows r... | [
0.18975897133350372,
-0.06330329179763794,
0.3212789297103882,
0.3306642770767212,
0.23284398019313812,
-0.12157787382602692,
0.023256687447428703,
0.2777755558490753,
-0.36946263909339905,
-0.5689650177955627,
-0.16037598252296448,
0.5331580638885498,
-0.0683186799287796,
0.23520690202713... | |
but there is no easy tooling built into the framework to encrypt/decrypt on the fly, you have to do it yourself. | [
0.37856197357177734,
0.40082329511642456,
-0.2086143046617508,
0.5507615208625793,
0.4303719997406006,
-0.287369966506958,
0.5952777862548828,
-0.016346754506230354,
-0.05910693481564522,
-0.27567046880722046,
-0.2436646670103073,
0.40455949306488037,
-0.07472541928291321,
-0.0196693390607... | |
Does python have the ability to create dynamic keywords?
For example:
```
qset.filter(min_price__usd__range=(min_price, max_price))
```
I want to be able to change the **usd** part based on a selected currency.
Yes, It does. Use `**kwargs` in a function definition.
Example:
```
def f(**kwargs):
print kwargs.k... | [
0.03906085342168808,
-0.1631210744380951,
0.06192808970808983,
-0.1317385733127594,
-0.2702612578868866,
0.21436689794063568,
0.12023390829563141,
0.14624792337417603,
-0.3339799642562866,
-0.08975782245397568,
-0.14719487726688385,
0.8216565847396851,
-0.524371325969696,
-0.31816491484642... | |
How do I parameterize a query containing an `IN` clause with a variable number of arguments, like this one?
```
SELECT * FROM Tags
WHERE Name IN ('ruby','rails','scruffy','rubyonrails')
ORDER BY Count DESC
```
In this query, the number of arguments could be anywhere from 1 to 5.
I would prefer not to use a dedicat... | [
-0.17643509805202484,
0.015190456062555313,
0.20888175070285797,
0.030855676159262657,
-0.3679009974002838,
0.046486590057611465,
0.18988820910453796,
-0.4992992579936981,
0.02321813441812992,
-0.2324262112379074,
-0.00706467917189002,
0.5764557123184204,
-0.34082895517349243,
0.1407193541... | |
};
const string cmdText = "select * from tags where '|' + @tags + '|' like '%|' + Name + '|%'";
using (SqlCommand cmd = new SqlCommand(cmdText)) {
cmd.Parameters.AddWithValue("@tags", string.Join("|", tags);
}
```
Two caveats:
* The performance is terrible. `LIKE "%...%"` queries are not indexed.
* Make sure you... | [
-0.10044330358505249,
0.044487569481134415,
0.29659906029701233,
-0.009220217354595661,
0.14586815237998962,
-0.1837071180343628,
0.6905348896980286,
-0.11740422248840332,
-0.10127663612365723,
-0.7381612658500671,
-0.07540261745452881,
0.7842907309532166,
-0.17218539118766785,
0.001583356... | |
I'm developing an ASP.NET 2.0 application that includes Crystal Reports (version 10, included with VS 2005). Originally, the reports were working properly, both when run from my machine using the ASP.NET development web server, and also when deployed to an IIS server.
I made some changes to the reports and re-deployed... | [
0.24970006942749023,
0.1966732293367386,
0.6212254762649536,
-0.04687446728348732,
-0.18719927966594696,
-0.01612730138003826,
0.4043385684490204,
-0.37351125478744507,
-0.2971154749393463,
-0.5110706686973572,
0.20631305873394012,
0.6576724052429199,
-0.3023988604545593,
-0.28614100813865... | |
properly? I suggested this possibility to the guy managing the server, but he said he re-started the app pool and it didn't make a difference. Any ideas?
Here's a quick-and-dirty technique I have used:
```
SELECT * FROM Tags
WHERE '|ruby|rails|scruffy|rubyonrails|'
LIKE '%|' + Name + '|%'
```
So here's the C# code:
... | [
0.35822975635528564,
0.22911515831947327,
0.4214617908000946,
0.027522429823875427,
0.10476022958755493,
-0.03888726606965065,
0.7684494853019714,
-0.5131645798683167,
-0.2683030664920807,
-0.6169151663780212,
-0.12499819695949554,
1.0627248287200928,
-0.3588438034057617,
-0.31869706511497... | |
don't have any `|`, blank, or null tags or this won't work
There are other ways to accomplish this that some people may consider cleaner, so please keep reading. | [
0.8181451559066772,
0.0838671550154686,
-0.1682918220758438,
0.45597851276397705,
0.32856485247612,
-0.5483729243278503,
0.6163005232810974,
0.4419510066509247,
-0.058855090290308,
-0.689088761806488,
0.19714082777500153,
0.18728287518024445,
-0.4350350797176361,
-0.2606638967990875,
0.0... | |
I have at my SQL Server 2000 Database a column with type **Image**. How can I map it into NHibernate?
We used BinaryBlob on the mapping config file, and byte[] on the property. | [
-0.20529329776763916,
0.16479289531707764,
0.1747249960899353,
-0.1665213704109192,
-0.3147042989730835,
-0.026225080713629723,
-0.3164881765842438,
0.2756443917751312,
-0.049420665949583054,
-0.707084059715271,
0.40918776392936707,
0.1005755290389061,
-0.41985952854156494,
0.2938590943813... | |
When we use datatable.newrow command, a new empty row added to bottom of rows. However I want newrow to added to top of datatable. How can I make it?
You use the NewRow to create a row with the same columns. To actually get it into the DataTable, you've got to do
```
myDataTable.Rows.InsertAt(myDataRow, 0);
```
Wher... | [
0.11994822323322296,
-0.02559245564043522,
0.4880099892616272,
0.03961235657334328,
0.1527422070503235,
-0.07895977795124054,
-0.13744322955608368,
0.04931028559803963,
-0.04834851995110512,
-0.8217676281929016,
0.04550237953662872,
0.5508573651313782,
-0.10595763474702835,
0.4291810691356... | |
We have a lot of unit tests but they aren't run every night. I have setup some batch files that compile all the code from the SVN repository and I would like to run NUnit. This is not a big problem because I can call it from the batch file after the compilation BUT the output is stored in the network drive and I need t... | [
0.6477344632148743,
-0.005929563660174608,
0.0006138551398180425,
0.24913425743579865,
-0.1153256893157959,
-0.24361136555671692,
0.39532744884490967,
-0.03722425177693367,
-0.06929103285074234,
-0.6347014307975769,
0.29369792342185974,
0.7728684544563293,
0.0011058214586228132,
0.18846368... | |
test and tell me in a "more fast convenient way" if errors appears?
**Update**
I have installed Team City 4.0 and it work like a charm. Maybe Cruise Control .Net could have been done the same, but Team City website/documentation/features looked better.
We have recently started using TeamCity with our projects, and so ... | [
0.4853641390800476,
-0.2945840358734131,
0.1707421839237213,
0.2046194076538086,
-0.2960522472858429,
-0.35654646158218384,
-0.0010739247081801295,
0.19431954622268677,
0.16014668345451355,
-0.8486765027046204,
0.18304553627967834,
0.6748791933059692,
0.16224658489227295,
-0.45722240209579... | |
I have some Python code that works correctly when I use python.exe to run it, but fails if I use pythonw.exe.
```
def runStuff(commandLine):
outputFileName = 'somefile.txt'
outputFile = open(outputFileName, "w")
try:
result = subprocess.call(commandLine, shell=True, stdout=out... | [
0.04450257495045662,
-0.054175131022930145,
0.1331191509962082,
-0.22311176359653473,
0.35613423585891724,
0.1286897510290146,
0.6873829364776611,
-0.16207295656204224,
-0.23117925226688385,
-0.39757081866264343,
-0.06711284071207047,
0.8207235932350159,
-0.17606094479560852,
-0.0679421871... | |
target=runStuff, commandLine=['whatever...'])
myThread.start()
```
The message I get is:
```
Exception thrown: [Error 6] The handle is invalid
```
However, if I don't specify the 'stdout' parameter, subprocess.call() starts okay.
I can see that pythonw.exe might be redirecting output itself, but I can't ... | [
0.12110979110002518,
-0.05968443304300308,
0.3400927484035492,
-0.30445733666419983,
-0.01389844249933958,
-0.05707458034157753,
0.40847811102867126,
0.017044004052877426,
-0.15648657083511353,
-0.5335806012153625,
-0.20837843418121338,
0.7846826314926147,
-0.49666422605514526,
0.102507822... | |
subprocess.PIPE.
If you *really* don't care about what the sub process says for errors and all, you could use `os.devnull` (I'm not really sure how portable it is?) but I wouldn't recommend that. | [
0.2081100344657898,
0.006909836549311876,
0.33043408393859863,
0.2161155641078949,
-0.03751903399825096,
0.0879846140742302,
0.04346547648310661,
0.2776890695095062,
-0.11043837666511536,
-0.7551061511039734,
-0.20830971002578735,
0.41989555954933167,
-0.059818703681230545,
0.3521650433540... | |
I've a couple of extension methods I've been developing for a couple of projects, they currently rely heavily on some AJAX to make bits and pieces work. The problem is that they require copying and pasting JavaScript files to the project you want to use it in.
As this JavaScript file only needs to be used once (all in... | [
0.5420261025428772,
-0.022330015897750854,
0.04260385036468506,
0.3060467541217804,
-0.18046355247497559,
0.19448718428611755,
-0.2518041431903839,
-0.009240412153303623,
0.0015823071589693427,
-0.7819807529449463,
-0.0178291667252779,
0.319401353597641,
-0.12598146498203278,
-0.1095358282... | |
this wasn't a problem - you could add a script block to the headers with a specific ID and simply check for it on page load.
What's the MVC equivalent - is there an equivalent?
I'd like a solution that doesn't require the consumer to copy and paste/ add lines to pages or config...any thoughts?
This question is not sp... | [
0.36063528060913086,
-0.08487605303525925,
0.4297834634780884,
-0.07689430564641953,
-0.2590671181678772,
-0.1307348608970642,
0.07969435304403305,
0.028786931186914444,
-0.0554518885910511,
-0.730868399143219,
0.23092111945152283,
0.5019342303276062,
-0.6523898839950562,
0.121823161840438... | |
available here!
function qwe(){
console.log(abc); // it is available here too!
}
...
};
```
This technique relies on using a closure. But it doesn't work with `this` because `this` is a pseudo variable that may change from scope to scope dynamically:
```
// we want to use "this" variable in embedded functi... | [
0.18682461977005005,
-0.06683669239282608,
0.12124906480312347,
-0.06387268006801605,
0.1563434600830078,
-0.06748299300670624,
0.1356692761182785,
-0.045900993049144745,
-0.019161447882652283,
-0.5593946576118469,
-0.38356807827949524,
0.5611609220504761,
-0.6442888379096985,
0.3639417886... | |
variable and use it through the alias:
```
var abc = this; // we want to use this variable in embedded functions
function xyz(){
// "this" is different here! --- but we don't care!
console.log(abc); // now it is the right object!
function qwe(){
// "this" is different here too! --- but we don't care!
co... | [
0.1109500452876091,
-0.04137571156024933,
0.23111076653003693,
-0.1184239536523819,
0.04510093480348587,
-0.12841962277889252,
0.22141079604625702,
-0.11336738616228104,
0.15186333656311035,
-0.3719852864742279,
-0.11183495819568634,
0.723946750164032,
-0.5911389589309692,
0.39882853627204... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.