text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
('String one', 'String two', 'String three');
```
I am curious why your identifier name starts with a **T** though. Were you trying to define a type like this:
```
type
TArrayOfString = array [1..3] of string;
const
MyArrayOfString: TArrayOfString =
('String one', 'String two', 'String three');
```
You ca... | [
0.04173329845070839,
-0.013775630854070187,
0.3922976851463318,
-0.35656094551086426,
-0.16137008368968964,
-0.026484550908207893,
0.20002155005931854,
-0.5198789238929749,
-0.19652540981769562,
-0.060745496302843094,
0.03768177330493927,
0.5174704194068909,
-0.5902106165885925,
0.08385237... | |
Is there a 3rd party add-on/application or some way to perform object map dumping in script debugger for a JavaScript object?
Here is the situation... I have a method being called twice, and during each time something is different. I'm not sure what is different, but something is. So, if I could dump all the propertie... | [
0.2033969610929489,
0.056913696229457855,
0.21157221496105194,
0.008178859017789364,
-0.094770647585392,
-0.05429326742887497,
0.1867091804742813,
-0.20865368843078613,
-0.07854337990283966,
-0.7120764255523682,
0.1448470652103424,
0.44133883714675903,
-0.20552827417850494,
0.1174266785383... | |
I have inherited a single project in svn: 30Gb in over 300 000 files. There are tons of binary files in there mostly in an images folder. Operations like updating the entire project can be dramatically slow.
The team has evolved a process to only run update/switch on the specific folders they are working on and end u... | [
0.4677770733833313,
0.4753819406032562,
0.1148323118686676,
-0.05390191450715065,
0.16443532705307007,
-0.12543822824954987,
0.39920559525489807,
-0.08317285031080246,
-0.3903474807739258,
-0.9602457880973816,
-0.08528527617454529,
0.4139893054962158,
0.30694204568862915,
0.113697938621044... | |
not everyone has the command line courage to even copy my solution and would rather the comfort of tortoise svn and the broken process.
Has anyone tried to tune such a large repository and can give advice?
Are there any best practices I can implement for working with large repositories that I can ease everyone into?
... | [
0.06033223122358322,
0.12145061790943146,
0.38373637199401855,
0.037167906761169434,
-0.10204804688692093,
-0.019335348159074783,
0.405154287815094,
-0.19752278923988342,
-0.47501900792121887,
-0.6026408076286316,
-0.08287104219198227,
0.8181861042976379,
-0.06131863221526146,
-0.019381342... | |
[latest release](http://svn.collab.net/repos/svn/trunk/CHANGES) notes mention a speedup for large files (r36389).
Secondly, this may not be too appropriate for you if you have to have the entire project in your working copy, but use [sparse directories](http://blogs.open.collab.net/svn/2009/03/sparse-directories-now-w... | [
-0.31908437609672546,
-0.36817651987075806,
0.7590580582618713,
0.027509493753314018,
0.024052951484918594,
-0.06609877198934555,
0.2983768582344055,
-0.015260172076523304,
-0.9024100303649902,
-0.469163715839386,
-0.3300841152667999,
0.6025158166885376,
-0.13725653290748596,
-0.0773010551... | |
isn't for you, you can still do an update on parts of the working copy. Update tends to be slow the more files you have (on Windows that is, NTFS seems to be particularly poor with the locking strategy used for updating. [Bert Huijben noticed this](http://svn.haxx.se/dev/archive-2009-02/0202.shtml) and suggested a fix ... | [
0.1503913402557373,
-0.004052027594298124,
0.10856427997350693,
-0.10415737330913544,
-0.03557740896940231,
-0.04030521214008331,
0.4432525932788849,
0.012625369243323803,
-0.35542288422584534,
-0.6100062131881714,
-0.24209193885326385,
0.6407746076583862,
-0.6425285339355469,
0.1245211884... | |
scanner for .svn firectories, and also for the repository on the server. If you're running Apache on the server, make sure you have keep alives on for a short time (to prevent re-authentication from occurring). Also turn off indexing on your working copy directories and shadow copy too. (the last doesn't help much, but... | [
0.49872636795043945,
-0.011503462679684162,
0.43551257252693176,
0.20397010445594788,
-0.20463185012340546,
-0.29669469594955444,
0.3964587450027466,
-0.06881007552146912,
-0.40176254510879517,
-0.7563245296478271,
0.06440705060958862,
0.7775169014930725,
-0.08268148452043533,
-0.272675722... | |
Given these 3 lists of data and a list of keywords:
```
good_data1 = ['hello, world', 'hey, world']
good_data2 = ['hey, man', 'whats up']
bad_data = ['hi, earth', 'sup, planet']
keywords = ['world', 'he']
```
I'm trying to write a simple function to check if any of the keywords exist as a substring of any word in th... | [
-0.19099505245685577,
0.38074034452438354,
0.45808202028274536,
0.10370910912752151,
-0.1783241629600525,
0.15564078092575073,
0.3049926161766052,
-0.1524038314819336,
-0.15139427781105042,
-0.38213202357292175,
-0.2566584646701813,
0.22634145617485046,
-0.4575255215167999,
0.2355463355779... | |
return True
return False
```
In your example, with so few items, it doesn't really matter. But if you have a list of several thousand items, this might help.
Since you don't care which element in the list contains the keyword, you can scan the whole list once (as one string) instead of one item at the time. For tha... | [
0.20847761631011963,
-0.11937882006168365,
0.3438771069049835,
-0.37017667293548584,
0.21811261773109436,
-0.2123182713985443,
0.6663873791694641,
-0.23805350065231323,
-0.06467615067958832,
-0.5275114178657532,
-0.2517709732055664,
0.37705954909324646,
-0.5067600607872009,
0.0916794613003... | |
for k in keywords:
if k in s:
return True
return False
```
In my completely unscientific test, my version checked a list of 5000 items 100000 times in about 30 seconds. I stopped your version after 3 minutes -- got tired of waiting to post =) | [
0.15357466042041779,
0.09980166703462601,
0.2693620026111603,
-0.0064483643509447575,
-0.10823068022727966,
0.25817641615867615,
0.843261182308197,
-0.3115062117576599,
-0.15836606919765472,
-0.30221888422966003,
-0.060058049857616425,
0.17144855856895447,
-0.15587663650512695,
0.346269875... | |
I have jQuery code which works offline in Safari and Opera, but neither in Firefox 3.1 nor 3.08.
**How can you use Firefox's JavaScript engine in offline debugging?**
You can install [SpiderMonkey](http://www.mozilla.org/js/spidermonkey/) and play around with that.
Or you can use [Firebug](http://getfirebug.com/) whi... | [
0.7786281704902649,
0.1153525561094284,
0.08715207129716873,
-0.14563564956188202,
-0.19759106636047363,
-0.3377718925476074,
0.31564047932624817,
0.07868967205286026,
-0.16551001369953156,
-0.8184560537338257,
0.04724078252911568,
0.5270401835441589,
-0.47539079189300537,
-0.1263138949871... | |
I'm using a library - HtmlUnit - and I just updated from version 2.4 to version 2.5. When I compile my code against 2.5, I'm getting a strange object "cannot be dereferenced" error message that I'm not familiar with. Moreover, I don't understand why it works when I write the code in two lines, but fails when I do it as... | [
0.16827672719955444,
0.32610058784484863,
0.5710335373878479,
-0.2931736409664154,
-0.0835593193769455,
-0.07637513428926468,
0.694332480430603,
-0.22316251695156097,
-0.2347099930047989,
-0.9500458240509033,
0.12712498009204865,
0.28502151370048523,
-0.38785088062286377,
0.323116898536682... | |
form.getInputByName("password").setValueAttribute(passWord);
[javac] ^
```
com.gargoylesoftware.htmlunit.html.HtmlInput cannot be dereferenced ? I've seen derefernce issues with Autoboxing, but not with objects. What does it mean in this context? And why does the code work one way a... | [
-0.004483010154217482,
-0.12197759002447128,
0.7717044949531555,
-0.25487202405929565,
-0.31184741854667664,
-0.25164592266082764,
0.3613027036190033,
-0.27693110704421997,
-0.12479893863201141,
-0.5685753226280212,
-0.5311657190322876,
0.32123738527297974,
-0.4037027955055237,
0.201838061... | |
extending HtmlInput.
Due to the nature of final methods (it is never overridden so there is no callstack) the error comes beceause the compiler sees it as just htmlinput and not an implemented htmlinput.([ref](http://www.roseindia.net/javatutorials/final_methods.shtml))(he thinks there will be no callstack)
assigning ... | [
0.04796913266181946,
-0.2002030909061432,
0.5980578064918518,
-0.05275595933198929,
-0.0833037942647934,
-0.3004505932331085,
0.6552138328552246,
-0.07118647545576096,
-0.22030207514762878,
-0.5619046688079834,
-0.008923356421291828,
0.23839859664440155,
-0.31344714760780334,
0.09745531529... | |
Instead of calling:
```
var shows = _repository.ListShows("PublishDate");
```
to return a collection of objects sorted by the publish date, I would like to use a syntax like this:
```
var shows = _repository.ListShows(s => s.PublishDate);
```
What do I need to write to take advantage of the lambda as an argument?... | [
0.2878386974334717,
0.17951317131519318,
0.5678050518035889,
-0.2662513852119446,
-0.24900011718273163,
-0.16451771557331085,
-0.04248379170894623,
-0.46343564987182617,
-0.15118658542633057,
-0.23539656400680542,
-0.17201656103134155,
0.4311448931694031,
-0.5141693353652954,
0.11382230371... | |
I recently was making a change to to our codebase from float to long for some variables, and discovered that there were no error messages generated by the compiler in areas I knew were still wrong. This led me to add -Wconversion to the compiler flags. But, oops, this leads to some spurious error messages. In the snipp... | [
0.7309514284133911,
0.16162125766277313,
0.17759375274181366,
-0.08911292254924774,
-0.1566431224346161,
-0.07078582793474197,
0.328768253326416,
0.08709243685007095,
-0.16972875595092773,
-0.398075133562088,
0.3001667261123657,
0.5153846740722656,
-0.3449178636074066,
0.4927475154399872,
... | |
to examine them all? Grrr.
```
#include <stdio.h>
void
takes_a_float ( float some_num ) {
printf("float Hello %f\n", some_num );
}
int
main (int argc, char **argv) {
float my_boat = 1.0f;
takes_a_float ( my_boat );
exit (0);
}
gcc -Wconversion foo.c
foo.c: In function `main':
foo.c:13: warning: pas... | [
0.22253002226352692,
0.15714195370674133,
0.24687735736370087,
-0.0714436024427414,
-0.09811665862798691,
0.24906781315803528,
0.24737311899662018,
-0.4680830240249634,
-0.21813736855983734,
-0.3864258825778961,
0.151068776845932,
0.6128081679344177,
-0.4921589195728302,
0.0052293981425464... | |
the -Wconversion flag is working 'as designed'. (I had thought it was about type-conversion, but it turns out it's about converting really old C-style programs to ISO-standard C. Darn. A reading of the gcc warning
documentation page for my version of gcc doesn't give me hope, but in any event, what I really want is som... | [
0.4612142741680145,
0.043258294463157654,
0.5301380753517151,
-0.23738183081150055,
0.10220897942781448,
-0.07432698458433151,
0.1867540031671524,
-0.2416456788778305,
-0.1844092309474945,
-0.33156147599220276,
0.03952156379818916,
0.5855842232704163,
-0.29483479261398315,
0.46868979930877... | |
my_boat );
}
int
main (int argc, char **argv) {
float my_boat = 1.0f;
long sad_story = 1.0L;
// No warnings wanted
takes_a_float (my_boat);
takes_a_long (sad_story);
// Warnings required
takes_a_long (my_boat);
takes_a_float (sad_story);
exit (0);
}
```
**Edit 2**... | [
0.1257440447807312,
0.14239029586315155,
0.5069224834442139,
-0.03900860249996185,
0.30362507700920105,
0.14953209459781647,
0.5379523038864136,
-0.014993228949606419,
-0.39352184534072876,
-0.5804340839385986,
0.12161819636821747,
0.49682706594467163,
-0.023091508075594902,
0.165232628583... | |
try `-Wno-traditional-conversion`?
Edit: I checked, and it works, but sadly, this works with gcc 4.3 and newer only. From gcc 4.1 man page, it seems your observed behaviour is what `-Wconversion` was supposed to do in older versions, and it doesn't warn on a normal `double -> float` conversion. | [
0.3194217383861542,
0.05827982723712921,
0.1419776827096939,
-0.023838039487600327,
0.011846681125462055,
-0.4010812044143677,
0.7486821413040161,
-0.2578774690628052,
-0.14617888629436493,
-0.29809150099754333,
0.19124925136566162,
0.7115809321403503,
-0.1695549190044403,
0.04092236980795... | |
In an HttpModule, I put an Item in the Context, like this:
```
HttpContext.Current.Items.Add("MyKey", "Hello world!");
```
Directly under this code (still inside the module), I can retrieve this string from the collection, so I know it got added.
Fast forward to my actual handler (a Web form -- .aspx). I try to get... | [
0.02506396733224392,
-0.14124177396297455,
0.8415672183036804,
-0.2647164463996887,
-0.0485624223947525,
0.06697608530521393,
0.5503860712051392,
-0.06814367324113846,
-0.26117947697639465,
-0.8610129356384277,
-0.19570279121398926,
0.23762397468090057,
-0.24475233256816864,
0.313652396202... | |
do with it.
From the "Tools" menu select "Options".
In the tree widget (left pane) you will find an entry for QT4.
The right pane will indicate if QT has been detected (most likely yes, in your case) and whether debugging helper was found.
If debugging helper code was not found you will have an option to "generate de... | [
0.3470591604709625,
-0.15886417031288147,
0.11618133634328842,
0.03552287444472313,
0.08712830394506454,
-0.24214178323745728,
0.3216871917247772,
-0.24615946412086487,
-0.13104426860809326,
-0.5059072971343994,
-0.13432466983795166,
0.7312169671058655,
-0.10356137901544571,
-0.09947833418... | |
and only for specific classes. E.g., QString displays nicely but std::string does not (std::vector does work). | [
-0.2704448699951172,
-0.4990900158882141,
0.1881139576435089,
0.08685322105884552,
-0.4157693386077881,
-0.11368861794471741,
0.06966760009527206,
-0.030974287539720535,
0.04585781693458557,
-0.7664635181427002,
-0.2040957510471344,
0.4712924659252167,
-0.31364041566848755,
-0.361036419868... | |
Note: this is NOT like [this question](https://stackoverflow.com/questions/534737/best-way-to-store-survey-data)
I've been tasked to construct a survey that our customer service people can use to get info from our customers about our service etc.
My question is how to store the questions/answers in the db where the ... | [
0.16134829819202423,
0.0608968585729599,
0.023091642186045647,
0.0277884379029274,
-0.3075985014438629,
0.057338323444128036,
0.32675617933273315,
-0.47644108533859253,
0.01744483970105648,
-0.4856911897659302,
0.01493487786501646,
0.41735029220581055,
-0.05972195044159889,
0.0774236619472... | |
(and indeed the whole survey) as a composite, but I don't know how I'd store something like that.
If your questions form a tree, and not a graph, there are two common ways to [represent hierarchical data in sql](http://mikehillyer.com/articles/managing-hierarchical-data-in-mysql/).
The **Adjacency List Model model** r... | [
-0.053142499178647995,
-0.06756145507097244,
0.11489636451005936,
0.3336659073829651,
-0.19798626005649567,
0.42683249711990356,
0.3706960380077362,
-0.41028839349746704,
-0.40225011110305786,
-0.5147596001625061,
-0.0016867751255631447,
0.37573495507240295,
0.059019412845373154,
0.0040937... | |
for each row in the previous result set.
The **Nested Set Model**, usually attributed to Joe Celko, allows you to get a whole tree in a single select. But it means that adding and deleting nodes is more complicated, requiring updates to all rows.
In Adjacency List, you could have a question table like this `(id, que... | [
-0.21426619589328766,
-0.11314984411001205,
-0.4995047152042389,
-0.03524240106344223,
0.15278959274291992,
0.6694588661193848,
0.06632406264543533,
-0.4533102512359619,
-0.2637215256690979,
-0.5715262293815613,
-0.2187609225511551,
0.01286807656288147,
-0.5350023508071899,
0.1775080710649... | |
So, I'm trying to use soap to communicate with a webservice and getting errors. What is frustrating about this particular issue is that it works perfectly fine with my local copy of the webservice (yes, I tried turning off my firewall) and used to work fine with a previous version of the webservice and client. I suspec... | [
0.46476826071739197,
-0.02426731400191784,
0.2197565883398056,
0.11459308117628098,
-0.23818787932395935,
0.1376814991235733,
0.6140955686569214,
0.0369570218026638,
-0.1777707189321518,
-0.7687493562698364,
0.24045532941818237,
0.6834414005279541,
-0.25777262449264526,
-0.1102520897984504... | |
the same between when it stopped working and when it worked (since I checked against an old version of the program and had the same problems and the relevant code was the same...unless I missed something subtle). I *know* the actual server program is the same on both the local copy and the remote copy, even though it o... | [
0.3300013244152069,
0.008419962599873543,
0.4410821497440338,
-0.17801740765571594,
0.028727350756525993,
0.040977418422698975,
0.5907595157623291,
-0.05616464838385582,
-0.30874890089035034,
-0.5829443335533142,
0.09336476773023605,
0.6744006872177124,
-0.2265409529209137,
0.2749786078929... | |
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body><TestConnection xmlns="http://site.com"/></soap:Body></soap:Envelope>
Dim oXml As New XMLHTTPRequest
oXml.Open "POST", WEB_SERVICE_URL_CONS... | [
0.24205537140369415,
0.05270293727517128,
0.40404993295669556,
0.02337808907032013,
-0.38763490319252014,
-0.1692419946193695,
0.22287607192993164,
-0.7883120179176331,
-0.053431954234838486,
-0.558472216129303,
0.13173547387123108,
0.26417237520217896,
-0.11537744104862213,
-0.11075101792... | |
an attached process. | [
-0.05132569745182991,
-0.03916515037417412,
0.4097873866558075,
0.324484258890152,
-0.09804552048444748,
0.09781301766633987,
-0.3388533592224121,
-0.011944396421313286,
-0.23263444006443024,
-0.4597404897212982,
-0.2513866424560547,
0.11699505895376205,
0.07774977385997772,
0.319594085216... | |
I am initializing a text view from my code, not from the interface builder and it appears to be just a white rectangle. I want it to have the same rounded shape as is in the interface builder. How can I achieve this?
The same question concerning UITextView.
Thanks.
The text view is rectangular even in IB. A UITextFie... | [
0.009024744853377342,
-0.2060219794511795,
0.5160991549491882,
-0.10874102264642715,
-0.3359217643737793,
0.037405889481306076,
-0.0895213782787323,
0.126072958111763,
0.10345865041017532,
-0.9897363781929016,
0.18470071256160736,
0.481523722410202,
0.017972439527511597,
0.0226231329143047... | |
I'm using C++ without .NET on Win32, how can I download an image over HTTP from a website without having to re-invent the wheel? Is there an API or library that provides a single function to do this?
<http://mywebsite/file.imgext> --> C:\path\to\dir\file.imgext
You could use [cURLpp](http://curlpp.org/)
I havn't used... | [
0.2656881809234619,
0.02999090403318405,
0.48578643798828125,
0.08523974567651749,
-0.2112003117799759,
-0.0588497668504715,
0.056763384491205215,
-0.19258442521095276,
-0.4623548984527588,
-0.6451942920684814,
0.43161025643348694,
0.5172061324119568,
-0.2598895728588104,
0.010720586404204... | |
In my other question, I've been trying to find someone who knows where to find free open source OCR library for C#. However, it seems there is only C++ library and obviously, C++ is not C#.
One of the responds suggested to write my own wrapper in C#. I have pretty much no idea how to do it, where to learn to do it, or... | [
0.36782336235046387,
0.13885076344013214,
-0.15124979615211487,
0.4292483925819397,
-0.18275895714759827,
-0.19856025278568268,
0.06347274780273438,
0.0891885831952095,
-0.350630521774292,
-0.36376532912254333,
0.12248462438583374,
0.5234702825546265,
-0.24097438156604767,
0.07555825263261... | |
Unmanaged Code. Part 1 - Simple DLLImport](http://www.csharphelp.com/2006/01/call-unmanaged-code-part-1-simple-dllimport/) | [
-0.05636149272322655,
-0.1283189356327057,
0.5132015347480774,
-0.10750606656074524,
-0.14746342599391937,
-0.22105787694454193,
0.3021594285964966,
-0.5068789720535278,
-0.48340559005737305,
-0.15954260528087616,
-0.5690813064575195,
0.6332159638404846,
-0.6250923871994019,
-0.13241404294... | |
I know we can do something like this:
```
Class.class.getResourceAsStream("/com/youcompany/yourapp/module/someresource.conf")
```
to read the files that are packaged within our jar file.
I have googled it a lot and I am surely not using the proper terms; what I want to do is to list the available resources, somethi... | [
0.5585876107215881,
0.2713192403316498,
0.14807485044002533,
0.006713425740599632,
0.18780294060707092,
-0.3153580129146576,
0.24655523896217346,
-0.14355513453483582,
-0.14742863178253174,
-0.7749148607254028,
0.18504010140895844,
0.4963570833206177,
0.07738006114959717,
0.388666570186615... | |
But, I can't do it in the environment I am working in now.
For resources in a JAR file, something like this works:
```
URL url = MyClass.class.getResource("MyClass.class");
String scheme = url.getProtocol();
if (!"jar".equals(scheme))
throw new IllegalArgumentException("Unsupported scheme: " + scheme);
JarURLConnect... | [
0.25709259510040283,
0.0577126145362854,
0.46161648631095886,
0.015376020222902298,
0.40457603335380554,
-0.15612617135047913,
0.6660977005958557,
-0.3659621775150299,
-0.5108069777488708,
-0.5307841897010803,
-0.3403892517089844,
0.6521157622337341,
-0.15833307802677155,
0.175837323069572... | |
each URL scheme you want to support. | [
0.4235975444316864,
0.10344716161489487,
0.33252671360969543,
0.03556074947118759,
-0.2473149448633194,
-0.0451730340719223,
-0.03340218588709831,
0.28053465485572815,
-0.02144208364188671,
-0.5316482186317444,
-0.12447705119848251,
0.2702731490135193,
-0.12281772494316101,
0.3358431458473... | |
I am studying computer science and we have to do a programming project which must be strongly related to XML and using XSD and XSLT or XQuery/XPath at least. Because I like C# I'd like to do it in this language, but I could use another if anyone has another idea.
My Idea is now to code some kind of appointment book. I... | [
0.6362001299858093,
0.20280493795871735,
0.33265432715415955,
0.04361679032444954,
0.2549908459186554,
-0.09197947382926941,
-0.06192667409777641,
0.1436266005039215,
0.06675103306770325,
-0.5336301922798157,
0.2721579670906067,
0.5849466919898987,
-0.013147681951522827,
0.0427479036152362... | |
the textboxes? The application is an offline one so I have no web server receiving the GET request containing the entered data. Is it possible to read the current HTML DOM from memory with all its entered values and then transform it to an XML format for persistent storage from which it could be read in later?
Or is t... | [
0.10294105112552643,
0.16589443385601044,
0.6877350211143494,
0.14547760784626007,
-0.3766314387321472,
-0.10663550347089767,
0.1830020695924759,
-0.3068505525588989,
-0.43586909770965576,
-0.4836358428001404,
-0.16792196035385132,
0.6619776487350464,
-0.3315209150314331,
0.020560523495078... | |
Developer (FREE)](http://www.microsoft.com/express/vwd/#webInstall)
or
[Visual C#](http://www.microsoft.com/express/vcsharp/Default.aspx) | [
0.6596115231513977,
-0.0875164121389389,
0.23384207487106323,
0.08497102558612823,
-0.2164319008588791,
0.05345221981406212,
-0.04170924425125122,
0.1253317892551422,
0.12566472589969635,
-0.49697357416152954,
-0.3371151089668274,
0.6598901152610779,
-0.3698189854621887,
0.1153041496872901... | |
Well although it's late in the dark night, I don't get it why there are two different rectangles: frame and bounds.
Like I understand it, one single rectangle would have been just enough to do everything. Positioning the View itself relative to another coordinate system, and then clipping it's content to a specified ... | [
0.579394519329071,
-0.1908661425113678,
0.17263928055763245,
0.34063267707824707,
0.08367452770471573,
0.05411357060074806,
-0.2528036832809448,
0.2339034378528595,
-0.45347028970718384,
-0.4372809827327728,
0.39472267031669617,
0.3672044277191162,
-0.04738583415746689,
0.03512962535023689... | |
**is** (with respect to the superview)
* `bounds` is where the view **is allowed to draw** (with respect to itself)
Some more clarification:
If you are positioning the view in its superview, you almost always change the frame origin.
If you are clipping where the UIView is drawing, you almost always modify its bound... | [
0.35616400837898254,
-0.45475995540618896,
0.5454413294792175,
0.04576437920331955,
-0.18921402096748352,
-0.1257658451795578,
-0.2200177162885666,
0.06885038316249847,
-0.2112574577331543,
-0.6412079930305481,
-0.18829621374607086,
0.3958958685398102,
-0.09952294081449509,
-0.138208046555... | |
I was reading through the source code for MeioUpload to make sure I understand what it's doing, and for the most part the code is pretty easy to understand. However, I came upon a section of code which I just can't seem to figure out, and so I'm trying to determine if it's a mistake on the author's part or if I'm just ... | [
0.21083752810955048,
0.1370713710784912,
0.15103599429130554,
-0.0630127564072609,
0.08951065689325333,
0.18580016493797302,
0.15366384387016296,
0.20939666032791138,
-0.0828956663608551,
-0.5454574823379517,
0.045360926538705826,
0.3177439272403717,
-0.18618980050086975,
0.088422395288944... | |
(in comments) next to the line of code I can't figure out:
```
/**
* Include a pattern of reserved word based on a filename,
* and it's replacement.
* @author Vinicius Mendes
* @return null
* @param $default String
*/
function _includeDefaultReplacement($default){
$replacements = $this->replacements;
li... | [
0.325239896774292,
-0.21098005771636963,
0.4481680989265442,
-0.12358319759368896,
0.22907394170761108,
0.3996647894382477,
0.4452384412288666,
-0.5723728537559509,
-0.6500756740570068,
-0.3366810381412506,
-0.13829629123210907,
0.41724181175231934,
-0.5871719121932983,
0.19047391414642334... | |
if($newReplacement[1] != '_'){
$newReplacement[1] = '_';
} else {
$newReplacement[1] = 'a';
}
} elseif($newReplacement != '_') {
$newReplacement = '_';
} | [
-0.23538659512996674,
0.03391936793923378,
-0.015041980892419815,
-0.488840252161026,
0.5869515538215637,
0.0058484454639256,
0.335640013217926,
-0.32395273447036743,
-0.23029199242591858,
-0.4405280351638794,
-0.729643702507019,
0.7682881951332092,
-0.26963284611701965,
0.3715071976184845... | |
else {
$newReplacement = 'a';
}
$this->replacements[] = $newReplacement;
}
}
```
As I understand it, $newReplacement should always be a string, not an array. That is because ultimately it gets its value from the first element of the array returned from this function:
```
function spli... | [
0.3988770544528961,
-0.3333732783794403,
0.33098623156547546,
-0.2569195628166199,
0.34150779247283936,
0.1984236091375351,
0.011715346947312355,
-0.5737187266349792,
-0.41882699728012085,
0.013880815356969833,
-0.40311136841773987,
0.7984999418258667,
-0.3024671971797943,
0.22707188129425... | |
makes no sense to me. It seems to be trying to catch a condition which could never occur. Or am I wrong and that section of code does serve a purpose?
Well, I can't explain the actual reasoning behind why it's doing it, but when you use a particular index on a string value like that, you're accessing a particular chara... | [
0.30905404686927795,
0.22120927274227142,
-0.10232535004615784,
0.03199693188071251,
-0.009559347294270992,
0.09362174570560455,
0.2522374391555786,
0.2853454053401947,
-0.19273260235786438,
-0.3174278140068054,
0.021353373304009438,
0.13729983568191528,
-0.4152972102165222,
0.544468641281... | |
'a'.
I can explain in more detail what that function does if you like, but I don't really have any understanding of what it's trying to accomplish. | [
0.5640661120414734,
-0.046029917895793915,
-0.08767439424991608,
-0.24500639736652374,
-0.5368740558624268,
0.1734333634376526,
0.24286898970603943,
0.22595258057117462,
0.028942173346877098,
-0.22491048276424408,
-0.1083197370171547,
0.37880128622055054,
-0.2297561764717102,
0.32213920354... | |
Given an input set of n integers in the range [0..n^3-1], provide a linear time sorting algorithm.
This is a review for my test on thursday, and I have no idea how to approach this problem.
Also take a look at related sorts too: [pigeonhole sort](http://en.wikipedia.org/wiki/Pigeonhole_sort) or [counting sort](http://... | [
0.020797142758965492,
-0.14404602348804474,
-0.16982653737068176,
-0.09235682338476181,
-0.3103203773498535,
0.4897463023662567,
-0.13776472210884094,
-0.6614639163017273,
-0.4800284206867218,
-0.4885297119617462,
0.05603162571787834,
-0.115829698741436,
-0.3930824100971222,
0.055161293596... | |
I'm in the process of building a test plan for validating the security of our Flex/J2EE application. I believe we have some issues with trusting the Flex application too much, but I need to be able to quantify those issues.
The ideal way would be a way to show me making data service calls outside of the application. A... | [
0.41743338108062744,
0.11741439998149872,
0.19588899612426758,
0.013806380331516266,
-0.000855121819768101,
-0.236592635512352,
0.2835143506526947,
0.06549708545207977,
-0.17200982570648193,
-0.4773923456668854,
0.2820911705493927,
0.40421950817108154,
0.08191895484924316,
0.21880257129669... | |
it as a tree. You can also set "breakpoints" to intercept a HTTP call and modify the AMF data in either the request or response.
<http://www.charlesproxy.com/> | [
0.4615350067615509,
0.1417936533689499,
0.5589134097099304,
-0.0923667922616005,
0.13706588745117188,
0.07345472276210785,
0.07518494129180908,
-0.39375314116477966,
-0.2661702036857605,
-0.0029324402566999197,
-0.07090400904417038,
0.01061167847365141,
-0.41641804575920105,
0.335787028074... | |
Probably an easy-to-answer question. I have this procedure:
```
CREATE PROCEDURE [dbo].[AccountExists]
@UserName nvarchar(16)
AS
IF EXISTS (SELECT Id FROM Account WHERE UserName=@UserName)
SELECT 1
ELSE SELECT 0
```
When I have ADO.NET code that calls this procedure and does this:
```
return Convert.ToBoolean(... | [
0.03833501785993576,
0.24538536369800568,
0.37057772278785706,
-0.35377657413482666,
0.15010827779769897,
0.21961449086666107,
0.29204854369163513,
-0.6393919587135315,
-0.12144015729427338,
-0.616797685623169,
-0.07125722616910934,
0.5612611174583435,
-0.335422158241272,
0.130935445427894... | |
to RETURN instead of SELECT so I can have another stored procedure call it:
```
--another procedure to insert or update account
DECLARE @exists bit
EXEC @exists = [dbo].[AccountExists] @UserName
IF @exists=1
--update account
ELSE
--insert acocunt
```
Add a parameter, using `ParameterDirection.ReturnValue`. The r... | [
-0.1898437887430191,
-0.008137824945151806,
0.47816285490989685,
-0.1263081580400467,
0.21064311265945435,
0.12217263132333755,
0.2697353661060333,
-0.340478777885437,
0.19039061665534973,
-0.30118680000305176,
-0.2803106904029846,
0.6973762512207031,
-0.2867746949195862,
0.127170935273170... | |
I'm evaluating Cruise (NOTE! Not CruiseControl but Cruise (commercial)) for doing CI with an unmanaged MSVC++ 2008 project. I use GoogleTest framework for my unit test. I know that GTest can output its result as an JUnit XML or XML format. My question is, does Cruise support JUnit/XML format?
How would Cruise know whe... | [
0.06951189786195755,
-0.06509770452976227,
0.19330942630767822,
0.05216687172651291,
0.010701687075197697,
-0.11962677538394928,
0.03778105974197388,
-0.400525838136673,
-0.001519736833870411,
-0.362511545419693,
0.08674982190132141,
0.7416565418243408,
0.33126673102378845,
-0.048365049064... | |
First, [here's a sample](http://java.sun.com/docs/books/tutorial/essential/concurrency/deadlock.html):
```
public class Deadlock {
static class Friend {
private final String name;
public Friend(String name) {
this.name = name;
}
public String getName() {
retu... | [
0.04049022123217583,
-0.18745392560958862,
0.018131084740161896,
-0.20374876260757446,
0.09468945115804672,
-0.2205381542444229,
0.2635561227798462,
-0.18125231564044952,
-0.34203845262527466,
-0.1006305068731308,
-0.08596410602331161,
0.6918960809707642,
-0.5338426232337952,
0.39992740750... | |
bow(Friend bower) {
System.out.format("%s: %s has bowed to me!%n",
this.name, bower.getName());
bower.bowBack(this);
}
public synchronized void bowBack(Friend bower) {
System.out.format("%s: %s has bowed back to me!%n", | [
-0.5132623910903931,
0.10971574485301971,
0.7366871237754822,
-0.48943600058555603,
-0.1812216192483902,
0.4530143141746521,
0.5371233224868774,
-0.2297142595052719,
-0.04758639633655548,
-0.3192013204097748,
-0.01238994486629963,
0.4320095479488373,
0.224465012550354,
0.1906091421842575,
... | |
this.name, bower.getName());
}
}
public static void main(String[] args) {
final Friend alphonse = new Friend("Alphonse");
final Friend gaston = new Friend("Gaston");
new Thread(new Runnable() {
public void run() { alphonse.bow(gaston); }
}).start(); | [
-0.13257871568202972,
-0.2278197556734085,
0.9068337678909302,
-0.11047603189945221,
0.5228110551834106,
0.1028606966137886,
0.3403056859970093,
0.06303536146879196,
-0.36300089955329895,
-0.4320448338985443,
-0.3100256025791168,
0.37309879064559937,
-0.5088579654693604,
0.7133544087409973... | |
new Thread(new Runnable() {
public void run() { gaston.bow(alphonse); }
}).start();
}
}
```
What I don't get is *how* the blockage occurs. The main function initiates two threads that each begin their own bows.
What exactly does 'synchronized' block? The same function running for the same obj... | [
0.36505773663520813,
-0.24131719768047333,
0.6281911730766296,
0.1733560413122177,
0.14912842214107513,
-0.12599915266036987,
0.29646143317222595,
-0.12482919543981552,
-0.4301289916038513,
-0.4702107012271881,
0.0005505444132722914,
0.45029541850090027,
-0.15296199917793274,
0.36780169606... | |
me out here.
In Java, each `Object` provides the ability for a Thread to `synchronize`, or lock, on it. When a method is synchronized, the method uses its object instance as the lock. In your example, the methods `bow` and `bowBack` are both `synchronized`, and both are in the same class `Friend`. This means that any T... | [
0.28615397214889526,
0.08702925592660904,
0.2574375867843628,
-0.10218331962823868,
-0.08832699060440063,
-0.2296278476715088,
0.022219780832529068,
-0.15995141863822937,
-0.2920963764190674,
-0.35117775201797485,
0.23293858766555786,
0.3537515699863434,
-0.4198428690433502,
0.360232949256... | |
this object.
2. The second Thread started calls `gaston.bow(alphonse)`, which is `synchronized` on the `gaston` `Friend` object. This means the Thread must acquire the lock from this object.
3. The first thread started now calls `bowback` and waits for the lock on `gaston` to be released.
4. The second thread started n... | [
0.05133453756570816,
0.04326744005084038,
1.2070860862731934,
-0.05656776577234268,
-0.08866719156503677,
-0.3720431327819824,
0.3743879497051239,
-0.31521743535995483,
-0.3545612692832947,
-0.31778401136398315,
0.004668647423386574,
0.4280317723751068,
-0.11426061391830444,
0.271853446960... | |
Thread #2) with the code `new Thread(new Runnable() { ...`. Thread #2 calls `alphonse.bow(gaston)`, which is `synchronized` on the `alphonse` `Friend` object. Thread #2 thus acquires the "lock" for the `alphonse` object and enters the `bow` method.
3. A time slice occurs here and the original Thread gets a chance to do... | [
-0.10970637947320938,
0.03376692160964012,
0.974920928478241,
-0.06190924718976021,
-0.06351485103368759,
-0.14692305028438568,
0.2893909215927124,
-0.34095996618270874,
-0.3322695195674896,
-0.33911147713661194,
-0.1248040646314621,
0.2772826552391052,
-0.3188895285129547,
0.3007081449031... | |
and enters the `bow` method.
5. A time slice occurs here and Thread #2 gets a chance to do more processing.
6. Thread #2 now calls `bower.bowBack(this);` with `bower` being a reference to the instance for `gaston`. This is the logical equivalent of a call of `gaston.bowBack(alphonse)`. Thus, this method is `synchronize... | [
0.09338731318712234,
0.05596480891108513,
0.9820162653923035,
-0.17569707334041595,
0.05586453527212143,
-0.2634749412536621,
0.336319237947464,
-0.28796395659446716,
-0.2900579273700714,
-0.30074793100357056,
-0.07547786086797714,
0.3424293100833893,
-0.038119904696941376,
0.3931061625480... | |
#3 now calls `bowback`, which in this instance is logically the same as the call `alphonse.bowBack(gaston)`. To do this, it needs to acquire the lock for the `alphonse` instance, but this lock is held by Thread #2. This Thread is now put into a waiting state.
And you are now in a position where neither Thread can exec... | [
-0.19280289113521576,
-0.1297074407339096,
0.9251782298088074,
-0.13361509144306183,
0.09542681276798248,
-0.24189254641532898,
0.35518670082092285,
-0.4160560369491577,
-0.46119579672813416,
-0.1570485532283783,
-0.07580643892288208,
0.3431161642074585,
-0.3383542001247406,
0.267821878194... | |
sequence of events occurring, which can make then difficult to debug since they can be difficult to reproduce. | [
0.149650439620018,
-0.03871583193540573,
-0.09486228227615356,
0.13452652096748352,
0.2717750072479248,
0.02456110157072544,
0.33561116456985474,
0.2664032280445099,
-0.4370102882385254,
-0.39932161569595337,
-0.3049321174621582,
-0.1548876315355301,
-0.29930582642555237,
0.591840445995330... | |
In order to assist users with repetitve data entry, I am trying to implement a system where many of the previous properties are remembered when adding new data.
Is it possible to use the Properties.Settings.Default.MySetting functionality or is there a better method for doing this kind of thing?
Couldn't you just make... | [
0.359941691160202,
-0.06831815093755722,
0.16234351694583893,
0.35656800866127014,
-0.05257122591137886,
0.1311516910791397,
0.2992175221443176,
-0.0951726883649826,
-0.3819696009159088,
-0.47216495871543884,
-0.12388942390680313,
0.5235344767570496,
-0.18793560564517975,
0.390862643718719... | |
last thing entered per user, you cold even preserve this between sessions.
The OP comments:
> Unfortunately, making a deep copy of an object messes up the objectcontext when relationships are involved. A new object with relationships either needs to have new relational objects created or existing objects queried from... | [
0.16819174587726593,
0.2982919216156006,
0.4435766637325287,
0.24893896281719208,
0.2722433805465698,
-0.3685629963874817,
0.27868491411209106,
0.12684470415115356,
-0.3005984127521515,
-0.3118179142475128,
0.03235785290598869,
0.4874238073825836,
-0.0011792173609137535,
0.0992109403014183... | |
either "Exempt" (no overtime) or "Non-exempt" (gets overtime). You pulled the values for employeeType from the database, and you want the next employee entered to have the same values as the last entered employee, to save the data entry people keystrokes. So your deep copy would just associate the copied employee with ... | [
0.2931332290172577,
0.001571434666402638,
0.1531418412923813,
0.39039739966392517,
0.07888352125883102,
-0.09154967963695526,
-0.00787428393959999,
-0.2038431316614151,
-0.31173616647720337,
-0.2508068382740021,
0.12248612195253372,
0.5267059803009033,
-0.1375095695257187,
0.03144471347332... | |
I got this error message :
```
java.net.URISyntaxException: Illegal character in query at index 31: http://finance.yahoo.com/q/h?s=^IXIC
```
`My_Url = http://finance.yahoo.com/q/h?s=^IXIC`
When I copied it into a browser address field, it showed the correct page, it's a valid `URL`, but I can't parse it with this: ... | [
0.28717780113220215,
0.4167114496231079,
0.33015817403793335,
0.06674931198358536,
0.0024444274604320526,
-0.041541628539562225,
0.10219921171665192,
-0.13431333005428314,
-0.1856057196855545,
-0.41826075315475464,
-0.004592337179929018,
0.4131612777709961,
-0.30560770630836487,
0.31964671... | |
Basically I want to get a handle of the python interpreter so I can pass a script file to execute (from an external application).
This works in Linux & Windows:
**Python 3.x**
```
>>> import sys
>>> print(sys.executable)
C:\path\to\python.exe
```
**Python 2.x**
```
>>> import sys
>>> print sys.executable
/usr/bin/... | [
0.28470101952552795,
0.05235859006643295,
0.16142623126506805,
-0.20867840945720673,
-0.0939495787024498,
-0.15107804536819458,
0.12284902483224869,
-0.036057982593774796,
-0.03206079453229904,
-0.6375521421432495,
-0.03402877599000931,
0.7766222953796387,
-0.28329941630363464,
-0.03920698... | |
Haven't seen anything about it here but it seems to solve one of the problems with GWT - the fact that you have to write Java code to generate your GUI. Instead [this software](http://www.instantiations.com/gwtdesigner/) allows you to design the GUI using drag-and-drop tools - a WYSIWYG interface.
I'm not trying to s... | [
0.5909626483917236,
0.05987900123000145,
0.15389949083328247,
0.0372876338660717,
-0.22795844078063965,
-0.025949914008378983,
0.05456748604774475,
0.06712635606527328,
-0.19107118248939514,
-0.515183687210083,
0.11698421090841293,
0.8002261519432068,
-0.0028974772430956364,
-0.04867737740... | |
of WYSIWYG editors for that (like Dreamweaver) but most experienced web designers don't touch that stuff with a barge pole, they hand code it. Not because they're masochists, but because they want control over the source, they want to make it clean and readable. Coding is a scientific artwork, best left to Human Beings... | [
0.8489950895309448,
-0.11736421287059784,
-0.10482027381658554,
0.2723289728164673,
-0.2275177538394928,
-0.19182755053043365,
0.33041155338287354,
0.45344918966293335,
-0.17586424946784973,
-0.4499010443687439,
0.07411003857851028,
0.333492249250412,
-0.3537437915802002,
0.187867909669876... | |
I have a (ASP.NET MVC) site that uses jQuery 1.3.2 and my jQuery functions refuse to invoke on Safari 4.0 beta [mac].
I *CAN* get them to invoke if I change the user-agent to Safari 3.2.1 Mac. This seems strange to me as I can't find any info about jQuery having issues with the beta and I don't know why the user-agent... | [
0.4513956606388092,
0.21421657502651215,
0.46144986152648926,
-0.13600900769233704,
-0.3190964460372925,
-0.1462213099002838,
0.6011254191398621,
0.08478925377130508,
-0.2646241784095764,
-0.741315484046936,
-0.08573950082063675,
0.8281890749931335,
-0.10369159281253815,
0.1143913790583610... | |
think that maybe the JS engine went whacky and after a safari restart all was restored.
Thank you all for your comments.
I was testing with JQuery 1.3.2 on Safari 4.0 beta (mac) just a minute ago before I decided to check stackoverflow :)
So I don't think it's a general problem, you'll have to provide some more info ... | [
0.523296058177948,
0.15405336022377014,
0.05607108399271965,
0.21239343285560608,
-0.3910611867904663,
-0.43019652366638184,
0.5195608735084534,
0.26495933532714844,
-0.39029747247695923,
-0.33455365896224976,
-0.012638434767723083,
0.5838219523429871,
-0.01417254563421011,
-0.103794246912... | |
I quite recently learned about the C++ classes friend keyword and the uses in serialization and now I need some help in getting it to work.
I have no problem serializing my class to a file, it's working great, however i'm having a hard time trying to read this file into a vector container. I'm sure I need a loop in my... | [
-0.23427945375442505,
-0.013656744733452797,
0.09664276242256165,
0.00845990888774395,
-0.39594027400016785,
0.11616959422826767,
0.32528990507125854,
0.0074410815723240376,
-0.2716749310493469,
-0.6582728028297424,
0.10057052224874496,
0.5322576761245728,
-0.24409617483615875,
0.039403259... | |
SalesPeople {
friend ostream &operator<<(ostream &stream, SalesPeople salesppl);
friend istream &operator>>(istream &stream, SalesPeople &salesppl);
private:
string fullname;
int employeeID;
int startYear;
bool status;
};
ostream &operator<<(ostream &stream, SalesPeople sal... | [
-0.24072220921516418,
0.2256225347518921,
0.7619326710700989,
-0.318732887506485,
0.18386036157608032,
0.13080690801143646,
0.12841221690177917,
-0.015159284695982933,
0.37069377303123474,
-0.5197706818580627,
-0.7259096503257751,
0.8142318725585938,
-0.3639563024044037,
0.0473386272788047... | |
&stream, SalesPeople &salesppl)
{
stream >> salesppl.fullname;
stream >> salesppl.startYear;
stream >> salesppl.status;
// not sure how to read that empty extra line here ?
return stream;
}
// need some help here trying to read the file into a vector<SalesPeople>
SalesPeople employee;
vector<SalesP... | [
0.3401447832584381,
-0.19623085856437683,
0.4058508574962616,
0.16621585190296173,
-0.03774760663509369,
0.36872395873069763,
0.11907981336116791,
-0.04785313084721565,
-0.055108245462179184,
-0.5727397203445435,
-0.07140658050775528,
0.5195063948631287,
-0.5053265690803528,
0.331508487462... | |
im not sure how to use the istream method here.
read >> employee;
employees.push_back(employee);
```
By the way, I know that the Boost library has a great serialization class, however I'm trying to learn how serialization would work using the STL library for now.
Thanks a lot in advance for any help that you can giv... | [
0.6012769341468811,
0.2898124158382416,
0.2636375427246094,
0.1140795648097992,
-0.1770727038383484,
-0.16675661504268646,
0.16003620624542236,
0.11219363659620285,
-0.010527298785746098,
-0.7643081545829773,
0.03862462937831879,
0.8078558444976807,
-0.011415878310799599,
-0.06407641619443... | |
since this is for your homework, you may just want to read and think about the following hints before looking at the code.
* For reading the SalesPeople in a
loop, I would recommend that you take
a look at this [FAQ](http://www.parashift.com/c++-faq-lite/input-output.html#faq-15.2). It has an
example of almost exactly... | [
0.4166146218776703,
0.2178756296634674,
0.2464180737733841,
0.16565093398094177,
-0.15361471474170685,
0.22477608919143677,
0.009393190033733845,
-0.07353038340806961,
-0.10925110429525375,
-0.06623529642820358,
-0.09274130314588547,
0.2627323865890503,
-0.09609811753034592,
-0.07861071825... | |
one question for you, though: what about the employeeID? I notice that it is being ignored in your sample code. Is that on purpose?
And now, if you still need help, you can check out the code I wrote to get this to work:
```
istream &operator>>(istream &stream, SalesPeople &salesppl)
{
//stream >> salesppl.fullna... | [
0.258914977312088,
-0.035041265189647675,
0.3278178572654724,
-0.008989393711090088,
0.08381588757038116,
-0.16499143838882446,
0.039703357964754105,
0.09268222749233246,
-0.001183213316835463,
-0.659089207649231,
-0.17140020430088043,
0.5628024339675903,
-0.21644927561283112,
0.0683843716... | |
// cout << employee; // to verify the input, uncomment this line
employees.push_back(employee);
}
```
Also, as jfclavette suggested, it may not be a bad idea to add some input validation (check the stream status after reading from it and verify that it is still good). Although I would recommend using the while() ... | [
0.3133462369441986,
0.12335048615932465,
0.1777985692024231,
-0.07791852205991745,
0.10888703167438507,
-0.1406095325946808,
0.2573106288909912,
0.02410915680229664,
-0.05562140792608261,
-0.3520756661891937,
-0.09224549680948257,
0.45619046688079834,
-0.15455956757068634,
0.11697772890329... | |
I'm using the TreeView component from the Silverlight toolkit and I'm trying to get the parent of a selected node. The TreeView is bound to a series of objects, so directly working with a TreeViewItem appears to be out of the question.
```
<toolkit:TreeView SelectedItemChanged="DoStuff" DisplayMemberPath="Name" Items... | [
-0.3504899740219116,
-0.3123117685317993,
0.3971529006958008,
-0.0016043954528868198,
0.007029877509921789,
0.1727324277162552,
0.0739799365401268,
-0.2315601110458374,
-0.05538357421755791,
-0.9288056492805481,
-0.12069937586784363,
0.20005342364311218,
-0.07025974243879318,
0.27831843495... | |
</StackPanel>
</common:HierarchicalDataTemplate>
</toolkit:TreeView.ItemTemplate>
</toolkit:TreeView>
```
Is there a way to fetch the parent of an item selected in the DoStuff event?
As long as you've downloaded the latest Silverlight Toolkit then this is easy using the TreeViewExtensions that are include... | [
0.014391939155757427,
-0.3172205686569214,
0.4083305597305298,
-0.13511593639850616,
-0.058728501200675964,
-0.02602432109415531,
0.2938148081302643,
-0.5039345622062683,
-0.2724245488643646,
-0.682437002658844,
-0.26072177290916443,
0.32402607798576355,
-0.33078643679618835,
0.07842596620... | |
//
// Do stuff with parent, this snippet updates
// a TextBlock showing the name of the current parent
if (parent != null)
{
Status.Text = parent.ToString();
}
}
}
``` | [
0.16755422949790955,
0.16327115893363953,
0.3225119113922119,
-0.05255025997757912,
0.5318658947944641,
-0.11261465400457382,
0.39142417907714844,
0.2969565987586975,
-0.04262053966522217,
-0.4977041780948639,
-0.5056977868080139,
0.4044645428657532,
0.0114443963393569,
0.4962022602558136,... | |
My question arises from the post ["Plain English Explanation of Big O"](https://stackoverflow.com/questions/487258/plain-english-explanation-of-big-o). I don't know the exact meaning for logarithmic complexity. I know that I can make a regression between the time and the number of operations and calculate the X-squared... | [
-0.15243090689182281,
0.18672171235084534,
0.07291989773511887,
0.08703724294900894,
0.020020578056573868,
0.183186337351799,
-0.07491567730903625,
0.15046152472496033,
-0.15887455642223358,
-0.4494679272174835,
-0.09327062964439392,
0.22237640619277954,
-0.21923674643039703,
0.25137126445... | |
the root, 2 children, 4 grandchildren, 8 great-grandchildren, etc. Basically at each level the number of nodes gets multiplied by some factor (2) but still only one of those is involved in the iteration. Or as another example, a loop in which the index doubles at each step:
```
for (int i = 1; i < N; i *= 2) { ... }
... | [
-0.3997163474559784,
0.05046384409070015,
0.23303359746932983,
0.1128043532371521,
0.39113080501556396,
0.2943035066127777,
0.3609427809715271,
-0.08909107744693756,
-0.4177801311016083,
-0.5881614089012146,
-0.015564359724521637,
0.05594317987561226,
-0.06782029569149017,
0.55705189704895... | |
I'm trying to place a control that I have created on my `Canvas`. The idea is to be able to dynamically add them on the fly. Like on a button click or at the end of a `DispatchTimer`. I have the following, but it doesn't work:
```
FirstCircleControl mc = new FirstCircleControl();
Canvas.SetLeft(mc, 100);
C... | [
0.4227086305618286,
-0.4067872166633606,
0.5930958986282349,
0.14969661831855774,
0.25332027673721313,
0.2721002697944641,
-0.2583998143672943,
-0.5473345518112183,
-0.3371332883834839,
-0.8072894215583801,
-0.04800141230225563,
0.4234190285205841,
-0.3809974491596222,
0.16381442546844482,... | |
What is the best way to run a windows service as a console?
My current idea is to pass in an "/exe" argument and do the work of the windows service, then calling Application.Run().
The reason I'm doing this is to better debug a windows service and allow easier profiling of the code. The service is basically hosting .... | [
0.36133676767349243,
0.096603624522686,
0.36706674098968506,
-0.04560064151883125,
0.09502924233675003,
0.12663176655769348,
0.3823499083518982,
-0.1915150284767151,
-0.05033218115568161,
-0.620298445224762,
-0.18299730122089386,
0.7954943180084229,
-0.4411909580230713,
0.45574694871902466... | |
bool isConsole = false;
if (args != null && args.Length == 1 && args[0].StartsWith("-c")) {
isConsole = true;
Console.WriteLine("Daemon starting");
MyDaemon daemon = new MyDaemon();
Thread daemonThread = new Thread(new ThreadStart(daemon.Start));
daemonThread.Start();
... | [
-0.10783469676971436,
-0.10312759131193161,
0.7246005535125732,
-0.5129376649856567,
0.3415641784667969,
0.1661306768655777,
0.7848087549209595,
-0.21568726003170013,
-0.2716578245162964,
-0.7274237871170044,
-0.49918311834335327,
0.4291682243347168,
-0.36805012822151184,
0.600978851318359... | |
ServicesToRun = new System.ServiceProcess.ServiceBase[] { new Service() };
System.ServiceProcess.ServiceBase.Run(ServicesToRun);
}
}
``` | [
-0.11333952844142914,
-0.009895646944642067,
0.5176852345466614,
-0.616838276386261,
0.2108645886182785,
0.2463083118200302,
0.4731808304786682,
-0.11838693171739578,
-0.3414895832538605,
-0.9323044419288635,
-0.6390272974967957,
0.5341696739196777,
-0.4191957116127014,
0.4957863390445709,... | |
I'm a pretty good C# programmer who needs to learn SQL Server. What's the best way for me to learn SQL Server/Database development?
**Note:** I'm a total newb when it comes to DB's and SQL.
SQL is about set theory, or more correctly, relational algebra. Read a brief primer on that. And learn to think in sets, not in p... | [
0.43987366557121277,
0.17239929735660553,
0.1850925087928772,
0.11184254288673401,
-0.3082454800605774,
-0.18551073968410492,
0.09497927129268646,
-0.2529727518558502,
-0.21207131445407867,
-0.5181480646133423,
0.07868331670761108,
0.5359867811203003,
-0.24737969040870667,
-0.0552286617457... | |
I mean any subset, including the empty set, and not necessarily a proper subset.)
Anywhere I can write a column name in DDL (except as the target of an update), I can write an expression that uses column names, functions, or constants.
`select 1, 2, 3 from table` will return the resultset "1 2 3", once for each row i... | [
0.10576862096786499,
0.002446784172207117,
0.6572293639183044,
-0.14333683252334595,
0.08734478801488876,
0.03159594535827637,
0.103614941239357,
-0.04275297373533249,
-0.0896497517824173,
-0.6749899387359619,
-0.26717090606689453,
0.1678609549999237,
-0.10236412286758423,
0.21026510000228... | |
restricts rows selected, or deleted, or updated to those rows for which the predicate is true. A where cause can be composed of an arbitrary number of predicates connected by the logical operators `and` `or` and `not`. Just like the column list in a `select`, I can use column names, functions, and constants in my `wher... | [
-0.11712407320737839,
-0.013135649263858795,
0.3425132930278778,
0.14578792452812195,
0.06987931579351425,
0.10683100670576096,
-0.1711633950471878,
-0.398158460855484,
0.005647163838148117,
-0.4009864330291748,
-0.007576643023639917,
0.2748764455318451,
-0.4698193371295929,
0.249870613217... | |
another table. The relational operator is often equality, but can in fact be any binary operator or even a function.
Tables are related, as I mentioned above, by keys; a row in a table may relate to zero, one, or many rows in another table; this is referred to as the cardinality of the relation. Relations may be one-... | [
-0.14781175553798676,
0.158350870013237,
0.2686349153518677,
0.29665541648864746,
-0.2764322757720947,
0.22340747714042664,
-0.27222853899002075,
-0.042749252170324326,
-0.37622225284576416,
-0.5741814970970154,
-0.042702462524175644,
0.4416278004646301,
-0.49140867590904236,
0.24957889318... | |
can in fact also model one-to-many and one-to-one; ask yourself why, given that, all relations are not many-to-many.
EF Codd, among other, pioneered the idea of normal form in relational databases. There are commonly held to be five or six normal forms, but the most important summary of normal form is simple: every e... | [
-0.05806231126189232,
0.17961974442005157,
0.16076728701591492,
0.32783371210098267,
-0.29699093103408813,
0.23969648778438568,
0.13163666427135468,
-0.020194904878735542,
-0.12048214673995972,
-0.5537776947021484,
-0.253989040851593,
0.46954330801963806,
-0.519392728805542,
0.003478031838... | |
if a your database isn't normalized.
In all this, try to understand why I like to say **"if you lie to the database, it will lie to you"**. By this I don't mean bad data, I mean bad design. E.g., if you model a one-to-many relation as many-to-many, what "lies" can be recorded? What "lies" can happen if your tables are... | [
0.3965296745300293,
-0.12279250472784042,
-0.040955137461423874,
0.32076603174209595,
-0.2310633808374405,
-0.0831470787525177,
0.10301391035318375,
0.1398594230413437,
-0.3158454895019531,
-0.6465712785720825,
-0.04736422747373581,
0.604515790939331,
-0.25820064544677734,
0.34307050704956... | |
columns of interest from that join, and use the view instead of alway rewriting the join.
Practical tips: **first, write a view**. whatever you're doing, it'll be simpler and clearer if you write a view for every calculation or sub-calculation you do. Write a view that encapsulates each join, write a view that encapsu... | [
0.08615167438983917,
-0.12945906817913055,
0.32851848006248474,
0.08576874434947968,
-0.22515171766281128,
0.15543392300605774,
0.008820354007184505,
-0.25726133584976196,
-0.1334262490272522,
-0.6823856830596924,
-0.08199470490217209,
0.41657811403274536,
-0.28972330689430237,
-0.15794682... | |
you to compose more complex functionality out of simpler operations. [Here's an example where I use views to transform a table into forms that more easily allow me to apply successive transformations, in order to get to a goal.](https://stackoverflow.com/questions/702500/sql-query-to-collapse-duplicate-values-by-date-r... | [
0.1501438468694687,
0.28838592767715454,
0.23872530460357666,
0.34735897183418274,
0.013581328094005585,
-0.28307032585144043,
0.22669455409049988,
-0.18784235417842865,
-0.5944532752037048,
-0.6455842852592468,
-0.026770733296871185,
0.4220294952392578,
-0.2327786087989807,
0.246333926916... | |
rules for modeling data apply. You can get, for example, the names of all objects in your database from the sytem table `sysobjects`; `syscolumns` contains all the columns. To find all the columns in one table, you'd join `sysobjects` and `syscolumns` on id, and add a `where` clause restricting the resultset to a parti... | [
0.393430233001709,
0.2001553773880005,
0.32336774468421936,
0.46322137117385864,
0.16901013255119324,
0.24830986559391022,
-0.18176425993442535,
-0.2904701828956604,
-0.25328320264816284,
-0.4728561341762543,
-0.06255296617746353,
0.44396328926086426,
-0.185979962348938,
0.1231170967221260... | |
all blonde doctors who reside in Atlanta", and write the query that does that. Piece it together by writing views that show you all blondes, all doctors, and all people who reside in Atlanta.
You'll find that in asking "how can I find that", you'll expose deficiencies in your model, and you'll find that you want or ev... | [
0.8192391991615295,
0.24145488440990448,
0.3776828646659851,
0.31467536091804504,
0.26427412033081055,
0.06080815941095352,
0.29796868562698364,
-0.17166461050510406,
-0.31672486662864685,
-0.7005147337913513,
0.41361385583877563,
0.4257693886756897,
-0.24413339793682098,
0.266810119152069... | |
I would like to ask if the use of mutable is appropriate here:
```
#include <iostream>
class Base
{
protected:
int x;
public:
virtual void NoMod() const
{
std::cout << x << std::endl;
}
void Draw() const
{
this->NoMod();
}
};
class Derive : public Base
{
private:
mutable int y;
public:
... | [
-0.12407442927360535,
-0.3482320010662079,
0.15359628200531006,
0.05252211168408394,
0.34076106548309326,
-0.012419079430401325,
0.1425921618938446,
-0.2536661624908447,
0.06839311867952347,
-0.6150547862052917,
-0.17297551035881042,
0.8873492479324341,
-0.09089531004428864,
0.325680792331... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.