text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
return *this;
}
/* The interesting stuff */
void SetupClipMatrix(float fov, float aspectRatio, float near, float far)
{
Identity();
float f = 1.0f / std::tan(fov * 0.5f);
data[0] = f*aspectRatio;
data[5] = f;
data[10] = (far+near) / (far-near);
data[11] =... | [
0.1608508825302124,
-0.21885360777378082,
0.6439769268035889,
-0.23659050464630127,
0.5058027505874634,
0.06297248601913452,
0.04395807534456253,
-0.16771355271339417,
0.0346866212785244,
-0.33509328961372375,
-0.2557472288608551,
0.8965634703636169,
-0.12620730698108673,
-0.19373838603496... | |
/* this 'plugs' the old z into w */
data[14] = (2.0f*near*far) / (near-far);
data[15] = 0.0f;
}
std::vector<float> data;
};
inline Vector operator*(const Vector& v, const Matrix& m)
{
Vector dst;
dst.x = v.x*m[0] + v.y*m[4] + v.z*m[8 ] + v.w*m[12];
dst.y = v.x*m[1] + v.y*m[5] + v.z... | [
-0.2129984349012375,
-0.3896807134151459,
0.7462533116340637,
-0.0688958466053009,
-0.03540373966097832,
0.3567584455013275,
0.12460941821336746,
-0.49842000007629395,
-0.16198953986167908,
-0.4858473539352417,
-0.2303624004125595,
0.627752423286438,
-0.2539289891719818,
0.2464637309312820... | |
+ v.w*m[15];
return dst;
}
typedef std::vector<Vector> VecArr;
VecArr ProjectAndClip(int width, int height, float near, float far, const VecArr& vertex)
{
float halfWidth = (float)width * 0.5f;
float halfHeight = (float)height * 0.5f;
float aspect = (float)width / (float)height;
Vector v;
Matri... | [
0.03916827216744423,
-0.47723695635795593,
0.7297296524047852,
-0.12087865173816681,
-0.22238820791244507,
0.5618460774421692,
-0.1310577541589737,
-0.7479687333106995,
-0.25458237528800964,
-0.2353930026292801,
0.01989845372736454,
0.5860006809234619,
-0.15228785574436188,
0.0488889701664... | |
y and z components are inside the range of [-w, w].
One checks each vector component seperately against each plane. Per-vertex
data like colours, normals and texture coordinates need to be linearly
interpolated for clipped edges to reflect the change. If the edge (v0,v1)
is tested agains... | [
0.017843060195446014,
-0.363614022731781,
0.615776777267456,
-0.16562622785568237,
-0.2616004943847656,
0.30773118138313293,
0.24652041494846344,
-0.5487874150276184,
0.1144251748919487,
-0.6442257165908813,
-0.05593893304467201,
0.27583733201026917,
-0.18194377422332764,
0.198768109083175... | |
I skip this stage all together to be brief.
*/
for(VecArr::iterator i=vertex.begin(); i!=vertex.end(); ++i){
v = (*i) * clipMatrix;
v /= v.w; /* Don't get confused here. I assume the divide leaves v.w alone.*/
dst.push_back(v);
}
/* TODO: Clipping here */
for(VecArr::iterat... | [
0.05713535472750664,
-0.143093541264534,
0.7473325729370117,
-0.028459861874580383,
0.13463397324085236,
0.08028295636177063,
0.17098256945610046,
-0.5253159999847412,
-0.31229209899902344,
-0.5337094664573669,
-0.08041772246360779,
0.6055899858474731,
-0.1388912945985794,
0.06221561506390... | |
/ (2.0f * i->w) + halfWidth;
i->y = (i->y * (float)height) / (2.0f * i->w) + halfHeight;
}
return dst;
}
```
If you still ponder about this, the OpenGL specification is a really nice reference for the maths involved.
The DevMaster forums at <http://www.devmaster.net/> have a lot of nice articles relat... | [
0.3265603184700012,
-0.22507141530513763,
0.3246572017669678,
0.08419523388147354,
-0.38971850275993347,
-0.24330773949623108,
0.20704789459705353,
-0.1770940124988556,
-0.1339990347623825,
-0.6907206177711487,
-0.12501484155654907,
0.7710716128349304,
-0.14472121000289917,
-0.003292868845... | |
I have two database servers running SQL Server 2005 Enterprise that I want to make one of them as mirror database server.
What I need is; to create an exact copy database from primary server on mirror server, so when the primary server was down, we could switch database IP on application to use mirror server.
I have ... | [
0.028395120054483414,
0.17004001140594482,
0.42860662937164307,
-0.09769365191459656,
-0.2773949205875397,
0.2328445464372635,
0.19604989886283875,
0.0035676537081599236,
-0.5795349478721619,
-0.3741019070148468,
0.4490511417388916,
0.49542638659477234,
0.11070038378238678,
0.4394922256469... | |
can't access it when primary server was down?
I've been thinking about creating a regular backup on primary server and restore it on mirror server on hourly basis, but that's quite inefficient (slow) especially if I want an exact copy (since hundreds data's are added once in minute).
Any other suggestion?
**EDIT:** ... | [
0.1988677680492401,
-0.3727814853191376,
0.39225125312805176,
0.46308037638664246,
-0.26917997002601624,
-0.09593122452497482,
0.19486570358276367,
0.08585374057292938,
-0.457535982131958,
-0.5526183247566223,
0.10067659616470337,
0.4199506342411041,
0.10319940745830536,
0.4945883452892303... | |
the application level, the cluster itself has a virtual IP address that allows access to the data at any given time (given a reasonable amount of time for the switch over to the mirror from a primary failure). The mirror stays in synch by itself. :) There are good articles [here](http://www.dell.com/downloads/global/so... | [
-0.11361801624298096,
0.039952658116817474,
0.5245132446289062,
0.22537875175476074,
0.06233144924044609,
-0.03767617046833038,
-0.17109498381614685,
0.19834165275096893,
-0.37980103492736816,
-0.5637451410293579,
-0.2373669147491455,
0.48059093952178955,
0.02573024295270443,
0.18214987218... | |
I have some Perl code that translates new-lines and line-feeds to a normalized form.
The input text is Japanese, so that there will be multi-byte characters.
Is it still possible to do this transformation on a byte-by-byte basis (which I think it currently does), or do I have to detect the character set and enable Uni... | [
-0.07240649312734604,
0.019802380353212357,
0.47138965129852295,
0.1855909824371338,
-0.2631578743457794,
0.06057066097855568,
0.0016099900240078568,
-0.026801006868481636,
-0.13357731699943542,
-0.745451807975769,
-0.3693246841430664,
0.4140174388885498,
-0.11545416712760925,
0.0401032678... | |
troublesome with its funky escape sequences ...
None of the 4 encodings that you mention (Shift-JIS, UTF-8, EUC-JP, ISO-2022-JP) use the CR or LF character inside Japanese characters. For UTF-8 and EUC-JP, there is no overlap whatsoever between low ascii characters and bytes inside Japanese characters. However, for Shi... | [
-0.7606018781661987,
0.3349579870700836,
0.43999072909355164,
0.11208462715148926,
0.452088326215744,
0.18186479806900024,
0.17903994023799896,
0.09871736913919449,
-0.5548190474510193,
-0.20724116265773773,
-0.2829500436782837,
0.6982811093330383,
-0.6329913139343262,
0.01584201119840145,... | |
used to encode Japanese characters in ISO-2022-JP overlap with CR or LF.
```
For Shift-JIS,
First-byte range: 0x81 - 0x9F, 0xE0 - 0xEF
Second-byte range: 0x40 - 0x7E, 0x80 - 0xFC
Half-width katakana: 0xA1 - 0xDF
```
Again, there is no overlap with CR and LF. | [
-0.18729731440544128,
0.12813347578048706,
0.29863086342811584,
0.01201730314642191,
-0.3450559377670288,
0.5620507597923279,
-0.35217615962028503,
-0.3947928845882416,
-0.08043365180492401,
-0.46443724632263184,
-0.1596296727657318,
0.09044411778450012,
0.15852247178554535,
0.046156667172... | |
I have to build an app and the drag and drop functionality seems to be the most onerous part. What is the best Ajax framework for Drag and Drop according to one or more of the following parameters:
1. Learning curve
2. Code size
3. Browser compatibility
My pick would be [jQuery UI](http://jqueryui.com/home).
1. The l... | [
0.31644317507743835,
-0.07525387406349182,
0.34465211629867554,
0.062291815876960754,
-0.47532230615615845,
0.10635017603635788,
-0.1821305900812149,
-0.010097245685756207,
-0.1925324946641922,
-0.8255406618118286,
0.19986018538475037,
0.6176729202270508,
-0.19989758729934692,
-0.314770013... | |
include the components you're using (as well as the core). Of course it's minimized so the total size for what you want could be as low as the 135kb mark.
3. You probably won't find much difference between frameworks here. According to the jQuery website, it's been tested for *"compatibility in IE 6.0+, FF 2+, Safari 3... | [
0.4954985976219177,
0.05140355974435806,
0.1957293152809143,
-0.07638860493898392,
0.05259124934673309,
-0.2577989101409912,
0.5094977617263794,
-0.2204616665840149,
-0.21518634259700775,
-0.593206524848938,
-0.243552103638649,
0.5219972133636475,
-0.1765516847372055,
-0.22458578646183014,... | |
I have one simple User Registration form. It includes name, age, sex & city. But here city is coming form city master table & displaying user as a combo box. But when i am trying to store full user registration information through my UserDAO, how can i access that current selected city value ? My User Registration jsp ... | [
0.6370798349380493,
0.23149491846561432,
0.5477128028869629,
-0.061275798827409744,
-0.07397430390119553,
0.042893800884485245,
0.20261956751346588,
-0.12355590611696243,
-0.028539055958390236,
-0.6881788372993469,
-0.09113369882106781,
-0.054502442479133606,
-0.044189948588609695,
0.15782... | |
<s:radio name="sex" label="Sex" list="{'M','F'}" />
<s:select list="cities" key="cities.name" listValue="name">
</s:select>
<s:submit />
</s:form>
```
Now i am calling UserAction's execute() method. It contains :
```
public String execute() throws Exception {
UserDAO.insert... | [
-0.08010057359933853,
0.3052056133747101,
0.3894343376159668,
-0.19734162092208862,
0.06200101971626282,
-0.15907301008701324,
0.2859833538532257,
-0.4394090175628662,
0.060976020991802216,
-0.4678689241409302,
-0.5343812108039856,
0.9032729864120483,
-0.2915676534175873,
0.309489697217941... | |
Connection daoConn = null;
CityBean cb=new CityBean();
cb=daoUb.getCity();
System.out.println("cb = "+cb);
daoConn = connectionUtil.getConnection();
Statement daoSt = daoConn.createStatement();
String str = "INSERT user (name,age,sex,city) VALUES('" + daoUb.getName() + "... | [
-0.11410539597272873,
-0.12347026914358139,
0.7129172086715698,
-0.12281207740306854,
0.19668921828269958,
0.1522206962108612,
0.37770646810531616,
-0.0475492924451828,
-0.3779696822166443,
-0.6283257007598877,
-0.648098349571228,
0.14206364750862122,
-0.5546916723251343,
0.471048474311828... | |
}
```
Plz suggest me, if anyone have any suggestion. I am stuck with this problem....
You can get that using similar method what you are using for other fields. The only thing you need to do is give that field a name.
Give your list the exact name what you have in your bean, in your case **city**. It should start wo... | [
0.5033393502235413,
0.12323882430791855,
0.3350220322608948,
0.04923061281442642,
-0.052124932408332825,
-0.3532577455043793,
-0.2688431739807129,
0.5436701774597168,
-0.09187670052051544,
-0.8677361011505127,
0.09965475648641586,
0.3367895483970642,
-0.4506750702857971,
0.2779023051261902... | |
When to use ado.net and SQL Server transactions?
Are there any reasons why one would choose to use ado.net transactions over SQL Server transactions when there is only one SP or query fired against the database within that transactions.
What if you have multiple resources contributing in the transaction then use ADO.N... | [
0.2293548882007599,
-0.09383996576070786,
0.2007090449333191,
0.32507750391960144,
-0.13764607906341553,
-0.13813531398773193,
-0.2801344394683838,
-0.3170042335987091,
-0.35374483466148376,
-0.5881734490394592,
0.08990876376628876,
0.5248857140541077,
-0.31508708000183105,
-0.117484979331... | |
I have to create a Web Service that can service around 100,000 clients. I have been creating Windows Services for quite some time and use WCF binding in them. The Windows Services use HTTP binding and provide a http end point that can be used by any client that can talk using SOAP.
I am a little confused whether I shou... | [
0.5768958926200867,
0.17591753602027893,
0.40216854214668274,
0.030062654986977577,
-0.43323785066604614,
0.017851119861006737,
0.23715968430042267,
-0.18481981754302979,
-0.2103908210992813,
-0.8122158646583557,
0.2325211465358734,
0.390127956867218,
-0.15519268810749054,
0.55253076553344... | |
etc.
If both provide same HTTP end point then what should be the criteria for deciding on the service type?
You should combine all the answers.
WCF services can be hosted as both a Windows Service, as well as in IIS. IIS provides you with much more tools to scale and handle large number of requests. Since you are tar... | [
0.40560126304626465,
-0.14774617552757263,
0.6621348857879639,
0.23070505261421204,
-0.3979385793209076,
-0.20451046526432037,
0.08895313739776611,
-0.31157293915748596,
-0.2576366364955902,
-0.8315706849098206,
-0.09516287595033646,
0.32561758160591125,
-0.23428647220134735,
0.18452809751... | |
there create a WCF service (or add a WCF service library project to your solution, and reference that in your ASP.NET web app. | [
0.5709123015403748,
-0.16339358687400818,
0.16919218003749847,
0.19302062690258026,
-0.11940827965736389,
-0.46570873260498047,
0.16745387017726898,
-0.12493493407964706,
-0.1457737684249878,
-0.7180742621421814,
-0.06756166368722916,
0.0682591125369072,
-0.03624947741627693,
-0.0769977197... | |
Ok, so I would like to create an action in Rails to restart itself. I did a little searching and found:
<http://snippets.dzone.com/posts/show/5002>
Which suggests 2 commands, one to stop and another to restart. The following kills:
```
ps -a|grep "/usr/local/bin/ruby script/server"|grep -v "grep /usr"|cut -d " " -f1... | [
-0.17792122066020966,
0.02800806611776352,
0.19741414487361908,
-0.00018678276683203876,
-0.09804456681013107,
-0.023536330088973045,
0.3763783574104309,
-0.0041669998317956924,
-0.5143635272979736,
-0.343998521566391,
-0.22219692170619965,
0.71429842710495,
-0.47485509514808655,
-0.116865... | |
to set up an action to execute it:
```
def restart
fork { exec "ps -eaf|grep \"ruby script/server\"|grep -v grep|cut -d \" \" -f3|xargs -n 1 kill -KILL $1;script/server" }
redirect_to "/server_maintenance"
end
```
The action kills the server fine, but doesn't actually start the server back up:
```
=> Booting Mo... | [
-0.06700479984283447,
-0.34778666496276855,
0.27845215797424316,
-0.24250654876232147,
0.05835928022861481,
0.33312225341796875,
0.7326903343200684,
-0.7756356000900269,
-0.6280834078788757,
-0.0727296844124794,
-0.3951222598552704,
0.5893225073814392,
-0.7091554999351501,
-0.1401692926883... | |
from /usr/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/commands/server.rb:111
from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
from script/server:3
```
I'm not quite understanding why the addres... | [
0.19132240116596222,
-0.010080092586576939,
0.29900479316711426,
0.055837541818618774,
0.04268624633550644,
-0.12784703075885773,
0.5283210873603821,
0.004391990136355162,
-0.4059605300426483,
-0.2920907735824585,
-0.28871580958366394,
0.7211949229240417,
-0.08359877020120621,
-0.129313051... | |
which of course uses Mongrel. I'm on Ubuntu Hardy Heron.
Ok I found a fix... I changed how I start rails to:
```
mongrel_rails start -d
```
and now the following action will do it:
```
def restart
fork { exec "mongrel_rails restart" }
redirect_to "/server_maintenance"
end
```
As a caveat, the redirect\_to wil... | [
0.0171289574354887,
0.16557984054088593,
0.17695847153663635,
-0.19668245315551758,
-0.14484645426273346,
-0.15316937863826752,
0.4261997938156128,
0.29556217789649963,
-0.09086624532938004,
-0.6611487865447998,
0.011281194165349007,
0.7029005289077759,
-0.34317344427108765,
-0.02924722619... | |
In my controller I have two actions called "Friends". The one that executes depends on whether or not it's a "get" versus a "post".
So my code snippets look something like this:
```
// Get:
[AcceptVerbs(HttpVerbs.Get)]
public ActionResult Friends()
{
// do some stuff
return View();
}
// Post:
[AcceptVerbs(Ht... | [
-0.14574213325977325,
-0.513556182384491,
0.2664903402328491,
0.04680480808019638,
-0.086466483771801,
0.1702631413936615,
0.10017241537570953,
-0.2053736448287964,
-0.29290881752967834,
-0.6863604784011841,
0.022909024730324745,
0.4070761799812317,
-0.2129485011100769,
-0.1130861863493919... | |
If so, how do I do that?
Rename the second method to something else like "Friends\_Post" and then you can add `[ActionName("Friends")]` attribute to the second one. So the requests to the Friend action with POST as request type, will be handled by that action.
```
// Get:
[AcceptVerbs(HttpVerbs.Get)]
public ActionResu... | [
-0.05464334040880203,
-0.15318866074085236,
0.6404578685760498,
-0.2150103747844696,
-0.11158804595470428,
0.03448144719004631,
0.25000277161598206,
-0.24731259047985077,
-0.25402629375457764,
-0.5363577008247375,
-0.3747686743736267,
0.61335688829422,
-0.2238168865442276,
-0.1137576103210... | |
ActiveRecord's `validates_uniqueness_of` is [vulnerable to race conditions](http://www.google.com/search?q=activerecord+validates+uniqueness+race+condition). To really ensure uniqueness requires additional safeguards. One suggestion from the ActiveRecord RDocs is to create a unique index on the database, for example by... | [
-0.058224212378263474,
0.19131121039390564,
-0.04883415997028351,
0.06916029751300812,
0.11636367440223694,
-0.38854551315307617,
0.3575751781463623,
-0.20025630295276642,
-0.11714360862970352,
-0.5852838754653931,
0.04859541356563568,
0.3032025992870331,
-0.4089052379131317,
0.18871097266... | |
RDocs suggest, is to parse the message that comes with the exception and try to detect words like "duplicate" or "unique", but this is kludgy and the message is database backend specific. For SqlLite3, my understanding is that the message is totally generic and cannot be parsed this way at all.
Given that this is a fu... | [
0.11826688051223755,
0.34177646040916443,
-0.1714618057012558,
0.023579681292176247,
-0.316066712141037,
-0.35098251700401306,
0.47681841254234314,
-0.022079940885305405,
-0.2625201344490051,
-0.3695206940174103,
-0.020330922678112984,
0.4072047472000122,
-0.4987633526325226,
-0.0115097509... | |
I ran across (don't remember where) that seems appealing is that in the rescue block you can check the database to see if there is in fact a duplicate record. If there is, then chances are the StatementInvalid is because of the duplicate and you can handle it accordingly. If there isn't, then the StatementInvalid must ... | [
0.2740856111049652,
0.15425686538219452,
0.150287926197052,
-0.23375770449638367,
0.15510812401771545,
-0.035909149795770645,
0.5177009105682373,
-0.4237951934337616,
-0.20359669625759125,
-0.570269763469696,
0.12767073512077332,
0.5693997740745544,
-0.33277618885040283,
0.0958075076341629... | |
# Not a duplicate; something else went wrong
end
end
```
I attempted to automate this checking with the following:
```
class ActiveRecord::Base
def violates_unique_index?(opts={})
raise unless connection
unique_indexes = connection.indexes(self.class.table_name).select{|i|i.unique}
unique_indexes.eac... | [
-0.09114459156990051,
-0.05773996561765671,
0.5360369086265564,
-0.0384615920484066,
0.11617767065763474,
-0.07140591740608215,
0.37378162145614624,
-0.3627730906009674,
-0.43353238701820374,
-0.49430978298187256,
-0.08971501141786575,
0.421220988035202,
-0.5527995228767395,
0.227184101939... | |
return false
end
end
```
So now you should be able to use `generic_record.violates_unique_index?` in your rescue block to decide how to handle StatementInvalid.
Hope that is helpful! Other approaches? | [
0.10966303944587708,
0.052659425884485245,
0.24612091481685638,
0.08412571996450424,
-0.09683946520090103,
-0.22863587737083435,
0.6608640551567078,
-0.039980046451091766,
-0.07738719135522842,
-0.32256975769996643,
-0.06283553689718246,
0.5320475101470947,
-0.24020573496818542,
0.22880187... | |
I hear the whole day the terms class library, base class library, Framework, ...
What highlights a framework and what a base class library?
The distinguishing feature between a class library and a software framework is that in a framework, the flow of control is not determined by the user´s code, but by the framewor... | [
0.8276376128196716,
0.14260686933994293,
0.26916927099227905,
0.32638484239578247,
0.24736031889915466,
-0.3950372040271759,
-0.07609660178422928,
-0.09071076661348343,
-0.00969315692782402,
-0.11612958461046219,
0.006645903456956148,
0.8347295522689819,
0.20558947324752808,
0.123060688376... | |
Is there anyway to call PHP script from a .Net application and pass in some parameters?
You can do it through a command line call
```
php your-file.php parameter1 parameter2
```
The parameters are available in the `$_SERVER['argv']` variable. | [
0.3831363022327423,
0.07152126729488373,
0.32126548886299133,
0.16257211565971375,
-0.19897566735744476,
-0.0418010875582695,
0.09611527621746063,
-0.10548930615186691,
-0.14182254672050476,
-0.16718313097953796,
0.34665343165397644,
0.5217316746711731,
-0.1610477715730667,
-0.063144199550... | |
We are programming a logging library that keeps itself in a .hpp file. We would like to include `<tr1/unordered_map>` (if the compiler supports TR1,) or the standard `<map>` otherwise. Is there a standard way of checking at compile time if tr1 is available or not?
I was thinking that the same way that the "`__cplusplu... | [
0.39630693197250366,
0.029911912977695465,
0.268631249666214,
0.19416064023971558,
0.4335761070251465,
-0.14273479580879211,
-0.1513996571302414,
0.12743955850601196,
-0.5193426609039307,
-0.4374767541885376,
-0.1250144988298416,
0.3504458963871002,
-0.24804645776748657,
0.0083006992936134... | |
exist, it wouldn't be a bad idea to include them in proposals themselves.
If you are using any configuration tools like autotools you may try to write a test like:
```
AC_CHECK_HEADER(tr1/unordered_map,[AC_DEFINE([HAVE_TR1],[],["Have tr1"])],[])
AC_CHECK_HEADER(unordered_map,[AC_DEFINE([HAVE_CXX0X],[],["Have C++0x"])]... | [
0.48683735728263855,
0.43225663900375366,
0.2924529016017914,
0.04767999425530434,
0.050916578620672226,
-0.2548832893371582,
0.1942175030708313,
-0.4864204227924347,
0.013466732576489449,
-0.6578369736671448,
-0.06190734729170799,
0.3664402663707733,
-0.31893137097358704,
0.19462248682975... | |
<tr1/unordered_map>
typedef std::tr1::unordered_map<foo,bar> my_map;
#else
# include <map>
typedef std::map<foo,bar> my_map;
#endif
``` | [
-0.403086394071579,
0.2652163803577423,
0.40297558903694153,
-0.36890673637390137,
-0.015803171321749687,
0.2611480951309204,
0.17721645534038544,
-0.16499626636505127,
-0.24332913756370544,
-0.40608006715774536,
-0.6787757277488708,
0.4022522270679474,
-0.56728196144104,
-0.07202225923538... | |
I have an verilog based test-bench, interfaced to 'C source using DPI. Now using DPI I am planning to write my whole firmware. To do this I need 3 things
* Register Read
* Register Write
* Interrupt handler
As I understand, register reads and writes are tasks that I need to export from the RTL test-bench. And Interrup... | [
0.17335961759090424,
0.1448436677455902,
0.23488682508468628,
-0.05833599716424942,
-0.15565112233161926,
0.046167731285095215,
0.3477586507797241,
-0.2786348760128021,
-0.15030525624752045,
-0.7510401606559753,
0.20638041198253632,
0.714921772480011,
-0.2697587311267853,
0.043939836323261... | |
this, would appreciate their help.
Actually I figured it out something like this.
```
//--From RTL ---
export "DPI" task reg_read;
task reg_read;
input int nAddr;
output int nVal;
// -- read implementation --
endtask
// -- From C code
extern void reg_read (int nAddr, int *pVal);
void test_read (void)
{
... | [
0.3009238839149475,
-0.03163442388176918,
0.23337456583976746,
-0.26663199067115784,
-0.060500726103782654,
-0.14883045852184296,
0.42275893688201904,
-0.7463610768318176,
-0.07955800741910934,
-0.5768063068389893,
-0.07749900966882706,
0.8207995891571045,
-0.2519878149032593,
-0.068570755... | |
I'm planning on running a ruby process that may take a month to finish. If possible, I'd like to ensure that a blackout or hitting the wrong button won't cost me the whole month's work.
Is there an easy way to periodically save the program's state to disk? (Techniques that involve more effort would include adding code... | [
0.5626786351203918,
0.08996158093214035,
0.08373112231492996,
0.16183678805828094,
0.14557510614395142,
-0.15950700640678406,
0.5908787846565247,
-0.13541464507579803,
-0.32181084156036377,
-0.6078271865844727,
-0.14444461464881897,
0.5709887742996216,
-0.06540736556053162,
0.0138241704553... | |
it goes along. Twice.)
**Edit**: The project is [this one](http://github.com/agrimm/philosophy-dump-parser/tree/master), and the XML file is pages-articles.xml (eg enwiki-20090306-pages-articles.xml). Nothing proprietary, I just didn't want to be in "Plz halp" mode. The first pass gets a list of Wikipedia page titles,... | [
0.19587929546833038,
0.010326841846108437,
0.8446689248085022,
0.15614064037799835,
-0.3331829607486725,
-0.2491382360458374,
0.147739440202713,
0.03098071739077568,
-0.26945269107818604,
-0.522819459438324,
0.026298964396119118,
0.16732794046401978,
-0.06452756375074387,
0.082416020333766... | |
second pass, then I should only ask it to build links for pages that haven't already had their link calculated. If it crashes during calculating the statistics, I could just re-calculate the statistics.
**Another edit**: More general version of this question asked at [Save a process’ memory for later use?](https://sta... | [
-0.21983471512794495,
-0.012816387228667736,
0.3651387095451355,
0.12628725171089172,
-0.11286603659391403,
-0.15006780624389648,
0.25703510642051697,
0.1776273101568222,
-0.4078308343887329,
-0.806178629398346,
-0.17502208054065704,
0.324982225894928,
-0.17826297879219055,
0.0916583389043... | |
I have a parameterized query. Depending on parameter values optimal query plan varies significantly. Here is the trouble: Oracle uses the plan from the first query invocation for subsequent invocations resulting in bad performance. I deal with it by dynamic SQL but this way is far from elegant. So the question is: is t... | [
-0.13012756407260895,
-0.0002986453764606267,
0.16102862358093262,
-0.029832031577825546,
-0.04772976413369179,
0.044581614434719086,
0.1366015374660492,
-0.3445577621459961,
-0.08815716207027435,
-0.6205931305885315,
0.14970214664936066,
0.5530349016189575,
-0.3592204451560974,
0.00754962... | |
a table which has minimal impact on other queries. See also [this page](http://coskan.wordpress.com/2007/03/01/how-to-invalidate-execution-plan/) for more information and a sample listing. | [
-0.244724839925766,
0.052649203687906265,
-0.014456448145210743,
0.15977159142494202,
0.02247883379459381,
0.0744074285030365,
0.32586026191711426,
0.002342450199648738,
-0.3551395833492279,
-0.3387465178966522,
-0.36396804451942444,
-0.07626338303089142,
-0.3608301281929016,
0.08145011216... | |
In a multi threaded application, is there a way to ensure that a Critical Section is initialized only once except for putting the code in DLL main() ??
I'd suggest wrapping the CRITICAL\_SECTION with a class that will handle the initialization and uninitialization of the critical section object in its constructor and d... | [
0.09962334483861923,
-0.0768994390964508,
0.29803434014320374,
0.2700834274291992,
0.1542712152004242,
-0.09752973169088364,
0.025970345363020897,
0.022187579423189163,
-0.3966323137283325,
-0.45157089829444885,
-0.3157447576522827,
0.30986127257347107,
-0.4816291034221649,
0.2484637796878... | |
as well. | [
0.1319279819726944,
0.0586860217154026,
0.0827658399939537,
0.2955719232559204,
0.2341206818819046,
0.23078691959381104,
0.18377305567264557,
-0.08369123935699463,
-0.01382132526487112,
0.02951880358159542,
-0.13108041882514954,
0.4636014699935913,
0.006239176262170076,
0.03895116224884987... | |
I'm looking for some union examples, not to understand how union works, hopefully I do, but to see which kind of hack people do with union.
So feel free to share your union hack (with some explanation of course :) )
One classic is to represent a value of "unknown" type, as in the core of a simplistic virtual machine:
... | [
0.4597022533416748,
-0.15587177872657776,
-0.0929410308599472,
0.1252536177635193,
0.05133633688092232,
-0.00048085686285048723,
-0.08218423277139664,
-0.08220728486776352,
-0.13418444991111755,
-0.7048079371452332,
0.28230029344558716,
0.24940498173236847,
-0.5401613116264343,
0.545969367... | |
exact type, for instance implement a stack and so on.
Since this is in (old, pre-C11) C, the inner union must be given a field name in the outer `struct`. In C++ you can let the `union` be anonymous. Picking this name can be hard. I tend to go with something single-lettered, since it is almost never referenced in isol... | [
0.19102123379707336,
0.060777340084314346,
0.21504472196102142,
-0.2208288013935089,
-0.23100236058235168,
-0.271492600440979,
0.07036811113357544,
-0.377734899520874,
0.048334136605262756,
-0.3299092650413513,
0.05695826932787895,
0.41811856627464294,
-0.4772385060787201,
0.16203178465366... | |
the fact that `struct`s can be returned directly, and treated almost like values of a primitive type (you can assign `struct`s). | [
-0.15789900720119476,
0.10155314207077026,
-0.061133526265621185,
0.10811711847782135,
-0.11984492838382721,
-0.06851286441087723,
-0.09901567548513412,
0.025679076090455055,
0.14598119258880615,
-0.4973825514316559,
-0.3940083384513855,
0.5057689547538757,
-0.19528396427631378,
-0.0000241... | |
I am trying to access a sharepoint list programmatically in a webpart, like this.
```
try
{
masterList = web.Lists[listId];
}
catch(Exception e)
{
RenderExceptionMessage(e.Message);
}
```
The RenderExceptionMessage() method is supposed to show a user-friendly error message inside the webpart.
But the pr... | [
0.21476411819458008,
0.16156978905200958,
0.380032479763031,
-0.16077211499214172,
0.11875439435243607,
-0.16832463443279266,
0.5835095643997192,
-0.2267840951681137,
-0.1625513881444931,
-0.678411066532135,
-0.2685205936431885,
0.24743731319904327,
-0.3995804488658905,
0.35910728573799133... | |
of the call stack."
Any idea why this behaves this way?
By default, SharePoint has custom handling for access denied exceptions (including the redirect to the custom page) within page/webservice requests, bypassing the excepton handling in your code.
To disable this custom handling, set [SPSecurity.CatchAccessDenied... | [
0.15237320959568024,
-0.12540344893932343,
0.3176521062850952,
0.026986267417669296,
0.14344237744808197,
-0.3150354027748108,
0.6729732155799866,
-0.18127505481243134,
-0.29596927762031555,
-0.18251846730709076,
-0.3511504828929901,
0.43546316027641296,
-0.39623144268989563,
0.25964063405... | |
Is it possible to create a description for parameters used in an (asmx)-webservice?
I know I can set the description of the webmethod with the Description-property.
However is it also possible to add an attribute to the parameter to create description in the webservice for a given parameter
```
[WebMethod(Description ... | [
0.2607947587966919,
0.0993935838341713,
0.5115795135498047,
0.050721701234579086,
0.061550892889499664,
-0.3863184154033661,
0.08409935235977173,
-0.1623644083738327,
-0.20046554505825043,
-0.5870697498321533,
0.11951597034931183,
0.6755233407020569,
-0.04482584819197655,
-0.04349202290177... | |
no standard for what to do with the information even if you could add it. It's true that a WSDL may contain annotations for any element, but there's no standard about, for instance, placing those annotations into comments in the generated proxy class. | [
0.37390774488449097,
-0.09804946929216385,
-0.030641332268714905,
0.33075565099716187,
-0.21632590889930725,
-0.4425514340400696,
-0.06548919528722763,
0.03670382872223854,
-0.09795354306697845,
-0.480489045381546,
-0.08582695573568344,
-0.00003327563899802044,
-0.13393209874629974,
0.1311... | |
I'm doing a one-time import routine from one system to another. The first step is to import a lots of data from a lots of csv-files. The first line in each csv-file is fieldnames tab separated. The rest is the data, also tab separated and rows are separated with a CR.
I have written a 20-liner routine that creates the... | [
0.30992501974105835,
0.2822537422180176,
0.32358482480049133,
0.07592348754405975,
-0.03503353148698807,
0.15267883241176605,
-0.22594736516475677,
-0.2471078634262085,
-0.28154969215393066,
-0.5891284942626953,
0.04864278808236122,
0.27628231048583984,
-0.2690102159976959,
0.2505450248718... | |
looks at the data and try to find out what kind of data it contains in each column. There are time, dates, id-fields, textfields, and numeric fields.
I know how to do this, its fairly easy, but I want to know if there are some work done in this area and if there are some classes that handle this out there.
Finding ou... | [
0.3515544533729553,
0.13567659258842468,
0.3747343122959137,
0.21327854692935944,
0.00945780798792839,
0.12052910774946213,
0.06770027428865433,
-0.11149868369102478,
-0.3882572650909424,
-0.7250110507011414,
0.28827324509620667,
0.2729491591453552,
0.09161017835140228,
0.15292014181613922... | |
length 51-255 to be 255 and so on.
Anyone have some smart input on this? As I said its not anything particularly hard to do, but it would be nice to make a smart library of this, to use in other import-scenarios later on.
There is no way to do this, and no standard for what to do with the information even if you could... | [
0.4044639468193054,
0.09050043672323227,
0.01710025779902935,
0.22982394695281982,
-0.08744864910840988,
-0.3225715458393097,
0.010845506563782692,
0.09622983634471893,
-0.31737959384918213,
-0.42982175946235657,
0.14492270350456238,
0.28883373737335205,
-0.1080106720328331,
0.053242865949... | |
In simple terms, what does Rake do? What purposes does it have? I understand it's a build tool but I'm looking a bit more detail.
Try Martin Fowler's article on Rake for more information:
<http://martinfowler.com/articles/rake.html>
His pre-amble is:
> Rake is a build language, similar in
> purpose to make and ant.... | [
0.5182130932807922,
0.016565635800361633,
-0.01607840694487095,
0.10871374607086182,
-0.24289287626743317,
0.14040766656398773,
0.20197929441928864,
-0.35151728987693787,
0.2681457996368408,
-0.5463976263999939,
0.3360046148300171,
0.28194460272789,
-0.20285485684871674,
0.3683791160583496... | |
dependency models,
> synthesized tasks, custom build
> routines and debugging the build
> script.
There is more information available on or linked from the project's home page as well:
<http://rake.rubyforge.org/> | [
0.49470874667167664,
-0.07097312062978745,
-0.3192559480667114,
0.024820268154144287,
-0.22379723191261292,
0.25159144401550293,
0.6676614284515381,
-0.29845765233039856,
-0.05996837094426155,
-0.3967956006526947,
0.002840216737240553,
0.4593938887119293,
-0.2724343538284302,
0.15837110579... | |
I have a question about data binding which I am struggling with.
I have the following property in my xaml.cs file:
```
private string _stationIdInstruction;
public event PropertyChangedEventHandler PropertyChanged;
public string StationIdInstruction
{
get { return _stationIdInstruction; }
... | [
-0.039498135447502136,
-0.32480621337890625,
0.5997315645217896,
-0.13147002458572388,
0.4466002881526947,
-0.12225829809904099,
0.15365229547023773,
0.03353748098015785,
0.22029542922973633,
-0.6670061349868774,
-0.2737186849117279,
0.21201232075691223,
-0.29005002975463867,
0.47880208492... | |
}
}
protected void OnPropertyChanged(string name)
{
if (PropertyChanged != null)
PropertyChanged(this, new PropertyChangedEventArgs(name));
}
}
```
How can I bind a TextBlock to StationIdInstructions so it picks up the string property as its Text and update the TextBlock.T... | [
-0.14555791020393372,
-0.06265320628881454,
0.6379690766334534,
-0.046020232141017914,
0.59083491563797,
-0.2234935462474823,
0.11625654995441437,
-0.06433276832103729,
-0.09902039170265198,
-0.9021275043487549,
-0.14047850668430328,
0.5929964184761047,
-0.3186019957065582,
0.3166670501232... | |
Path=.}">
<TextBlock Text="{Binding Path=StationIdInstruction}" />
``` | [
-0.07005664706230164,
-0.17590981721878052,
0.5489814281463623,
-0.0899343192577362,
0.36664602160453796,
-0.1609502136707306,
0.29121482372283936,
-0.22447934746742249,
0.20761601626873016,
-0.8662302494049072,
-0.1338454633951187,
-0.035833828151226044,
-0.5006576776504517,
0.19061136245... | |
I have a website that contains "items", which have an ID and title. They are divided into categories.
Category indexes are viewed at URL's like
```
example.com/tutorials
example.com/maps
```
What would be the best URL structure for the items themselves, from a SEO point of view and just semantically in general?
``... | [
0.25922295451164246,
0.3672085404396057,
0.3322577178478241,
-0.021795231848955154,
-0.30235201120376587,
-0.21031858026981354,
-0.0610521137714386,
-0.2622658312320709,
-0.40745770931243896,
-0.48924413323402405,
-0.19311878085136414,
0.3125889301300049,
0.0584615096449852,
0.025031751021... | |
I have an object of Type MyTypeOneViewModel that is displayed in the first column of ListView and I have an object of Type MyTypeTwoViewModel that is displayed in the 2nd column of my ListView. Both types have a property of type MyNestedViewModel. Now I would like to display a different DataTemplate for each cell in th... | [
0.24537529051303864,
0.2619791328907013,
0.4505625069141388,
0.07212990522384644,
-0.07817642390727997,
0.20856884121894836,
-0.018662042915821075,
-0.2218925654888153,
-0.14357012510299683,
-1.043062686920166,
0.1378639042377472,
0.47863832116127014,
-0.07465336471796036,
0.49849167466163... | |
of the ListView. Note that The DataTemplate could vary in each row and column.
Can I achieve this without a TemplateSelector? WPF is able to autmatically chose the right DataTemplate based on the bound Type. But does that work in this nested scenario in a ListView too somehow?
Consider these options:
**1. Bind direc... | [
0.21810895204544067,
-0.07924570143222809,
0.7351263761520386,
-0.15108171105384827,
-0.22155633568763733,
-0.11002163589000702,
-0.018732376396656036,
-0.5055796504020691,
-0.05894738808274269,
-1.0810853242874146,
-0.03544837236404419,
0.5049448609352112,
-0.28384047746658325,
0.03151416... | |
your grid column templates, bind a `ContentControl` to the child property:
```
<GridViewColumn.CellTemplate>
<DataTemplate>
<StackPanel>
<Label Content="{Binding SomePropertyOnParentViewModel}"/>
<ContentControl Content="{Binding TheChildViewModel}"/>
</StackPanel>
</Dat... | [
0.05025475099682808,
-0.24500210583209991,
0.47462132573127747,
0.09081865847110748,
0.4547797441482544,
0.2235139012336731,
-0.44605839252471924,
-0.19347050786018372,
0.10570944845676422,
-1.097055196762085,
0.055009156465530396,
0.17747826874256134,
-0.1708042323589325,
0.16937474906444... | |
Say you have a page that provides a list of songs depending on some identifier you have specified, such as a category it belongs to. You may have your URL formatted like so:
<http://mysite.com/songs/view/1>
Now lets say you wanted to add paging, what is the best way to structure that URL and how does the action metho... | [
0.32552191615104675,
0.0605820007622242,
0.10955709218978882,
0.21344096958637238,
-0.41937169432640076,
-0.09717672318220139,
0.14148393273353577,
0.03489922359585762,
-0.3942931592464447,
-0.31037139892578125,
0.09101815521717072,
0.6185110807418823,
-0.04621022939682007,
0.0798007547855... | |
I have a website with items that can be divided into categories (items have one, not like tags).
This gives me URL's like <http://example.com/tutorials/12/Do-nice-things>. However, the category and title in the URL are for SEO-purposes, I don't need them, just the ID. It would also work with <http://example.com/someth... | [
0.4395025372505188,
0.18703503906726837,
0.3649560809135437,
0.025690555572509766,
-0.002376401098445058,
-0.33497682213783264,
0.2870717942714691,
0.0021003251895308495,
-0.2320929914712906,
-0.4040185809135437,
0.004736620932817459,
0.4237935245037079,
0.25930580496788025,
0.092155881226... | |
it in a cookie or something, and just not have to deal with it in the URL at all. | [
0.3186569809913635,
0.2003777176141739,
-0.05910348892211914,
0.27676334977149963,
-0.11268088966608047,
-0.11977184563875198,
-0.052454739809036255,
0.4635024666786194,
-0.12841366231441498,
-0.0918547511100769,
0.3022924065589905,
0.1445372849702835,
0.2904593348503113,
0.170417845249176... | |
Our marketing department sends out a newsletter to 'opt-in' customers and would like to track how many of these emails were opened. This is NOT a spamming exercise - these clients can unsubscribe at any time and they opt-in to begin with.
The problem is that many (most?) web and desktop email clients do not show imag... | [
0.71013343334198,
0.19624526798725128,
0.3757137358188629,
-0.20005962252616882,
0.01853020302951336,
-0.31746289134025574,
0.04828999564051628,
0.21258847415447235,
-0.22377823293209076,
-0.36512625217437744,
0.1189073771238327,
0.5287911891937256,
-0.25234562158584595,
-0.029687453061342... | |
="http://www.mydomain.com/?someInfo=x&otherInfo=y" width="1" height="1" />
```
Does anyone know if there is any alternative to this method of tracking emails that are opened etc?
Many thanks!
Please, just don't do this sort of stuff.
It's this kind of pissing into the pool which has made email and all things Inter... | [
0.7473374009132385,
0.13440878689289093,
0.4293927848339081,
-0.02793111279606819,
0.11400455236434937,
-0.464984655380249,
0.15512387454509735,
0.27342694997787476,
-0.20999489724636078,
-0.4402633607387543,
0.0006438020500354469,
0.578106164932251,
-0.16713017225265503,
0.184765592217445... | |
I've build a [small AppeEngine application](http://build-status.appspot.com/?app_name=myApp) which displays a green or red screen according to an URL call ([/pass](http://build-status.appspot.com/pass?app_name=myApp) or [/fail](http://build-status.appspot.com/fail?app_name=myApp)). That page is refreshed every minute.
... | [
0.2531192898750305,
0.07497100532054901,
0.6317883729934692,
-0.3767552971839905,
0.05088706687092781,
0.2233390361070633,
0.35286518931388855,
-0.28503212332725525,
-0.31661301851272583,
-0.875930905342102,
-0.30873194336891174,
0.4086366891860962,
-0.14392642676830292,
-0.086028471589088... | |
be called at the end of the build (and get the build status)?
You could use antrun from maven in the "install" phase to check for the presence or absence of a file and then execute httpclient (or the equivalent) based on that. Or you could write a wrapper that calls maven and then calls curl. | [
0.4958067834377289,
-0.31410372257232666,
0.3927434980869293,
-0.1306980699300766,
-0.09400273114442825,
-0.24811406433582306,
0.36019593477249146,
-0.2040921300649643,
-0.012666511349380016,
-0.6619694828987122,
-0.0035062201786786318,
0.5317544341087341,
-0.24283477663993835,
-0.10795376... | |
I'm writing a web application that needs to export data out of it. The problem is that every client requires a different format. Some want tab delimited, some comma seperated and even fixed width.
Different data may also be needed by each export.
What approaches should i consider to make it so that each client can h... | [
0.18343961238861084,
-0.18647754192352295,
0.9186342358589172,
0.04869974032044411,
-0.3620382845401764,
0.01595531590282917,
0.017590487375855446,
-0.06204122677445412,
-0.20524601638317108,
-0.8203937411308289,
0.02453572116792202,
0.6327494382858276,
-0.33057764172554016,
-0.14569507539... | |
I am getting data from a database through AJAX and appending tags to a select statement. The following code works in firefox, but only partially in IE. The problem in IE is that is creates the option elements in the dropdown, but the "text" attribute value is empty (the dropdown appears with 30 blank rows! However, the... | [
0.18745890259742737,
0.0015200742054730654,
0.3600315451622009,
-0.2707870304584503,
0.06997528672218323,
-0.34135815501213074,
0.2806059420108795,
-0.3140159249305725,
0.045815739780664444,
-0.7208687663078308,
-0.3168257772922516,
0.7312756180763245,
-0.2682749927043915,
-0.3358035981655... | |
value is not empty, and i have tried putting in a string literal in its place and it is still blank in IE.
The code is:
```
$.each(data, function(key,value){
$("<option>").attr("value", key).attr("text",value).appendTo("#select1");
});
```
I would try to use .text() instead:
```
$.each(data,
function(... | [
-0.10492480546236038,
-0.09739355742931366,
0.5658537745475769,
-0.3778460919857025,
0.19503353536128998,
0.16169297695159912,
0.11600665003061295,
-0.27119335532188416,
0.1604267656803131,
-0.3317842483520508,
-0.49058350920677185,
0.8468812704086304,
-0.4613514542579651,
-0.2143143266439... | |
});
```
I think this is what you are going for? | [
0.5640197992324829,
0.2775713801383972,
0.12097825109958649,
-0.2592020332813263,
0.3698701858520508,
-0.18118621408939362,
0.06143980473279953,
0.39927244186401367,
0.0981096550822258,
-0.20305883884429932,
-0.004649932496249676,
0.4326344132423401,
-0.3619430959224701,
0.2560925483703613... | |
I am trying to write an IHttpHandler that can work with a request for streaming media coming from Windows Media Player/Silverlight. That means responding to a raw HTTP request like this (taken from the protocol document)
```
"GET /ms/contoso_100_files/0MM0.wmv HTTP/1.0"
"Accept: */*"
"User-Agent: NSPlayer/4.1.0.3925"
... | [
0.0072121648117899895,
-0.06458128988742828,
0.5155278444290161,
-0.042124707251787186,
-0.059797581285238266,
-0.16338354349136353,
0.43187275528907776,
-0.11658976972103119,
-0.13442204892635345,
-0.8703151941299438,
-0.07061782479286194,
0.47468841075897217,
-0.20768967270851135,
0.2517... | |
do with it is construct a secondary request of type HttpWebRequest. That also sports a similiar dictionary which I expect will also not be able to accept the two identical pragma values without one overwriting the other.
Am I missing something?
It obviously depends what you're installing As Colin Pickard pointed out, ... | [
0.5783333778381348,
-0.009641903452575207,
0.14041131734848022,
0.0012104781344532967,
0.12650857865810394,
-0.15178923308849335,
0.11835586279630661,
0.032820455729961395,
-0.252017080783844,
-0.4505477547645569,
-0.02937345765531063,
0.5457510948181152,
-0.11994980275630951,
0.1928666830... | |
above, that's not parallelised, whereas it could be. I suspect that installations are not necessarily optimised. They may well be the last thing that the team put together prior to release, and they may well figure that you're only going to do it once (and forget the pain upon completion). Obviously not an ideal state ... | [
0.5760725736618042,
-0.009103805758059025,
0.023196008056402206,
0.12582477927207947,
0.2005418837070465,
0.106246218085289,
0.3288712203502655,
0.0765097364783287,
-0.5323213934898376,
-0.3110199272632599,
0.11454924941062927,
0.47430849075317383,
-0.07627347111701965,
0.12715363502502441... | |
I want to develop an Java application that can detect the user logged on a Window Domain. These credentials are going to be used to logging on the Java application.
How can I do this?
Thanks!
```
System.getProperty("user.name")
``` | [
0.6383164525032043,
0.19572894275188446,
0.4156248867511749,
0.2566733658313751,
0.2738833427429199,
-0.31577906012535095,
0.3147369921207428,
0.18928632140159607,
-0.06989162415266037,
-0.7898505926132202,
-0.004770857281982899,
0.4941539168357849,
-0.07968319207429886,
0.2380981296300888... | |
Imagine I have the following 3 tables in SqlServer:
```
Customer (CustomerID, FirstName, LastName)
Address (AddressID, CustomerID, Line1, City, State)
Product (ProductID, CustomerID, Description)
```
A customer can have multiple delivery addresses and mulitple products.
What I would like to do is to list the number... | [
0.09328950941562653,
0.244810089468956,
0.5315963625907898,
-0.2641744613647461,
0.03535871580243111,
0.8040562272071838,
-0.026311302557587624,
-0.09792566299438477,
-0.32041242718696594,
-0.6243566870689392,
0.1062859371304512,
0.3562838137149811,
-0.10917972773313522,
0.614490807056427,... | |
| 0
OH | 18
```
I would normally do something like:
```
SELECT a.State, count(c.CustomerID)
FROM Product p
INNER JOIN Customer c ON c.CustomerID = p.CustomerID
LEFT JOIN Address a ON a.CustomerID = c.CustomerID
WHERE p.ProductID = 101
GROUP BY a.State
```
However, as a Customer may have multiple Addresses will ... | [
-0.21663402020931244,
0.2846010625362396,
0.5429708957672119,
-0.3163929879665375,
-0.07844918221235275,
0.3756963312625885,
-0.08314824849367142,
-0.3898600935935974,
-0.17086224257946014,
-0.6471248865127563,
-0.19393040239810944,
0.18208645284175873,
-0.22195813059806824,
0.349653601646... | |
ON a.CustomerID = c.CustomerID
AND a.AddressID =
(
SELECT MAX(AddressID)
FROM Address z
WHERE z.CustomerID = a.CustomerID
)
WHERE p.ProductID = 101
GROUP BY a.State
``` | [
-0.13131068646907806,
0.00989293958991766,
0.3757030963897705,
-0.17172512412071228,
0.14503483474254608,
0.2919324040412903,
-0.1260010004043579,
-0.21827147901058197,
0.12363993376493454,
-0.5909727811813354,
-0.42463359236717224,
0.27064287662506104,
-0.2876557409763336,
0.1568723320960... | |
Should my controllers names be in my native language or in English? What is the current best practice? And if in English, how do I make sure that the urls stays in my native tongue?
I know that my webapp won't be multilingual and I rather not write a lot of boilerplate.
The convention in ASP.NET MVC is that controlle... | [
0.24917787313461304,
0.18634609878063202,
0.37256699800491333,
-0.06348574906587601,
-0.2766750454902649,
-0.20465756952762604,
0.2994684875011444,
0.49108371138572693,
-0.2188669592142105,
-0.5380943417549133,
-0.26130911707878113,
0.2694547474384308,
-0.048916712403297424,
0.362029582262... | |
names will be in your native language and the rest of the code would be in English. If I were asked to debug a web site which displayed in some language I don't understand like Swahili, I would find it considerably easier to find the appropriate controller and action for a certain page if they reflected the Swahili URI... | [
0.29232728481292725,
0.1745205670595169,
0.19032765924930573,
0.08124610781669617,
-0.024463025853037834,
0.21440094709396362,
0.03598419949412346,
0.024215513840317726,
-0.033014386892318726,
-0.5322561860084534,
-0.30786195397377014,
0.13231512904167175,
-0.12183263897895813,
0.180230200... | |
i am using Microsoft.Reporting.WebForms.LocalReport to generate some PDF, everything works like a charm, but now evil marketing wants to use a custom font (they are using such crazy arguments as "corporate identity" and stuff).
i already goggled around and now i know that
* i need ReportViewer 2008 SP1 or greater
* t... | [
0.6352535486221313,
0.4017140865325928,
0.24882690608501434,
0.031033266335725784,
-0.40539172291755676,
-0.43047475814819336,
0.6518839001655579,
-0.40381336212158203,
0.24952661991119385,
-0.5468227863311768,
0.40257585048675537,
0.7016491293907166,
-0.2673827111721039,
0.051236405968666... | |
Reporting 2010 or later the following restrictions still apply
* Font must be marked as embedding allowed
* Font must be of type TrueType
You may experience the problem that your Font is getting embedded but your PDF still displays text in Arial. This happened to me after i installed some new fonts on a Windows Serve... | [
0.2316078245639801,
0.17136958241462708,
0.510675311088562,
0.12208292633295059,
-0.3194237947463989,
-0.1966741383075714,
0.5804020166397095,
-0.21381956338882446,
-0.02242918312549591,
-0.28435981273651123,
0.160366952419281,
0.4732728898525238,
-0.150224506855011,
-0.040296521037817,
... | |
We need to print a report periodically from a windows service, we use .NET 2.0.
We have modules that produce this report as a PDF or as an HTML file, PDF would be better because we have better control over the look of the report.
We also have the username, password and the name of the printer selected for the tas... | [
0.3422566056251526,
-0.20912936329841614,
0.39438289403915405,
0.29958871006965637,
-0.13267388939857483,
-0.23940354585647583,
0.12255983054637909,
-0.09057824313640594,
0.002499849535524845,
-0.5492137670516968,
-0.1334945410490036,
0.8482992649078369,
-0.2730525732040405,
-0.21923989057... | |
also we would need to guarantee it is intalled on our clients machines.
Do you have a solution for this, which may be in a third party component?
Thanks
We found this hidden pearl of open source library called [pdfprint#](http://sourceforge.net/projects/pdfprn/) that does exactly what we needed.
It seems it's... | [
0.5754103064537048,
-0.11134646087884903,
0.12368957698345184,
0.17345009744167328,
-0.11808602511882782,
-0.275142639875412,
-0.20989087224006653,
-0.1357107013463974,
-0.13580696284770966,
-0.229095920920372,
0.3667793869972229,
0.7536671161651611,
-0.06427014619112015,
-0.05784948170185... | |
Thanks all for your help! | [
0.2797894775867462,
0.3532085716724396,
0.2721917927265167,
0.2085869312286377,
-0.11258579045534134,
-0.25929439067840576,
0.6606026887893677,
0.7340393662452698,
-0.0328557975590229,
-0.5178576111793518,
-0.08835036307573318,
0.0016998087521642447,
0.3629721999168396,
0.26219984889030457... | |
I tried the following command unsuccessfully
```
sdiff <(ping www.nato.int) <(ping www.reuters.com)
```
**Is there any way to have a real-time comparison between ping times?**
> How will it be different to the web we know now?
Right now the HTML+CSS is centered more on structure and presentation. Semantics is about... | [
0.3249594569206238,
0.11168573051691055,
0.21456292271614075,
0.08145710080862045,
-0.5233321785926819,
-0.1212826669216156,
0.0495162159204483,
-0.2752269506454468,
-0.10909386724233627,
-0.6431093811988831,
-0.3567766547203064,
0.36441028118133545,
-0.3285036087036133,
-0.094319447875022... | |
or W3C's [RDFa](http://en.wikipedia.org/wiki/RDFa).
Less structured alternative to eRDF/RDFa are [microformats](http://microformats.org/wiki/microformats).
Read more at:
<http://en.wikipedia.org/wiki/Semantic_web> | [
0.25378474593162537,
-0.31366097927093506,
0.20931394398212433,
-0.15666839480400085,
-0.5426842570304871,
-0.2791603207588196,
-0.027128834277391434,
-0.42909836769104004,
-0.4114662706851959,
-0.33432820439338684,
-0.46923381090164185,
0.06541590392589569,
-0.2123701274394989,
-0.1675338... | |
Good afternoon, all.
We're currently making the jump from one web server to two and in order to provide seamless failover to our users we need to do something about the session.
Currently, we're investigating three different methods.
1. Make use of a state server
2. Make use of SQL server
3. Chuck everything into hi... | [
0.343818724155426,
-0.04254494979977608,
0.15923719108104706,
0.18301020562648773,
0.16626623272895813,
-0.1800030618906021,
0.4855472445487976,
-0.005391184706240892,
-0.317987859249115,
-0.6673905849456787,
0.13586480915546417,
0.4274163544178009,
-0.20705994963645935,
0.0777259543538093... | |
provided by a state server (our SQL server is replicated, so no troubles there).
Is there something that can be done about replicating the state server or some such?
After some more investigation we've decided to go with the StateServer option. We're still looking to see how to overcome the single point of failure on ... | [
0.023850759491324425,
-0.275860995054245,
0.10837001353502274,
0.3816957175731659,
0.15043234825134277,
-0.033596307039260864,
0.12142990529537201,
0.23723852634429932,
-0.41601431369781494,
-0.7311153411865234,
0.2222602516412735,
0.31328675150871277,
-0.035025160759687424,
0.269025593996... | |
at.
Option number two is to use session state paritioning and we're currently looking into this option as well: <http://msdn.microsoft.com/en-gb/magazine/cc163730.aspx> | [
-0.07796959578990936,
-0.2523537576198578,
-0.02143462747335434,
0.3521982431411743,
-0.17950522899627686,
-0.12986581027507782,
0.44788238406181335,
-0.06376194208860397,
-0.3214452862739563,
-0.6881849765777588,
-0.3132486641407013,
0.8240944147109985,
-0.3364742696285248,
-0.02641755342... | |
I have a combobox control hosted in a unbound DataGridView control. When the user selects an item (or types an entry and hits enter) I want it to apply the change and come out of edit mode.
Is this possible?
On the CurrentCellDirtyStateChanged event of your DataGridView, you can call the following code:
```
myDataGri... | [
0.25793540477752686,
-0.27278515696525574,
0.6354284286499023,
0.053194236010313034,
0.19948723912239075,
-0.1209908127784729,
0.22614409029483795,
-0.2612927556037903,
-0.03294270113110542,
-0.7049749493598938,
-0.15609975159168243,
0.5785374641418457,
-0.23110684752464294,
0.360969692468... | |
POCO = Plain Old CLR (or better: Class) Object
DTO = Data Transfer Object
In this [post](http://rlacovara.blogspot.com/2009/03/what-is-difference-between-dto-and-poco.html) there is a difference, but frankly most of the blogs I read describe POCO in the way DTO is defined: DTOs are simple data containers used for mov... | [
-0.3228702247142792,
-0.4967483878135681,
0.14065179228782654,
0.2516132593154907,
0.08298112452030182,
0.12974318861961365,
-0.5841469764709473,
0.26207035779953003,
-0.24931250512599945,
-0.21086116135120392,
-0.15614333748817444,
0.2134779393672943,
-0.22204238176345825,
-0.262020677328... | |
EJB implementations. POCO should be used in the same context in .Net. Don't let frameworks dictate your object's design.
A DTO's only purpose is to transfer state, and should have no behavior. See Martin Fowler's [explanation of a DTO](http://martinfowler.com/eaaCatalog/dataTransferObject.html) for an example of the u... | [
0.12071899324655533,
-0.1393590122461319,
0.08984187990427017,
0.04494507610797882,
-0.05454260855913162,
-0.11961632966995239,
0.04652991145849228,
-0.05458845943212509,
-0.2518601417541504,
-0.5895597338676453,
-0.2375500649213791,
0.2809159457683563,
-0.5717834234237671,
0.1450003981590... | |
since DTOs should be designed to transfer data, not to represent the true structure of the business domain. The result of this is that DTOs tend to be more flat than your actual domain.
In a domain of any reasonable complexity, you're almost always better off creating separate domain POCOs and translating them to DTOs... | [
0.05056785047054291,
-0.20675808191299438,
0.2801072895526886,
0.17127816379070282,
-0.14140334725379944,
-0.22432632744312286,
0.15068094432353973,
-0.0859953835606575,
-0.17842905223369598,
-0.6663897037506104,
-0.33202582597732544,
0.3841680884361267,
-0.16330265998840332,
0.13579969108... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.