text
stringlengths
0
30.5k
title
stringclasses
1 value
embeddings
listlengths
768
768
I have a Python program that uses the "threading" module. Once every second, my program starts a new thread that fetches some data from the web, and stores this data to my hard drive. I would like to use sqlite3 to store these results, but I can't get it to work. The issue seems to be about the following line: ``` con...
[ 0.3221350312232971, 0.3935801386833191, 0.12182112038135529, -0.09662964195013046, -0.09104851633310318, -0.18411006033420563, 0.24138905107975006, -0.06560644507408142, -0.21765071153640747, -0.46364668011665344, 0.25764304399490356, 0.37644535303115845, -0.3845325708389282, 0.58468163013...
locked it. * If I put this line of code in the main program and pass the connection object (conn) to each thread, I get a ProgrammingError, saying that SQLite objects created in a thread can only be used in that same thread. Previously I was storing all my results in CSV files, and did not have any of these file-locki...
[ 0.5002595782279968, 0.09725078195333481, 0.3561778664588928, 0.1524171680212021, 0.08471169322729111, -0.07494305074214935, -0.010312434285879135, 0.14437775313854218, -0.5211288332939148, -0.3660965859889984, -0.012283950112760067, 0.36240410804748535, -0.3780858814716339, 0.4787672758102...
thread that owns database connection dequeues data from the queue and passes it to the database.
[ 0.04155999422073364, -0.09752170741558075, 0.4551714360713959, 0.3373650908470154, 0.32782697677612305, -0.014546547085046768, -0.07574775815010071, 0.43313008546829224, -0.3111741244792938, -0.24835453927516937, -0.049828171730041504, -0.21507614850997925, -0.35327425599098206, 1.00916206...
I use a lot of lists and arrays but I have yet to come across a scenario in which the array list couldn't be used just as easily as, if not easier than, the linked list. I was hoping someone could give me some examples of when the linked list is notably better. **Linked lists are preferable over arrays when:** 1. you ...
[ 0.30466586351394653, -0.13412098586559296, -0.18249672651290894, 0.13912610709667206, -0.12260078638792038, -0.08257106691598892, 0.13828197121620178, -0.05042994022369385, -0.45679983496665955, -0.7726235389709473, 0.012682363390922546, 0.48939061164855957, -0.27091771364212036, 0.0419605...
array grows too big 3. you don't need random access to any elements 4. you want to be able to insert items in the middle of the list (such as a priority queue) **Arrays are preferable when:** 1. you need indexed/random access to elements 2. you know the number of elements in the array ahead of time so that you can al...
[ 0.0833037868142128, -0.30421268939971924, 0.2247941642999649, 0.13917477428913116, -0.024896709248423576, -0.04322008788585663, 0.14831694960594177, -0.3186074197292328, -0.5470405220985413, -0.7699410319328308, 0.12430992722511292, 0.3772725760936737, -0.2795010507106781, 0.11256320774555...
each element in linked list, which may result in page faults which may result in performance hits. 4. memory is a concern. Filled arrays take up less memory than linked lists. Each element in the array is just the data. Each linked list node requires the data as well as one (or more) pointers to the other elements in t...
[ -0.0261704009026289, -0.30236533284187317, 0.4151964485645294, 0.3516717851161957, -0.2643662691116333, -0.20975202322006226, 0.07382175326347351, -0.3820226192474365, -0.5252464413642883, -0.6577302813529968, -0.2327624261379242, 0.44805076718330383, -0.4183897376060486, -0.16449370980262...
effort or re-shuffling elements around. Performance-wise, arraylists are slower than raw arrays.
[ -0.10098632425069809, -0.2974782884120941, -0.1359529048204422, 0.25149673223495483, -0.42155855894088745, -0.054125167429447174, 0.19031715393066406, -0.3005436360836029, -0.32855457067489624, -0.8152692914009094, -0.27620425820350647, 0.31141647696495056, -0.19581450521945953, -0.2015493...
I'm running a Django app using FastCGI and lighttpd. Can somebody explain me what I should consider when deciding what value to use for maxrequests, maxspare, minspare, maxchildren? These options are not too well documented, but seem quite important. Don't just tell me what they do; I want to understand what *implic...
[ 0.5340961813926697, -0.04670695587992668, 0.3216426372528076, 0.2904050946235657, 0.04530918970704079, -0.0024505278561264277, -0.08079859614372253, 0.024255404248833656, -0.1810884028673172, -0.5128679275512695, 0.19644688069820404, 0.484220027923584, -0.14174146950244904, 0.2355886101722...
forked maxspare : Maximum number of spare processes to keep running minspare : Minimum number of spare processes to prefork maxchildren: Hard limit number of processes in prefork mode ``` This means that you'll have at most *maxchildren* processes running at any given time in your webserver, each runn...
[ 0.2593134939670563, -0.3424055874347687, 0.581727147102356, 0.16595877707004547, -0.07158531993627548, 0.34211963415145874, 0.17447713017463684, 0.3155452013015747, -0.4581911563873291, -0.6746178269386292, -0.15471546351909637, 0.3176983892917633, -0.07545430213212967, 0.45108598470687866...
the process creation if you start with one, it's good to start at, say 10), and *maxspare* lets you say how many concurrent requests will your server attend to at most (without compromising it's expected response time and so on. Needs a stress test to validate). And *maxrequests* is talking about the lifetime of each c...
[ 0.2195422351360321, -0.26262542605400085, 0.406291663646698, 0.4237948954105377, 0.22398722171783447, 0.40482887625694275, 0.2338154911994934, 0.012873096391558647, -0.5153873562812805, -0.7113293409347534, 0.1284244954586029, 0.08400754630565643, 0.07493998110294342, 0.3026350140571594, ...
It's possible within a Flex application, to declare elements, for example a HTTPService elements, both in XML and also in code. That is, either: ... or in code: var hs : HTTPService = ... My question is when should I prefer which alternative? What are the advantages of having stuff in XML vs. plain old vars in code?...
[ 0.4240058958530426, -0.30333447456359863, 0.6428892016410828, 0.14979217946529388, -0.2324812412261963, -0.23840877413749695, 0.1396925151348114, -0.10594289004802704, -0.43344005942344666, -0.7974921464920044, -0.30659499764442444, 0.4212711751461029, -0.38477274775505066, -0.167554825544...
add anything to an object's displayList quickly and easily, MXML is a great way.
[ 0.7004995346069336, -0.35768333077430725, 0.541649341583252, 0.3185897469520569, -0.08844783902168274, -0.34266549348831177, 0.11117356270551682, 0.4023028016090393, -0.2702047824859619, -0.678638219833374, -0.07878198474645615, 0.15678846836090088, -0.2445494830608368, 0.02272797003388405...
I have a rather large (freeware) project written with Delphi 2007 which is using both the `TntUnicodeControls` and the `TntLXControls` library and I'm planning to move to Delphi 2009. Unfortunately I'm using those libraries everywhere in my project: * Replacement for VCL controls to provide Unicode capability * Win32...
[ 0.05248519405722618, -0.06276220828294754, 0.2656603753566742, -0.031149806454777718, -0.19979025423526764, -0.15783697366714478, 0.2505272924900055, -0.17154963314533234, -0.013845047913491726, -0.8720405101776123, -0.16647902131080627, 0.7560177445411682, -0.26962751150131226, -0.3266283...
some of this, as I'm porting a C++Builder application that uses TNT from 2007 to 2009. The switch to Unicode in D2009 is overdue and welcome. However, it's unfortunate that the transition is probably easier for those who have NOT needed unicode in the past, and probably still don't. If, like me, you needed Unicode and ...
[ 0.20741863548755646, 0.06709210574626923, 0.03448359668254852, -0.08377224206924438, -0.3599240183830261, -0.06415607035160065, 0.41302958130836487, -0.04356195405125618, -0.2870008945465088, -0.6199715733528137, -0.13975884020328522, 0.5908520817756653, -0.05790017172694206, -0.1530133634...
layer over the native VCL components to ease portability. I'd consider that if your other libraries can be rebuilt to use it. However, you may be better going back to native VCL controls, and the reason is string types. TNT control have always used WideString to pass Unicode strings back and forth, and you may well ha...
[ 0.036229319870471954, -0.28170156478881836, 0.5035890936851501, -0.0003781144041568041, -0.14058098196983337, -0.39377546310424805, -0.06923827528953552, -0.24467022716999054, -0.34085384011268616, -0.7922143936157227, -0.194692000746727, 0.6385865211486816, 0.031324099749326706, -0.027534...
do decide to replace TNT components with native VCL ones, you can use GExperts "Replace Components" command - or, maybe easier, do a search and replace in your .DFM and .PAS files (which you DO have in text form, don't you) to replace TTNT with T.
[ 0.45678824186325073, -0.48973435163497925, 0.1777375340461731, 0.08788279443979263, -0.0946849137544632, -0.37430697679519653, 0.2349710315465927, -0.17545010149478912, -0.26217514276504517, -0.6411694884300232, -0.1429908275604248, 0.8858200907707214, -0.20135116577148438, -0.182808756828...
I've got a table of student information in MySQL that looks like this (simplified): ``` | age : int | city : text | name : text | ----------------------------------------------------- | | | | ``` I wish to select all student names and ages within a given city...
[ 0.32078272104263306, 0.2882293164730072, 0.5887770056724548, 0.10243181139230728, 0.24026599526405334, 0.2108173668384552, -0.0777931958436966, 0.4979177415370941, -0.08502961695194244, -0.7617648243904114, -0.21750400960445404, -0.09004731476306915, 0.19727538526058197, 0.1868329495191574...
also, per student, how many other students in his age group (that is, how many students share his age value). I managed to do this with a sub-query; something like: ``` select name, age as a, (select count(age) from tbl_students where age == a) from tbl_students whe...
[ 0.40919753909111023, 0.25564417243003845, 0.2117021381855011, 0.1064254567027092, 0.23964087665081024, -0.09291566163301468, -0.083659328520298, 0.08778906613588333, -0.04736385866999626, -0.5070413947105408, 0.08795907348394394, -0.06205723062157631, 0.06130153313279152, 0.464087992906570...
so I figure I'd ask if there's a smarter way of doing this. The table is indexed by age and city. ``` select t1.name, t1.age as a, count(t2.age) NumberSameAge from tbl_students t1 inner join tbl_students t2 on t1.age=t2.age where city = 'ny' group by t1.name, t1.age ``` not tested, but some...
[ 0.2634294927120209, 0.23651602864265442, 0.5423357486724854, 0.13320085406303406, 0.16400720179080963, 0.23213034868240356, -0.11138544976711273, -0.13737696409225464, -0.3472307324409485, -0.7337548732757568, -0.10454005002975464, -0.07332763075828552, -0.009852898307144642, 0.42835861444...
least, the structure with a join and a groupby) performs a query on the related students just once.
[ -0.2927969694137573, 0.001723447465337813, 0.16258440911769867, 0.25210484862327576, -0.11787818372249603, -0.1824597418308258, 0.10707670450210571, -0.16568943858146667, -0.23839694261550903, -0.42776232957839966, -0.4555245637893677, 0.10909652709960938, -0.018290147185325623, -0.0670111...
This question has spawned out of this [one.](https://stackoverflow.com/questions/393151/whats-the-easiest-way-to-create-an-array-of-structs) Working with lists of structs in cocoa is not simple. Either use NSArray and encode/decode, or use a C type array and lose the commodities of NSArray. Structs are supposed to be s...
[ 0.18387342989444733, -0.022755637764930725, -0.15593835711479187, 0.3621997833251953, -0.261808305978775, 0.03383283317089081, 0.0664990171790123, -0.11991328001022339, -0.12885922193527222, -0.5727146863937378, -0.1482807695865631, 0.465027391910553, -0.4628893733024597, -0.16384012997150...
only because of KVC or bindings (as Peter suggested on the first question). Cocoa has a few common types that are structs, not objects: NSPoint, NSRect, NSRange (and their CG counterparts). When in doubt, follow Cocoa's lead. If you find yourself dealing with a large number of small, mostly-data objects, you might wan...
[ -0.014312607236206532, -0.10697939246892929, -0.055869102478027344, 0.21071647107601166, -0.3215428292751312, -0.21478107571601868, 0.18931293487548828, 0.024530822411179543, -0.4065338373184204, -0.5923140048980713, -0.29574474692344666, 0.2687373459339142, -0.18586315214633942, -0.122938...
array is essentially read-only.
[ 0.15503451228141785, -0.06555759906768799, -0.06133477762341499, -0.053018610924482346, -0.307261198759079, -0.10056726634502411, 0.0035788717214018106, 0.05591582879424095, 0.024373436346650124, -0.1610955446958542, -0.1526624709367752, 0.4508048892021179, -0.31329238414764404, 0.00303776...
When I am making methods with return values, I usually try and set things up so that there is never a case when the method is called in such a way that it would have to return some default value. When I started I would often write methods that did something, and would either return what they did or, if they failed to d...
[ 0.24451805651187897, 0.2871305048465729, -0.21127013862133026, -0.1929600089788437, -0.48842653632164, -0.14532697200775146, 0.6997879147529602, -0.07874636352062225, -0.10251457989215851, -0.37176117300987244, 0.20091384649276733, 0.3074389398097992, -0.3323817253112793, 0.131775826215744...
return `self` (ruby's `this`) when they wouldn't normally return anything. This is, they say, in order to be able to chain method calls, as in this example using setters that return the object whose attributes they set. ``` tree.setColor(green).setDecor(gaudy).setPractical(false) ``` Initially I find this sort of th...
[ 0.23927703499794006, -0.16178308427333832, 0.11994826793670654, -0.09773330390453339, -0.24907056987285614, -0.2589963972568512, 0.12151128798723221, -0.38164886832237244, -0.17374984920024872, -0.3735225200653076, -0.038494858890771866, 0.7431697845458984, -0.5403729677200317, 0.001134820...
warmly when you think of return values? Any great ways to avoid frustration and increase beauty? In my humble opinion, there are three kinds of return-cases that you should take into consideration: Object property manipulation ---------------------------- The first is the manipulation of object properties. The patter...
[ -0.052927080541849136, 0.045848578214645386, 0.33229848742485046, -0.250624418258667, -0.264845609664917, 0.4095584750175476, -0.11183469742536545, -0.06327164173126221, -0.21509943902492523, -0.6610020399093628, -0.18110641837120056, 0.7799990177154541, -0.02099849097430706, -0.0611698217...
PizzaFactory().create().addAnchovies().addTomatoes().getPizza(); ``` It allows for a quick grasp at what exactly is being created or how an object is manipulated, because the methods form one human-readable expression. It's definitely nice, but don't overuse. A rule of thumb is that this might be used with methods wh...
[ 0.3014752268791199, -0.4274367690086365, 0.21262221038341522, -0.04103577509522438, -0.047676701098680496, 0.21624433994293213, 0.39945507049560547, -0.06543099880218506, 0.15291471779346466, -0.6948551535606384, -0.18735471367835999, 0.875224769115448, -0.3441030979156494, -0.200200483202...
do this or that --------------------------- The third might be when a method makes an perform an operation, returning some sort of value indicating how well the caller's intention was fulfilled - but laying out such a method could be difficult: ``` int new_gear = 20; if (car.gears.changeGear(new_gear)) // does that m...
[ 0.1782500147819519, -0.06566108018159866, 0.39205440878868103, -0.1730833798646927, -0.060587186366319656, 0.11858490854501724, 0.2553940713405609, -0.7504117488861084, -0.1751476526260376, -0.27747538685798645, -0.06105413660407066, 0.6378336548805237, -0.21234989166259766, -0.17512114346...
the gear it changed to, meaning you would have to compare the argument supplied to the method to the return code. That would work. On the other hand, you could simply return either true or false for failure or false or true for failure. Which one to use could be decided by estimating if you'd expect those method calls ...
[ 0.050168827176094055, -0.3625963628292084, 0.2443222552537918, 0.5399777293205261, -0.154652401804924, 0.17474646866321564, 0.09241560101509094, -0.07702726870775223, 0.0008886884315870702, -0.31650784611701965, 0.16159839928150177, 1.2069861888885498, 0.01946793869137764, -0.0690242126584...
look up the comments or documentation for your methods: ``` class GearSystem { // (...) public: enum GearChangeResult { GearChangeSuccess, NonExistingGear, MechanicalGearProblem }; GearChangeResult changeGear (int gear); }; ``` That way, it becomes perfectly obvious for any programmer looking at your code, what the...
[ 0.0007767215720377862, -0.09932001680135727, 0.20456932485103607, 0.16654090583324432, 0.16121232509613037, 0.23097625374794006, 0.14619649946689606, -0.29352739453315735, -0.18153519928455353, -0.3931756913661957, 0.03479239344596863, 0.9597241878509521, -0.14423489570617676, 0.0648845881...
so. But today, that's not done so often anymore (or should not be), because for that, there are exceptions.
[ 0.7123408317565918, 0.21697917580604553, 0.0327773280441761, 0.08984120935201645, 0.31945499777793884, -0.3729560971260071, 0.20528413355350494, 0.4687742590904236, -0.44067203998565674, -0.371837317943573, 0.09786218404769897, 0.3634761571884155, -0.22883233428001404, 0.09758300334215164,...
I'm storing a simple java.util.date in an Oracle XE database via hibernate. When testing with JUnit if I can retrieve the correct value, I get an error like this: ``` junit.framework.AssertionFailedError: expected:<Sun Dec 28 11:20:27 CET 2008> but was:<2008-12-28 11:20:27.0> ``` The value is stored in an Ora...
[ -0.05402592569589615, 0.19462093710899353, 0.3223204016685486, -0.0004129592271056026, -0.13509365916252136, -0.272935152053833, 0.36053773760795593, -0.023140642791986465, 0.0019629967864602804, -0.5797789692878723, 0.09886272996664047, 0.10793128609657288, -0.006076495163142681, 0.000516...
do contain milliseconds, but they are typically not printed. So expected: was actually created by a date like 11:20:27,345, which is of course not equal to 11:20:27.0 Solution: * either only use full second dates to store and retrieve or * get hibernate to create the correct Oracle Datatype (TIMESTAMP) - this is v...
[ 0.49547910690307617, 0.09413079917430878, 0.2791062593460083, -0.020177975296974182, 0.019044941291213036, -0.131990447640419, 0.32849088311195374, -0.09828796237707138, 0.27221691608428955, -0.3486858904361725, -0.06232944130897522, -0.13211771845817566, -0.005667669698596001, -0.11611442...
I have an existing ASP.NET website which I would like to painlessly add CMS functionality to. The site is a estate agent's property website and is backed by a database etc. however some pages like 'About Us' etc. I would like the user to be able to edit using a simple CMS. I would also like the user to be be able to c...
[ 0.5987429618835449, 0.23670004308223724, 0.42177075147628784, 0.11249643564224243, 0.03616095334291458, -0.3780437707901001, 0.0567685142159462, 0.031154900789260864, -0.11346733570098877, -0.4591914713382721, -0.0368833988904953, 0.2650167942047119, -0.12540635466575623, 0.343384921550750...
CMS to use these to add new pages and to support multi-language. Now I could clearly code my own simple CMS but not wanting to reinvent the wheel is there any existing ASP.NET CMS that can be added to existing site and take advantage of the Master Pages model that I already have. EDIT: I have looked at DNN, Umbraco, ...
[ 0.0450483001768589, 0.15828654170036316, 0.3613768517971039, 0.2987443804740906, -0.24185959994792938, -0.08462221175432205, 0.1231326311826706, 0.18584522604942322, -0.4262668490409851, -0.7676027417182922, -0.05775735154747963, 0.44084596633911133, -0.28948327898979187, -0.18421831727027...
N2. It's one of the only ones that goes out of its way to not take over the site and gives you programattic access to the content repository. Most CMS's are oriented to be the entirety of the front-end presentation of a site.
[ 0.058560024946928024, -0.08507378399372101, 0.07720508426427841, 0.11319352686405182, -0.09823405742645264, -0.28740575909614563, -0.20709796249866486, 0.3862839937210083, -0.4449293911457062, -0.3863376975059509, -0.30863216519355774, 0.22209471464157104, 0.02000187337398529, 0.1218816563...
Is it possible in opengl to setup blending to achieve additive color overlays? Red + green = yellow, cyan + magenta = white, etc.. (see [diagram](http://en.wikipedia.org/wiki/File:AdditiveColor.svg)) ``` glEnable(GL_BLEND); glBlendFunc(GL_SRC_ALPHA, GL_ONE); ``` should do it. Have a look at the full description of ...
[ 0.020028943195939064, -0.24094758927822113, 0.5038957595825195, -0.29252585768699646, -0.3445838391780853, -0.3036750555038452, -0.016573673114180565, -0.17795608937740326, -0.04465462267398834, -0.24435989558696747, -0.18829192221164703, 0.6517768502235413, -0.5667641758918762, -0.2270434...
Hey, im doing a little app for my smart phone, using Windows Mobile 6. I'm trying to get all currently running processec, but method CreateToolhelp32Snapshot always returns -1. So now im stuck. I tried to get error with invoking GetLastError() method, but that method returns 0 value. Here is a snippet of my code. ``` ...
[ 0.1566944271326065, 0.06611566245555878, 0.5219488739967346, 0.09715157002210617, 0.11124668270349503, -0.045544616878032684, 0.5035495162010193, -0.08945422619581223, -0.27260127663612366, -0.7269131541252136, 0.09358710050582886, 0.5800966024398804, -0.2808557450771332, 0.179262131452560...
uint processid); public static Process[] GetProcesses() { ArrayList procList = new ArrayList(); IntPtr handle = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0); if ((int)handle > 0) { try {
[ -0.10110927373170853, -0.41510292887687683, 0.5388467907905579, -0.3347958028316498, 0.22892189025878906, 0.24973776936531067, 0.44605496525764465, -0.44135621190071106, -0.2296518087387085, -0.4871259927749634, -0.38026103377342224, 0.37848779559135437, -0.4417984187602997, 0.102442570030...
PROCESSENTRY32 peCurr; PROCESSENTRY32 pe32 = new PROCESSENTRY32(); // get byte array to pass to API call byte[] peBytes = pe32.ToByteArray(); // get the first process
[ 0.032248545438051224, -0.4250832498073578, 0.34685444831848145, -0.19737713038921356, -0.02570716105401516, 0.49772560596466064, 0.4374805986881256, -0.2985677719116211, -0.08546245098114014, -0.8040177226066589, -0.12420635670423508, 0.40220245718955994, -0.3226405382156372, 0.32304599881...
int retval = Process32First(handle, peBytes); ``` * First, your handle check is wrong. It's common for the high bit to be on in a handle, causing it to look like a negative number when cast to a signed int. You should be checking that is isn't NULL (0) or INVALID\_HANDLE\_VALUE (-1 / 0xffffffff). * You shouldn't be "i...
[ 0.44042617082595825, 0.03827761858701706, 0.7341439723968506, -0.042175885289907455, 0.031124984845519066, -0.18464972078800201, 0.531302809715271, -0.7141715288162231, -0.4663398563861847, -0.4206416606903076, -0.21606966853141785, 0.7703865766525269, -0.1220056414604187, 0.30704262852668...
must be set before the call and it's not clear here if that's happening. As a side note, the [Smart Device Framework](http://www.smartdeviceframework.com)'s [OpenNETCF.ToolHelp namespace](http://opennetcf.com/library/sdf/html/a2bccceb-fc28-262d-c05c-26565a0986d1.htm) has all of this implemented and working (in case yo...
[ 0.4219112694263458, 0.015642158687114716, 0.3887508511543274, 0.18539899587631226, 0.35074135661125183, -0.19890618324279785, -0.0711691677570343, -0.2808562219142914, -0.13221332430839539, -0.5551366209983826, -0.09514375030994415, 0.7130288481712341, -0.038189418613910675, 0.053740985691...
Simple question - In c++, what's the neatest way of getting which of two numbers (u0 and u1) is the smallest positive number? (that's still efficient) Every way I try it involves big if statements or complicated conditional statements. Thanks, Dan Here's a simple example: ``` bool lowestPositive(int a, int b, int& ...
[ -0.2949269413948059, 0.01082058809697628, 0.07086562365293503, 0.139693945646286, 0.005744194611907005, 0.009046042338013649, 0.013577043078839779, -0.2891940176486969, -0.08744732290506363, -0.4750584363937378, -0.24741987884044647, 0.5456259846687317, -0.21143338084220886, -0.32041308283...
result = a; else if (b > 0) // b is positive and either smaller than a or a is negative result = b; else result = a; // at least b is negative, we might not have an answer return result > 0; // zero is not positive } ```
[ 0.034183673560619354, 0.058080852031707764, 0.19499967992305756, -0.11710140109062195, 0.015483968891203403, -0.12721432745456696, 0.294330894947052, -0.4158461391925812, -0.0852542594075203, -0.12965308129787445, -0.4067102074623108, 0.4272235333919525, -0.3403324782848358, 0.144850060343...
I'm fiddling with calling DLLs from C#, and came across the need to define my own structs. Lots of articles force a sequential layout for the struct with ``` [StructLayout(LayoutKind.Sequential)] struct Foo ... ``` So, I followed suite, and my programme worked. Now, when I took the line out, it still works. Why do I...
[ 0.13348303735256195, 0.08829420804977417, 0.36726105213165283, -0.12169668823480606, 0.08246131241321564, 0.1562502682209015, 0.1419251710176468, -0.1808396428823471, -0.14727966487407684, -0.5672956109046936, -0.0006345307338051498, 0.3748656213283539, -0.48262590169906616, 0.161251127719...
code to work is merely an accident. Although not an uncommon one. Note the Type.StructLayoutAttribute property.
[ 0.4980255365371704, 0.012953490018844604, -0.33445221185684204, 0.1080007553100586, -0.015180687420070171, -0.406590074300766, 0.6820569038391113, -0.26316899061203003, 0.09118957817554474, -0.608122706413269, -0.5254858136177063, 0.4000699818134308, -0.319708913564682, -0.2078037410974502...
I'm trying to write a program which takes an `SDL_Surface`, converts it to an `IplImage`, uses the cvBlobsLib to find blobs, paints the blobs as spots back over the image, then converts the output `IplImage` back to an `SDL_Surface`. I'm almost done: only converting the `IplImage` back to an `SDL_Surface` hasn't been ...
[ 0.3076939880847931, -0.0955965667963028, 0.9732285141944885, -0.10667479038238525, -0.13170772790908813, 0.17694389820098877, 0.07624108344316483, -0.17140819132328033, -0.24436019361019135, -1.0583139657974243, 0.11790211498737335, 0.44216737151145935, -0.17537327110767365, 0.138089448213...
Uint32 Rmask, Uint32 Gmask, Uint32 Bmask, Uint32 Amask); ``` I'm currently trying with `SDL_CreateRGBsurfaceFrom`. I have no idea, however, what the correct values of pitch, Rmask, Gmask and Bmask are. (Amask is 0, because there is no alpha channel.) Could anybody help me out by explaining how to do this? Thanks! ...
[ -0.21711082756519318, -0.0694625973701477, 0.669112503528595, -0.015135081484913826, -0.44741135835647583, -0.15915636718273163, 0.2468900829553604, -0.24399830400943756, -0.03362199664115906, -0.8079572916030884, -0.19104330241680145, 0.6818450689315796, -0.07080929726362228, -0.205388978...
SDL_Surface *surface = SDL_CreateRGBSurfaceFrom((void*)opencvimg->imageData, opencvimg->width, opencvimg->height, opencvimg->depth, pitch,
[ -0.0653773844242096, -0.3348062038421631, 0.7628698348999023, 0.019632961601018906, -0.314317911863327, -0.009000985883176327, 0.11446519941091537, -0.12141383439302444, -0.3033517599105835, -0.9284824728965759, -0.030885819345712662, 0.4577828645706177, 0.21522365510463715, 0.087309017777...
0x0000ff, 0x00ff00, 0xff0000, 0 ); return surface; } ``` (SDL Documentation writes "Pitch is the size of the scanline of the surface, in bytes, i.e. widthInPixels\*bytesPerPixel.") This outputs "Depth 8, nChannels 3, pitch 1920" and displays a completely red image. I *think* a solution would b...
[ 0.15960676968097687, -0.25053349137306213, 0.7207358479499817, -0.20555144548416138, -0.20554615557193756, -0.030288508161902428, 0.2121337503194809, -0.15868009626865387, -0.3923565447330475, -0.7607712149620056, 0.08160083740949631, 0.7534909248352051, 0.0028556694742292166, 0.2167191654...
OpenCV depth of 8 means *a pixel has 8 bits per channel, so in a 3-channel image, a pixel has 24 bits*. So when converting that to the SDL meaning of depth, we get `8 * 3 = 24` bits. The image was 24 bits after all, which SDL supports. So converting the image to SDL is as simple as: ``` SDL_Surface *surface = SDL_Cre...
[ 0.07827287167310715, -0.18090154230594635, 0.8819401264190674, -0.10369961708784103, -0.4132179021835327, -0.013107409700751305, 0.11929497867822647, -0.24164023995399475, -0.23118096590042114, -0.7363225221633911, -0.06246279552578926, 0.5784875154495239, -0.10513950884342194, 0.125624313...
opencvimg->depth*opencvimg->nChannels, opencvimg->widthStep, 0xff0000, 0x00ff00, 0x0000ff, 0 ); return surface; ``` Sorry for the confusion, I hope this helps anybody searching for the same answer. Other links of interest: [<http://www.libsdl.org/cgi/docwiki.cgi/Pixel_...
[ -0.15932084619998932, -0.09397228807210922, 0.7279480695724487, 0.006115041207522154, -0.36549749970436096, -0.033747561275959015, 0.08260191231966019, -0.07607729732990265, -0.38285085558891296, -0.752426028251648, -0.1819441169500351, 0.4576006233692169, -0.3490491211414337, 0.0302587281...
That is, if I had two or more sets, and I wanted to return a new set containing either: 1. All of the elements each set has in common (AND). 2. All of the elements total of each set (OR). 3. All of the elements unique to each set. (XOR). Is there an easy, pre-existing way to do that? **Edit:** That's the wrong termi...
[ -0.017733529210090637, 0.17904584109783173, 0.327441543340683, -0.11085165292024612, -0.15131990611553192, -0.027323123067617416, 0.2841287851333618, -0.4443688690662384, -0.4078159034252167, -0.3022070527076721, -0.5559090375900269, 0.2245783656835556, -0.7095741629600525, 0.1765256226062...
``` See the [Set documentation](http://java.sun.com/javase/6/docs/api/java/util/Set.html) and this [page](http://java.sun.com/docs/books/tutorial/collections/interfaces/set.html). For more.
[ 0.6181382536888123, 0.20837238430976868, 0.26028332114219666, -0.1405753791332245, -0.14434702694416046, -0.25843188166618347, 0.1192178875207901, -0.10501973330974579, -0.27352622151374817, -0.740802526473999, -0.5391584038734436, 0.3680269420146942, -0.32871660590171814, -0.0838360711932...
I'm working on a stock exchange information platform and we are thinking in provide a link between our platform and home-made Excel files. The financial market is still bound to the old DDE server approach, now does it still matter today? Which are the alternatives to make automatic online data updates on Excel files,...
[ 0.3801262676715851, 0.4207341969013214, 0.2211235910654068, 0.17600663006305695, -0.16455969214439392, -0.23474116623401642, -0.07600236684083939, 0.14674906432628632, -0.16313250362873077, -0.5316579341888428, 0.4172990918159485, 0.6570980548858643, -0.17943346500396729, 0.066798999905586...
Toolkit but I can't find anything close to that in Excel 2007. In terms of interacting with Excel, [OLE Automation/COM](http://en.wikipedia.org/wiki/OLE_Automation) replaced the use of DDE. You may want to take a look at [VSTO](http://msdn.microsoft.com/en-us/office/aa905533.aspx) (Visual Studio Tools for Office).
[ -0.007204890251159668, -0.27180853486061096, 0.4641350507736206, 0.030947783961892128, -0.20807282626628876, -0.11042080074548721, 0.015383902005851269, 0.051197800785303116, -0.30344900488853455, -0.5746381878852844, -0.03744165599346161, 0.6370728611946106, -0.21369726955890656, -0.12035...
How the variables can be transferred between the Winforms? Example customer id Thanks You must declare a public property in the form you wish to pass to. Then, after instantiating your new form, it's a simple assignment: C#: `MyOtherInstantiatedForm.CustomerID = CurrentCustomerID;` Do you need to pass around Custome...
[ 0.2804810404777527, 0.040136657655239105, 0.6382496356964111, 0.169860377907753, 0.10606624186038971, -0.25379982590675354, -0.026289450004696846, -0.010606816038489342, 0.18256695568561554, -0.46782606840133667, -0.07770221680402756, 0.5179740190505981, -0.14349496364593506, 0.18797533214...
How accurate is **System.Diagnostics.Stopwatch**? I am trying to do some metrics for different code paths and I need it to be exact. Should I be using stopwatch or is there another solution that is more accurate. I have been told that sometimes stopwatch gives incorrect information. Why you don't profile your code ins...
[ 0.6535170674324036, -0.024531086906790733, 0.13802117109298706, 0.22458067536354065, -0.2225407510995865, -0.12685582041740417, 0.18913444876670837, -0.13029640913009644, -0.04772261530160904, -0.5987519025802612, 0.22743739187717438, 0.5076886415481567, -0.15822820365428925, -0.1716230362...
``` private HashMap<DataObject, HashSet> AllDataObjects; ... /** Returns all DataObject elements that are NOT in the specified set. */ private DataObject[] invert( HashSet<DataObject> set ) { HashSet<DataObject> keys = (HashSet) AllDataObjects.keySet(); keys = (HashSet) keys.clone(); keys.removeAll( set ...
[ 0.07775293290615082, 0.14578865468502045, 0.42399829626083374, -0.19429336488246918, 0.2639235854148865, -0.10653803497552872, 0.14581966400146484, -0.42198362946510315, -0.06965188682079315, -0.4880646765232086, -0.14407013356685638, 0.7272335886955261, -0.5560107231140137, 0.269299834966...
look right to you? Create a new set and give the one to be cloned as an argument. This avoids casting and so you don't lose generics. ``` private DataObject[] invert( Set<DataObject> set ){ Set<DataObject> keys = new HashSet<DataObject>(AllDataObjects.keySet()); keys.removeAll( set ); return keys.toArray(n...
[ 0.22546614706516266, -0.11222236603498459, 0.2922036945819855, -0.17612811923027039, 0.09626556932926178, 0.0469295009970665, 0.22033071517944336, -0.16377755999565125, -0.1525040715932846, -0.7217217087745667, -0.2680189907550812, 0.6342712044715881, -0.6401636600494385, 0.238321378827095...
I have a table in SQL Server 2005 which has three columns: ``` id (int), message (text), timestamp (datetime) ``` There is an index on timestamp and id. I am interested in doing a query which retrieves all messages for a given date, say '12/20/2008'. However I know that simply doing where timestamp='12/20/2008' ...
[ 0.04151962324976921, 0.20072995126247406, 0.5967857241630554, -0.15249401330947876, -0.1424742043018341, 0.03968725726008415, -0.0547528974711895, -0.23408666253089905, -0.12129762023687363, -0.44704851508140564, 0.3155520558357239, 0.22886087000370026, -0.12757913768291473, 0.340454339981...
I have on timestamp and would end up doing a full table scan. So what is the best way to construct my query so that I am taking advantage of the index that I have created? ``` -- avoid re-calculating @MyDate +1 for every row DECLARE @NextDay DateTime Set @NextDay = @MyDate + 1 SELECT -- ... WHERE [timestamp] >= ...
[ 0.29352396726608276, 0.05960433557629585, 0.9056822657585144, -0.09095734357833862, 0.4176013767719269, -0.1913447082042694, 0.019626904278993607, 0.010912097990512848, -0.12320435792207718, -0.8897675275802612, 0.0410657674074173, 0.19789831340312958, -0.2509881258010864, 0.40853112936019...
What is the source (url) for Rails Engines that works with rails 2.2.2? ``` -- avoid re-calculating @MyDate +1 for every row DECLARE @NextDay DateTime Set @NextDay = @MyDate + 1 SELECT -- ... WHERE [timestamp] >= @MyDate AND [timestamp] < @NextDay ```
[ 0.11671363562345505, -0.040507081896066666, 0.4085618853569031, -0.0589127317070961, 0.2557169795036316, -0.281835675239563, 0.0827738419175148, 0.20143769681453705, 0.1963382065296173, -0.6560301184654236, 0.10312668979167938, 0.3044402599334717, -0.2049292027950287, 0.15056459605693817, ...
If I had a million images, would it be better to store them in some folder/sub-folder hierarchy or just dump them all straight into a bucket (without any folders)? Would dumping all the images into a hierarchy-less bucket slow down LIST operations? Is there a significant overhead in creating folders and sub folders o...
[ 0.2721574306488037, -0.13110707700252533, 0.17311367392539978, 0.2265438735485077, -0.2418619841337204, 0.171732097864151, 0.2780245542526245, -0.07973586767911911, -0.18897531926631927, -0.5837408900260925, -0.016306711360812187, 0.004484326578676701, -0.21498213708400726, -0.053479444235...
string and puts all objects in a flat namespace. In my experience, LIST operations do take (linearly) longer as object count increases, but this is probably a symptom of the increased I/O required on the Amazon servers, and down the wire to your client. However, lookup times do not seem to increase with object count ...
[ 0.12332430481910706, -0.3309621214866638, 0.1697794646024704, 0.1237083449959755, -0.2504921555519104, -0.20558993518352509, -0.07829547673463821, -0.03762349486351013, -0.37645426392555237, -0.5969629883766174, -0.13823801279067993, 0.4982055127620697, -0.25263965129852295, 0.072894506156...
on each individual object. As there is no hierarchy, they're your only two options. Obviously, setting as many bucket-wide grants will massively reduce your admin headaches if you have millions of files, but remember you can only **grant** permissions, not revoke them, so the bucket-wide grants should be the maximal su...
[ 0.430405855178833, -0.20217198133468628, 0.37847617268562317, 0.585047721862793, -0.0350000225007534, -0.08999001234769821, -0.09548179060220718, -0.347036212682724, -0.43682777881622314, -0.5296604037284851, 0.012915068306028843, 0.4720252752304077, -0.16740532219409943, 0.199569329619407...
or two buckets with different ACLs and no object-specific ACLs, take the two buckets.
[ 0.06519443541765213, -0.513028621673584, -0.042414937168359756, 0.2962729334831238, -0.1711088865995407, 0.0888226330280304, -0.26703181862831116, -0.07070112973451614, -0.19909024238586426, -0.47747328877449036, 0.29261407256126404, 0.6545807123184204, -0.2601938545703888, 0.1166470050811...
I work on a project that uses multiple open source Java libraries. When upgrades to those libraries come out, we tend to follow a conservative strategy: 1. if it ain't broke, don't fix it 2. if it doesn't have new features we want, ignore it We follow this strategy because we usually don't have time to put in the ne...
[ 0.6361984014511108, 0.33011946082115173, -0.2872346341609955, 0.17238874733448029, 0.1054825484752655, -0.4230518341064453, 0.43898114562034607, 0.11493381857872009, -0.19814856350421906, -0.5539783239364624, 0.000654385716188699, 0.5915948152542114, -0.1234256699681282, -0.028667263686656...
usually come with library upgrades. (i.e. "Who knows, maybe things will work better in a way we don't foresee...") What criteria do you use when you make these types of decisions in your project? I've learned enough lessons to do the following: 1. Check the library's change list. What did they fix? Do I care? If the...
[ 0.42314475774765015, -0.049135636538267136, 0.3855098485946655, 0.6190654039382935, 0.057401470839977264, -0.05982538312673569, 0.03470281884074211, -0.14339520037174225, -0.20516693592071533, -0.6663771867752075, -0.027738461270928383, 0.5714526176452637, 0.17853137850761414, -0.192062810...
EVERYONE has a bad release. I don't intend to be the first to get bit with that little bug. (anymore that is). This doesn't mean wait 6 months either. Within the first month of release you should know the downsides. 4. When I decide to go ahead with an upgrade; test, test test. Here automated testing is extremely impor...
[ 0.6589005589485168, -0.05392827093601227, 0.31366899609565735, 0.3323586583137512, -0.035380925983190536, -0.3040604293346405, 0.4745710492134094, 0.1521225869655609, -0.5610117316246033, -0.38874781131744385, -0.0960894376039505, 0.4910193979740143, -0.0750160664319992, 0.2292408198118209...
library is deprecating or replacing functionality you will want to stay on top of that.
[ 0.6107606887817383, 0.49086469411849976, 0.13218288123607635, 0.49448931217193604, 0.2930331826210022, -0.739456057548523, 0.14639686048030853, 0.28161489963531494, -0.019613206386566162, -0.39720776677131653, -0.10231764614582062, 0.3472079336643219, -0.10112791508436203, 0.56019395589828...
I would like to keep my `.bashrc` and `.bash_login` files in version control so that I can use them between all the computers I use. The problem is I have some OS specific aliases so I was looking for a way to determine if the script is running on Mac OS X, Linux or [Cygwin](http://en.wikipedia.org/wiki/Cygwin). What ...
[ 0.3279399275779724, 0.4575808644294739, 0.11932872235774994, -0.2826522886753082, -0.03561720252037048, -0.3199600279331207, 0.5040805339813232, 0.15359313786029816, -0.03022160567343235, -0.7298723459243774, 0.03036356531083584, 0.9388876557350159, -0.2529376149177551, 0.1677245944738388,...
# Mac OSX elif [[ "$OSTYPE" == "cygwin" ]]; then # POSIX compatibility layer and Linux environment emulation for Windows elif [[ "$OSTYPE" == "msys" ]]; then # Lightweight shell and GNU utilities compiled for Windows (part of MinGW) elif [[ "$OSTYPE" == "win32" ]]; then # I'm not sure this can h...
[ 0.11891993135213852, -0.027920031920075417, 0.5166334509849548, -0.07885129004716873, 0.14459580183029175, -0.16108034551143646, 0.35378795862197876, -0.14933143556118011, 0.23298528790473938, -0.6860818862915039, -0.2003716081380844, 1.0391911268234253, -0.5107159614562988, 0.018468538299...
With regards to OOP, how would you describe an interface? What I mean is, sub-classing can be described as *"Has-A"*, and inheritance could be *"Is-A"*. A member method could be *"Can-Do"*. Is there any way this could be extended (no pun intended) to describe what an interface does? I think of objects as **nouns**, m...
[ 0.1947081834077835, 0.030047321692109108, -0.03437570482492447, 0.2139151245355606, -0.33501553535461426, -0.09569234400987625, 0.013958397321403027, 0.13379743695259094, -0.37358713150024414, -0.7104674577713013, -0.14489337801933289, 0.31119462847709656, -0.3014345169067383, 0.0552600249...
"this is a serializable object." But we don't say, "this object *is a* serializable," nor do we say, "this object *has a* serializable." I also like Federico's [answer](https://stackoverflow.com/questions/394260/description-of-what-an-interface-does#394275) that an interface is "CAN-DO". An interface is a group of re...
[ 0.0026935869827866554, -0.11217883974313736, 0.09868757426738739, 0.4684458374977112, -0.08541067689657211, -0.06910263746976852, 0.11555744707584381, -0.17032699286937714, -0.2451917827129364, -0.7635020613670349, -0.31481266021728516, 0.3791654109954834, -0.3041473627090454, 0.2338513135...
method signatures, without the code implementing those methods. Just the method name and arguments. Depending on the language, a method signature may also include return type, and exceptions thrown. An interface consists of methods, but not data members. BTW, I wouldn't say sub-classing is HAS-A. My understanding is ...
[ 0.2289460152387619, 0.18729236721992493, 0.18315713107585907, 0.3778115212917328, -0.18451382219791412, -0.3965207040309906, 0.11541522294282913, -0.24211446940898895, -0.3581355810165405, -0.48286762833595276, -0.2694106698036194, -0.11831342428922653, -0.2958541810512543, 0.3549014925956...
object, but does not own it. Destroying the outer object does not destroy the inner objects. Example: University employs Professors, but closing the University does not kill the Professors.
[ 0.21954680979251862, 0.15674565732479095, 0.09365138411521912, 0.25390708446502686, -0.0888470858335495, -0.17953278124332428, 0.24600736796855927, 0.19758236408233643, -0.22799837589263916, -0.3136812150478363, -0.5653046369552612, 0.46192046999931335, -0.08662721514701843, 0.568024277687...
I want to be able to get the projects I have in Sourcesafe and their total lines of code (perhaps also with total number of classes, etc). Is there an SDK for Sourcesafe (I use 2005 edition) which will allow me to do this? Or is there a document in Sourcesafe which lists all the projects in SS? Using this, I could wor...
[ 0.5459204912185669, -0.16210035979747772, 0.18320657312870026, 0.27474668622016907, -0.42605021595954895, -0.027639862149953842, 0.3616357445716858, -0.10559246689081192, -0.3051820695400238, -0.6403375267982483, 0.27296051383018494, 0.3776233196258545, -0.16724653542041779, -0.04161622375...
project (this is done via the admin tool). A simple app could then open all the source files recursively from the shadow folder and do some line counting.
[ 0.5290681719779968, -0.1700567901134491, 0.07986056059598923, 0.2175632268190384, 0.01441181544214487, -0.002548075979575515, 0.3315441906452179, -0.09587851166725159, -0.0981489047408104, -0.5358600616455078, -0.20182588696479797, 0.4083796739578247, -0.12838219106197357, -0.0967442691326...
I am trying to program an Excel module where it dynamically inserts code in new objects in a form that is created at design time. I am using this code where "Code" contains a string with the actual code that should go into the DstrFiles object. ``` Dim DstrFiles As Object Set DstrFiles = ThisWorkbook.VBProject.VBCom...
[ 0.5189617872238159, 0.07569600641727448, 0.6296743154525757, -0.21239033341407776, 0.2647459805011749, -0.21106724441051483, 0.20210988819599152, -0.49004173278808594, -0.1327204704284668, -0.6204243898391724, -0.09809804707765579, 0.6583989858627319, -0.5686753988265991, 0.167240202426910...
create some code to go with the Label. For instance, I want the background color of the label to turn red when someone clicks on it. This has been very easy to accomplish with the ".InsertLines". An ugly way to work around this is to just create a bunch of code beforehand that is ready in the background and then lim...
[ 0.9503656029701233, 0.356874018907547, -0.17187130451202393, 0.14366061985492706, 0.31698572635650635, -0.3808152675628662, 0.17630507051944733, 0.302110880613327, -0.10091239213943481, -0.6710257530212402, 0.2838473916053772, 0.4806616008281708, -0.538526713848114, 0.26012706756591797, ...
dynamic user form that can add code to new labels or button that are added with the Contrls.Add method? You should not be generating new labels by writing code that creates the controls. You should be using the .Add method on the Controls collection to create new labels. For example: ``` UserForm1.Controls.Add("Form...
[ -0.14791646599769592, -0.6127572059631348, 0.6129983067512512, -0.13845092058181763, -0.148379847407341, -0.17244023084640503, 0.08277738094329834, -0.20483346283435822, -0.3102639615535736, -0.4063838720321655, -0.17401283979415894, 0.6856261491775513, -0.7084473967552185, -0.030224835500...
make a dynamic array of newly added controls, you'll need to create a little wrapper class. [Sample code for that is here.](http://www.vbforums.com/showpost.php?p=3109544&postcount=4)
[ 0.22837336361408234, -0.24677497148513794, 0.8097731471061707, 0.2886497676372528, 0.0961497351527214, -0.11554962396621704, 0.14030511677265167, -0.5069180727005005, -0.3324318528175354, -0.14108280837535858, -0.02076723240315914, 0.4294990599155426, -0.27675676345825195, 0.12613457441329...
If I'm looking to use Core Animation to fade a view in and out of display -- is it good practice to have the UIView in the same NIB as the view that it is being drawn into? Should I build the view in another NIB file and load it in from there? I'm looking to animate three small views into display simultaneously upon a ...
[ 0.4566449522972107, -0.15831933915615082, 0.3795875310897827, -0.11859818547964096, -0.3429359793663025, 0.2275296300649643, -0.1910545378923416, -0.26670995354652405, 0.03979853540658951, -0.9496235847473145, 0.05211644247174263, 0.3495000898838043, -0.14720837771892548, 0.154415920376777...
views within one single view (otherwise, you'll have to position them in code). Set their initial alpha values to 0.0, then fading them in is as easy as: ``` [UIView beginAnimations:@"fade" context:nil]; [UIView setAnimationDuration:1.0]; myViewOne.alpha = 1.0; myViewTwo.alpha = 1.0; myViewThree.alpha = 1.0; [UIView c...
[ 0.3224289119243622, -0.1416829377412796, 0.5409404039382935, -0.17001689970493317, -0.2987329363822937, 0.120705746114254, 0.13261333107948303, -0.23108451068401337, 0.0835099145770073, -0.8874742984771729, -0.013195237144827843, 0.3580434322357178, -0.26811733841896057, 0.3735324740409851...
So I have this code that takes care of command acknowledgment from remote computers, sometimes (like once in 14 days or something) the following line throws a null reference exception: ``` computer.ProcessCommandAcknowledgment( commandType ); ``` What really bugs me is that I check for a null reference before it, so...
[ 0.2564355134963989, -0.016116106882691383, 0.3015170395374298, -0.09878789633512497, 0.040647633373737335, -0.1582314819097519, 0.31827259063720703, -0.05415109172463417, -0.16489142179489136, -0.6851392984390259, -0.06947080790996552, 0.6169606447219849, -0.2114349901676178, 0.36716189980...
); Computer computer = context.Client as Computer; if (computer == null) { Console.WriteLine("Client already disposed. Couldn't complete operation"); } else { computer.ProcessCommandAcknowledgment( commandType ); } } ``` Any
[ -0.19178077578544617, 0.01720849610865116, 0.7051328420639038, -0.3658955991268158, 0.39209461212158203, 0.07568676769733429, 0.2689879834651947, -0.13662613928318024, -0.13725487887859344, -0.5357900261878967, -0.41818967461586, 0.6842781901359558, -0.12175187468528748, 0.597305953502655,...
clues? Edit: ProcessCommandAcknowledgment: ``` public void ProcessCommandAcknowledgment( Type ackType ) { if( m_CurrentCommand.GetType() == ackType ) { m_CurrentCommand.Finish(); } } ``` What are the other thread(s) doing? Edit: You mention that the server is single t...
[ 0.13743367791175842, 0.025227773934602737, 0.5025706887245178, 0.14440926909446716, 0.44483181834220886, 0.01180317159742117, 0.3293539583683014, 0.15024031698703766, -0.14932827651500702, -0.4858841001987457, 0.0314396396279335, 0.35402482748031616, -0.36872902512550354, 0.245681390166282...
have a multi-thread issue or a CLR bug. You can guess which I think is more likely.
[ 0.6452796459197998, 0.015450588427484035, 0.14196446537971497, 0.11830805242061615, 0.05605565756559372, -0.2040925770998001, -0.024815022945404053, 0.684790313243866, -0.46481433510780334, -0.5287333130836487, 0.20591512322425842, 0.06757716089487076, -0.3810863494873047, 0.13249018788337...
I'm developing a desktop application using Linq to SQL. From what I've gathered, it's better to keep DataContext objects short-lived, but I'm running into the following puzzle: My application has lots of lookup-type data that I'd like to cache on the client. The reason I want to cache it is because I don't want to hav...
[ 0.0006687961868010461, 0.3118102550506592, 0.3166884481906891, 0.23108524084091187, 0.4134920537471771, 0.13422247767448425, -0.2587141990661621, 0.05001246556639671, -0.23653286695480347, -0.7785819172859192, 0.16637656092643738, 0.2894892394542694, -0.060577642172575, 0.42548757791519165...
easy: I just add the new child records to the relation collections of the lookup objects and hit SubmitChanges(). But if I'm creating new DataContexts from the ones that I originally fetched the data from, how can I best manage updating this related data? I can't use the cached data with my new DataContext because it ...
[ 0.2256738394498825, -0.02962593175470829, -0.036273811012506485, 0.4116800129413605, 0.2208436280488968, 0.047160930931568146, 0.11763804405927658, -0.26513001322746277, -0.12096088379621506, -0.6916154026985168, -0.048157624900341034, 0.5975494980812073, 0.24815930426120758, -0.0788575038...
be discarded 2. When management treatens to sack you for devoting extra effort to testing 3. When the existing system is so obfuscated and poorly designed that adding tests would only be practical if the software were scrapped and redone from scratch 4. When doing so will make your possition redundant Other than that ...
[ 0.6410501599311829, 0.1991131752729416, -0.2886185944080353, 0.1269049048423767, 0.10973343253135681, -0.08532457798719406, 0.10610175877809525, -0.3713381588459015, 0.10541310906410217, -0.446061372756958, -0.02237912081182003, 0.4428318440914154, -0.22398391366004944, 0.11684925854206085...
I came across this [answered question](https://stackoverflow.com/questions/332871/f-xml-parsing), but I can't seem to compile the code. I'm getting the following error on Seq.cast: error FS0039: The value, constructor, namespace or type 'cast' is not defined. I'm using Mono 2.0.1\_1 and F# 1.9.4.19 on leopard. Is the...
[ 0.5493603944778442, 0.33119794726371765, -0.014699175953865051, -0.07563827186822891, -0.1215202808380127, -0.03275250643491745, 0.5486456155776978, -0.27573469281196594, -0.5092306733131409, -0.17872777581214905, -0.4032346308231354, 0.5148337483406067, -0.3874683976173401, -0.24789997935...
I have a lot of people that ask me to fix their computers. Usually it is "slow computer" or "my computer has pop-ups," etc. In other words they have viruses and spyware. I thought I could use a remote program to do it, instead of them brining their computer to me or me traveling to their house.. I thought of UltraVNC,...
[ 0.6295044422149658, 0.07630228251218796, 0.05839318409562111, 0.5146589279174805, 0.30098509788513184, 0.14437267184257507, 0.08690275996923447, 0.571839451789856, -0.3655531704425812, -0.49224379658699036, 0.06657037883996964, 0.4257564842700958, -0.31249701976776123, 0.22178393602371216,...
to pay a small fee if necessary to make things as seamless as possible. Word of mouth is valuable and a good referral for an easy to work with computer person (me) is worth that monthly or one time fee. I have Vista, most will have Vista Home Premium or XP Home. I have Vista Home Premium and Mac OS X. I can use Linux ...
[ 0.6296808123588562, 0.09196816384792328, 0.33543112874031067, 0.1263791173696518, -0.08631905168294907, 0.17301233112812042, 0.04926516115665436, 0.5881136059761047, -0.07118507474660873, -0.8748911023139954, 0.17988264560699463, 0.9966952800750732, -0.03827841207385063, -0.018788317218422...
It runs in the user's system tray and you can login and control their computer as long as they have the program running. The free version has a few less features, but they're mostly luxuries instead of necessities.
[ 0.5442376136779785, -0.1555633395910263, 0.3139295279979706, 0.26658105850219727, 0.23751218616962433, -0.3541119694709778, 0.17105378210544586, 0.23740693926811218, -0.05853092297911644, -0.2623176872730255, -0.3895459473133087, 0.31032517552375793, -0.055793941020965576, -0.0193367097526...
Does anyone know how I can best stream a webcam through an iGoogle widget? My ideal is to actually be able to stream locally--that is, get a widget that allows me to display my computer's webcam. Is this possible? (No, I'm not that vain. I'm using a webcam as a Security Camera, and I'd like to be able to view it, st...
[ 0.5393521785736084, 0.04514496773481369, 0.3456668257713318, 0.4340028762817383, 0.1594596654176712, -0.2934458255767822, 0.27162814140319824, 0.4258362650871277, -0.17333737015724182, -0.5899701714515686, 0.2814845144748688, 0.4753708243370056, 0.15008117258548737, 0.10676232725381851, ...
be a lot of vendors who disagree with me.
[ 0.6389015913009644, 0.34386295080184937, 0.06311485916376114, 0.3129463791847229, -0.3043937087059021, -0.04197562858462334, 0.33617329597473145, 0.6855781674385071, 0.2835341989994049, -0.5642256140708923, -0.11875247955322266, 0.37948673963546753, 0.12807312607765198, 0.11939893662929535...
Can you have cellpadding or spacing just on the top/ bottom as opposed to all (T, B, L, R) ? CSS? ``` td { padding-top: 2px; padding-bottom: 2px; } ```
[ -0.02023981884121895, 0.22478236258029938, 0.20537090301513672, 0.020951634272933006, 0.15711383521556854, 0.11778556555509567, 0.0890645906329155, -0.05018718168139458, -0.21333521604537964, -0.6088657975196838, -0.3484969735145569, 0.3119591474533081, -0.24005304276943207, -0.37650722265...
I am learning functional programming style. In [Don't Fear the Monads](http://channel9.msdn.com/shows/Going+Deep/Brian-Beckman-Dont-fear-the-Monads/), Brian Beckman gave a brilliant introduction about Monad. He mentioned that Monad is about composition of functions so as to address complexity. > A Monad includes a `u...
[ 0.07162179052829742, -0.035228557884693146, -0.08832424134016037, -0.14070014655590057, -0.14502771198749542, -0.04529859125614166, 0.5185821652412415, -0.5070685744285583, 0.1569918394088745, -0.7889618277549744, 0.04631713032722473, 0.36757877469062805, -0.3474756181240082, -0.2756746709...