text
stringlengths
0
30.5k
title
stringclasses
1 value
embeddings
listlengths
768
768
'Smith', 'Jones'); ``` Give some more information and I'll edit this answer with more troubleshooting suggestions.
[ 0.43193522095680237, 0.6535071134567261, 0.14578431844711304, 0.034373488277196884, -0.027418646961450577, 0.09618791937828064, 0.16120174527168274, -0.18684007227420807, 0.12299206107854843, -0.49745577573776245, -0.23840849101543427, 0.6741651296615601, -0.43499305844306946, -0.019206922...
How would you model a turn-based game server as a RESTful API? For example, a chess server, where you could play a game of chess against another client of the same API. You would need some way of requesting and negotiating a game with the other client, and some way of playing the individual moves of the game. Is this ...
[ 0.07892398536205292, -0.2069663554430008, 0.17406190931797028, 0.3506335914134979, 0.06103839725255966, 0.34325122833251953, -0.34054020047187805, -0.18182431161403656, -0.2782101631164551, -0.4547852873802185, 0.1900150328874588, 0.6339738368988037, -0.5105248093605042, -0.059714149683713...
state. So it would start with something like ``` /game /game/gameID/gamer/gamerID /game/gameID/board ``` we've got a good intro/overview on [InfoQ](http://www.infoq.com/articles/rest-introduction).
[ 0.4786500334739685, 0.20854857563972473, 0.004203625489026308, 0.25580912828445435, 0.19192619621753693, -0.16157184541225433, -0.051279328763484955, 0.23076753318309784, 0.05673772841691971, -0.7294284701347351, 0.20000450313091278, 0.3793374001979828, -0.03404122591018677, 0.261447250843...
I have been doing a little reading on [Flow Based Programming](http://www.jpaulmorrison.com/fbp/) over the last few days. There is a [wiki](http://www.jpaulmorrison.com/cgi-bin/wiki.pl) which provides further detail. And wikipedia has a [good overview](http://en.wikipedia.org/wiki/Flow-based_programming) on it too. My ...
[ 0.8787361979484558, -0.1649787276983261, 0.05025392770767212, 0.00463916314765811, 0.0583263523876667, -0.26661416888237, -0.1126067116856575, 0.3548830449581146, -0.254665732383728, -0.32152438163757324, 0.012152890674769878, 0.47510191798210144, -0.029552999883890152, 0.09766179323196411...
the advent of procedural languages. Interesting discussion! It occurred to me yesterday that part of the confusion may be due to the fact that many different notations use directed arcs, but use them to mean different things. In FBP, the lines represent bounded buffers, across which travel streams of data packets. Sinc...
[ -0.003237735712900758, -0.4714735150337219, 0.32178014516830444, 0.13094112277030945, -0.20097044110298157, -0.3688206970691681, 0.14542561769485474, 0.1704808473587036, -0.45781514048576355, -0.4316743314266205, -0.23111562430858612, -0.010612737387418747, -0.352719783782959, -0.017696738...
when the buffer is (temporarily) full (or temporarily empty), indefinite amounts of data can be processed using finite resources. By comparison, the E in Grafcet comes from Etapes, meaning "steps", which is a rather different concept. In this kind of model (and there are a number of these out there), the data flowing...
[ -0.23170793056488037, -0.5732348561286926, 0.2701682150363922, 0.014206696301698685, 0.15202780067920685, -0.013351771049201488, -0.04132847860455513, -0.11097605526447296, -0.4117884039878845, -0.4438621401786804, -0.4274936318397522, 0.09401512145996094, -0.320755273103714, -0.0858241021...
application used both MQSeries and CORBA in a natural way. Furthermore, FBP is natively parallel, so it lends itself to programming of grid networks, multicore machines, and a number of the directions of modern computing. One last comment: in the literature I have found many related projects, but few of them have all t...
[ 0.03767509013414383, -0.17055124044418335, 0.269540399312973, -0.2015693038702011, -0.30479687452316284, -0.010030446574091911, -0.026006897911429405, -0.2249554693698883, -0.2679302394390106, -0.6057215929031372, -0.05359369143843651, 0.2870517075061798, -0.4634566009044647, -0.0401356294...
I am generally wary of implementing interfaces partially. However, `IAsyncResult` is a bit of a special case, given that it supports several quite different usage patterns. How often do you use/see used the `AsyncState`/`AsyncCallback` pattern, as opposed to just calling `EndInvoke`, using `AsyncWaitHandle`, or polling...
[ 0.1875002533197403, -0.16251671314239502, 0.2208251804113388, 0.025240417569875717, -0.1077064648270607, -0.27886340022087097, 0.3823619782924652, 0.10074242204427719, -0.5008159875869751, -0.6280562877655029, 0.014829084277153015, 0.49471306800842285, -0.21344172954559326, 0.3118824362754...
_result = f(); IsCompleted = true;
[ -0.23869581520557404, -0.16913831233978271, 0.2764137387275696, -0.16440677642822266, 0.20435009896755219, -0.19419491291046143, 0.5205219388008118, -0.12879978120326996, 0.007902414537966251, -0.11956740915775299, -0.2855895161628723, 0.5673101544380188, -0.3082585334777832, 0.21007874608...
if (_resetEvent != null) _resetEvent.Set();
[ -0.22768861055374146, -0.23517107963562012, -0.007419800851494074, -0.5043365359306335, 0.6819663643836975, -0.01633925549685955, 0.5001403093338013, -0.024663105607032776, 0.03157443553209305, -0.37648653984069824, -0.47989189624786377, 0.663709282875061, -0.4703730344772339, -0.046302206...
}); } public WaitHandle WaitHandle { get { if (_resetEvent == null) _resetEvent = new ManualResetEvent(IsCompleted); return _resetEvent; } public bool IsCompleted {get; private set;} ... ``` It has `WaitHandle` (lazily created,
[ 0.10666988790035248, -0.37103864550590515, 0.7113709449768066, -0.23164252936840057, 0.42086851596832275, 0.11621598154306412, 0.43692243099212646, -0.291217178106308, -0.14930902421474457, -0.38353437185287476, -0.6977121233940125, 0.7370223999023438, -0.41741251945495605, 0.2428502291440...
just as described in `IAsyncResult` documentation) and `IsCompleted`, but I don't see a sensible implementation for `AsyncState` (`{return null;}`?). So does it make sense for it to implement `IAsyncResult`? Note that `Task` in the Parallel Extensions library does implement `IAsyncResult`, but only `IsCompleted` is imp...
[ 0.17867372930049896, -0.3248688280582428, -0.09681416302919388, -0.02924763597548008, -0.1546037793159485, -0.256409227848053, 0.3544362187385559, 0.07789772003889084, -0.1872655153274536, -0.5424719452857971, 0.09223241358995438, 0.7859618067741394, -0.3741750121116638, -0.031810916960239...
so simple that it doesn't seem to be worth to potentially astonish your clients. So, a reasonable implementation for an asynchronously callable method should really provide a fully implemented IAsyncResult. BTW, you often don't need to implement IAsyncResult yourself, just return what is returned by Delegate.BeginInv...
[ 0.19325260818004608, -0.19167549908161163, -0.13201463222503662, 0.1565992832183838, -0.07099922746419907, -0.1125921681523323, 0.28975939750671387, -0.0934871956706047, -0.1051688939332962, -0.5744561553001404, -0.19934260845184326, 0.5585457682609558, -0.18644779920578003, -0.10920166969...
I want to do something like this: ``` c:\data\> python myscript.py *.csv ``` and pass all of the .csv files in the directory to my python script (such that `sys.argv` contains `["file1.csv", "file2.csv"]`, etc.) But `sys.argv` just receives `["*.csv"]` indicating that the wildcard was not expanded, so this doesn't...
[ 0.32742205262184143, 0.0975952222943306, 0.25583332777023315, -0.01074283942580223, 0.08223715424537659, -0.22527876496315002, 0.08829593658447266, 0.16924962401390076, -0.31192898750305176, -0.543792724609375, 0.018295597285032272, 0.6115970611572266, -0.5042115449905396, 0.14079809188842...
happen in Unix by escaping the wildcards :-) ). ``` from glob import glob filelist = glob('*.csv') #You can pass the sys.argv argument ```
[ 0.1333722323179245, 0.05182565003633499, 0.4863912761211395, -0.43896564841270447, 0.47751328349113464, -0.5292280316352844, 0.05251181870698929, 0.4078383147716522, -0.15568478405475616, -0.6609575152397156, -0.39376309514045715, 0.48241859674453735, -0.5536733269691467, 0.236122101545333...
This project started as a development platform because i wanted to be able to write games for mobile devices, but also being able to run and debug the code on my desktop machine too (ie, the EPOC device emulator was so bad): the platforms it currently supports are: * Window-desktop * WinCE * Symbian * iPhone The arch...
[ 0.29970380663871765, 0.16510267555713654, 0.6705220937728882, 0.20256008207798004, 0.16500639915466309, 0.030637502670288086, -0.1371557116508484, -0.06507252156734467, -0.07244699448347092, -0.8199482560157776, 0.08401685208082199, 0.45832401514053345, -0.08905284851789474, 0.273258388042...
has been abstracted away and the guiding principle are: * mostly clean code, as if it was a book to just be read * object-orientation, without sacrifying performances * mobile centric The idea was to open source it, but without being able to manage it, i doubt the software itself would benefit from this move.. Nevert...
[ 0.7248339653015137, 0.32012009620666504, -0.011643881909549236, -0.12268770486116409, -0.016444290056824684, -0.3212246000766754, 0.3069462478160858, 0.22798344492912292, -0.05119341239333153, -0.40892353653907776, -0.2745043635368347, 0.6302635073661804, -0.100845567882061, -0.11200633645...
project to know the status of the project, and what is next to do on the project. Writing a to do list may be helpful, or writing comments in the code may also help. If you do not have the time to write up a to do list maybe somebody is willing to take the initiative on the project, find out what needs to be done. L...
[ 0.780382513999939, -0.1549258679151535, 0.0035048387944698334, 0.37421396374702454, 0.0016694300575181842, -0.46827664971351624, 0.3701000213623047, 0.014851024374365807, -0.26816874742507935, -0.5573039054870605, 0.14456939697265625, 0.42958685755729675, 0.2761581540107727, -0.08418442308...
for having the foresight to start such a great project, and open sourcing it.
[ 0.1577603965997696, 0.12582328915596008, -0.16575299203395844, 0.262940376996994, -0.023297864943742752, 0.14219042658805847, 0.2314165085554123, 0.33243390917778015, -0.2673015296459198, -0.2568342685699463, -0.2059726119041443, -0.016834285110235214, 0.6424874067306519, 0.139076173305511...
I can write: ``` update my_table set xml = updateXML(xml, '/a/b', '1') where document_id = 123 ``` Now what if in the same update query I also want to set /a/c to 2 (in addition /a/b to 1)? I am tempted to write: ``` update my_table set xml = updateXML(xml, '/a/b', '1'), xml = updateXML(xml, '/a/c', '2') w...
[ 0.18978576362133026, 0.3832954466342926, 0.5917609930038452, -0.06383956968784332, -0.14153577387332916, -0.06537403911352158, 0.1803114116191864, -0.2491028904914856, -0.31699836254119873, -0.7107580304145813, 0.05109649524092674, 0.45232093334198, -0.32964709401130676, 0.0470373108983039...
When reusing code (for example, a Util library you created), do you add its project to your solution or use a compiled/published DLL from the Util library? If an assembly is mature, not likely to change or I'm fairly certain I won't need to step into it I would reference the DLL. If it's likely that changes will be mad...
[ 0.523268461227417, 0.03561701253056526, -0.07325563579797745, -0.0054651289246976376, 0.014958575367927551, 0.06885306537151337, -0.09478359669446945, -0.17638283967971802, -0.15131424367427826, -0.5464731454849243, -0.07036027312278748, 0.5677691698074341, -0.2195001095533371, -0.05164877...
Can anyone recommend a C or Objective-C library for HTML parsing? It needs to handle messy HTML code that won't quite validate. Does such a library exist, or am I better off just trying to use regular expressions? Looks like `libxml2.2` comes in the SDK, and `libxml/HTMLparser.h` claims the following: > This module i...
[ 0.4267878234386444, 0.23199760913848877, 0.33114945888519287, 0.17311136424541473, -0.11560457199811935, -0.4489043056964874, 0.2834976315498352, -0.1628742516040802, -0.07646488398313522, -0.4806506037712097, -0.002884246874600649, 0.5638749003410339, -0.2636156380176544, -0.1815182268619...
I used to work in Delphi 6, and got very used to having CodeRush's various helpful IDE additions. Many are now in the IDE itself, or I've managed to replace with something else, but the one feature I REGULARLY find myself wishing I had in Delphi 2007 still, is the ability CodeRush had that added little "connecting line...
[ 0.19167304039001465, -0.08792255818843842, 0.1828887015581131, -0.1387110948562622, -0.04344421252608299, -0.32799938321113586, 0.2680344581604004, -0.09910419583320618, -0.11452863365411758, -0.5078058242797852, 0.0009111503604799509, 0.5049132704734802, -0.3315092623233795, -0.2554299533...
comments below... "I don't think that he meant structural highlighting which works on the source code. He wants "connection lines" between components in the form designer." He also says "as far as I know there is no such tool for Delphi 2005 or newer".. which is a bummer if true. (...and if that IS the case, what's th...
[ 0.1990404576063156, 0.02639288827776909, 0.2552657723426819, -0.1250859498977661, -0.1809641718864441, -0.5280532240867615, 0.270060658454895, -0.10623147338628769, -0.22544604539871216, -0.4459889829158783, -0.08568038791418076, 0.4101669192314148, -0.16361995041370392, 0.0132464105263352...
I am updating some code from the old mysql\_\* functions to PDO. It connects without a problem, runs the query without a problem, but the resultset is empty. PDO::query() is supposed to return a PDOStatement object, yet I am getting true in return. No errors are reported. Here is my code: ``` try { $DB = new PDO...
[ 0.14347626268863678, 0.05001715570688248, 0.6956439018249512, -0.42038238048553467, 0.13364005088806152, 0.13899700343608856, 0.7598726749420166, -0.7194240689277649, -0.11101482063531876, -0.7315049171447754, -0.16417215764522552, 0.6101117134094238, -0.524783730506897, 0.0744736418128013...
I am seeing is: object true ERROR: getClientInfo query failed. Any ideas why it is not returning any results? ``` object true ERROR: getClientInfo query failed. ``` It looks to me like your `PDOStatement $stmt` variable is in fact reported to be an object, not "`true`". The code then prints "`true`" when it see...
[ 0.09439323842525482, 0.21248775720596313, 0.5842995643615723, -0.11130177229642868, -0.1882413774728775, -0.22891055047512054, 0.4302930235862732, -0.23777009546756744, -0.08277145028114319, -0.7400625348091125, 0.08709390461444855, 0.7539306879043579, -0.4253813624382019, 0.23886178433895...
as doesn't have privilege to query that table. Also check [`$stmt->errorInfo()`](http://php.net/manual/en/pdostatement.errorinfo.php) to get more details on any error that occurred.
[ 0.013664904050529003, -0.16781577467918396, 0.27982205152511597, 0.08734727650880814, 0.0954105406999588, 0.015812331810593605, 0.5160183310508728, 0.07968822866678238, -0.3946399688720703, -0.6242353916168213, -0.11880385875701904, 0.5219659805297852, -0.12894207239151, -0.137709215283393...
we have this scenario: A server which contains needed data and client component which these data wants. On the server are stored 2 types of data: - some information - just a couple of strings basically - binary data We have a problem with getting binary data. Both sides are written in Java 5 so we have couple of w...
[ 0.3888235092163086, -0.02476874366402626, -0.09007538855075836, 0.24798117578029633, -0.22011688351631165, -0.12086711823940277, 0.07506424188613892, -0.05158279836177826, 0.02634790539741516, -0.7494272589683533, 0.16908688843250275, 0.6166505813598633, -0.12610548734664917, 0.13232837617...
socket access. You will hit the Out of Memory issues on large files with most other methods. Socket handling is really pretty straight forward in Java, and it will let you stream the data without loading the entire file into memory (which is what happens behind the scenes without your own buffering). Using this s...
[ 0.182239830493927, -0.17032645642757416, -0.09328694641590118, 0.08078398555517197, -0.5265290141105652, -0.06958912312984467, 0.08302552998065948, 0.1388787180185318, -0.27471697330474854, -0.7381817102432251, 0.15719792246818542, 0.6725062727928162, -0.19425494968891144, -0.0654357075691...
I would like to access the visual voicemail files that are stored on an iphone. Are there ways to access these files through the SDK? Does anybody have any experience in working with these files? I am assuming that they are files that are downloaded from the network and stored locally on the iphone. I think the only wa...
[ 0.5273065567016602, 0.18925631046295166, -0.0814136490225792, 0.21886059641838074, 0.06289850175380707, 0.23167650401592255, 0.1324814409017563, 0.19340619444847107, -0.2576446235179901, -0.5944299101829529, 0.1367301642894745, 0.8108938336372375, 0.17190521955490112, -0.13375015556812286,...
you stream the data without loading the entire file into memory (which is what happens behind the scenes without your own buffering). Using this strategy I managed to build a system that allowed for the transfer of arbitrarily large files (I was using a 7+ GB DVD image to test the system) without hitting memory issue...
[ 0.4477306306362152, -0.2916025221347809, 0.019668864086270332, 0.28673622012138367, -0.02473166584968567, -0.37488242983818054, 0.22233033180236816, -0.13523510098457336, -0.1269763708114624, -0.3466408848762512, 0.10063083469867706, 0.6325787901878357, -0.23473425209522247, -0.20346182584...
My problem is thus: I need a way to ensure only one given class can instantiate another. I don't want to have to make the other a nested inner class or something dumb like that. How do I do this? I forget offhand. Make the constructor private. Create a static factory method that takes an instance of the class that is a...
[ 0.11950623989105225, 0.08619054406881332, 0.06767842918634415, 0.06526833027601242, 0.04782264307141304, -0.3404653072357178, 0.18353205919265747, 0.010519019328057766, -0.12659865617752075, -0.4726964831352234, -0.21649567782878876, 0.7053980827331543, -0.6192508935928345, 0.3149228692054...
public setSecureClass( SecureClass secure ) { this.secure = secure; } ... } public class SecureClass { private SecureClass() {} public static void Create( AllowedAccess allowed ) { allowed.setSecureClass( new SecureClass() ); } ... } ``` BTW, I'm suspicious o...
[ 0.12615849077701569, -0.1566602736711502, 0.27777746319770813, -0.015096306800842285, 0.28869491815567017, -0.4504670202732086, 0.41127830743789673, -0.13247939944267273, 0.05934034660458565, -0.675737202167511, -0.3957875370979309, 0.39562731981277466, -0.3321487307548523, 0.1987889856100...
I've created an ASP.Net user control that will get placed more than once inside of web page. In this control I've defined a javascript object such as: ``` function MyObject( options ) { this.x = options.x; } MyObject.prototype.someFunction=function someFunctionF() { return this.x + 1; } ``` In the code behind I...
[ -0.08315480500459671, -0.11161347478628159, 0.40389153361320496, -0.10977527499198914, 0.11304352432489395, 0.13658195734024048, 0.04407691955566406, 0.11547291278839111, -0.06221939995884895, -0.8414089679718018, 0.015369611792266369, 0.37864378094673157, -0.40936198830604553, 0.029796820...
myObject will be repeated and only the last instance will matter. Surely there's a way to make the var myObject unique using some concept I've haven't run across yet. Ideas? Thanks, Craig Your Javascript like this:- ``` function MyObject(options) { this.x = options.x; } MyObject.prototype.someFunction = function() {...
[ -0.023529846221208572, -0.031051861122250557, 0.35287249088287354, 0.03943502902984619, 0.10213230550289154, -0.08644813299179077, 0.4008035361766815, 0.2531411945819855, -0.220395028591156, -0.8235039710998535, 0.13679513335227966, 0.5215998888015747, -0.3778165280818939, 0.25102984905242...
identifier is added to the global namespace, regardless of how many instances of your control are added to the page.
[ 0.13408176600933075, -0.03644634410738945, 0.5072893500328064, 0.4209204316139221, 0.14339493215084076, -0.10752349346876144, -0.20570115745067596, 0.014111586846411228, -0.2638944089412689, -0.7965384721755981, -0.2565042972564697, -0.14517666399478912, -0.34259435534477234, 0.21019345521...
Yes, another NULL vs empty string question. I agree with the idea that NULL means not set, while empty string means "a value that is empty". Here's my problem: If the default value for a column is NULL, how do I allow the user to enter that NULL. Let's say a new user is created on a system. There is a first and last ...
[ -0.14601844549179077, -0.114615797996521, 0.1821376532316208, 0.017063431441783905, -0.0459740087389946, 0.2264186590909958, 0.18249264359474182, 0.14975936710834503, -0.10497704893350601, -0.6640517711639404, -0.08746890723705292, 0.3623516261577606, -0.3650912046432495, 0.322030544281005...
The first name is technically not set. During the insert I check the length of each field, setting all fields that are empty to NULL. When looking at the database, I see that the first name is not set. The question that immediately comes to mind is that maybe they never saw the first name field (ie, because of an erro...
[ 0.2507011294364929, -0.07352939248085022, -0.10365154594182968, 0.05668416991829872, -0.014608971774578094, -0.22023965418338776, -0.08310707658529282, -0.014818691648542881, -0.09967994689941406, -0.45824527740478516, -0.15107384324073792, 0.37055492401123047, -0.3686809241771698, 0.22933...
wants the field to be not set without detecting focus or if they deleted a value...or...or...? Related Question: [Should I use NULL or an empty string to represent no data in table column?](https://stackoverflow.com/questions/167952/null-or-empty-string-to-represent-no-data-in-table-column) I almost never use NULL whe...
[ 0.11969541013240814, 0.27764272689819336, 0.1767643541097641, -0.02443913370370865, 0.27522385120391846, -0.25100448727607727, 0.22544299066066742, 0.19451232254505157, -0.3561847507953644, -0.18665222823619843, -0.2186303734779358, 0.24650830030441284, -0.13120095431804657, 0.235659375786...
in that field. As for getting them to actually enter a null value, for the values that truly require a null value, I would put a checkbox next to the input field so that the user can check it on and off to see the corresponding value to null (or in a more user friendly manner, none). When enabling the checkbox to set t...
[ 0.15008556842803955, 0.2172195464372635, 0.10448894649744034, -0.06580043584108353, 0.13412562012672424, -0.15485724806785583, 0.5505582094192505, 0.11251424998044968, -0.11187409609556198, -0.48463794589042664, -0.5085436105728149, 0.6442661881446838, -0.3389405608177185, -0.0782953649759...
I have a query to insert a row into a table, which has a field called ID, which is populated using an AUTO\_INCREMENT on the column. I need to get this value for the next bit of functionality, but when I run the following, it always returns 0 even though the actual value is not 0: ``` MySqlCommand comm = connect.Creat...
[ -0.033598899841308594, 0.12787598371505737, 0.8247474431991577, -0.19493812322616577, 0.2987578213214874, 0.11641565710306168, 0.15001782774925232, -0.3311662971973419, -0.08262497931718826, -0.62388676404953, -0.13984885811805725, 0.6386440992355347, -0.19427551329135895, 0.28202128410339...
column, but it just returns 0 every time. Any ideas? **EDIT:** When I run: ``` "INSERT INTO INVOICE (INVOICE_DATE, BOOK_FEE, ADMIN_FEE, TOTAL_FEE, CUSTOMER_ID) VALUES ('2009:01:01 10:21:12', 50, 7, 57, 2134);last_insert_id();" ``` I get: ``` {"You have an error in your SQL syntax; check the manual that correspond...
[ -0.03693541884422302, 0.06285874545574188, 0.8057805299758911, -0.19392050802707672, 0.33950015902519226, 0.09890154749155045, 0.2528969347476959, -0.03693108260631561, -0.0393814854323864, -0.6194425225257874, -0.24303483963012695, 0.8019885420799255, -0.19750387966632843, 0.0552579313516...
" + customerID + ");"; + "select last_insert_id();" int id = Convert.ToInt32(comm.ExecuteScalar()); ``` --- **Edit:** As duffymo mentioned, you really would be well served using parameterized queries [like this](http://weblogs.asp.net/cumpsd/archive/2004/04/05/107456.aspx). --- **Edit:** Until you switch ove...
[ -0.3548486530780792, -0.0472661592066288, 0.7566680312156677, -0.47466781735420227, 0.03975442051887512, 0.2909313142299652, 0.14001667499542236, 0.05215293541550636, -0.019652262330055237, -0.3443627953529358, -0.10391459614038467, 0.5834663510322571, -0.20135991275310516, -0.038153320550...
With CPUs being increasingly faster, hard disks spinning, bits flying around so quickly, network speeds increasing as well, it's not that simple to tell bad code from good code like it used to be. I remember a time when you could optimize a piece of code and undeniably perceive an improvement in performance. Those day...
[ 0.5308508276939392, 0.12291594594717026, -0.22713719308376312, 0.35427603125572205, 0.12511998414993286, -0.26161691546440125, 0.5330624580383301, 0.14941640198230743, -0.2855454981327057, -0.36899855732917786, 0.25139763951301575, 0.49463433027267456, -0.37614116072654724, 0.3909296393394...
even further without some tool? Some may argue that a couple of nanoseconds won't really make that big a difference these days. The truth is, we are stuck with so many layers that you get a staggering effect. I'm not saying we should optimize every little millisecond out of our code as that will be expensive and unfe...
[ 0.7695819139480591, 0.10719823837280273, -0.19001427292823792, 0.42735809087753296, -0.007193308789283037, -0.04791412502527237, 0.4611033797264099, 0.1739577203989029, -0.30448830127716064, -0.761878490447998, -0.1049925833940506, 0.5601987242698669, 0.5712366700172424, -0.129558622837066...
code. They aren't exactly separate from each other either, but "fast" code doesn't mean "good". Often times, "fast" actually means bad code because readability compromises must be made to make it fast. The way I look at it, [hardware is cheap, programmers are expensive](http://www.codinghorror.com/blog/archives/001198...
[ 0.3623462915420532, 0.25582900643348694, -0.21763236820697784, 0.6023836135864258, 0.11613357067108154, -0.11127828061580658, 0.3957419991493225, 0.2303808629512787, -0.3192066252231598, -0.6660737991333008, -0.17079485952854156, 0.5356316566467285, -0.08227430284023285, -0.227190181612968...
but you can't figure out why, I'd use a profiler like [ANT](http://www.red-gate.com/Products/ants_profiler/index.htm), or [dotTrace](http://www.jetbrains.com/profiler/) if you're in the .NET world (I'm sure there are others out there for other platforms & languages). They're pretty useful, but I've only ever had one si...
[ 0.3484947085380554, -0.224225714802742, 0.2485562413930893, 0.06863968819379807, 0.0008164309547282755, -0.037308186292648315, 0.07415658235549927, 0.0803423598408699, -0.45390817523002625, -0.9012876152992249, 0.28758296370506287, 0.49484553933143616, -0.22823169827461243, -0.240822046995...
If there is a REST resource that I want to monitor for changes or modifications from other clients, what is the best (and most RESTful) way of doing so? One idea I've had for doing so is by providing specific resources that will keep the connection open rather than returning immediately if the resource does not (yet) ...
[ -0.001811062335036695, -0.12848059833049774, 0.4208257794380188, -0.17800533771514893, 0.3861125707626343, -0.08490912616252899, 0.015993822365999222, 0.07229645550251007, -0.3766820728778839, -0.740842878818512, 0.06251309812068939, 0.48669594526290894, -0.09912950545549393, 0.07924502342...
attempt to retrieve the next move: ``` /game/17/move/5 ``` In a "normal" REST model, it seems a GET request for this URL would return a 404 (not found) error. However, if instead, the server kept the connection open until my opponent played his move, i.e.: ``` PUT /game/17/move/5 ``` then the server could return ...
[ -0.017709404230117798, 0.04279102757573128, 0.4404863119125366, 0.03889814764261246, 0.2385319173336029, -0.014183830469846725, 0.2959301769733429, -0.17620228230953217, -0.15832674503326416, -0.4080278277397156, -0.16582730412483215, 0.3910398781299591, -0.33925682306289673, 0.06701672822...
polling](https://stackoverflow.com/questions/333664/simple-long-polling-example-code), which could work really well. You would request `/game/17/move/5` and the server will not send any data, until move 5 has been completed. If the connection drops, or you get a time-out, you simply reconnect until you get a valid res...
[ -0.06259265542030334, -0.20348697900772095, 0.47329163551330566, 0.1556934267282486, -0.29244810342788696, 0.1466028392314911, -0.29270610213279724, -0.736406683921814, -0.05876548960804939, -0.37741783261299133, 0.3479320704936981, 0.28583794832229614, -0.24987415969371796, -0.14211288094...
issue with long polling is each "poll" ties up a server thread, which quickly breaks servers like Apache (as it runs out of worker-threads, so can't accept other requests). You need a specialised web-server to serve the long-polling requests.. The Python module [`twisted`](http://twistedmatrix.com/trac/) (an "an event-...
[ 0.23221443593502045, -0.3807762563228607, 0.24352115392684937, 0.3787974417209625, -0.39202600717544556, -0.10947026312351227, -0.07368961721658707, -0.21927425265312195, -0.07681109756231308, -0.1567276567220688, 0.23199275135993958, 0.16056618094444275, -0.3531173765659332, 0.05489137023...
exactly this problem (for Tomcat)
[ -0.24450191855430603, -0.021271398290991783, 0.266607403755188, 0.24237817525863647, 0.2228940725326538, 0.11172208935022354, 0.21250084042549133, -0.0635683685541153, -0.43197494745254517, -0.0678887590765953, -0.09406176209449768, 0.6784219145774841, -0.3392530083656311, -0.2309986501932...
Is there any way to have a 'Resizable' panel in GWT. By resizable I mean that if you you drag on the edge of Panel it can be resized accordingly. Figured it out myself, here is an example: ```java public class DraggablePanel extends VerticalPanel { private boolean isBeingDragged = false; private boolean isBei...
[ 0.002207354176789522, -0.3331526219844818, 0.7294032573699951, -0.18748563528060913, -0.038424838334321976, 0.3501030504703522, -0.015810832381248474, -0.28392916917800903, -0.4111173450946808, -0.7158089876174927, -0.19524647295475006, 0.5289273262023926, -0.2694920301437378, 0.0934889540...
DOM.sinkEvents(getElement(), Event.ONMOUSEDOWN | Event.ONMOUSEMOVE | Event.ONMOUSEUP | Event.ONMOUSEOVER); } @Override public void onBrowserEvent(Event event) { final int eventType = DOM.eventGetType(event); if (Event.ONMOUSEOVER == eventType) { if (isCursorResiz...
[ -0.3648357093334198, -0.4301936626434326, 0.5802444815635681, -0.23488950729370117, 0.37266868352890015, -0.05058532953262329, 0.5440587401390076, -0.467852383852005, 0.07646359503269196, -0.4856116473674774, -0.5824097394943237, 0.8621851205825806, -0.1585460752248764, 0.487161248922348, ...
} else if (isCursorMove(event)) { getElement().getStyle().setProperty("cursor", "move"); } else { getElement().getStyle().setProperty("cursor", "default"); } } if (Event.ONMOUSEDOWN == eventType) {
[ -0.35557833313941956, -0.503829836845398, 0.4233861267566681, -0.24862292408943176, 0.36868855357170105, 0.02360132336616516, 0.16683940589427948, -0.2984697222709656, -0.20912890136241913, -0.14876395463943481, -0.6135870814323425, 0.7878562808036804, -0.33844059705734253, -0.020847596228...
if (isCursorResize(event)) { if (!isBeingDragged) { isBeingDragged = true; DOM.setCapture(getElement()); } } else if
[ -0.23689663410186768, -0.39479753375053406, 0.5590881705284119, -0.3058905005455017, 0.2854148745536804, -0.33627018332481384, 0.46909475326538086, -0.4860325753688812, -0.037365175783634186, -0.23725663125514984, -0.49321115016937256, 0.8459581136703491, -0.1685262769460678, 0.01094582770...
(isCursorMove(event)) { DOM.setCapture(getElement()); isBeingMoved = true; } } else if (Event.ONMOUSEMOVE == eventType) { if (!isCursorResize(event) && !isCursorMove(event)) { getElement().getStyle().setProperty("cursor", "default");
[ -0.38407397270202637, -0.4023762047290802, 0.8832621574401855, -0.2983139455318451, 0.36322924494743347, -0.1325320303440094, 0.3053409159183502, -0.4214928448200226, -0.06525859236717224, -0.26782432198524475, -0.709595263004303, 0.9633298516273499, -0.24330218136310577, 0.181139513850212...
} if (isBeingDragged) { int currentY = event.getClientY(); int originalY = getElement().getAbsoluteTop(); if (currentY > originalY) { Integer height
[ -0.016135262325406075, -0.6617885231971741, 0.6739342212677002, -0.006544569972902536, 0.26761552691459656, 0.04101922735571861, 0.27034643292427063, -0.24589605629444122, -0.29915550351142883, -0.08156317472457886, -0.3363974094390869, 0.4834427833557129, 0.02482045628130436, 0.1596664637...
= currentY - originalY; this.setHeight(height + "px"); } } else if (isBeingMoved) { RootPanel.get().setWidgetPosition(this, event.getClientX(), event.getClientY());
[ -0.055772118270397186, -0.5359127521514893, 0.548602819442749, -0.19473771750926971, 0.5695668458938599, 0.06309527903795242, 0.2256762832403183, -0.22235329449176788, -0.2223028689622879, -0.30490249395370483, -0.3235311210155487, 0.3302583694458008, -0.15486948192119598, 0.17502395808696...
} } else if (Event.ONMOUSEUP == eventType) { if (isBeingMoved) { isBeingMoved = false; DOM.releaseCapture(getElement()); } if (isBeingDragged) {
[ -0.28909987211227417, -0.2837522625923157, 0.5337466597557068, -0.2807041108608246, 0.41014564037323, -0.20326727628707886, 0.4761018455028534, -0.42998412251472473, -0.09782356023788452, -0.23327742516994476, -0.43913766741752625, 0.8546484708786011, -0.19542540609836578, 0.22865287959575...
isBeingDragged = false; DOM.releaseCapture(getElement()); } } } protected boolean isCursorResize(Event event) { int cursor = event.getClientY(); int initial = getAbsoluteTop(); int height = getOffsetHeight();
[ -0.3879791796207428, -0.41511309146881104, 0.5976654291152954, -0.25097477436065674, 0.22346659004688263, -0.17058201134204865, 0.3405707776546478, -0.3009317219257355, -0.19161838293075562, -0.3476302921772003, -0.5998878479003906, 0.6439619660377502, -0.17600908875465393, 0.0039718849584...
return initial + height - 20 < cursor && cursor <= initial + height; } protected boolean isCursorMove(Event event) { int cursor = event.getClientY(); int initial = movingPanelElement.getAbsoluteTop(); int height = movingPanelElement.getOffsetHeight(); return initial <= cursor &&...
[ -0.6539744734764099, -0.28680580854415894, 0.7575044631958008, -0.1313907653093338, 0.3014930784702301, 0.08356792479753494, -0.03845210000872612, -0.26510173082351685, -0.4735647141933441, -0.39691057801246643, -0.5944923162460327, 0.5039100646972656, -0.12109013646841049, -0.052472349256...
I'm trying to configure an installer for some software we use within the company. The installer is pushed out to target machines via SMS, and it performs the following steps: 1. Terminate any currently running instances of the app (the app is a utility, so this isn't an impact on the user). 2. Remove the previous ver...
[ 0.26016995310783386, 0.06124192848801613, 0.5533803105354309, -0.21707698702812195, 0.1642710268497467, 0.0540575310587883, 0.49932336807250977, -0.12775912880897522, -0.15186701714992523, -0.34004104137420654, -0.5069639086723328, 0.6693264842033386, -0.46057745814323425, -0.0144438473507...
Execute="commit" ExeCommand="acm" /> ``` And in the `InstallExecuteSequence` element I have the following: ``` <Custom Action="Relaunch" OnExit="success" /> ``` However when we try this, either as a SMS job or executing as an administrator nothing happens (e.g. the app isn't relaunched). Any suggestions? If you'r...
[ 0.08553243428468704, -0.06044941022992134, 0.5388877987861633, -0.2174815833568573, 0.0893043801188469, -0.24785564839839935, 0.4719580113887787, -0.3110903799533844, -0.25259459018707275, -0.5523728132247925, -0.22710300981998444, 0.9369382858276367, -0.3956383466720581, -0.43468362092971...
a reduce anyway, because reduce will have the same overhead copying the items into the list that's being extended. `chain` will only incur this (same) overhead if you run `list(chain)` at the end. **Meta-Edit:** Actually, it's less overhead than the question's proposed solution, because you throw away the temporary li...
[ -0.1133468896150589, -0.19192099571228027, 0.4020817279815674, -0.12857617437839508, -0.05639221519231796, 0.08591042459011078, 0.17042310535907745, -0.4970313608646393, -0.17688268423080444, -0.5681312680244446, -0.10913463681936264, 0.4998905062675476, -0.1956510692834854, -0.12872749567...
I would like to find out what is the most significant differences of MS Visual Studio.NET 2005 Pro and MS Visual Studio.NET 2008 Pro? I was given a copy of Visual Studio.NET 2005 Pro as the previous person who used that has left the organisation. Therefore, I am considering upgrading this version to VS.NET 2008 Pro. A...
[ 0.09827245026826859, 0.11592167615890503, 0.38473016023635864, -0.29997381567955017, -0.5733233690261841, 0.18804961442947388, 0.2660762071609497, -0.1167965829372406, -0.0018452946096658707, -0.534262478351593, 0.1330469250679016, 0.8728381395339966, -0.27107346057891846, -0.0427804775536...
of a loss.. Therefore could I get some feedback from the stackoverflow crowd on those who have experienced the differences between those two versions? If it's not too much to ask, could you please post the top three or five reasons to use VS.NET 2008 Pro? Thanks! I wrote a list but decided to erase it all; why should...
[ 0.24069292843341827, 0.12925991415977478, -0.1704917848110199, -0.07167678326368332, -0.4116716682910919, -0.04625948145985603, 0.33966878056526184, -0.09740650653839111, -0.07595726102590561, -0.19274373352527618, 0.17005926370620728, 0.8503834009170532, -0.38099509477615356, -0.080831125...
Am working on web based Job search application using Lucene.User on my site can search for jobs which are within a radius of 100 miles from say "Boston,MA" or any other location. Also, I need to show the search results sorted by "relevance"(ie. Score returned by lucene) in descending order. I'm using a 3rd party API t...
[ 0.18898992240428925, 0.1465928852558136, 0.8326778411865234, 0.034536514431238174, 0.18349148333072662, 0.16097591817378998, 0.35185229778289795, 0.09365157037973404, -0.13709184527397156, -1.0903692245483398, -0.038582805544137955, 0.06178699806332588, 0.04365881532430649, 0.4947571158409...
above API.It contains 864 cities with CityName ass key and StateCode as value. And finalQuery is a Lucene BooleanQuery object which contains other search criteria entered by the user like:skills,keywords,etc. ``` foreach (string city in nearestCities.Keys) { BooleanQuery tempFinalQuery = finalQuery; citySt...
[ 0.15832023322582245, -0.14582709968090057, 0.9574624300003052, 0.19404450058937073, -0.13537001609802246, 0.3876843750476837, 0.14940254390239716, -0.13408620655536652, 0.050769880414009094, -0.7288060188293457, -0.3061944246292114, 0.088736891746521, -0.2612152397632599, 0.327113091945648...
within 100 miles radius.: ``` searcher.Search(finalQuery, collector); ``` I found out this BuildNearestCitiesQuery method takes a whopping 29 seconds on an average to execute which obviously is unacceptable by any standards of a website.I also found out that the statements involving "Parse" take a considerable amoun...
[ 0.22924034297466278, 0.0706087052822113, 0.6390072107315063, 0.2425522655248642, 0.07796555012464523, -0.03559674695134163, 0.6142194271087646, -0.13800622522830963, -0.0638183131814003, -0.7440199851989746, 0.04306038096547127, 0.42326676845550537, -0.05801907926797867, 0.0298942700028419...
that matter my whole approach/algorithm towards finding all jobs within 100 miles using Lucene? FYI,here is how my indexing in Lucene looks like: ``` doc.Add(new Field("jobId", job.JobID.ToString().Trim(), Field.Store.YES, Field.Index.UN_TOKENIZED)); doc.Add(new Field("title", job.JobTitle.Trim(), Field.Store.YES, F...
[ 0.28912410140037537, 0.15154340863227844, 0.8894395232200623, 0.07530242204666138, 0.1160716712474823, 0.26723942160606384, -0.08850932866334915, -0.07078594714403152, 0.09513719379901886, -0.7617955207824707, -0.42311957478523254, 0.4148450791835785, 0.1235743910074234, -0.043503217399120...
to geospatial search a filter approach might be more appropriate. Maybe this link can give you some ideas - <http://sujitpal.blogspot.com/2008/02/spatial-search-with-lucene.html> Maybe you can use *Filter*s for other parts of your query as well. To be honest your query looks quite complex. --Hardy
[ 0.05232594162225723, -0.31282472610473633, 0.15561439096927643, 0.3587321639060974, -0.25939828157424927, -0.056247834116220474, -0.10135094076395035, -0.010480203665792942, -0.23401287198066711, -0.5864473581314087, -0.11368787288665771, 0.24513185024261475, -0.20216798782348633, 0.198713...
A long time ago I had the following directory structure in my SVN repository ``` trunk/ data/ levels/ 1.level 2.level ... ... ... ``` But I deleted the 'levels' directory long ago. Now I want to add a single text file called 'levels' to the 'data' directory...
[ 0.26526129245758057, 0.1455610692501068, 0.7138187289237976, 0.31394508481025696, 0.2308429777622223, -0.1407981812953949, -0.07149364799261093, 0.10133413970470428, -0.15491464734077454, -0.6420828104019165, 0.09941428899765015, 0.4657788872718811, -0.08618257194757462, 0.3847563862800598...
like this: ``` trunk/ data/ levels ... ... ``` Now when I try to add the file 'levels', I get this message: ``` $ svn add data/levels svn: Can't replace 'data/levels' with a node of a differing type; the deletion m ust be committed and the parent updated before adding 'data/levels' ``` How...
[ 0.19160158932209015, 0.0676136463880539, 0.6474315524101257, 0.24687089025974274, 0.18790408968925476, -0.3174302279949188, 0.18271516263484955, 0.06025438383221626, -0.4961177706718445, -0.6730139851570129, -0.3148406445980072, 0.611549437046051, -0.3148864805698395, 0.2888883650302887, ...
How would one modify the following snippet (in a tableView:cellForRowAtIndexPath: UITableViewController method) from the "09a - PrefsTable" recipe from Chapter 6 of The iPhone Developer's Cookbook: ``` if (row == 1) { // Create a big word-wrapped UILabel cell = [tableView dequeueReusableCellWithIdentifier:@"...
[ -0.16706286370754242, -0.17157040536403656, 0.7049040198326111, -0.05931951478123665, 0.3278394043445587, 0.012658307328820229, 0.41224321722984314, -0.3860953152179718, -0.14432890713214874, -0.6937101483345032, -0.49255725741386414, 0.18028345704078674, -0.20132388174533844, -0.123327009...
sv.text =  @"When in the Course of human events, it becomes necessary for one people to dissolve the political bands which have connected them with another, and to assume among the powers of the earth, the separate and equal station to which the Laws of Nature and of Nature's God entitle them, a decent respect to the o...
[ -0.05722171440720558, -0.2924402952194214, 0.7059434056282043, 0.11869596689939499, -0.05803393945097923, 0.20612449944019318, 0.5154800415039062, -0.09345123916864395, -0.0851387158036232, -0.36209508776664734, -0.7904832363128662, 0.10047505050897598, -0.19259078800678253, 0.014965060167...
return cell; } ``` ...to size the "sv" UILabel subview and the "cell" UITableViewCell to be sized just big enough to fit the text (and work with more or less text, and other types of text alignment)?  I looked at the UILabel textRectForBounds:limitedToNumberOfLines: method, but the documentation states that it shou...
[ -0.061834916472435, -0.07344263046979904, 0.7770348787307739, -0.2915477752685547, -0.019405189901590347, -0.14028829336166382, 0.19754911959171295, -0.5279747247695923, -0.43912091851234436, -0.42630735039711, -0.231313556432724, 0.5584136843681335, -0.3125888407230377, 0.1099008545279502...
UILabel (BPExtensions) - (void)sizeToFitFixedWidth:(CGFloat)fixedWidth { self.frame = CGRectMake(self.frame.origin.x, self.frame.origin.y, fixedWidth, 0); self.lineBreakMode = NSLineBreakByWordWrapping; self.numberOfLines = 0; [self sizeToFit]; } @end ``` then to have a label to have a variable multi...
[ -0.1720544993877411, -0.1260109841823578, 0.8686298727989197, 0.06858094781637192, 0.08649703860282898, 0.06602241843938828, 0.2046031355857849, -0.30287060141563416, -0.3172525465488434, -0.5187332034111023, -0.31850719451904297, 0.3825598359107971, -0.08994173258543015, 0.354044198989868...
I know it's possible to match a word and then reverse the matches using other tools (e.g. `grep -v`). However, is it possible to match lines that do not contain a specific word, e.g. `hede`, using a regular expression? ##### Input: ``` hoho hihi haha hede ``` ##### Code: ``` grep "<Regex for 'doesn't contain hede'...
[ 0.23643140494823456, 0.0621720589697361, 0.27329397201538086, 0.1485886126756668, -0.38199999928474426, -0.1579286903142929, 0.48788151144981384, -0.18289928138256073, 0.2455441653728485, -0.5548954010009766, -0.14761169254779816, 0.2963813841342926, -0.1965819001197815, 0.0247930120676755...
but still, it *is* possible. And if you need to match line break chars as well, use the [DOT-ALL modifier](http://perldoc.perl.org/perlre.html#Modifiers) (the trailing `s` in the following pattern): ``` /^((?!hede).)*$/s ``` or use it inline: ``` /(?s)^((?!hede).)*$/ ``` *(where the `/.../` are the regex delimit...
[ -0.09926554560661316, -0.10394633561372757, 0.26608532667160034, -0.08500123023986816, -0.12971800565719604, 0.22750544548034668, 0.3361216187477112, -0.18521875143051147, -0.14643867313861847, -0.5285153985023499, -0.2584450840950012, 0.41575121879577637, -0.41531437635421753, -0.08535353...
h │e4│ e │e5│ d │e6│ e │e7│ C │e8│ D │e9│ └──┴───┴──┴───┴──┴───┴──┴───┴──┴───┴──┴───┴──┴───┴──┴───┴──┘ index 0 1 2 3 4 5 6 7 ``` where the `e`'s are the empty strings. The regex `(?!hede).` looks ahead to see if there's no substring `"hede"` to be seen, and if that is the ca...
[ -0.15338966250419617, 0.09273554384708405, 0.5806875824928284, -0.10053841024637222, 0.0001315294939558953, 0.11535952240228653, 0.2729136645793915, -0.6547444462776184, 0.18146230280399323, -0.27572768926620483, -0.2856012284755707, 0.39674368500709534, -0.40328577160835266, 0.18063928186...
any character except a line break. Look-arounds are also called *zero-width-assertions* because they don't *consume* any characters. They only assert/validate something. So, in my example, every empty string is first validated to see if there's no `"hede"` up ahead, before a character is consumed by the `.` (dot). The...
[ -0.3335120975971222, 0.07545366138219833, 0.2539450228214264, -0.17571252584457397, -0.28343871235847473, 0.140570268034935, 0.2508915960788727, -0.23198023438453674, -0.10628247261047363, -0.3829101622104645, -0.5635138750076294, 0.369710236787796, -0.2983441948890686, 0.01788627728819847...
(there *is* `"hede"` up ahead!).
[ 0.12859222292900085, 0.4904252886772156, 0.5186721682548523, -0.343774676322937, -0.0481005534529686, -0.10457085072994232, 0.49837860465049744, 0.20469766855239868, -0.26518309116363525, -0.4667550325393677, -0.3187553584575653, 0.08911313116550446, 0.3908725380897522, 0.1127065047621727,...
There are parameters that I would not want to be transferred from production environment to QA system. Staff like network path and url's. The problem is that in ABAP everything is in the database and when the database is copied to the QA system you have to manually change those parameters. And this is prone to errors. ...
[ 0.5034008622169495, 0.10688053071498871, -0.12678493559360504, 0.22296960651874542, -0.05218767374753952, 0.14805716276168823, 0.07354701310396194, -0.0368451327085495, -0.1185339093208313, -0.583238959312439, 0.11562198400497437, 0.7227401733398438, -0.2023720145225525, 0.2142044752836227...
production environment (which is the usual path), there are quite a few steps to do to make the system work correctly. This includes some configuration, which can be as simple as filepaths such as you mention, but also the addresses and names of "partner systems". For example, one of my customers is a bank, so when cop...
[ 0.8596843481063843, 0.158930242061615, -0.004088853485882282, -0.01742899790406227, 0.23371358215808868, 0.1041528508067131, 0.1313280165195465, 0.22625558078289032, -0.21822255849838257, -0.6704806685447693, 0.10453074425458908, 0.5667802691459656, -0.3635826110839844, 0.05865963920950889...
few ways to make applying these changes as easy as possible (look for some SAP documentation or books on SAP Transport and Change management, I had one by Sue McFarland Metzger or so that was quite good). From what I've seen, there is usually a set of transports that change the configuration and customizing etc. on the...
[ 0.3493160605430603, -0.0561707429587841, -0.21980692446231842, 0.060911670327186584, 0.03721325471997261, 0.081810861825943, 0.1768130660057068, 0.07241935282945633, -0.4389292299747467, -0.49601492285728455, 0.28225016593933105, 0.3847557306289673, 0.01848766766488552, -0.314540296792984,...
The problem I'm having with writing a web application architecture is that I want separate components that work together. By this I simply mean, for example, a navigation bar and the actual page content (as well as a header, which is static) in ASP.NET. Now, here's where it gets interesting: * There are no two pages ...
[ 0.5093687772750854, 0.4161859452724457, 0.24783314764499664, 0.008435726165771484, -0.103692427277565, -0.24662165343761444, 0.22736242413520813, 0.030598726123571396, -0.3983739912509918, -0.8925595283508301, -0.03183024004101753, 0.3143021762371063, -0.13097640872001648, 0.00729022454470...
i.e. excluding your <html> tags then Visual Studio will end up underlining everything as incorrect. The way is this application is currently being dealt with is using frames (yes, frames) to keep everything separate, but working together. I want to move away from this, although the web system is very large, and very i...
[ 0.4535636603832245, -0.14791351556777954, 0.2658434510231018, 0.20527076721191406, -0.11726250499486923, -0.37543752789497375, 0.29947513341903687, -0.37031659483909607, -0.37494975328445435, -0.6307584047317505, -0.042307399213314056, 0.5113328099250793, -0.28015878796577454, -0.226562276...
I wanted to set some handler for all the unexpected exceptions that I might not have caught inside my code. In `Program.Main()` I used the following code: ``` AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(ErrorHandler.HandleException); ``` But it didn't work as I expected. When...
[ -0.21014763414859772, -0.025270069018006325, 0.07271206378936768, -0.21683953702449799, -0.007867545820772648, 0.026635661721229553, 0.4645961821079254, -0.06668873876333237, -0.18869994580745697, -0.5303171873092651, -0.07590235769748688, 0.5521241426467896, -0.732178270816803, 0.18437127...
and then the application closes nicely. Is there any other way to do it or am I using the code above in the wrong way? It's because you're running it through Visual Studio in Debug mode. If you release and install your app somewhere else, nothing but your global exception handler will be processed.
[ 0.14497004449367523, 0.3721993565559387, 0.6121841073036194, -0.12650850415229797, 0.26898109912872314, -0.17179903388023376, 0.49638473987579346, 0.1879984438419342, -0.1972288191318512, -0.5580763816833496, -0.37704798579216003, 0.3985476493835449, -0.07961317896842957, 0.452315479516983...
Where can I find a Visual Studio plug-in that automatically generates documentation header for methods and properties? Example the comment to a property could look like this: ``` /// <summary> /// Gets or sets the value of message /// </summary> public static string Message { get { return message...
[ 0.33858925104141235, 0.1969788521528244, 0.24303150177001953, 0.08707380294799805, -0.05686694383621216, -0.2095029503107071, 0.4876365065574646, -0.3042739927768707, -0.2787505090236664, -0.32384875416755676, -0.09328801184892654, 0.5313923358917236, -0.2551913857460022, -0.06594569236040...
So, I am writing some sort of a statistics program (actually I am redesigning it to something more elegant) and I thought I should use a language that was created for that kind of stuff (dealing with huge data of stats, connections between them and some sort of genetic/neural programming). To tell you the truth, I ju...
[ 0.050369683653116226, 0.27581652998924255, -0.1210913211107254, 0.057251475751399994, -0.18473494052886963, -0.1962386965751648, 0.25736361742019653, 0.4925172030925751, -0.28887465596199036, -0.5716816186904907, 0.11116591840982437, 0.4308146834373474, -0.2661193609237671, -0.323900759220...
- yet :D). I also checked Prolog and it seems a pretty cool language (easy to do relations between data and easier than Lisp) but I'd like to hear what you think. Thx Edit: I always confuse common lisp with Smalltalk. Sorry for putting these two langs together. Also what I meant by "*other people that are fond of th...
[ -0.0010684434091672301, -0.11590667814016342, 0.17160160839557648, 0.32829809188842773, -0.2270597368478775, -0.3300904929637909, 0.2784968912601471, 0.26999467611312866, -0.3026270568370819, -0.3591318428516388, 0.002709984080865979, 0.5128065347671509, -0.02631499245762825, -0.2889221012...
any particular reason not to use [R?](http://www.r-project.org) It's sort of a build vs. buy (or in this case download) decision. If you're doing a statistical computation, R has [many packages](http://cran.cnr.berkeley.edu/) off the shelf. These include many libraries and interfaces for various types of data sources. ...
[ 0.4346412420272827, 0.008455074392259121, -0.16791976988315582, 0.21515867114067078, 0.021706517785787582, -0.007677114102989435, 0.057391244918107986, -0.5123921036720276, -0.3777833580970764, -0.2766231298446655, -0.1544666886329651, 0.643973171710968, -0.277185320854187, -0.081099301576...
got your heart set on learning another language, by all means, do it. There are several good free (some as in speech, some as in beer) implementations of [Smalltalk,](http://www.smalltalk.org/versions) [Prolog](http://kti.mff.cuni.cz/~bartak/prolog/implementations.html) and [LISP.](http://en.wikipedia.org/wiki/Common_L...
[ 0.33565813302993774, 0.21786390244960785, -0.01975100114941597, -0.04905371740460396, -0.04707544669508934, -0.003397718071937561, 0.4243117570877075, -0.040604062378406525, -0.4693153202533722, -0.2726566791534424, -0.11727798730134964, 0.7489916682243347, -0.318043977022171, -0.479200273...
for writing automation scripts on AutoCAD.
[ -0.18431347608566284, -0.05990933999419212, -0.061620380729436874, 0.3575126528739929, 0.23405048251152039, -0.04545297846198082, -0.18195566534996033, -0.071312315762043, -0.06751284003257751, -0.6395216584205627, -0.14756780862808228, 0.5444821715354919, -0.14066606760025024, -0.53933411...
I haven't used a statically typed language in many years and have set myself the task of getting up to speed with C#. I'm using my usual trick of following the fifteen exercises here <http://www.jobsnake.com/seek/articles/index.cgi?openarticle&8533> as my first task. I've just finished the second Fibonacci task which ...
[ 0.18873120844364166, -0.04513192176818848, 0.22151334583759308, 0.0749005451798439, 0.0018277064664289355, 0.19573992490768433, 0.329881876707077, 0.11221232265233994, -0.35301458835601807, -0.8109031915664673, -0.0851290225982666, 0.5935333371162415, 0.09280149638652802, -0.31141430139541...
posting here will be the next best thing. So to all the C# Jedi's out there, if you were going to refactor the code below, what would it look like? ``` using System; using System.Collections; namespace Exercises { class MainClass { public static void Main(string[] args) { Console....
[ -0.0637945830821991, -0.32256442308425903, 0.551347017288208, -0.032930001616477966, 0.230601504445076, -0.033465661108493805, 0.19180580973625183, -0.10720214992761612, -0.03531821444630623, -0.6797844767570496, -0.38993045687675476, 0.6485205888748169, -0.3786834180355072, 0.287459045648...
Console.WriteLine("And:"); int to = Convert.ToInt32(Console.ReadLine()); Fibonacci fibonacci = new Fibonacci(); fibonacci.PrintArrayList(fibonacci.Between(from, to)); } } class Fibonacci { public ArrayList Between(int from, int to) {
[ -0.0015069317305460572, -0.3940699100494385, 0.6398734450340271, -0.3268081545829773, 0.6293795108795166, 0.26231348514556885, -0.006263419054448605, -0.5088810920715332, -0.1899404376745224, -0.6039141416549683, -0.24391810595989227, 0.4477066993713379, -0.48815593123435974, 0.28789955377...
int last = 1; int penultimate = 0; ArrayList results = new ArrayList(); results.Add(penultimate); results.Add(last); while(last<to)
[ -0.29875102639198303, -0.5132754445075989, 0.5565170049667358, -0.5495017766952515, -0.025351153686642647, 0.20701241493225098, 0.2046363651752472, -0.406183123588562, -0.4131796061992645, -0.44645172357559204, -0.29782789945602417, 0.19565613567829132, 0.007011457346379757, 0.005549003835...