text
stringlengths
0
30.5k
title
stringclasses
1 value
embeddings
listlengths
768
768
return capitaliseFirstLetter(phrase) words = splitOnDelimiter(phrase) if camelCase ret = lowerFirstLetter(first word) else ret = capitaliseFirstLetter(first word) for i in 2 to len(words): ret += capitaliseFirstLetter(words[i]) return ret capitaliseFirstLetter(word): if len(word)...
[ -0.33202534914016724, 0.04272623732686043, 0.6450657248497009, -0.26744744181632996, -0.531140923500061, 0.7405110597610474, 0.4065767228603363, -0.5391785502433777, -0.29634714126586914, -0.5362337231636047, -0.5172584652900696, 0.7562333941459656, -0.015727801248431206, -0.27683386206626...
proper case algorithm if you so wished. A C# implementation of the above described algorithm is as follows (complete console program with test harness):- ``` using System; class Program { static void Main(string[] args) { var caseAlgorithm = new CaseAlgorithm('_'); while (true) { string input = Con...
[ -0.24364164471626282, -0.17917518317699432, 0.5153225064277649, 0.008950788527727127, 0.2808585464954376, 0.1708006113767624, 0.16643384099006653, -0.4649083912372589, 0.2588995397090912, -0.6305993795394897, -0.36125680804252625, 0.8729756474494934, -0.27891677618026733, -0.00427148584276...
caseAlgorithm.SetPhraseCase(input, CaseAlgorithm.CaseMode.PascalCase)); } } } public class CaseAlgorithm { public enum CaseMode { PascalCase, CamelCase } private char delimiterChar; public CaseAlgorithm(char inDelimiterChar) { delimiterChar = inDelimiterChar; } public string SetPhraseCase(strin...
[ -0.07891429215669632, -0.18695451319217682, 0.3183504343032837, 0.03520113229751587, 0.14432603120803833, 0.21068830788135529, 0.3633306622505188, -0.23644663393497467, 0.08104901015758514, -0.325104296207428, -0.4327983260154724, 0.5921875834465027, -0.29149264097213745, 0.272189617156982...
need to explicitly check this. var words = phrase.Split(delimiterChar); // Set first word accordingly. string ret = setWordCase(words[0], caseMode); // If there are other words, set them all to pascal case. if (words.Length > 1) { for (int i = 1; i < words.Length; ++i) ret += setWord...
[ 0.14794743061065674, -0.21859712898731232, 0.5789026021957397, -0.2789755165576935, 0.019812770187854767, 0.2012854665517807, 0.40081027150154114, -0.5933167338371277, 0.003856544615700841, -0.7197527289390564, -0.5527278184890747, 0.6795166730880737, -0.29603710770606995, 0.22837345302104...
{ case CaseMode.CamelCase: return lowerFirstLetter(word); case CaseMode.PascalCase: return capitaliseFirstLetter(word); default: throw new NotImplementedException( string.Format("Case mode '{0}' is not recognised.", caseMode.ToString())); } } private string l...
[ -0.5307174324989319, -0.03858235105872154, 0.43471232056617737, -0.3207796812057495, 0.18951056897640228, 0.6029883027076721, 0.438361793756485, -0.3365742266178131, 0.1334666609764099, -0.4460340738296509, -0.5097941756248474, 0.8128355741500854, -0.3349997103214264, 0.001305988640524447,...
} } ```
[ 0.17493881285190582, 0.41805654764175415, 0.05209751054644585, -0.04864929988980293, 0.437467485666275, -0.15825650095939636, 0.13202530145645142, 0.5446501970291138, 0.35430577397346497, -0.4846813380718231, -0.2295716553926468, 0.546978771686554, -0.3188462555408478, 0.2798506021499634, ...
How can I test the same regex against different regular expression engines? The most powerful free online regexp testing tool is by far <http://regex101.com/> - lets you select the RE engine (PCRE, JavaScript, Python), has a debugger, colorizes the matches, explains the regexp on the fly, can create permalinks to the r...
[ 0.2360500693321228, -0.2482386976480484, 0.3275945484638214, 0.13705483078956604, -0.39666035771369934, 0.17941676080226898, 0.2216811329126358, -0.4031112492084503, -0.03730454668402672, -0.630405068397522, 0.11333087086677551, 0.6158357262611389, -0.30677488446235657, 0.11296478658914566...
[The Regex Coach](http://www.weitz.de/regex-coach/) - free Windows application * [RegexBuddy](http://www.regexbuddy.com/) recommended by most, costs US$ 39.95 Jeff Atwood [wrote about regular expressions]( post:). Other tools recommended by SO users include: * [<http://www.txt2re.com/>](http://www.txt2re.com/) Onlin...
[ -0.028747856616973877, -0.22299428284168243, 0.2096281498670578, 0.5152307748794556, -0.12295269966125488, 0.2837739884853363, 0.6297892928123474, -0.0652904137969017, -0.12357578426599503, -0.5394692420959473, -0.29743120074272156, 0.4743354618549347, -0.29977333545684814, -0.396919071674...
I just saw [Clone Detective](http://www.codeplex.com/CloneDetectiveVS) linked on YCombinator news, and the idea heavily appeals to me. It seems like it would be useful for many languages, not just C#, but I haven't seen anything similar elsewhere. Edit: For those who don't want to follow the link, Clone Detective scan...
[ 0.651851236820221, 0.16642513871192932, -0.36567121744155884, 0.08606379479169846, 0.09019723534584045, -0.14288803935050964, 0.5035621523857117, -0.1008603572845459, -0.14567214250564575, -0.4068313539028168, -0.25337520241737366, 0.0797637403011322, -0.34510403871536255, 0.19940456748008...
On SO 18 Joel mentioned an algorithm that would rank items based on their age and popularity and it's based on gravity. Could someone post this? C# would be lovely, but really any language (well, I can't do LISP) would be fine. My understanding is that it is approximately the following from another [Jeff Atwood](https:...
[ -0.03859178349375725, -0.14854931831359863, 0.60298752784729, 0.24460579454898834, -0.026725515723228455, -0.3327406644821167, -0.04498713091015816, -0.06561525911092758, -0.2563574016094208, -0.2664037346839905, -0.06972013413906097, 0.049126870930194855, -0.04280552268028259, 0.045278847...
I am sketching the architecture for a set of programs that share various interrelated objects stored in a database. I want one of the programs to act as a service which provides a higher level interface for operations on these objects, and the other programs to access the objects through that service. I am currently a...
[ 0.2654329836368561, 0.25556665658950806, -0.06226038187742233, -0.12306303530931473, -0.09711520373821259, -0.11527666449546814, 0.16677655279636383, 0.2071516364812851, -0.20753760635852814, -0.8096775412559509, -0.04636535421013832, 0.5061461925506592, -0.32951173186302185, 0.05586240813...
Windows programming and no experience at all with Windows services. **Is it possible to run a Python programs as a Windows service (i. e. run it automatically without user login)?** I won't necessarily have to implement this part, but I need a rough idea how it would be done in order to decide whether to design along ...
[ 0.378964900970459, 0.09651995450258255, -0.0011559056583791971, 0.0013341120211407542, -0.20847180485725403, -0.23625726997852325, 0.525334894657135, 0.08923906087875366, -0.43254247307777405, -0.5084486603736877, -0.018623359501361847, 0.7137733101844788, -0.01727268286049366, -0.10844422...
start/stop script in /etc/init.d?*** Yes you can. I do it using the pythoncom libraries that come included with [ActivePython](http://www.activestate.com/Products/activepython/index.mhtml) or can be installed with [pywin32](https://sourceforge.net/projects/pywin32/) (Python for Windows extensions). This is a basic ske...
[ 0.29020026326179504, 0.06948227435350418, 0.36094048619270325, -0.13379137217998505, 0.023027611896395683, -0.017553146928548813, 0.4469912052154541, -0.20558889210224152, -0.18003080785274506, -0.603895902633667, -0.49200817942619324, 0.6294732093811035, -0.2590999901294708, -0.2104455083...
win32event.SetEvent(self.hWaitStop) def SvcDoRun(self): servicemanager.LogMsg(servicemanager.EVENTLOG_INFORMATION_TYPE, servicemanager.PYS_SERVICE_STARTED, (self._svc_name_,'')) self.main() def main(self):
[ -0.41859620809555054, -0.18758054077625275, 0.21150101721286774, -0.3503463566303253, -0.0013899580808356404, -0.041871096938848495, 0.677706778049469, -0.10400212556123734, -0.23264747858047485, -0.5779670476913452, -0.38458290696144104, 0.5865164399147034, -0.27852025628089905, -0.013536...
pass if __name__ == '__main__': win32serviceutil.HandleCommandLine(AppServerSvc) ``` Your code would go in the `main()` method—usually with some kind of infinite loop that might be interrupted by checking a flag, which you set in the `SvcStop` method
[ 0.23029112815856934, -0.25077518820762634, 0.4436546862125397, 0.08131685107946396, -0.05887491628527641, -0.41679030656814575, 0.7562010884284973, -0.2709241509437561, -0.11856966465711594, -0.6396745443344116, -0.24333161115646362, 0.148790180683136, -0.5121424794197083, 0.19455516338348...
The product-group I work for is currently using gcc 3.4.6 (we know it is ancient) for a large low-level c-code base, and want to upgrade to a later version. We have seen performance benefits testing different versions of gcc 4.x on all hardware platforms we tested it on. We are however *very* scared of c-compiler bugs ...
[ 0.4264427423477173, 0.4694523513317108, 0.16716013848781586, -0.05060167238116264, -0.3237250745296478, -0.5461331009864807, -0.20184949040412903, -0.01546420156955719, -0.009361308068037033, -0.22882620990276337, -0.27684345841407776, 0.542434573173523, -0.23649592697620392, 0.20167253911...
choice for basically all major open source C/C++ programs. A released GCC, especially one like 4.3.X, which is in major linux distros, should be pretty good. GCC 4.3 also has better support for optimizations on newer cpus.
[ -0.07739578187465668, -0.21575267612934113, 0.3962559700012207, 0.13877148926258087, -0.10029713809490204, -0.2845061719417572, -0.3070300817489624, 0.07016585022211075, -0.2299996018409729, -0.413892537355423, -0.38121867179870605, 0.5203590989112854, -0.36995750665664673, -0.185573935508...
I have a coworker who writes unit tests for objects which fill their fields with random data. His reason is that it gives a wider range of testing, since it will test a lot of different values, whereas a normal test only uses a single static value. I've given him a number of different reasons against this, the main on...
[ 0.671197772026062, 0.25644251704216003, -0.26735153794288635, 0.30345115065574646, -0.15159299969673157, -0.008102421648800373, 0.43201351165771484, -0.15151484310626984, -0.09729354828596115, -0.3235265910625458, 0.19080345332622528, 0.3301038146018982, -0.05063900351524353, 0.40257886052...
need to a) fix the object and b) force ourselves to test for that value every time, so we know it works, but since it's random we don't know what the value was Another coworker added: * If I am testing an exception, random values will not ensure that the test ends up in the expected state * random data is used for fl...
[ 0.5249742269515991, 0.10076644271612167, -0.3488978445529938, 0.18776501715183258, 0.15363498032093048, 0.12677159905433655, 0.2157769501209259, -0.24770870804786682, -0.2385135442018509, -0.2295607179403305, 0.05195234343409538, 0.40207797288894653, -0.20571954548358917, -0.02943638712167...
my other coworker are wrong?) There's a compromise. Your coworker is actually onto something, but I think he's doing it wrong. I'm not sure that totally random testing is very useful, but it's certainly not invalid. A program (or unit) specification is a hypothesis that there exists some program that meets it. The pro...
[ 0.8375111818313599, 0.2813960909843445, -0.15851598978042603, 0.40700575709342957, 0.040347207337617874, 0.24830199778079987, 0.0980992391705513, -0.3700495660305023, 0.14682170748710632, -0.44255954027175903, 0.01175413653254509, 0.7419253587722778, 0.1824289709329605, 0.20670287311077118...
All you have to do is write the spec, and a machine can generate lots and lots of unit tests that try to break your code. I don't know what language you're using, but see here: Java <http://functionaljava.org/> Scala (or Java) <http://github.com/rickynils/scalacheck> Haskell <http://www.cs.chalmers.se/~rjmh/QuickCh...
[ 0.5606762170791626, 0.13885048031806946, 0.20534789562225342, 0.04400159418582916, 0.017607886344194412, -0.16240598261356354, 0.27884796261787415, -0.26169365644454956, -0.3239472806453705, -0.4351844787597656, 0.16755639016628265, 0.7614125609397888, 0.011354468762874603, -0.137741222977...
Here's the situation: I need to bind a WPF `FixedPage` against a `DataRow`. Bindings don't work against `DataRows`; they work against `DataRowViews`. I need to do this in the most generic way possible, as I know nothing about and have no control over what is in the `DataRow`. What I need is to be able to get a `DataR...
[ 0.24810294806957245, 0.03165029361844063, 0.4076646566390991, 0.16625139117240906, 0.03234314173460007, -0.4328816533088684, 0.09817393869161606, -0.008262715302407742, -0.18521234393119812, -0.5308681726455688, 0.03296419978141785, 0.4817902445793152, -0.3279871642589569, 0.36318770051002...
go around this? Not Exactly a sexy piece of code but their doesn't seem to be an automated way to find the row without just looping the table. ``` DataRowView newRowView = null; foreach (DataRowView tempRowView in myDataTable.DefaultView) { if (tempRowView.Row == rowToMatch) ...
[ 0.12707175314426422, -0.048700664192438126, 0.6408596634864807, -0.07800017297267914, 0.14234423637390137, -0.21956603229045868, 0.3747330904006958, -0.08003909140825272, -0.12518508732318878, -0.46683070063591003, 0.03988472372293472, 0.6929085850715637, -0.26530721783638, 0.2144240885972...
if (newRow != null) UseNewRowView(newRowView); else HandleRowNotFound(); ```
[ 0.09912154823541641, -0.2952864170074463, 0.23549963533878326, -0.4533800780773163, 0.2927546501159668, -0.3721432685852051, 0.5332313776016235, -0.3699291944503784, 0.019755041226744652, -0.35458430647850037, -0.18845224380493164, 0.5861427187919617, -0.1585959494113922, 0.407388925552368...
What considerations do I need to make if I want my code to run correctly on both 32bit and 64bit platforms ? EDIT: What kind of areas do I need to take care in, e.g. printing strings/characters or using structures ? Options: Code it in some language with a [Virtual Machine](http://en.wikipedia.org/wiki/Virtual_machin...
[ 0.5357804298400879, -0.02446575276553631, 0.1619313508272171, 0.0899367406964302, 0.07191765308380127, 0.30586785078048706, 0.2644939422607422, -0.09014381468296051, -0.09804874658584595, -0.8699365854263306, 0.054000698029994965, 0.6117163300514221, -0.25737547874450684, -0.29301074147224...
For scripting languages, what is the most effective way to utilize a console when developing? Are there ways to be more productive with a console than a "compile and run" only language? Added clarification: I am thinking more along the lines of Ruby, Python, Boo, etc. Languages that are used for full blown apps, but a...
[ 0.16918611526489258, 0.022946152836084366, -0.06975698471069336, 0.11373215168714523, -0.26341667771339417, -0.19865044951438904, 0.2777796983718872, 0.45542365312576294, -0.026352152228355408, -0.6994795203208923, 0.04721614718437195, 0.8880026936531067, -0.448469877243042, -0.38834202289...
to give you an idea of effective use: * *Automation*. You are allowed a `.irbrc` file that will be automatically executed when launching irb. That means you can load your favorite libraries or do *whatever* you want in full Ruby automatically. To see what I mean check out some of the ones at [dotfiles.org](https://web...
[ 0.15299178659915924, -0.04896188899874687, 0.281423956155777, -0.1419953852891922, -0.33605265617370605, -0.21447980403900146, 0.40782254934310913, -0.20456470549106598, -0.4268205463886261, -0.7109782099723816, -0.06025318801403046, 0.7198508381843567, -0.5322830080986023, -0.297012507915...
the ability to test the code interactively right in the prompt saves a lot of time! For instance you can just open up irb and start running functions on an example string and have working and tested code already ready for your library/program. * *Learning, Experimenting, and Hacking*. Something like this would take a v...
[ 0.290194571018219, -0.11373216658830643, 0.1168118491768837, 0.25181177258491516, -0.23559588193893433, -0.2807368338108063, 0.40346163511276245, -0.29660049080848694, -0.08851078897714615, -0.8744065761566162, 0.045159514993429184, 0.608513593673706, -0.1548074632883072, -0.21981376409530...
>> "12341:asdf"[0...5] # => "12341" >> "12341:asdf"[0, ':'] TypeError: can't convert String into Integer from (irb):5:in `[]' from (irb):5 >> "12341:asdf"[0, 5] # => "12341" ``` * *Testing and Benchmarking*. Now they are nice and easy to perform. [Here](http://ozmm.org/posts/time_in_irb.html) is someone's idea...
[ 0.30354249477386475, 0.015260731801390648, 0.2585158348083496, -0.18174727261066437, -0.12900502979755402, -0.10691489279270172, 0.5263655185699463, -0.4668128490447998, -0.24892039597034454, -0.5116419792175293, -0.004859904758632183, 0.5495428442955017, -0.2290562391281128, 0.00110808364...
missing some things but I hit on my favorite points. You really have zero limitation in shells so you're limited only by what you can think of doing. I almost always have a few shells running. Bash, Javascript, and Ruby's irb to name a few. I use them for a lot of things!
[ 0.5033414363861084, 0.3992633521556854, -0.2846553921699524, 0.040972765535116196, 0.153919517993927, -0.016482295468449593, 0.25898924469947815, 0.31343144178390503, -0.23747168481349945, -0.3643385171890259, 0.4149715006351471, 0.7807685136795044, -0.08221589028835297, -0.024607878178358...
So the controller context depends on some asp.net internals. What are some ways to cleanly mock these up for unit tests? Seems like its very easy to clog up tests with tons of setup when I only need, for example, Request.HttpMethod to return "GET". I've seen some examples/helpers out on the nets, but some are dated. F...
[ 0.13098140060901642, -0.22817663848400116, 0.6619302034378052, 0.19624261558055878, -0.19398418068885803, -0.02888966165482998, 0.276596337556839, -0.49001139402389526, -0.36314359307289124, -0.7981078624725342, 0.08547917008399963, 0.5991593599319458, -0.31201669573783875, 0.3590894937515...
think the Rhino Mocks syntax is similar.
[ 0.2498202621936798, 0.3673182427883148, -0.2179892212152481, 0.026020677760243416, -0.38376978039741516, 0.25021371245384216, 0.29650089144706726, 0.23556755483150482, -0.302470862865448, -0.339897483587265, 0.29978182911872864, 0.4324882924556732, -0.25840023159980774, -0.1955986768007278...
Where can I find a good tutorial on learning ASP.NET MVC using VB.net 2008 as the language? Most in-depth tutorials that I found in searching the web were written in C#. Have you tried adding the word "VB" to your searches?? <http://www.myvbprof.com/2007_Version/MVC_Intro_Tutorial.aspx> <http://www.asp.net/learn/mvc/...
[ 0.14182883501052856, 0.11251833289861679, 0.1797436624765396, -0.16497668623924255, -0.09969819337129593, -0.233030304312706, 0.4658450186252594, 0.3247464597225189, -0.3089299201965332, -0.22358399629592896, -0.10865125060081482, 0.5843682289123535, 0.011872556060552597, -0.00106452615000...
Currently, if I want to output a SQL script for a table in my database, in Management Studio, I can right click and output a create script. Is there an equivalent to output an SQL script for a database's maintenance plan?# Edit The company I work for has 4 servers, 3 servers and no sign of integration, each one run...
[ 0.6742011904716492, 0.5689811110496521, 0.3033801019191742, -0.11641789972782135, 0.15845514833927155, -0.029751719906926155, 0.21156346797943115, 0.3847449719905853, -0.40055155754089355, -0.6009374260902405, 0.2811521291732788, 0.27494725584983826, 0.026563258841633797, 0.448980331420898...
them as follows: Connect to Integration Services and expand Stored Packages>MSDB>Maintenance Plans. You can then right click on the plan and select import or export
[ 0.3104897439479828, -0.11984282732009888, 0.24267521500587463, 0.2978347837924957, 0.38026055693626404, 0.030222181230783463, -0.07051152735948563, -0.08109254390001297, -0.43248048424720764, -0.7275902032852173, -0.3946884870529175, 0.5500204563140869, -0.25303220748901367, 0.053474940359...
Haven't fired up reflector to look at the difference but would one expect to see the exact same compiled code when comparing `Func<T, bool>` vs. `Predicate<T>` I would imagine there is no difference as both take a generic parameter and return bool? They share the same signature, but they're still different types.
[ 0.6630463004112244, -0.10149034112691879, 0.07068943977355957, 0.15004505217075348, -0.5996466279029846, -0.22047321498394012, 0.13076330721378326, -0.08509338647127151, -0.089379221200943, -0.54934161901474, 0.21385949850082397, 0.6211849451065063, -0.026475394144654274, 0.346359759569168...
For various reasons calling `System.exit` is frowned upon when writing **Java Applications**, so how can I notify the calling process that not everything is going according to plan? **Edit:** The 1 is a `standin` for any non-zero exit code. The use of `System.exit` is frowned upon when the 'application' is really a su...
[ 0.10731976479291916, -0.050629958510398865, 0.31436970829963684, -0.07847465574741364, -0.051483165472745895, -0.1724787950515747, 0.40323102474212646, -0.011036626063287258, -0.23638099431991577, -0.3551281690597534, -0.4187711477279663, 0.29289036989212036, -0.40859121084213257, 0.286254...
really meant to be run as a standalone application, there is nothing wrong with using `System.exit`. in this case, setting an exit value is probably the easiest (and also most used) way of communicating failure or success to the parent process.
[ -0.07279407232999802, 0.042326051741838455, 0.008922300301492214, 0.22005024552345276, 0.2307981550693512, -0.14838650822639465, 0.414190411567688, 0.3323361277580261, -0.13239677250385284, -0.3069974184036255, -0.45989301800727844, 0.36994120478630066, -0.15236419439315796, 0.135521411895...
So I'm interested in hearing different thoughts about what is the best way to go about unit testing XNA Game/Applications. Astute googlers can probably figure out why I'm asking, but I didn't want to bias the topic :-) I would that this question is geared more toward the approach of **unit testing in game development**...
[ 0.5660355091094971, -0.08436212688684464, -0.31383568048477173, 0.28618597984313965, -0.33543723821640015, -0.18400031328201294, -0.007315043359994888, -0.009593835100531578, 0.002603882225230336, -0.4681451916694641, 0.29502126574516296, 0.3112795054912567, 0.14266715943813324, 0.01939912...
Is it "taboo" to programatically create system restore points? I would be doing this before I perform a software update. If there is a better method to create a restore point with just my software's files and data, please let me know. I would like a means by which I can get the user back to a known working state if ev...
[ 0.1051664799451828, 0.01397938933223486, 0.3569971024990082, 0.032365832477808, 0.4117158353328705, -0.24093200266361237, 0.4533233642578125, 0.09607788175344467, -0.1116064190864563, -0.7007880210876465, -0.1834464818239212, 0.9625160694122314, -0.33376970887184143, 0.40022972226142883, ...
ManagementScope("\\\\localhost\\root\\default"); ManagementPath oPath = new ManagementPath("SystemRestore"); ObjectGetOptions oGetOp = new ObjectGetOptions(); ManagementClass oProcess = new ManagementClass(oScope, oPath, oGetOp); ManagementBaseObject oInParams = oProcess.GetMethodParame...
[ -0.41760510206222534, -0.2282165288925171, 0.6414448022842407, 0.03350174054503441, 0.1695656180381775, 0.17133986949920654, 0.5047294497489929, -0.05967491865158081, -0.3259069621562958, -0.7351751327514648, -0.19640645384788513, 0.9095789790153503, -0.4048084020614624, 0.1062716096639633...
Is it "taboo" to programatically create system restore points? No. That's why the API is there; so that you can have pseudo-atomic updates of the system.
[ 0.4212454855442047, 0.2052685022354126, 0.05726272985339165, 0.28248918056488037, 0.07355301827192307, -0.3763575255870819, 0.28700411319732666, 0.2964612543582916, -0.29866838455200195, -0.050939563661813736, 0.01483051385730505, 0.5261624455451965, -0.12448365241289139, 0.136902242898941...
I'm working on a messaging/notification system for our products. Basic requirements are: * Fire and forget * Persistent set of messages, possibly updating, to stay there until the sender says to remove them The libraries will be written in C#. Spring.NET just released a milestone build with lots of nice messaging abs...
[ 0.3638197183609009, 0.14838744699954987, 0.4630332291126251, -0.050802718847990036, -0.04918760806322098, 0.05706170201301575, 0.13125869631767273, -0.07461380213499069, -0.35814905166625977, -0.7223401069641113, -0.03367386758327484, 0.5476363301277161, -0.18717065453529358, -0.0607774332...
of those long-lived messages -> message broker queue or topic -> listening apps. Finally, the question: Which message broker should I use? I am biased towards [ActiveMQ](http://activemq.apache.org) - We used it on our last project and loved it. I can't really think of a single strike against it, except that it's Java,...
[ 0.20318719744682312, 0.17315663397312164, 0.16059236228466034, -0.07137411832809448, -0.3753785192966461, -0.13313241302967072, 0.22115430235862732, 0.37115567922592163, -0.25162577629089355, -0.7628893256187439, 0.2515239417552948, 0.6026889681816101, -0.09453260898590088, 0.1510981470346...
also doesn't seem to have great multicast support. Has anyone used MSMQ for something like this? Any pros or cons, stuff that might sway the vote one way or the other? One last thing, we are using .NET 2.0. I'm kinda biased as I work on [ActiveMQ](http://activemq.apache.org) but pretty much all of benefits listed for...
[ 0.1786218285560608, -0.2634640336036682, 0.5200870037078857, 0.20069561898708344, -0.2964058518409729, -0.2484474629163742, 0.20503848791122437, 0.18106161057949066, -0.3588871955871582, -0.8474054932594299, -0.03997299447655678, 0.6126847267150879, -0.2193577140569687, -0.1629293709993362...
ActiveMQ broker is written in Java; but you can run it on IKVM as a .net assembly if you really want - or run it as a windows service, or compile it to a DLL/EXE via GCJ. MSMQ may or may not be written in .NET - but it doesn't really matter much how its implemented right? Irrespective of whether you choose MSMQ or Act...
[ -0.09323643147945404, -0.05227094888687134, 0.588999330997467, -0.1677810400724411, -0.49633222818374634, 0.004632322117686272, 0.14426641166210175, 0.10547322779893875, -0.21764259040355682, -0.8571022152900696, 0.1490361988544464, 0.31912609934806824, -0.49435049295425415, -0.04592843353...
will support any other JMS provider via [StompConnect](http://stomp.codehaus.org/StompConnect). So by choosing NMS as your API you will avoid lockin to any proprietary technology - and you can then easily switch messaging providers at any point in time; rather than locking your code all into a proprietary API
[ 0.014129798859357834, -0.043043795973062515, 0.49273112416267395, 0.12202484160661697, 0.1447177678346634, -0.1500103622674942, 0.3146991729736328, -0.16137121617794037, -0.4805864989757538, -0.5717295408248901, -0.30802011489868164, 0.2682145833969116, -0.4677557051181793, -0.154075965285...
I have a swf with loads text into a Sprite that resizes based on the content put into - I'd like though for the ones that are longer than the page to have the browser use its native scroll bars rather than handle it in actionscript (very much like <http://www.nike.com/nikeskateboarding/v3/>...) I did have a look at th...
[ 0.6450778245925903, -0.2565670609474182, 0.5049970746040344, 0.14064320921897888, -0.586531937122345, -0.2368311733007431, 0.31863370537757874, 0.17651402950286865, -0.2687729001045227, -0.6326910853385925, 0.36064571142196655, 0.3267979919910431, -0.06003452464938164, 0.001118809101171791...
Are there any lists of default CSS stylesheets for different browsers? (browser stylesheets in tabular form) I want to know the default font of text areas across all browsers for future reference. Not tabular, but the source CSS may be helpful if you're looking for something specific: * [Firefox default HTML styleshe...
[ 0.48031356930732727, -0.13162259757518768, 0.3053548038005829, 0.04964460805058479, -0.1813066452741623, -0.32896238565444946, 0.07703076303005219, 0.016569165512919426, -0.3054421842098236, -0.8115212917327881, 0.13865602016448975, 0.6443848013877869, -0.06605241447687149, -0.306927770376...
I've got a problem where incoming SOAP messages from one particular client are being marked as invalid and rejected by our XML firewall device. It appears extra payload data is being inserted by Visual Studio; we're thinking the extra data may be causing a problem b/c we're seeing "VsDebuggerCausalityData" in these mes...
[ 0.6781892776489258, -0.07782211154699326, 0.14828309416770935, 0.4304221570491791, -0.11908721923828125, 0.021212313324213028, 0.4960975646972656, 0.010219321586191654, -0.1913686990737915, -0.49301573634147644, 0.12870851159095764, 0.3893706798553467, -0.2583248019218445, 0.14072431623935...
reveals that this should get rid of it, get them to add it to the web.config or app.config for their application. ``` <configuration> <system.diagnostics> <switches> <add name="Remote.Disable" value="1" /> </switches> </system.diagnostics> </configuration> ``` The information is debug informatio...
[ 0.3925793170928955, -0.11588139086961746, 0.4125194847583771, 0.2646943926811218, 0.28883251547813416, -0.3674972653388977, 0.05500305816531181, -0.1152753233909607, -0.0767771303653717, -0.5331087112426758, -0.1595679074525833, 0.24940812587738037, 0.019164463505148888, 0.0662368386983871...
I have some kind of test data and want to create a unit test for each item. My first idea was to do it like this: ``` import unittest l = [["foo", "a", "a",], ["bar", "a", "b"], ["lee", "b", "b"]] class TestSequence(unittest.TestCase): def testsample(self): for name, a,b in l: print "test", n...
[ 0.13977523148059845, 0.10218116641044617, -0.18204966187477112, -0.09116849303245544, -0.0372304804623127, 0.34015384316444397, 0.24368572235107422, -0.29192784428596497, 0.36817771196365356, -0.5424411296844482, -0.0156190674751997, 0.6128708124160767, -0.1450951248407364, 0.1820156574249...
I would like to generate one test for each item on the fly. Any suggestions? This is called "parametrization". There are several tools that support this approach. E.g.: * [pytest's decorator](https://docs.pytest.org/en/latest/parametrize.html) * [parameterized](https://github.com/wolever/parameterized) The resulting...
[ 0.46480873227119446, 0.21440745890140533, 0.24169060587882996, 0.0752970278263092, -0.01824878342449665, 0.27897390723228455, 0.2611168324947357, -0.6765556931495667, 0.1241203099489212, -0.6479138731956482, -0.05156444013118744, 0.4917151927947998, -0.1836126744747162, 0.19068090617656708...
... FAIL test_sequence_2_lee (__main__.TestSequence) ... ok ====================================================================== FAIL: test_sequence_1_bar (__main__.TestSequence) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/local/lib/python2.7...
[ 0.10314299166202545, 0.3689628839492798, 0.2542632818222046, -0.15005891025066376, 0.1716638207435608, 0.17308218777179718, 0.5343514084815979, -0.2509833872318268, 0.0027343211695551872, -0.41093650460243225, -0.0031127978581935167, 0.342763751745224, -0.0958329290151596, 0.38168558478355...
in l: test_name = 'test_%s' % t[0] test = test_generator(t[1], t[2]) setattr(TestSequense, test_name, test) unittest.main() ```
[ 0.06511472165584564, -0.22229382395744324, 0.03789219632744789, -0.453937292098999, 0.2447328418493271, 0.28797951340675354, 0.1576116979122162, 0.008061302825808525, 0.3510732650756836, -0.5829530954360962, -0.3157612681388855, 0.3265780210494995, -0.19007426500320435, 0.03212215751409530...
In C# is there a shorthand way to write this: ``` public static bool IsAllowed(int userID) { return (userID == Personnel.JohnDoe || userID == Personnel.JaneDoe ...); } ``` Like: ``` public static bool IsAllowed(int userID) { return (userID in Personnel.JohnDoe, Personnel.JaneDoe ...); } ``` I know I could...
[ 0.15674680471420288, -0.09886354953050613, 0.3686007857322693, -0.3483715355396271, 0.21363107860088348, -0.10561875253915787, 0.01807752065360546, -0.2890743315219879, -0.2300395369529724, -0.3345016539096832, -0.33674368262290955, 0.6819594502449036, -0.3915669620037079, -0.0344312489032...
return values.Contains(testValue); } } ``` Usage: ``` Personnel userId = Personnel.JohnDoe; if (userId.In(Personnel.JohnDoe, Personnel.JaneDoe)) { // Do something } ``` I can't claim credit for this, but I also can't remember where I saw it. So, credit to you, anonymous Internet stranger.
[ 0.24461586773395538, 0.2975408136844635, -0.16400685906410217, 0.00729889003559947, 0.4643915593624115, -0.24404139816761017, 0.43312203884124756, -0.0034565269015729427, 0.16344359517097473, -0.21295306086540222, -0.2937215566635132, 0.47773781418800354, -0.20765405893325806, 0.2506325840...
Obviously there are security reasons to close a wireless network and it's not fun if someone is stealing your bandwidth. That would be a serious problem? To address the first concern: Does a device on the same wireless network have any special privileges or access that an other device on the internet has? **Assumpt...
[ 0.5217138528823853, -0.04794001579284668, 0.03603366017341614, 0.4333025813102722, 0.012530635111033916, -0.4913371503353119, 0.07912955433130264, -0.009989215061068535, -0.29362308979034424, -0.4564487636089325, 0.036429181694984436, 0.5751689076423645, -0.23913833498954773, 0.21766373515...
authorities or lock stuff up. Am I missing something? Bruce Schneier is famous for running an open wireless network at home ([see here](http://www.schneier.com/blog/archives/2008/01/my_open_wireles.html)). He does it for two reasons: 1. To be neighborly (you'd let your neighbor borrow a cup of sugar, wouldn't you? Why...
[ 0.5678681135177612, -0.020414987578988075, 0.07388395071029663, 0.4485616385936737, 0.13393403589725494, -0.4871074855327606, 0.48122739791870117, -0.10325642675161362, -0.22021137177944183, -0.06569737941026688, -0.04940829426050186, 0.3475842773914337, -0.5296826958656311, 0.010074992664...
accountable.
[ 0.12794449925422668, 0.3028443157672882, 0.20200198888778687, 0.3112315237522125, -0.43677806854248047, -0.5760623216629028, 0.22523167729377747, 0.18037673830986023, -0.021807856857776642, -0.631793737411499, -0.3552316725254059, 0.3226518929004669, -0.04089464992284775, -0.13049359619617...
I have a very large code base that contains extensive unit tests (using CppUnit). **I need to work out what percentage of the code is exercised by these tests**, and (ideally) generate some sort of report that tells me on a per-library or per-file basis, how much of the code was exercised. Here's the kicker: this has ...
[ 0.3810615837574005, 0.17854101955890656, -0.052522528916597366, 0.06552589684724808, 0.06199982017278671, -0.18019528687000275, 0.2963572144508362, -0.035107120871543884, -0.023379940539598465, -0.6952410340309143, 0.06783747673034668, 0.6419981122016907, 0.12110523134469986, -0.0461586639...
I want to - it kicks ass), but otherwise I'm eager to hear any recommendations you might have. Cheers, ### Which tool should I use? This [article describes](http://web.archive.org/web/20090527141110/http://www.kimbly.com/blog/000331.html) another developers frustrations searching for C++ code coverage tools. The auth...
[ 0.763475775718689, 0.12883824110031128, 0.4405827224254608, 0.12008636444807053, -0.04320773109793663, -0.10240897536277771, 0.0861220508813858, -0.40036869049072266, -0.11324463784694672, -0.5375054478645325, -0.0984615683555603, 0.4417684078216553, -0.12648844718933105, -0.16138166189193...
coverage measurement steps into the make file you use for automated testing. --- ### Testing Linux vs Windows? So long as all your tests run correctly in both environments, you should be fine measuring coverage on one or the other. (Though Bullseye appears [to support both platforms](http://www.bullseye.com/platform...
[ 0.7853918671607971, -0.08517800271511078, 0.014002057723701, 0.04720174893736839, -0.09622595459222794, -0.1914285123348236, 0.29758211970329285, -0.28884240984916687, -0.2724055349826813, -0.6802015900611877, 0.4043114185333252, 0.7259379625320435, -0.05278687924146652, -0.231076881289482...
can be easily accomplished with some virtualization software like [vmware](http://www.vmware.com/) or [virtualbox](http://www.virtualbox.org/). You may not need to run code coverage metrics on both OSs, but you should definitely be running your unit tests on both.
[ 0.3795278072357178, -0.07393082976341248, -0.09102656692266464, 0.45858821272850037, 0.17539432644844055, -0.23919177055358887, 0.21758070588111877, -0.15853558480739594, -0.2459293007850647, -0.7338122725486755, 0.038443673402071, 0.5032246112823486, 0.21038587391376495, 0.011621742509305...
My boss has come to me and asked how to enure a file uploaded through web page is safe. He wants people to be able to upload pdfs and tiff images (and the like) and his real concern is someone embedding a virus in a pdf that is then viewed/altered (and the virus executed). I just read something on a procedure that coul...
[ 0.6214061975479126, 0.31167998909950256, 0.2575783431529999, 0.373742938041687, 0.125084787607193, -0.3113063871860504, -0.03199421986937523, 0.11178756505250931, -0.29326409101486206, -0.4560469090938568, 0.13189558684825897, 0.45237091183662415, -0.2986763119697571, 0.3513827323913574, ...
Update: So the team argued about this a little bit, and one developer found a post about letting the file download to the file system and having the antivirus software that protects the network check the files there. The poster essentially said that it was too difficult to use the API or the command line for a couple o...
[ 0.7418719530105591, 0.019085349515080452, 0.05828340724110603, 0.14138688147068024, -0.024873042479157448, -0.43678557872772217, 0.28528910875320435, 0.16733938455581665, -0.17067869007587433, -0.5205933451652527, 0.2720929682254791, 0.5308706760406494, -0.1503092497587204, 0.1976372003555...
files through antivirus software such as [ClamAV](http://www.clamav.net/). I don't know about scrubbing files to remove viruses, but this will at least allow you to detect and delete infected files before you view them.
[ 0.6268706917762756, 0.2632458806037903, 0.3232059180736542, 0.31517788767814636, 0.2729128897190094, -0.44500648975372314, 0.5961648225784302, 0.305611252784729, -0.4146560728549957, -0.6277379393577576, -0.3076978921890259, 0.5354479551315308, -0.23752383887767792, 0.2802765369415283, 0...
I've noticed that some sites (usually banks) suppress the ability to paste text into text fields. How is this done? I know that JavaScript can be used to swallow the keyboard shortcut for paste, but what about the right-click menu item? Probably using the [`onpaste`](https://developer.mozilla.org/en-US/docs/Web/API/HTM...
[ 0.3053087294101715, 0.3073759377002716, 0.38677459955215454, -0.28856781125068665, 0.2576262652873993, -0.0514751598238945, 0.5122161507606506, 0.10513066500425339, 0.0476619154214859, -0.5882458090782166, -0.3534671664237976, 0.6459797024726868, -0.32158321142196655, 0.25049498677253723, ...
Can anyone point me to a good tutorial on creating a bootable Linux CD from scratch? I need help with a fairly specialized problem: my firm sells an expansion card that requires custom firmware. Currently we use an extremely old live CD image of RH7.2 that we update with current firmware. Manufacturing puts the cards ...
[ 0.6365435123443604, 0.360026478767395, 0.1286047101020813, 0.2042764127254486, 0.2765199542045593, -0.41553473472595215, -0.2564238905906677, 0.1642552763223648, -0.21692298352718353, -0.5094143152236938, -0.13477709889411926, 0.9010368585586548, -0.09306338429450989, 0.21511110663414001, ...
have to update the CD to a 2.6 kernel. It's easy enough to acquire a pre-existing live CD - but those all are designed for showing off Linux on the desktop - which means they take forever to boot. Can anyone fix me up with a current How-To? --- ### Update: So, just as a final update for anyone reading this later - ...
[ 0.4868975877761841, -0.10594698041677475, 0.24648833274841309, 0.1646183729171753, 0.07524333149194717, -0.2972783148288727, 0.22545641660690308, 0.32721924781799316, -0.055601347237825394, -0.8526079058647156, -0.21588656306266785, 0.8942946195602417, -0.2660062611103058, 0.21437519788742...
is very poorly documented it is extremely customizable. I was able to create a minimal LiveCD and edit the boot sequence so that it booted directly into the firmware updater instead of a bash shell. The whole job would have only taken an hour or two if there had been a README explaining the configuration file! One key...
[ 0.31655153632164, -0.1384897083044052, -0.03156695514917374, 0.126871258020401, 0.059668101370334625, -0.46928316354751587, 0.25192975997924805, -0.024882977828383446, -0.1461462527513504, -0.6485328674316406, -0.06502529233694077, 0.7941043376922607, -0.3650732636451721, -0.22120405733585...
-noFragmentCompression to save on decompression time. You may even be able to drop the squashfs approach entirely, but this would require some restructuring. This may actually be slower depending on your CD-ROM read speed vs. CPU speed, but it's worth looking into. This [Ubuntu tutorial](https://help.ubuntu.com/commun...
[ 0.26237404346466064, -0.16275855898857117, 0.2516704797744751, -0.007088528946042061, -0.2943234145641327, -0.42894619703292847, 0.24154148995876312, -0.07910816371440887, -0.2712520658969879, -0.992682933807373, -0.23181869089603424, 0.541099488735199, -0.3934122622013092, -0.098254412412...
a huge LiveCD like Ubuntu. There are some situations in which the smaller distros are using smaller/faster *alternatives* rather than just leaving something out. If you want to get seriously hardcore, you could look at [Linux From Scratch](http://www.linuxfromscratch.org/), and include *only* what you want, but that's ...
[ 0.6038364768028259, -0.2523033916950226, -0.23932451009750366, 0.15267722308635712, -0.16421769559383392, -0.561073362827301, 0.03240538388490677, 0.3669587969779968, -0.4091261327266693, -0.5179727077484131, -0.20298007130622864, 0.35934191942214966, -0.49223557114601135, -0.0992077589035...
I am working on a Customer Server Control that extends another control. There is no problem with attaching to other controls on the form. in vb.net: `Parent.FindControl(TargetControlName)` I would like to pass a method to the control in the ASPX markup. for example: `<c:MyCustomerControl runat=server InitializeStuf...
[ 0.10228054970502853, 0.049657877534627914, 0.5206767320632935, -0.10623875260353088, -0.19111427664756775, -0.051874790340662, 0.13879024982452393, -0.2159297913312912, -0.08963716775178909, -0.5507627725601196, -0.02054833434522152, 0.31027474999427795, -0.2730216383934021, 0.205447942018...
controls do similar. --- I forgot to mention, my work-around is to give the control events and attaching to them in the Code-behind. If you want to be able to pass a method in the ASPX markup, you need to use the `Browsable` attribute in your code on the event. VB.NET ```vb <Browsable(True)> Public Event Initialize...
[ -0.048905305564403534, -0.25092482566833496, 0.5907278060913086, 0.44031211733818054, 0.09288488328456879, -0.2637880742549896, -0.15414749085903168, -0.4769660234451294, -0.0944792702794075, -0.4092315435409546, -0.2398267686367035, 0.6443109512329102, -0.1604480743408203, 0.1427143663167...
What frameworks exist to unit test Objective-C code? I would like a framework that integrates nicely with Apple Xcode. Xcode includes XCTest, which is similar to [OCUnit](http://www.sente.ch/software/ocunit/), an Objective-C unit testing framework, and has full support for running XCTest-based unit tests as part of you...
[ 0.5544996857643127, 0.26549625396728516, -0.011628218926489353, 0.12852858006954193, -0.15506167709827423, 0.07344737648963928, 0.042322397232055664, -0.28235408663749695, 0.15141329169273376, -0.716825544834137, 0.07248105853796005, 0.2409856915473938, -0.19718855619430542, 0.066063210368...
tests](http://eschatologist.net/blog/?p=26) Despite using OCUnit rather than XCTest, the concepts are largely the same. Finally, I also wrote a few posts on how to write tests for Cocoa user interfaces; the way Cocoa is structured makes it relatively straightforward, because you don't have to spin an event loop or an...
[ 0.5410289168357849, 0.03479103371500969, -0.05248022451996803, 0.38669461011886597, -0.38693076372146606, -0.09357522428035736, 0.3660661280155182, -0.5384553074836731, 0.04673566669225693, -0.5505056977272034, 0.14308811724185944, 0.541146457195282, 0.1627482920885086, -0.22578164935112, ...
How can you implement trackbacks on a custom-coded blog (written in C#)? The TrackBack specification was created by Six Apart back in the day for their [Movable Type](http://www.movabletype.org/) blogging system. After some corporate changes it seems to be no longer available, but here's an archived version: <http://w...
[ 1.0093599557876587, -0.14618268609046936, 0.04090055823326111, 0.35581934452056885, 0.060874439775943756, 0.030557189136743546, 0.10391711443662643, -0.2583432197570801, -0.15032145380973816, -0.2683277130126953, 0.27122318744659424, 0.6988561153411865, -0.11947431415319443, -0.01123321056...
I have a JavaScript method that I need to run on one of my pages, in particular, the `onresize` event. However, I don't see how I can set that event from my content page. I wish I could just put it on my master page, but I don't have the need for the method to be called on all pages that use that master page. Any he...
[ 0.36304420232772827, -0.10131407529115677, -0.010963893495500088, 0.06753718852996826, -0.12652795016765594, -0.2311071902513504, 0.1801048368215561, -0.19442451000213623, -0.1612212359905243, -0.5760685205459595, 0.025334566831588745, 0.6195396184921265, -0.38113680481910706, 0.0337168425...
if(element.attachEvent) { element.attachEvent(eventToHandle, eventHandler); } else if(element.addEventListener) { element.addEventListener(eventToHandle.replace("on", ""), eventHandler, false); } else { element[eventToHandle] = eventHandler; } } attachEventHandler(window, "onresize", functi...
[ 0.12364812195301056, -0.14125336706638336, 0.37918993830680847, -0.11569377779960632, 0.4220258593559265, -0.21835458278656006, 0.19448131322860718, -0.32359135150909424, 0.1931428462266922, -0.6987653970718384, -0.3847140669822693, 0.8132386207580566, -0.342425674200058, -0.15341255068778...
Is there a way to hide radio buttons inside a RadioButtonList control programmatically? Under the hood, you can access the attributes of the item and assign it a CSS style. So you should be able to then programmatically assign it by specifying: ``` RadioButtonList.Items(1).CssClass.Add("visibility", "hidden") ``` a...
[ 0.4169571101665497, 0.10678961127996445, 0.2916453778743744, 0.2885853946208954, 0.16229382157325745, -0.4343262314796448, 0.3204984962940216, -0.36566776037216187, 0.01552472822368145, -0.41309717297554016, -0.13284453749656677, 0.7334346771240234, -0.1880110502243042, -0.2364379018545150...
I'm considering developing a website similar to stackoverflow, but the answers may also consist of drawings (schematics, in this case). I want to have an area in the answer form where they can make this schematic without requiring special plugins, etc. 1. Are we to the point where SVG has or should have critical mass...
[ 0.6138661503791809, 0.225643128156662, 0.2060098797082901, 0.1483975648880005, 0.10956506431102753, -0.3573837876319885, 0.05907990038394928, -0.12466412782669067, 0.09736888855695724, -0.7000730037689209, -0.009987371042370796, 0.2894856035709381, -0.1022123321890831, -0.23516002297401428...
but I do have three pointers to projects that you could look at. The first is the [Lively Kernel](http://Research.Sun.Com/projects/lively/ "Lively Kernel") by Dan Ingalls (yes, *the* Dan Ingalls) at Sun Labs. It is an implementation of a Smalltalk Virtual World in JavaScript on top of SVG. More precisely, it is an imp...
[ 0.31077417731285095, 0.09681837260723114, 0.1783866286277771, 0.29906246066093445, -0.16576623916625977, 0.10707066208124161, -0.2140858769416809, 0.2410263568162918, -0.24530129134655, -0.6304739713668823, 0.273636132478714, 0.5295524597167969, -0.29065796732902527, -0.16333912312984467, ...
SVG as the graphics card and the browser as the computer. This is about as extreme as it gets, when it comes to JavaScript and SVG. And it only *fully* works in Safari 3 and partly in Firefox 3, although there is an experimental port to Internet Explorer as well. The second project is John Resig's [Processing.js](htt...
[ 0.09299512952566147, 0.015440127812325954, 0.4432331323623657, -0.09601647406816483, -0.4788196384906769, -0.12906338274478912, 0.018648000434041023, -0.32743120193481445, -0.509887158870697, -0.8086908459663391, -0.01135924644768238, 0.4161473214626312, -0.6186356544494629, -0.09421520680...
Pickles. It uses *only* JavaScript, DOM and CSS and *no* SVG or `<canvas>` or Flash or whatever. *And* it is portable to almost any browser, including Internet Explorer 7 and up. Doing 2D should be even easier than this. Between those three projects you should be able to find some inspiration and also to find some peo...
[ 0.2485102266073227, -0.21136443316936493, 0.1677621603012085, 0.14032775163650513, -0.15456752479076385, 0.02839280106127262, -0.45539918541908264, 0.2146596759557724, -0.25792035460472107, -0.8230762481689453, 0.07793042063713074, 0.29136717319488525, 0.010306376032531261, -0.377978324890...
`<canvas>` is possible.
[ 0.47476229071617126, -0.30783697962760925, 0.26085489988327026, 0.12574109435081482, 0.13168759644031525, 0.06990762054920197, -0.10254625976085663, -0.0013788331998512149, -0.3263348937034607, -0.7810890674591064, -0.3493848443031311, 0.5133396983146667, -0.08750588446855545, -0.150730624...
What's the best lifetime model for a `DataContext`? Should I just create a new one whenever I need it (aka, function level), should I keep one available in each class that would use it (class level), or should I create a static class with a static DataContext (app-domain level)? Are there any considered best practices ...
[ -0.0763712078332901, -0.15429788827896118, 0.37305405735969543, 0.2167430818080902, 0.4879136383533478, -0.018722154200077057, 0.18223969638347626, -0.011217192746698856, -0.3808380663394928, -0.6186593174934387, 0.014114750549197197, 0.5995978713035583, -0.1883707493543625, 0.112365290522...
querying stuff then it's fine to create them as needed, but then if later you want to `.SubmitChanges()` you'll have to refactor your code a lot, so you may as well adopt the pattern of effectively keeping the `datacontext` global throughout your app from the beginning. Note the data context is *disconnected*. The con...
[ 0.003150057978928089, -0.13397884368896484, 0.8293431997299194, 0.169339120388031, -0.04174189642071724, -0.3493136763572693, 0.3979118764400482, 0.24952355027198792, -0.3944721221923828, -0.8640104532241821, -0.4163779020309448, 0.5228754878044128, -0.49171212315559387, 0.0778656303882598...
So don't think keeping the `datacontext` around keeps a connection open, it doesn't (you can hook the `StateChange` event of the connection to confirm this for yourself, that's how I'm sure). There is a great article over at [Rick Strahl's Blog](http://www.west-wind.com/weblog/posts/246222.aspx) which covers this topi...
[ 0.3102990984916687, -0.020235611125826836, 0.007229775656014681, 0.14622387290000916, -0.03528842329978943, -0.748002827167511, 0.22705084085464478, 0.13797125220298767, -0.31867021322250366, -0.31142935156822205, 0.05373559519648552, 0.2069297730922699, 0.46210387349128723, 0.299714803695...
After reading Jeff's blog post on [Protecting Your Cookies: HttpOnly](http://www.codinghorror.com/blog/archives/001167.html). I'd like to implement HttpOnly cookies in my web application. How do you tell tomcat to use http only cookies for sessions? httpOnly is supported as of Tomcat 6.0.19 and Tomcat 5.5.28. See the...
[ 0.4916684329509735, 0.08019137382507324, 0.6559412479400635, 0.067361980676651, 0.15362897515296936, -0.25405433773994446, 0.6786072254180908, 0.035540223121643066, -0.45513373613357544, -0.7150928974151611, -0.2036886066198349, 0.7240656614303589, -0.4786241948604584, 0.012826151214540005...
on the desired ***Context*** entry in **conf/server.xml** (in the same manner as above).
[ 0.2607605457305908, 0.18975412845611572, 0.6324794888496399, 0.014784281142055988, -0.008344932459294796, -0.20036934316158295, -0.10929235070943832, 0.2562834620475769, 0.15227137506008148, -0.6608237028121948, -0.6803581118583679, 0.1871485561132431, 0.21028518676757812, -0.0745691061019...
Is there a way to call out from a TSQL stored procedure or function to a webservice? Yes , you can create like this ``` CREATE PROCEDURE CALLWEBSERVICE(@Para1 ,@Para2) AS BEGIN Declare @Object as Int; Declare @ResponseText as Varchar(8000); Exec sp_OACreate 'MSXML2.XMLHTTP', @Object OUT; Exec sp_OAMet...
[ 0.00686581851914525, -0.11424087733030319, 0.5605030059814453, -0.16488489508628845, -0.2145901471376419, 0.14760813117027283, 0.06534910947084427, -0.5852085947990417, -0.08366775512695312, -0.3170723617076874, -0.35690271854400635, 0.546946108341217, -0.3298993706703186, 0.06491766870021...
Does anyone have a definitive answer to whether [Sql Server Management Objects](http://msdn.microsoft.com/en-us/library/ms162557.aspx) is compatible with Sql Server 7.0? The docs state: > Because SMO is compatible with SQL Server version 7.0, SQL Server 2000, SQL Server 2005, and SQL Server 2008, you easily manage a m...
[ -0.0002777657355181873, -0.0862945094704628, 0.6651117205619812, 0.23548869788646698, 0.09376493096351624, -0.3544057607650757, 0.45337483286857605, 0.11728332936763763, -0.32419028878211975, -0.5714033842086792, -0.0969838798046112, 0.38469886779785156, -0.42713841795921326, -0.1093157604...
SQL Server 7.0 the compatibility level is 70 Obviously this is conflicting information...I assume if your compatibility level of your DB is 70 you can not connect. To check run: EXEC sp\_dbcmptlevel '*databasename*' [Looking through this link](http://msdn.microsoft.com/en-us/library/aa259649.aspx), it seems you migh...
[ 0.11094194650650024, 0.13845571875572205, 0.9075059294700623, -0.12622269988059998, -0.2440638393163681, -0.5669589638710022, 0.2596927881240845, 0.05514155328273773, -0.008183018304407597, -0.5528699159622192, 0.02637830562889576, 0.8690194487571716, -0.4012640118598938, -0.04363543912768...
Do you have a good experience with a control library? Something that is kind of robust, well documented, consistent (across different controls) and quite well integrated into the Visual Studio. I'll second the vote for [Telerik](http://www.telerik.com). Their controls for the most part "just work" and their support has...
[ 0.8433935046195984, 0.04126378148794174, 0.3836685121059418, 0.2623438537120819, -0.23809590935707092, -0.17073820531368256, -0.08301984518766403, -0.21855270862579346, -0.1015065386891365, -0.5255850553512573, -0.07157581299543381, 0.5132176280021667, 0.31475675106048584, -0.1994174718856...
support reflects it. They aren't perfect, though. One issue that they had in the past, and that they've addressed in the latest releases (what they were calling their "Prometheus" controls, now just "Rad Controls for ASP.NET AJAX") is the performance of the controls. In previous releases they were definitely a bit slug...
[ -0.06181293725967407, -0.17274543642997742, 0.5108308792114258, 0.528011679649353, -0.19463607668876648, -0.06857571750879288, 0.16595569252967834, -0.02573632076382637, -0.1929440051317215, -0.4832153618335724, 0.2892508804798126, 0.5084672570228577, 0.14243704080581665, -0.45592498779296...
So I've looked at [this use](http://mjtemplate.org/examples/freebase/names.html?name=%EB%A1%9C%EB%A7%88&lang=ko) of the [freebase](http://freebase.com) API and I was really impressed with the translations of the name that it found. IE Rome, Roma, Rom, Rzym, Rooma,로마, 罗马市. This is because I have a database of some 5000+...
[ 0.7552474737167358, 0.22166933119297028, 0.22995217144489288, 0.16202843189239502, -0.06832646578550339, 0.0662844181060791, 0.33918577432632446, 0.32593950629234314, -0.17944851517677307, -0.4628198444843292, -0.3652505874633789, 0.014817042276263237, -0.25392958521842957, 0.2437623143196...
how it's organized could get me a link to that view which theoretically I could then export. Also I just wanted to share this question because I'm totally impressed with freebase and think if people haven't looked at it they should. I'll second the vote for [Telerik](http://www.telerik.com). Their controls for the mos...
[ 0.7869493961334229, -0.17554202675819397, 0.36375439167022705, 0.20720914006233215, -0.3783802390098572, -0.33296990394592285, -0.12173358350992203, -0.11194565147161484, -0.4169209897518158, -0.5246322154998779, -0.0876581221818924, 0.41631484031677246, 0.12542755901813507, -0.29570737481...
the ways customer's will use their controls. The documentation and support reflects it. They aren't perfect, though. One issue that they had in the past, and that they've addressed in the latest releases (what they were calling their "Prometheus" controls, now just "Rad Controls for ASP.NET AJAX") is the performance of...
[ -0.10654069483280182, -0.13383762538433075, 0.2926064133644104, 0.48721933364868164, -0.1878451555967331, -0.09303295612335205, 0.08189310878515244, 0.1849629282951355, -0.12711864709854126, -0.7339399456977844, 0.35384777188301086, 0.5683175921440125, 0.243759885430336, -0.303403556346893...
I'm starting a new web project and I am considering two presentation frameworks. I am thinking either about ASP.NET MVC or Silverlight. I would tend toward Silverlight since I'm quite experienced .NET developer while I have just a basic knowledge of ASP.NET controls. > It is mainly going to be an iternal > product so ...
[ 0.5030199885368347, 0.11270742118358612, 0.2520160973072052, -0.007311585359275341, -0.1001925989985466, -0.1193476989865303, 0.13725945353507996, 0.03567444905638695, -0.1888144463300705, -0.9013587832450867, 0.03128556162118912, 0.5266644358634949, 0.05447804555296898, 0.0982026010751724...