text
stringlengths
0
30.5k
title
stringclasses
1 value
embeddings
listlengths
768
768
\*.csproj, \*.vbproj, \*.sln, etc. to manage and contain the actual file path references outside of the source files. This allows me to just provide 'using' directives (equivalent to Python's import) without exposing all of the references and allowing for reuse of the path references themselves across multiple scripts....
[ 0.658634603023529, 0.16134972870349884, 0.26029402017593384, -0.10797302424907684, -0.028257492929697037, -0.3649158477783203, 0.1467326134443283, -0.12204058468341827, -0.20889025926589966, -0.693389356136322, -0.17845197021961212, 0.7421765923500061, -0.40620291233062744, -0.035655573010...
2.6/3.0 adds support for PEP370, [Per-user site-packages Directory](http://docs.python.org/whatsnew/2.6.html#pep-370-per-user-site-packages-directory)
[ 0.17827942967414856, -0.18192707002162933, 0.44738173484802246, -0.07596010714769363, -0.03033565543591976, 0.268619567155838, 0.14756090939044952, 0.057738836854696274, 0.02000238001346588, -0.507520854473114, -0.28840360045433044, 0.22061961889266968, -0.3600204885005951, -0.325233966112...
Hypothetical situation: let's say I have a 3rd party .net assembly being used in the ASP.Net web system that I'm working on that just kinda crashes every now and then. When it does so, all calls to it throw exceptions until the system is rebooted. This is, obviously, a little sub-optimal. Is there a way to reboot just...
[ 0.17081983387470245, 0.024073824286460876, -0.020116033032536507, 0.22283616662025452, 0.15164396166801453, 0.024780143052339554, 0.22007407248020172, 0.05635792016983032, -0.41064852476119995, -0.47848576307296753, 0.08080846816301346, 0.370309442281723, -0.43374988436698914, 0.0384688302...
as a MacGyver-eqsue piece of duct-tape. And then we realized none of us knew how to do it.) Calling HttpRuntime.UnloadAppDomain() will force the application to terminate itself and restart when the next web request arrives. This results in everything being reloaded from scratch and should eliminate the corrupted assemb...
[ 0.4141562879085541, 0.0014683603076264262, 0.3858240246772766, 0.07039441913366318, 0.16851204633712769, -0.4217210114002228, 0.7556338906288147, 0.14540636539459229, -0.1342417448759079, -0.24432142078876495, -0.4922410845756531, 0.5675405263900757, -0.3719095289707184, 0.2336807996034622...
Actionscript 3.0 has decent native XML support so I'm not surprised to see a lot of people loading an external XML and then passing the object around to various modules/sections of code. However my instinct is to create a class (i.e. with statically named/typed fields), populate it from the XML and pass THAT around in...
[ -0.026727020740509033, -0.05060543492436409, 0.1807572990655899, -0.020540907979011536, -0.5094527006149292, 0.010578403249382973, 0.2995052933692932, -0.10415935516357422, -0.12950384616851807, -0.43150344491004944, -0.010184778831899166, 0.3663630485534668, -0.6663254499435425, -0.419286...
practice here? For really small projects/use cases I still just use the XML but when it gets bigger, or I have the foresight I tend to go the class route. Finally, my preferred solution is to populate the classes from the data but keep a reference to the XML somewhere whenever i need the searchability.
[ 0.4903542101383209, -0.07465706020593643, -0.09886796772480011, -0.09911397099494934, -0.09894821047782898, -0.41699281334877014, 0.2959841191768646, 0.2567669749259949, -0.16374334692955017, -0.7397648096084595, 0.18555639684200287, 0.3547762930393219, 0.126600980758667, -0.15579338371753...
DataGridView, for example, lets you do this: ``` DataGridView dgv = ...; DataGridViewCell cell = dgv[1,5]; ``` but for the life of me I can't find the documentation on the index/square-bracket operator. What do they call it? Where is it implemented? Can it throw? How can I do the same thing in my own classes? ETA: ...
[ -0.030682241544127464, -0.05277630686759949, 0.18805411458015442, 0.20393112301826477, -0.2625705301761627, -0.2677706778049469, 0.15724599361419678, -0.33986520767211914, -0.1747492551803589, -0.5119593143463135, 0.008240199647843838, 0.7312912344932556, -0.1478327512741089, 0.17793646454...
what happens if you supply invalid coordinates. ETA Again: OK, even though the documentation makes no mention of it (naughty Microsoft!), it turns out that the indexer for DataGridView will in fact throw an ArgumentOutOfRangeException if you supply it with invalid coordinates. Fair warning. you can find how to do it [...
[ 0.11907649040222168, -0.08663993328809738, 0.27620041370391846, 0.08273497968912125, 0.1989710032939911, -0.17574718594551086, 0.45518502593040466, -0.08550139516592026, -0.3366463780403137, -0.6236442923545837, -0.25530144572257996, 0.5285974740982056, -0.36475133895874023, 0.057961363345...
To add a NOT NULL Column to a table with many records, a DEFAULT constraint needs to be applied. This constraint causes the entire ALTER TABLE command to take a long time to run if the table is very large. This is because: Assumptions: 1. The DEFAULT constraint modifies existing records. This means that the db needs ...
[ -0.06716439872980118, -0.028369346633553505, 0.5886305570602417, -0.001760714570991695, 0.16303379833698273, -0.0029469034634530544, 0.28123942017555237, -0.4115007817745209, -0.22062721848487854, -0.5996060967445374, -0.1414039433002472, 0.49796849489212036, -0.6805571913719177, 0.1964557...
roll-back can be executed if necessary. 3. The transaction log keeps track of the entire record. Therefore, even though only a single field is modified, the space needed by the log will be based on the size of the entire record multiplied by the # of existing records. This means that adding a column to a table with sma...
[ 0.18868596851825714, -0.01896328292787075, 0.4049893617630005, 0.0644405409693718, 0.12909087538719177, 0.015131229534745216, -0.2123970240354538, -0.10250908881425858, -0.4324115514755249, -0.4167860746383667, -0.00008437219366896898, 0.5066790580749512, -0.267493337392807, 0.045836687088...
set the timeout period to be very long. The problem with this is that it may take hours or days to do depending on the # of records. 2. Add the column but allow NULL. Afterward, run an UPDATE query to set the DEFAULT value for existing rows. Do not do UPDATE \*. Update batches of records at a time or you'll end up with...
[ 0.1711132675409317, -0.07186873257160187, 0.1427663415670395, 0.08579307794570923, 0.14703702926635742, -0.05285971239209175, 0.3106887936592102, -0.12766987085342407, -0.29426664113998413, -0.7254071235656738, 0.038919318467378616, 0.45521146059036255, -0.43208348751068115, 0.145963519811...
some best practice documents out there that says that you should not have columns that allow NULL unless it's necessary. 3. Create a new table with the same schema. Add the column to that schema. Transfer the data over from the original table. Drop the original table and rename the new table. I'm not certain how this i...
[ 0.18931058049201965, 0.23006753623485565, 0.2691325545310974, 0.12394136190414429, -0.04438402131199837, 0.12317769229412079, 0.21071945130825043, -0.2326604276895523, -0.13372331857681274, -0.7175260186195374, 0.1413615494966507, 0.3492547273635864, -0.44820359349250793, 0.066266149282455...
my steps (I am using SQL Server 2005): 1) Add the column to the table with a default value: ``` ALTER TABLE MyTable ADD MyColumn varchar(40) DEFAULT('') ``` 2) Add a `NOT NULL` constraint with the `NOCHECK` option. The `NOCHECK` does not enforce on existing values: ``` ALTER TABLE MyTable WITH NOCHECK ADD CONSTRAI...
[ -0.29689866304397583, 0.27007007598876953, 0.9440854787826538, -0.055820219218730927, -0.039106398820877075, 0.20530997216701508, 0.2520955502986908, -0.3705867528915405, -0.3604406416416168, -0.6398807764053345, 0.10238136351108551, 0.546856164932251, -0.2950078248977661, -0.0981563404202...
not have a sequence primary key. * `GO 1000` will execute the previous statement 1000 times. This will update 3 million records, if you need more just increase this number. It will continue to execute until SQL Server returns 0 records for the UPDATE statement.
[ 0.22158348560333252, -0.07168866693973541, 0.5015431046485901, -0.004896589554846287, 0.13489308953285217, 0.014219076372683048, 0.4115949273109436, -0.01680898293852806, -0.14146938920021057, -0.5200807452201843, -0.08554111421108246, 0.4595884680747986, -0.35419127345085144, 0.2087289243...
I'd like to make an (MS)SQL query that returns something like this: ``` Col1 Col2 Col3 ---- --------------------- ------ AAA 18.92 18.92 BBB 20.00 40.00 AAA 30.84 30.84 BBB 06.00
[ -0.20170028507709503, 0.4984790086746216, 0.7375034093856812, -0.2328416109085083, -0.20840786397457123, 0.05016305670142174, 0.12918630242347717, -0.04105681926012039, -0.38667765259742737, -0.3155485987663269, -0.006107907276600599, 0.5242973566055298, -0.3987111449241638, 0.136968836188...
12.00 AAA 30.84 30.84 AAA 46.79 46.79 AAA 86.40 86.40 ``` where Col3 is equal to Col2 when Col1 = AAA and Col3 is twice Col2 when Col1 = BBB. Can someone point me in the rigth direction please? You didn't mention what kind of database you're using.
[ 0.1972874253988266, 0.53257817029953, 0.5454795956611633, -0.17207540571689606, -0.07860708981752396, -0.0435146801173687, 0.06287745386362076, -0.20674771070480347, -0.5185410976409912, -0.33943766355514526, 0.2490389347076416, 0.6203542351722717, -0.03216852247714996, -0.1026768088340759...
Here's something that will work in SQL Server: ``` SELECT Col1, Col2, CASE WHEN Col1='AAA' THEN Col2 WHEN Col1='BBB' THEN Col2*2 ELSE NULL END AS Col3 FROM ... ```
[ -0.26957735419273376, 0.13877607882022858, 0.3893513083457947, -0.11816801130771637, -0.21042050421237946, -0.038913413882255554, -0.18452683091163635, 0.12036588788032532, -0.2639704644680023, -0.3870907723903656, -0.045999690890312195, 0.25288254022598267, -0.46513766050338745, 0.1825858...
How can I match (PCRE) everything inbetween two tags? I tried something like this: > <!--\s\*LoginStart\s\*-->(.\*)<!--\s\*LoginEnd\s\*--> But it didn't work out too well for me.. I'm kind of new to regular expressions, so I was hoping if someone would be kind enough to explain to me how I would accomplish this, if...
[ 0.15885579586029053, -0.2523162066936493, 0.5541875958442688, 0.18493129312992096, 0.04415841028094292, -0.2568928301334381, 0.39494144916534424, -0.5079451203346252, -0.16415953636169434, -0.567780613899231, -0.0800335630774498, 0.686042845249176, -0.4845845401287079, -0.36747246980667114...
such as '<!-- LoginStart -->stuff more stuff <!-- LoginEnds -->' ```
[ 0.2688107490539551, 0.2761530578136444, 0.03191303461790085, 0.3796658515930176, 0.17479155957698822, -0.4763077199459076, 0.11881286650896072, 0.31685706973075867, -0.434696763753891, -0.3996845483779907, -0.7048681378364563, 0.41922521591186523, -0.028112564235925674, 0.10642245411872864...
I found one source which successfully overrode `Time.strftime` like this: ``` class Time alias :old_strftime :strftime def strftime #do something old_strftime end end ``` The trouble is, `strftime` is an instance method. I need to override `Time.now` - a class method - in such away that any caller gets...
[ 0.015677671879529953, 0.13289111852645874, 0.15946000814437866, -0.040245138108730316, 0.09598392248153687, -0.33425378799438477, 0.5006077885627747, -0.2091139554977417, -0.06843101978302002, -0.5991811752319336, 0.038941774517297745, 0.6275307536125183, -0.412509560585022, 0.339698582887...
class object. the syntax for this is class << self do...end. ``` class Time alias :old_strftime :strftime def strftime puts "got here" old_strftime end end class Time class << self alias :old_now :now def now puts "got here too" old_now end end end t = Time.now puts t.strf...
[ 0.04859388992190361, -0.31050971150398254, 0.3730883002281189, -0.12844713032245636, 0.2598145306110382, -0.1556384563446045, 0.28062745928764343, -0.05849729850888252, -0.41504400968551636, -0.6287221908569336, -0.23622176051139832, 0.5096524953842163, -0.2941480576992035, 0.3850302100181...
I need some help regarding algorithm for randomness. So Problem is. There are 50 events going to happen in 8 hours duration. Events can happen at random times. Now it means in each second there is a chance of event happening is 50/(8\*60\*60)= .001736. How can I do this with random generation algorithm? I can get ran...
[ 0.2172839641571045, -0.25179100036621094, 0.12378724664449692, 0.10253644734621048, -0.07637032121419907, 0.08979709446430206, 0.3618057072162628, -0.2811749279499054, -0.5393106937408447, -0.7429676055908203, 0.33164727687835693, 0.5541805624961853, -0.06898490339517593, 0.415818244218826...
(static\_cast )(r) / (static\_cast)(RAND\_MAX); --- It removed double from static\_cast double chance = (double)r/(double)(RAND\_MAX); * Create a list of 50 numbers. * Fill them with a random number between 1 and 8 \* 60 \* 60. * Sort them And you have the 50 seconds. Note that you can have duplicates.
[ 0.279543936252594, -0.4023783206939697, 0.08077728003263474, 0.005506047513335943, 0.24577759206295013, 0.34318506717681885, 0.4411720037460327, -0.5814926624298096, -0.17859502136707306, -0.44738417863845825, 0.04462101683020592, 0.4397910237312317, -0.08272594958543777, -0.16885794699192...
I'm writing a simple program to browse the local network and pass on filenames to mplayer using "system". However, sometimes filenames contain spaces or quotes. Obviously I could write my own function to escape those, but I'm not sure exactly what characters do or do not need escaping. Is there a function available in...
[ 0.2672250270843506, 0.06556244194507599, 0.18646420538425446, 0.1454804390668869, -0.004613911267369986, 0.04808555543422699, 0.1762998402118683, 0.03650158271193504, -0.3414228558540344, -0.6608806848526001, 0.06845427304506302, 0.6078702807426453, -0.37491053342819214, 0.0946463569998741...
get away with surrounding the entire filename in single quotes after replacing every single quote in the file name with `'"'"'` (the first single quote stops the sequence, the `"'"` appends the literal single quote to the string, the final single quote starts the quoted sequence again). A better solution would be to fi...
[ 0.3117219805717468, 0.14835907518863678, 0.12835277616977692, -0.014979168772697449, 0.08106900751590729, -0.1421794444322586, 0.557898223400116, -0.14144031703472137, -0.14812573790550232, -0.10311216861009598, -0.40221190452575684, 0.43089717626571655, -0.48812633752822876, 0.25044137239...
I am using a `ListView` to display the main screen of my application. The main screen is essentially a `menu` to get into the different sections of application. Currently, I have the `ListView` whose contents are added programmatically in the `onCreate` method. Here is the code snippet that does this: ``` String[...
[ 0.45598506927490234, -0.29387569427490234, 0.8576273918151855, -0.2688632309436798, 0.05850938335061073, 0.2393171489238739, 0.19757021963596344, -0.3630329370498657, -0.3271922171115875, -0.8271453976631165, -0.10903225839138031, 0.5337068438529968, -0.33814555406570435, 0.148315772414207...
essentially just a bunch of nodes with the text contained in the mainItems array. I know that I can create an XML layout (i.e. `R.layout.mainMenu_item`) that has an ImageView and TextView in it, but I am unsure how to set the ImageView's icon. I have seen that there is a setImageResouce(int resId) method, but the way t...
[ 0.3216789960861206, -0.35143330693244934, 0.4905892014503479, -0.01752089336514473, -0.26158738136291504, -0.0028754707891494036, 0.0625595673918724, -0.24609054625034332, -0.12796907126903534, -0.7945566177368164, 0.10862451046705246, 0.7855207324028015, -0.28720012307167053, 0.0999784022...
will be getView() as the previous poster mentioned. From there you can inflate a layout containing an ImageView, get a reference to it using findViewById, and set the image to whatever drawable you've added into your resources. ``` public View getView(int position, View convertView, ViewGroup parent) { View row =...
[ 0.2523662745952606, -0.32351386547088623, 0.974092960357666, -0.1712973415851593, -0.0076635777950286865, 0.1551738828420639, -0.026870405301451683, -0.4155651926994324, -0.027012130245566368, -0.8861508369445801, -0.18667392432689667, 0.7057843804359436, -0.3705797493457794, 0.11691706627...
I have some UserControls that I created in ProjectA. I have ProjectB that has a windows form that I want to put the controls on. Both of these projects are in a single solution. There's a reference to ProjectA from ProjectB so it can "see" the UserControls. However, the UserControls do not show up in the toolbox for m...
[ 0.2605525255203247, -0.20756617188453674, 0.48876941204071045, 0.16611389815807343, -0.16576792299747467, 0.12642885744571686, 0.3798221945762634, -0.32499879598617554, -0.22107593715190887, -0.8591957092285156, 0.030508922412991524, 0.41896793246269226, -0.2950794994831085, 0.170488983392...
be set to True for this to work.
[ 0.8871472477912903, 0.30339956283569336, 0.06667649745941162, -0.13339747488498688, 0.13336727023124695, 0.013335034251213074, 0.5094120502471924, 0.07815093547105789, 0.24212634563446045, -0.5634183287620544, -0.08293738216161728, 0.5486881732940674, -0.035099104046821594, 0.0998036190867...
It seems as though the following calls do what you'd expect (close the stream and not allow any further input - anything waiting for input on the stream returns error), but is it guaranteed to be correct across all compilers/platforms? ``` close(fileno(stdin)); fclose(stdin); ``` Nothing is guaranteed correct across ...
[ 0.17058144509792328, -0.09735352545976639, 0.780174195766449, -0.14997808635234833, 0.10335569083690643, -0.6291607022285461, 0.29465749859809875, -0.36686667799949646, -0.11119639128446579, -0.3162374794483185, -0.35635897517204285, 0.4940023422241211, -0.6389330625534058, -0.262724429368...
will properly close everything down for you.
[ 0.09363806992769241, 0.38885796070098877, 0.7739217877388, 0.015097960829734802, 0.4444100260734558, -0.22150123119354248, 0.6569004058837891, 0.015973571687936783, -0.03221075236797333, -0.4766792356967926, -0.5444164276123047, 0.4804779589176178, 0.029636649414896965, 0.05478908866643905...
Why would I choose to use Groovy when I could use Jython or Jruby? Does the language provide any inherent advantages to make up for the fact that Jython and Jruby skills are applicable to their parent languages outside of the JVM? Keep in mind that I purposely keeping this question generic, but if there are any advan...
[ 0.0806988850235939, 0.022509993985295296, 0.175773024559021, 0.09037614613771439, -0.10881784558296204, 0.04228676110506058, 0.17846894264221191, 0.39806094765663147, -0.11571287363767624, -0.5428366661071777, -0.1601266860961914, 0.6305573582649231, 0.08093688637018204, -0.152862235903739...
least I have gained a better understanding of Ruby. Whereas Groovy skills are applicable only when using a language that just exists inside the JVM. Jython and Jruby have this built in advantage, what does Groovy have to make up for this disadvantage? If Groovy doesn't have any advantages that you've found, and you wo...
[ 0.24241085350513458, 0.1923258751630783, 0.12894493341445923, 0.26358529925346375, -0.44733956456184387, -0.07729732990264893, 0.46722790598869324, 0.3009367287158966, 0.07290282845497131, -0.81031334400177, 0.16717655956745148, 0.7692816257476807, 0.24251395463943481, -0.13574133813381195...
Groovy to integrates better with Java projects then Jruby. I am not sure if lack of integration is a failing of Jruby or Netbeans. But after using it for alittle Groovy definitely seems to have a leg up. I've done pretty extensive development in Ruby and Groovy (as well as a little Jython using Grinder as a load testin...
[ -0.0825289934873581, -0.07038062065839767, 0.38154953718185425, -0.12763939797878265, -0.6150617599487305, -0.02859443426132202, 0.42462804913520813, 0.3172471523284912, -0.024308037012815475, -0.6663838624954224, 0.29913532733917236, 0.7003695368766785, -0.1159835085272789, 0.029893860220...
last used JRuby, but importing Java classes and working with the classloader in JRuby didn't feel as clean to me. The fact that Groovy is also essentially a superset of Java means that the huge population of Java programmers out there will have a quicker uptake time in picking Groovy up over Ruby/JRuby. They can start...
[ 0.21343661844730377, -0.2168157994747162, 0.02485818974673748, 0.04976953938603401, -0.39939701557159424, -0.08991973102092743, -0.001574589405208826, 0.3135882318019867, -0.3678426146507263, -0.6534644961357117, 0.14158689975738525, 0.7173314690589905, -0.2712949514389038, -0.136980190873...
almost the exact same syntax, it's Java. If you're working in the Ruby or Python worlds, you're going to have to go to either C which is a big shift or Java, which is also quite different than those languages. Programming in Groovy tends to help keep your Java skills somewhat sharp as well. If you have particular acce...
[ 0.3095082640647888, 0.10993991792201996, -0.15652023255825043, 0.13306009769439697, -0.012290040962398052, 0.07273463159799576, 0.19524985551834106, 0.4749619960784912, -0.2548510432243347, -0.6148746013641357, -0.03009510599076748, 0.8025896549224854, -0.2790873348712921, -0.1530554890632...
more on the problem that you're trying to fix and the resources that you have available to you. Once you've become proficient in one dynamic language, picking up a second or a third is much easier.
[ 0.05538336560130119, -0.18797747790813446, -0.3282409906387329, 0.24433518946170807, -0.09947323054075241, 0.17792409658432007, 0.12943406403064728, 0.49638086557388306, -0.2460019588470459, -0.8336911201477051, -0.30454766750335693, 0.7533674836158752, -0.09115767478942871, -0.48095664381...
Is there any other way to get a list of file names via `T-SQL` other than ``` INSERT INTO @backups(filename) EXEC master.sys.xp_cmdshell 'DIR /b c:\some folder with sql backups in it ``` I am attempting to get a list of SQL backup files from a folder to restore and I do NOT want to use the `xp_cmdshell` for obvious...
[ 0.30244913697242737, 0.30941352248191833, 0.11314456909894943, 0.033979009836912155, 0.17152318358421326, -0.2787172794342041, 0.16088199615478516, 0.07782305032014847, -0.4243287742137909, -0.5156383514404297, 0.06327587366104126, 0.658972978591919, -0.14009805023670197, 0.264241665601730...
am writing a c# app that loops through that directory and creates a comma delimited string of file names with paths (e.g. FooA.txn,FooB.txn,FooC.txn). I then feed this string into a stored procedure that I wrote which parses the string and inserts the file names into a temp table. Then I loop through the temp table res...
[ 0.39821508526802063, 0.6242669224739075, 0.656417727470398, -0.3110139071941376, 0.10030773282051086, 0.0194782093167305, 0.1358366459608078, -0.5443560481071472, -0.07152058929204941, -0.46312105655670166, -0.25756388902664185, 0.7613196969032288, -0.6034749150276184, -0.14320877194404602...
I want to commit a large amount of XML files which have been modified. However, within the directory that I want to recursively search through, there are many folders/files which have been added locally, these I do not want to commit. Is there a way to do this on the command line? Update: I should have included the S...
[ 0.13887594640254974, 0.04136494919657707, 0.5825719237327576, -0.0651293396949768, 0.09420899301767349, -0.3389025032520294, 0.5895595550537109, -0.3699851632118225, -0.5173807144165039, -0.40278616547584534, -0.22417353093624115, 0.9403768181800842, -0.0363442525267601, -0.045612290501594...
svn add them, they won't get committed... typically --force will allow you to steal the file lock.
[ 0.48803824186325073, -0.0818135216832161, 0.43451163172721863, 0.34592974185943604, 0.24603712558746338, -0.13972924649715424, 0.1781489998102188, -0.5121115446090698, -0.36449572443962097, -0.19404873251914978, -0.17561446130275726, 0.7133738398551941, -0.17712442576885223, 0.063580013811...
I would like to know How to create a fps-game with SDL lib? Are there any books that explain with examples? this wins for most open ended question. You could literally write a book. But lets settle for pointing in the right direction... Step one, you will need good debugging skills for a project like this. Pick up C...
[ 0.439380019903183, 0.20045718550682068, -0.24180586636066437, 0.4290740191936493, 0.15325762331485748, -0.1494610458612442, 0.18506380915641785, 0.14931558072566986, 0.10691626369953156, -0.7379506826400757, -0.006238158792257309, 0.3851257264614105, -0.1562146246433258, -0.338770300149917...
something big and complex, and keep in mind when you look at any game code that they may have had a combined team put WAY more time into it than you will ever have. The point in this is to see code structure. Get a reference for 3D math, doesn't have to be THAT in depth, but you will need to know stuff like dot produc...
[ 0.5402040481567383, 0.1645258665084839, 0.0927681252360344, 0.26652124524116516, -0.20935297012329102, -0.14282776415348053, 0.03343275934457779, -0.0059669120237231255, -0.2020331472158432, -0.6442320942878723, 0.18484026193618774, 0.6059072613716125, -0.08839642256498337, -0.056361664086...
math[Mathematics for 3D Game Programming and Computer Graphics, Second Edition (Game Development Series)](https://rads.stackoverflow.com/amzn/click/com/1584502770) This isn't the kind you learn in college, it's more like a cross between trig and more advanced practical concepts: How to create a toolbox for yourself of ...
[ 0.23177792131900787, 0.23537684977054596, 0.11958771198987961, 0.32648277282714844, -0.2557295560836792, 0.012419837526977062, 0.020610559731721878, -0.11068884283304214, -0.10609438270330429, -0.48391208052635193, 0.16867932677268982, 0.5550308227539062, 0.17028559744358063, -0.1732982844...
C++, it's the THOUGHT that is put into how your data/control will flow that will count, NOT how perfectly you emulate design patterns (though these are very useful as well of coarse) Fundamentals of AI, not "real" AI, but functional AI; there is a big difference. State machines are great to start with, and sufficient ...
[ 0.1526801586151123, -0.06733044981956482, 0.05453607812523842, 0.19054283201694489, 0.03833698853850365, 0.14823350310325623, -0.0009086512145586312, -0.2310192584991455, -0.0847533792257309, -0.5072334408760071, 0.010828251019120216, 0.34853261709213257, -0.4700561761856079, -0.3954571187...
latter being mroe difficult. Experience is the best teacher here of coarse. (though the legendary McConnell has book on this as well) Have a system to insert your gameplay into your level. If it is JUST you as a programmer, then your best bet is to write a plug in for an already existing editing program such as 3DS Ma...
[ 0.4856199026107788, 0.12318069487810135, 0.13845473527908325, 0.3955278694629669, -0.1724715530872345, -0.2090195268392563, 0.09158100187778473, 0.2221461832523346, -0.14665353298187256, -0.41777706146240234, 0.2175707072019577, 0.7107682228088379, 0.2237527221441269, -0.05713976174592972,...
your world. You can spend YEARS making tools to let you do this right, so you want to do things in such a way that you can edit fast and accurately If you making your own editor, incorporate it into your game world. If your world is not TRULY 3D and you want to make lots of level fast you can save your level data as s...
[ 0.36499688029289246, 0.16402721405029297, 0.352804034948349, 0.5008167028427124, -0.2387753427028656, 0.02635803632438183, 0.02929123118519783, 0.15572012960910797, -0.21224848926067352, -0.9171845316886902, 0.2091980129480362, 0.45802128314971924, -0.19097581505775452, 0.31040406227111816...
xR....xxx...........E..x xx.................0xxxx xxxxxxxxxxxxxxxxxxxxxxxx ``` But it all depends on your game. My point is that you will need to resort to "ghetto coding" how you get your gameplay data into your world is very important and you need to think of something that is both fast for you to implement AND f...
[ 0.48915204405784607, 0.26243820786476135, 0.09482509642839432, 0.3684599697589874, -0.01421907264739275, -0.01199804712086916, 0.22108913958072662, 0.20832940936088562, -0.008978605270385742, -0.6545082926750183, 0.21926765143871307, 0.4032781720161438, -0.07460619509220123, 0.188340738415...
requirements are, it could really use another pass. Do not be afraid to rewrite, you learn a lot by doing that, but if you goal is functionality, you will probably need to figure out where to hack some things in (like embedding gameplay data nad coordinates into code files) It *IS* ok to hack as long as you KNOW where ...
[ 0.49993109703063965, -0.05033589154481888, 0.21052661538124084, 0.44235894083976746, 0.09142284840345383, -0.7098861932754517, 0.24808160960674286, -0.3247345983982086, 0.02641172707080841, -0.7053006291389465, 0.15832969546318054, 0.7640860676765442, 0.10556025058031082, -0.11541412025690...
is, learning, or functionality and find the happy medium between.
[ 0.06277764588594437, -0.1314627230167389, -0.07758728414773941, 0.22454063594341278, 0.19080878794193268, 0.08568067103624344, 0.3022920787334442, 0.29323479533195496, 0.010802418924868107, -0.9690191745758057, -0.4156007468700409, 0.5203062295913696, 0.12309791147708893, 0.092612259089946...
I used to do this: ``` SELECT layerID FROM layers WHERE ownerID = ? AND collectionID = ? ``` Which would give me an array of layerID's, and then I'd loop and do this for each one: ``` SELECT DATA FROM drawings WHERE layerID = ? ``` And it all worked fine. So now I'm trying to do it in one step, so I try this: ``...
[ 0.11568374186754227, -0.40670427680015564, 0.444649338722229, 0.04381069540977478, -0.21652156114578247, -0.045965515077114105, -0.1418585181236267, -0.3970804214477539, -0.1216527447104454, -1.1028262376785278, 0.2759849429130554, 0.36689072847366333, -0.33496761322021484, 0.0575872622430...
much longer to complete, versus the separate queries I was doing before. (By theway, the subquery, `SELECT layerID etc` still uses the index). I've determined if it's using a query or not by using the 'EXPLAIN' statement. I have individual indexes on the `ownerID` and `collectionID` columns in the `layers` table, and...
[ 0.2869330644607544, -0.2275271862745285, 0.4723909795284271, 0.14883404970169067, 0.005897972267121077, -0.030835136771202087, 0.08570584654808044, -0.38142865896224976, 0.12739607691764832, -0.9651760458946228, 0.02662101574242115, 0.28214314579963684, -0.08213783800601959, 0.193981945514...
l.ownerID = ? AND l.collectionID = ? ```
[ 0.09509135037660599, 0.16871805489063263, 0.12436182051897049, -0.25505897402763367, 0.4584888219833374, 0.017851626500487328, -0.5117424726486206, -0.10290710628032684, -0.005138924345374107, -0.4388922154903412, -0.33467814326286316, 0.4002273380756378, -0.3780468702316284, 0.39151358604...
I am working on a C++ app which internally has some controller objects that are created and destroyed regularly (using new). It is necessary that these controllers register themselves with another object (let's call it controllerSupervisor), and unregister themselves when they are destructed. The problem I am now faci...
[ 0.3192656934261322, 0.3266077935695648, 0.2737572491168976, 0.03524129465222359, 0.14988973736763, -0.24754180014133453, 0.20258061587810516, 0.07181200385093689, -0.23016874492168427, -0.651078999042511, -0.14949931204319, 0.5162307024002075, -0.3146854043006897, 0.4130309820175171, 0.1...
I came up with so far (having a big cold, so this may not mean much) is not having the controllerSupervisor as a global variable on the stack, but rather on the heap (i.e. using new). However in that case I do not have a place to delete it (this is all in a 3rd party kind of library). Any hints/suggestions on what po...
[ 0.27972254157066345, -0.27065688371658325, 0.18468402326107025, 0.3866547644138336, 0.07314694672822952, -0.14498065412044525, -0.058901555836200714, 0.19984720647335052, -0.5158351063728333, -0.9172974824905396, 0.10525035858154297, -0.10047215968370438, -0.41186508536338806, 0.4087041616...
what's the easiest way to bulk load my iTunes library xml into an existing SQL Server database? bcp with xml flag. <http://msdn.microsoft.com/en-us/library/ms162802.aspx> It really depends how you want it in there and what you're purposes are, which you haven't explained.
[ 0.42772749066352844, 0.1538369357585907, 0.16826951503753662, 0.21009843051433563, 0.060292407870292664, -0.0641433596611023, -0.17591886222362518, 0.1486334204673767, -0.30243954062461853, -0.36247503757476807, 0.17727428674697876, 0.10533073544502258, -0.08010485768318176, -0.04136342927...
I realized the solution to this problem while I was creating the documentation to ASK this question...so I am posting the answer if for no other reason than to keep me from wasting time on this in the future `toggle()` is pretty buggy at times, i've had it do odd things to checkmarks (unchecking them) and other assorte...
[ -0.0019252576166763902, 0.060111187398433685, 0.41300806403160095, 0.04730599746108055, 0.2276424616575241, -0.028965692967176437, 0.2654646933078766, 0.08741731196641922, -0.3397395610809326, -0.5944796204566956, -0.13499777019023895, 0.3179028630256653, -0.3743744194507599, 0.07503840327...
'opacity' : 'toggle', }); }); ```
[ -0.2322576940059662, -0.11958509683609009, 0.6388750076293945, -0.13096807897090912, 0.1803319901227951, 0.12285380810499191, -0.05577002465724945, -0.17308224737644196, -0.17534831166267395, -0.3495110869407654, -0.46178704500198364, 0.7819674611091614, -0.6872661709785461, 0.385925769805...
Does anyone know of a good alternative to cron? I would like something that can be run with different time zones. You may consider [Quartz](http://www.opensymphony.com/quartz/wikidocs/Features.html) (a java-based solution), that can take advantage of [`Date` build in the appropriate TimeZone](http://jira.opensymphony.c...
[ 0.22346225380897522, -0.12226404249668121, 0.07985789328813553, 0.15411871671676636, 0.222370907664299, -0.015108006075024605, 0.33823710680007935, 0.16922220587730408, -0.31154581904411316, -0.3446711599826813, -0.22427719831466675, 0.5341225862503052, 0.2197529524564743, 0.26781094074249...
Do any of the existing JavaScript frameworks have a non-regex `replace()` function, or has this already been posted on the web somewhere as a one-off function? For example I want to replace `"@!#$123=%"` and I don't want to worry about which characters to escape. Most languages seem to have both methods of doing repla...
[ 0.10258234292268753, 0.07517240941524506, 0.351743221282959, -0.011649144813418388, -0.04885803535580635, -0.14036321640014648, 0.2965734601020813, -0.07358905673027039, -0.30089491605758667, -0.8189731240272522, -0.3274187445640564, 0.4331682622432709, -0.49309805035591125, -0.18508179485...
directly](http://safari.informit.com/0596101996/jscript5-CHP-11-SECT-2) to it. here's the relevant part: > The replace( ) method performs a search-and-replace operation. It takes a regular expression as its first argument and a replacement string as its second argument. It searches the string on which it is called for...
[ 0.1158924400806427, 0.1452869027853012, 0.486050009727478, -0.083901047706604, 0.13350506126880646, -0.008421486243605614, -0.08551802486181259, -0.42731645703315735, -0.10074272751808167, -0.4923836588859558, -0.35754942893981934, 0.7368438839912415, -0.7874047756195068, -0.14721895754337...
literally rather than converting it to a regular expression with the RegExp( ) constructor, as search( ) does.**
[ 0.1360485851764679, -0.06978719681501389, 0.11081903427839279, -0.2891393005847931, -0.08625485748052597, 0.16254830360412598, 0.4660845696926117, 0.08399025350809097, 0.0007639956311322749, -0.42989033460617065, -0.650215208530426, 0.2854023873806, -0.31883373856544495, 0.0196912344545125...
A method I work with that is called tens of thousands of times started throwing exceptions recently. In most debugging circumstances I would set a breakpoint at the top of this method and run through until I reach the call I'm interested in with a parameter value that triggers the exception. In this case that would be ...
[ 0.19632916152477264, 0.3929917514324188, 0.3097998797893524, -0.43205568194389343, -0.0546930655837059, -0.016221601516008377, 0.31361865997314453, -0.17439720034599304, -0.307828813791275, -0.1316073089838028, 0.06408507376909256, 0.2792128920555115, -0.38548383116722107, 0.29417628049850...
is called many, many times void Bar(string str) { try { // Breakpoint inserted here ... } catch (Exception ex) { ...
[ 0.4087378978729248, -0.07786063849925995, 0.42533332109451294, -0.3485221564769745, 0.3171972632408142, 0.061308354139328, 0.2386784851551056, -0.3548932373523712, -0.3349241316318512, -0.4399166703224182, 0.007243055384606123, 0.2231856733560562, -0.46743738651275635, 0.19719438254833221,...
} } } ``` To my surprise, doing this caused Visual Studio and my application to stop functioning in Debug mode. My application started and output some simple logging messages but then stopped responding entirely. Thinking Visual Studio might just be performing a little slower due to the extra work it has to do to...
[ 0.13973844051361084, 0.3409639000892639, 0.1313355267047882, -0.1460513323545456, 0.047281213104724884, 0.1475735604763031, 0.6464123725891113, 0.18243983387947083, -0.16513220965862274, -0.4286896884441376, 0.058725837618112564, 0.5358234643936157, -0.2743242084980011, 0.25180763006210327...
condition. Strangest of all, the Break All debugging command, which will usually break program execution on the statement that's currently execting whether it's a breakpoint or not, does nothing at all when I have this problematic breakpoint enabled. Has anyone encountered similar behavior with Visual Studio breakpoi...
[ 0.4240148663520813, 0.12203451991081238, -0.009031547233462334, 0.05271157622337341, -0.2169836312532425, -0.0028432649560272694, 0.5955420136451721, 0.0042177592404186726, -0.22265401482582092, -0.5208250880241394, -0.15408746898174286, 0.6549922823905945, -0.450059711933136, 0.2205263376...
of that. This isn't as convenient, but the code executes at a normal pace and it does get the job done. ``` class Foo { // Bar() is called many, many times void Bar(string str) { try { if(str == "condition") { int
[ 0.38479962944984436, 0.26194652915000916, 0.2851541340351105, -0.5223057270050049, 0.22287967801094055, 0.09527623653411865, 0.48564964532852173, -0.39106306433677673, -0.1714017689228058, -0.42527031898498535, -0.045133478939533234, 0.6454237699508667, -0.5649150013923645, -0.001443918677...
i = 0; // Breakpoint inserted here } ... } catch (Exception ex) { ... } } } ```
[ 0.0741991400718689, 0.05684596300125122, 0.24274341762065887, -0.274018257856369, 0.3041030764579773, -0.2924900949001312, 0.19645850360393524, -0.36172860860824585, 0.01430137362331152, -0.2508313059806824, -0.29394468665122986, 0.395386278629303, -0.2728523015975952, 0.38469040393829346,...
Is there any plugins for Eclipse for portlet design and deployment? I have never designed portlets so are there any good tutorials on the web as well? You do have a [tutorial](http://struts.apache.org/2.x/docs/developing-a-portlet-using-eclipse.html) about portlet development (not portlet deployment though, that would ...
[ 0.27351269125938416, 0.004881303291767836, 0.04737820476293564, 0.1593087762594223, -0.003872771980240941, -0.17303936183452606, 0.05761713162064552, 0.24778810143470764, -0.28289854526519775, -0.47298964858055115, -0.19552354514598846, 0.7214697599411011, -0.14519433677196503, -0.10884272...
Anyone knows a good way to resize any window to for example 640x480? Reason is, of course, screencasting. Under windows I've used ZoneSize from donationcoder. (Btw: For Firefox it's easy, just use the web developer toolbar.) Use the [wmctrl](http://www.sweb.cz/tripie/utils/wmctrl/) command: To list the windows: ```...
[ -0.17608368396759033, 0.0327986404299736, 0.9263177514076233, 0.024289382621645927, 0.06869866698980331, 0.11811462789773941, 0.22551217675209045, -0.06141803413629532, -0.2570163905620575, -0.7357882261276245, -0.308533251285553, 0.595301628112793, 0.04320407658815384, 0.12726446986198425...
C#: How do you tell which item index is selected in ListView? ``` ListView mylistv = new ListView(); var index = mylistv.SelectedIndices(); ``` That should do it.
[ 0.07436056435108185, 0.001834106515161693, 0.7752866148948669, -0.0879582092165947, 0.013343354687094688, -0.28582826256752014, -0.06732038408517838, -0.21454758942127228, -0.33776506781578064, -0.43131589889526367, -0.32331767678260803, 0.6444969773292542, -0.19648125767707825, 0.07290905...
I need to connect to an Exchange mailbox in a Python script, without using any profile setup on the local machine (including using Outlook). If I use win32com to create a MAPI.Session I could logon (with the Logon() method) with an existing profile, but I want to just provide a username & password. Is this possible? I...
[ 0.13601341843605042, 0.1242419183254242, 0.18450316786766052, -0.03808370232582092, -0.1796252429485321, -0.2037724256515503, 0.2410650998353958, 0.14504821598529816, 0.06557640433311462, -1.0577032566070557, 0.16383561491966248, 0.30463579297065735, -0.3660490810871124, 0.1789631098508834...
doing is connecting to the mailbox, and running through the messages in the Inbox, retrieving the contents. I can handle writing the code for that, if I can get a connection in the first place! To clarify regarding Outlook: Outlook will be installed on the local machine, but it does not have any accounts setup (i.e. a...
[ 0.28021711111068726, 0.10651911795139313, 0.2405933439731598, 0.20006117224693298, -0.06837207823991776, -0.13240785896778107, 0.3136105537414551, 0.32097378373146057, -0.24498306214809418, -0.8605616688728333, 0.17341801524162292, 0.4614178240299225, -0.046808239072561264, -0.040903493762...
on the Exchange server it would make your life a lot easier.
[ 0.46326616406440735, -0.02783944457769394, 0.17229361832141876, 0.4008874297142029, 0.24634705483913422, 0.09867438673973083, -0.005161772947758436, 0.5242370367050171, 0.007806085050106049, -0.4331296980381012, 0.6409470438957214, 0.2958369255065918, 0.1088060513138771, -0.256534487009048...
How can I create a Sidebar form in delphi. I try the `ScreenSnap` and `Align` properties but I need that the form stay visible even if the user maximize other forms, without been on top. Just like the windows sidebar do. **Update**: From the comments: if a window is maximized, it maximizes next to the window, not in ...
[ 0.19875645637512207, 0.020113427191972733, 0.5249258875846863, -0.2674197852611542, -0.06920706480741501, -0.09231848269701004, 0.07464616745710373, -0.12982220947742462, 0.015512294135987759, -0.8802658915519714, 0.06418593972921371, 0.29636046290397644, -0.3099149763584137, -0.2791360020...
I am really stuck with this Parser Error Message telling me "`Could not load the assembly 'App_Web_amlohswi'. Make sure that it is compiled before accessing the page.`" I have been looking around for a few hours checking different posts here and googling information. I have found out that I need to set up a new Applica...
[ 0.5040183067321777, 0.4313533902168274, 0.1791132092475891, -0.014664161019027233, -0.10298121720552444, -0.3545949459075928, 0.5527709126472473, -0.030741052702069283, -0.25586962699890137, -0.7317824959754944, 0.09475046396255493, 0.5770459771156311, -0.15898936986923218, 0.2733206152915...
properly and (optionally) why is it necessary? I am more used to developing in PHP so I am used to edit src >> upload >> success! Thanks! ASP.NET 3.5 sites run in 2.0 app pools as long as that version of .NET is installed on the system. You may have to set up web.config properly. Visual Studio should do this for you...
[ 0.6403703689575195, 0.07875183969736099, 0.30478543043136597, 0.0631055012345314, -0.14861026406288147, -0.24892807006835938, 0.33866316080093384, -0.3179423213005066, -0.364818811416626, -0.6764587759971619, -0.10346365720033646, 1.0374912023544312, 0.0943748950958252, -0.5689753890037537...
I have a web application project (wap) that is successfully being deployed to a development server by our tfsbuild server. I'd like the build server to run our collection of webtests after deployment. What is a best practice (or ANY practice) for doing this? You're almost there with your code. I agree with you, the M...
[ 0.2577037811279297, 0.29017534852027893, 0.6110328435897827, -0.12482871115207672, 0.13268409669399261, 0.13990536332130432, 0.11417123675346375, -0.40293267369270325, -0.35098522901535034, -0.8474142551422119, 0.04124581441283226, 0.3334183096885681, -0.27803704142570496, -0.1958754509687...
IPv4 address of the client. You might also want to make sure that your code will handle IPv6 (AF\_INET6) properly, or handle the fact that AF\_INET6 is a likely value. You'll probably need to read 16 bytes instead of 4 for this protocol.
[ 0.2018643170595169, -0.016763202846050262, 0.5173517465591431, -0.013428607024252415, 0.011576885357499123, 0.03737904503941536, 0.12282931804656982, -0.2016865760087967, -0.5195656418800354, -0.6163529753684998, -0.1858825385570526, 0.6440518498420715, -0.3234691321849823, -0.071370631456...
When using regular expressions in Ruby, what is the difference between $1 and \1? \1 is a backreference which will only work in the same `sub` or `gsub` method call, e.g.: ``` "foobar".sub(/foo(.*)/, '\1\1') # => "barbar" ``` $1 is a global variable which can be used in later code: ``` if "foobar" =~ /foo(.*)/ then...
[ -0.2190694957971573, 0.22908587753772736, 0.20053821802139282, -0.21904611587524414, -0.13032495975494385, 0.06752051413059235, 0.34474438428878784, -0.14025327563285828, 0.06286268681287766, -0.3936547040939331, -0.24876078963279724, 0.384051114320755, -0.6835097670555115, -0.048936109989...
How would I go about creating a real world form creation class that I can use to display a new form with fields of different types, as how many fields I want, I can use drop downs and I can do all of this by using OOP? You definitely can. Consider a Form class which stores information about the form itself: the `method...
[ 0.7311797738075256, -0.026213493198156357, 0.062462981790304184, 0.4459543526172638, -0.1477896124124527, -0.18245981633663177, -0.013071952387690544, -0.0930558517575264, -0.03047904558479786, -0.6055446267127991, 0.1669616848230362, 0.46285274624824524, -0.13309265673160553, -0.141236707...
subclassing them for InputText, InputCheckbox, InputRadio maybe be a bit over the top). Here's a vague skeleton design: ``` class Form { var $attributes, // array, with keys ['method' => 'post', 'action' => 'mypage.php'...] $heading, $description, $inputs // array of FormInput ele...
[ 0.13496896624565125, -0.2016701102256775, 0.3716110289096832, 0.029383137822151184, -0.06008913740515709, 0.04492258280515671, 0.18380877375602722, -0.3081446886062622, -0.016374947503209114, -0.7281071543693542, 0.055259063839912415, 0.48021242022514343, -0.22131964564323425, -0.008683546...
*/ ">" . "<h1>" . $this->heading . "</h1>" . "<p>" . $this->description . "</p>" ; // wrap your inputs in whatever output style you prefer: // ordered list, table, etc. foreach ($this->inputs as $input) {
[ -0.06230385601520538, 0.05967160314321518, 0.23261024057865143, -0.04630953446030617, 0.025487402454018593, 0.3096061646938324, -0.1847372204065323, -0.2592470347881317, -0.19846245646476746, -0.537381112575531, -0.546934962272644, 0.5800673365592957, -0.43688884377479553, -0.0157457422465...
$output .= $input->render(); } $output .= "</form>"; return $output; } } ``` The FormInput class would just need to store the basics, such as type, name, value, label. If you wanted to get tricky then you could apply validation rules which would then be converted to Javascript when renderi...
[ 0.27036166191101074, -0.16011697053909302, 0.30547237396240234, -0.014696863479912281, -0.23517699539661407, -0.18815317749977112, 0.3547240197658539, -0.3976469933986664, 0.0994744747877121, -0.5632192492485046, -0.13815151154994965, 0.5113632082939148, -0.35428863763809204, -0.2016251087...
I'm working with large numbers that I can't have rounded off. Using Lua's standard math library, there seem to be no convenient way to preserve precision past some internal limit. I also see there are several libraries that can be loaded to work with big numbers: 1. <http://oss.digirati.com.br/luabignum/> 2. <http://w...
[ 0.21763888001441956, 0.20994946360588074, 0.06778904050588608, -0.1959477663040161, 0.1514616310596466, 0.24582111835479736, -0.5389465689659119, -0.0809103325009346, -0.5145400166511536, -0.2080112248659134, 0.24820347130298615, 0.04212918132543564, -0.31582245230674744, -0.07021065056324...
Lua language.
[ 0.3737083673477173, 0.259389728307724, -0.47469988465309143, -0.791742742061615, 0.14462053775787354, 0.5595382452011108, 0.27560046315193176, 0.471572607755661, -0.514167070388794, -0.44456493854522705, 0.22346363961696625, 0.3054920434951782, -0.6231518387794495, 0.376414954662323, 0.0...
I'm writing a website in JSP using Struts and Hibernate. I'm looking for a way to implement a rich UI where you can have more than just buttons. For examples, drag and drops, drop down lists that updates itself in real time as you type more letters out etc. Is there a way to use something like Swing with Struts and Hib...
[ 0.4829491674900055, -0.04652545601129532, 0.31949949264526367, 0.11941105872392654, -0.2814315855503082, -0.02330954559147358, -0.0231605377048254, 0.08883243054151535, -0.07786807417869568, -0.8798625469207764, 0.13564077019691467, 0.39661747217178345, -0.300236314535141, -0.2797598242759...
open source libraries we can or cannot use, and is pretty slow on updating their approval list. None of the AJAX things (e.g. GWT, dojo) are on the list yet. *Thank you for taking the time to read this post!* Use the [JWZ threading algorithm](http://www.jwz.org/doc/threading.html).
[ 0.4509497582912445, 0.22027838230133057, -0.07663914561271667, 0.2549939751625061, -0.3196994960308075, -0.8672123551368713, 0.32332757115364075, 0.5130670666694641, -0.3329316973686218, -0.6937583684921265, -0.2663004994392395, 0.2860559821128845, -0.0016492834547534585, -0.00336313107982...
For instance, does the compiler know to translate ``` string s = "test " + "this " + "function"; ``` to ``` string s = "test this function"; ``` and thus avoid the performance hit with the string concatenation? Yes. This is guaranteed by the C# specification. It's in section 7.18 (of the C# 3.0 spec): > Whenever...
[ 0.27615782618522644, 0.09063979238271713, 0.04858548566699028, -0.07489731162786484, 0.15146754682064056, -0.5132526755332947, 0.4553869664669037, -0.3680311441421509, 0.11981736868619919, -0.3630453646183014, -0.4813859164714813, 0.7945555448532104, -0.16432730853557587, -0.33175876736640...
Is `yield return` a shortcut for implementing `IEnumerable` and `IEnumerator`? Yes, it is. You can find out a lot more about it in chapter 6 of my book, C# in Depth. Fortunately chapter 6 is [available for free](http://www.manning-source.com/books/skeet/Chapter6sample.pdf) from [Manning's web site](http://manning.com/...
[ -0.038990769535303116, -0.145750030875206, 0.45329949259757996, 0.09564462304115295, -0.3787505328655243, -0.12891507148742676, 0.3472824990749359, -0.09761539846658707, -0.02796594426035881, -0.6920714378356934, -0.12919370830059052, 0.771202802658081, 0.15803243219852448, -0.299120038747...
Is there anyway to get Eclipse to automatically look for static imports? For example, now that I've finally upgraded to Junit 4, I'd like to be able to write: ``` assertEquals(expectedValue, actualValue); ``` hit `Ctrl` + `Shift` + `O` and have Eclipse add: ``` import static org.junit.Assert.assertEquals; ``` May...
[ -0.033710021525621414, -0.10827077925205231, 0.441970556974411, -0.2128904014825821, -0.42182034254074097, 0.012497499585151672, -0.012925845570862293, -0.29505273699760437, -0.05205796658992767, -0.5768560767173767, -0.011939539574086666, 0.7984222769737244, -0.19331465661525726, -0.37486...
"`assertT`" and hit **`Ctrl`+`Space`**, Eclipse offers up `assertThat` as a suggestion, and if I pick it, it will add the proper static import to the file.
[ 0.42411306500434875, -0.06954070925712585, 0.3263144791126251, -0.09680818766355515, -0.2905186712741852, -0.19748404622077942, 0.049503691494464874, -0.2343122512102127, 0.2901776432991028, -0.27421313524246216, -0.13513138890266418, 0.8644763827323914, 0.06390231847763062, 0.040929239243...
We've had [this question](https://stackoverflow.com/questions/94101/how-to-type-faster) already, but I want to narrow it down to already high-speed typists. The original poster had hit a barrier of 75 WPM and wanted to increase his speed. I'm at a barrier where I can reliably type around 130, and I can sometimes hit ...
[ 0.42495647072792053, 0.18029376864433289, 0.5367587208747864, 0.20282983779907227, 0.16515110433101654, 0.32236042618751526, 0.2727082669734955, -0.2716136872768402, -0.197102889418602, -0.9327573776245117, 0.2854692041873932, 0.17596535384655, 0.03055788204073906, -0.28508317470550537, ...
keyboards to get the best reactionary keyboard to your typing method. I find myself typing much faster on some keyboards even though they are identically sized with identical features...the key response times are slight different.
[ -0.25570881366729736, 0.26114124059677124, 0.47656068205833435, -0.10471639037132263, -0.04279644414782524, 0.38996636867523193, -0.06460760533809662, 0.1297239512205124, -0.4225965142250061, -0.7549183368682861, 0.2622821629047394, 0.6973082423210144, -0.10441192984580994, -0.097375504672...
I'm using a PropertyGrid in a tool app to show a window to monitor an object in a remote app. Every second or so I get an update from the app with the state of any members that have changed, and I update the grid. I call Refresh() to make the changes take. This all works pretty well except one thing. Say the object is...
[ 0.6489155888557434, -0.10857456177473068, 0.7065410017967224, 0.05477982386946678, 0.05914948880672455, 0.11026936769485474, 0.33592236042022705, -0.26594626903533936, -0.459865003824234, -0.7989467978477478, 0.16919362545013428, 0.42193248867988586, 0.12709641456604004, 0.0699171647429466...
control. The problem is that on Refresh() the control automatically scrolls the grid item into view (strangely it doesn't do this when the item is above the top of the control). I'm looking for a way to either prevent this, or to save state, do the Refresh(), and then set it back. I tried getting the underlying VScro...
[ 0.11890193819999695, -0.42550405859947205, 0.9067789912223816, 0.47352492809295654, 0.06473808735609055, -0.08303146809339523, 0.3841222822666168, 0.044018592685461044, -0.0913432389497757, -0.6161759495735168, 0.09236480295658112, 0.8843706846237183, 0.02897169440984726, 0.348626881837844...
hurts the usability a little so I'm looking for another way. Anyone run into something similar? This is not possible in the MS PropertyGrid. This component has too many unaccessible internals to give you the flexibility you are requesting and as you realized yourself it is not consistent (you have the issue for a prop...
[ 0.4101853370666504, -0.23680488765239716, 0.45495229959487915, 0.06699033081531525, 0.07856662571430206, -0.14162439107894897, 0.19665534794330597, -0.063913494348526, -0.22928805649280548, -0.8549941182136536, 0.2296007126569748, 0.8095319271087646, -0.07908562570810318, 0.233784526586532...
any flicker.
[ 0.026387780904769897, -0.04082942008972168, -0.16325987875461578, 0.2161487191915512, -0.3324034810066223, -0.5054723024368286, 0.26792609691619873, 0.6833611726760864, -0.16381311416625977, -0.2625834345817566, -0.029898954555392265, -0.014686488546431065, -0.5392742156982422, -0.02580020...
How to convert last 3 digits of number into 0 example 3444678 to 3444000 I can do like (int)(3444678/1000) \* 1000= 3444000 But division and multiplication could be costly... Any other solution???? You could try ``` n - (n % 1000) ``` but the modulus operator might be as costly as a division. In any case, this...
[ -0.0010550215374678373, -0.06710478663444519, 0.09486053884029388, 0.02313159964978695, 0.08938050270080566, 0.40858814120292664, 0.29033365845680237, -0.2140469253063202, 0.048301760107278824, -0.6331319212913513, 0.14633002877235413, 0.6167911887168884, -0.1883610188961029, -0.0725424438...