text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
For homework, I was given the following 8 code fragments to analyze and give a Big-Oh notation for the running time. Can anybody please tell me if I'm on the right track?
```
//Fragment 1
for(int i = 0; i < n; i++)
sum++;
```
I'm thinking O(N) for fragment 1
```
//Fragment 2
for(int i = 0; i < n; i+=2)
sum... | [
0.08080802112817764,
0.2584740221500397,
-0.08775661140680313,
0.20587043464183807,
0.12667116522789001,
0.017780359834432602,
0.6957190632820129,
-0.2858004570007324,
-0.2398385852575302,
-0.4819851517677307,
0.08303701877593994,
0.5282574892044067,
0.1529330015182495,
-0.1840761303901672... | |
= 0; i < n; i+=2)
sum++;
for(int j = 0; j < n; j++)
sum++;
```
O(N) for fragment 4
```
//Fragment 5
for(int i = 0; i < n; i++)
for( int j = 0; j < n * n; j++)
sum++;
```
O(N^2) for fragment 5 but the n \* n is throwing me off a bit so I'm not quite sure
```
//Fragment 6
for(int i = 0; i < n; i... | [
0.04680166393518448,
0.030380183830857277,
0.0146644851192832,
-0.15432743728160858,
-0.1401916891336441,
0.19232437014579773,
0.7813377976417542,
-0.6029019951820374,
-0.3129898011684418,
-0.37952521443367004,
-0.28837502002716064,
0.4015340507030487,
-0.014232755638659,
0.168863505125045... | |
sum++;
```
O(N^2) for fragment 6 as well
```
//Fragment 7
for(int i = 0; i < n; i++)
for( int j = 0; j < n * n; j++)
for(int k = 0; k < j; k++)
sum++;
```
O(N^3) for fragment 7 but once again the n \* n is throwing me off
```
//Fragment 8
for(int i = 1; i < n; i = i * 2)
sum++;
```
O... | [
-0.13115932047367096,
0.2638421654701233,
0.027291832491755486,
-0.22313210368156433,
-0.2766708731651306,
0.17800326645374298,
0.5385130047798157,
-0.4721984267234802,
-0.2467813342809677,
-0.4705406129360199,
-0.2531522214412689,
0.23759528994560242,
-0.05233784019947052,
0.5473855733871... | |
also looks like O(log(n)) for fragment 8.
For the n \* n problems, you have to execute the body of the loop n \* n times, so it would be O(n^2), then you compound that with the order of the other code. Fragment 8 actually doubles the counter instead of incrementing it, so the larger the problem, the less additional wo... | [
0.044818803668022156,
0.07818689197301865,
0.2766282558441162,
-0.12484648078680038,
-0.17173513770103455,
0.266402006149292,
0.48263174295425415,
-0.19999612867832184,
-0.7373947501182556,
-0.3794444501399994,
0.01340282242745161,
0.3525196611881256,
-0.21979819238185883,
0.17216183245182... | |
I keep wondering how does a debugger work? Particulary the one that can be 'attached' to already running executable. I understand that compiler translates code to machine language, but then how does debugger 'know' what it is being attached to?
The details of how a debugger works will depend on what you are debugging, ... | [
0.44905367493629456,
0.26714468002319336,
0.17719291150569916,
0.1713963747024536,
-0.05587591975927353,
-0.16765448451042175,
0.028473563492298126,
-0.01247015967965126,
-0.020913926884531975,
-0.4640188217163086,
-0.3904695212841034,
0.3980342447757721,
-0.27343419194221497,
0.3481778502... | |
the process ID, and initiate the debug session via a system call; under Windows this would be [DebugActiveProcess](http://msdn.microsoft.com/en-us/library/ms679295(VS.85).aspx).
Once attached, the debugger will enter an event loop much like for any UI, but instead of events coming from the windowing system, the OS wil... | [
-0.14704424142837524,
-0.21840883791446686,
0.2336893230676651,
0.0495280958712101,
0.1408272683620453,
-0.038452550768852234,
0.21158327162265778,
-0.18831168115139008,
-0.15504524111747742,
-0.4483717679977417,
-0.5775924921035767,
0.560778021812439,
-0.20174795389175415,
0.3291169106960... | |
from symbol files to translate from addresses to variable names and locations in the source code. The symbol file information is a separate set of APIs and isn't a core part of the OS as such. On Windows this is through the [Debug Interface Access SDK](http://msdn.microsoft.com/en-us/library/x93ctkx8.aspx).
If you are... | [
0.21341514587402344,
-0.007615841459482908,
0.1733512431383133,
0.04397323727607727,
0.1413739174604416,
-0.0722218006849289,
0.2102443426847458,
-0.10537885874509811,
-0.03525356575846672,
-0.7450261116027832,
-0.3511247932910919,
0.06213017925620079,
-0.11764279007911682,
0.1550851762294... | |
As mentioned in many of my previous questions, I'm working through K&R, and am currently into the preprocessor. One of the more interesting things — something I never knew before from any of my prior attempts to learn C — is the `##` preprocessor operator. According to K&R:
> The preprocessor operator `##`
> provides... | [
-0.23457525670528412,
0.22898629307746887,
0.36476680636405945,
-0.11749811470508575,
0.3555667996406555,
0.28125742077827454,
-0.12663668394088745,
0.12400992959737778,
-0.15210549533367157,
-0.6451809406280518,
-0.1587233543395996,
0.6403186917304993,
-0.0852300226688385,
0.0667662322521... | |
is re-scanned.
> For example, the macro `paste`
> concatenates its two arguments:
>
>
> `#define paste(front, back) front ## back`
>
>
> so `paste(name, 1)` creates the token
> `name1`.
How and why would someone use this in the real world? What are practical examples of its use, and are there gotchas to conside... | [
0.14119043946266174,
-0.04691529646515846,
0.21981121599674225,
-0.06158638745546341,
-0.15095263719558716,
-0.055635515600442886,
-0.08619403839111328,
0.06891921162605286,
-0.4519160985946655,
-0.7488808631896973,
-0.008298579603433609,
0.09662888199090958,
-0.28937071561813354,
-0.00995... | |
string. This probably looks like it is really pointless, but they do it for a good reason.
```
std::wstring BuildDate = std::wstring(WIDEN(__DATE__)) + L" " + WIDEN(__TIME__);
```
They use it with another macro that returns a string with the date and time.
Putting `L` next to a `__ DATE __` would give you a compil... | [
0.06240737810730934,
0.020009469240903854,
0.3792385458946228,
-0.16601887345314026,
-0.04060906916856766,
-0.20854303240776062,
0.16078923642635345,
0.08642399311065674,
-0.3833068311214447,
-0.7019361257553101,
-0.30932265520095825,
0.1543429046869278,
-0.21012872457504272,
0.40384042263... | |
names:**
I've also seen it used in code to define accessors and modifiers:
```
#define MYLIB_ACCESSOR(name) (Get##name)
#define MYLIB_MODIFIER(name) (Set##name)
```
Likewise you can use this same method for any other types of clever name creation.
---
**Various libraries, using it to make several variable declara... | [
0.126984640955925,
0.04257712885737419,
0.5238879323005676,
-0.0035863956436514854,
-0.1513667106628418,
0.023303663358092308,
0.23450252413749695,
-0.3188994526863098,
-0.12737606465816498,
-0.5464741587638855,
0.1204548105597496,
0.45977115631103516,
-0.26928865909576416,
0.5966836810112... | |
I've been looking around the System.Xml namespace, but don't see anything that would support this. Does anyone know if it's built into .Net, or would I have to obtain a third party library to do it?
NOTE: I wish it were as simple as generating an xsd, but that won't do for my specific situation.
It would be very easy ... | [
0.5026102662086487,
-0.026894593611359596,
-0.05600772425532341,
0.36829349398612976,
-0.14240220189094543,
-0.35826346278190613,
0.3375478684902191,
0.39691564440727234,
-0.022701293230056763,
-0.6282688975334167,
-0.043311990797519684,
0.3824571669101715,
-0.22712081670761108,
0.02674890... | |
create a grammar that generates files "like this one", and this is a hard AI problem.
Edit: This problem is known as "Grammar Induction" or "Grammar Inference". | [
0.1273280531167984,
-0.05107717961072922,
-0.7637072801589966,
0.329697847366333,
-0.3671693205833435,
-0.4056565761566162,
0.32888951897621155,
-0.22280752658843994,
0.10683412104845047,
-0.3049744963645935,
-0.362775593996048,
0.4904055893421173,
-0.6811296939849854,
-0.224757581949234,
... | |
I have sets of values in rows in Excel
First row contains weights of how much each value in each column contributes to weighted total.
Now, I want to mark in each following row the value that contributed to the weighted total the most, by changing its background. I played with conditional formatting, but my Excel skill... | [
-0.04825277626514435,
0.1237252727150917,
0.48956772685050964,
-0.1384579986333847,
-0.1375483274459839,
0.35482922196388245,
0.016997411847114563,
-0.43291428685188293,
-0.3175223767757416,
-0.21894370019435883,
0.29272738099098206,
0.7776669859886169,
0.0034081756602972746,
-0.2213466912... | |
Excel users may notice that if this formula was entered in a worksheet cell it would have to be entered as an array formula to give the correct value. The trick here is that when formulae are used in conditional formats they are always treated as array formulae; no Ctrl-Shift-Enter required. | [
-0.027703694999217987,
0.10062570869922638,
-0.01114592794328928,
-0.01357673667371273,
-0.23660655319690704,
-0.3634003698825836,
0.010796737857162952,
-0.10407207906246185,
0.07601408660411835,
-0.1673387885093689,
-0.2666895389556885,
0.6354436278343201,
-0.09146641939878464,
-0.4581799... | |
I will be entering my third year of university in my next academic year, once I've finished my placement year as a web developer, and I would like to hear some opinions on the two modules in the Title.
I'm interested in both, however I want to pick one that will be relevant to my career and that I can apply to systems... | [
0.6739203333854675,
0.28572237491607666,
0.47453731298446655,
-0.1687733680009842,
0.12076612561941147,
-0.33063486218452454,
0.33624279499053955,
0.4232427775859833,
-0.36678555607795715,
-0.7346363067626953,
0.2727191746234894,
0.596940815448761,
0.5165863633155823,
-0.04299785569310188,... | |
not to limit myself to that area of development.
I know HCI would help me as a web developer, but do you think it's worth it? Do you think Neural Network knowledge could help me realistically in a system I write in the future?
Thanks.
**EDIT:
I thought it would be useful to follow-up with what I decided to do and ho... | [
0.6767001152038574,
-0.027678977698087692,
0.17232473194599152,
0.19665105640888214,
0.14214153587818146,
-0.020845962688326836,
0.017415020614862442,
0.34797102212905884,
-0.37650763988494873,
-0.6848478317260742,
0.18342971801757812,
0.3489651381969452,
0.5203284621238708,
-0.01977490261... | |
a few years from now when I can afford it.
I have got a job which I am starting after my final exams (which are in a few days) and I was indeed asked if I had done a module in HCI or similar. It didn't seem to matter, as it isn't a front-end developer position!
I would recommend taking the module if you have it as an... | [
0.5893831253051758,
0.06949072331190109,
0.32730844616889954,
0.06708334386348724,
0.18841677904129028,
-0.15957893431186676,
0.07464639842510223,
0.1991897076368332,
-0.17620839178562164,
-0.5003777742385864,
0.2562299966812134,
0.27656081318855286,
0.7321145534515381,
0.26011401414871216... | |
are you with the topic already?
* How good is the course/class you want to take?
* What are your interested in more?
Especially for HCI, there is a broad range of "common sense" information you would also easily obtain from reading a good book or a wider range of articles about it also published on the internet. On th... | [
0.6772248148918152,
0.038737017661333084,
0.2465776801109314,
0.3140909671783447,
-0.12182304263114929,
-0.3896230161190033,
0.05386219546198845,
0.2593192458152771,
-0.4307273328304291,
-0.5617126226425171,
0.22147490084171295,
0.4894288182258606,
0.42653703689575195,
0.11510185152292252,... | |
say that this is a typical hype topic. It would be mainly interesting in what application domain the course wants to deal with neural networks. You can be quite sure that you won't program or use any neural networks for web development. On the other hand, if the course is done right, this could be a good opportunity fo... | [
0.7392593026161194,
-0.07224526256322861,
0.25343719124794006,
0.5926165580749512,
-0.05689660832285881,
-0.4296978712081909,
-0.26982980966567993,
0.16466043889522552,
-0.3068690001964569,
-0.2283201962709427,
0.16644570231437683,
0.4252356290817261,
0.36814552545547485,
0.272979110479354... | |
feel incompetent in that topic (then it is a must) or it is done very well. Neural Networks is a topic which has more potential of being really interesting hardcore computer science stuff, where you indeed learn a better understanding about something. If you are interested in NN, you should not pass the opportunity to ... | [
0.4935273230075836,
-0.15343742072582245,
-0.04770400747656822,
0.42901578545570374,
-0.03594321012496948,
-0.5290165543556213,
0.06411100924015045,
0.5372278690338135,
-0.45139312744140625,
-0.5250683426856995,
-0.04281989485025406,
0.7426202297210693,
0.3655182719230652,
0.10720827430486... | |
I have a button on an ASP.Net page that will call Response.Redirect back to the same page after performing some processing in order to re-display the results of a query. However, for some reason, the page comes up blank. It seems that IsPostBack is returning true after the redirect. Anybody know why this would happen?
... | [
0.17921720445156097,
-0.04741976782679558,
0.6413460373878479,
-0.03941242769360542,
-0.2136283814907074,
-0.11371228098869324,
0.356232613325119,
-0.17210878431797028,
-0.2545165419578552,
-0.956752598285675,
0.1852666586637497,
0.3533758521080017,
-0.17578895390033722,
0.4209482669830322... | |
da = new SqlDataAdapter("SELECT * FROM ge_vw_NonResidents", connStr);
DataTable tbl = new DataTable();
da.Fill(tbl);
da.Dispose();
rptNonResidents.DataSource = tbl;
rptNonResidents.DataBind();
}
}
void btnApprove_Command(object sender, CommandEventArgs e)
{
// Code remov... | [
-0.12087788432836533,
-0.2947940528392792,
0.34276142716407776,
-0.2610812783241272,
-0.05181850492954254,
0.19187486171722412,
0.5703975558280945,
-0.4839875400066376,
-0.20617972314357758,
-0.4802572727203369,
-0.10341639816761017,
0.6395986676216125,
-0.24694883823394775,
0.259433597326... | |
Once I changed that to true it worked.
I also took tvanfosson suggestion. This allows me to display a confirmation message. I can easily check to see if the action has already been taken and safely ignore it. Since I'm likely the only one to ever see this screen, I'm not too concerned with usability. | [
0.6776271462440491,
0.022641092538833618,
0.63887619972229,
-0.07819131761789322,
-0.006104486063122749,
-0.1173054501414299,
0.665986955165863,
-0.1254795342683792,
0.12073215842247009,
-0.22585263848304749,
0.23074616491794586,
0.7408639192581177,
-0.046414438635110855,
-0.01621982455253... | |
Using Apache's commons-httpclient for Java, what's the best way to add query parameters to a GetMethod instance? If I'm using PostMethod, it's very straightforward:
```
PostMethod method = new PostMethod();
method.addParameter("key", "value");
```
GetMethod doesn't have an "addParameter" method, though. I've discove... | [
0.06180272996425629,
0.11386775225400925,
0.3763540983200073,
0.22303521633148193,
-0.349221408367157,
-0.2742166221141815,
0.3640593886375427,
-0.5007166862487793,
-0.06610159575939178,
-0.603736937046051,
0.047185223549604416,
0.4031941592693329,
-0.453736811876297,
0.08432590216398239,
... | |
those other HttpMethodParams methods intended to be used for?
Post methods have post parameters, but [get methods do not](http://www.cs.tut.fi/~jkorpela/forms/methods.html).
Query parameters are embedded in the URL. The current version of HttpClient accepts a string in the constructor. If you wanted to add the key, va... | [
-0.21632477641105652,
-0.1704360544681549,
0.8430810570716858,
0.008526984602212906,
-0.26831725239753723,
-0.190934956073761,
0.3144659399986267,
-0.4274686872959137,
-0.016805434599518776,
-0.7543737292289734,
-0.25901034474372864,
0.3551918566226959,
-0.38054871559143066,
0.069644302129... | |
Is it possible to see the return value of a method after the line has been run and before the instruction pointer returns to the calling function?
I am debugging code I can't modify *(read: don't want to re-compile a third party library)*, and sometimes it jumps to code I don't have source to or the return expression ... | [
0.37417370080947876,
0.08940516412258148,
0.2360687106847763,
-0.17954976856708527,
-0.04018186032772064,
-0.13191397488117218,
0.7025936245918274,
-0.03995034098625183,
-0.15751875936985016,
-0.4546850621700287,
0.04430285096168518,
0.484599769115448,
-0.2133542150259018,
0.14936792850494... | |
before control returns to the calling function).
**UPDATE:** I can't use the expression viewer as there are side-effects in the statement.
This feature was added to Eclipse version 4.7 M2 under [Eclipse bug 40912](https://bugs.eclipse.org/bugs/show_bug.cgi?id=40912).
To use it:
* step over the `return` statement (us... | [
-0.1302580088376999,
-0.35270562767982483,
0.8182356953620911,
-0.1255190074443817,
-0.12677544355392456,
0.03713734447956085,
0.17501984536647797,
-0.36287814378738403,
0.14878909289836884,
-0.3239001929759979,
-0.25832483172416687,
0.6772580146789551,
-0.322448194026947,
-0.2109156548976... | |
I would like to know how long it's been since the user last hit a key or moved the mouse - not just in my application, but on the whole "computer" (i.e. display), in order to guess whether they're still at the computer and able to observe notifications that pop up on the screen.
I'd like to do this purely from (Py)GTK... | [
0.46973684430122375,
0.07675468176603317,
0.29990604519844055,
-0.2642833888530731,
0.19307731091976166,
-0.07360851764678955,
0.13516740500926971,
0.11082933098077774,
-0.375031054019928,
-0.34329694509506226,
-0.0850166380405426,
0.4932768642902374,
0.29157423973083496,
0.022668190300464... | |
as I know what I'm actually looking for.
On Windows I think the function I want is [`GetLastInputInfo`](http://msdn.microsoft.com/en-us/library/ms646302.aspx), but that doesn't seem to be wrapped by pywin32; I hope I'm missing something.
[Gajim](http://www.gajim.org/) does it this way on Windows, OS X and GNU/Linux (a... | [
-0.07263565063476562,
-0.11624463647603989,
0.43357932567596436,
-0.1829788237810135,
-0.04555315524339676,
0.058571647852659225,
0.42198339104652405,
-0.19614656269550323,
-0.7058929800987244,
-0.5487595200538635,
-0.2281164824962616,
0.5676172375679016,
-0.2248622328042984,
-0.0536889880... | |
current source for possible further improvements and changes. | [
0.21803414821624756,
-0.011799468658864498,
0.4332424998283386,
0.1377377212047577,
0.5140731334686279,
-0.1513288915157318,
-0.1591833084821701,
0.05471574515104294,
-0.10032456368207932,
-0.6656169295310974,
-0.1526629775762558,
-0.03279702737927437,
0.056823279708623886,
0.1865108609199... | |
I have a revision that has been committed to SVN trunk which I would like to roll back. However, I would like to retain the changes in some fashion such as a branch or even a patch file. Any suggestions?
Reverse-merge (I think that was the term), commit and that's all.
For the "reverse-merge" part - TSVN has this cool... | [
0.3999297618865967,
-0.1918923556804657,
0.7257789373397827,
0.06843005120754242,
0.2127866894006729,
-0.19981014728546143,
0.17954932153224945,
0.21240878105163574,
-0.5652689337730408,
-0.6607499718666077,
-0.11193518340587616,
0.49221158027648926,
0.004815403372049332,
0.255867451429367... | |
revision..." or by using the aforementioned "shortcuts". | [
-0.02974083460867405,
-0.03859681636095047,
0.30757907032966614,
0.23048575222492218,
0.2834346890449524,
0.12601356208324432,
0.10900458693504333,
-0.030513064935803413,
-0.22517603635787964,
-0.68413245677948,
-0.3512546718120575,
0.2070913314819336,
0.06610918790102005,
0.09251806139945... | |
I have multiple layers in an application and i find myself having to bubble up events to the GUI layer for doing status bar changes, etc . . I find myself having to write repeated coded where each layer simply subscribes to events from the lower layer and then in the call back simply raise an event up the chain. Is the... | [
0.3431459367275238,
-0.13476218283176422,
0.09474620223045349,
0.1209685429930687,
0.0798308327794075,
-0.12372490763664246,
0.18290653824806213,
-0.07903364300727844,
-0.10149316489696503,
-0.5343314409255981,
0.038678236305713654,
0.4704309105873108,
-0.3285636007785797,
-0.0259285327047... | |
event.
For example, if you have a UserControl with a "SaveButtonClick" event, and all you want to do when is call the event handler when the "SaveButton" on your UserControl is clicked, you can do this:
```
public event EventHandler SaveButtonClick
{
add { this.SaveButton.Click += value; }
remove { this.SaveB... | [
-0.10256839543581009,
-0.3420409858226776,
0.04701915755867958,
-0.3069517910480499,
0.017762847244739532,
-0.221749946475029,
0.22889961302280426,
-0.09627732634544373,
-0.3168243169784546,
-0.5322229266166687,
-0.3461420238018036,
0.8343364000320435,
-0.49516817927360535,
0.0726171955466... | |
Here are the requirements:
Must be alphanumeric, 8-10 characters so that it is user friendly. These will be stored as unique keys in database. I am using Guids as primary keys so an option to use GUids to generate these unique Ids would be preferable.
I am thinking on the lines of a base-n converter that takes a Guid... | [
0.340167760848999,
0.27062100172042847,
0.2932950556278229,
0.1304921805858612,
-0.11791501194238663,
0.06108275428414345,
0.0037512308917939663,
-0.1901388019323349,
-0.002325918059796095,
-0.4871116578578949,
-0.07343335449695587,
0.5733562111854553,
-0.20051607489585876,
-0.070429988205... | |
mixed up with 1 (one) and 0 (zero). Some people might complain about 2 and Z as well. | [
0.3396928906440735,
0.12421482801437378,
-0.15377353131771088,
0.098771832883358,
-0.12735161185264587,
-0.24534441530704498,
0.04226083308458328,
-0.006641681306064129,
0.06519128382205963,
-0.06615261733531952,
0.054382577538490295,
-0.025732750073075294,
-0.3586197793483734,
0.202396437... | |
Let's say that you have overridden an object's equals() and hashCode() methods, so that they use the object's fields.
How you do you check if two references are to the same object, ala the stock equals() method?
Use `==` on objects to perform identity comparison.
That is what the default implementation of `equals()` ... | [
0.17273874580860138,
0.16518284380435944,
0.10531695932149887,
0.23967474699020386,
0.09894073009490967,
-0.45561903715133667,
0.15834783017635345,
-0.09847047179937363,
0.04777359962463379,
-0.39407965540885925,
0.2527432441711426,
0.6093253493309021,
-0.2218407541513443,
0.09693547338247... | |
I've been trying to figure out how to retrieve the text selected by the user in my webbrowser control and have had no luck after digging through msdn and other resources, So I was wondering if there is a way to actually do this. Maybe I simply missed something.
I appreciate any help or resources regarding this.
Thank... | [
0.34918439388275146,
-0.21671411395072937,
0.5535343289375305,
0.24965710937976837,
-0.03966657444834709,
-0.2752917408943176,
0.3521477282047272,
-0.019799798727035522,
0.0765756219625473,
-0.872820258140564,
-0.10643722862005234,
0.9686797261238098,
0.06567324697971344,
0.103545777499675... | |
need to add a reference to your project to the Microsoft.mshtml assembly normally at "C:\Program Files\Microsoft.NET\Primary Interop Assemblies\Microsoft.mshtml.dll". There may be more than one, make sure you choose the reference with this path.
Then to get the current text selection, for example:
```
using mshtml;
... | [
0.04683071747422218,
-0.21760421991348267,
0.9183618426322937,
0.1987365037202835,
0.21684305369853973,
-0.12664315104484558,
0.08105037361383438,
-0.3978613615036011,
-0.07956583052873611,
-0.6979502439498901,
-0.1492893248796463,
0.16974882781505585,
-0.3997035622596741,
0.16265177726745... | |
MessageBox.Show(range.text);
}
}
```
For more information on accessing the full DOM from a .NET application, see:
* [Walkthrough: Accessing the DHTML DOM from C#](http://msdn.microsoft.com/en-us/library/aa290341(VS.71).aspx)
* [IHTMLDocument2 Interface reference](http://msdn.microsoft.com/en-us/library/... | [
-0.26541802287101746,
-0.08731595426797867,
0.631178081035614,
-0.26371482014656067,
-0.08348256349563599,
-0.05604083091020584,
0.5347964763641357,
-0.0729026347398758,
-0.23386970162391663,
-0.5976598858833313,
-0.5524107217788696,
0.6862657070159912,
-0.23001667857170105,
0.191614419221... | |
What kind of collection I should use to convert NameValue collection to be bindable to GridView?
When doing directly it didn't work.
**Code in aspx.cs**
```
private void BindList(NameValueCollection nvpList)
{
resultGV.DataSource = list;
resultGV.DataBind();
}
```
**Code in aspx**
```
<asp:GridView... | [
0.1873919665813446,
-0.29143577814102173,
0.6663205623626709,
0.14449790120124817,
-0.41117873787879944,
-0.15850137174129486,
0.01208362728357315,
-0.4751013517379761,
-0.2252131998538971,
-0.6243501305580139,
0.009526803158223629,
0.47827956080436707,
-0.15277831256389618,
0.129403635859... | |
LINQ as so:
```
resultGV.DataSource = from item in nvpDictionary
select new { Key = item.Key, Value = item.Value };
resultGV.DataBind();
```
[EDIT] Actually you may be able to use Dictionary directly as:
```
resultGV.DataSource = nvpDictionary;
resultGV.DataBind();
```
If it doesn't map key/... | [
-0.0014527563471347094,
-0.07650518417358398,
0.6828228831291199,
-0.04285092279314995,
-0.07630614191293716,
-0.199622243642807,
-0.047879237681627274,
-0.41009894013404846,
-0.0285512525588274,
-0.3749793767929077,
-0.19767136871814728,
0.6279544234275818,
-0.24996156990528107,
-0.090079... | |
to it.
```
private void BindList(NameValueCollection nvpList)
{
Dictionary<string,string> temp = new Dictionary<string,string>();
foreach (string key in nvpList)
{
temp.Add(key,nvpList[key]);
}
resultGV.DataSource = temp;
resultGV.DataBind();
}
```
If you do this a lot, you could write an ex... | [
-0.0031605104450136423,
-0.2566281259059906,
0.4990287125110626,
-0.18839174509048462,
0.23157048225402832,
-0.017639251425862312,
0.13541948795318604,
-0.39268016815185547,
-0.13753624260425568,
-0.4342479109764099,
-0.37288740277290344,
0.7520344853401184,
-0.2615942060947418,
0.21967798... | |
{
temp.Add(key,collection[key]);
}
return temp;
}
}
private void BindList(NameValueCollection nvpList)
{
resultGV.DataSource = nvpList.ToDictionary();
resultGV.DataBind();
}
``` | [
0.09931830316781998,
-0.3823016583919525,
0.4228489398956299,
-0.26890408992767334,
0.21474705636501312,
0.017195597290992737,
0.4116344749927521,
-0.4387018382549286,
-0.3186649978160858,
-0.28421229124069214,
-0.2651998996734619,
0.5521894097328186,
-0.42849284410476685,
0.20936225354671... | |
Is there a way to spawn a new window via javascript in IE7 that hides the statusbar?
I've added the intranet app as a trusted site. Not sure what else I can use to try. This is my JS
```
window.open("http:/localhost/start.html", "MyApp", "left=0, top=0, width=" + screen.width + "," +
"he... | [
0.19460263848304749,
-0.0640348568558693,
0.7443996071815491,
-0.1961817890405655,
0.11878350377082825,
-0.17148256301879883,
0.47113361954689026,
0.40191951394081116,
-0.14131826162338257,
-1.176487922668457,
-0.18846110999584198,
0.5320854187011719,
-0.016065426170825958,
0.0959646552801... | |
"resizable=yes, location=no, menubar=no, titlebar=no, " + "toolbar=no, status=no");
```
**No.** Microsoft decided that **"in the name of security"** ([IE Blog Link](http://blogs.msdn.com/ie/archive/2006/08/25/719355.aspx)) they would force the status bar to show on popup windows in IE7. (they also force a new minimum ... | [
-0.1619400531053543,
-0.19382724165916443,
0.7345322966575623,
-0.07763558626174927,
0.27851083874702454,
-0.08868855237960815,
0.519750714302063,
0.3375701308250427,
-0.4918549954891205,
-0.7507885098457336,
-0.7150864601135254,
0.4651510715484619,
-0.1376572549343109,
0.1624065786600113,... | |
I'm working on a C# program, and right now I have one `Form` and a couple of classes. I would like to be able to access some of the `Form` controls (such as a `TextBox`) from my class. When I try to change the text in the `TextBox` from my class I get the following error:
> An object reference is required for the non-... | [
0.4660944938659668,
0.24780824780464172,
0.19841882586479187,
0.11267948895692825,
0.005912888795137405,
-0.2020336389541626,
0.2825907766819,
-0.11048489063978195,
-0.11607202142477036,
-0.5069195628166199,
0.06065421178936958,
0.5769362449645996,
-0.23388133943080902,
0.254013329744339,
... | |
to beginners, but you are effectively trying to open your house door by picking up the door on your house plans.
If you actually wanted to access the form components directly from a class (which you don't) you would use the variable that instantiates your form.
Depending on which way you want to go you'd be better o... | [
0.29875025153160095,
0.04775611311197281,
0.35910046100616455,
-0.000019786411940003745,
0.10471325367689133,
-0.2509591281414032,
0.3928009867668152,
-0.45505061745643616,
-0.08311079442501068,
-0.8198355436325073,
-0.42704328894615173,
0.3259028196334839,
-0.15044540166854858,
0.24725158... | |
get
{
return textBox1.Text;
}
set
{
textBox1.Text = value;
}
}
``` | [
-0.23274077475070953,
0.0512421689927578,
0.3795194625854492,
-0.18153880536556244,
0.08664707839488983,
0.12901994585990906,
0.3888210952281952,
-0.042841143906116486,
0.04464796558022499,
-0.6413123607635498,
-0.5951731204986572,
0.7046381831169128,
-0.3959428668022156,
-0.17025581002235... | |
I've looked at [Microsoft GLEE](http://blogs.msdn.com/powershell/archive/2007/11/27/graphing-with-glee.aspx) (non-commerical use) and other libraries for drawing graphs, but I need a good commercial use graph API to show complex routes through the Internet.
I need to be able to show a large number of nodes and vertexe... | [
0.3194778263568878,
-0.11174678802490234,
0.21709929406642914,
0.19703109562397003,
-0.21513663232326508,
-0.012453756295144558,
0.35793337225914,
0.20584125816822052,
-0.4821875989437103,
-0.7135952115058899,
0.20716986060142517,
0.08539586514234543,
-0.17828352749347687,
-0.3206209838390... | |
I've been using tags in my projects. I was browsing the custom tags on grails.org to find some new tags for my library.
<http://www.grails.org/Contribute+a+Tag>
I was wondering if people in the StackOverflow community have a favorite custom tag that they would like to share.
The [Graphviz resources page](http://www.g... | [
0.4879988431930542,
-0.15436188876628876,
0.16979190707206726,
0.17223289608955383,
0.05023570358753204,
0.006701550912111998,
0.11067500710487366,
0.2231503576040268,
-0.798953652381897,
-0.5159027576446533,
0.32735633850097656,
0.12453057616949081,
-0.23075832426548004,
-0.14825896918773... | |
After reading [this discussion](https://stackoverflow.com/questions/36127/any-recommended-vc-settings-for-better-pdb-analysis-on-release-builds) and [this discussion](https://stackoverflow.com/questions/49224/good-crash-reporting-library-in-c) about using CrashRpt to generate a crash dump and email it to the developers... | [
0.37040552496910095,
0.3329905569553375,
0.0808844268321991,
0.018171198666095734,
-0.002409984590485692,
-0.3410773277282715,
0.030364256352186203,
-0.17688558995723724,
0.0037710631731897593,
-0.5263622403144836,
-0.14579077064990997,
0.696408212184906,
-0.3007785677909851,
-0.1178102046... | |
CrashRpt dialog box pops up and when I enter my email address and click the send button, it takes me to a "Save File" dialog box where I can save the zipped package and the account specified in the Install() function never receives an email.
Thanks in advance for any and all help! I'm clearly missing something.
**What... | [
0.33488836884498596,
0.12368463724851608,
0.2258586585521698,
0.30185666680336,
-0.014052722603082657,
-0.03679097816348076,
0.05959975719451904,
0.23581385612487793,
-0.43778547644615173,
-0.6855590343475342,
0.11074541509151459,
0.7271245121955872,
-0.03062606416642666,
-0.03345952555537... | |
of CrashRpt, we modified it a bit though to call a web service that we created which submits the crash report. So we gutted the emailing code completely from CrashRpt. And instead we have in our bug tracking system a section for crashes that were auto submitted when crashes happen.
**To find your problem:**
I would ... | [
0.35814544558525085,
0.21196672320365906,
0.07311832159757614,
0.46873897314071655,
-0.10532233864068985,
-0.34296733140945435,
0.4605303108692169,
0.586283802986145,
-0.4462718963623047,
-0.44325461983680725,
0.14603106677532196,
0.5033807158470154,
-0.38649430871009827,
0.164440199732780... | |
code will tell you this though.
Most likely MailReport is being called but is failing.
Set a breakpoint in the original [CrashRpt code](http://code.google.com/p/crashrpt/)'s CrashHandler.cpp at just after the DoModal:
```
mainDlg.m_pUDFiles = &m_files;
if (IDOK == mainDlg.DoModal())
{
//Put breakpoint... | [
-0.3166722357273102,
0.12161852419376373,
0.5739448070526123,
0.11646866798400879,
0.4388091266155243,
0.10580886900424957,
0.31682610511779785,
-0.11228706687688828,
-0.2545068562030792,
-0.590115487575531,
-0.4351658821105957,
0.2386225461959839,
-0.37516212463378906,
0.3344339430332184,... | |
MailReport is not getting called. It's either the dialog resource, or your m\_sTo is not filled or you can step through MailMsg.cpp and see where MAPI is failing.
**Alternate solution:**
An easy fix, if you find above that MailReport is being called, but not succeeding, is to instead just do a ShellExecute and speci... | [
-0.007815543562173843,
-0.059629835188388824,
0.4377717673778534,
0.07482460141181946,
0.2826941907405853,
-0.21233873069286346,
0.4890386164188385,
0.060582235455513,
-0.0555984228849411,
-0.8199834227561951,
-0.11476286500692368,
0.8120615482330322,
-0.4619296193122864,
0.120580174028873... | |
I have a text file of this format:
```
L O A D C A S E 1 O F 2 ...
J O I N T D I S P L A C E M E N T S (global)
Joint X-dsp Y-dsp Z-dsp | [
-0.1989077925682068,
0.20464017987251282,
0.5272889733314514,
-0.16360481083393097,
0.004859600681811571,
0.09030438214540482,
0.08948884904384613,
0.05959072336554527,
-0.2837955057621002,
-0.2857460379600525,
-0.2665528953075409,
0.33640775084495544,
-0.2710389494895935,
0.24135051667690... | |
X-rot Y-rot Z-rot
1 0.0 0.0 0.0 0.0 0.0 -0.001712
2 0.000646 -0.021756 0.0 | [
-0.2951262295246124,
0.4597470462322235,
0.13966447114944458,
0.012409226968884468,
-0.24582068622112274,
0.634087860584259,
0.22808188199996948,
-0.43683671951293945,
0.11954250186681747,
-0.48257502913475037,
-0.18939295411109924,
0.0733540952205658,
-0.24773672223091125,
0.4834869801998... | |
0.0 0.0 -0.001339
3 0.003562 -0.038487 0.0 0.0 0.0 -0.000727
4 0.006478 -0.041661 0.0 0.0 | [
-0.3908495008945465,
0.41574743390083313,
0.044394202530384064,
0.18243902921676636,
0.04573862627148628,
0.13425537943840027,
0.2628888487815857,
-0.0900769904255867,
0.04116937145590782,
-0.2236652970314026,
-0.03305460885167122,
0.35130032896995544,
-0.2731453478336334,
0.57153773307800... | |
0.0 0.000104
5 0.009536 -0.036266 0.0 0.0 0.0 0.000720
6 0.012595 -0.022824 0.0 0.0 0.0 | [
-0.36358579993247986,
0.4567026197910309,
-0.004459438845515251,
0.24410609900951385,
-0.06540624797344208,
0.2726821005344391,
0.24063357710838318,
-0.12159065902233124,
0.029654018580913544,
-0.2233850508928299,
-0.08049305528402328,
0.2985690236091614,
-0.1585284024477005,
0.71926033496... | |
0.001326
7 0.014724 0.0 0.0 0.0 0.0 0.001948
8 0.010000 -0.018686 0.0 0.0 0.0 | [
-0.20598915219306946,
0.42098361253738403,
-0.03328127786517143,
0.0338384173810482,
-0.04055028781294823,
0.07503069192171097,
0.3587319552898407,
-0.01767447590827942,
-0.006074512377381325,
-0.33562418818473816,
-0.1553063541650772,
0.3021218180656433,
-0.276493102312088,
0.479418903589... | |
-0.001117
9 0.009354 -0.036887 0.0 0.0 0.0 -0.000829
10 0.005767 -0.041661 0.0 0.0 0.0 0.000060 | [
-0.22045983374118805,
0.32329559326171875,
0.03433752432465553,
0.2849488854408264,
0.0032585866283625364,
0.3055506646633148,
0.2516089081764221,
0.02607332356274128,
-0.15943071246147156,
-0.20607872307300568,
-0.05816670134663582,
0.4255642890930176,
-0.1999945491552353,
0.5136012434959... | |
11 0.002180 -0.035866 0.0 0.0 0.0 0.000798
12 0.000051 -0.020695 0.0 0.0 0.0 0.001210
M E M B E R | [
-0.14851869642734528,
0.4686358571052551,
0.11806799471378326,
-0.024151377379894257,
-0.16336196660995483,
0.5720697641372681,
0.39740025997161865,
-0.19849927723407745,
-0.3303757309913635,
-0.19948293268680573,
-0.2836461067199707,
0.07473555207252502,
0.04276926442980766,
0.59353172779... | |
E N D F O R C E S (local)
Member Joint Nx Vy Vz Txx Myy Mzz
1 | [
0.29691311717033386,
-0.08074524253606796,
0.4129961431026459,
-0.2381809651851654,
-0.28066954016685486,
0.22709836065769196,
0.1582079380750656,
-0.16802814602851868,
-0.4325076937675476,
-0.1170852854847908,
-0.4685492217540741,
0.18623773753643036,
-0.3329881429672241,
0.34486347436904... | |
1 -16.138t 0.002 0.0 0.0 0.0 0.011
1 2 16.138t -0.002 0.0 0.0 0.0 0.017 | [
-0.21078404784202576,
0.30028659105300903,
0.4004721939563751,
0.08229917287826538,
-0.25056296586990356,
0.32049378752708435,
0.1504160314798355,
-0.35730448365211487,
-0.05921301245689392,
-0.2181573361158371,
0.037782806903123856,
0.08285854011774063,
-0.22655180096626282,
0.32552790641... | |
2 2 -72.907t 0.003 0.0 0.0 0.0 0.013
2 3 72.907t -0.003 0.0 0.0 | [
-0.2769138216972351,
0.28320008516311646,
0.253132164478302,
-0.13307352364063263,
-0.3327089250087738,
0.23090577125549316,
0.46105730533599854,
-0.40770262479782104,
0.29941660165786743,
-0.3621537387371063,
0.0036586816422641277,
0.13695552945137024,
0.03210432082414627,
0.3289614617824... | |
0.0 0.023
3 3 -72.909t -0.000 0.0 0.0 0.0 -0.009
3 4 72.909t 0.000 0.0 | [
-0.05656684190034866,
0.4804363548755646,
0.3873305320739746,
0.13606590032577515,
-0.3090806007385254,
0.6431372165679932,
0.46919867396354675,
-0.24683921039104462,
0.3441343903541565,
-0.3722009062767029,
0.015790192410349846,
0.12670491635799408,
0.04112738370895386,
0.5133406519889832... | |
0.0 0.0 0.005
4 4 -76.455t -0.000 0.0 0.0 0.0 -0.007
4 5 76.455t 0.000 | [
-0.01112834271043539,
0.37274566292762756,
0.42938897013664246,
0.21339431405067444,
-0.25051504373550415,
0.7594353556632996,
0.43080008029937744,
-0.302780419588089,
0.13559457659721375,
-0.3041074872016907,
-0.020979901775717735,
0.20953786373138428,
0.30252790451049805,
0.5324681997299... | |
0.0 0.0 0.0 0.003
5 5 -76.453t -0.001 0.0 0.0 0.0 -0.010
5 6 76.453t | [
0.047691866755485535,
0.35814446210861206,
0.33049464225769043,
0.15737128257751465,
-0.12291881442070007,
0.5077593922615051,
0.5167064070701599,
-0.3549043536186218,
0.45088323950767517,
-0.4555151164531708,
-0.026090312749147415,
0.1819983422756195,
0.20646648108959198,
0.44846820831298... | |
0.001 0.0 0.0 0.0 0.000
6 6 -53.226t -0.002 0.0 0.0 0.0 -0.018
6 | [
0.030138926580548286,
0.3977756202220917,
0.30657652020454407,
0.467337429523468,
-0.29861778020858765,
0.5983596444129944,
0.3451780676841736,
-0.21667368710041046,
0.06366768479347229,
-0.26913848519325256,
0.049053676426410675,
-0.16571584343910217,
0.15093779563903809,
0.80286318063735... | |
7 53.226t 0.002 0.0 0.0 0.0 -0.008
7 1 108.570c -0.001 0.0 0.0 0.0 -0.011 | [
0.13760952651500702,
0.5116078853607178,
0.29498735070228577,
0.2187759280204773,
-0.14983804523944855,
0.2681623101234436,
0.3491716682910919,
-0.18004582822322845,
0.07910225540399551,
-0.22430691123008728,
0.08303523808717728,
0.049401264637708664,
0.19121040403842926,
0.721143603324890... | |
7 8 -108.570c 0.001 0.0 0.0 0.0 -0.004
8 2 -76.765t -0.004 0.0 0.0 0.0 | [
-0.18092282116413116,
0.3049125075340271,
0.3007988929748535,
0.0855371505022049,
-0.05189872160553932,
0.47559961676597595,
0.14041927456855774,
-0.08143988251686096,
-0.03676370158791542,
-0.14388564229011536,
-0.008509733714163303,
0.23525339365005493,
0.03149579092860222,
0.53547477722... | |
-0.024
8 8 76.765t 0.004 0.0 0.0 0.0 -0.021
9 2 80.278c -0.000 0.0 0.0 | [
-0.20161350071430206,
0.4957375228404999,
0.2605322301387787,
0.1825510710477829,
-0.2681112289428711,
0.537663996219635,
0.3487861454486847,
-0.14923545718193054,
0.2705908715724945,
-0.2651562988758087,
0.04575125873088837,
0.18258139491081238,
0.03726505860686302,
0.47702139616012573,
... | |
0.0 -0.006
9 9 -80.278c 0.000 0.0 0.0 0.0 -0.000
10 3 -39.997t -0.002 0.0 | [
-0.11072941869497299,
0.5176516771316528,
0.2750277817249298,
0.15600885450839996,
-0.28279075026512146,
0.5518391728401184,
0.32045596837997437,
-0.07675030082464218,
0.18407277762889862,
-0.17066918313503265,
0.014488929882645607,
0.28224122524261475,
-0.047377437353134155,
0.47584801912... | |
0.0 0.0 -0.014
10 9 39.997t 0.002 0.0 0.0 0.0 -0.016
11 4 -23.720t -0.000 | [
-0.06307762861251831,
0.4229285717010498,
0.3375369906425476,
0.20277132093906403,
-0.13413113355636597,
0.5565256476402283,
0.42985212802886963,
-0.08249382674694061,
0.17052383720874786,
-0.31752610206604004,
-0.04462997615337372,
0.2768546938896179,
0.1260523647069931,
0.468031316995620... | |
0.0 0.0 0.0 0.004
11 9 23.720t 0.000 0.0 0.0 0.0 -0.007
12 4 -0.001t | [
0.05118085443973541,
0.32590222358703613,
0.31379377841949463,
0.09005182981491089,
-0.2014787644147873,
0.5556641221046448,
0.5133596062660217,
-0.047840770334005356,
0.1830141395330429,
-0.5149597525596619,
-0.09657987207174301,
0.08785492926836014,
0.2777259051799774,
0.2985187470912933... | |
0.000 0.0 0.0 0.0 0.002
12 10 0.001t -0.000 0.0 0.0 0.0 0.001
13 | [
0.14147070050239563,
0.3279570937156677,
0.31413546204566956,
0.2563052177429199,
-0.16424104571342468,
0.1935846209526062,
0.41371336579322815,
-0.2103031426668167,
0.15049049258232117,
-0.5153194665908813,
-0.101810522377491,
-0.29451048374176025,
0.34774985909461975,
0.2738323211669922,... | |
4 -18.706t 0.000 0.0 0.0 0.0 -0.003
13 11 18.706t -0.000 0.0 0.0 0.0 0.005 | [
0.01960461400449276,
0.5193742513656616,
0.36832720041275024,
0.12469015270471573,
-0.11349865049123764,
0.6418485045433044,
0.3715776801109314,
-0.301553875207901,
0.09568735212087631,
-0.3572336733341217,
0.049764830619096756,
0.19441895186901093,
0.06750074774026871,
0.47151052951812744... | |
14 5 -10.000t 0.001 0.0 0.0 0.0 0.007
14 11 10.000t -0.001 0.0 0.0 0.0 | [
0.14503785967826843,
0.5569014549255371,
0.30895087122917175,
0.3213699758052826,
-0.18781614303588867,
0.6939148306846619,
0.32868579030036926,
0.05275444686412811,
-0.17466768622398376,
-0.4742603600025177,
0.3312278389930725,
-0.0948546975851059,
0.1385318785905838,
0.19040913879871368,... | |
0.008
15 6 32.845c 0.000 0.0 0.0 0.0 0.006
15 11 -32.845c -0.000 0.0 0.0 0.0 | [
-0.04042278602719307,
0.6861671805381775,
0.1558028906583786,
0.19324705004692078,
-0.13008974492549896,
0.49611759185791016,
-0.008486783131957054,
0.039142411202192307,
0.05782337114214897,
-0.2757212817668915,
0.011764449067413807,
0.20363305509090424,
0.014373739250004292,
0.3340130448... | |
-0.000
16 6 -53.223t 0.002 0.0 0.0 0.0 0.012
16 12 53.223t -0.002 0.0 0.0 | [
0.22194333374500275,
0.5685575604438782,
0.28914007544517517,
0.1615312099456787,
-0.3612312078475952,
0.6414679288864136,
0.3786593973636627,
-0.5528812408447266,
-0.017828581854701042,
-0.24469077587127686,
0.011640305630862713,
0.029597070068120956,
0.05284630507230759,
0.51127713918685... | |
0.0 0.010
17 7 75.273c 0.000 0.0 0.0 0.0 0.008
17 12 -75.273c -0.000 0.0 | [
0.1927998960018158,
0.7407159209251404,
0.2731536626815796,
0.02412704937160015,
-0.2920750379562378,
0.4910683035850525,
0.2737661898136139,
-0.3413453996181488,
0.1523103564977646,
-0.3269507586956024,
0.09136984497308731,
0.13285315036773682,
0.023557819426059723,
0.25412002205848694,
... | |
0.0 0.0 -0.001
18 8 16.142c 0.005 0.0 0.0 0.0 0.025
18 9 -16.142c -0.005 | [
0.05372151732444763,
0.6565313935279846,
0.3276345729827881,
0.14710023999214172,
-0.18005427718162537,
0.6446881294250488,
0.058589085936546326,
-0.1393929421901703,
0.04014495387673378,
-0.2855720818042755,
0.08887965977191925,
-0.09112704545259476,
0.031088877469301224,
0.60094618797302... | |
0.0 0.0 0.0 0.030
19 9 89.682c 0.000 0.0 0.0 0.0 -0.007
19 10 -89.682c | [
-0.029857108369469643,
0.5111272931098938,
0.24917691946029663,
0.12299133837223053,
-0.02893000654876232,
0.3419170379638672,
0.19474314153194427,
0.11449504643678665,
0.30606189370155334,
-0.41319310665130615,
-0.1053827553987503,
0.21237516403198242,
0.13609495759010315,
0.4162071049213... | |
-0.000 0.0 0.0 0.0 0.008
20 10 89.682c -0.000 0.0 0.0 0.0 -0.009
20 11 | [
0.09499780088663101,
0.5348259210586548,
0.1513018012046814,
0.12681341171264648,
-0.04934541508555412,
0.29893094301223755,
0.10234865546226501,
0.050582077354192734,
0.18968582153320312,
-0.48073142766952515,
0.07728049904108047,
0.21644039452075958,
0.14735034108161926,
0.34593528509140... | |
-89.682c 0.000 0.0 0.0 0.0 0.003
21 11 53.228c -0.002 0.0 0.0 0.0 -0.016
21 | [
-0.04035574197769165,
0.5399500131607056,
0.06239666789770126,
0.14200885593891144,
-0.06544096767902374,
0.3973068594932556,
0.21491855382919312,
-0.25234469771385193,
0.18679653108119965,
-0.32788002490997314,
0.11235233396291733,
-0.0586710125207901,
0.11553259938955307,
0.3910683691501... | |
12 -53.228c 0.002 0.0 0.0 0.0 -0.010
```
Is there any C# library that can be used to parse the information of this format?
Thanks.
[Here](http://schotime.net/blog/index.php/2008/03/18/importing-data-files-with-linq/) is a very interesting approach about importing tabulated data using... | [
0.2328898161649704,
0.049809206277132034,
0.5279751420021057,
0.328078955411911,
-0.1902870088815689,
-0.17953288555145264,
-0.12542624771595,
-0.07524414360523224,
-0.12936879694461823,
-0.5240063071250916,
-0.16836389899253845,
0.5713384747505188,
-0.3390193581581116,
-0.0345859006047248... | |
{
while (true)
{
string s = reader.ReadLine();
if (s == null)
break;
yield return s;
}
}
}
```
and then you do the query:
```
var jointDisplacements = from line | [
0.09565339237451553,
-0.3148950934410095,
0.7865041494369507,
-0.1364019811153412,
0.16957704722881317,
0.0076025123707950115,
0.34235718846321106,
-0.3264712691307068,
-0.1568433940410614,
-0.32034873962402344,
-0.3736001253128052,
0.5365741848945618,
-0.24799060821533203,
0.1858744770288... | |
in ReadLinesFromFile(@"c:\import.txt")
let item = line.Split(new char[] { '\t' })
select new
{
Joint = Convert.ToInt32(item[0]),
X-dsp = Convert.ToDouble(item[1]), | [
0.17008449137210846,
-0.611685574054718,
0.4342523217201233,
-0.17054326832294464,
0.0313899889588356,
0.24568894505500793,
0.2083514928817749,
-0.4745629131793976,
-0.11519099026918411,
-0.578555703163147,
-0.2645346522331238,
0.44894734025001526,
-0.43144816160202026,
0.08368044346570969... | |
Y-dsp = Convert.ToDouble(item[2]),
Z-dsp = Convert.ToDouble(item[3]),
X-rot = Convert.ToDouble(item[4]),
Y-rot = Convert.ToDouble(item[5]),
Z-rot = Convert.ToDouble(item[6])
};
```
You have now a list of [anonymous objects](http://msdn.microsoft.c... | [
-0.054112598299980164,
0.09583178162574768,
0.5193261504173279,
0.09200419485569,
-0.10549750179052353,
0.21318599581718445,
0.19480761885643005,
-0.3113791346549988,
-0.3093145787715912,
-0.5622996687889099,
-0.3165840804576874,
0.2972983717918396,
-0.31788259744644165,
0.4112682342529297... | |
each object.
If your file includes the column headers, you should skip the first line... | [
0.08947889506816864,
0.17479126155376434,
0.408652663230896,
0.07742196321487427,
-0.0585528202354908,
0.09859523922204971,
-0.02585846185684204,
-0.07784506678581238,
-0.1408078819513321,
-0.47399288415908813,
-0.13692419230937958,
0.20854304730892181,
-0.39570921659469604,
0.032045297324... | |
I have several xml files, the names of which are stored in another xml file.
I want to use xsl to produce a summary of the combination of the xml files. I remember there was a way to do this with the msxml extensions (I'm using msxml).
I know I can get the content of each file using `select="document(filename)"` but... | [
0.5212554335594177,
0.04487116262316704,
0.4772499203681946,
0.10341496765613556,
0.013894064351916313,
-0.21090342104434967,
0.23471929132938385,
-0.21707601845264435,
-0.006452504079788923,
-0.8762159943580627,
-0.032851822674274445,
0.614000678062439,
-0.0037566726095974445,
0.266275376... | |
store it as a node set in a variable.
Here is just a small example of what you **could** do:
*file1.xml:*
```
<foo>
<bar>Text from file1</bar>
</foo>
```
*file2.xml:*
```
<foo>
<bar>Text from file2</bar>
</foo>
```
*index.xml:*
```
<index>
<filename>file1.xml</filename>
<filename>file2.xml</filename>
```
*sum... | [
-0.013442824594676495,
-0.04541437327861786,
0.4901249408721924,
-0.0808010846376419,
0.12621597945690155,
-0.04967520758509636,
-0.1279309093952179,
-0.4678354561328888,
-0.22640743851661682,
-0.4163393974304199,
-0.2506393790245056,
0.2443341463804245,
-0.272859126329422,
0.0856581702828... | |
<xsl:value-of select="bar"/>
</xsl:element>
</xsl:template>
</xsl:stylesheet>
```
Applying the stylesheet to *index.xml* gives you:
```
<?xml version="1.0" encoding="UTF-8"?><summary><text>Text from file1</text><text>Text from file2</text></summary>
```
The trick is to load the different documents with th... | [
0.0378192663192749,
0.0005969259073026478,
0.780314564704895,
-0.10835675150156021,
-0.0868706926703453,
0.003749614581465721,
-0.10135854780673981,
-0.5071085691452026,
0.10014921426773071,
-0.5892471671104431,
-0.22364000976085663,
0.4362802803516388,
-0.33177223801612854,
-0.18237112462... | |
Is there any advantage to using `__construct()` instead of the class's name for a constructor in PHP?
Example (`__construct`):
```
class Foo {
function __construct(){
//do stuff
}
}
```
Example (named):
```
class Foo {
function Foo(){
//do stuff
}
}
```
Having the `__construct` me... | [
0.10635953396558762,
0.14238984882831573,
0.32522591948509216,
-0.14615029096603394,
-0.056107550859451294,
-0.3238860070705414,
0.1285400241613388,
0.05572153627872467,
-0.22413864731788635,
-0.23624642193317413,
0.003715207101777196,
0.6348695755004883,
-0.23434674739837646,
0.1820943057... | |
have to rename it if you rename your class. DRY.
Similarly, if you have a child class you can call
```
parent::__construct()
```
to call the parent constructor. If further down the track you change the class the child class inherits from, you don't have to change the construct call to the parent.
It seems like a ... | [
0.22486858069896698,
-0.12141062319278717,
-0.14924460649490356,
0.022093534469604492,
0.2708894908428192,
-0.012884403578937054,
0.09565861523151398,
0.21478669345378876,
-0.16025222837924957,
-0.7521185278892517,
-0.13076329231262207,
0.23258687555789948,
-0.08583366125822067,
0.71007889... | |
could often cause undesirable results which might be difficult to notice.
Also note that
> As of PHP 5.3.3, methods with the same name as the last element of a namespaced class name will no longer be treated as constructor. This change doesn't affect non-namespaced classes.
Source: <http://php.net/manual/en/language... | [
0.05342116206884384,
0.015638867393136024,
0.2002938687801361,
-0.09040722995996475,
-0.1847470998764038,
-0.015396976843476295,
0.5018102526664734,
-0.05621660128235817,
-0.27865415811538696,
-0.4769914150238037,
-0.29681915044784546,
0.3076415956020355,
-0.253633052110672,
0.083725817501... | |
I would really like to annotate a method with a reference to a single property in a property file for injection.
```
@Resource("${my.service.url}")
private String myServiceUrl;
```
Of course, this syntax does not work ;) Thats why I'm asking here.
I am aware that I can inject the full properties file, but that just... | [
0.4136269688606262,
0.07279741764068604,
0.15690799057483673,
0.1915607899427414,
0.021001074463129044,
-0.3336584270000458,
0.31175291538238525,
-0.27645620703697205,
0.0011462836991995573,
-0.6619214415550232,
0.02331911027431488,
0.7068990468978882,
-0.14613616466522217,
0.0809721499681... | |
[Spring forum](http://forum.springframework.org/showthread.php?t=50790). The short answer is that there's really no way to inject a single property using annotations.
I've heard that the support for using annotations will be improved in Spring 3.0, so it's likely this will be addressed soon. | [
0.22707302868366241,
0.20592881739139557,
0.24694861471652985,
0.08310559391975403,
-0.08373915404081345,
-0.15295369923114777,
0.21213272213935852,
-0.2984321415424347,
-0.15866346657276154,
-0.33106037974357605,
-0.22338847815990448,
0.22801543772220612,
-0.0849960595369339,
0.0258574690... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.