text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
For example, when I run `man ioctl` the page says `IOCTL(2)` at the top. What does that mean? Is there an `IOCTL(1)`? And how does one navigate between these?
It's the man page section. From memory, section 1 is user programs, 2 is system calls, and 3 is standard C library calls, and 5 is file formats.
Wikipedia has t... | [
0.19147157669067383,
0.3827853798866272,
-0.010805720463395119,
0.15971212089061737,
-0.07393711060285568,
-0.30703258514404297,
0.2330636829137802,
-0.4436893165111542,
-0.22573867440223694,
-0.5020667314529419,
-0.34407874941825867,
0.33932414650917053,
-0.18133337795734406,
0.2265467345... | |
I simply want to achieve this line of SQL:
```
UPDATE table1
SET table1.col = table2.col
FROM table2 INNER JOIN
table1 ON table2.id = table1.id
```
How can that be done using Entity Framework with minimal number of round-trips?
All I can think of is using foreach to loop through my `table2` and update it's rela... | [
0.0443568117916584,
0.25333353877067566,
0.6593982577323914,
0.0022163076791912317,
0.09376886487007141,
-0.23285700380802155,
0.2950817346572876,
-0.15792998671531677,
-0.39622578024864197,
-0.4070170819759369,
0.03840017318725586,
0.5301711559295654,
-0.152194082736969,
0.128264456987380... | |
both tables at once and calling SaveChanges as few times as possible. | [
-0.07060176879167557,
0.07290197908878326,
0.33652594685554504,
0.10582061111927032,
0.21059651672840118,
0.2840249836444855,
0.0810936912894249,
0.2515272796154022,
-0.27130985260009766,
-0.789456307888031,
0.16743969917297363,
0.435485303401947,
-0.12275813519954681,
-0.02908837981522083... | |
I want to use jQuery in an add on JS library that can be added to random websites. These websites may or may not use jQuery already.
I have 3 questions around this actually:
1. I will probably load jQuery dynamically from my own js script (not from a script tag in the document head). Will jquery work this way? how ca... | [
0.44684574007987976,
-0.21518048644065857,
0.21454602479934692,
0.3016718029975891,
-0.1521858423948288,
-0.314566045999527,
0.0901453047990799,
0.09816840291023254,
-0.13311026990413666,
-0.502921998500824,
0.1927628368139267,
0.7119722366333008,
-0.19912539422512054,
-0.08309166878461838... | |
add a widget that includes jQuery to random websites while providing minimal code and simplest integration.
This is pretty loose and incomplete -- and really is meant to be a starting point:
```
if (typeof $ != 'undefined') {
var msg = 'This page already using jQuery v' + $.fn.jquery;
} else {
var s = document... | [
0.21549399197101593,
-0.23751644790172577,
0.9243398904800415,
0.19147080183029175,
0.06416246294975281,
-0.2699410021305084,
0.09075982123613358,
-0.17502975463867188,
-0.041091445833444595,
-0.7655707001686096,
-0.321112722158432,
0.23260898888111115,
-0.36198946833610535,
-0.02019590511... | |
Is there a way to add a property to the objects of a Linq query result other than the following?
```
var query = from x in db.Courses
select new
{
x.OldProperty1,
x.OldProperty2, | [
0.2181118130683899,
0.25631237030029297,
0.44904953241348267,
0.03683498874306679,
0.054881852120161057,
-0.048991862684488297,
0.11036437749862671,
-0.3921671211719513,
0.19430284202098846,
-0.38487741351127625,
-0.3681658208370209,
0.5646207332611084,
-0.11254267394542694,
0.345433652400... | |
x.OldProperty3,
NewProperty = true
};
```
I want to do this without listing out all of the current properties of my object. There are many properties, and I don't want to have to update this code whenever I may change my class.
I am still learning with LINQ and I appreciate | [
0.2953614592552185,
0.46705976128578186,
0.363309383392334,
-0.02370506338775158,
0.14350415766239166,
-0.41513219475746155,
0.24518641829490662,
0.15356022119522095,
0.06263846158981323,
-0.6359409689903259,
-0.022660845890641212,
0.555734395980835,
-0.23649637401103973,
0.434242218732833... | |
your suggestions.
Add it with partial classes:
```
public partial class Courses
{
public String NewProperty { get; set; }
}
```
Then you can assign it after you've created the object. | [
0.3063155710697174,
-0.1441344916820526,
0.13522672653198242,
0.20050100982189178,
0.1555575728416443,
0.11517699062824249,
0.0018253512680530548,
-0.057840511202812195,
0.01801561750471592,
-0.7094542980194092,
-0.19685792922973633,
0.5064795017242432,
-0.26462844014167786,
0.275820106267... | |
is there a way to slice a string lets say i have this variable
```
$output=Country=UNITED STATES (US) &City=Scottsdale, AZ &Latitude=33.686 &Longitude=-111.87
```
i want to slice it in a way i want to pull latitude and longitude values in to seperate variables, subtok is not serving the purpose
You don't need a regu... | [
0.41991543769836426,
-0.10888343304395676,
0.285366952419281,
0.0675094798207283,
0.2061799019575119,
0.06396099925041199,
0.10690736770629883,
0.2978110611438751,
-0.047505687922239304,
-0.472598671913147,
-0.18718314170837402,
-0.15492236614227295,
-0.42209500074386597,
0.084314882755279... | |
I am developing a package of IDE-registered components, most of which are derived from a base TFrame class. There are also various custom dialog forms that are called by these components, included in the package. I'm working in Delphi 2007.
I'm noticing that sometimes frame and form units, which normally have an assoc... | [
0.38286304473876953,
0.11412609368562698,
0.43845316767692566,
-0.30359888076782227,
-0.16462130844593048,
-0.30485737323760986,
0.09204307943582535,
-0.3631763756275177,
-0.07403349131345749,
-0.7956910729408264,
0.0170387402176857,
0.30853909254074097,
-0.3022850751876831,
-0.17080770432... | |
in the listing.
If I Add New, though, and create a new form or frame unit in the project, it shows as the typical nested two-file item in the Project Manager. It also shows that way if I drag an existing form from another project in the Project Group to this BPL project in question.
Seems like this should be consist... | [
0.6674067378044128,
0.06713886559009552,
0.2301020324230194,
0.06262767314910889,
-0.09264485538005829,
-0.2551756501197815,
-0.03929787874221802,
-0.30106571316719055,
-0.37194961309432983,
-0.5148671865463257,
0.12434370815753937,
0.3314768671989441,
-0.14943872392177582,
0.2248179912567... | |
form/frame units so that both files show in the Project Manager listing?
**\* UPDATE \***
From Alen's suggestion below:
I tried adding the {$R \*.dfm} directive to the form's unit, and it did not force the DFM file to show up when adding it to my BPL package/project. Adding {$R \*.dfm} to the project file itself (wh... | [
0.4993145167827606,
0.004401972983032465,
0.3401089608669281,
-0.05144106224179268,
0.09466476738452911,
-0.1271199882030487,
0.2657685875892639,
-0.6462090015411377,
-0.30294203758239746,
-0.3053189218044281,
-0.1107165738940239,
0.5143898129463196,
-0.4416116774082184,
0.0098834857344627... | |
TTESTTREEVIEW; File E:\Projects\MyApp\Components\TTestTreeViewFrame.dfm resource kept; file
E:\Projects\MyApp\Components\TTestTreeViewFrame.dfm resource discarded.
"Keping" and "discarding" the same file??
---
Later: It looks like this "duplicate resource" issue MIGHT be related to
[this](https://stackoverflow.com... | [
0.1843532919883728,
-0.3044576346874237,
0.5715730786323547,
-0.16819414496421814,
-0.1469247192144394,
-0.2240504026412964,
0.30330514907836914,
-0.6044201850891113,
-0.4224366545677185,
-0.7072070240974426,
-0.1700160950422287,
0.5739389061927795,
-0.2797308564186096,
0.1388305276632309,... | |
it, make sure the .pas file has the {$R \*.dfm} directive in the clear. By that, I should not be buried in an IFDEF or otherwise obscured by potential syntax errors in the file. The IDE uses the presence of this directive to decide whether or not it should try and open the .dfm in the designer.
The IDE doesn't just ta... | [
0.30022919178009033,
0.1271255761384964,
0.43807879090309143,
-0.10523499548435211,
0.1481495201587677,
-0.38424453139305115,
0.058857910335063934,
-0.39280790090560913,
-0.025634750723838806,
-0.6728026270866394,
-0.2903735935688019,
0.4347568154335022,
-0.06174316629767418,
0.02867987565... | |
then just went and created a new unit which would be given the name Unit1.pas. There is no reference to the old, stale Unit1.dfm out there on the disk from this new, same-base-named, Unit1.pas. It would be strange and confusing if the IDE were to just blindly open that .dfm. | [
0.27893778681755066,
0.027514465153217316,
0.29345133900642395,
0.15787336230278015,
-0.2399236261844635,
-0.15404367446899414,
0.14596714079380035,
-0.1613558530807495,
-0.1972748041152954,
-0.369169682264328,
0.030626067891716957,
0.1954541951417923,
-0.1304578334093094,
0.10836055874824... | |
I know strings in Erlang can be costly to use. So how do I convert `"5"`to `5`?
Is there anything like `io:format("~p",[5])` that would return a formatted string instead of printing to a stream?
The following is probably not the neatest way, but it works:
```
1> lists:flatten(io_lib:format("~p", [35365])).
"35365"
`... | [
0.21920552849769592,
0.1527639627456665,
0.6754172444343567,
-0.15058380365371704,
-0.09810367971658707,
0.03798963502049446,
0.2896411418914795,
-0.4161430895328522,
0.14357005059719086,
-0.6571550965309143,
0.16463510692119598,
0.5916315913200378,
-0.19649159908294678,
0.1816799640655517... | |
lists:flatten(io_lib:format(Pattern, Values)).
```
**EDIT 2** (in response to comments): the above function came from a small program I wrote a while back to learn Erlang. I was looking for a string-formatting function and found the behaviour of `io_lib:format/2` within `erl` counter-intuitive, for example:
```
1> i... | [
0.24377639591693878,
0.027736134827136993,
0.7671478986740112,
-0.3036750853061676,
-0.38116317987442017,
0.09242688864469528,
-0.12700514495372772,
-0.4461720287799835,
-0.502537727355957,
-0.5925960540771484,
-0.037039708346128464,
0.4568221867084503,
-0.5536882281303406,
-0.044173534959... | |
few EUnit tests that failed because they were expecting a flattened string. These were easily fixed.
I agree with @gleber and @womble that using this function is overkill for converting an integer to a string. If that's all you need, use `integer_to_list/1`. KISS! | [
0.28753662109375,
-0.40601974725723267,
0.40001368522644043,
-0.07608788460493088,
-0.29944470524787903,
0.011707315221428871,
0.3583332300186157,
0.19492733478546143,
0.04287707805633545,
-0.5625516176223755,
0.16630655527114868,
0.41372251510620117,
-0.3430909514427185,
0.062127534300088... | |
In the current project I am working in, someone decided that binary files be checked in as part of the source tree. The binaries live in a directory beneath the sources themselves:
```
project/src # Here is the location of the source code
project/src/more_src # Some more source code lives here
project/s... | [
0.6593306660652161,
0.2702786922454834,
-0.13007542490959167,
0.07416866719722748,
0.27382418513298035,
-0.17960365116596222,
-0.05712698772549629,
0.016057375818490982,
-0.1368541717529297,
-0.8439652323722839,
0.012597712688148022,
0.2957034707069397,
-0.254276305437088,
0.11914577335119... | |
machine should be committing the binaries - this should be left to the build server.
I am a command-line user of subversion. I would like to ignore the `bin` directory so that when I use `svn st` and `svn ci` these directories are skipped (even if there are pending changes).
Unfortunately, I cannot use -N (non-recurs... | [
0.3008129596710205,
-0.09304579347372055,
0.3500661551952362,
-0.09753137081861496,
-0.19349238276481628,
-0.27252474427223206,
0.4744401276111603,
-0.12163083255290985,
-0.23240841925144196,
-0.8781155347824097,
-0.10297008603811264,
0.7587398886680603,
-0.7033593654632568,
0.082688212394... | |
working copy, immediately and
> until further notice. Prior to
> Subversion 1.6, if a directory could
> not easily be removed from a working
> copy. ...
All the stuff below is obsolete now.
---
You could limit the depth of the folders in your working copy in the right places so that the undesired files don't app... | [
0.2775948643684387,
-0.07159747928380966,
0.4928654432296753,
-0.03893772512674332,
0.07300255447626114,
-0.4111901521682739,
0.37276601791381836,
-0.045469265431165695,
-0.24023933708667755,
-0.8302251100540161,
-0.2806739807128906,
0.7013139128684998,
-0.4657805263996124,
0.1266659200191... | |
that you DON'T want to ignore, pull in the content with
```
svn update --depth infinity /some/good/path
```
If the folder with content to ignore is not in the root of your working copy, you can work your way down the tree gradually with repeated calls to
```
svn update --depth immediates /some/path/to/make/deeper
... | [
0.26626089215278625,
0.22670015692710876,
0.15137352049350739,
-0.08827440440654755,
0.2202984094619751,
-0.14857526123523712,
0.5806728005409241,
-0.08357495069503784,
-0.46863311529159546,
-0.22589555382728577,
-0.24796676635742188,
0.6663165092468262,
-0.5561907291412354,
0.242673546075... | |
your working copy, which is much simpler:
1. normal project checkout (or start
from existing working copy)
2. delete undesired folder (normal
filesystem delete, not svn rm). At this point the folder is *missing* and would return with all it's evil content if you did a normal update.
3. bring back the folder with
> sv... | [
0.16831067204475403,
-0.028829533606767654,
0.47673606872558594,
0.10992421209812164,
-0.027094338089227676,
-0.13501212000846863,
0.6424460411071777,
-0.09263640642166138,
-0.19978953897953033,
-0.3535219132900238,
-0.2982610762119293,
0.823481023311615,
-0.3923070430755615,
0.21162919700... | |
I have a Products table in a SQL Server database and I am having to troubleshoot a legacy stored procedure that uses Full-Text indexing. For our purposes here, lets suppose that the Products table has two fields ID, Keywords. And the Keywords field is populated with the following:
> ROLAND SA-300 This Roland SA-300 is... | [
0.19102437794208527,
0.3578026294708252,
0.22592291235923767,
-0.0012501627206802368,
0.12393123656511307,
0.13469794392585754,
0.09940245747566223,
-0.09852392971515656,
0.18686607480049133,
-0.30951592326164246,
0.02594955824315548,
0.1960986852645874,
0.06134819984436035,
0.268106609582... | |
WHERE CONTAINS(Keywords, 'SA-300')
SELECT * FROM Products WHERE CONTAINS(Keywords, '"SA-300"')
SELECT * FROM Products WHERE CONTAINS(Keywords, '"*SA-300*"')
```
But I know that the CONTAINS() function is working because I get results when I run any of these:
```
SELECT * FROM Products WHERE CONTAINS(Keywords, ' Rola... | [
0.06347913295030594,
0.32438814640045166,
0.28274860978126526,
-0.013490349054336548,
0.08385823667049408,
-0.14148305356502533,
0.24650616943836212,
-0.335925430059433,
-0.05102654919028282,
-0.5472123622894287,
-0.40311047434806824,
0.29766419529914856,
-0.17573881149291992,
-0.147309869... | |
do these return?
```
SELECT * FROM Products WHERE CONTAINS(Keywords, 'SA')
SELECT * FROM Products WHERE CONTAINS(Keywords, 'SA 300')
SELECT * FROM Products WHERE CONTAINS(Keywords, 'SA300')
```
See this [other question](https://stackoverflow.com/questions/1042/why-doesnt-sql-full-text-indexing-return-results-for-wor... | [
-0.15258392691612244,
0.3607252836227417,
0.006950405426323414,
-0.20446880161762238,
-0.037978220731019974,
0.15082475543022156,
0.3803069293498993,
-0.31249135732650757,
-0.19759799540042877,
-0.5332816243171692,
-0.2898299992084503,
0.3775399625301361,
-0.09135407209396362,
0.0343427173... | |
Can MS SQL support full-text indexing for a view that connects (joins or unions) multiple databases?
Yes, absolutely. Each index will be queried individually and the results will be combined by the engine.
For example, if you've got:
* DatabaseA, TableA, FieldA with a full text index
* DatabaseB, TableB, FieldB with ... | [
-0.01548786647617817,
-0.13251164555549622,
0.36619094014167786,
0.24233287572860718,
-0.028847860172390938,
-0.0378267876803875,
-0.010570553131401539,
-0.11428671330213547,
-0.22162741422653198,
-0.4854889214038849,
-0.07737618684768677,
0.4412141740322113,
-0.4842170178890228,
-0.056809... | |
challenges. Thanks! | [
0.1351235806941986,
0.012667161412537098,
0.3040732741355896,
0.6895321011543274,
-0.1659158170223236,
-0.4275282621383667,
0.5260738730430603,
0.052224889397621155,
-0.30163586139678955,
-0.5726824998855591,
-0.012676559388637543,
0.5470969080924988,
0.34176596999168396,
-0.42059487104415... | |
Are there any performance drawbacks in SQL to joining a table on a char (or varchar) value, as opposed to say joining on an integer value?
There are performance *considerations* related to the size of the join column. An integer is 4 bytes wide - so any char value larger than 4 bytes requires more disk I/O, cache space... | [
0.1139996126294136,
0.04745608940720558,
0.15594236552715302,
0.08746708929538727,
-0.15423531830310822,
0.21575628221035004,
0.16007563471794128,
-0.3554092049598694,
-0.46932974457740784,
-0.3386869430541992,
0.05695556104183197,
0.25963565707206726,
-0.10738321393728256,
0.0783854946494... | |
datatype is not the only factor - as you can often avoid a join with a natural (char) key.
Of course, neither one is likely to be the bottleneck in your application - so design with impunity (at least in this area). | [
0.07608526945114136,
-0.20254342257976532,
-0.14718616008758545,
0.21713419258594513,
0.09223291277885437,
-0.2532486915588379,
0.33967578411102295,
-0.23623402416706085,
-0.02702970989048481,
-0.5948049426078796,
-0.16731251776218414,
0.5758801102638245,
-0.2781757116317749,
-0.1228128075... | |
```
dd {
/*position: relative; /* IE is dumb */
display: block;
float: left;
width: 500px;
height: 16px;
margin: 0 0 2px;
background: url("white3.gif");
}
dd div.blue {
/*position: relative; */
background: url("blue.gif");
height: 16px;
width... | [
-0.03242845460772514,
0.13431021571159363,
0.3423224091529846,
-0.21477045118808746,
0.07048022747039795,
0.1628386229276657,
0.35535728931427,
-0.1413836032152176,
-0.059945978224277496,
-0.6275017261505127,
-0.4023337960243225,
0.394567608833313,
-0.19183014333248138,
0.4154024124145508,... | |
text-align:right;
display:block;
}
```
HTML:
```
<dd>
<div class="blue" style="width:35%;">
</dd>
```
This creates a white bar and fills it with blue 35%.
Now I would like to fill the SAME progress bar with two different values. For example, if value A was 30% and value B was 40%, 70% of the bar would ... | [
0.040546078234910965,
0.2189428210258484,
0.4728415906429291,
-0.12469083070755005,
0.006744332145899534,
0.47580674290657043,
0.32855284214019775,
-0.05969478189945221,
-0.023096054792404175,
-0.7116817831993103,
-0.22942641377449036,
0.04827982932329178,
-0.18109774589538574,
0.179671153... | |
each one is taking up.
Any suggestions?
Thanks.
Are you looking for something like this?
CSS:
```
div.dd {
/*position: relative; /* IE is dumb */
display: block;
float: left;
width: 500px;
height: 16px;
margin: 0 0 2px;
background: #fff;
}
div.dd div.blue {
... | [
0.0665464848279953,
-0.11787804961204529,
0.15682116150856018,
-0.013297628611326218,
-0.09258363395929337,
0.25295591354370117,
0.0893079936504364,
-0.1214660257101059,
-0.18348334729671478,
-0.8064367771148682,
-0.2525632083415985,
0.15777921676635742,
-0.34957724809646606,
0.13036400079... | |
height: 16px;
width: 75%;
text-align:right;
display:block;
float: left;
}
div.dd div.red {
/*position: relative; */
background: #f00;
height: 16px;
width: 75%;
text-align:right;
display:block;
float: left;
}
```
HTML:
```
<div class="dd">
<div class="blue" styl... | [
-0.05532617121934891,
-0.021778419613838196,
0.6134904026985168,
-0.24270953238010406,
-0.022568000480532646,
0.4405144155025482,
0.4488559067249298,
-0.2244635969400406,
-0.2903510332107544,
-0.7907061576843262,
-0.419573038816452,
0.5851349830627441,
-0.08224821835756302,
0.1376750320196... | |
inside). | [
-0.17624691128730774,
0.04767906665802002,
0.18383954465389252,
0.07015248388051987,
0.30006715655326843,
0.463769793510437,
0.3210384249687195,
-0.22230850160121918,
-0.3102378845214844,
-0.29045894742012024,
-0.38213762640953064,
0.18000428378582,
-0.3381831645965576,
0.14277426898479462... | |
Anybody out there heard of "Define Design Develop Deploy" ? Just curious if someone knows or uses this development methodology.
You can override the resize behaviour with CSS:
```
textarea
{
resize: none;
}
```
or just simply
```
<textarea style="resize: none;">TEXT TEXT TEXT</textarea>
```
Valid properties ar... | [
0.37012144923210144,
0.07461218535900116,
0.10990570485591888,
-0.01691904291510582,
0.19413234293460846,
0.009151291102170944,
0.4653187692165375,
-0.34263113141059875,
-0.07776343822479248,
-0.7955294847488403,
-0.4663262963294983,
0.7042719125747681,
-0.3632592260837555,
0.0589526817202... | |
There are two procedures, A1 and A2, which both call function B in their code:
```
function B: boolean;
begin
// do other stuff
end;
procedure A1;
begin
// do stuff
if b then
...
// do stuff
end;
procedure A2;
begin
// do stuff
if b then
A1; // <- how to call A1 "delayed"?
// do stuff
end;
```... | [
0.30941343307495117,
-0.15549306571483612,
-0.09065714478492737,
-0.21332235634326935,
0.17861835658550262,
0.011374140158295631,
0.27663707733154297,
-0.22009123861789703,
-0.33346545696258545,
0.17591819167137146,
-0.4072329103946686,
0.3536157011985779,
-0.4432150423526764,
0.0325998328... | |
finished and after leaving A2 the procedure A1 should be called.
An ugly solution would be to set a timer that calls A1 after a delay that makes sure A2 is finished.
But there must be better ways, right?
**EDIT**: A1 and A2 in my case are events, so they are not called by code and I cannot just call A1 from a callin... | [
0.20730233192443848,
0.07402106374502182,
0.205322727560997,
-0.31553855538368225,
0.13599087297916412,
0.1491793692111969,
0.3770982027053833,
-0.239888995885849,
-0.7791655659675598,
-0.42307960987091064,
-0.22096195816993713,
0.5158616900444031,
-0.06985011696815491,
0.17797400057315826... | |
worry about it a race condition, but I'm not sure that'll be an issue with the windows message queue. | [
0.4582885801792145,
-0.11713474988937378,
0.27276626229286194,
-0.020091697573661804,
0.12210608273744583,
-0.08027125895023346,
0.45424240827560425,
0.29676780104637146,
-0.044217247515916824,
-0.32934102416038513,
0.4321267902851105,
0.4989311397075653,
0.19313262403011322,
-0.1106705069... | |
given
```
public Class Example
{
public static void Foo< T>(int ID){}
public static void Foo< T,U>(int ID){}
}
```
Questions:
1. Is it correct to call this an "overloaded generic method"?
2. How can either method be specified in creation of a MethodInfo object?
```
Type exampleType = Type.GetType("fullyqualif... | [
0.2428855448961258,
0.11552534997463226,
0.3416523039340973,
-0.018123239278793335,
0.28926408290863037,
-0.09966716915369034,
0.3586198687553406,
-0.4467194676399231,
0.0662609413266182,
-0.42001402378082275,
-0.05589048191905022,
0.4553554654121399,
-0.5311986207962036,
0.230907246470451... | |
use it.
```
var allMethods = typeof (Example).GetMethods(BindingFlags.Public | BindingFlags.Static);
MethodInfo foundMi = allMethods.FirstOrDefault(
mi => mi.Name == "Foo" && mi.GetGenericArguments().Count() == 2);
if (foundMi != null)
{
MethodInfo closedMi = foundMi.MakeGenericMethod(new Type[] {typeof (int),... | [
0.02484074793756008,
-0.17519785463809967,
0.5008071660995483,
-0.14747697114944458,
0.4943225383758545,
-0.25940966606140137,
0.3215067386627197,
-0.24414242804050446,
-0.05977318435907364,
-0.6434279680252075,
-0.3058048486709595,
0.31488358974456787,
-0.4438916742801666,
0.3217089772224... | |
I'm trying to write a plugin that will add a few methods to a jQuery wrapper object. Basically, I want to initialize it like this:
```
var smart = $('img:first').smartImage();
```
The 'smartImage' plugin would attach 2 methods to the object referenced by 'smart', so I'll be able to do something like:
```
smart.save... | [
0.12509731948375702,
-0.19697077572345734,
0.2170647382736206,
-0.0552915595471859,
0.23380333185195923,
-0.126276433467865,
0.06913148611783981,
-0.33450984954833984,
0.11940383911132812,
-0.7483168840408325,
0.08352135866880417,
0.673769474029541,
-0.6134120225906372,
-0.1415112316608429... | |
{
$(this).saveState = function() { /* save */ }
$(this).loadState = function() { /* load */ }
}
}
}
```
After I call smartImage(), neither 'saveState' nor 'loadState' is defined. What am I doing wrong?
You cannot attach methods/properties in they way you have demonstrated, because... | [
0.1935235857963562,
-0.24383707344532013,
0.22176985442638397,
-0.04063718393445015,
0.1708773821592331,
-0.2840331494808197,
0.21514910459518433,
-0.21626172959804535,
-0.09403539448976517,
-0.36736181378364563,
-0.13096751272678375,
0.7760341763496399,
-0.3724808394908905,
0.006520108785... | |
they will no persist when they are selected by jQuery again.
```
var a = $('.my-object');
a.do_something = function(){ alert('hiya'); }
a.do_something(); // This alerts.
var b = $('.my-object');
b.do_something(); // Freak-out.
```
If you want a method to exist on the jQuery object when recovering it a second time, ... | [
0.28398561477661133,
-0.23752520978450775,
0.5808262825012207,
-0.10220391303300858,
0.12660925090312958,
-0.10618499666452408,
0.3981547951698303,
0.03976891189813614,
-0.3853382170200348,
-0.3856911063194275,
-0.48012882471084595,
0.5638660192489624,
-0.37476226687431335,
0.3959957063198... | |
alert('Tada!');
}
return this;
}
var a = $('.my-object').setup_something();
a.do_something(); // Alerts.
$('.my-object').do_something(); // Also alerts.
```
I suggest you look at <http://docs.jquery.com/Internals/jQuery.data> and <http://docs.jquery.com/Core/data#name> | [
0.4664795398712158,
-0.08789601922035217,
0.17505282163619995,
-0.3760526478290558,
0.17961101233959198,
-0.16418951749801636,
0.41184282302856445,
0.005752823315560818,
-0.37542715668678284,
-0.5016266107559204,
-0.43182840943336487,
0.6120325326919556,
-0.463180273771286,
0.1601175963878... | |
My english is not so good. I basicaly want to show the date when that last post was posted in a forum. This is my forum shema:
```
`forum_id` int(11) NOT NULL auto_increment
`forum_name` varchar(255) NOT NULL
`forum_description` text NOT NULL
`forum_order` int(11) NOT NULL
`thread_id` int(11) NOT NULL auto_... | [
-0.07441619038581848,
0.40770694613456726,
0.5743375420570374,
-0.3307856321334839,
-0.4150323271751404,
-0.017110925167798996,
0.5309240818023682,
0.29376715421676636,
-0.03205006569623947,
-0.6962106227874756,
-0.031133601441979408,
0.6015387177467346,
0.010463152080774307,
-0.0617078058... | |
`comment_poster` int(11) NOT NULL default '0'
`comment_date` datetime NOT NULL
```
Forums.php
```
$query = mysql_query("SELECT * FROM forums ORDER BY forum_order ASC");
while ($row = mysql_fetch_assoc($query)) {
<h3>Forum: <?php echo $row['forum_name'] ?><h3>
<div>Desc: <?php echo $row['forum_descriptio... | [
0.20698514580726624,
-0.007883896119892597,
0.6539615988731384,
0.05856176093220711,
-0.4971068203449249,
0.13093417882919312,
0.13353732228279114,
-0.06447160243988037,
-0.4826289117336273,
-0.6482173800468445,
0.09310600906610489,
0.36829882860183716,
-0.32457488775253296,
0.135624423623... | |
you need one of the following SpecialFolder values:
* **`ApplicationData`** - if the files are roaming, per-user and are for the application use only and don't represent documents the user might care about.
* **`LocalApplicationData`** - if the files are non-roaming, per-user and are for the application use only and d... | [
0.1261858344078064,
0.058803245425224304,
0.5783924460411072,
0.21152499318122864,
0.24175631999969482,
-0.5388769507408142,
0.4663691520690918,
-0.05146395415067673,
-0.4002803862094879,
-0.7202577590942383,
-0.6288409233093262,
0.768425703048706,
-0.17593714594841003,
0.16009092330932617... | |
the fact that changing files in there might affect behavior of programs used by admins). You can either explicitly change the permissions on your app subfolder, or choose one of the other options.
* **`MyDocuments`** - if the files are per-user and represent documents.
Note that there's no `SpecialFolder` enum value l... | [
-0.00018816890951711684,
0.26488229632377625,
0.6556753516197205,
0.035336706787347794,
0.3715344965457916,
0.1013641357421875,
0.2737707793712616,
-0.07783686369657516,
-0.44649559259414673,
-0.9353905320167542,
-0.5259164571762085,
0.6484233140945435,
-0.07912217825651169,
-0.08032767474... | |
`Environment.GetFolderPath` uses the Win32 API [`SHGetFolderPath`](http://msdn.microsoft.com/en-us/library/bb762181(VS.85).aspx). The enumeration used by `SHGetFolderPath` gives you the well-known locations for several other special folders (including Common Documents). You might use directly `SHGetFolderPath`; you can... | [
0.1617041379213333,
-0.12267197668552399,
0.336587131023407,
-0.05116685852408409,
0.08167722076177597,
-0.3139341473579407,
0.15779078006744385,
0.1013244241476059,
-0.18244750797748566,
-0.7308527231216431,
-0.33392271399497986,
0.06051820516586304,
-0.46626630425453186,
0.15498208999633... | |
I recently built a query in SQL that I can use to look at our payment log and find out an average number of payments made per hour over a period of time. I'm sure there are third party reporting applications that are much more suited for doing the type of calculation I'm trying to do, but just for fun, I'm kind of curi... | [
0.6795573234558105,
-0.023708464577794075,
0.2829842269420624,
0.34898144006729126,
-0.16104590892791748,
-0.048761628568172455,
-0.16484016180038452,
0.11816617846488953,
-0.14644752442836761,
-0.5586628317832947,
0.48902952671051025,
0.4432147741317749,
0.15216919779777527,
0.16180883347... | |
But, for anyone else out there that is bored like me, feel free to post your other solutions.
The table is set up with a [CreateDate] column which is the DATETIME value of when the payment posts to the account. I use this to determine which hour they made the payment in.
```
CREATE TABLE #TempTimes
(
[Time] DATE... | [
0.5114487409591675,
0.0816420391201973,
0.8075701594352722,
-0.02457818016409874,
0.2519835829734802,
0.21915574371814728,
0.3458589017391205,
-0.170345276594162,
-0.21066391468048096,
-0.6726064085960388,
0.07114926725625992,
0.5756492614746094,
-0.06279449909925461,
0.23275691270828247,
... | |
in a table with all of the hours for the time span I'm querying against,
because otherwise, the AVG function won't calculate in the hours where no payments were made.
*/
SELECT DATEPART(hour, [Time]) [Hour], AVG(CAST([Count] AS DECIMAL)) [Average]
FROM
(
SELECT [Time], CASE WHEN [Count] IS NULL THEN 0 ELSE [Cou... | [
0.3239104151725769,
-0.3296569287776947,
0.4560965895652771,
-0.03568870946764946,
0.15552520751953125,
0.27488937973976135,
0.12651973962783813,
-0.33557724952697754,
-0.137066051363945,
-0.37175825238227844,
0.11963308602571487,
0.37521448731422424,
-0.08394784480333328,
0.03925959020853... | |
GROUP BY DATEADD(hour, DATEDIFF(hour, 0, [CreateDate]), 0)
) t1 ON t1.[hour] = tt.[time]
) t2
GROUP BY DATEPART(hour, tt.[Time])
GO
DROP TABLE #TempTimes
GO
```
CJ
```
set now = select max(dtg) from table;
set then = select max(dtg) from table where dtg < now;
select locID, old.temp-new.temp from
table a... | [
0.08234304189682007,
-0.14602798223495483,
0.5004630088806152,
-0.052980732172727585,
0.3617241084575653,
0.22883623838424683,
0.1678648144006729,
-0.4752471148967743,
-0.1821562498807907,
-0.4150506556034088,
-0.39415839314460754,
0.31374019384384155,
-0.1003737598657608,
-0.1049659475684... | |
I have a form on my page and am dynamically adding controls to the form with Javascript/JQuery. At some point I need to get all the values in the form on the client side as a collection or a query string. I don't want to submit the form because I want to pass the form values along with other information that I have on ... | [
0.5626275539398193,
0.07704852521419525,
0.45480209589004517,
0.053599078208208084,
-0.1218235045671463,
-0.20263883471488953,
0.10431569814682007,
-0.15741458535194397,
-0.10475396364927292,
-0.7885915040969849,
0.0672554075717926,
0.512195348739624,
-0.25346869230270386,
0.09235443919897... | |
the form was actually submitted. I suspect there is an easy way to capture this, but I'm stumped.
The jquery form plugin offers an easy way to iterate over your form elements and put them in a query string. It might also be useful for whatever else you need to do with these values.
```
var queryString = $('#myFormId')... | [
0.4479113519191742,
0.10672196745872498,
0.6620317101478577,
-0.01100456528365612,
-0.15296101570129395,
-0.16349764168262482,
0.26586565375328064,
-0.307722806930542,
0.06816046684980392,
-0.5012069940567017,
0.07922661304473877,
0.38454848527908325,
-0.3429168462753296,
0.337793529033660... | |
In oracle, is the named timezone always stored?
I have been testing this column within our system, and in some places the timestamp is shown as:
```
26-FEB-09 11.36.25.390713 AM +13:00
```
but other times it's:
```
26-FEB-09 11.36.25.390713 AM Pacific/Auckland
```
If the value is being stored as the former, does... | [
0.5146395564079285,
0.09820006042718887,
0.08462020754814148,
0.3938516676425934,
0.48368847370147705,
0.12756404280662537,
-0.007574355695396662,
0.3348748981952667,
-0.056181784719228745,
-0.4659649431705475,
0.15496507287025452,
0.5386455655097961,
0.07981391996145248,
0.012052590027451... | |
when a connection is opened seems to solve this problem:
```
OracleGlobalization info = conn.GetSessionInfo();
info.TimeZone = "Pacific/Auckland";
info.TimeStampFormat = "DD-MON-YYYY HH:MI:SS.FF AM";
info.TimeStampTZFormat = "DD-MON-YYYY HH:MI:SS.FF AM TZR";
conn.SetSessionInfo(info);
``` | [
0.1147477850317955,
-0.034960951656103134,
0.16132047772407532,
0.41811245679855347,
0.31132739782333374,
0.010021727532148361,
0.2835460901260376,
0.24885405600070953,
-0.32431209087371826,
-0.27940815687179565,
-0.42100146412849426,
0.28565678000450134,
-0.15566223859786987,
0.3895033001... | |
If I have an `NSMutableString` such as
```
NSMutableString *foo = [[NSMutableString alloc] init];
```
if I nil out the object, `foo = nil`, does that lower the retain count by 1, thus effectively releasing the memory? Would I need to reallocate foo from the heap at this point to be able to use it?
Please read [the b... | [
0.004864900838583708,
0.3583940267562866,
0.2617642283439636,
-0.22787703573703766,
0.16340520977973938,
-0.1022152528166771,
0.22166787087917328,
-0.1934814453125,
-0.2582169771194458,
-0.16680161654949188,
-0.11851713061332703,
0.7187061905860901,
-0.12795406579971313,
0.2274314761161804... | |
doesn't release the object. | [
0.3223184645175934,
0.2485993504524231,
0.25306302309036255,
0.1991787999868393,
-0.00930614024400711,
-0.18390534818172455,
0.6655426025390625,
-0.0464668832719326,
0.08854060620069504,
-0.056074533611536026,
-0.1168772503733635,
-0.001897625275887549,
-0.09943179041147232,
0.118167810142... | |
Is there anyway to add a prefix to table names at configuration time using Castle Active Record?
```
[ActiveRecord("Address")]
public class Address : ActiveRecord<Address> {}
```
I'd like the actual table created/referenced to be "PRODAddress" or "DEBUGAddress". Is there anything built-in like that I am not seeing?
... | [
-0.19312143325805664,
0.015315759927034378,
0.8181602358818054,
-0.09485264122486115,
0.28643086552619934,
0.006019445601850748,
0.42034074664115906,
-0.30776700377464294,
-0.4557636082172394,
-0.4520736634731293,
-0.29809218645095825,
0.5148324370384216,
-0.4529745578765869,
-0.0413405075... | |
model.ActiveRecordAtt.Table = String.Format("{0}{1}", tablePrefix, model.ActiveRecordAtt.Table);
}
}
```
Browsers condense multiple whitespace characters (including newlines) to a single space when rendering. The only exception is within `<pre>` elements or those that have the [CSS property `white-space`](https://... | [
-0.06015721708536148,
0.010462794452905655,
0.3129197955131531,
-0.018937839195132256,
0.1511571854352951,
0.08938267827033997,
0.19339880347251892,
0.10752732306718826,
-0.2949909269809723,
-0.8864061832427979,
-0.32558146119117737,
0.06362373381853104,
-0.48016151785850525,
0.28122064471... | |
When I'm creating temp tables I get an error message telling me that the temp table already exists. The temp table is unique to the session so it seems my connection isn't closing properly and I think it may have something to do with a return statement I have in my using statement.
I have the following code:
```
usin... | [
0.1605101227760315,
0.004936586134135723,
0.29734814167022705,
0.08399274945259094,
0.062056124210357666,
-0.041667640209198,
0.5784019231796265,
-0.18469612300395966,
-0.13441862165927887,
-0.787493109703064,
-0.14690139889717102,
0.4586057960987091,
-0.5948266983032227,
0.557979583740234... | |
following error: `There is already an object named '#MyTempTable' in the database`.
Now, I know that the temp table is unique to the session and so once the session is closed it should disappear.
There are three things that I believe might cause this...
1. I need to call connection.Close()
2. I need to place the re... | [
0.15916477143764496,
0.1293639987707138,
0.4625943601131439,
0.00534196337684989,
0.011290601454675198,
-0.22678419947624207,
0.4320957660675049,
0.18840785324573517,
-0.3937084972858429,
-0.4399298131465912,
0.1681625247001648,
0.4584820568561554,
-0.41721001267433167,
0.5931143164634705,... | |
if it helps.
Usually, when you close/dispose connection on the .NET libraries level, real database server connection is not closed. It is just returned to connection pool inside data provider and will be reused when program asks for another connection with the same parameters and credentials. I don't think database se... | [
0.24349993467330933,
-0.08141012489795685,
0.12778924405574799,
0.42031925916671753,
0.14363262057304382,
-0.3625488579273224,
-0.0028861917089670897,
-0.03528977185487747,
-0.34680813550949097,
-0.7064211964607239,
0.018138974905014038,
0.4266156256198883,
-0.03179961442947388,
0.21574230... | |
content if it exists. Or you can drop temporary table before closing connection. | [
0.23832501471042633,
-0.12363819032907486,
0.593297004699707,
0.517516016960144,
0.041019514203071594,
-0.33643653988838196,
-0.11206591874361038,
0.46950259804725647,
-0.204233318567276,
-0.6676052808761597,
-0.5259608030319214,
0.3013458549976349,
-0.10577994585037231,
0.35150346159935,
... | |
I have inherited an online quiz application written in C# with these lines of code all over the place.
So how bad is this code?
What are the potential issues I could run into?
How could I improve it?
### The code:
```
strTestPasses += "<tr valign=\"top\"><td><b>Subject</b></td><td>" + ((Hashtable)((ArrayList)((Has... | [
0.4127700924873352,
0.12300945818424225,
0.3460511863231659,
0.08804184943437576,
-0.35962480306625366,
0.1414802521467209,
0.772612988948822,
-0.16788028180599213,
-0.13399329781532288,
-0.6938682198524475,
-0.08253934234380722,
0.22400660812854767,
-0.07582315802574158,
0.189822360873222... | |
I made an application that should run constant until I stop it. What it basically does is getting some data from connected another device and send that data to the server periodically using `NSURLConnection`, and read data from the server periodically and visualize that data as a graph using `NSXMLParser`.
I ran the i... | [
-0.09933134913444519,
0.1321924328804016,
0.5663419365882874,
0.05630657449364662,
0.05762689188122749,
0.058677367866039276,
0.6162813305854797,
0.05981942266225815,
-0.4162110984325409,
-0.6575101017951965,
0.13460098206996918,
0.4866146743297577,
-0.25567373633384705,
0.3639582097530365... | |
error on Debugger console about 12 hours later.
Any idea?
One suspicious part is **SENDING** data.
```
- (void) sendDataToServerWithX:(float)x Y:(float)y{
NSAutoreleasePool *uiUpdatePool = [[NSAutoreleasePool alloc] init];
NSString *urlString = [[NSString alloc] initWithFormat:@"<http://www.url.com/save_data.php... | [
-0.3111686706542969,
-0.13546760380268097,
0.3389413058757782,
-0.008861294947564602,
-0.07438329607248306,
0.09666283428668976,
0.7523655891418457,
-0.25987258553504944,
-0.20506489276885986,
-0.43828609585762024,
0.143119677901268,
0.24599876999855042,
-0.4919719994068146,
0.008745267987... | |
```
(...)
[parser release];
[url release];
[readXmlParser release];
[uiUpdatePool drain];
}
Try running it in the iPhone Simulator with "Guard Malloc" (in Xcode's Run menu) enabled. That's a special setting designed to make hidden memory-access bugs cause immediate crashes rather than hiding for a while. (It w... | [
0.23407253623008728,
-0.16128621995449066,
0.29581236839294434,
-0.15243887901306152,
0.0037841983139514923,
-0.15293776988983154,
0.6839156150817871,
-0.37032634019851685,
0.11902672797441483,
-0.8728892803192139,
-0.1868300884962082,
0.8162545561790466,
-0.48674970865249634,
-0.280461639... | |
clicking "Run" in the sheet's source list, choosing the "Diagnostics" tab, and checking "Enable Guard Malloc". | [
0.40704840421676636,
-0.22898368537425995,
0.3942066431045532,
0.3011578321456909,
0.2587655484676361,
-0.17889094352722168,
0.1642286777496338,
-0.45209193229675293,
-0.06196098402142525,
-0.6338167786598206,
-0.3832988440990448,
0.5379230976104736,
-0.32508623600006104,
-0.34660303592681... | |
I have a dijit.layout.AccordionContainer on my page which is defined in the html and created when dojo parses the page on load.
Then, as the user interacts with the page I use Ajax to retrieve data and programmatically populate the container (removing existing items first).
To illustrate my issue simply, here is some... | [
-0.04128485172986984,
-0.044729601591825485,
0.7161139249801636,
-0.26034045219421387,
0.022197067737579346,
0.23457744717597961,
0.20173630118370056,
-0.3483922481536865,
-0.12584035098552704,
-0.6224499940872192,
-0.009812691248953342,
0.21834121644496918,
-0.2905007302761078,
0.37187191... | |
for (i = 1; i < 5; i++) {
var d = new dijit.layout.AccordionPane({title:'hello', content:'world'});
accordion.addChild(d);
}
}
```
This fails, because only the first item in the accordian is visible. I think the others actually exist, but they are not visible so you can't do anythi... | [
-0.30484458804130554,
0.04313964024186134,
0.6216309070587158,
-0.40408965945243835,
0.30697688460350037,
0.18494294583797455,
0.4668360948562622,
-0.40716084837913513,
-0.23533517122268677,
-0.839722752571106,
-0.24301621317863464,
0.2976002097129822,
-0.21481800079345703,
0.0302995163947... | |
I never remove the first child)
2. Call accordian.layout() after changing the contents
So, this code "works" as long as you always want to see the first item, and don't actually expand any but the first one:
```
function doit() {
var accordion = dijit.byId("accordionShell");
var i = 0;
acco... | [
-0.07675263285636902,
-0.18441951274871826,
0.8490164279937744,
-0.5081679821014404,
0.40677326917648315,
0.3417944014072418,
0.27187004685401917,
-0.5550451874732971,
-0.305056095123291,
-0.6175139546394348,
-0.3410528600215912,
0.3149513900279999,
-0.12018518894910812,
0.3765459954738617... | |
});
for (i = 1; i < 5; i++) {
var d = new dijit.layout.AccordionPane({title:'hello', content:'world'});
accordion.addChild(d);
}
accordion.layout();
}
```
I am using Dojo 1.2.0 - Anyone know what I am doing wrong?
Try running it in the iPhone Simulator with "Guard ... | [
-0.1280708909034729,
-0.13268795609474182,
0.6087408065795898,
-0.2898450493812561,
0.3539620041847229,
0.06319723278284073,
0.6911877989768982,
-0.39996230602264404,
-0.19741255044937134,
-0.8135374188423157,
-0.1648893803358078,
0.7949603199958801,
-0.328193336725235,
0.00236755865626037... | |
special setting designed to make hidden memory-access bugs cause immediate crashes rather than hiding for a while. (It will also make your app very slow and consume much more memory than normal, which is why it isn't always on.) It's not certain that it will help, but it might.
**UPDATE**: The instructions above are f... | [
0.38202139735221863,
-0.3465721309185028,
0.6659860014915466,
-0.0743805468082428,
-0.06383772939443588,
-0.17941240966320038,
0.45900142192840576,
-0.39095884561538696,
-0.09411466866731644,
-0.7523763179779053,
-0.30130741000175476,
0.85725998878479,
-0.38488641381263733,
-0.310142010450... | |
Using Thickbox is great it allows me to load external sites into the thickbox and they retain their functionality, appearance, etc. I know how to load simple content into a div with jquery but I am stuck on how to load external content to a div in a page (preferably via onload event) and have that div act like Thickbox... | [
0.43762195110321045,
-0.03040391393005848,
0.5332363247871399,
-0.11427903175354004,
-0.169398233294487,
-0.141737699508667,
0.17132100462913513,
0.2868618071079254,
-0.3634629547595978,
-0.9020727872848511,
0.019546104595065117,
0.34852334856987,
-0.09003789722919464,
0.29262271523475647,... | |
iFrame, which from your description I think would provide the same functionality. | [
0.3898954689502716,
0.21330951154232025,
-0.17408102750778198,
-0.026823803782463074,
-0.049853838980197906,
0.15665550529956818,
-0.3282005488872528,
0.3933740258216858,
-0.31683021783828735,
-0.4039011597633362,
0.3232429027557373,
0.40547025203704834,
0.012008785270154476,
0.25141844153... | |
I've using the WPF DocumentViewer control to display an XPS Document like so:
```
viewer.Document = xpsDocument.GetFixedDocumentSequence();
```
When the print button inside the document viewer is clicked everything prints okay, however the name of the print job is System.Windows.Documents.FixedDocumentSequence, whic... | [
0.17890234291553497,
0.2744761109352112,
0.7940874695777893,
-0.1577717661857605,
-0.01418478786945343,
-0.20321188867092133,
0.19286580383777618,
-0.1740012764930725,
-0.09397943317890167,
-0.6755535006523132,
-0.15347746014595032,
0.7577651739120483,
-0.32505708932876587,
0.0385613925755... | |
= new PrintDialog();
if (dialog.ShowDialog() == true)
{
dialog.PrintDocument(Document.DocumentPaginator, "Print Job Title");
}
}
private void CommandBinding_Executed(object sender, ExecutedRoutedEventArgs e)
{
//needed so that preview executed works
}
```
A couple of things of note. The Previ... | [
0.3996652066707611,
-0.06534639000892639,
0.35604211688041687,
-0.20123234391212463,
-0.034800849854946136,
-0.09548116475343704,
0.37244942784309387,
-0.04282873868942261,
-0.043747346848249435,
-0.5521964430809021,
-0.007342881988734007,
0.45773062109947205,
-0.3915896415710449,
0.155405... | |
The ASP.NET dropdownlist control has an arrow that you can click to drop the list down, that color of the arrow is tied to the users windows color scheme. This is not convenient for me and I'll need a workaround. However, I'm wondering if anyone knows (or has a guess) the strategy behind making that dropdown arrow tie ... | [
0.009453587234020233,
-0.2157423198223114,
0.49752551317214966,
-0.021019060164690018,
-0.09140139073133469,
0.06455101817846298,
0.12383443862199783,
-0.13748759031295776,
-0.30038076639175415,
-0.5099565982818604,
-0.24646984040737152,
0.3937985301017761,
-0.40731966495513916,
-0.0080619... | |
== true)
{
dialog.PrintDocument(Document.DocumentPaginator, "Print Job Title");
}
}
private void CommandBinding_Executed(object sender, ExecutedRoutedEventArgs e)
{
//needed so that preview executed works
}
```
A couple of things of note. The PreviewExecuted method doesn't happen if the Exectued ... | [
0.3578427731990814,
-0.03724019229412079,
0.3106441795825958,
-0.11373170465230942,
-0.004325998481363058,
-0.12106478959321976,
0.4118731617927551,
-0.059296123683452606,
0.08276282250881195,
-0.4247751533985138,
-0.06549437344074249,
0.5406157970428467,
-0.24323397874832153,
0.2140854001... | |
I am trying to structure my code in such a way to reduce/avoid code duplication and I have encountered an interesting problem. Every time my code invokes a stored proc, I need to pass few variables that are common to the stored proc: such as username, domain, server\_ip and client\_ip. These all come from either HttpRe... | [
0.13262683153152466,
0.21317796409130096,
0.16444280743598938,
-0.09467201679944992,
0.03585751727223396,
0.13768747448921204,
0.28457680344581604,
0.17100441455841064,
-0.055782709270715714,
-0.7641922235488892,
0.09137382358312607,
0.25222671031951904,
-0.4098820984363556,
0.312370836734... | |
problem is though that c# class (inside App\_Code folder) doesn't see Httprequest object. Of course, I could pass this as an argument to the wrapper, but that would defeat the whole purpose of creating the wrapper. Am I missing something here?
I realize it's not such a huge deal to repeat 4 lines of code each time I c... | [
0.3498244881629944,
0.073763407766819,
0.2991926670074463,
0.16556154191493988,
-0.06729840487241745,
-0.02179601788520813,
0.5975219011306763,
-0.002964323852211237,
-0.3975697159767151,
-0.5512963533401489,
-0.024797972291707993,
0.5981122851371765,
-0.3485502004623413,
0.123852618038654... | |
something similar in the business layer - base class with those 4 properties in the constructor.
Then the UI does new BusObj( Request["username"], ... ).method()
Within the data layer you can have a method that builds a SQLParameter array with those 4 properties, then each method can add additional parameters to the ... | [
0.10790500789880753,
-0.2051123082637787,
0.6626097559928894,
0.49710285663604736,
-0.09077488631010056,
-0.17909398674964905,
0.17904290556907654,
-0.4628351330757141,
-0.20815928280353546,
-0.6300436854362488,
-0.010244939476251602,
0.37743061780929565,
-0.18776379525661469,
0.1411976367... | |
I have written some code that makes use of an open source library to do some of the heavy lifting. This work was done in linux, with unit tests and cmake to help with porting it to windows. There is a requirement to have it run on both platforms.
I like Linux and I like cmake and I like that I can get visual studios f... | [
0.921054482460022,
0.1971002072095871,
0.12152297049760818,
-0.025395194068551064,
-0.3612060844898224,
-0.24504218995571136,
-0.004342625383287668,
0.08286747336387634,
-0.041060708463191986,
-0.7541942000389099,
0.19142217934131622,
0.6505357623100281,
-0.1283920556306839,
0.005192614626... | |
days, learning all about manifest files and redistributable packages.
As far as my understanding goes:
With VS 2005, Microsoft created Side By Side dlls. The motivation for this is that before, multiple applications would install different versions of the same dll, causing previously installed and working application... | [
0.3952954113483429,
-0.015863781794905663,
0.3441917300224304,
0.18503259122371674,
-0.4670846164226532,
-0.36606651544570923,
0.07710640132427216,
0.14880333840847015,
-0.45888879895210266,
-0.5486612319946289,
0.09112635254859924,
0.4868620038032532,
-0.16066445410251617,
0.0332019552588... | |
Studios. Also, as I mentioned earlier, I am a developer trying to link to a third party library. Often, these things come distributed as a "precompiled dll". Now, what happens when a precompiled dll compiled with one version of visual studios is linked to an application using another version of visual studios?
From wh... | [
0.819078803062439,
0.10259311646223068,
0.07424480468034744,
0.17690211534500122,
-0.3013923764228821,
-0.4159623980522156,
0.0038710704538971186,
0.1520218551158905,
-0.2768239974975586,
-0.5769985318183899,
0.2487233281135559,
0.6538935899734497,
-0.2541370093822479,
0.2572154700756073,
... | |
way to get this to work (besides statically linking everything) is that all third party libraries must be compiled using the same version of Visual Studios - ie don't use precompiled dlls - download the source, build a new dll and use that instead.
Is this in fact true? Did I miss something?
Furthermore, if this seem... | [
0.6586248874664307,
0.24023644626140594,
-0.1910293996334076,
0.4588882625102997,
-0.18230004608631134,
-0.6857068538665771,
0.3870778977870941,
0.3263736367225647,
-0.27432477474212646,
-0.46146494150161743,
0.1453033983707428,
0.39997878670692444,
-0.31198352575302124,
0.2905159890651703... | |
use of third party proprietary libraries, then whenever they upgrade to the latest version of visual studios - your company must now do the same thing or the code will no longer run.
As an aside, how does linux avoid this? Although I said I preferred developing on it and I understand the mechanics of linking, I haven'... | [
0.5944103002548218,
0.16385582089424133,
-0.07029984146356583,
0.29108697175979614,
-0.17995475232601166,
-0.3917692005634308,
0.013002581894397736,
0.24202588200569153,
-0.33432823419570923,
-0.663133442401886,
0.1779852956533432,
0.4782542288303375,
-0.2885473668575287,
0.069463692605495... | |
Microsoft honestly think this makes application development easier?
Update - A more concise question: **How does Linux avoid the use of Manifest files?**
All components in your application must share the same runtime. When this is not the case, you run into strange problems like asserting on delete statements.
This i... | [
0.49792131781578064,
0.09220711886882782,
0.06076020747423172,
0.20080672204494476,
-0.14097604155540466,
-0.3858814239501953,
0.06905634701251984,
-0.012433471158146858,
-0.1615750789642334,
-0.7242494225502014,
-0.10313181579113007,
0.5179203152656555,
-0.44851458072662354,
0.05194339901... | |
return malloc( 100 ); }
b.dll
void consumeBla() { void* p = createBla(); free( p ); }
```
When a.dll and b.dll are linked to different rumtimes, this crashes, because the runtime functions implement their own heap.
You can easily avoid this problem by providing a destroyBla function which must be called to free... | [
0.4905041754245758,
-0.1135990098118782,
0.059705689549446106,
-0.016646509990096092,
0.08820658177137375,
-0.18819120526313782,
0.33998018503189087,
-0.5152385234832764,
-0.27139604091644287,
-0.47866418957710266,
-0.11990679055452347,
0.6620951890945435,
-0.5714144110679626,
-0.019578048... | |
across dll boundaries. (typeinfo, C++ exceptions, ...)
* ...
But this is not a problem with manifests.
A manifest contains the version info of the runtime used by the module and gets embedded into the binary (exe/dll) by the linker. When an application is loaded and its dependencies are to be resolved, the loader loo... | [
0.3038339912891388,
-0.3300056457519531,
0.5051929950714111,
0.20934824645519257,
-0.11771244555711746,
-0.29868319630622864,
-0.2050844430923462,
-0.11052729189395905,
-0.2515869438648224,
-0.8939140439033508,
-0.1991237998008728,
0.4253458082675934,
-0.3313210904598236,
0.154375120997428... | |
supplied by Microsoft which can be executed when you install your software on a test/end-user machine.
So install your runtime before using your application, and you won't get a 'missing dependency' error.
---
(Updated to the "How does Linux avoid the use of Manifest files" question)
**What is a manifest file?**
M... | [
0.4758072793483734,
-0.1433793604373932,
0.28198668360710144,
0.19704417884349823,
-0.07843609154224396,
-0.1478957235813141,
-0.2337680608034134,
0.10332387685775757,
-0.13632677495479584,
-0.763653576374054,
-0.08527401089668274,
0.5390558838844299,
-0.2645549476146698,
-0.18705025315284... | |
may be put here)
**Why is this done?**
The version is not part of the dll name due to historic reasons. So "comctl32.dll" is named this way in all versions of it. (So the comctl32 under Win2k is different from the one in XP or Vista). To specify which version you really want (and have tested against), you place the v... | [
0.13563865423202515,
-0.02124856784939766,
0.47866666316986084,
0.002330459887161851,
-0.08232617378234863,
-0.10339730978012085,
0.18784959614276886,
0.1749541461467743,
-0.4843015968799591,
-0.6856470108032227,
-0.2840797007083893,
0.5530772805213928,
-0.5347909331321716,
0.0715521425008... | |
applications. And in the days of limited memory, shared libraries reduced the memory footprint when several applications used the same libraries.
This concept was abused by many programmers, when they installed all their dlls into this directory; sometimes overwriting newer versions of shared libraries with older ones... | [
0.18255552649497986,
-0.10957923531532288,
0.12558706104755402,
0.30357974767684937,
-0.16202618181705475,
-0.45383220911026,
0.24933648109436035,
0.07734497636556625,
-0.6251828074455261,
-0.7616576552391052,
-0.1057531014084816,
0.18775475025177002,
-0.8646973967552185,
0.295684278011322... | |
all problems above. You can install the dlls in a central place, where the programmer may not interfere. Here the dlls can be updated (by updating the dll in the WinSxS folder) and the loader loads the 'right' dll. (version matching is done by the dll-loader).
**Why doesn't Linux have this mechanic?**
I have several ... | [
0.4672113060951233,
-0.022619780153036118,
0.1505156010389328,
0.23723438382148743,
-0.12435305863618851,
-0.5572068691253662,
0.012047269381582737,
0.16649240255355835,
-0.2811926603317261,
-0.49227702617645264,
-0.4216715097427368,
0.8219761848449707,
-0.42407456040382385,
0.050574339926... | |
at the interface level, where these problems just don't occur if done right
* The version of libraries are in most cases embedded in the name of its file.
* Most applications are statically bound to their libraries, so no dll-hell may occur.
* The GCC runtime was kept very ABI stable so that these problems could not oc... | [
0.1148325502872467,
0.05386817082762718,
0.31934231519699097,
0.1520126760005951,
-0.09244683384895325,
-0.4507744610309601,
0.2724742889404297,
0.10103428363800049,
-0.3443111777305603,
-0.34823086857795715,
-0.3033057451248169,
0.3511223793029785,
-0.32003116607666016,
0.1841439902782440... | |
I'm working on an interactive interface using SVG and JavaScript/jQuery, and I'm trying to decide between [Raphael](http://raphaeljs.com/) and [jQuery SVG](http://keith-wood.name/svgRef.html). I'd like to know
1. What the trade-offs are between the two
2. Where the development momentum seems to be.
I don't need the ... | [
0.4352123439311981,
-0.06229984760284424,
0.3521499037742615,
-0.10416533797979355,
-0.4204348623752594,
-0.03745349869132042,
-0.09461618959903717,
-0.05783315375447273,
-0.14578862488269806,
-0.6813244223594666,
0.20062355697155,
0.34094300866127014,
0.1586141437292099,
-0.30735471844673... | |
written and documented. Lots of examples and Demos. Very extensible architecture. Great with animation.
**Cons:** is a layer over the actual SVG markup, makes it difficult to do more complex things with SVG - such as grouping (it supports Sets, but not groups). Doesn't do great w/ editing of already existing elements.... | [
0.07454311847686768,
0.02155705727636814,
0.1200484037399292,
0.15394160151481628,
-0.3784964084625244,
-0.18991608917713165,
0.1919410228729248,
-0.03676709905266762,
-0.13995333015918732,
-0.8275967240333557,
-0.1763981580734253,
0.35874295234680176,
-0.12443646788597107,
-0.359114080667... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.