text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
have thee ways to write yours. Note that in all cases there were some type changes required - i.e. GNode's type parameter needs to be covariant, and ConcreteGraph needs to be written with both a distinct node class and a type bound for Node.
Once done, the first way to write dfs is to make it a method (it can be fina... | [
0.16801302134990692,
-0.13338907063007355,
0.6791539192199707,
-0.08078398555517197,
-0.15368394553661346,
-0.35974597930908203,
0.4467587471008301,
-0.697023332118988,
0.15176454186439514,
-1.2904094457626343,
0.11572949588298798,
0.5954007506370544,
-0.2520197927951813,
-0.22385476529598... | |
{
class CGNode extends GNode[ConcreteGraph]
type Node <: CGNode
}
new ConcreteGraph dfs {node => println("foo")}
```
The second, with dfs not a method, seems to require just a bit of extra type hinting to use it.
```
def dfs[G <: Graph](graph : G, nodeAction : G#Node => Unit) = print("dfsing!")
dfs[ConcreteGra... | [
-0.0934089794754982,
-0.5056222081184387,
0.536471426486969,
-0.15719276666641235,
-0.37570515275001526,
0.10419923812150955,
0.1943959891796112,
-0.40955501794815063,
-0.145900160074234,
-0.9552339911460876,
0.058231599628925323,
0.4808868169784546,
-0.7226294875144958,
0.0858454555273056... | |
I have a java application that uses some third party API. The third party jar files change fairly frequently because of all kinds of patches, but the API itself does not change that often.
Do I have to recompile my application every time the third party jar changes?
If the API changes, you should recompile even if yo... | [
0.398502916097641,
0.34788864850997925,
-0.03940776735544205,
0.01706557348370552,
0.09430480003356934,
-0.1314033716917038,
0.28757014870643616,
0.060173071920871735,
-0.36507099866867065,
-0.5679450035095215,
0.21951603889465332,
0.5238080024719238,
-0.29626336693763733,
0.31478321552276... | |
instance, suppose you are currently calling:
```
public void foo(String x)
```
and in a later version this is changed to:
```
public void foo(Object x)
```
Obviously your code will still compile, but the method it resolves the call to will change.
This is a bit of an edge case, of course. Basically, so long as y... | [
0.13168570399284363,
0.11698733270168304,
0.19319260120391846,
-0.10651734471321106,
0.25124239921569824,
-0.22672207653522491,
0.22782428562641144,
0.1336917132139206,
-0.33586642146110535,
-0.3827044367790222,
-0.18036210536956787,
0.7636707425117493,
-0.4806946814060211,
-0.013410742394... | |
I'm having some difficulties creating a javascript appointment style calendar. While it does render, I know there's go to be a much more efficient way of doing it. Does anyone have a pattern they use for creating calendars? I will be using jQuery, but I don't want to use someone's calendar plugin as a) I haven't found ... | [
0.5576211810112,
0.16081483662128448,
0.291942298412323,
0.06019015982747078,
-0.11391929537057877,
-0.017787059769034386,
0.19730950891971588,
0.4632827341556549,
-0.5581222772598267,
-1.0063802003860474,
0.39511188864707947,
0.2933804988861084,
0.03405662253499031,
-0.0842951163649559,
... | |
to know a good pattern on actually rendering the calendar markup.
Ive just published a new OS project called FullCalendar (<http://arshaw.com/fullcalendar/>)
Sounds like what you might want. Pass it an array of events/appointments and it will render. The plugin only provides the essentials, but you can use event hooks... | [
0.4120689630508423,
-0.28947901725769043,
0.4475858509540558,
0.026426127180457115,
0.021942321211099625,
-0.26001325249671936,
-0.040156394243240356,
0.40188050270080566,
-0.14123749732971191,
-0.7102864384651184,
0.14799872040748596,
0.6247462034225464,
-0.10246969759464264,
-0.350940704... | |
I have a pkcs12 file. I need to use this to connect to a webpage using https protocol. I came across some code where in order to connect to a secure web page i need to set the following system properties:
```
System.setProperty("javax.net.ssl.trustStore", "myTrustStore");
System.setProperty("javax.net.ssl.trustStorePa... | [
0.5379338264465332,
0.2774858772754669,
0.9006113409996033,
0.1677270084619522,
0.26492568850517273,
-0.19010624289512634,
0.30810070037841797,
-0.5584763288497925,
0.3695814907550812,
-0.53249192237854,
-0.19301889836788177,
0.674199640750885,
-0.23953066766262054,
0.050147753208875656,
... | |
when I use it, I get the following error
```
Exception in thread "main" java.net.SocketException: java.security.NoSuchAlgorithmException: Error constructing implementation (algorithm: Default, provider: SunJSSE, class: com.sun.net.ssl.internal.ssl.DefaultSSLContextImpl)
```
Update:
After removing certain properties... | [
0.26936012506484985,
0.39391812682151794,
0.3899017572402954,
-0.14215236902236938,
0.08095590770244598,
-0.3371683359146118,
0.586142897605896,
-0.3434302806854248,
0.1585346758365631,
-0.6094485521316528,
0.06453502178192139,
0.7511957287788391,
-0.24154965579509735,
0.20526088774204254,... | |
the java keystore in `$JAVA_HOME/jre/lib/security/cacerts`, password: `changeit`).
3. Set the following system properties:
```
System.setProperty("javax.net.ssl.trustStore", "myTrustStore");
System.setProperty("javax.net.ssl.trustStorePassword", "changeit");
System.setProperty("javax.net.ssl.keyStoreType", "pkcs12");
... | [
-0.11911556124687195,
0.01783791184425354,
0.6718315482139587,
-0.03261794149875641,
0.12659640610218048,
0.007551706396043301,
0.35499146580696106,
-0.44066086411476135,
-0.045847296714782715,
-0.6865029335021973,
-0.43754440546035767,
0.43355536460876465,
-0.37526047229766846,
0.19086112... | |
I'm having a problem creating a DOM element, appending it to another element and having it fade into place.
This doesn't seem to work:
```
$('<div/>').html('hello').appendTo('#parentDiv').fadeIn();
```
Can anybody put me on the right track
Try:
```
$("<div>hello</div>").hide().appendTo("#parentDiv").fadeIn();
```... | [
0.16649053990840912,
-0.12238342314958572,
0.3102263808250427,
-0.2255731225013733,
0.16193275153636932,
-0.019627651199698448,
0.754179060459137,
-0.1466621458530426,
0.22070053219795227,
-0.6170311570167542,
-0.10145775973796844,
0.5698748826980591,
-0.08406907320022583,
0.08486235141754... | |
We have a system that uses UniqueIdentifier as the primary key of each of the tables. It has been brought to our attention that this is a bad idea. I have seen similar post on the subject but I am interested in any MS SQL performance and other potential problems I may encounter due to this decision.
There are pros and ... | [
0.7302175760269165,
0.00918666087090969,
0.07255832850933075,
0.3825695216655731,
0.08574844896793365,
-0.10246093571186066,
-0.16383357346057892,
0.02260180376470089,
-0.21097145974636078,
-0.783484697341919,
0.05491626262664795,
0.31543853878974915,
-0.2968095541000366,
0.185247272253036... | |
the database
* Most replication scenarios require GUID columns anyway
GUID Cons
* It is a whopping 4 times larger than the traditional 4-byte index value; this can have serious performance and storage implications if you're not careful
* Cumbersome to debug (where userid='{BAE7DF4-DDF-3RG-5TY3E3RF456AS10}')
* The gen... | [
-0.2799852192401886,
0.09628615528345108,
0.396575391292572,
0.4218817949295044,
-0.03487946465611458,
-0.21084144711494446,
0.26021817326545715,
-0.010944499634206295,
-0.18817536532878876,
-0.36342230439186096,
-0.0005828741122968495,
0.3745569586753845,
-0.30727478861808777,
0.351914077... | |
I have a rather large text file that has a bunch of missing newlines, meaning that it's a mess. I need to break it up into appropriate lines.
The text looks something like this now:
```
12345 This is a chunk 23456 This is another chunk 34567 This is yet another chunk 45678 This is yet more chunk 56789 Yet another pie... | [
0.45766782760620117,
0.23490406572818756,
0.4266155958175659,
0.041010983288288116,
0.12070896476507187,
0.2089129388332367,
0.031180288642644882,
-0.20775723457336426,
-0.6224947571754456,
-0.6513206958770752,
0.07524522393941879,
0.17624473571777344,
-0.15177884697914124,
0.0988484248518... | |
yet more chunk
56789 Yet another piece of text
```
It can insert one before the first group of digits or not; that I can deal with.
Any ideas? Thanks.
Very simple (but not as "flashy" as possible, since I'm too lazy to use lookaheads):
```
s/(\d{5})/\r\n\1/gs
``` | [
0.026459110900759697,
0.16624315083026886,
0.1459413766860962,
0.19623632729053497,
-0.0661972165107727,
0.115287646651268,
0.10446762293577194,
0.16866692900657654,
-0.26711905002593994,
-0.44767868518829346,
-0.314241498708725,
0.49550434947013855,
0.0652485117316246,
-0.2747976779937744... | |
I have status tables in my database, and "localised" tables that contain language-specific versions of those statuses. The point of the main status table is to define the status ID values, and other meta-data about the status. The "localised" table is to display the text representation in a UI, according to the users' ... | [
-0.09820467978715897,
0.01610013097524643,
0.5627841353416443,
0.04585540294647217,
0.36854150891304016,
0.15925386548042297,
-0.04287036508321762,
0.17286647856235504,
-0.03280492126941681,
-0.8249315023422241,
-0.4104112982749939,
0.20779862999916077,
-0.04259582981467247,
-0.02654438093... | |
Description varchar(50),
constraint PK_EmployeeStatusLocalised primary key
(EmployeeStatusID, LanguageID),
constraint FK_EmployeeStatusLocalised_EmployeeStatus foreign key
(EmployeeStatusID) references EmployeeStatus (ID),
constraint FK_EmployeeStatusLocalised_Language foreign key
(... | [
-0.1360245943069458,
0.2460925579071045,
0.3741737902164459,
0.024319276213645935,
0.5219248533248901,
0.3650916516780853,
0.25470873713493347,
-0.3337586522102356,
-0.14436297118663788,
-0.6845048666000366,
-0.2928571105003357,
0.4448777735233307,
-0.4440324902534485,
0.2689415216445923,
... | |
is how I'd typically access that data:
```
select e.EmployeeName, esl.Description as EmployeeStatus
from Employee e
inner join EmployeeStatusLocalised esl on
e.EmployeeStatusID = esl.EmployeeStatusID and esl.LanguageID = 1
```
I'm not really happy that my LINQ to SQL is doing things in the most efficient way, th... | [
-0.05778355523943901,
0.04890035465359688,
0.5155312418937683,
0.023766176775097847,
0.2906501889228821,
0.011141862720251083,
0.1383620649576187,
-0.21884001791477203,
-0.011500655673444271,
-0.5886711478233337,
-0.1320292204618454,
0.4247578978538513,
-0.12306902557611465,
0.401455163955... | |
Where(esl => esl.LanguageID == 1).Single().Description);
}
```
Personally, I'd probably leave the EmployeeStatus codes in the DB and move all localization logic into the client. If this is a web app (ASP.NET or ASP.NET MVC) then you'd use the the EmployeeStatus code as a key into a resource file, and then use UICultur... | [
0.2979525327682495,
0.034295704215765,
0.1911211907863617,
-0.08666614443063736,
0.07857158780097961,
0.1374645084142685,
0.413334459066391,
-0.10310907661914825,
-0.04114188626408577,
-0.8432362675666809,
-0.38748887181282043,
0.5365607142448425,
-0.2405412346124649,
0.005827771965414286,... | |
DB is that you firstly end up with much more complicated queries, you have to keep pumping the locale into each of these queries, and you can't cache the outputs of the queries so widely. Secondly, you have a mixure of tables that hold entities and tables that hold localization. Finally, a DBA is required to do the loc... | [
0.041640717536211014,
0.18092268705368042,
-0.016502752900123596,
0.19858534634113312,
-0.3471222221851349,
-0.09688761085271835,
0.5170703530311584,
-0.09401612728834152,
0.35439619421958923,
-0.5728814601898193,
-0.4161094129085541,
0.3900766372680664,
-0.2187134027481079,
0.006512788590... | |
thing".
If you're stuck with DB tables for localization because "that's how it is" then perhaps you should query the lookups seperately to the real data, and join the two at the UI. This would at least give you an "upgrade path" to .RESX in the future.
You should check out Guy Smith-Ferrier's book on i18n if you're i... | [
0.3128981292247772,
-0.2814027965068817,
0.5143210291862488,
-0.05062863603234291,
0.02468366175889969,
-0.3812571167945862,
0.5503451824188232,
-0.21901914477348328,
-0.15324197709560394,
-0.6098016500473022,
-0.34213539958000183,
0.4622495472431183,
-0.18008190393447876,
0.12391041219234... | |
I have a Default.aspx that redirects to a Page1.aspx. My ddl is loaded and ordered from a database. How do I make the ddl selection show up on the page load depending on what the user selects on the Default page?
You will need to pass some kind of data from Default.aspx to Page1.aspx. I would suggest using a query stri... | [
0.08944681286811829,
-0.1517236828804016,
0.8741521239280701,
0.12480493634939194,
-0.2095692902803421,
0.08026858419179916,
0.28535300493240356,
-0.18359319865703583,
-0.30903562903404236,
-0.9213181138038635,
-0.05519048497080803,
0.46504560112953186,
-0.20397688448429108,
0.272018998861... | |
idea.
edit-this is C#, so added the semicolon ;) | [
0.10159885138273239,
-0.05576233193278313,
0.3283712565898895,
0.12213265895843506,
0.07461322098970413,
0.08809765428304672,
-0.1962319165468216,
0.08300479501485825,
-0.14645248651504517,
-0.45794034004211426,
-0.5586655735969543,
0.2485811412334442,
-0.24866008758544922,
0.1240570768713... | |
I have a database table like this:
```
id version_id field1 field2
1 1 texta text1
1 2 textb text2
2 1 textc text3
2 2 | [
0.1460810750722885,
0.5894704461097717,
0.36740508675575256,
-0.5346611142158508,
-0.28375697135925293,
-0.29559895396232605,
-0.061437565833330154,
-0.21899297833442688,
0.006284365430474281,
-0.4313375949859619,
0.019085891544818878,
0.44560134410858154,
-0.4312104284763336,
-0.017660595... | |
textd text4
2 3 texte text5
```
If you didn't work it out, it contains a number of versions of a row, and then some text data.
I want to query it and return the version with the highest number for each id. (so the second and last rows only in the above).
I've tried using group by whilst or... | [
0.0173029862344265,
0.2945672273635864,
0.7194570899009705,
-0.4690156877040863,
-0.24462339282035828,
0.14145122468471527,
0.10953622311353683,
-0.19286313652992249,
-0.199485644698143,
-0.607754111289978,
-0.10540365427732468,
0.5345167517662048,
-0.3188340961933136,
0.04123236984014511,... | |
grouped, so this doesn't work.
Anyone got any ideas? I can't believe it can't be done!
UPDATE:
Come up with this, which works, but uses a subquery:
```
SELECT *
FROM (SELECT * FROM table ORDER BY version_id DESC) t1
GROUP BY t1.id
```
It's called selecting the group-wise maximum of a column. [Here are several diff... | [
-0.13004134595394135,
-0.12918749451637268,
0.37368810176849365,
0.028467291966080666,
-0.1454702764749527,
0.003044392913579941,
0.24416886270046234,
-0.39920130372047424,
-0.5045294761657715,
-0.5166099667549133,
0.09680450707674026,
0.5362105965614319,
-0.23254339396953583,
-0.238541811... | |
version\_id) for this table.
It's a deficiency in SQL that you more or less have to use a subquery for this type of problem ([semi-joins](http://en.wikipedia.org/wiki/Relational_algebra#Semijoin) are another example).
Subqueries are not well optimized in mysql but uncorrelated subqueries aren't so bad as long as they... | [
-0.45264932513237,
-0.24073223769664764,
0.3678232729434967,
0.0016215583309531212,
-0.12899193167686462,
0.13101696968078613,
0.4014413356781006,
0.20963557064533234,
-0.4079447388648987,
-0.7793008089065552,
-0.10532385855913162,
0.1429915577173233,
-0.3321680426597595,
0.438236415386199... | |
There is a service running which monitors files in a folder on a server. Whenever files are copied to this folder, the files are moved and a record is written to a filemaker pro database through an ODBC connection. In that same process I need the ID of the newly created row to create a related record in another table (... | [
0.4297884702682495,
0.12132159620523453,
0.3002047836780548,
0.15322953462600708,
0.05780575051903725,
-0.006406796630471945,
-0.08403566479682922,
0.1396583765745163,
-0.39817628264427185,
-0.6867572665214539,
0.16766998171806335,
0.6766799688339233,
-0.37323692440986633,
0.50405371189117... | |
the ODBC interface into FileMaker, but I can suggest a possible solution that might work.
I'm assuming you're using an INSERT statement to get the data into FileMaker, that there's an "ID" number field in the table you're creating a record in, and that the ID field is set to auto-enter a serial number. If this is the ... | [
0.3361565172672272,
0.03202442824840546,
0.41558799147605896,
0.11351516842842102,
0.41189339756965637,
-0.508634090423584,
-0.24946556985378265,
-0.18855346739292145,
-0.3553917706012726,
-0.5335130095481873,
0.017316078767180443,
0.7315227389335632,
-0.42184191942214966,
-0.0172308310866... | |
Is there a way to have some kind of default constructor (like a C++ one) for C user types defined with a structure?
I already have a macro which works like a fast initializer (like the one for `pthread_mutex`) but I wanted to know if you can by any chance have some (or all) fields of a struct filled at declaration.
F... | [
-0.06708835065364838,
0.18726415932178497,
0.043779145926237106,
-0.08096278458833694,
-0.11127163469791412,
0.1449761688709259,
0.007303532212972641,
-0.12610195577144623,
-0.2971479892730713,
-0.5292613506317139,
-0.14478838443756104,
0.5787913799285889,
-0.4516232907772064,
-0.001675125... | |
and initialize it (like a factory) - so there is never a time where the struct is "uninitialized" in the "client" code. Of course - that assumes people follow the convention and use the "constructor"/factory...
horrible pseudo code with NO error checking on malloc or free
```
somestruct* somestruct_factory(/* per hap... | [
0.32278215885162354,
0.23289383947849274,
0.017630454152822495,
-0.08035510778427124,
-0.030341239646077156,
-0.0419907309114933,
0.21717259287834167,
0.09914512932300568,
-0.20723187923431396,
-0.4880761206150055,
-0.4108123183250427,
0.2842627763748169,
-0.5863654613494873,
0.21710318326... | |
I have a `IEnumerable<T>` collection with Name, FullName and Address.
The Address looks like this:
```
Street1=54, Street2=redfer street, Pin=324234
Street1=54, Street2=fdgdgdfg street, Pin=45654
Street1=55, Street2=tryry street, Pin=65464
```
I want to loop through this collection and print only those Names, FullN... | [
0.09294135123491287,
0.3671874701976776,
0.41522452235221863,
-0.16201503574848175,
0.06767989695072174,
0.161646768450737,
0.3947436511516571,
-0.5166220664978027,
-0.18686656653881073,
-0.5376587510108948,
-0.09691660851240158,
0.5048664808273315,
-0.41932564973831177,
0.0422939360141754... | |
Console.WriteLine(string.Format("{0}, {1}", cur.Name, cur.FullName));
}
```
If you want to be able to plug in your Street1 value with a variable, then do this:
```
var street1 = "54";
var result = collection.Where(x => x.Address.Contains("Street1=" + street1 ));
foreach ( var cur in result ) {
Console.WriteLine(st... | [
-0.019624488428235054,
-0.02462318167090416,
0.7381601929664612,
-0.017504554241895676,
0.28381282091140747,
0.08422297239303589,
0.20990458130836487,
-0.21031661331653595,
0.2646428644657135,
-0.6101284623146057,
-0.3180086314678192,
0.6635213494300842,
-0.14597046375274658,
0.01625944674... | |
In code, I sometimes see people specify constants in hex format like this:
```
const int has_nukes = 0x0001;
const int has_bio_weapons = 0x0002;
const int has_chem_weapons = 0x0004;
// ...
int arsenal = has_nukes | has_bio_weapons | has_chem_weapons; // all of them
if(arsenal &= has_bio_weapons){
std::cout <... | [
0.6059832572937012,
0.3773585855960846,
-0.08348370343446732,
-0.004766892641782761,
0.011939930729568005,
0.011845854111015797,
0.015720678493380547,
-0.4928942918777466,
-0.21409477293491364,
-0.36393460631370544,
0.03939732536673546,
0.6181314587593079,
-0.28080427646636963,
0.175065606... | |
compilers won't compile this, but there must be a workaround? Is it possible in other languages like Java?
I'd use a bit shift operator:
```
const int has_nukes = 1<<0;
const int has_bio_weapons = 1<<1;
const int has_chem_weapons = 1<<2;
// ...
int dangerous_mask = has_nukes | has_bio_weapons | has_chem_weapon... | [
0.34614789485931396,
0.025118669494986534,
-0.017062412574887276,
0.12481434643268585,
0.11173982918262482,
-0.5314452648162842,
0.4811636805534363,
-0.4280945956707001,
-0.27863168716430664,
-0.47475147247314453,
-0.08804355561733246,
0.7032417058944702,
-0.4534054100513458,
-0.1396925002... | |
How do I verify that method was NOT called in [Moq](http://code.google.com/p/moq/)?
Does it have something like AssertWasNotCalled?
UPDATE: Starting from Version 3.0, a new syntax can be used:
```
mock.Verify(foo => foo.Execute("ping"), Times.Never());
```
**UPDATE**: Since version 3, check the update to the quest... | [
0.41254734992980957,
0.3761606812477112,
0.5778058767318726,
-0.10631532222032547,
-0.05889236554503441,
-0.19183231890201569,
0.7248696088790894,
-0.2827112674713135,
-0.022899141535162926,
-0.49662697315216064,
-0.10239200294017792,
0.7674856781959534,
-0.1975911259651184,
-0.09097239375... | |
If you have worked with DotNetNuke, what are advantages and disadvantages that you have come across? What are alternative Content Management Systems that you have used that you find are better or worst. I'm trying to get a feel of what Content Management System Frameworks people are using and the advantages and disadva... | [
0.53199702501297,
0.04347093030810356,
0.25008735060691833,
0.27365273237228394,
0.0761256143450737,
-0.43783044815063477,
0.11469975113868713,
0.4079083204269409,
-0.4086012542247772,
-0.5365725755691528,
-0.1185508519411087,
0.3204740285873413,
0.019244566559791565,
0.11454883962869644,
... | |
Has anybody gone through the process of converting a real-world business application from ASP.NET web forms to MVC? How painful was the transition? Would you say that it was worth it, overall?
I am trying to figure out if it is worthwhile to take the time to convert an application over to MVC for increased performance... | [
0.5277321934700012,
0.1449473649263382,
0.07613413780927658,
0.013330567628145218,
-0.17908093333244324,
0.013397159986197948,
0.19904935359954834,
-0.00008946370508056134,
-0.3503473699092865,
-0.4914608895778656,
0.22053956985473633,
0.7227065563201904,
-0.2931985855102539,
0.02490038424... | |
looked like in the first place. | [
0.38505831360816956,
0.18536263704299927,
0.1466810405254364,
0.01250541117042303,
0.29554498195648193,
-0.15413890779018402,
0.3644675612449646,
0.5538581609725952,
-0.24309922754764557,
-0.43311089277267456,
0.005329736042767763,
-0.07944651693105698,
-0.29625341296195984,
0.200649365782... | |
I'm working with a SQL Server DB that's got tables spread across multiple schemas (not my idea), so queries end up looking like this:
```
select col1, col2
from some_ridiculously_long_schema_name.table1 t1
inner join
another_really_long_schema_location.table2 t2
on...
```
... you get the idea.
This is a sma... | [
0.029481295496225357,
0.3717191815376282,
0.3499184250831604,
-0.04449500888586044,
0.01495965477079153,
-0.0016616147477179766,
-0.061479050666093826,
0.06418939679861069,
-0.5052026510238647,
-0.6814044713973999,
0.02475639432668686,
0.2927756905555725,
-0.13144715130329132,
0.1992549151... | |
another_really_long_schema_location
```
... and then query away, with those schemas included in my address space.
If nothing like this exists, I'll look into synonymns, but I'd prefer to do this without having to add artifacts into the DB.
Red-Gate sells an SQL tool that adds intellisense to server management studi... | [
0.20157472789287567,
-0.06180020421743393,
0.39809057116508484,
0.054413605481386185,
-0.02093365788459778,
-0.09305334836244583,
0.17117789387702942,
0.11096455901861191,
-0.0399881973862648,
-0.5074695348739624,
0.15916261076927185,
0.28232014179229736,
0.31347373127937317,
0.26633608341... | |
Is there anyway to have the var be of a nullable type?
This implicitly types i as an int, but what if I want a nullable int?
`var i = 0;`
Why not support this:
`var? i = 0;`
Why support it? If that's what you mean, you should say `var i = (int?)0;` instead.
(Well, you should probably just say `int? i = 0`, but for... | [
0.12940572202205658,
-0.017766932025551796,
-0.029393184930086136,
-0.1735558956861496,
-0.16812923550605774,
-0.08052735030651093,
0.5581744313240051,
-0.06714915484189987,
-0.04599727317690849,
-0.1603737324476242,
-0.10722781717777252,
0.377144992351532,
-0.4195059537887573,
-0.08822944... | |
If so why? How much?
I tend to inflate mine a little because I can be overly optimistic.
**Hofstadter's Law**: Any computing project will take twice as long as you think it will — even when you take into account Hofstadter's Law. | [
0.5634981989860535,
0.12780743837356567,
0.21822048723697662,
0.08325064927339554,
0.03208836540579796,
-0.26927268505096436,
0.27586379647254944,
-0.1050676703453064,
-0.14915989339351654,
-0.49428030848503113,
-0.16495157778263092,
0.5529396533966064,
0.14987625181674957,
0.3351166248321... | |
I currently mantain an open-source project hosted in SourceForge.
My project is written in Java using ANT build scripts. (Ant has a few extensions installed, but let's ignore that for now.)
Unfortunately, there seems to be no easy way to automatically generate daily builds. Is there any workaround I can use. Here is w... | [
0.38096946477890015,
0.21384522318840027,
0.27398261427879333,
-0.18169833719730377,
-0.20939670503139496,
-0.09792792052030563,
0.8377575874328613,
-0.2857716381549835,
-0.08069644123315811,
-1.0397342443466187,
0.11889216303825378,
0.5997244715690613,
-0.13644321262836456,
0.152717083692... | |
project hosted in SourceForge?
As far as I understood your problem what you need is a Continuous Integration tool. It will pool the SCM for you, start a build and publish/store the error report in case of failure.
My favorite one is Hudson:
<https://hudson.dev.java.net/> | [
0.2175426036119461,
-0.39127182960510254,
-0.3213658332824707,
0.022251758724451065,
0.27766939997673035,
-0.1978674829006195,
0.11425960063934326,
0.12596045434474945,
-0.25317537784576416,
-0.5427538752555847,
0.4083949029445648,
0.35803768038749695,
-0.12185617536306381,
-0.069432847201... | |
I'm sure this is fairly easy, but I've kind of had a hard time with it. I've got a custom action that executes a different (non-msi) installer on installation. Unfortunately, I've noticed that it also executes the installer on UNinstallation!
I've looked through the options but I cant' seem to find out how to stop thi... | [
0.563829779624939,
-0.29387763142585754,
0.30331775546073914,
0.005881066434085369,
0.1316973865032196,
-0.0026572321075946093,
0.7023835182189941,
-0.26157575845718384,
-0.5574764609336853,
-0.2741912603378296,
-0.36641788482666016,
0.9074992537498474,
-0.4012293219566345,
-0.199440807104... | |
Install
```
NOT Installed AND NOT PATCH
```
Action runs during Install and repair
```
NOT REMOVE
```
Run on initial installation only:
```
NOT Installed
```
Run on initial install or when repair is selected.
```
NOT Installed OR MaintenanceMode="Modify"
```
To only run an action during uninstall use the fol... | [
0.10100188106298447,
-0.036566171795129776,
0.27765652537345886,
-0.1560276597738266,
0.18355843424797058,
0.03807970881462097,
0.6261879801750183,
-0.35816270112991333,
-0.2175476998090744,
-0.40325987339019775,
-0.5580698847770691,
1.030670166015625,
-0.3536762595176697,
-0.3069635331630... | |
I'm writing a simple real-estate listing app in Django. Each property needs to have a variable number of images. Images need to have an editable order. And I need to make the admin user-proof.
So that said, what are my options?
1. Is there a ImageList field that I don't know about?
2. Is there an app like `django.co... | [
0.6353800892829895,
0.34445855021476746,
0.39385947585105896,
-0.024910951033234596,
-0.20264343917369843,
-0.22499994933605194,
0.01838565617799759,
-0.11344577372074127,
0.03401680290699005,
-0.6989842057228088,
0.19515091180801392,
0.6878493428230286,
-0.10383579879999161,
-0.1322269886... | |
writing admin pages =(
1. Variable lists, also known as a many-to-one relationship, are usually handled by making a separate model for the many and, in that model, using a ForeignKey to the "one".
2. There isn't an app like this in django.contrib, but there are several external projects you can use, e.g. [django-photol... | [
0.344227135181427,
0.33050045371055603,
0.4589397609233856,
0.2480940818786621,
-0.3895726203918457,
-0.3323286175727844,
0.12336188554763794,
-0.25829124450683594,
-0.1438167840242386,
-0.5598519444465637,
0.15560312569141388,
0.4647209644317627,
-0.3568194508552551,
-0.17856568098068237,... | |
then inline the photos ([inline documentation](http://docs.djangoproject.com/en/dev/ref/contrib/admin/#inlinemodeladmin-objects)).
So, to give you some quick drafts, everything would look something like this:
```
# models.py
class Property(models.Model):
address = models.TextField()
...
class PropertyImage(m... | [
-0.06550980359315872,
0.0724625289440155,
0.6535309553146362,
0.09528040885925293,
-0.10764376074075699,
0.05352884531021118,
-0.1523519903421402,
-0.42873865365982056,
-0.18494707345962524,
-0.6893953680992126,
-0.21355396509170532,
0.6071820259094238,
-0.47409477829933167,
0.070487223565... | |
= property.images.all()
```
EDIT: forgot to mention, you can then implement drag-and-drop ordering in the admin using Simon Willison's snippet [Orderable inlines using drag and drop with jQuery UI](http://www.djangosnippets.org/snippets/1053/) | [
0.6816414594650269,
0.15884464979171753,
0.12403392046689987,
-0.10770037770271301,
-0.18979907035827637,
0.26311036944389343,
-0.24287648499011993,
-0.2638229429721832,
-0.4987385869026184,
-0.3132963478565216,
-0.3978356420993805,
0.270516037940979,
-0.5080614686012268,
-0.14815106987953... | |
It is possible, with the Direct3D9ex, to share resources between devices. Is it also possible to use those shared resources with Direct3D10 devices?
Yes, you can share resources between D3D9Ex and D3D10 devices using the technique described here:
[Feature Summary (Direct3D 9 for Windows Vista) - Sharing Resources](htt... | [
0.07784896343946457,
-0.05761449411511421,
0.41437533497810364,
0.4374687075614929,
-0.25375813245773315,
0.12913735210895538,
0.1184484139084816,
0.19415269792079926,
-0.29424330592155457,
-0.9665459990501404,
0.030266372486948967,
0.6504224538803101,
-0.133058562874794,
0.058331891894340... | |
event query (IDirect3DQuery9) , the other is doing a StretchRect to a small surface and Lock it (if Lock succeeds, GPU completed all previous work) | [
-0.52283775806427,
-0.48627251386642456,
0.5309882760047913,
0.19022004306316376,
-0.12050196528434753,
-0.05824767053127289,
-0.08863183856010437,
-0.22104474902153015,
-0.0355212539434433,
-0.7659898400306702,
-0.1691037118434906,
0.3061317503452301,
-0.04607720673084259,
0.0298025123775... | |
Question regarding how to setup dbase relationships (newbie, this may be trivial)
Followed the django tutorial (Poll, Choices); understood that 1 Poll has many Choice(s), therefore many Choice(s) point to a single Poll.
```
class Poll(models.Model):
question = models.CharField(max_length=200)
...
c... | [
0.0784522294998169,
-0.05725536122918129,
0.014798829331994057,
0.21530598402023315,
-0.07589321583509445,
0.21772603690624237,
-0.020193537697196007,
-0.5314822793006897,
-0.005916753318160772,
-0.7208602428436279,
-0.1192723736166954,
0.16055727005004883,
-0.232826367020607,
0.1853412836... | |
have 1+ phone\_number(s).
I want a person to have 1+ phone\_number(s).
I may want other tables to have 1+ phone\_number(s).
If I followed the Poll/Choice approach, then my problem is indicated by the question marks shown below under PhoneNumber.
```
class Person(models.Model):
firstname = models.CharField... | [
-0.37015241384506226,
-0.015194161795079708,
0.24296903610229492,
-0.11653971672058105,
0.4131270945072174,
0.29554322361946106,
0.09793633967638016,
-0.28879278898239136,
-0.09897312521934509,
-0.8677716851234436,
-0.32457706332206726,
0.6896505355834961,
-0.2658237814903259,
-0.054768029... | |
Person and Place inherit from the same base class. But I may have other fields besides phone\_number for which I have a similar situation, and which span a different subset of tables. E.g.
```
phone_number(s) comments
--------------- --------
Person yes no
... | [
-0.4585112929344177,
0.18817590177059174,
0.01459577213972807,
-0.0899629071354866,
0.21496565639972687,
-0.06195444613695145,
0.0783286765217781,
0.31833088397979736,
-0.022952325642108917,
-0.5609391927719116,
-0.45682957768440247,
0.13244926929473877,
-0.022088520228862762,
0.3488540351... | |
yes yes
Contract no yes
...
```
Any advice on how to correctly design these types of relationships would be greatly appreciated. Thank you.
I think you're looking for [Generic Relations](http://www.djangoproject.com/documentation/models/generic_relations/). [Also here](http://do... | [
0.5211174488067627,
0.4274384081363678,
0.6915071606636047,
-0.08976881951093674,
-0.2129306197166443,
-0.19544383883476257,
-0.09360308945178986,
-0.24327051639556885,
-0.13099344074726105,
-0.17792382836341858,
-0.07824871689081192,
0.5703675746917725,
-0.26669153571128845,
0.15548741817... | |
`myInput.value` is one keystroke behind when I examine it in a `keyPress` event handler. So if the users types "a", `myInput.value` gives me "". Then when the user types "b", `myInput.value` gives me "a", and so on. The value doesn't seem to get updated with the character input by the keystroke that triggered the event... | [
-0.03585321456193924,
0.026244865730404854,
-0.08761580288410187,
-0.2651412785053253,
-0.04130636155605316,
0.008093967102468014,
0.24088320136070251,
-0.04074136167764664,
-0.038305237889289856,
-0.38109076023101807,
-0.01322482991963625,
0.49225741624832153,
-0.11391877382993698,
0.1018... | |
I need to create an administrative site for managing my web site's db. I don't want to build this myself, I simply want the framework in place so that I can add customization myself after it is in place.
Django has a great auto-generated admin. What's an equivalent auto-generated admin site built under asp.net?
<http:... | [
0.21995621919631958,
0.19418904185295105,
0.16056722402572632,
-0.035742729902267456,
-0.24267153441905975,
-0.2202298492193222,
-0.25943300127983093,
0.13140054047107697,
-0.42430379986763,
-0.5631353259086609,
0.09582449495792389,
0.45967069268226624,
-0.11188188940286636,
-0.08054238557... | |
The following HTML looks as required in Firefox 2 & 3 and IE7. The `Left` button is on the left, the `Right` button is on the right, and the text in the middle is...in the middle!
However on IE6 the `Left` button is misaligned - it appears center-aligned.
Can anyone suggest why??
```
<!DOCTYPE html PUBLIC "-//W3C//D... | [
-0.23853552341461182,
0.001306738588027656,
0.83383709192276,
-0.21463048458099365,
-0.14739660918712616,
-0.07327064871788025,
-0.20556651055812836,
-0.252682089805603,
-0.014268026687204838,
-0.8007197380065918,
-0.6044337153434753,
0.3561120927333832,
-0.3680131137371063,
-0.26126578450... | |
color: #fff;
background-color: #484848;
position: relative;
text-align: center;
}
DIV#Footer INPUT
{
margin: 5px 15px;
position: | [
-0.5364132523536682,
-0.0035830221604555845,
0.4150097966194153,
0.044021494686603546,
0.24094849824905396,
0.3604017198085785,
-0.2507009506225586,
0.10095830261707306,
-0.23532027006149292,
-0.5456562638282776,
-0.016718603670597076,
0.17004962265491486,
0.02126491069793701,
0.0882416218... | |
absolute;
top: 0px;
}
DIV#Footer INPUT.right
{
right: 0px;
}
DIV#Footer INPUT.left
{
left: 0px;
} | [
-0.38620099425315857,
-0.2599504292011261,
0.7579740881919861,
-0.11343146115541458,
0.32952722907066345,
0.16353760659694672,
0.09556831419467926,
-0.14197146892547607,
0.16960372030735016,
-0.43467605113983154,
-0.15073126554489136,
0.8259454965591431,
-0.0252176932990551,
0.004798460751... | |
</style>
</head>
<body>
<div id="Footer">
<input class="left" type="button" value="Left" />
Some text in the middle
<input class="right" type="button" value="Right" />
</div>
</body>
</html>
```
(I have been using the IE Developer tool to try and analyse and fix this, to no avail...)
Y... | [
0.3000190258026123,
-0.021103190258145332,
0.7118067741394043,
0.009024068713188171,
0.12185781449079514,
-0.23257240653038025,
-0.19111262261867523,
-0.058537647128105164,
-0.2082393914461136,
-0.7509927153587341,
-0.04296441748738289,
0.34458690881729126,
0.07511907815933228,
-0.04922190... | |
<title>Layout problem!</title>
<style type="text/css">
div#footer
{
padding: 10px;
color: #fff;
background-color: #484848;
position: relative;
text-align: center; | [
-0.5499551296234131,
0.16754397749900818,
0.5649070739746094,
0.013981611467897892,
0.12293098866939545,
0.23693886399269104,
-0.1655808389186859,
-0.10623006522655487,
-0.2106306552886963,
-0.49113544821739197,
-0.4415554106235504,
0.3377813994884491,
-0.18470652401447296,
-0.005674107931... | |
zoom: 1;
}
div#footer input
{
margin: 5px 15px;
position: absolute;
top: 0;
}
div#footer input.right
{ | [
-0.32783186435699463,
-0.3589516580104828,
0.67219477891922,
-0.048668380826711655,
0.12986023724079132,
0.0870925784111023,
-0.07415702939033508,
0.022119902074337006,
-0.0031301022972911596,
-0.35593220591545105,
0.059762515127658844,
0.6273655891418457,
0.07140570878982544,
-0.301121950... | |
right: 0;
}
div#footer input.left
{
left: 0;
}
</style>
</head>
<body>
<div id="footer">
<input class="left" type="button" value="Left">
Some text in the middle
<input class="right" type="button" value="Right">
</div>
</body>
</html>
```
... | [
-0.43996521830558777,
-0.2580831050872803,
0.6239199638366699,
-0.11007452756166458,
0.16436293721199036,
-0.02314586192369461,
-0.22068756818771362,
-0.07942799478769302,
0.0553283654153347,
-0.8057035207748413,
-0.38040217757225037,
0.25485557317733765,
0.104018434882164,
-0.167368829250... | |
elements have two different layout behaviors, one if `hasLayout` is `true`, and another if it's `false`. Making sure that it's set to `true` can fix a lot of weird layout issues like this one. | [
0.07129751890897751,
-0.08221805840730667,
0.14373135566711426,
0.25455203652381897,
0.2621413469314575,
-0.04304204136133194,
0.3748391568660736,
-0.33341068029403687,
-0.14891481399536133,
-0.5682157278060913,
0.0008789414423517883,
0.3715042173862457,
-0.148334801197052,
-0.145638123154... | |
I have spent too much time on this problem and am beginning to think that it
can't be done in Django. I am pulling a list of pathogen names from a postgres
database to a drop down box. The user selects the pathogen, which requires the id
to be passed back through django to the database for further retrieval of
more da... | [
0.3379076421260834,
0.0467650331556797,
0.1685667335987091,
-0.1863478720188141,
-0.03456408903002739,
-0.02386646345257759,
-0.03467746078968048,
0.0687079131603241,
0.13584543764591217,
-0.8028426170349121,
0.5306949019432068,
0.21241320669651031,
-0.3595814108848572,
0.5491339564323425,... | |
Has anyone written something similar and
found a solution?
Max
The id of the select tag in your HTML does not need to have any knowledge of your pathology records. Your code is correct, except for the lack of closing select tag.
Your Django view that is mapped to the /pathology/ action URL needs to handle the POST m... | [
0.5500860214233398,
0.006571159232407808,
0.29804667830467224,
0.28109002113342285,
-0.05486384779214859,
-0.0313185378909111,
0.2988682985305786,
-0.242880180478096,
-0.10250941663980484,
-0.6871278882026672,
0.20982962846755981,
0.3093574345111847,
-0.35066986083984375,
0.217629149556159... | |
you need to use in the request.POST['...'] call is based on the name you've given your select element, in this case 'pathology'. | [
0.44325095415115356,
-0.04077960550785065,
0.2202398031949997,
-0.10665670782327652,
0.26092928647994995,
-0.11550424247980118,
-0.25915420055389404,
-0.1332695484161377,
0.25040149688720703,
-0.3517201244831085,
-0.1360887885093689,
0.12692196667194366,
-0.4052927494049072,
0.216711416840... | |
What is the most correct regular expression (regex) for a UNIX file path?
For example, to detect something like this:
```
/usr/lib/libgccpp.so.1.0.2
```
It's pretty easy to make a regular expression that will match most files, but what's the best one, including one that can detect escaped whitespace sequences, and ... | [
0.059434834867715836,
-0.009982410818338394,
0.1841035634279251,
0.2852819263935089,
-0.03600337356328964,
-0.3286624252796173,
-0.06265826523303986,
0.1538827121257782,
-0.14369024336338043,
-0.4653315246105194,
-0.03273056820034981,
0.7773709297180176,
-0.3205103278160095,
-0.15332923829... | |
is the name-separator character). The better approach would be to resolve the given path using the appropriate file IO function (e.g. [`File.exists()`](http://java.sun.com/javase/6/docs/api/java/io/File.html#exists()), [`File.getCanonicalFile()`](http://java.sun.com/javase/6/docs/api/java/io/File.html#getCanonicalFile(... | [
-0.27064841985702515,
-0.011283057741820812,
0.34166818857192993,
-0.05866838991641998,
-0.1468278020620346,
0.33942297101020813,
0.11069411784410477,
-0.2068389505147934,
-0.032438039779663086,
-0.6332254409790039,
-0.2706483006477356,
0.3045443296432495,
0.01884220913052559,
0.0137210544... | |
all filesystems*.
In Windows, the following [reserved device names](http://msdn.microsoft.com/en-us/library/aa365247.aspx) are also not permitted as filenames:
```
CON, PRN, AUX, NUL, COM1, COM2, COM3, COM4, COM5,
COM6, COM7, COM8, COM9, LPT1, LPT2, LPT3, LPT4,
LPT5, LPT6, LPT7, LPT8, LPT9
``` | [
-0.11616642028093338,
-0.09448040276765823,
0.5046658515930176,
0.14173752069473267,
0.46464410424232483,
0.36697012186050415,
-0.2081983983516693,
0.5223539471626282,
-0.5258199572563171,
-0.7661322951316833,
-0.5016747117042542,
0.5110875368118286,
-0.25396010279655457,
0.302987039089202... | |
I'm given a filename and I have to be able to read it from disk and send its contents over a network. I need to be able to determine whether the file is text or binary so I know whether to use a StreamReader or BinaryReader. Another reason why I need to know the content type is because if it is binary, I have to MIME e... | [
0.6599991321563721,
-0.05812370032072067,
0.21481646597385406,
0.21107840538024902,
0.19391179084777832,
-0.08596239984035492,
-0.008435449562966824,
0.1379777193069458,
-0.3306722640991211,
-0.6323045492172241,
-0.20647069811820984,
0.4834505021572113,
0.22711122035980225,
0.3533851802349... | |
your best hint at the content type of a file.
It's not perfect, but I've used the following with some success:
```
private static string GetContentTypeFromRegistry(string file)
{
RegistryKey contentTypeKey = Registry.ClassesRoot.OpenSubKey(@"MIME\Database\Content Type");
foreach (string keyName in contentTyp... | [
-0.05365515500307083,
-0.10713867843151093,
0.579471230506897,
0.019115025177598,
0.4361821115016937,
-0.24458621442317963,
0.4857746958732605,
-0.21097703278064728,
0.3951539397239685,
-0.9845055341720581,
-0.08812598139047623,
0.49919289350509644,
-0.0016560619696974754,
0.07234416157007... | |
RegistryKey contentTypeKey = Registry.ClassesRoot.OpenSubKey(@"MIME\Database\Content Type\" + contentType);
if (contentTypeKey != null)
{
string extension = (string)contentTypeKey.GetValue("Extension");
if (extension != null)
{
return extension;
}
}
return ... | [
-0.11652547121047974,
-0.023425018414855003,
0.6987733840942383,
-0.21894623339176178,
0.46080029010772705,
-0.06078474223613739,
0.2846127450466156,
-0.19396241009235382,
0.12223278731107712,
-0.7607659697532654,
-0.6429287791252136,
0.34284207224845886,
-0.4364740252494812,
0.52000516653... | |
In the "Embed...Character Embedding" window in the Flash environment, you can select to embed Japanese Kanji. Does anyone know of a way to embed the same using a `TextField` created with Actionscript?
Actually, I ended up finding out that the best way to support Kanji (in my case) was to *not* embed the font at all and... | [
0.2545686364173889,
0.1673305779695511,
-0.21006937325000763,
-0.08642248064279556,
-0.2742690443992615,
0.13835328817367554,
0.25782790780067444,
0.29455485939979553,
0.13894961774349213,
-0.8632186651229858,
-0.04067659005522728,
0.6547266840934753,
-0.13905812799930573,
-0.2206332385540... | |
> **Possible Duplicate:**
>
> [C++ HTML template framework, templatizing library, HTML generator library](https://stackoverflow.com/questions/355650/c-html-template-framework-templatizing-library-html-generator-library)
Planning to write a website in C++. Would like to use a template system like Clearsilver, but ma... | [
0.5418012738227844,
-0.2982676029205322,
0.26478487253189087,
-0.07621113210916519,
-0.1818578541278839,
-0.15516901016235352,
0.276943564414978,
0.070646733045578,
-0.05319535732269287,
-0.742048978805542,
-0.3259514570236206,
0.21195314824581146,
-0.26505616307258606,
-0.1187607720494270... | |
I really want to put a little question mark image next to some of the input fields on my for so the user can click and get a little box to come up and provide some help text. A tooltip might work for this too. Here is what I would like:
1. Script for having a little text area pop up when user clicks on an image (not a... | [
0.4959532916545868,
-0.04433351010084152,
-0.001142337336204946,
0.22857880592346191,
-0.14007769525051117,
-0.017666971310973167,
-0.07517952471971512,
0.12029490619897842,
-0.15053842961788177,
-0.6921072602272034,
0.39243754744529724,
0.5841166377067566,
0.0202848669141531,
-0.241996780... | |
if you don't mind it appearing on hover instead of on click. Try this:
```
<html>
<head>
<style type='text/css'>
a.helpAnchor {
position:relative;
text-decoration:none;
}
a.helpAnchor .helpIcon {
position:absolute;
text-align:center;
font-size:24px;
... | [
-0.6424071192741394,
-0.20277592539787292,
0.9788304567337036,
0.03018481470644474,
0.10448216646909714,
0.20811086893081665,
0.21604955196380615,
-0.01577780768275261,
0.047970931977033615,
-0.471627414226532,
-0.6794188618659973,
0.5783408880233765,
-0.18514378368854523,
-0.4051655232906... | |
height:30px;
color:#ff0;
background-color:#88f;
}
a.helpAnchor .helpText {
display:none;
}
a.helpAnchor:hover .helpText {
display:block;
position:absolute;
width:150px;
top:10px;
left:20px; | [
-0.6152693033218384,
-0.17078465223312378,
0.7480681538581848,
-0.14072850346565247,
-0.03020826354622841,
0.1931057572364807,
0.2447262555360794,
-0.05757782980799675,
-0.004920960403978825,
-0.36599281430244446,
-0.8711541295051575,
0.42568114399909973,
-0.00343426619656384,
-0.487372279... | |
background-color:#eff;
color:black;
border:1px solid black;
}
</style>
</head>
<body>
<a href="#" class="helpAnchor">
<div class="helpIcon">?</div>
<div class="helpText">
<h1>Help Text</h1>
<p>This text is very helpful!</p>
<p>And so is this!</p>
... | [
-0.2812933921813965,
-0.22796621918678284,
0.5798890590667725,
0.136074960231781,
0.08063206076622009,
0.03980628028512001,
0.16332542896270752,
-0.06649962067604065,
-0.27400022745132446,
-0.585730254650116,
-0.4576902985572815,
0.4640798270702362,
-0.255449503660202,
-0.6167961359024048,... | |
</a>
</body>
</html>
```
It would look better - and simplify the CSS - if the question mark icon was an image.
The CSS for the help text also needs adjusting for taste. | [
0.2685360014438629,
0.24134767055511475,
0.5429372191429138,
0.01203988678753376,
-0.31599271297454834,
0.04918677732348442,
0.0835246741771698,
-0.06935013085603714,
0.17479413747787476,
-0.6167773008346558,
0.005503485444933176,
0.5607851147651672,
0.09626509994268417,
-0.404299914836883... | |
In many places in msdn documentation you can find references to App\_Data directory. For example [here](http://msdn.microsoft.com/en-us/library/system.web.security.authorizationstoreroleprovider.aspx) we can read:
> To improve security when using a local data file in an ASP.NET application, you should store the data f... | [
0.25488075613975525,
0.17110472917556763,
0.4146156311035156,
0.23686961829662323,
0.09926876425743103,
-0.2401854544878006,
0.23987919092178345,
-0.08689262717962265,
-0.4276523292064667,
-0.8184736371040344,
-0.32715773582458496,
0.4765273630619049,
-0.23191027343273163,
0.04214512929320... | |
are protected by a forbidden file handler. That is safe so long as everything is running. There are possibilities that the ASP.NET handlers can go down leaving only IIS running. In those cases your web.config files and aspx files will be served as straight text files.
If you data isn't really sensitive, it is a good ... | [
0.536414623260498,
-0.14443640410900116,
0.1829756647348404,
0.35842186212539673,
-0.05878375470638275,
-0.41757914423942566,
0.5390428900718689,
-0.093532495200634,
-0.5741812586784363,
-0.625390887260437,
-0.17574889957904816,
0.3070307970046997,
-0.4572867453098297,
0.36464419960975647,... | |
typically find this file on your machine at C:\Windows\Microsoft.NET\Framework\v2.0.50727\CONFIG
I couldn't find too much info about bringing down asp.net while still leaving iis running, but if you google around for terms like "asks to download aspx" or something like that you can find reports of people having issues... | [
0.3300042152404785,
0.10553086549043655,
0.023052921518683434,
0.274551123380661,
0.05323539674282074,
-0.5295999050140381,
0.4110763967037201,
0.3749663233757019,
-0.31806978583335876,
-0.8499458432197571,
-0.018358271569013596,
0.5269526243209839,
-0.22105801105499268,
0.0654978901147842... | |
I need a tool or method that allows the transfer of data and automatically updates the foreign keys at the destination table.
The SET IDENTITY\_INSERT ON/OFF is not what I'm looking for.
Example:
```
table master (id int identity, name char)
table slave (id int identity, master_id int, name char)
```
I would like... | [
0.13641798496246338,
0.1143563762307167,
-0.07639285922050476,
-0.036611348390579224,
0.23797295987606049,
0.07980457693338394,
-0.020835477858781815,
-0.1862705647945404,
-0.004066056571900845,
-0.9108433723449707,
0.03761954978108406,
0.5614628195762634,
-0.3659536838531494,
0.1794309914... | |
what is the new value of the master\_id, in order to keep the same relation as in the original table.
@John Sansom: right on the money
@pv2008:
```
create proc InsertAndUpdate
@parentName varchar(255),
@childName varchar(255)
as
declare @newParentId int
insert into PARENT values (@parentName)
select @newParentId = S... | [
0.16978326439857483,
0.02468438819050789,
0.39245685935020447,
-0.17414967715740204,
0.5031616687774658,
0.3594185411930084,
-0.19475866854190826,
-0.32769331336021423,
-0.2922610938549042,
-0.26801010966300964,
0.24174363911151886,
0.41400349140167236,
-0.09925607591867447,
0.200804084539... | |
Given the following xml:
```
<rootnode>
<childnode arg="a">Content A</childnode>
<childnode arg="b">Content A</childnode>
</rootnode>
```
Using [XMLPoke](http://nant.sourceforge.net/release/0.86-beta1/help/tasks/xmlpoke.html) with the following XPath:
```
rootnode/childnode[arg='b']
```
The result (if the r... | [
-0.2772151827812195,
0.03577407822012901,
0.45487040281295776,
-0.08860336989164352,
0.013503923080861568,
0.3444468677043915,
-0.16781604290008545,
-0.25038373470306396,
-0.14874497056007385,
-0.35679012537002563,
-0.6385913491249084,
0.015523234382271767,
-0.14199818670749664,
0.11190754... | |
to edit the contents of a specific node or attribute. There isn't an elegant way to remove a child node as per the question using only the standard *Nant* targets. It **can** be done using some inelegant string manipulation using properties in Nant, but **why** would you want to?
The best way to do this is to write a ... | [
-0.05781109258532524,
-0.28291893005371094,
0.19711390137672424,
0.13221991062164307,
-0.17707157135009766,
0.18745151162147522,
-0.03359423577785492,
-0.2909456193447113,
-0.28004252910614014,
-0.891716718673706,
0.0562484972178936,
0.3113936483860016,
-0.33156275749206543,
0.111764073371... | |
= false)]
public string XPath { get; set; }
[TaskAttribute("file", Required = true)]
public FileInfo XmlFile { get; set; }
protected override void ExecuteTask()
{
string filename = XmlFile.FullName;
Log(Level.Info, "Attempting to load XML document in fil... | [
0.3020288050174713,
-0.2652255892753601,
0.48432400822639465,
-0.16279803216457367,
0.3764423131942749,
-0.25012263655662537,
0.20913292467594147,
-0.3094072639942169,
0.08398354053497314,
-0.36602458357810974,
-0.5858302116394043,
0.7531042695045471,
-0.36647066473960876,
-0.0129755502566... | |
XmlDocument document = new XmlDocument();
document.Load(filename);
Log(Level.Info, "XML document in file '{0}' loaded successfully.", filename );
XmlNode node = document.SelectSingleNode(XPath);
if(null == node)
{ | [
-0.1180001050233841,
-0.30683544278144836,
0.6741796135902405,
0.005221397615969181,
0.2470388412475586,
-0.2320125252008438,
-0.1542946696281433,
-0.2646680474281311,
-0.1365433931350708,
-0.6300258040428162,
-0.5231520533561707,
0.40779125690460205,
-0.13819703459739685,
0.21050955355167... | |
throw new BuildException(String.Format("Node not found by XPath '{0}'", XPath));
}
node.ParentNode.RemoveChild(node);
Log(Level.Info, "Attempting to save XML document to '{0}'.", filename );
document.Save(filename);
Log(Level.Info, "XML document successfully... | [
0.1545577496290207,
0.2388269454240799,
0.11686700582504272,
-0.2765633761882782,
0.13246048986911774,
0.052438002079725266,
0.6907610893249512,
-0.452944815158844,
0.08071213960647583,
-0.681183397769928,
-0.2504769563674927,
0.5485984086990356,
-0.07767799496650696,
0.2735957205295563,
... | |
the above with a modification to the *NAnt.exe.config* file to load the custom target and the following script in the *build* file:
```
<xmlstrip xpath="//rootnode/childnode[@arg = 'b']" file="target.xml" />
```
This will remove the *childnode* with an argument *arg* with value *b* from *target.xml*. Which is what I... | [
0.48205921053886414,
0.14043594896793365,
0.21615654230117798,
-0.2732861340045929,
-0.058996688574552536,
0.2994212806224823,
0.0728536918759346,
-0.1995973438024521,
-0.1676894724369049,
-0.5700223445892334,
0.2985430359840393,
0.5920531153678894,
-0.2272142767906189,
0.24099862575531006... | |
How did you go about this:
1. did you use exe and dlls or created a cab file?
2. as far as deployment goes, did you implement a web service updater or use a third party deployment tool?
Definitely go with CAB and MSI files. See this [great article](http://msdn.microsoft.com/en-us/library/aa446504.aspx) in MSDN for det... | [
0.4541572332382202,
-0.24333789944648743,
0.051768429577350616,
0.24514783918857574,
-0.23241297900676727,
-0.28569677472114563,
0.07081495225429535,
-0.26657870411872864,
-0.29104164242744446,
-0.6462729573249817,
0.1441248655319214,
0.6177040338516235,
-0.3767445981502533,
-0.10905464738... | |
wont install in an incompatible platform.
With a little bit of more effort you can create a MSI installer. In it you can bundle more than one CAB files, one for every platform you want to support. Since you are not using ActiveSync, this is not much of an option for you.
For updating applications, this is another [go... | [
0.21529550850391388,
0.10646011680364609,
0.25937220454216003,
0.11448424309492111,
-0.011299999430775642,
-0.043347980827093124,
0.23438650369644165,
-0.07862860709428787,
-0.03097665123641491,
-0.7165655493736267,
0.000619616184849292,
0.569899320602417,
-0.5085957050323486,
-0.008427848... | |
air. | [
0.10245814174413681,
0.20816515386104584,
0.273188978433609,
0.3052726089954376,
-0.3439282178878784,
-0.3535628318786621,
-0.1433258354663849,
-0.3150671422481537,
0.1143851950764656,
-0.7641901969909668,
-0.6149358749389648,
0.25466418266296387,
-0.32601824402809143,
0.2851918637752533,
... | |
I know from reading [Microsoft documentation](https://learn.microsoft.com/dotnet/api/system.idisposable) that the "primary" use of the `IDisposable` interface is to clean up unmanaged resources.
To me, "unmanaged" means things like database connections, sockets, window handles, etc. But, I've seen code where the `Disp... | [
0.3321147859096527,
0.10187146067619324,
-0.11419142782688141,
0.18051265180110931,
0.06963568925857544,
-0.2760539650917053,
0.10684973746538162,
-0.255018949508667,
-0.22022247314453125,
-0.7982026934623718,
-0.22522985935211182,
0.5168348550796509,
-0.5416513085365295,
0.200934633612632... | |
public void Dispose()
{
_theList.clear();
_theDict.clear();
_theList = null;
_theDict = null;
}
}
```
My question is, does this make the garbage collector free memory used by `MyCollection` any faster than it normally would?
---
**Edit**: So far people have posted some good e... | [
0.2837054431438446,
-0.02695014514029026,
0.02436811849474907,
0.12347561866044998,
0.013929883018136024,
-0.3143302798271179,
0.30625006556510925,
-0.1803705394268036,
-0.270283579826355,
-0.47577887773513794,
0.01763331890106201,
0.4156718850135803,
-0.5329733490943909,
0.376860588788986... | |
and you wanted to free that memory *now*, rather than waiting for the garbage collector. Would the above code accomplish that?
The point of Dispose **is** to free unmanaged resources. It needs to be done at some point, otherwise they will never be cleaned up. The garbage collector doesn't know **how** to call `DeleteHa... | [
0.3569214344024658,
-0.13516703248023987,
-0.1253160834312439,
0.23555533587932587,
0.028040878474712372,
-0.2921395003795624,
0.15314805507659912,
-0.3061892092227936,
-0.3677162528038025,
-0.7534323334693909,
-0.16748766601085663,
0.36702626943588257,
-0.07105155289173126,
0.343005985021... | |
calls to get outside of the nice comfy world of everything available to you in the .NET Framework is unmanaged – and you're now responsible for cleaning it up.
The object that you've created needs to expose *some* method, that the outside world can call, in order to clean up unmanaged resources. The method can be name... | [
0.2021629363298416,
0.0019442717311903834,
0.2308628261089325,
0.010019435547292233,
-0.06302547454833984,
-0.19470897316932678,
0.29824158549308777,
-0.16459883749485016,
-0.1927933543920517,
-0.5258306264877319,
-0.354267418384552,
0.7119544744491577,
-0.6852227449417114,
0.2851788699626... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.