text
stringlengths
0
30.5k
title
stringclasses
1 value
embeddings
listlengths
768
768
Is there a way to get the current cpu load under Java without using the JNI? Use the [`ManagementFactory`](http://java.sun.com/javase/6/docs/api/java/lang/management/ManagementFactory.html) to get an [`OperatingSystemMXBean`](http://java.sun.com/javase/6/docs/api/java/lang/management/OperatingSystemMXBean.html) and cal...
[ -0.01211479865014553, -0.062345992773771286, 0.41197678446769714, 0.06096154823899269, 0.16844667494297028, 0.029788881540298462, -0.18822313845157623, -0.18760645389556885, -0.416469544172287, -0.5671926140785217, -0.2024511694908142, 0.6792668104171753, -0.1875671148300171, 0.00923983752...
I have managed to build an index in Solr which I can search on keyword, produce facets, query facets etc. This is all working great. I have implemented my search using a dismax query so it searches predetermined fields. However, my results are coming back sorted by score which appears to be calculated by keyword relev...
[ 0.009386840276420116, 0.027442896738648415, 0.5334627628326416, 0.21358968317508698, -0.2385014146566391, -0.533322811126709, 0.25760605931282043, -0.3259354531764984, -0.13719442486763, -0.5535063743591309, -0.16812320053577423, 0.7005358934402466, -0.08497624099254608, 0.2666221559047699...
an index of films!) but I find when I start adding more and more: ``` &bq=media:DVD^2&bq=media:BLU-RAY^1.5 ``` I find the negative results - e.g. films that are DVD but are **not** BLU-RAY get negatively affected in their score. In the end it all seems to even out and my score is as it was before i started boosting....
[ 0.2525777816772461, 0.151328444480896, 0.7857547998428345, 0.26003608107566833, -0.28376227617263794, -0.3054876923561096, -0.18644237518310547, -0.48663729429244995, -0.33859139680862427, -0.26196739077568054, 0.08091291040182114, 0.8480151891708374, -0.09645985811948776, 0.23163335025310...
you add the more the queryNorm value is reduced - and all scores are multiplied by this value.
[ 0.05480228364467621, -0.14170369505882263, 0.5585908889770508, 0.3842482268810272, -0.12929114699363708, -0.07449962943792343, 0.11509726196527481, -0.4351321756839752, -0.20364883542060852, -0.436117023229599, 0.028151771053671837, 0.48731356859207153, -0.1585884988307953, 0.1053017824888...
I want to copy an entire linux server that is going to be decommissioned over the network so we are sure nothing is lost. I did `du /` and was told there are 60 GB of under / Then I did `rsync -r / root@newserver:/old-server` and when doing `du` in the `old-server` dir I got 22 GB. So why is that difference? Is ther...
[ 0.4605638384819031, 0.264121949672699, 0.21989008784294128, -0.03924033045768738, 0.1692790538072586, -0.18423762917518616, 0.16669872403144836, -0.03337200731039047, -0.5049108862876892, -0.5367857217788696, -0.013208260759711266, 0.6364883184432983, -0.1949068158864975, 0.429743468761444...
testing showed that it does.) You can research this using [lsof](http://en.wikipedia.org/wiki/Lsof). The two main causes of this from my experience are deleting Apache logs without kicking the httpd and deleting mysql tables from the filesystem rather than by using DROP TABLE.
[ 0.2761978805065155, -0.0045252288691699505, -0.037218548357486725, 0.10928047448396683, 0.00474821450188756, -0.5311614274978638, 0.2735852599143982, 0.023133112117648125, -0.2817346155643463, -0.6256542205810547, 0.0351799838244915, 0.08201810717582703, -0.23195704817771912, 0.14962615072...
I've created a particular server control that has some methods I'd like to call from javascript. I know that the ScriptManager allows to call a web service or a page method. But I'd like to call a particular class method (I can do this with Anthem or even AjaxPro.NET). Is there a way to accomplish this using ScriptMan...
[ 0.4403432607650757, 0.005296191666275263, -0.07461590319871902, 0.17195990681648254, -0.033878542482852936, -0.3706648349761963, 0.058458320796489716, 0.24588948488235474, -0.34788450598716736, -0.9370236992835999, 0.24711757898330688, 0.4043182134628296, -0.07034920901060104, -0.115459769...
two main causes of this from my experience are deleting Apache logs without kicking the httpd and deleting mysql tables from the filesystem rather than by using DROP TABLE.
[ 0.11659837514162064, 0.08032021671533585, -0.2864472568035126, 0.20963697135448456, -0.17738568782806396, -0.39947256445884705, 0.5458667874336243, 0.028034983202815056, -0.19555947184562683, -0.439020037651062, -0.02221766859292984, 0.014995910227298737, -0.3247493803501129, 0.19614399969...
I thought it might be something I was doing wrong, but I am not seeing it working on any site, including Novemberborn.net. Any Ideas? The CSS is loaded, so the headlines are hidden, and then it is like the JS isn't loaded at all. Could this be a browser detection issue? I am using firefox 3 with latest flash player ...
[ 0.3811303973197937, 0.1560957282781601, 0.24571439623832703, 0.012984631583094597, -0.1275997757911682, -0.46211013197898865, 0.5501779317855835, 0.2843109369277954, -0.2098924219608307, -0.7403680086135864, -0.16914725303649902, 0.7469272017478943, -0.4269101321697235, -0.1717500835657119...
you're using the AdBlock extension. It breaks Flash under Firefox 3. You'll have to completely uninstall it.
[ 0.13104727864265442, 0.13872742652893066, 0.4905824661254883, -0.20781590044498444, 0.029119472950696945, -0.3860372304916382, 0.44092151522636414, -0.3260659873485565, -0.07032300531864166, -0.21360205113887787, -0.6012831926345825, 0.5755609273910522, -0.6617401242256165, -0.165753886103...
I'm writing PHP code to parse a string. It needs to be as fast as possible, so are regular expressions the way to go? I have a hunch that PHP string functions are more expensive, but it's just a guess. What's the truth? Here's specifically what I need to do with the string: Grab the first half (based on the third loc...
[ 0.34316596388816833, 0.14175796508789062, 0.08537929505109787, 0.14397256076335907, -0.19212684035301208, 0.1396857351064682, 0.28360262513160706, -0.04402027651667595, -0.17930972576141357, -0.23751994967460632, 0.27345675230026245, 0.3003792464733124, 0.05145006999373436, -0.286877810955...
into 8 (toss 1) and 8. Then I do some other stuff that converts those two 8 byte strings into dates. So that's the kind of thing I need to do. It depends on your case: if you're trying to do something fairly basic (eg: search for a string, replace a substring with something else), then the regular string functions are...
[ 0.2082693725824356, -0.18756194412708282, 0.1848328709602356, -0.03358747065067291, -0.1651427447795868, 0.09608995914459229, -0.0024598597083240747, 0.14362290501594543, -0.4595377445220947, -0.34104135632514954, 0.14958645403385162, 0.4356715679168701, -0.1828843057155609, -0.13047128915...
can tell you that the extra time spent hacking together the equivalent using the basic functions wouldn't be worth it. --- **Edit with the new information in the OP:** It sounds as though you actually need to do a number of small string operations here. Since each one individually is quite basic, and I doubt you'd b...
[ 0.41113051772117615, -0.03749287873506546, 0.054085902869701385, 0.1330188810825348, 0.04298848658800125, 0.1733206957578659, 0.3608570098876953, -0.09727390855550766, -0.28968414664268494, -0.5437490344047546, 0.10773752629756927, 0.70890212059021, 0.051122769713401794, -0.304258048534393...
bytes, throwing away anything left. Use: [`strpos()`](http://php.net/strpos) and [`substr()`](http://php.net/substr) Or : `/$(.*?0{6}.*?0{6}.*?)0{6}/` > Then grab the next 19 bytes after that, and split that into 8 (toss 1) and 8. Use: `substr()` - *(I assume you mean 17 bytes here -- 8 + 1 + 8)* ``` $part1 = su...
[ -0.21766513586044312, 0.03316598758101463, 0.32928231358528137, -0.06111544743180275, -0.10445602983236313, 0.6627820730209351, 0.07539062947034836, -0.4017733037471771, -0.6965213418006897, -0.11148423701524734, -0.3226534128189087, 0.20028318464756012, -0.21243460476398468, 0.04074306041...
In the following example, how can I save the value of role to the role with id=1 without loading it? I have tried: ``` Map user = new HashMap<String,Object>(); user.put("address","Address test"); user.put("role",1); session.save("User",user); ``` But that results in: ``` java.lang.ClassCastException: java.lang.I...
[ 0.07153084874153137, -0.1912378966808319, 0.5616596341133118, -0.16072821617126465, 0.05237342044711113, 0.05684636905789375, 0.09008566290140152, -0.5728824138641357, -0.1716611236333847, -0.7504686117172241, 0.04666731134057045, 0.5230809450149536, -0.27646979689598083, 0.125400543212890...
statement by joining the search table into the Cards table on Serial number.
[ 0.2609785497188568, 0.13596032559871674, 0.27898597717285156, 0.07207725942134857, -0.16682879626750946, -0.17319604754447937, 0.07247819006443024, 0.02223246358335018, -0.27775585651397705, -0.20418334007263184, -0.47977179288864136, 0.08868228644132614, -0.1744030863046646, 0.36602705717...
Basically i am quite new to PHP and recently i have had heard quite abit about SVN. After searching (googleing) for it, all i could really find was the SVN functions on the php.net website. Could someone please explain what SVN is, what its used for and is it worth learning? Thanks, Ben I think you may be wondering ...
[ 0.6359103918075562, -0.045452218502759933, 0.31905853748321533, 0.05732574313879013, -0.43752235174179077, -0.4805203378200531, 0.18942727148532867, 0.4261796772480011, -0.4475944936275482, -0.4290820062160492, 0.344558984041214, 0.4382428228855133, -0.24436508119106293, 0.2431692183017730...
developer has a working copy of the repository, he then makes changes to the files and commits the changes back to the repository. On our staging server all the changes are merged with the working copy on that server by using subversion update. Subversion merges all changes for each file and if any conflicts happen let...
[ 0.6044491529464722, -0.20204712450504303, 0.41932040452957153, 0.22248917818069458, 0.38158196210861206, 0.11416764557361603, 0.022420048713684082, -0.33410441875457764, -0.11041547358036041, -0.8646596074104309, 0.04150548577308655, 0.4700697064399719, -0.3526618480682373, -0.101897090673...
benefit in using subversion is the ability to merge changes so that more than one developer can work on the same file. Version control is also a big benefit, since it allows you to revert the application back to a know good working copy with just a few commands, or retrieve a deleted file from a past version.
[ 0.24747055768966675, -0.5159901976585388, 0.24317124485969543, 0.3404127359390259, -0.10749031603336334, -0.44226935505867004, 0.10301608592271805, 0.20615987479686737, -0.3679208755493164, -0.683768630027771, -0.14945952594280243, 0.33972305059432983, -0.3286415934562683, 0.26713228225708...
If I want to use objects as the keys for a `Dictionary`, what methods will I need to override to make them compare in a specific way? Say I have a a class which has properties: ``` class Foo { public string Name { get; set; } public int FooID { get; set; } // elided } ``` And I want to create a: ``` ...
[ -0.020039483904838562, 0.4324500858783722, 0.05142613500356674, 0.022277530282735825, -0.17572283744812012, 0.2020346224308014, 0.12817806005477905, -0.3394008278846741, 0.18555599451065063, -0.6807620525360107, 0.008696305565536022, 0.5529177784919739, -0.3915017545223236, 0.2102586477994...
into lists, grouped by `Foo` objects. `Stuff` objects will have a `FooID` to link them to their category. By default, the two important methods are `GetHashCode()` and `Equals()`. It is important that if two things are equal (`Equals()` returns true), that they have the same hash-code. For example, you might "return Fo...
[ -0.05218299850821495, 0.05058345943689346, 0.3422534167766571, -0.08400620520114899, 0.03190141171216965, -0.26856258511543274, 0.13704615831375122, -0.39856359362602234, -0.24947604537010193, -0.4966900646686554, -0.24999716877937317, 0.4259226620197296, -0.5411088466644287, -0.0312904343...
return FooID; } public override bool Equals(object obj) { return Equals(obj as Foo); } public bool Equals(Foo obj) { return obj != null && obj.FooID == this.FooID; } } ``` Finally, another alternative is to provide an `IEqualityComparer<T>` to do the same.
[ -0.33423203229904175, 0.08656256645917892, 0.49185672402381897, -0.304204523563385, -0.05255047604441643, -0.0013195631327107549, 0.45966312289237976, -0.2884938418865204, 0.17045985162258148, -0.4374602735042572, -0.1219303235411644, 0.7105607390403748, -0.5842761993408203, -0.07388558983...
I'm having a problem while trying to call a custom Model method from my Form `clean` method. Here is [part of] my model: <http://dpaste.com/hold/12695/> Here is my Form: <http://dpaste.com/hold/12699/> I'm specifically having a problem with line 11 in my Form: `nzb_data = File.get_nzb_data(nzb_absolute)` T...
[ 0.3530772030353546, 0.22127194702625275, 0.43538421392440796, -0.1665664166212082, 0.14766235649585724, 0.0965021401643753, 0.5597677230834961, -0.1403837502002716, -0.2535882294178009, -0.35410812497138977, 0.015017070807516575, 0.728866457939148, -0.10855315625667572, -0.0458020828664302...
wrong here, and what can be done to resolve the issue? --- **Solved** by making the `get_nzb_data` method a class method using the `@classmethod` decorator. You can't call ``` nzb_data = File.get_nzb_data(nzb_absolute) ``` because your using the class, not an object. You have two choices. 1. Make `get_nzb_data`...
[ 0.2659837007522583, 0.11844713240861893, 0.22379407286643982, 0.08672629296779633, -0.005995335057377815, -0.008628600277006626, 0.2901117503643036, -0.37207338213920593, -0.15075314044952393, -0.599064826965332, -0.1173589900135994, 0.734220564365387, -0.397464394569397, 0.383406072854995...
What are the best practices for doing DOM insertion? * Is it faster to insert large chunks of html vs element at a time in a loop? * Does it matter what html you are inserting, or only how big the chunk is? * It it faster to insert a table, vs inserting just the rows using the table hack? innerHTML insertion is margin...
[ 0.09747371077537537, -0.3246016204357147, 0.03446333855390549, 0.06343860179185867, -0.26743027567863464, -0.011846103705465794, 0.2276764214038849, -0.43053874373435974, -0.4088052809238434, -0.4084816575050354, -0.1158527135848999, 0.6867809891700745, -0.18509404361248016, -0.43461954593...
these days that the speed gains of innerHTML do not justify the risks for anything but the largest of insertions/iteration batches. Long story short, you want to do the fewest DOM manipulations possible, so one tip when creating a hierarchy for insertion is to create them against each other in memory and then insert t...
[ 0.10780372470617294, -0.3587839603424072, 0.3399924039840698, 0.18411000072956085, -0.037728603929281235, -0.06184189394116402, 0.2468024492263794, -0.05207069590687752, -0.175816148519516, -0.5774500966072083, 0.11334898322820663, 0.581180214881897, 0.09475050121545792, -0.241235718131065...
We're starting a project written in Java in a company which works purely on MS technologies. Microsoft Team System is used as source control tool. A question is whether we should try to integrate Eclipse with MTS (which makes sense from the top level as there would be still a single repository for the company) or we sh...
[ 0.39113256335258484, -0.0411464124917984, -0.15089498460292816, 0.3852156698703766, -0.21986012160778046, -0.21925757825374603, -0.060421399772167206, -0.09848460555076599, -0.19128964841365814, -0.5136366486549377, -0.0594860278069973, 0.35969164967536926, -0.25426679849624634, -0.2374040...
makes sense or not depends on the environment. If you are one of many projects, just one that happens to be Java, it does not make sense to reinvent the wheel and implement SVN, unless the business is making a clean deliniation between Java projects and MS projects ... and realizing they have two places to get metrics ...
[ 0.5135656595230103, 0.10809492319822311, -0.10272158682346344, 0.39606165885925293, 0.05197877809405327, -0.24606183171272278, 0.0884314700961113, 0.07314720004796982, -0.2196340262889862, -0.7411318421363831, 0.27190858125686646, 0.2765461206436157, -0.26356393098831177, 0.025925271213054...
I saw [this question](https://stackoverflow.com/questions/23860/what-is-the-best-way-to-learn-recursion), but the answers there are not very relevant. A friend needs a bank of solved recursion problems to help him study for a test **tomorrow**. He learned the issue theoretically, but is having problems grasping how to...
[ 0.009965389966964722, 0.13215026259422302, -0.05909325182437897, 0.3471680283546448, 0.060973428189754486, -0.251021146774292, 0.25203457474708557, 0.029499564319849014, -0.2386721819639206, -0.4329363703727722, -0.059509340673685074, 0.37839412689208984, 0.02098865434527397, -0.3255195021...
at this point (it might be educational on other, less stressed times). [This article](http://en.wikipedia.org/wiki/Recursion_(computer_science)) explains recursion and has some simple C examples for traversing linked list and binary tree
[ -0.21410171687602997, 0.14088425040245056, -0.09367735683917999, 0.21573008596897125, -0.2026725560426712, -0.34985482692718506, 0.316659152507782, -0.17168307304382324, -0.5281352400779724, -0.08020924776792526, -0.4716794788837433, 0.22325140237808228, -0.24067021906375885, -0.1165731027...
I am looking for a library to generate svg diagrams in python (I fetch data from a sql database). I have found [python-gd](http://newcenturycomputers.net/projects/gdmodule.html), but it has not much documentation and last update was in 2005 so I wonder if there are any other libraries that are good for this purpose. I...
[ 0.11451549828052521, -0.08210224658250809, 0.5548964738845825, -0.06880611181259155, -0.6561636328697205, 0.2085343301296234, 0.00028951658168807626, -0.15731197595596313, -0.35505881905555725, -0.6179139018058777, 0.07511710375547409, 0.24026446044445038, -0.35691994428634644, -0.06130120...
few of its capabilities. Using the trunk version available at [launchpad](http://launchpad.net/cairoplot) you'll be able to add a legend box and add axis titles. Besides that, using the trunk version, it's possible to generate: * DotLine charts (the ones I believe you need) * Scatter charts * Pie/Donut charts * Horiz...
[ 0.3732073903083801, -0.19842423498630524, 0.6573702096939087, 0.3334991931915283, 0.07099231332540512, 0.04060572385787964, 0.07839335501194, -0.018478715792298317, -0.42553699016571045, -0.7864223122596741, 0.0009025339386425912, 0.16916929185390472, -0.21070823073387146, 0.07597894221544...
What unusual, unexpected consequences have occurred in terms of performance, memory, etc when switching from running your .NET applications under the 64 bit JIT vs. the 32 bit JIT? I'm interested in the good, but more interested in the surprisingly bad issues people have run into. I am in the process of writing a new ...
[ 0.3026861548423767, 0.27591437101364136, 0.050480347126722336, 0.08271550387144089, 0.014433645643293858, -0.018583105877041817, 0.2698659300804138, 0.2049233466386795, -0.18539462983608246, -0.901782214641571, -0.1741289496421814, 0.6219356060028076, -0.10006269067525864, 0.10408973693847...
the size of the struct, etc.) However, [this question and it's answer](https://stackoverflow.com/questions/632831/why-are-public-fields-faster-than-properties) got me thinking - What other issues am I overlooking? There have been many questions and blog posts that skirt around this issue, or hit one aspect of it, but...
[ -0.020825009793043137, 0.20161719620227814, 0.07885086536407471, 0.18793988227844238, -0.2652536928653717, -0.02494891546666622, 0.12094273418188095, 0.004534238483756781, -0.39765968918800354, -0.47129160165786743, 0.010683486238121986, 0.4995020627975464, -0.11644478887319565, 0.09429559...
(using .NET 3.5sp1). Here are a few issues I'm currently aware of: * ([Now I know that](https://stackoverflow.com/questions/632831/why-are-public-fields-faster-than-properties)) Properties, even automatic properties, don't get inlined in x64. * The memory profile of the application changes, both because of the [size ...
[ -0.05503928288817406, 0.07517460733652115, 0.32197511196136475, 0.03886749595403671, -0.014858282171189785, -0.27311059832572937, 0.31012237071990967, 0.007235153112560511, -0.536000669002533, -0.7431055307388306, -0.21093833446502686, 0.593248188495636, -0.06277689337730408, 0.08923190832...
the system is often bad. I also know that portability to 64bit has its own issues - we run and test on 64bit systems daily to help with this. etc. My application, however, is not your typical business application. It's a scientific software application. We have many processes that sit using 100% CPU on all of the core...
[ 0.25785818696022034, 0.503055214881897, -0.06795965135097504, 0.20109319686889648, -0.07212890684604645, -0.04021923989057541, 0.4305386543273926, 0.4306460916996002, -0.1329476237297058, -0.560461699962616, 0.18517982959747314, 0.41754886507987976, -0.13422319293022156, 0.2642173171043396...
the JIT, etc, can be very difficult to pin down when you're running under a profiler. Hence my need for the question. I remember hearing an issue from an IRC channel I frequent. It optimises away the temporary copy in this instance: ``` EventHandler temp = SomeEvent; if(temp != null) { temp(this, EventArgs.Empty);...
[ -0.07391845434904099, -0.3117828369140625, -0.13534106314182281, -0.01648702286183834, 0.001726169721223414, -0.04648098722100258, 0.10642090439796448, 0.21827439963817596, 0.16522322595119476, -0.4834918677806854, 0.03266708180308342, 0.4906974732875824, -0.26904815435409546, 0.2396917790...
I'm playing around, trying to write some code to use the [tr.im](http://www.programmableweb.com/api/tr.im) APIs to shorten a URL. After reading <http://docs.python.org/library/urllib2.html>, I tried: ``` TRIM_API_URL = 'http://api.tr.im/api' auth_handler = urllib2.HTTPBasicAuthHandler() auth_handler.add_pass...
[ 0.5823156833648682, 0.0063471924513578415, 0.20696143805980682, -0.23741553723812103, 0.19088570773601532, 0.0635688379406929, 0.144780233502388, -0.012313194572925568, -0.17940616607666016, -0.3873031437397003, 0.0010642606066539884, 0.292311429977417, -0.22782424092292786, 0.163500294089...
passwd=PASSWORD) opener = urllib2.build_opener(auth_handler) urllib2.install_opener(opener) response = urllib2.urlopen('%s/trim_simple?url=%s' % (TRIM_API_URL, url_to_trim)) url = response.read().strip() ``` response.code is 200 (I think it should be 202). url is valid, but t...
[ 0.17669571936130524, -0.1728849858045578, 0.7612765431404114, -0.17499172687530518, -0.3430853486061096, -0.00538219977170229, 0.6754769682884216, -0.6452042460441589, -0.0593445710837841, -0.8339629173278809, -0.3107004165649414, 0.5449029803276062, -0.05664701387286186, -0.07524017244577...
[http://tr.im/?page=1](http://ttp://tr.im/?page=1)). After reading <http://www.voidspace.org.uk/python/articles/authentication.shtml#doing-it-properly> I also tried: ``` TRIM_API_URL = 'api.tr.im/api' password_mgr = urllib2.HTTPPasswordMgrWithDefaultRealm() password_mgr.add_password(None, TRIM_API_URL, USERN...
[ 0.27354171872138977, -0.0069553605280816555, 0.6436869502067566, -0.23663514852523804, -0.09505829215049744, 0.18509416282176971, 0.6518213152885437, -0.9368060231208801, -0.20174869894981384, -0.4630877375602722, -0.3802066743373871, 0.7415339350700378, -0.05418504774570465, -0.2350796610...
instead of basic HTTP authentication, like this: ``` TRIM_API_URL = 'http://api.tr.im/api' response = urllib2.urlopen('%s/trim_simple?url=%s&username=%s&password=%s' % (TRIM_API_URL, url_to_trim,
[ 0.11276540905237198, -0.22283102571964264, 0.29138779640197754, -0.18147650361061096, 0.06722275912761688, -0.10331077128648758, 0.4489660859107971, -0.5427101850509644, 0.024026434868574142, -0.4909830689430237, -0.3766005337238312, 0.6486200094223022, -0.24695749580860138, -0.20056419074...
USERNAME, PASSWORD)) url = response.read().strip() ``` ...then not only is url valid but it's recorded in my tr.im account. (Though response.code is still 200.) There must be something wrong with my code though (and not tr.im's API), because ``` $ curl -u yacitus:xxxx http://api....
[ -0.030839039012789726, 0.4009254574775696, 1.0735756158828735, -0.0914342850446701, 0.24592840671539307, -0.17858555912971497, 0.5186062455177307, 0.017063597217202187, -0.037006501108407974, -0.4741968810558319, -0.16605466604232788, 0.47780272364616394, 0.011988341808319092, 0.2554327547...
curl -u yacitus:xxxx http://api.tr.im/api/trim_url.json?url=http://www.google.co.uk ``` ...again, I get: ``` {"trimpath":"hfhb","reference":"nH45bftZDWOX0QpVojeDbOvPDnaRaJ","trimmed":"11\/03\/2009","destination":"http:\/\/www.google.co.uk\/","trim_path":"hfhb","domain":"google.co.uk","url":"http:\/\/tr.im\/hfhb","vi...
[ -0.16012179851531982, 0.2395583540201187, 1.1599117517471313, -0.21348412334918976, -0.3168104290962219, -0.09574422240257263, 0.2618177831172943, -0.3374999761581421, -0.19750656187534332, -0.28371667861938477, 0.15436893701553345, 0.6087947487831116, -0.4326583445072174, -0.0696484968066...
base64string) result = urllib2.urlopen(request) ```
[ -0.14361383020877838, 0.12786048650741577, 0.45368069410324097, -0.22374261915683746, 0.2922827899456024, -0.11491157859563828, 0.29197970032691956, -0.3490016460418701, -0.14789582788944244, -0.15619339048862457, -0.16189639270305634, 0.4186881482601166, -0.33728885650634766, 0.4076182246...
What is a good tool or site to use to performance test a web page/site? I am trying to find a good baseline to detect how fast my page will load on one hosting provider vs another. I initially used <http://www.freespeedtest.com/> but like to get opinions and links for others. I use Firefox with the [FireBug](https://ad...
[ 0.43458908796310425, 0.18436314165592194, 0.30054256319999695, -0.10399600118398666, -0.07912126183509827, -0.24687668681144714, -0.11497238278388977, -0.29338470101356506, -0.17309801280498505, -0.7380803823471069, 0.24241359531879425, 0.6428466439247131, -0.4065439701080322, -0.354536324...
When a method being called in the success or enter phases of a state transition throw errors, what is the best way to catch this and ensure that the state reverts back to the previous state. I'm using the AASM gem. What about using the :guard option to make sure the transition can be performed? If the guard method re...
[ 0.39849233627319336, -0.11706162989139557, -0.1965760886669159, 0.16385923326015472, 0.11566668003797531, -0.14787432551383972, 0.48498666286468506, -0.5525853037834167, -0.06334816664457321, -0.4629942774772644, 0.12081277370452881, 0.9444186687469482, -0.01681341975927353, -0.22094485163...
I'm just curious why class/property attributes in VB.NET have a weird optional syntax such as: ``` <TestAttr("a", "abc", Optional1:="foo", Optional2:=3)> ``` VB.NET allows you to set optional parameters like this to avoid order restrictions (which is lovely) but in this case it's forcing you to that. For example th...
[ 0.5398856401443481, 0.10830709338188171, -0.13820236921310425, 0.0205855593085289, -0.1528187245130539, -0.25893333554267883, 0.17126332223415375, -0.07888420671224594, -0.21592219173908234, -0.3512089252471924, -0.011070432141423225, 0.6115161180496216, -0.27253907918930054, -0.0496836937...
of the attribute which have no corresponding parameter in the constructor. VB.Net chose to have the same syntax as it's call by name syntax. If you open TestAttr in reflector, I think you will find the class has a constructor which takes 2 arguments and has 2 public fields with names Optional1 and Optional2.
[ 0.2607772648334503, -0.31522294878959656, -0.10972782969474792, 0.17042718827724457, -0.40053096413612366, 0.15508899092674255, 0.16995957493782043, -0.2526012659072876, 0.0887155681848526, -0.41370689868927, 0.024704331532120705, 0.5673539638519287, -0.14640693366527557, -0.06944641470909...
I'm trying to create a function that will take a string which could be over multiple lines, e.g.: ``` "declare notThese declare orThis hello = $notThis@butthis$ butNot= $ButNotThis$ andDefNot = getDate()" ``` And search through it, pulling out `{string1}`'s from all parts like ``` ${whatever}@{string1}$ ``` an...
[ 0.09683657437562943, -0.18939973413944244, 0.3679558336734772, -0.01722581684589386, -0.15302376449108124, 0.14398175477981567, 0.25879859924316406, -0.3047525882720947, -0.14890699088573456, -0.6307404041290283, -0.10394309461116791, 0.36052796244621277, -0.39671602845191956, 0.0870398357...
RegExp re.Pattern = "\$[^@]+@([^$]+)\$" re.Global = True Set matches = re.Execute(input) ReDim output(matches.Count - 1) i = 0 For Each match in matches output(i) = match.SubMatches(0) i = i + 1 Next ExtractStrings = output End Function ```
[ -0.19914676249027252, -0.27767708897590637, 0.780447781085968, -0.25090160965919495, 0.0876656025648117, -0.04919306933879852, 0.42934730648994446, -0.4965299963951111, -0.21515679359436035, -0.47392669320106506, -0.23344451189041138, 0.4210481643676758, -0.6416015625, 0.21591705083847046,...
When calling a WCF service from a console app, asp.net app, wpf/winform app, you have to have a app.config or web.config file for the WCF service endpoint information. But from FitNesse, I'm calling a fixture which is a .dll (class library) and this fixture is calling my WCF service. It can't call the service because I...
[ 0.7227901220321655, -0.06927917897701263, 0.6535497307777405, -0.11742409318685532, -0.1428074985742569, 0.18179799616336823, 0.0933229923248291, -0.3014013469219208, -0.21419164538383484, -0.8513597249984741, 0.1419883668422699, 0.42571231722831726, -0.6438465714454651, 0.2940889596939087...
path to that config file in my FitNesse page, like this. !path C:\fitnesse20090214\fitnesse\dotnet\app.config
[ 0.3758603632450104, -0.08231384307146072, 0.48776283860206604, 0.10198140889406204, 0.4621657729148865, 0.058918457478284836, 0.430303156375885, -0.12772990763187408, -0.2417290061712265, -0.9445684552192688, 0.03586752340197563, 0.3571832478046417, -0.5470691323280334, -0.3347664177417755...
The question ["How can I monkey-patch an instance method in Perl?"](https://stackoverflow.com/questions/449690/how-can-i-monkey-patch-an-instance-method-in-perl) got me thinking. Can I dynamically redefine Perl methods? Say I have a class like this one: ``` package MyClass; sub new { my $class = shift; my $val = s...
[ -0.01063079759478569, -0.0825267881155014, 0.053232740610837936, -0.22083061933517456, -0.22070923447608948, 0.25908833742141724, 0.3774859607219696, -0.2064736783504486, -0.4589831233024597, -0.4332565665245056, 0.08468212187290192, 0.4088379442691803, -0.7080822587013245, -0.082038730382...
return a cached value. I could easily modify the method to include caching, but: * I have a bunch of methods like this. * I'd rather not dirty up this method. What I really want to do is specify a list of methods that I know always return the same value for a given instance. I then want to take this list and pass it...
[ 0.24824440479278564, 0.20221146941184998, 0.062442854046821594, -0.008947070688009262, -0.08327733725309372, -0.3069596290588379, 0.4757826626300812, 0.048580825328826904, 0.030385524034500122, -0.5171810984611511, 0.17920134961605072, 0.5909131765365601, -0.5017405152320862, 0.18885113298...
myfn { printf("computing\n"); return 10; } sub cache_fn { my $fnref = shift; my $orig = $fnref; my $cacheval; return sub { if (defined($cacheval)) { return $cacheval; } $cacheval = &$orig(); return $cacheval; } } *{myfn} = cache_fn(\&myfn); ``` How do I modify to just do this?: ``` cache...
[ 0.10558682680130005, 0.05129135027527809, 0.48045268654823303, -0.39410266280174255, 0.04108242690563202, 0.14298202097415924, 0.5673478245735168, -0.4098880887031555, -0.012506743893027306, -0.5397541522979736, -0.15894155204296112, 0.5886328220367432, -0.4537375867366791, 0.2092427611351...
my $method_name = 'MyClass::' . $meth; no strict 'refs'; *{$method_name} = sub { return $some_cached_value }; } ``` Is that what you imagine?
[ 0.18332213163375854, 0.3148292601108551, 0.12309832870960236, -0.27949175238609314, 0.24451543390750885, -0.17663833498954773, 0.3719634711742401, 0.10215697437524796, -0.08744095265865326, -0.37312978506088257, 0.07667814195156097, 0.2619553208351135, -0.3197377920150757, 0.41021344065666...
So lets say I have these classes: ``` public class Person { public string Name { get; set; } } public class PersonCollection : ObservableCollection<Person> { } ``` And lets say I have a ListView whose ItemsSource is bound to a PersonCollection. Now lets say I have this code: ``` public void AddPeople() { ...
[ -0.28313693404197693, -0.12040876597166061, 0.6426911354064941, -0.17153577506542206, -0.14643920958042145, 0.24741557240486145, 0.002886659000068903, -0.4171657860279083, -0.3054251968860626, -0.6761051416397095, -0.23969322443008423, 0.5042273998260498, -0.2152082920074463, 0.14367383718...
lets say items with index 0 and 2 in the ListView. The ListView.SelectedItems property will say I have ONE item selected since both visually selected items are the SAME object. So how can I get the visually selected items so I can remove the items at indices 0 and 2, without removing the item at index 1? In WinForm...
[ 0.031487446278333664, -0.23334269225597382, 0.41826391220092773, 0.16335609555244446, -0.04591572657227516, -0.33876827359199524, 0.02055981568992138, -0.21310274302959442, -0.18972563743591309, -0.8837743997573853, -0.12778691947460175, 0.33983391523361206, -0.11435108631849289, 0.4341928...
could return null if you scroll away from the item and it gets virtualized. The code would look something like this: ``` for(int ixPerson = myListView.Items.Count - 1; ixPerson >= 0; ixPerson--) { ListViewItem personItem = myListView.ItemContainerGenerator.ContainerFromIndex(ixPerson); if (personItem.IsSelected...
[ -0.37709182500839233, -0.45693036913871765, 0.368094801902771, -0.007322521414607763, -0.03631233796477318, 0.34135591983795166, 0.38909831643104553, -0.011756310239434242, -0.3432772755622864, -0.5430812835693359, -0.17768733203411102, 0.13479506969451904, -0.410844087600708, 0.4758134484...
I'm encountering a very strange problem: my delete actions in rails don't work anymore. Even if I create everything by the scaffold command, every click on delete just sends me to the show view of the object, which should be deleted. ``` script/generate scaffold myitem description:text ``` This isn't only in one pr...
[ 0.14513108134269714, 0.2103070169687271, 0.20080991089344025, -0.018948936834931374, -0.08025810867547989, -0.17307330667972565, 0.31449276208877563, 0.08979500830173492, -0.47164255380630493, -0.4703909754753113, 0.05687055364251137, 0.4226854145526886, -0.3153592646121979, 0.088238134980...
Firefox. When I clicked on *Answer you own question* here on Stackoverflow, I had the very same problem: My request, wasn't processed properly. I was sent back to the normal question view, without having the ability to submit my own answer. So after a restart of Firefox everything worked fine. (I also reinstalled Rub...
[ 0.11059558391571045, -0.05446093529462814, 0.16733360290527344, -0.10275361686944962, -0.4357411861419678, -0.22463883459568024, 0.4244633615016937, 0.05914585292339325, -0.31825849413871765, -0.500136137008667, -0.026426266878843307, 0.7765172123908997, -0.4795311987400055, -0.04446401074...
Here is an example of what I want to accomplish and how: ``` class MyClass { public: void Dummy() const{} }; typedef void (MyClass::*MemFunc)(); void (const MyClass * instance) { MemFunc func=&MyClass::Dummy; // (instance->*func)(); //gives an error (const_cast<MyClass *>instance->...
[ 0.07960058748722076, 0.31410345435142517, 0.11091652512550354, -0.1549627184867859, -0.02475949563086033, -0.18171270191669464, 0.5782067775726318, -0.38892099261283875, -0.30679482221603394, -0.4335339069366455, -0.16089031100273132, 0.7093337178230286, -0.4654833674430847, 0.064388215541...
is in the line before. Change the typedef to ``` typedef void (MyClass::*MemFunc)() const; ``` To make it a pointer to a const member function type. The difference might be more clear when considering this code and how it works: ``` typedef void FunctionType() const; typedef FunctionType MyClass::*MemFunc; ``` ...
[ -0.24736082553863525, 0.0286357793956995, 0.43669193983078003, -0.07954081892967224, -0.05704977363348007, -0.01905067265033722, -0.043080855160951614, 0.05686549097299576, -0.03288337215781212, -0.6150980591773987, -0.23646856844425201, 0.386434942483902, -0.5317949652671814, 0.3287448585...
On my submit button, what I'd like to do is OnClick show a "Please wait" panel and hide the button, UNLESS the validators say something's invalid - then I need the buttons still showing obviously. Otherwise I have a validation summary showing erros and no way to submit again. Most articles I find about doing this want...
[ 0.1825636476278305, 0.10552840679883957, 0.5078014135360718, -0.13323716819286346, -0.02786559984087944, 0.0028264878783375025, 0.43884941935539246, -0.16399350762367249, -0.07336992025375366, -0.6051088571548462, 0.020513301715254784, 0.6350664496421814, -0.40469682216644287, 0.2383663505...
alert("PleaseWaitShow()"); var isPageValid = true; // Do nothing if client validation is not active if (typeof(Page_Validators) == "undefined") { if (typeof(Page_ClientValidate) == 'function') { isPageValid = Page_ClientValidate(); alert("Page_Client...
[ -0.02666468173265457, -0.2416352480649948, 0.9601462483406067, -0.415770560503006, 0.0048366812989115715, -0.23673853278160095, 0.7500436305999756, -0.43442028760910034, -0.06274712085723877, -0.4810749590396881, -0.4788975715637207, 0.6490514278411865, -0.42579150199890137, -0.14891509711...
alert("Page_IsValid=" + Page_IsValid); } else { alert("Page_ClientValidate function undefined"); } } else { alert("Page_Validators undefined"); } if(isPageValid)
[ -0.5530909895896912, -0.3055358827114105, 0.8251389861106873, -0.3070700168609619, -0.0282405074685812, -0.20310811698436737, 0.1761002093553543, -0.23060302436351776, -0.21455173194408417, -1.0549806356430054, -0.4132729470729828, 0.6343722939491272, -0.5782052278518677, -0.11307612061500...
{ // Hide submit buttons document.getElementById('pnlSubmitButton').style.visibility = 'hidden'; document.getElementById('pnlSubmitButton').style.display = 'none'; // Show please wait panel document.getElementById('pnlPleaseWait').style.visibility = 'visible'; ...
[ 0.2279929667711258, -0.09047644585371017, 0.10705620795488358, -0.2132626324892044, -0.005971658043563366, 0.34296926856040955, 0.39671558141708374, -0.38976871967315674, -0.0743817612528801, -0.5209295153617859, -0.39582309126853943, 0.3136265277862549, -0.510613203048706, 0.0549069754779...
alert("page not valid - don't show please wait"); } } catch(er) { alert("ERROR in PleaseWaitShow(): " + er); } } ``` I believe I've found a "kind of" answer. I still cannot identify why my page will not identify "Page\_ClientValidate()" or "Page\_IsValid" - this part is still unanswered. However...
[ -0.031018514186143875, 0.172887921333313, 0.7769075632095337, -0.2265007495880127, 0.1510773003101349, -0.04673183336853981, 0.6116698384284973, -0.3999481797218323, -0.2309865802526474, -0.5560094714164734, -0.2576495409011841, 0.7914928197860718, -0.28435635566711426, 0.01878743059933185...
PeterBlum to catch them all. Not the greatest solution, but better than I've gotten so far. I'm still open to answers on the "Page\_IsValid" portion.
[ 0.14684723317623138, -0.25385338068008423, 0.3450333774089813, 0.34552422165870667, 0.1920827478170395, 0.29597023129463196, 0.056923117488622665, 0.1215912327170372, -0.20096056163311005, -0.6047013998031616, -0.17873752117156982, 0.15832304954528809, -0.35226425528526306, -0.055762942880...
The question is how long have these customers been jerks on any given date. I'm working against Sybase For this simplified table structure of table history\_data ``` table: history_of_jerkiness processing_date name is_jerk --------------- ----- ------- 20090101 Matt true 20090101 Bob false ...
[ -0.12988469004631042, 0.30399858951568604, 0.43332189321517944, -0.07563675194978714, -0.5066799521446228, 0.11988834291696548, 0.5540542602539062, 0.5810826420783997, -0.3447962701320648, 0.13708873093128204, -0.046027157455682755, 0.25147703289985657, -0.07708191871643066, -0.05937042459...
Matt true 20090102 Bob true 20090102 Alex false 20090102 Carol true 20090103 Matt true 20090103
[ -0.18217973411083221, 0.454351007938385, 0.12661178410053253, -0.31122472882270813, -0.289084792137146, 0.19089375436306, 1.094043493270874, 0.31238853931427, 0.13362425565719604, -0.0597531720995903, -0.11082358658313751, 0.293879896402359, -0.13206329941749573, -0.38814935088157654, -0...
Bob true 20090103 Alex true 20090103 Carol false ``` The report for the 3rd should show that Matt has always been a jerk, Alex has just become a jerk, and Bob has been a jerk for 2 days. ``` name days jerky ----- ---------- Matt 3 Bob 2 Alex
[ -0.09066732227802277, 0.3106977939605713, 0.878462553024292, -0.09877294301986694, -0.22249136865139008, 0.13221541047096252, 1.0299406051635742, 0.19622088968753815, -0.5790494680404663, -0.08437730371952057, 0.09787879884243011, 0.1262759566307068, -0.40492865443229675, 0.180677831172943...
1 ``` I'd like to find these spans of time dynamically, so if I run the report for the 2nd, I should get different results: ``` name days_jerky ----- ---------- Matt 2 Bob 1 Carol 2 ``` The key here is trying to find only continuous spans older than a certain date. I've found a few leads, but it se...
[ 0.16720353066921234, 0.29942086338996887, 0.9215068817138672, 0.016414325684309006, 0.08512937277555466, -0.2881290912628174, 0.26417994499206543, 0.19868488609790802, -0.6626747846603394, -0.4724818170070648, -0.04759976267814636, 0.16153346002101898, -0.35968339443206787, 0.0640894621610...
there is an entry for each day for each person. If that isn't true then I'd have to loop. ``` DECLARE @run_date datetime DECLARE @min_date datetime SET @run_date = {d '2009-01-03'} -- get day before any entries in the table to use as a false baseline date SELECT @min_date = DATEADD(day, -1, MIN(processing_date)) FRO...
[ 0.07395197451114655, -0.2595785856246948, 0.5825815200805664, 0.08618912100791931, -0.27571773529052734, 0.3088257312774658, 0.3723137080669403, 0.2506837844848633, -0.34592339396476746, -0.10024091601371765, 0.09418774396181107, 0.06854265183210373, 0.013170459307730198, 0.317233800888061...
is_jerk FROM history_of_jerkiness UNION ALL SELECT DISTINCT @min_date, [name], 0 FROM history_of_jerkiness ) as data WHERE is_jerk = 0 AND processing_date <= @run_date GROUP BY [name] HAVING DATEDIFF(day, MAX(processing_date), @run_date) > 0 ``` I created the test table with the following: ``` ...
[ -0.38659167289733887, -0.07523535937070847, 0.6041613221168518, -0.05162081494927406, -0.3407083749771118, 0.6007477641105652, 0.23234568536281586, -0.12099577486515045, -0.19254164397716522, -0.13972802460193634, -0.03214365616440773, -0.06816917657852173, -0.06378106027841568, 0.54343187...
1) INSERT INTO history_of_jerkiness (processing_date, [name], is_jerk) VALUES ({d '2009-01-02'}, 'Matt', 1) INSERT INTO history_of_jerkiness (processing_date, [name], is_jerk) VALUES ({d '2009-01-02'}, 'Bob', 1) INSERT INTO history_of_jerkiness (processing_date, [name], is_jerk) VALUES ({d '2009-01-02'}, 'Alex', 0) INS...
[ -0.3466912508010864, 0.2090092897415161, 0.5021482110023499, -0.06550625711679459, 0.039089132100343704, 0.46519404649734497, 0.22761762142181396, 0.13173146545886993, -0.42351436614990234, -0.26626479625701904, -0.08147290349006653, 0.243825763463974, -0.4010186195373535, 0.48913511633872...
Is it possible to disable a button in a DataGridTemplateColumn? I have a DataGridTemplate as follows: ``` <toolkit:DataGridTemplateColumn Header="Timer" Width="50"> <toolkit:DataGridTemplateColumn.CellTemplate> <DataTemplate> <Button Content="Star...
[ -0.0439070425927639, 0.031090164557099342, 0.20705367624759674, -0.18444210290908813, 0.45674511790275574, 0.043565623462200165, -0.022948715835809708, -0.4582488238811493, -0.1308922916650772, -0.4870093762874603, 0.07002882659435272, 0.42616862058639526, -0.24212723970413208, -0.17616228...
</DataTemplate> </toolkit:DataGridTemplateColumn.CellTemplate> </toolkit:DataGridTemplateColumn> ``` The purpose of the Button is to start a timer recorded to the object associated with that row. My timer code works fine but I would also like to disable the buttons of every other r...
[ 0.06615046411752701, 0.2952990233898163, 0.581930935382843, -0.2996353805065155, 0.3465746343135834, 0.22483611106872559, -0.08100500702857971, -0.4365081489086151, -0.16814516484737396, -0.49350422620773315, 0.3423774242401123, 0.34128308296203613, -0.2565535008907318, -0.1838543862104416...
- 1].GetCellContent(item).IsEnabled = false` to disable it and all the buttons correctly appear disabled but if you click on the button twice it will reenable and allow you to click on it a third time and trigger the Click event. Is it possible to actually disable the button? I would have the object the Datagrid is bo...
[ 0.02423091046512127, -0.3578189015388489, 0.38250747323036194, -0.10358405113220215, 0.013086903840303421, -0.09786295145750046, 0.4556136131286621, -0.5113329291343689, -0.27857789397239685, -0.43651852011680603, -0.10769279301166534, 0.7900021076202393, -0.5454317927360535, 0.25924816727...
control of the "timer" class, you can wrap it in your own class before databinding the grid to the collection of your objects.
[ 0.3218838572502136, -0.5475397706031799, -0.09036653488874435, 0.44630396366119385, 0.026976604014635086, -0.14072544872760773, 0.008854711428284645, -0.14787141978740692, -0.20114074647426605, -0.40880879759788513, -0.0029996484518051147, 0.2698296010494232, -0.09756045043468475, 0.066804...
Is there a way to turn option strict off for just a single line of code? I'm doing some maintenance work and I need to "cheat" in just one place and I don't want to lower the standard for the entire file. Sadly, it is not possible for a single line of code in a file. See the [MSDN docs](http://msdn.microsoft.com/en-u...
[ 0.6464446187019348, -0.189155712723732, 0.015121778473258018, 0.12355824559926987, -0.09006374329328537, -0.12598103284835815, 0.3913571238517761, 0.07332579046487808, -0.19188161194324493, -0.600151002407074, -0.03508662059903145, 0.609930157661438, -0.3777104616165161, 0.0662545561790466...
function anyway, so it will be equivalent speedwise, but will be ugly from a practical point of view.
[ -0.12410140782594681, -0.19934622943401337, 0.43541595339775085, 0.026484638452529907, -0.18529433012008667, 0.10564082860946655, 0.18167662620544434, -0.26239246129989624, 0.07283913344144821, -0.6848267912864685, 0.09042463451623917, 0.6013399362564087, -0.21335718035697937, -0.263718158...
What regex can take any of the lines below as input ``` rtsp://server/blabla/bla RTSP/1.0 rtsp://server/blabla/bla/ rtsp://server/blabla/bla rtsp://server/blabla/bla/streamid=65335 RTSP/1.0 ``` and always returns: ``` rtsp://server/blabla/bla ``` In general I have an arbitrary URL which always starts with `"rtsp:...
[ -0.25642475485801697, -0.057995203882455826, 0.8272576332092285, 0.2108933925628662, -0.10616032034158707, 0.24079850316047668, -0.03709569573402405, -0.20064960420131683, 0.07627122849225998, -0.24062858521938324, -0.03864847868680954, 0.37363940477371216, -0.38075336813926697, 0.25219130...
I'm trying to consume some .NET web services using JAX-WS. I have generated the Java classes using the wsimport tool. However, when I try to use these (proprietary, not public) web services in Java, I notice that most of the methods and properties provided by the vendor in their C# examples are not avaiable in the gene...
[ 0.7268439531326294, 0.17991991341114044, -0.029678184539079666, 0.025745084509253502, -0.17726396024227142, -0.23411577939987183, -0.00611263420432806, 0.030184132978320122, -0.11978672444820404, -0.7549647092819214, 0.18217352032661438, 0.7831735610961914, -0.3405918478965759, 0.209951892...
be the best way to consume the .NET web services so that the full functionality would be available in Java, and why does wsimport only generate a small subset of all the methods and properties described in the WSDL file? Example: in the WSDL file UserManagement.wsdl there is a snippet ``` <s:schema elementFormDefaul...
[ 0.05831458419561386, -0.29462000727653503, 0.3797110319137573, 0.12822361290454865, 0.01822185143828392, -0.2488785684108734, 0.13132737576961517, -0.39849457144737244, 0.1344267874956131, -0.7653618454933167, -0.040920183062553406, 0.3801060914993286, -0.1185355857014656, -0.2300401926040...
</s:complexType> </s:schema> ``` In C#, I can access the the UserSecurityContext followingly: ``` UserManagement userMgmt = new UserManagement(); userMgmt.UserSecurityContextValue = new SampleWS.UserRef.UserSecurityContext(); ``` However, in Java I can create the UserManagement object ``` UserManagement userMgm...
[ 0.2013123631477356, 0.2703012228012085, 0.32077518105506897, 0.01568886637687683, -0.006938079372048378, -0.08507135510444641, 0.2381884604692459, -0.2859054207801819, -0.16064029932022095, -0.6356344223022461, -0.3182915151119232, 0.7059789896011353, -0.29890596866607666, 0.01930781267583...
I'm calling http\_get\_request\_headers() in a PHP file on a server running PHP 5. However, I'm getting Fatal error: Call to undefined function http\_get\_request\_headers(). Does anyone know what the problem might be? Does this function not come with plain PHP? No it does not. You need a [PECL module](http://pecl.php....
[ 0.345380038022995, -0.03986673429608345, 0.35650724172592163, 0.19939881563186646, -0.019629009068012238, -0.27472081780433655, 0.32750338315963745, 0.07024442404508591, -0.1282661259174347, -0.6679590940475464, -0.1697540432214737, 0.7249813079833984, -0.2048417627811432, 0.12496292591094...
I have the following code that adds a background worker into a VB.net WPF project: ``` Imports System Imports System.ComponentModel Imports System.ComponentModel.BackgroundWorker Imports System.IO Imports System.Threading Imports System.Net Imports System.Windows Imports System.Windows.Controls Imports System.Windows....
[ -0.035552963614463806, -0.05833514779806137, 0.4496944546699524, -0.11961768567562103, 0.03382793813943863, 0.3190218508243561, 0.14858293533325195, -0.3698579967021942, -0.27278485894203186, -0.7114481925964355, -0.11730372905731201, 0.3310977518558502, -0.5014897584915161, 0.344383537769...
something in the Event declaration, but can't find it. Any ideas? The signature of your DoWork event looks funky - shouldn't it be (Object, DoWorkEventArgs). You have (Object, BackgroundWorker)
[ 0.30346885323524475, -0.14558301866054535, 0.3707788586616516, 0.17370745539665222, 0.21510151028633118, -0.26596641540527344, -0.020253416150808334, 0.14016567170619965, -0.5852347016334534, -0.322486937046051, -0.19542191922664642, 0.20316490530967712, -0.07755333930253983, 0.06736274063...
We have migrated to both JUnit 4 and ant 1.7 The tests runs fine in eclipse, but the annotations are ignored when running the tests using ant. According to the Ant junit task [documentation](http://ant.apache.org/manual/Tasks/junit.html): > It also works with JUnit 4.0, including "pure" JUnit 4 tests using only anno...
[ 0.40576234459877014, 0.022681279107928276, 0.13039354979991913, -0.04355346038937569, -0.26422277092933655, -0.04076254367828369, 0.4743683636188507, -0.24407628178596497, 0.15054169297218323, -0.9487197399139404, 0.14523731172084808, 0.6438736915588379, -0.20760980248451233, -0.3326171636...
interesting part of my build file: ``` <junit printsummary="yes" haltonfailure="yes"> <formatter type="xml"/> <classpath refid="path.test"/> <batchtest fork="yes" todir="${dir.report.unittests.xml}"> <fileset dir="src"> <include name="**/*Test*.java"/> </fileset> </batchtest...
[ 0.17789937555789948, 0.11240427196025848, 0.43468424677848816, -0.18980640172958374, -0.05043014883995056, -0.022649655118584633, 0.23615169525146484, -0.053654976189136505, 0.25651881098747253, -1.0917781591415405, 0.185373917222023, 0.4649240970611572, 0.20612426102161407, 0.011988689191...
Consider the following code: ``` partial class OurBusinessObject { partial void OnOurPropertyChanged() { if(ValidateOurProperty(this.OurProperty) == false) { this.OurProperty = OurBusinessObject.Default.OurProperty; } } } ``` That is, when the value of `OurProperty` in `OurBusines...
[ 0.5481465458869934, 0.19184111058712006, 0.2759322226047516, -0.37015458941459656, 0.2652254104614258, 0.07051225751638412, -0.037346094846725464, 0.17534197866916656, -0.05970358848571777, -0.7611522674560547, -0.09960515052080154, 0.5794563889503479, -0.23370984196662903, 0.0245448090136...
add an explanation for why this is thought to be okay. The idea was that rather than having the producers of the business object validate the data, the business object could validate its own properties, and set clean default values in cases when the validation failed. Further, it was thought, if the validation rules ch...
[ 0.5522284507751465, 0.3756709694862366, 0.23286335170269012, 0.41488519310951233, 0.19825011491775513, -0.18834973871707916, 0.32838448882102966, 0.03674188628792763, -0.3296109437942505, 0.02952500991523266, 0.024879902601242065, 0.5453213453292847, -0.2977418899536133, 0.2141332924365997...
will just pop up somewhere else, where it will be not obvious at all where they are coming from.
[ 0.7207673788070679, 0.06167338788509369, 0.32228079438209534, 0.209647536277771, 0.19986143708229065, -0.07267110049724579, 0.3541489541530609, 0.5918245315551758, -0.2605832517147064, -0.5650767683982849, -0.23293809592723846, 0.03784571588039398, -0.03235273063182831, -0.0074560530483722...
Is there a sane way to get a list of expected parameters from an SqlDataSource given the name of the stored procedure assigned to its SelectCommand property? You can use the SqlCommandBuilder.DeriveParameters method to return information on the parameters associated with a stored procedure. Iterating over the collectio...
[ -0.11520205438137054, -0.21532317996025085, 0.6293264031410217, 0.3537990152835846, 0.002615830395370722, 0.03126365691423416, 0.18043765425682068, -0.407585084438324, -0.1432265192270279, -0.3263704180717468, 0.08100677281618118, 0.6068298816680908, -0.4638245403766632, 0.2530220746994018...
Im using glScalef() for zooming in my program, now when i revert it back to the original size with code: ``` glScalef(1.0f/ZOOM, 1.0f/ZOOM, 1); ``` It doesnt work very well in high zooms... (maybe because of the lost decimals?) How i can revert it back perfectly to the original size without any calculations like ab...
[ -0.059371497482061386, -0.09999103099107742, 0.8027901649475098, -0.1192808449268341, -0.09018990397453308, 0.07122427970170975, 0.42192065715789795, -0.3432324230670929, -0.2420402616262436, -0.49471068382263184, 0.010574285872280598, 0.8847598433494568, -0.46145135164260864, -0.150197163...
*"**Abstraction** and **encapsulation** are complementary concepts: abstraction focuses on the observable behavior of an object... encapsulation focuses upon the implementation that gives rise to this behavior... encapsulation is most often achieved through **information hiding**, which is the process of hiding all of ...
[ 0.15137061476707458, -0.20984876155853271, -0.134656623005867, 0.4652031660079956, -0.14398564398288727, -0.36387813091278076, -0.12068641930818558, 0.07508796453475952, -0.20703265070915222, -0.6038796305656433, -0.04009344056248665, 0.8165678381919861, -0.22058090567588806, 0.08387434482...
you can use this to operate the device. Your VCR implemented this interface and **hid** or **encapsulated** the details of the mechanical drives and tapes. When a new **implementation** of a media player arrives (say a DVD player, which uses discs rather than tapes) it can replace the implementation **encapsulated** ...
[ 0.5173009037971497, -0.2251000702381134, 0.5492128133773804, 0.3526929020881653, 0.11066789925098419, -0.4638429582118988, -0.14165423810482025, -0.3177953362464905, -0.2328599989414215, -0.526019811630249, -0.12836149334907532, 0.9141913652420044, -0.18373902142047882, 0.48413345217704773...
I share a lot of feeds on my google reader, i want some code using asp.net to read all these feeds and put in a page, may be with paging because feeds are too much. Any one know how to do so?, or if there is a tool for that You can use the [RSSToolkit](http://blogs.msdn.com/shahpiyush/archive/2007/06/16/3331941.aspx) t...
[ 0.5332978963851929, -0.034806977957487106, 0.1293269544839859, 0.06855731457471848, -0.12739622592926025, -0.057289306074380875, 0.1965833455324173, 0.1484605222940445, -0.33332645893096924, -0.2852258086204529, 0.009222904220223427, 0.2994177043437958, -0.21699173748493195, 0.090166658163...
I have a project which has several components loaded by a single preloader swf. The preloader swf is strictly AS3 (No flex) and uses Loaders to load two different swfs which both use the flex library (Statically compiled, not rsl). When I compile all three under linux and run the resulting preloader, one of the swfs...
[ 0.3301757574081421, -0.09839846938848495, 0.22394682466983795, -0.21467681229114532, -0.29617956280708313, -0.05398116260766983, 0.27893316745758057, -0.2863118052482605, -0.2302427738904953, -0.8705483078956604, -0.01280869822949171, 0.3486723005771637, -0.2623162567615509, 0.183661326766...