text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
I have plans to create a simple bot for a game I run and have it sit on MSN and answer queries. I want to use Python to do this and googled around and found [MSNP](http://msnp.sourceforge.net/). I thought "great" and "how awesome" but it appears that it's about 5 years old and oddly enough doesn't connect to MSN as the... | [
0.3850241005420685,
0.08268005400896072,
0.4499431550502777,
0.06976629048585892,
0.07558774948120117,
-0.3443971276283264,
0.2937040328979492,
0.2661048173904419,
-0.2431299239397049,
-0.909956693649292,
-0.03507184237241745,
0.5598553419113159,
-0.1715455949306488,
0.3070562481880188,
... | |
To keep my integration tests independent I remove all old data and insert new test data before each test. Is there a better way of doing this than simply querying for all entities and deleting them one by one?
I have considered writing a stored proc that runs "delete from *tablename*;" for each table that is to be cle... | [
0.00823418889194727,
0.18241268396377563,
0.31909844279289246,
-0.16541175544261932,
-0.15728677809238434,
0.1335698366165161,
0.404583215713501,
-0.2813832461833954,
-0.1426338106393814,
-0.34105321764945984,
0.27941444516181946,
0.4131022095680237,
-0.19869306683540344,
0.265938788652420... | |
don't want to use Active Record for this project.
Any ideas?
Thanks /Erik
**UPDATE:**
Since this question was asked and answered, progress has been made by the NHibernate team. As Ayende explains in [this blog post](http://ayende.com/Blog/archive/2009/05/28/nhibernate-ndash-executable-dml.aspx), you can now execute... | [
-0.15436159074306488,
0.1796407699584961,
0.5575026273727417,
-0.20256617665290833,
-0.48194801807403564,
-0.03392387554049492,
0.23838841915130615,
-0.360752671957016,
-0.24802614748477936,
-0.30017733573913574,
0.1408979892730713,
0.6001964807510376,
-0.3738347291946411,
0.32716211676597... | |
like these do not affect the level 1 cache.
In the TearDown of my UnitTests, I mostly do this:
```
using( ISession s = ... )
{
s.Delete ("from Object o");
s.Flush();
}
```
This should delete all entities.
If you want to delete all instances of one specific entity, you can do this:
```
using( ISession s = ....... | [
-0.15276062488555908,
0.026252606883645058,
0.31235310435295105,
-0.05794629454612732,
0.0625154972076416,
0.05786911025643349,
0.32964643836021423,
-0.07050957530736923,
-0.20312027633190155,
-0.8334928154945374,
-0.1898007094860077,
0.5483314394950867,
-0.39846932888031006,
0.39044836163... | |
Is Dynamic SQL more vulnerable to SQL Injection/hacking?
If yes, how to prevent?
If you use parameters instead of string concatenation to specify your filter-criteria, then it should not be vulnerable for Sql injection.
For instance:
do this:
```
string sqlQuery = "SELECT * FROM Persons WHERE Persons.Name LIKE @nam... | [
-0.3795156478881836,
-0.5822005271911621,
0.180432990193367,
-0.02557714283466339,
-0.3614117205142975,
0.09653652459383011,
0.2575603425502777,
-0.08149055391550064,
-0.41235172748565674,
-0.43743929266929626,
0.03729584440588951,
0.7232173085212708,
-0.7135521769523621,
0.249422341585159... | |
use in stored procedures for instance.
There, you can create a dynamic sql statement that uses parameters as well; You should then execute the dynamic statement using `sp_executesql` which enables you to specify parameters. | [
0.34845098853111267,
-0.20961102843284607,
0.1613267958164215,
0.1468924880027771,
0.07326628267765045,
-0.04030479118227959,
-0.013887723907828331,
-0.2558521032333374,
-0.5980987548828125,
-0.4095395505428314,
-0.06643963605165482,
0.4335421621799469,
-0.44702014327049255,
-0.15193137526... | |
say we have simple asp.net repeater,
in a row we have one checkbox, one label (database-id of the record) and not visible (used for postback) and one text (in a tabelcell)
now i want to make it like in windows, if you click on the text, the checkbox should be selected or deselected.
has somebody a link or solution f... | [
0.3017215430736542,
-0.20474840700626373,
0.23015739023685455,
0.2380792796611786,
-0.05352016165852547,
-0.22010836005210876,
0.042136240750551224,
-0.014924811199307442,
-0.4459187686443329,
-0.7838146686553955,
0.1673612743616104,
0.4183383584022522,
-0.2845589816570282,
0.3291344642639... | |
repeater. therefore the label solution does also not really work.
assume that you wont't need jQuery and the table-construct
```
<asp:Repeater runat="server">
<ItemTemplate>
<asp:CheckBox runat="server" Text="your text" />
</ItemTemplate>
</asp:Repeater>
```
this renders basically the solution provid... | [
0.1053762137889862,
-0.13228081166744232,
0.4573320150375366,
0.19124627113342285,
-0.09102899581193924,
-0.10035014897584915,
0.21631157398223877,
-0.19176460802555084,
-0.14922478795051575,
-0.4951484799385071,
0.3447703719139099,
0.665378749370575,
-0.32046398520469666,
0.12826097011566... | |
<table>
</HeaderTemplate>
<ItemTemplate>
<tr>
<td><asp:Checkbox runat="server" ID="checkbox" /></td>
<td><asp:Label runat="server" AssociatedControlID="checkbox">Your text</asp:Label></td>
</tr>
</ItemTemplate>
<FooterTemplate>
</table>
</FooterTemplat... | [
0.012657547369599342,
-0.0058554657734930515,
0.5034794807434082,
0.022730756551027298,
-0.2009965032339096,
0.2641300857067108,
0.08340344578027725,
-0.5134317874908447,
-0.3985092341899872,
-0.5888985395431519,
-0.03843209519982338,
0.30241140723228455,
-0.04107530415058136,
0.0951447710... | |
I'm a C# developer working with either Windows Forms or WPF.
Sometimes I have to deal with unmanaged code, which I don't like.
I think that the main reason why I dislike this is ignorance. I don't know the underlying Win API.
I think that I'm not the only person who has negative feelings against unmanaged Windows code... | [
0.6560971140861511,
0.3759024441242218,
-0.22765301167964935,
-0.08075760304927826,
-0.2768562436103821,
-0.2540150582790375,
0.24669714272022247,
0.0001107020943891257,
-0.04008197784423828,
-0.5172098875045776,
0.09749308228492737,
0.6084545254707336,
-0.04199573025107384,
0.049329750239... | |
are looking at WPF in parallel to Silverlight.
It might be marginally useful **occasionally** for winforms - but I've been writing winforms for years, and have only once or twice needed lower level details. Every time I did, "google" did the job fine; or more recently, stackoverflow ;-p
If you were writing raw window... | [
0.42388439178466797,
0.09100344032049179,
0.35093027353286743,
0.08144236356019974,
-0.34850960969924927,
-0.24671822786331177,
-0.06720970571041107,
0.2725306451320648,
-0.336576908826828,
-0.5925596356391907,
0.1693813055753708,
0.5516399145126343,
0.13088035583496094,
-0.162510216236114... | |
I have a data template that is defined in a XAML file. The root of the XAML is **not** a resource dictionary but the data template itself. Now I want to add this data template to the resources of a control. Unfortunately, I don't know what key to use.
```
myControl.Resources.Add(???, dataTemplate);
```
Although I us... | [
0.5402628779411316,
0.17218919098377228,
0.19523943960666656,
0.2226870208978653,
0.007090481463819742,
-0.26626911759376526,
0.08660703152418137,
-0.15066662430763245,
-0.07723061740398407,
-0.6996620893478394,
0.03358551859855652,
0.5221254825592041,
-0.31014642119407654,
0.1130737885832... | |
I did a little bit of debugging. Here is the correct code
```
myControl.Resources.Add(new DataTemplateKey(typeof(...)), dataTemplate);
```
A key point of scrum is that it's not written in stone -- you should adapt it to whatever works best in your organization. However, the daily standup meeting is meant to be *short... | [
0.3626331388950348,
0.27312609553337097,
0.13400624692440033,
-0.08272407203912735,
-0.17242403328418732,
-0.31265392899513245,
0.151114821434021,
0.056827984750270844,
-0.03689682483673096,
-0.30334609746932983,
0.12133211642503738,
0.06995898485183716,
-0.26683610677719116,
-0.2028370052... | |
[Ada](http://en.wikibooks.org/wiki/Ada_Programming/Types/range), [Pascal](http://web.mit.edu/sunsoft_v5.1/www/pascal/lang_ref/ref_data.doc.html) and many other languages support ranges, a way to subtype integers.
A range is a signed integer value which ranges from a value (first) to another (last).
It's easy to impleme... | [
0.45769527554512024,
-0.08363515138626099,
0.22818344831466675,
-0.07527817040681839,
-0.3019700050354004,
0.06746362149715424,
-0.13533137738704681,
-0.5664600729942322,
-0.3005037307739258,
-0.26856961846351624,
-0.3027675151824951,
0.5853846073150635,
-0.3211439549922943,
-0.11832559853... | |
( [C# Contracts](http://research.microsoft.com/en-us/projects/contracts/) ), that give a more general solution.
Is there a simpler solution that checks, at least, static out-of-bound assignment at compile time in C++, C# and Java? Some kind of [static-assert](http://en.wikipedia.org/wiki/C%2B%2B0x#Static_assertions)?
... | [
0.5313090682029724,
-0.032999154180288315,
0.1555834412574768,
0.048630233854055405,
-0.06094030663371086,
-0.10642726719379425,
-0.10116361081600189,
-0.7664763331413269,
-0.18866483867168427,
-0.2302282452583313,
-0.00429582642391324,
0.9370080232620239,
-0.1494980901479721,
-0.159124508... | |
a compile error in case of static overflow, something like:
```
volume=rangeInt(0,100);
volume=101; // compile error!
volume=getIntFromInput(); // possible runtime exception
```
Thanks.
Subrange types are not actually very useful in practice. We do not often allocate fixed length arrays, and there is also no reason... | [
-0.12741059064865112,
-0.09858204424381256,
0.33527129888534546,
0.08472628146409988,
-0.22540947794914246,
-0.05325186252593994,
0.23697590827941895,
-0.28136104345321655,
-0.3197479546070099,
-0.4791019856929779,
-0.19996494054794312,
0.4286012053489685,
-0.32906684279441833,
-0.14120408... | |
language.) | [
0.12304823845624924,
0.21508820354938507,
-0.04863867908716202,
-0.5584765076637268,
0.3206946849822998,
0.7859859466552734,
0.6403812170028687,
0.31985345482826233,
-0.4226134121417999,
-0.33209559321403503,
0.10660658031702042,
0.5608842372894287,
-0.2322520762681961,
0.04227660596370697... | |
I understand that the name of selectNode/selectSingleNode methods actually suggests that they are designed to return a node, however maybe there is some other way or a setting available to enable XPath evaluator to return data of other types (that are also valid XPath results)
```
oDocument.selectSingleNode("'1'");
... | [
-0.06649372726678848,
-0.13389834761619568,
0.7684510946273804,
0.019245952367782593,
0.2040601521730423,
-0.014236800372600555,
0.013887842185795307,
-0.11842396855354309,
-0.10058841109275818,
-0.4615798890590668,
-0.1465761363506317,
0.4805562198162079,
-0.1583331674337387,
0.2963802814... | |
an XPath expression.
Their return values are of type `IXMLDOMNode` and `IXMLDOMNodeList`, respectively. Nothing else can be returned.
Expressions that do not return a node set (but otherwise are valid XPath expressions) will result in an error. | [
-0.029881391674280167,
-0.010094339959323406,
0.35860541462898254,
0.12869764864444733,
0.004917353857308626,
-0.08027280122041702,
0.43247172236442566,
0.19894517958164215,
0.25078755617141724,
-0.23960547149181366,
-0.5059316158294678,
0.5828166007995605,
-0.43328461050987244,
0.14199975... | |
I have a table with about 2,000,000 rows. I need to query one of the columns to retrieve the rows where a string exsists as part of the value.
When I run the query I will know the position of the string, but not before hand. So a view which takes a substring is not an option.
As far as I can see I have three options... | [
-0.10473084449768066,
0.04122580960392952,
0.7381687164306641,
-0.12688034772872925,
-0.33205005526542664,
0.36575907468795776,
0.3024594485759735,
-0.1352418065071106,
-0.031031161546707153,
-0.7818214297294617,
0.14727099239826202,
0.4551468789577484,
-0.23443032801151276,
0.237433806061... | |
seconds. Does anyone have experience of which of these options will work best, or if there is another option? The select will be used for deletes every few seconds, it will typically select 10 rows.
**edit with some more info**
The problem comes about as we are using a table for storing objects with arbitrary keys an... | [
0.1645728051662445,
-0.10990196466445923,
0.20369775593280792,
0.04820850491523743,
-0.03745318204164505,
0.16102078557014465,
0.33355337381362915,
0.06836233288049698,
-0.31027504801750183,
-0.8317639231681824,
0.09161040186882019,
0.17632324993610382,
-0.26189732551574707,
0.133855789899... | |
a reliable way to store and retrieve values. To retrieve a row is fairly fast as we are searching the whole of the column, which is indexed. But the performance is not good if we want to retrieve the rows with key2=def.
We may be able to create a table with columns for the most common keys, but I was wondering if ther... | [
0.06554466485977173,
0.14278540015220642,
0.30450406670570374,
0.21365366876125336,
0.06808111071586609,
-0.2241494059562683,
0.40266281366348267,
-0.5822751522064209,
0.21594206988811493,
-0.5533701777458191,
0.06016423553228378,
0.74029940366745,
-0.4481716454029083,
-0.2561294436454773,... | |
will use newly selected index.
You will need as many indices as there are `KEY`s in you data.
Presence of an `INDEX`, of course, impacts performance, but it depends very little on `REGEXP` being there:
```
SQL> CREATE INDEX ix_test ON test (tst_test)
2 /
Index created
Executed in 0,016 seconds
SQL> INSERT
2 I... | [
-0.028492199257016182,
-0.15751886367797852,
0.5170634984970093,
0.3803727328777313,
0.3220767080783844,
0.2575283646583557,
0.3121544122695923,
-0.6020641326904297,
-0.031727176159620285,
-0.9791951179504395,
-0.17994661629199982,
0.35910314321517944,
0.02404968999326229,
0.15497852861881... | |
TABLE test
2 /
Table truncated
Executed in 2,546 seconds
SQL> DROP INDEX ix_test
2 /
Index dropped
Executed in 0 seconds
SQL> CREATE INDEX ix_re_1 ON test(REGEXP_REPLACE(REGEXP_SUBSTR(tst_test, 'KEY1=[^,]*'), 'KEY1=([^,]*)', '\1'))
2 /
Index created
Executed in 0,015 seconds
SQL> INSERT
2 INTO tes... | [
-0.0325019508600235,
-0.10358190536499023,
0.4553508162498474,
0.17900310456752777,
-0.0818471685051918,
0.25385037064552307,
0.5039993524551392,
-0.4425083100795746,
0.09204725921154022,
-0.7544718980789185,
-0.2497538924217224,
0.06042371317744255,
-0.041986122727394104,
0.00789148826152... | |
1000000
7 /
1000000 rows inserted
Executed in 53,375 seconds
```
As you can see, on my not very fast machine (`Core2 4300`, `1 Gb RAM`) you can insert `20000` records per second to an indexed field, and this rate almost does not depend on type of `INDEX` being used: plain or function based. | [
-0.04433634132146835,
0.20772160589694977,
0.23512709140777588,
0.18639716506004333,
0.13559550046920776,
0.33181411027908325,
0.04272998496890068,
0.02882893569767475,
-0.3353617489337921,
-0.6819889545440674,
0.24263696372509003,
0.24838802218437195,
0.008897421881556511,
0.1091373115777... | |
Given this linq query against an EF data context:
```
var customers = data.Customers.Where(c => c.EmailDomain.StartsWith(term))
```
You’d expect it to produce SQL like this, right?
```
SELECT {cols} FROM Customers WHERE EmailDomain LIKE @term+’%’
```
Well, actually, it does something like this:
```
SELECT {cols}... | [
-0.09696373343467712,
0.13562841713428497,
0.7680985927581787,
-0.043427061289548874,
-0.18942900002002716,
-0.23774777352809906,
-0.07769541442394257,
-0.06929143518209457,
-0.07064034789800644,
-0.2922925651073456,
0.15383663773536682,
0.5504239797592163,
-0.12519334256649017,
0.21219623... | |
The reason is, that you ***can*** have some crazy "LIKE" clauses. Example:
```
SELECT * FROM Customer WHERE EmailDomain LIKE 'abc%de%sss%'
```
But, the "CHARINDEX" function (which is basically "IndexOf") ONLY handles finding the first instance of a set of characters... no wildcards are allowed.
So, there's your ans... | [
0.1750645935535431,
0.08560609817504883,
0.1604374349117279,
0.04915269836783409,
-0.1566089242696762,
-0.2514530122280121,
0.43483346700668335,
0.3890704810619354,
0.060677945613861084,
-0.28875428438186646,
-0.13566702604293823,
0.3918827772140503,
-0.503657341003418,
0.2017766535282135,... | |
I have a component which draws a grid of things and I want a small highlight square to follow the mouse around highlighting the square that the mouse is currently over.
The whole grid is basically just one big sprite (it's a very large grid and this was faster than using pre-existing components) and the highlight squa... | [
0.2662811577320099,
-0.17531609535217285,
0.3503650426864624,
-0.042386509478092194,
-0.09539090842008591,
-0.06752427667379379,
-0.19696173071861267,
-0.1675889790058136,
0.0042470586486160755,
-0.7528213858604431,
0.2644272744655609,
0.3599059283733368,
-0.3836044669151306,
0.23986287415... | |
move the highlight square to the right place. I was using localX/localY for this, but as soon as I move the highlight sprite under the mouse, these become local to the highlight and not the grid!
I was toying with stageX/Y as well, but these seemed to become pretty useless when the stage is scrolled or your component ... | [
0.22375373542308807,
-0.16740095615386963,
0.6042048931121826,
-0.18477526307106018,
-0.10558374971151352,
-0.10583951324224472,
-0.0520440936088562,
-0.03068390302360058,
-0.1844109743833542,
-0.6253474950790405,
0.11622388660907745,
0.4109542667865753,
0.020712438970804214,
0.11659955978... | |
what grid element you are over. | [
0.3189312815666199,
-0.042114969342947006,
0.1749170571565628,
-0.04847099632024765,
-0.029683319851756096,
-0.08899730443954468,
-0.1506861001253128,
0.03194877877831459,
-0.17695274949073792,
-0.7301602959632874,
-0.04687799885869026,
0.36180514097213745,
-0.28659936785697937,
0.10658272... | |
Is there any reason to expose an internal collection as a ReadOnlyCollection rather than an IEnumerable if the calling code only iterates over the collection?
```
class Bar
{
private ICollection<Foo> foos;
// Which one is to be preferred?
public IEnumerable<Foo> Foos { ... }
public ReadOnlyCollection<... | [
0.09090795367956161,
0.20629362761974335,
0.3832865357398987,
-0.17416901886463165,
0.13533738255500793,
-0.04971619322896004,
-0.0016688938485458493,
-0.37095943093299866,
-0.11527613550424576,
-0.6611337661743164,
-0.09854552149772644,
0.6243179440498352,
-0.4172843396663666,
0.224777013... | |
then that is the one to use. Is that a proper way of reasoning about it or am I missing something?
Thanks /Erik
**More modern solution**
Unless you need the internal collection to be mutable, you could use the [`System.Collections.Immutable`](https://www.nuget.org/packages/System.Collections.Immutable/) package, chan... | [
0.20849047601222992,
0.13657329976558685,
0.1385665088891983,
0.15941588580608368,
-0.08956392109394073,
-0.21802212297916412,
0.14722521603107452,
-0.08568112552165985,
-0.30459389090538025,
-0.5988650321960449,
-0.3277330696582794,
0.7425014972686768,
-0.1272730678319931,
0.0470397733151... | |
code. If you're in complete control over everything that will ever call this member and you *guarantee* that no code will ever use:
```
ICollection<Foo> evil = (ICollection<Foo>) bar.Foos;
evil.Add(...);
```
then sure, no harm will be done if you just return the collection directly. I generally try to be a bit more ... | [
0.5006251335144043,
0.039693862199783325,
0.10335277765989304,
0.1807565987110138,
-0.052268557250499725,
-0.29581180214881897,
0.6281527876853943,
-0.30828016996383667,
-0.31201696395874023,
-0.35842910408973694,
-0.08606745302677155,
0.5050221085548401,
-0.7290360927581787,
0.07360441237... | |
}
}
```
(There are plenty of other options for wrapping trivially - the nice thing about `Skip` over Select/Where is that there's no delegate to execute pointlessly for each iteration.)
If you're not using .NET 3.5 you can write a very simple wrapper to do the same thing:
```
public static IEnumerable<T> Wrapper<T>... | [
0.32956236600875854,
-0.2532702386379242,
-0.03101164475083351,
-0.09414888173341751,
0.054738834500312805,
-0.15880033373832703,
0.2741493284702301,
-0.2592296302318573,
-0.1219073012471199,
-0.6341516971588135,
-0.13934201002120972,
0.6356641054153442,
-0.3480217754840851,
0.025191267952... | |
I've read mixed reviews of both [Suds](https://fedorahosted.org/suds/) and [ZSI](http://pywebsvcs.sourceforge.net/) -- two Python SOAP libraries. However, I'm unclear whether either of them can support WS-Attachments. I'd prefer to use Suds (appears to be more straightforward), but I'll defer to whichever library suits... | [
0.21740253269672394,
0.08919276297092438,
0.11015889793634415,
0.00581579701974988,
-0.32205724716186523,
-0.15064039826393127,
0.07613559812307358,
-0.036586981266736984,
-0.13609053194522858,
-0.6596973538398743,
0.0796758234500885,
0.34757086634635925,
-0.19737230241298676,
0.2020913064... | |
don't want to implement them yourself, then ZSI is your choice. | [
0.5646119713783264,
0.10275555402040482,
-0.148507758975029,
0.040017131716012955,
-0.07413532584905624,
0.19144931435585022,
-0.05814511328935623,
-0.33552539348602295,
-0.05895219370722771,
-0.3963817358016968,
-0.12866097688674927,
0.48661717772483826,
-0.48157718777656555,
0.0696967393... | |
I've a TreeView that displays hierarchical data, while I select a TreeNode, I generate a series of links that map the path from selected node till root node
Say:
Root Node --> ChildNode --> SelectedNode
What I need is, while clicking any of these links, select required node in TreeView?
I know that selecting a Tree... | [
-0.07690059393644333,
-0.00844621192663908,
0.5793710350990295,
0.12555716931819916,
-0.11684015393257141,
-0.0068276613019406796,
0.35564085841178894,
-0.24982717633247375,
-0.32226207852363586,
-0.8492221236228943,
-0.24782603979110718,
0.3786490261554718,
-0.05187821760773659,
0.0233663... | |
CodePlex (Apache license). | [
0.6456893682479858,
0.055109258741140366,
0.11075083166360855,
0.04775584489107132,
-0.5922890901565552,
-0.5999475121498108,
0.6222562193870544,
-0.1901264786720276,
0.03601105138659477,
-0.11868635565042496,
-0.3125673234462738,
-0.12417867034673691,
-0.6096786856651306,
0.12986899912357... | |
Presumably there is a library or simple asm blob that can get me the number of the current CPU that I am executing on.
Use `sched_getcpu` to determine the CPU on which the calling thread is running. See `man getcpu` (the system call) and `man sched_getcpu` (a library wrapper). However, note what it says:
> The informa... | [
0.12947680056095123,
-0.19359137117862701,
0.5724096894264221,
0.09558634459972382,
0.15220271050930023,
-0.2063533514738083,
0.10452083498239517,
-0.07325665652751923,
-0.2962954342365265,
-0.7740932703018188,
-0.21824423968791962,
0.4094758629798889,
-0.23092035949230194,
0.1833683997392... | |
between CPUs to keep caches hot, but it is possible.) The caller must be prepared to handle the situation when cpu and node are no longer the current CPU and node. | [
0.08627298474311829,
-0.048647377640008926,
0.19106334447860718,
0.23116084933280945,
0.4225251376628876,
-0.006474366411566734,
0.37695470452308655,
-0.037733402103185654,
-0.12802477180957794,
-0.5894804000854492,
-0.4013853371143341,
0.5126041173934937,
-0.2667243480682373,
0.0027325137... | |
Edit: On further examination Firefox does not seem to be doing this, but Chrome definitely does. I guess its just a bug with a new browser - for every event an I/O Read also occurs in Chrome but not in FF.
When I load the following page in a browser (I've tested in Chrome and Firefox 3 under Vista) and move the mouse ... | [
0.24396885931491852,
0.2060079574584961,
0.3624356687068939,
-0.20064668357372284,
-0.24749889969825745,
-0.36190712451934814,
0.43977510929107666,
0.003322706324979663,
-0.40590426325798035,
-0.7206257581710815,
-0.07740936428308487,
0.5113303065299988,
-0.4058360755443573,
-0.09542925655... | |
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>test</title>
</head>
<body>
<script>
var createEl = function (i) {
var el = document.createElement("div");
var t = document.createTextNode(i.toStr... | [
0.17752067744731903,
-0.1777736395597458,
0.5581633448600769,
0.06071080267429352,
-0.08310830593109131,
0.14165009558200836,
0.2495434433221817,
-0.7096956372261047,
0.13489526510238647,
-0.6635373830795288,
-0.5456505417823792,
0.34776484966278076,
-0.3173513114452362,
0.1044893115758895... | |
el.addEventListener("mouseover", fn, false);
//el.onmouseover = fn;
fn = null;
try{
return el;
}
finally{
el=null;
} | [
-0.06377116590738297,
-0.2868232727050781,
0.461569219827652,
-0.3780784606933594,
0.3401619791984558,
0.31017017364501953,
0.1811663955450058,
-0.2291404753923416,
0.18936970829963684,
-0.4317823350429535,
-0.2727639377117157,
0.7913338541984558,
-0.2983431816101074,
-0.017879609018564224... | |
//return (el = [el]).pop();
};
var i,x;
for (i= 0; i < 100; i++){
x = createEl(i)
document.body.appendChild(x);
x = null;
}
</script>
</body>
</html>
```
The `(el = [el].pop())` and the `try/finally` ideas are both from [here](http://ajaxian.com/archiv... | [
0.22803683578968048,
-0.1652214676141739,
0.5170265436172485,
0.09283257275819778,
0.15677057206630707,
-0.08782056719064713,
0.2072901427745819,
-0.1084953024983406,
-0.01493686530739069,
-0.7502511143684387,
-0.5183828473091125,
0.43776294589042664,
0.10093553364276886,
-0.09171785414218... | |
they do not either seem to help - understandably since they are only meant to be ie6 fixes.
I have also experimented with using the addEventListener and the onmouseover methods of adding the events. The only way I have found to prevent memory from increasing is to comment out both lines of code.
Memory leaks related t... | [
0.27519840002059937,
0.07387261837720871,
-0.05111291632056236,
0.06753069907426834,
0.00007967673445818946,
-0.12754219770431519,
0.4738970994949341,
-0.027864517644047737,
-0.3062992990016937,
-0.5046190619468689,
-0.06287693232297897,
0.6734108924865723,
-0.332894504070282,
-0.087183527... | |
scenario, but there are a lot of older browsers floating around out there!)
Such an enclosure could look like this:
```
var el = document.createElement("div");
var fnOver = function(e) {
el.innerHTML = "Mouse over!";
};
var fnOut = function(e) {
el.innerHTML = "Mouse out.";
};
el.addEventListener("mouseover"... | [
0.20712104439735413,
-0.1760251522064209,
0.3790712058544159,
-0.01983744278550148,
0.4016006886959076,
-0.17530201375484467,
0.288046270608902,
-0.5871025323867798,
0.009321211837232113,
-0.8921796679496765,
-0.1153770461678505,
0.7136852741241455,
-0.5568276047706604,
-0.1046987697482109... | |
of the bummer of beta software, I guess. :-) | [
0.5721852779388428,
0.3188171982765198,
-0.04898341745138168,
0.22926375269889832,
0.22575435042381287,
-0.2437896579504013,
-0.020235536620020866,
0.39672785997390747,
0.18156765401363373,
-0.033315908163785934,
-0.09505631774663925,
0.5463787317276001,
-0.15319007635116577,
0.19699239730... | |
I have an ASP .NET website that hosts a Java applet. The Java applet requires version 1.6 Update 11 of the Java runtime.
How can I detect that a client has the appropriate runtime installed so that I can display an informative message if they do not?
Thanks,
Carl.
**EDIT:** The solution must be platform independant... | [
0.10541783273220062,
0.09249202162027359,
0.5061514377593994,
-0.006685921456664801,
-0.02309066243469715,
-0.13357508182525635,
0.31041499972343445,
-0.12463754415512085,
-0.2477181851863861,
-0.8139743804931641,
0.16588492691516876,
0.4411817491054535,
-0.15722569823265076,
0.00978713296... | |
How could I take MP3 and convert the speech to text?
I've got some recorded notes from a conference and from meetings (there is a single voice on the recording, which is my voice). I thought it would be easier and intellectually interesting to convert to text using speech to text tools rather than simply transcribe by... | [
0.504460871219635,
0.13291583955287933,
-0.038905203342437744,
0.17821599543094635,
-0.19895507395267487,
0.13255366683006287,
0.22493252158164978,
0.21839523315429688,
-0.21051031351089478,
-0.4855673015117645,
-0.2873128354549408,
0.7549182176589966,
-0.011591169983148575,
-0.19098906219... | |
I have loaded an idt table with 256 entries, all pointing to similar handlers:
* for exceptions 8 and 10-14, push the exception number (these exceptions push an error code automatically)
* for the others, push a "dummy" error code and the exception number;
* then jump to a common handler
So when the common handler en... | [
0.11096994578838348,
0.03539003059267998,
0.3999747931957245,
-0.15543673932552338,
-0.13240860402584076,
0.2930752635002136,
0.062062401324510574,
-0.3211243152618408,
-0.12350726872682571,
-0.7028810977935791,
-0.01478178147226572,
0.5358579754829407,
-0.31474635004997253,
-0.00511137815... | |
but this doesn't work for exception nr 8; if I leave the error code on the stack, then it returns fine!
Questions:
* do I have to leave the error code on the stack for exceptions that put the error code there? If so, how does `iret` determine whether it has to pop an error code or not?
* as soon as I enable interrupt... | [
0.22204425930976868,
0.12106944620609283,
0.14674311876296997,
0.03750551864504814,
-0.18735246360301971,
-0.06664757430553436,
0.6367213129997253,
-0.10906822234392166,
-0.6083210706710815,
-0.4712045192718506,
0.06813301891088486,
0.6067805886268616,
-0.3876608610153198,
0.01345465332269... | |
pop it before the `iret`. The `iret` instruction doesn't know where you're coming from, if it's a fault, a trap or an external interrupt. It always does the same, and it assumes that there's no error code on the stack.
Quoting from the SDM (Software Developer's Manual), Volume 3, Chapter 5, section 5.13 titled Error C... | [
0.002286905888468027,
-0.08508028835058212,
0.6311390995979309,
-0.0047189462929964066,
-0.15577910840511322,
0.08981708437204361,
-0.03323573246598244,
0.04649409279227257,
-0.10347883403301239,
-0.3792085647583008,
-0.2962142527103424,
0.48950114846229553,
-0.31518611311912537,
0.2210660... | |
Note
> that the error code is not popped when
> the IRET instruction is executed to
> return from an exception handler, so
> the handler must remove the error code
> before executing a return.
You can find the [IA-32 Software Developer's Manual](http://www.intel.com/products/processor/manuals/) [here](http://www.... | [
-0.07338453084230423,
0.05886602774262428,
-0.13852953910827637,
-0.2379692792892456,
-0.1828683465719223,
0.092134028673172,
0.41687652468681335,
-0.33769217133522034,
-0.09855356812477112,
-0.4810636639595032,
-0.28786373138427734,
0.7444444894790649,
-0.5262247323989868,
-0.143355980515... | |
In <http://php.net/quoted_printable_decode>, I found ways to do it using preg\_replace. Anyone who knows any code that could convert a normal NSString to something RFC 2045 section 6.7?
Thanks in advance!
There's no method on Cocoa to decode a quoted printable string, but you could easily write something yourself, lik... | [
-0.01232094969600439,
0.09674038738012314,
0.5784724950790405,
0.11100036650896072,
0.04791349545121193,
-0.08949003368616104,
0.3038485646247864,
-0.3548901677131653,
-0.3199607729911804,
-0.5456134080886841,
-0.1478123813867569,
0.5894712209701538,
-0.2632353603839874,
-0.063712470233440... | |
*p ) {
case '=':
NSAssert1( *(p + 1) != 0 && *(p + 2) != 0, @"Malformed QP String: %s", qpString);
if( *(p + 1) != '\r' ) {
int i, byte[2]; | [
0.25001442432403564,
-0.1578400880098343,
0.3325425386428833,
-0.36126255989074707,
0.1932133585214615,
0.3790897727012634,
0.5751786231994629,
-0.3735019266605377,
-0.038184668868780136,
-0.27852651476860046,
-0.36152803897857666,
0.5199945569038391,
-0.473799467086792,
0.3164638578891754... | |
for( i = 0; i < 2; i++ ) {
byte[i] = *(p + i + 1);
if( isdigit(byte[i]) ) | [
-0.2697281539440155,
-0.13696643710136414,
0.30435699224472046,
-0.2519243359565735,
0.22493833303451538,
0.2748419940471649,
0.21845124661922455,
-0.4278743863105774,
0.09151148796081543,
-0.3092924654483795,
-0.2548080384731293,
0.2824912965297699,
-0.3525455594062805,
-0.082107275724411... | |
byte[i] -= 0x30;
else
byte[i] -= 0x37;
NSAssert( byte[i] >= 0 && byte[i] < 16, @"bad encoded character"); | [
-0.11427653580904007,
-0.11460121721029282,
-0.09661500155925751,
-0.36854907870292664,
0.20672357082366943,
0.24304594099521637,
0.5838643312454224,
-0.013859684579074383,
0.06163128465414047,
-0.29436299204826355,
-0.3939396142959595,
0.5588213801383972,
-0.5984638333320618,
0.0909981504... | |
}
*(ep++) = (char) (byte[0] << 4) | byte[1];
}
p += 3;
continue; | [
0.05759352073073387,
-0.18785442411899567,
0.401968777179718,
-0.2736622095108032,
0.23295952379703522,
0.36845725774765015,
0.5114130973815918,
-0.48633578419685364,
-0.36858683824539185,
0.011525679379701614,
-0.4998987913131714,
0.3586430251598358,
-0.40078961849212646,
-0.0637434348464... | |
default:
*(ep++) = *(p++);
continue;
}
}
return [[[NSString alloc] initWithBytesNoCopy:utf8_string length:strlen(utf8_string) encoding:NSUTF8StringEncoding freeWhenDone:YES] autorelease];
}
@end
``` | [
-0.3778938055038452,
-0.35626834630966187,
0.5111894011497498,
-0.05604010075330734,
0.3794410228729248,
0.10419536381959915,
0.5212339758872986,
-0.3484823703765869,
-0.37012284994125366,
-0.47949281334877014,
-0.5797443985939026,
0.6279412508010864,
-0.3493557274341583,
0.033609550446271... | |
I used to work on netbeans to build Java applications but now: i am using eclipse.
I was was wondering if there a a free good plug-in to help me with swing windows.??
[Jigloo - CloudGarden](http://www.cloudgarden.com/jigloo/index.html)(free non-commercial)
[Visual Editor Project](http://www.eclipse.org/vep/WebContent/... | [
1.0164499282836914,
0.056457508355379105,
0.40116560459136963,
-0.024446528404951096,
-0.44238173961639404,
-0.11148694902658463,
0.06829257309436798,
-0.04079766571521759,
-0.3451201319694519,
-0.35377568006515503,
-0.08961504697799683,
0.5091782212257385,
0.0803307592868805,
-0.220060512... | |
This question is inspired by [this recent question](https://stackoverflow.com/questions/491293/why-cant-i-set-the-background-color-of-a-selecfted-listboxitem-in-wpf) and other situations I've encountered in my WPF development. How do I know whether it is enough to set a style on a control to override some default behav... | [
0.46063220500946045,
-0.19425421953201294,
0.2830280363559723,
-0.07779735326766968,
0.024261442944407463,
-0.22906377911567688,
0.18714836239814758,
-0.4498676061630249,
-0.1614207923412323,
-0.6364249587059021,
-0.06562771648168564,
0.5497771501541138,
-0.3901444673538208,
-0.20867721736... | |
<Setter Property="Margin" Value="2"/>
<Style.Triggers>
<Trigger Property="IsSelected" Value="True">
<Setter Property="FontWeight" Value="Bold"/>
<Setter Property="FontSize" Value="18"/>
<Setter Property="Background" Value="Yellow"/> | [
-0.09195050597190857,
-0.322978675365448,
0.5007387399673462,
-0.17250537872314453,
-0.1057053729891777,
0.4083729088306427,
-0.21752041578292847,
-0.45263907313346863,
-0.2468588948249817,
-0.529369592666626,
-0.15138687193393707,
0.4564230144023895,
-0.19296559691429138,
-0.1465574055910... | |
<Setter Property="Foreground" Value="Red"/>
</Trigger>
</Style.Triggers>
</Style>
```
Styles can be thought of very closely to CSS styles in HTML. If all you want to do is change the basic properties of a control such as Background, Foreground or whatever properties it exposes then a Style is ... | [
0.5549290180206299,
-0.28592005372047424,
0.43950483202934265,
0.4196648895740509,
-0.1512690931558609,
-0.2246413379907608,
-0.07869315892457962,
-0.17239196598529816,
-0.29352402687072754,
-0.6869804263114929,
-0.09181458503007889,
0.5543615818023682,
-0.4492800831794739,
-0.166049256920... | |
then a control template is what you want. For example, if you want to change how a button is laid out by adding some sort of grid behaviour, then using a control template is the way forward. | [
0.5393531918525696,
-0.43141046166419983,
-0.019616534933447838,
0.010575678199529648,
-0.049075786024332047,
0.05789726600050926,
-0.21697188913822174,
-0.15995250642299652,
-0.19425266981124878,
-0.6938629746437073,
-0.10185077041387558,
0.2677575349807739,
-0.44503653049468994,
0.022811... | |
In an [earlier question](https://stackoverflow.com/questions/267200/), I've found out that sadly Solution Folders are not real folders inside a directory.
I wonder if there is an AddOn or Macro that adds this functionality? i.e. when I create a Solution Folder, it created a real folder. When I Create a new Item (Right... | [
-0.2483557164669037,
-0.1902889758348465,
0.645283579826355,
-0.0026058396324515343,
-0.07575228065252304,
-0.04515668377280235,
0.1396917998790741,
-0.2862006723880768,
-0.5791592001914978,
-0.45040008425712585,
-0.00805012695491314,
0.6383419036865234,
-0.2967163324356079,
-0.13200061023... | |
2008 and 2010 and there is no AddIn for this. | [
-0.05921999365091324,
0.044142864644527435,
0.10577636957168579,
-0.16487713158130646,
-0.26099228858947754,
0.5952511429786682,
0.050429314374923706,
0.29512447118759155,
-0.37202271819114685,
-0.2073695808649063,
-0.002702988451346755,
0.2817499339580536,
0.11804163455963135,
0.281755596... | |
Using C# 3.5 I wanted to build up a predicate to send to a where clause piece by piece. I have created a very simple Console Application to illustrate the solution that I arrived at. This works perfectly. Absolutely perfectly. But I have NO idea how or why.
```
public static Func<Tran, bool> GetPredicate()
{
... | [
0.2913132607936859,
-0.02163124829530716,
0.38854876160621643,
-0.09235052019357681,
-0.06597241759300232,
0.09342750906944275,
0.05961627513170242,
-0.5452118515968323,
-0.04974336549639702,
-0.39051347970962524,
-0.38140133023262024,
0.7780831456184387,
-0.25269314646720886,
-0.011470821... | |
return predicate;
}
```
When I say 'predicate +=', what does that mean? predicate -= appears to do nothing and ^=, &=, \*=, /= aren't liked by the compiler.
The compiler doesn't like 'predicate = predicate + t => t.Response....' either.
What have I stumbled on? I know what it does, but how does it do it?
If an... | [
0.0018586956430226564,
-0.12620240449905396,
-0.011155866086483002,
0.09706807881593704,
-0.09407057613134384,
-0.3348773419857025,
0.23068825900554657,
-0.15397337079048157,
-0.07777384668588638,
-0.4174444079399109,
-0.09983707964420319,
0.459503710269928,
-0.3631819486618042,
0.29388815... | |
is useful for Action.
```
Action action = Method1;
action += Method2;
action += Method3;
action -= Method2;
action();
```
In this case, only Method1 and Method3 will run, Method2 will not run because you remove the method before invoke the delegate.
If you use multicast delegate with Func, the result will be last m... | [
-0.04567543789744377,
-0.18998317420482635,
0.4431639015674591,
0.030489470809698105,
0.061249323189258575,
0.00034339629928581417,
0.2767675220966339,
-0.6514047384262085,
-0.41264379024505615,
-0.31583788990974426,
-0.22923681139945984,
0.4932114779949188,
-0.3900820314884186,
-0.0599725... | |
to combine predicate, I suggest these extension methods.
```
public static Func<T, bool> AndAlso<T>(
this Func<T, bool> predicate1,
Func<T, bool> predicate2)
{
return arg => predicate1(arg) && predicate2(arg);
}
public static Func<T, bool> OrElse<T>(
this Func<T, bool> predicate1,
Func<T, bool>... | [
-0.12858819961547852,
-0.12641337513923645,
0.44513991475105286,
-0.20724813640117645,
-0.07488539069890976,
0.23526190221309662,
0.14700698852539062,
-0.45746099948883057,
-0.1734771430492401,
-0.3551737368106842,
-0.5623921155929565,
0.9193665385246277,
-0.3900035619735718,
0.00158232531... | |
return predicate;
}
```
EDIT: correct the name of extension methods as Keith suggest. | [
-0.17671433091163635,
0.145847886800766,
-0.0450010672211647,
-0.21564163267612457,
-0.007533907890319824,
-0.08157607167959213,
0.13833566009998322,
0.05031367763876915,
-0.012404821813106537,
-0.29015523195266724,
-0.3073074221611023,
0.7509713768959045,
-0.3271324634552002,
0.0195817276... | |
We are going to be selling a service that will be hosted by us, and each client we host will have their own database, but there will be one centralized website. I currently have a blank database with the few things that a new client will need. What is the best way to copy this database so I can setup another client? I ... | [
0.8065968155860901,
0.21743950247764587,
0.34443140029907227,
0.25981688499450684,
0.21386179327964783,
-0.3883156478404999,
0.2107081413269043,
0.24344602227210999,
-0.14567413926124573,
-0.6946679949760437,
0.274355411529541,
0.5270228981971741,
0.07985793054103851,
0.1978795975446701,
... | |
2008.
Update 3: Referencing Cade Roux's answer... Thanks for a great answer, but...
What is the reason for merging all of the databases into one, and then distinguishing clients based on an identifier in each table? Wouldn't this greatly complicate the architecture of the entire product? I would need to add these Clie... | [
-0.006467083469033241,
0.14159700274467468,
0.47656548023223877,
0.14868365228176117,
-0.13009297847747803,
0.07521826773881912,
0.006383504252880812,
-0.3271297514438629,
-0.3470850884914398,
-0.3100714683532715,
0.18345887959003448,
0.42597752809524536,
-0.2480882704257965,
0.08485464751... | |
is set, I never need to worry about finding client specific data! How do these approaches compare (and should I add this as a separate question?
You have a few different options:
You can detach your empty database, then when a user signs up, copy that database and mount it under a unique name for them and map it to th... | [
0.73031085729599,
0.021041950210928917,
0.37813690304756165,
0.24443009495735168,
0.26854926347732544,
-0.12835563719272614,
-0.06362349539995193,
-0.29684337973594666,
-0.34111109375953674,
-0.68415766954422,
0.11057936400175095,
0.5545589327812195,
-0.11271639168262482,
0.164580285549163... | |
seriously consider going to a multi-tenant architecture where all users are in the same database (with most tables having CustomerID columns to segregate the data) if you are going to have more than a few dozen customers.
Regarding your notes about option 3 - it depends on your application. Multi-tenant can be difficu... | [
0.36384642124176025,
-0.06460150331258774,
0.38157135248184204,
0.22535660862922668,
0.25237470865249634,
-0.0912090316414833,
0.020807847380638123,
-0.12992671132087708,
-0.6305323243141174,
-0.6325873136520386,
0.04927939549088478,
0.5323983430862427,
-0.15831834077835083,
-0.04444847255... | |
with multi-tenant-db or something. Anyhow, I think that this comes up as a consideration secondary to your answer about a particular tactic does show the importance of including details about your overall goals in strategy in every question on StackOverflow. | [
0.20645564794540405,
-0.15461066365242004,
0.15538054704666138,
0.20508386194705963,
-0.11809706687927246,
-0.13597865402698517,
0.13881750404834747,
-0.2512674033641815,
-0.15066613256931305,
-0.3351221978664398,
0.0495462529361248,
0.5464330315589905,
-0.13460949063301086,
-0.16395837068... | |
I have an app that uses a local version of ODAC 11 below the directory that the .exe file is in. The idea is that we want our app to use the local ODAC 11 regardless of what else the user has installed on her machine.
Oracle.DataAccess.dll is in the same directory as the .exe.
It works fine when the client machine ha... | [
0.4663749635219574,
0.2641816735267639,
0.19848361611366272,
-0.0367855541408062,
0.06865187734365463,
0.05636264756321907,
0.20935966074466705,
-0.016732005402445793,
-0.07102090865373611,
-0.6754026412963867,
0.01357013825327158,
0.7220869660377502,
-0.31480398774147034,
0.01696190796792... | |
at Oracle.DataAccess.Client.OracleInit.Initialize()
at Oracle.DataAccess.Client.OracleConnection..cctor()
```
I'm guessing that this has something to do with the runtime binding policy, but a search for "Oracle/ODAC/ODP.NET runtime binding policy" on Google has not turned up anything useful.
Does anyone know how ... | [
0.2559286057949066,
0.4174658954143524,
-0.017836038023233414,
0.088160939514637,
-0.15786221623420715,
-0.06346003711223602,
0.0038802563212811947,
0.1963161677122116,
-0.270081490278244,
-0.5626651048660278,
-0.002729912521317601,
0.4512311518192291,
-0.09549688547849655,
-0.020694708451... | |
et al), hence the compatibility error.
Turns out that if you want an application to work with ODAC 11 xcopy deployment regardless of what else the user may have installed on her machine, you need to do 2 things:
1. Set the PATH environment variable for the process. (I was already doing this.)
2. Set the ORACLE\_HOME ... | [
0.03953974321484566,
0.24701742827892303,
0.14443285763263702,
-0.11829415708780289,
0.3378171920776367,
-0.302875816822052,
0.4465712010860443,
-0.37053361535072327,
-0.0936005711555481,
-0.5921432375907898,
-0.1410878598690033,
0.8276423811912537,
-0.590901792049408,
0.07491275668144226,... | |
missing on the target machine. I got this same error on other machines despite the Environment settings because I had Subversion set to ignore directories called "bin", so the OraOps DLL was not being copied to the client. | [
0.26632383465766907,
-0.12061847746372223,
0.15751706063747406,
0.20611241459846497,
0.033068254590034485,
-0.15077795088291168,
0.20805013179779053,
0.1576058715581894,
-0.5174416899681091,
-0.43396565318107605,
-0.028046902269124985,
0.42128852009773254,
-0.41738346219062805,
0.055565111... | |
I have a windows server which sends emails to me through a BASIC program. If the message body contains carriage returns/line feeds then the email never finishes. Only the first line is sent to me. I tried replacing them with \n but that didn't help as the email came to me with the \n in it. Any ideas?
Here is the comm... | [
0.2953603267669678,
0.038426801562309265,
0.7418009638786316,
-0.1779174506664276,
0.09102422744035721,
0.04534665122628212,
0.22918742895126343,
0.03455566242337227,
-0.33687639236450195,
-0.7311673164367676,
-0.22301755845546722,
0.6757174134254456,
-0.2684813439846039,
-0.06622681766748... | |
```
-body 1st line|second line|third line
``` | [
-0.3102032542228699,
-0.12193958461284637,
0.5916103720664978,
-0.17736954987049103,
-0.4295573830604553,
0.4790779650211334,
0.35766085982322693,
-0.11454170942306519,
-0.07266679406166077,
-0.6456152200698853,
-0.47609201073646545,
0.12067387998104095,
-0.14095072448253632,
-0.2327325642... | |
In an application scaffolding project on which I'm working, I'm trying to decide whether to use [Oslo](http://msdn.microsoft.com/en-us/oslo/default.aspx), [T4](http://www.olegsych.com/2007/12/text-template-transformation-toolkit/) or [CodeDom](http://msdn.microsoft.com/en-us/library/y2k85ax6.aspx) for generating code. ... | [
0.7013795971870422,
0.041574347764253616,
-0.037988029420375824,
0.29987862706184387,
-0.11609014868736267,
-0.026903098449110985,
0.2203681915998459,
-0.4550643861293793,
-0.10880585014820099,
-0.5105147361755371,
-0.16837292909622192,
0.3142736554145813,
-0.15974996984004974,
-0.09937703... | |
.NET class files (e.g. .cs, .vb). Level of difficulty is fairly high.
2. T4 requires CodeDom and VS Standard+. Level of difficulty is fairly reasonable, especially with the [T4 Toolbox](http://www.codeplex.com/t4toolbox).
3. Oslo is very new. I have no idea of the dependencies, but I imagine you must be on at least .NE... | [
0.3515721261501312,
-0.07914066314697266,
0.30085232853889465,
0.32890060544013977,
-0.4637058675289154,
-0.3170762062072754,
0.6876112818717957,
-0.12929747998714447,
-0.11164792627096176,
-0.7512471079826355,
-0.1404760181903839,
0.647597074508667,
-0.09424204379320145,
-0.16700226068496... | |
of the above tools. We want to stick with Microsoft or open source tools.
Go with T4 - easy decision.
* Oslo is too new and the tools are too raw to be anything than an eval-only technology
* CodeDOM is powerfull, if you need to generate CLR classes at run-time, and are willing to sacrifice easy modification to your ... | [
0.15514494478702545,
-0.18786470592021942,
0.15580162405967712,
0.11899122595787048,
-0.39286428689956665,
-0.33739346265792847,
0.27453041076660156,
-0.14681333303451538,
-0.2962075471878052,
-0.5033132433891296,
-0.33226120471954346,
0.5848891735076904,
-0.3454785645008087,
-0.3737054765... | |
Is there a way to remove blank pages appearing between two chapters, in Appendix?
Your problem is that all chapters, whether they're in the appendix or not, default to starting on an odd-numbered page when you're in two-sided layout mode. A few possible solutions:
The simplest solution is to use the `openany` option t... | [
0.04617394506931305,
0.10794703662395477,
0.5279442667961121,
0.03930852934718132,
-0.22582338750362396,
-0.08611853420734406,
0.16827183961868286,
0.08933376520872116,
-0.501505434513092,
-0.6393805742263794,
-0.39657923579216003,
0.293762743473053,
-0.2562321722507477,
0.1256284266710281... | |
a document to change the behavior for subsequent pages.)
Another option is to try the `\let\cleardoublepage\clearpage` command before your appendices to avoid the behavior.
Or, if you don't care using a two-sided layout, using the option `oneside` to your `documentclass` (eg `\documentclass[oneside]{book}`) will swit... | [
-0.20932701230049133,
-0.07821270078420639,
0.7796658277511597,
0.16494660079479218,
0.1337435245513916,
-0.31581732630729675,
0.36075249314308167,
0.1512349545955658,
-0.3212425708770752,
-0.8380628228187561,
-0.3713603615760803,
0.3907603919506073,
-0.24713075160980225,
-0.01901853457093... | |
Let's say you have a table containing articles and you want want to display a list of them, excluding the actual article text. When you get a list of the article objects using LINQ or the Entity Framework, is there a LOT of overhead associated with getting that text column too? I assume that when you start enumerating ... | [
0.1785047948360443,
0.15319541096687317,
0.021098215132951736,
0.3174688518047333,
0.026576697826385498,
-0.06483343988656998,
-0.11447974294424057,
-0.11080153286457062,
-0.3775060772895813,
-0.5390035510063171,
0.07527811080217361,
0.4165148138999939,
-0.21374697983264923,
0.156151846051... | |
your DAL, allow the ORM to automatically create one by setting up a stored procedure, or some other process?
If you don't need the data you should definitely create a different type. By convention I typically name this sort of class "nnnInfo" or "nnnListItem". To create ArticleListItem, in L2S, simply drag the table to... | [
0.24056117236614227,
-0.21636074781417847,
0.7189956903457642,
-0.028076661750674248,
-0.0731196403503418,
-0.02427637204527855,
-0.3032907247543335,
-0.26024842262268066,
-0.26483461260795593,
-0.44399139285087585,
-0.06649430096149445,
0.38965049386024475,
-0.5012339949607849,
-0.0885191... | |
app, expose via services, etc.
A second way to do this would be to create the class manually and write an extension method to return ArticleListItem:
```
public static IQueryable<ArticleListItem> ToListItems(this IQueryable<Article> articles)
{
return from a in articles select new ArticleListItem{ Title = a.Title, .... | [
0.21374160051345825,
0.2821972370147705,
0.6576716899871826,
-0.10886535793542862,
-0.15501689910888672,
-0.09561780095100403,
0.264980673789978,
-0.36717429757118225,
-0.2516949772834778,
-0.519641637802124,
-0.3809513747692108,
0.5424305200576782,
-0.6045039892196655,
0.23352065682411194... | |
I have a Visual Studio 2008 solution into which I have imported a number of pre-existing projects. The projects are mixed-language sample code (C#, VB, C++/CLI). They currently have multiple configurations, but I want each project only to have only a single "Debug" configuration.
In the configuration manager, I delete... | [
0.17783384025096893,
0.3240266442298889,
0.0684075877070427,
-0.2764888107776642,
-0.003887546481564641,
0.19384223222732544,
0.09309493005275726,
0.08139944076538086,
-0.2272849977016449,
-0.515668511390686,
-0.17847907543182373,
0.3853153586387634,
-0.5230136513710022,
0.1340813636779785... | |
only "Debug".
How can I best remove these extra configurations from each project? Am I overlooking some way to do this in the GUI, or should I just edit the project files directly?
In the Configuration Manager, select "Edit..." in the "Configuration" column for **each project** (not via the dropdown named Active solut... | [
0.05465441942214966,
-0.03574000671505928,
0.4308107793331146,
0.09919165819883347,
0.185908704996109,
-0.053779251873493195,
0.31866171956062317,
0.2232055366039276,
-0.18325378000736237,
-0.8651463985443115,
-0.37901192903518677,
0.8015139698982239,
-0.42604807019233704,
0.12413888424634... | |
I can import a type library via tlibimp.exe, but when I open up the IDE, the libraries are not in the activex pallete. I can't seem to figure how to get it to install to a particular package either. In the IDE there is an install button in the Import Type Library dialog. How do I do this in the command line?
When I lo... | [
0.5118840336799622,
0.27142247557640076,
0.22281038761138916,
-0.19170629978179932,
0.0018493756651878357,
-0.17055101692676544,
0.06744173169136047,
-0.006048691924661398,
-0.15364868938922882,
-0.6403188109397888,
0.041408639401197433,
0.6720983982086182,
-0.39639854431152344,
0.09996785... | |
problem?
---
### Edit:
I want to be able to install components to the activex palette without going through the IDE so that the process can be automated during a build. Any solutions must be able to be fully automated.
There is a programming language called Inform that, in its most recent incarnation, Inform 7, look... | [
0.3126441538333893,
0.015195313841104507,
0.29144325852394104,
0.21601305902004242,
0.28469225764274597,
0.059076886624097824,
0.05853906646370888,
0.11638456583023071,
-0.1468607783317566,
-0.6045032143592834,
-0.019691504538059235,
0.7560343146324158,
-0.21660663187503815,
-0.17173479497... | |
a room.
The old lady is a woman in the Stage. Understand "mother" or
"stepmother" as the old lady. The old lady is active. The description
of the lady is "She looks plucked: thin neck with folds of skin
exposed, nose beaky, lips white. Perhaps when her fortunes are mended
her cosmetics too will improve."
The Prin... | [
-0.5860536098480225,
0.04527312517166138,
0.39827224612236023,
0.1198461651802063,
0.2092604637145996,
0.2846173048019409,
0.3904099464416504,
0.10181783884763718,
-0.6474750638008118,
-0.5345315337181091,
-0.6827350854873657,
0.24791936576366425,
0.16033142805099487,
0.5880330801010132,
... | |
The description of the slipper is "It is very small
for an adult woman's foot."
```
Complete code can be found [here](http://www.inform-fiction.org/I7Downloads/Examples/glass/source.html).
This is a small simple example...it can actually handle a surprisingly robust set of ideas.
It should be pointed out that the... | [
-0.35608354210853577,
0.22794699668884277,
0.4353487193584442,
0.1299831122159958,
-0.043678168207407,
0.438956618309021,
0.5226597785949707,
-0.1535758227109909,
-0.2945813238620758,
-0.46775543689727783,
0.028559062629938126,
0.12806959450244904,
-0.0008185254991985857,
0.716525614261627... | |
the room object called the "Stage". Then two aliases ("mother" and "stepmother" are created that also both reference the "old lady" object.
Of course, as the examples get increasingly complex, the necessary hoops to jump through also become more complex. English is, by its very nature, ambiguous, while computer code i... | [
0.010351204313337803,
0.26249921321868896,
0.29176610708236694,
0.1677485704421997,
0.32284262776374817,
0.06453071534633636,
0.5904856324195862,
0.03045322746038437,
-0.0476037859916687,
-0.33726054430007935,
-0.21376073360443115,
0.23544591665267944,
-0.00804324634373188,
0.7206022739410... | |
It sometimes want to block my thread while waiting for a event to occur.
I usually do it something like this:
```
private AutoResetEvent _autoResetEvent = new AutoResetEvent(false);
private void OnEvent(object sender, EventArgs e){
_autoResetEvent.Set();
}
// ...
button.Click += OnEvent;
try{
_autoResetEvent.Wa... | [
-0.04962317645549774,
-0.257866770029068,
0.5217500329017639,
-0.20284420251846313,
0.22638140618801117,
-0.15406011044979095,
0.5028652548789978,
-0.11101947724819183,
-0.15789178013801575,
-0.466160386800766,
-0.11322527378797531,
0.6490361094474792,
-0.36228469014167786,
0.3241820335388... | |
valid way to pass the event as an argument). Can anyone help?
To give an example of why this can be useful, consider something like this:
```
var status = ShowStatusForm();
status.ShowInsertUsbStick();
bool cancelled = WaitForUsbStickOrCancel();
if(!cancelled){
status.ShowWritingOnUsbStick();
WriteOnUsbStick();
... | [
0.17727142572402954,
-0.21021878719329834,
0.7624890804290771,
-0.08858069777488708,
0.27982133626937866,
-0.28795427083969116,
0.5087530612945557,
-0.2486492544412613,
-0.2663871645927429,
-0.33791840076446533,
-0.2691026031970978,
0.5059776306152344,
-0.08667369931936264,
0.1537665426731... | |
this on the GUI-thread, but sometimes that is a worthwhile tradeoff for the simpler code.
The alternative would look something like this:
```
var status = ShowStatusForm();
status.ShowInsertUsbStick();
usbHandler.Inserted += OnInserted;
status.Cancel += OnCancel;
//...
void OnInserted(/*..*/){
usbHandler.Inserted -... | [
-0.09908292442560196,
-0.4207586646080017,
0.884408712387085,
-0.10972879827022552,
0.3204685151576996,
0.006652122363448143,
0.39371946454048157,
-0.261240154504776,
-0.24517452716827393,
-0.6187242269515991,
-0.1874295473098755,
0.6822267770767212,
-0.2690649628639221,
0.1770861297845840... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.