text
stringlengths
0
30.5k
title
stringclasses
1 value
embeddings
listlengths
768
768
0; foreach (DataRow dr in pglp.PGLStat_Table.Rows) { totalcount += (int)dr[column]; } return totalcount; } ``` Statistic: ``` 00:00:00.1442297, for/each, by column, (int) 00:00:00.1595430, for/each, by column, Field<int> 00:00:00.6961964, for/each, by name, Convert.ToInt 00:00:00.1959104, lin...
[ -0.5292273163795471, -0.16136810183525085, 0.775314211845398, -0.14343224465847015, 0.049158815294504166, 0.39908793568611145, 0.038812048733234406, -0.46920228004455566, -0.33000698685646057, -0.0689205452799797, -0.5134611129760742, 0.4270029664039612, -0.1878923922777176, 0.065196685492...
} static int Sum_ForEach_ByName_Convert(LogParser pglp) { int totalcount = 0; foreach (DataRow dr in pglp.PGLStat_Table.Rows) { int c = Convert.ToInt32(dr["count"].ToString()); totalcount = totalcount + c; } return totalcount; } static int Sum_Linq(LogParser pglp) { var col...
[ -0.4340757429599762, -0.36734458804130554, 0.8671057820320129, -0.16026915609836578, -0.13258905708789825, 0.4167771637439728, -0.03446025773882866, -0.495061993598938, -0.4293108582496643, 0.10264606028795242, -0.4199014902114868, 0.4056871831417084, -0.3407570719718933, 0.168784588575363...
count = 3; foreach (var info in new[] { new {Name = "for/each, by column, (int)", Method = (Func<LogParser, int>)Sum}, new {Name = "for/each, by column, Field<int>", Method = (Func<LogParser, int>)Sum_ForEach_ByColumn_Field}, new {Name = "for/each, by name, Convert.ToInt", Method = (Fu...
[ -0.0181215051561594, -0.07644094526767731, 0.8592121601104736, -0.420965313911438, -0.23798154294490814, 0.15191209316253662, 0.06451412290334702, -0.9541616439819336, -0.2626210153102875, -0.24137379229068756, -0.17309126257896423, 0.47238677740097046, -0.5219290256500244, -0.079857505857...
var watch = new Stopwatch(); for (var i = 0; i < count; ++i) { watch.Start(); var sum = info.Method(data); watch.Stop(); } Console.WriteLine("{0}, {1}", TimeSpan.FromTicks(watch.Elapsed.Ticks / count), info.Name); } ```
[ 0.39602378010749817, -0.4831203520298004, 0.8643158674240112, -0.3076571226119995, 0.3867017924785614, 0.278089314699173, 0.12523776292800903, -0.30477267503738403, -0.38082414865493774, -0.4855402112007141, -0.10093230754137039, 0.6549860239028931, -0.43574970960617065, 0.3645313680171966...
I'm trying to figure out a way for my program to take a date (like February 2nd, 2003) and show the difference between the two with another date (like April 2nd, 2012), excluding leap years. So far I've only been able to figure it out if the dates are in the same month, just by subtracting the "day". In this program I ...
[ 0.1417471319437027, 0.10405901819467545, 0.4122611880302429, 0.049413394182920456, -0.17506468296051025, 0.128534734249115, 0.30551087856292725, 0.2792040705680847, -0.4257393181324005, -0.3649410605430603, 0.3532830476760864, -0.2217434048652649, 0.1593872308731079, 0.45867636799812317, ...
how to get it to work. It seems like a hassle to me, but maybe there's a simple math formula I'm not thinking about? Sorry, I don't have any pre-existing code for this part because the rest of the assignment just deals with having the user enter dates and then adding and subtracting a single day. Here is a complete co...
[ 0.4868699014186859, -0.15860678255558014, 0.2407015711069107, -0.01899198815226555, 0.29255861043930054, 0.2137908637523651, 0.15416276454925537, -0.12785585224628448, -0.16004890203475952, -0.4351537227630615, -0.007387557532638311, 0.3474928140640259, -0.03842592611908913, 0.106511756777...
daysInc = 0; if (to.day() - from.day() < 0) { int month = to.month() - 2; // -1 from zero, -1 previous month. if (month < 0) month = 11; // Previous month is December. daysInc = increment[month]; if ( (month == 1) && (to.year()%4 == 0) ) daysInc++; // Increment days for leap year. } int...
[ 0.06167396530508995, -0.20827282965183258, 0.6793628334999084, -0.134834423661232, 0.08472370356321335, 0.33741995692253113, 0.31696903705596924, -0.10028725862503052, -0.6146498918533325, 0.0556735061109066, -0.5258049368858337, 0.20719335973262787, -0.05242285504937172, 0.405687898397445...
diff/360; int months = (diff - years*360)/30; int days = diff - years*360 - months*30 + daysInc; // Extra calculation when we can pass one month instead of 30 days. if (from.day() == 1 && to.day() == 31) { months--; days = 30; } ``` I tried this algorithm and it is working okay. Let me know if you have troub...
[ 0.2616715729236603, -0.04052101448178291, 0.5132709741592407, -0.11721783876419067, 0.2650817334651947, 0.23380720615386963, 0.4494076669216156, 0.0001900907518574968, -0.21906186640262604, -0.39749035239219666, -0.2229151725769043, 0.47281399369239807, -0.1135331466794014, 0.1787442862987...
I'm having some trouble dynamically removing UITextFields from my scrollview when the user taps a button. The UITextields were created programatically. This is what I have thus far, any help would be appreciated. ``` -(IBAction)resetAll{ int textFieldTag; for (int i=0; i<[array count]; i++) { textFieldTag = i + ...
[ -0.20417112112045288, -0.05104096606373787, 0.9149019718170166, -0.4499618411064148, -0.11877963691949844, 0.13319890201091766, 0.48878276348114014, -0.5955830216407776, 0.017299320548772812, -0.8729773163795471, -0.1153397485613823, 0.7667487859725952, -0.36604228615760803, -0.04148278385...
{ UITextField *textField=(UITextField *)[arrayTextFields objectAtIndex:i]; [textField removeFromSuperView]; //Remove textField } } } ```
[ -0.23792196810245514, 0.17216092348098755, 0.6628198623657227, -0.340228408575058, -0.06280140578746796, -0.23269209265708923, 0.23270852863788605, -0.0505862794816494, 0.09963629394769669, -0.6320351362228394, -0.5549183487892151, 0.7154240608215332, -0.4198758006095886, 0.077976688742637...
I am having an application which is built in 1.1 framework.This application is now rebuilt in 2.0 framework but due to some reason we have to use some of the pages of 1.1 framework. So for this we are executing both the applications simultaneously and n carrying out the work using querystrings. So my question can we in...
[ 0.30596640706062317, -0.026505695655941963, 0.2406497597694397, 0.17901352047920227, 0.0031383356545120478, -0.04385625198483467, 0.0744451954960823, -0.39064061641693115, -0.1750996857881546, -0.7266020178794861, 0.1444821059703827, 0.6317210793495178, -0.23186901211738586, 0.157723069190...
can be a very slow web service or a super deluxe NoSQL database. The provider doesn't know that your db as a primary key. Sure. The `SqlMembershipProvider` does. But having it exposing the key would likely lead to violations against [Liskovs Substitution Principle](https://stackoverflow.com/questions/4428725/can-you-e...
[ 0.07027115672826767, 0.2205943465232849, 0.0969926193356514, 0.21714647114276886, -0.030759381130337715, -0.3956018388271332, 0.3937765061855316, -0.18669533729553223, 0.12905028462409973, -0.1436973363161087, -0.2205691784620285, 0.4625032842159271, -0.34108972549438477, 0.434482544660568...
I am facing a very strange problem that my J2ME application .jar file is downloaded normally on the Nokia mobiles but on Samsung and Motorola it is not downloaded. But if i install the .jar without downloading on the Samsung or any other handset it worked. If some has any idea then guide. Link of my app is [m.hellosuns...
[ -0.13325347006320953, 0.48774638772010803, 0.41814523935317993, -0.27920001745224, -0.35633015632629395, 0.16771337389945984, 0.8466920256614685, -0.1046021580696106, -0.020068185403943062, -0.7892763614654541, 0.034020546823740005, 0.7066163420677185, 0.12496370077133179, 0.06825102120637...
Files. Nokia E-Series Phones allows unlimited Heap Memory, so you can easily execute your 1.5 MB Jar file in any E-Series mobile. There is a utility called **[ProGuard](http://proguard.sourceforge.net/)**. It allows your Jar file to compress in such a tiny format that you can run it easily. It will reduce your Jar f...
[ 0.09573420882225037, 0.23183497786521912, 0.35313880443573, 0.007769714575260878, -0.21410039067268372, 0.3576124608516693, 0.5241087675094604, -0.2349521964788437, -0.29923897981643677, -0.5317105054855347, -0.19998601078987122, 0.5921474099159241, -0.05546233430504799, 0.0378205999732017...
I am presently working on website (Java EE). One of the requirements is to not let the client to open anything else other than the browser. After a lot of search I got the following results : 1. Change the policy of the OS. 2. Write some batch/c/c++ program which will intercept all the keyboard and mouse events not l...
[ 0.46145203709602356, 0.27912795543670654, 0.38653939962387085, -0.3306005299091339, 0.20509105920791626, -0.400826096534729, 0.3605082333087921, 0.09170354157686234, -0.04168987646698952, -0.9888118505477905, -0.4030088186264038, 0.43332162499427795, -0.25629979372024536, 0.049329623579978...
machines if I have to run something. My question is .. is there anything else I can do which will reduce the work needed on the client side or on the program which I have to write?? Each Device has a specified amount of **Heap Memory**. A Heap Memory is a kind of RAM for Jar file to run. I Believe that your Samsung de...
[ 0.06875724345445633, 0.18002915382385254, 0.2397378832101822, 0.1898765116930008, 0.19812922179698944, 0.4281215965747833, 0.5091585516929626, 0.006627244409173727, -0.4954568147659302, -0.5428032279014587, -0.07136033475399017, 0.521378755569458, -0.3034842014312744, 0.02946605160832405, ...
There is a utility called **[ProGuard](http://proguard.sourceforge.net/)**. It allows your Jar file to compress in such a tiny format that you can run it easily. It will reduce your Jar file to 300-400KB and then you can easily run your application in Samsung Device too.
[ 0.09358283132314682, -0.0031051940750330687, 0.293265700340271, -0.22895203530788422, -0.3230803310871124, 0.2106563299894333, 0.3701254725456238, -0.3202543258666992, -0.35993266105651855, -0.5924127101898193, 0.07682214677333832, 0.5370471477508545, -0.032807160168886185, -0.008914678357...
My title sums this up pretty well. My first though it to provide a few data formats, one being HTML, which I can provide and consume using the Razor view engine and MVC3 controller actions respectively. Then, maybe provide other data formats through custom view engines. I have never really worked in this area before ex...
[ 0.6805978417396545, -0.03252450004220009, 0.3273075520992279, 0.12326636910438538, -0.22712944447994232, -0.10432817786931992, 0.1852070689201355, 0.2174363136291504, -0.2329423874616623, -0.5429168939590454, 0.264506459236145, 0.612464964389801, 0.09899439662694931, 0.1819642037153244, ...
the requirements of a skeleton HTML client, with a very rudimentary UI, and once the API is bedded down, then write a fully featured UI client using the same services as the API but bypassing the actual data parsing and presentation API components. I had this very same thought as soon as the first talk of the Web API w...
[ 0.39932671189308167, 0.09360578656196594, 0.40105003118515015, 0.07581117004156113, -0.09113065153360367, -0.034813057631254196, 0.08825497329235077, -0.04305168613791466, -0.14452801644802094, -0.6498489379882812, -0.13423682749271393, 0.7553703784942627, -0.20056921243667603, -0.18400064...
so go have a Google. Now onto the question.. The problem is that you can of course make the Web API return HTML, JSON, XML, etc - but the missing piece here is the Views/templating provided by the Razor/ASPX/insertviewenginehere. That's not really the job of an "API". You could of course write client-side code to ca...
[ 0.18011292815208435, 0.0036516489926725626, 0.16717615723609924, 0.369046688079834, -0.20754055678844452, -0.215902641415596, 0.15175653994083405, 0.07190712541341782, -0.026819411665201187, -0.5104668140411377, 0.11045392602682114, 0.7827114462852478, -0.2521129250526428, -0.1267275214195...
(repository, domain, etc), it would probably be best to wrap the calls in a facade/service layer of sorts and make both your Web API and seperate ASP.NET MVC web application call into that to reduce code. All you should end up with is an ASP.NET MVC web application which calls into your domain and builds templated HTM...
[ 0.2661600410938263, 0.08163206279277802, 0.33963730931282043, 0.32046371698379517, -0.2051113396883011, -0.25368911027908325, -0.036331139504909515, -0.27241483330726624, -0.30258896946907043, -0.5118911266326904, -0.32170066237449646, 0.5138030648231506, -0.3784407079219818, 0.26111879944...
I want to use an **`activity as dialog`** and i made the theme of the activity as dialog & i succeed. but i have the problem here is when i click outside of the activity its automatically get closed & the previous activity get started.. i tried a thing to make transparent parent layout it does not look like a dialog....
[ 0.2875734269618988, 0.10060641169548035, 0.47309988737106323, 0.07031884044408798, -0.21898476779460907, -0.06291799992322922, 0.32912173867225647, 0.24713824689388275, -0.48100703954696655, -0.5914301872253418, -0.06918418407440186, 0.4806942045688629, -0.36697378754615784, 0.060260757803...
``` this.setFinishOnTouchOutside(false); ```
[ 0.5414121747016907, 0.31626951694488525, 0.08924107253551483, -0.1557343304157257, -0.11575216799974442, -0.131117582321167, 0.6549007296562195, -0.09626756608486176, -0.0031135876197367907, -0.49190378189086914, -0.31204020977020264, 0.4755076467990875, -0.30515986680984497, 0.13485759496...
I need to build a classifier which identifies NEs in a specific domain. So for instance if my domain is Hockey or Football, the classifier should go accept NEs in that domain but NOT all pronouns it sees on web pages. My ultimate goal is to improve text classification through NER. For people working in this area plea...
[ 0.022760920226573944, 0.02598537504673004, -0.19142182171344757, 0.17639507353305817, -0.4702772796154022, 0.016291804611682892, 0.29233410954475403, 0.21536587178707123, 0.04232027381658554, -0.7829263210296631, 0.06766065955162048, 0.34488755464553833, -0.2382785528898239, -0.14349013566...
are pronouns. However, the pronouns might refer to named entities, which may or may not turn out to be important for the performance of your classifier. The only way to tell for sure it to try. A slightly unrelated comment- a NER system trained on domain-specific data (e.g. hockey) is more likely to pick up entities f...
[ 0.18385517597198486, 0.09894389659166336, 0.03273775428533554, 0.33714398741722107, -0.3845082223415375, 0.11799847334623337, 0.5443801283836365, 0.16298659145832062, -0.19002258777618408, -0.5958576202392578, -0.3057138919830322, 0.3434566855430603, -0.1754169911146164, -0.252773106098175...
etc.
[ 0.3065984845161438, 0.31944727897644043, 0.14276789128780365, 0.035597991198301315, 0.43279650807380676, 0.06456603109836578, -0.21813157200813293, 0.17614184319972992, -0.22902606427669525, -0.17361406981945038, -0.19060175120830536, 0.5203958749771118, -0.11329632252454758, 0.26907321810...
I can run the Java version of my project fine by simply importing Guava libraries like so: ``` import com.google.gwt.thirdparty.guava.common.collect.ImmutableList; ``` Following the advice [here](http://groups.google.com/group/playn/msg/cccb7916d5c2d40c), I've added this line to html/pom.xml: ``` <dependency> <gr...
[ 0.3991480767726898, 0.3558175563812256, 0.43872377276420593, -0.08874195069074631, -0.37939372658729553, -0.2546198070049286, 0.16748873889446259, -0.5084479451179504, -0.3024148941040039, -0.3728584349155426, 0.16668389737606049, 0.6454144716262817, -0.5187296867370605, -0.041732110083103...
Guava](https://stackoverflow.com/questions/6354025/trouble-with-gwt-and-guava)
[ -0.26628056168556213, 0.4162047803401947, 0.07314218580722809, -0.054364610463380814, -0.02564120665192604, 0.22476814687252045, 0.050881996750831604, -0.020634641870856285, -0.5241692066192627, 0.18172617256641388, 0.15499374270439148, 0.7588573098182678, -0.39057546854019165, 0.432116627...
I am trying to add two decimal values but the returned sum is pure integer. What is wrong? I can't find it. any help will be welcome. ``` jQuery(".delivery-method #ship_select").change(function(){ var cost = jQuery(this).val(); jQuery("#delivery_cost").val(cost); //returns 20.00 var tot = parseInt(cost) +...
[ -0.005725945811718702, -0.017007535323500633, 0.3761497139930725, -0.21553125977516174, 0.07175312936306, 0.8434420228004456, 0.003531835274770856, -0.2585507035255432, -0.26813414692878723, -0.6785153150558472, -0.20949476957321167, 0.8361219763755798, -0.01086009107530117, 0.158241659402...
I currently have a huge HTML file which doesn't have line breaks and just appears in a single line. I want to format it in vim (macvim in particular). I tried the following options, but none of them has worked for me. * Selected the text and pressed = . This will only auto intend the code. But since the entire code i...
[ 0.4089460074901581, -0.2074640542268753, 0.8422332406044006, -0.0916997566819191, -0.4035794734954834, -0.07703975588083267, 0.5777315497398376, -0.19831165671348572, -0.3649556636810303, -0.8262847661972046, -0.02506585232913494, 0.422444611787796, -0.258074551820755, 0.16053442656993866,...
this either using a Plugin or otherwise? Thanks! One way to start it is to split all tags onto their own lines. ``` :s/<[^>]*>/\r&\r/g :g/^$/d ``` If you have floating `<` or `>` symbols (e.g. invalid HTML, JavaScript comparison operators, CSS direct descendant selector part), this won't work properly and you could...
[ 0.4314770996570587, -0.26962217688560486, 0.3643871545791626, 0.12145411968231201, -0.2961292862892151, -0.2844686508178711, -0.17529742419719696, -0.5983813405036926, -0.13289067149162292, -0.6879675984382629, 0.0416376031935215, 0.1812601089477539, -0.39393407106399536, -0.06033552810549...
hello </title> </head> <body> world </body> </html> ```
[ -0.14850175380706787, 0.28395789861679077, 0.7093088626861572, -0.21470724046230316, -0.47019967436790466, -0.02972167730331421, 0.25755956768989563, 0.14194627106189728, -0.1382083296775818, -0.6358062028884888, -0.459230899810791, 0.019481319934129715, 0.19780801236629486, 0.251154512166...
Can not parse json using this ``` var res = eval('(' + response + ')'); ``` The `response` contain `[{"total_sections":"3"}]` this value. But i couldn't take the value `total_sections`. ``` function changeSection() { id = document.getElementById('layoutDropdown').value; $.ajax({ type: "POST", ur...
[ -0.003571653738617897, -0.33992522954940796, 0.5599705576896667, -0.14858342707157135, -0.05267469212412834, -0.060435038059949875, 0.4214891493320465, -0.43476730585098267, -0.269328773021698, -0.45922085642814636, -0.49183428287506104, 0.64835125207901, -0.2601732313632965, 0.14381864666...
var res = eval(response); alert(res[0].total_sections); } }); } ``` manage Layouts: ``` public function manageLayouts() { $id = $_POST['id']; $data =
[ -0.014178723096847534, -0.31793785095214844, 0.5412941575050354, -0.25955626368522644, 0.20241491496562958, 0.18520011007785797, 0.42847806215286255, -0.5945340394973755, -0.29523569345474243, -0.585936963558197, -0.39285480976104736, 0.6626851558685303, -0.3436104655265808, 0.332031488418...
$this->managelayoutmodel->getSections($id); echo json_encode($data); } ``` If `response` is a `string` you can parse the json with `var res = eval(response);` (but it isn't nice), `var res = JSON.parse(response);` or if you use jQuery `var res = $.parseJSON(response)`. Otherwise if it is already an `object` you ...
[ 0.13010714948177338, -0.3715689778327942, 0.2812920808792114, -0.18627482652664185, -0.20307230949401855, 0.062371041625738144, 0.5153420567512512, -0.6512473821640015, -0.399384081363678, -0.35027873516082764, -0.4221002161502838, 0.3512251079082489, -0.23494593799114227, 0.02039625123143...
I'm developing a website, and I already integrated the feature of **letting the user to change his/her password**. I'm using the built-in view in `django.contrib.auth`. Now, **we need to do it using AJAX**. I mean, the idea is to send the request to the server without reloading the entire page. If the password was cha...
[ 0.41907182335853577, 0.20147353410720825, 0.3111710548400879, -0.015842372551560402, -0.10842926800251007, -0.3374924659729004, 0.034073326736688614, 0.2883865237236023, -0.15040932595729828, -0.8771436214447021, 0.05826995149254799, 0.5976237654685974, 0.014855505898594856, -0.17923246324...
but is already done in `django.contrib.auth`... If you still have that stash's SHA1, you can generate a patch from it (`git format-patch SHA1`) and apply the patch in reverse (`git apply -R filename.patch`). If you lost the SHA1, see [How to recover a dropped stash in Git?](https://stackoverflow.com/questions/89332/re...
[ 0.10296899080276489, 0.10371490567922592, 0.38014209270477295, -0.160710871219635, 0.3471091389656067, -0.07167832553386688, 0.17442555725574493, -0.30230531096458435, -0.4679347276687622, -0.2767944931983948, -0.2908671200275421, 0.4732172191143036, -0.3117166757583618, -0.026809796690940...
I am creating window c# desktop application I have three columns in my datagridview column1 is DataGridViewCheckBoxColumn and column 2 and column 3 is bounded through datatable. Now i want that sequence of column should come as follows: Column2 Column3 and Column1 but it is coming like as follows : Column1 Column2 C...
[ 0.21096420288085938, 0.14518067240715027, 0.9621080756187439, -0.2794191539287567, -0.37352126836776733, 0.295002818107605, -0.012928913347423077, -0.25035926699638367, -0.02388991042971611, -1.0219026803970337, 0.15854334831237793, 0.32910221815109253, -0.06062174588441849, 0.157636016607...
for e.g : ``` DataGridViewCheckBoxColumn col3 = new DataGridViewCheckBoxColumn (); //... DataGridViewTextBoxColumn col1 = new DataGridViewTextBoxColumn (); //... DataGridViewTextBoxColumn col2 = new DataGridViewTextBoxColumn (); //... datagridview.columns.add(col3); datagridview.columns.add(col1); datagridview.column...
[ -0.3479696810245514, 0.07161607593297958, 0.7924903035163879, -0.2623195946216583, -0.16343222558498383, 0.27932116389274597, -0.04167236015200615, -0.36219099164009094, -0.31551626324653625, -0.6495040059089661, -0.38696908950805664, 0.39624980092048645, -0.5640188455581665, -0.1503245532...
First off, sorry for the length of the question. I am updating a Silverlight for Windows Phone 7 app which currently stores data in multiple XML files. I am updating the app to use a CompactSQL DB and I have to migrate the data from the XML files into the DB upon first run after installing the new version. I want a p...
[ 0.32139670848846436, 0.287480890750885, 0.6426178216934204, -0.07817767560482025, -0.2424193024635315, -0.16982991993427277, 0.4858954846858978, -0.4721909165382385, -0.020122162997722626, -0.49105048179626465, -0.062319282442331314, 0.5309438109397888, -0.18026010692119598, 0.119070418179...
despite the NotifyProperyChanged event firing off and updating the bar's Value correctly. When I set the Value in XAML it appears fine (static - but at least it's drawn on the screen). I do not know why the progressbar does not show up on the device at all. My INotifyChanged setup ``` private int migrateCount; publi...
[ 0.22943508625030518, 0.0720154270529747, 0.9335373640060425, -0.3160867989063263, 0.5634577870368958, 0.10643812268972397, 0.34517520666122437, -0.38923147320747375, -0.16727131605148315, -0.759728729724884, -0.2719685137271881, 0.6164905428886414, -0.3020321726799011, 0.057724520564079285...
NotifyPropertyChanged("MigrateCount"); } } public int MigrateTotal { get; set; } //Prop used for ProgressBar.Maximum public void NotifyPropertyChanged(string propertyName) { if (PropertyChanged != null) { PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); } } void MainPage_Pro...
[ 0.07794340699911118, -0.15404249727725983, 1.047228455543518, -0.32773786783218384, 0.40724799036979675, 0.3146296739578247, 0.441575288772583, -0.4526200294494629, -0.3728497624397278, -0.6248663067817688, -0.5329030752182007, 0.5293893218040466, -0.23094050586223602, 0.21587666869163513,...
this.PropertyChanged += new PropertyChangedEventHandler(MainPage_PropertyChanged); ... } ``` Calling the MigrateDB method in Loaded rather than OnNavigatedTo because OS terminates any app that takes too long to load. ``` private void PhoneApplicationPage_Loaded(object sender, RoutedEventArgs e) { ...
[ -0.06385531276464462, -0.2377656251192093, 0.6394774913787842, -0.08312711119651794, 0.39880508184432983, 0.09563244134187698, 0.33747392892837524, -0.18559753894805908, -0.25027772784233093, -0.7348923087120056, -0.20929408073425293, 0.5097977519035339, -0.5481322407722473, 0.234011098742...
{ MigrateDB(); LoadData(); //Loads data from the DB once it's populated } } ``` This operation takes ages. Approximately 100 XML files per minute and I expect users to have between 30 and 300 files. ``` private void MigrateDB() { string[] DirList;
[ 0.0829954519867897, -0.14222998917102814, 0.5244708061218262, -0.3768451511859894, 0.08588092029094696, 0.07235829532146454, -0.13231466710567474, -0.38290584087371826, -0.10173870623111725, -0.7513651251792908, -0.23736421763896942, 0.24188171327114105, -0.08063527196645737, 0.28171080350...
using (var store = IsolatedStorageFile.GetUserStoreForApplication()) { DirList = store.GetDirectoryNames("*"); MigrateTotal = DirList.Length - 1; // -1 to account for the "Shared" Dir foreach(...) { ... Does lots of IsoStore operations / XML serialising and DB updating ...
[ 0.00001343261101283133, -0.19590437412261963, 0.3919160068035126, -0.15462638437747955, 0.15807569026947021, 0.2616795599460602, 0.084164097905159, -0.5297657251358032, -0.023404501378536224, -0.6690433025360107, -0.10877739638090134, 0.49118295311927795, -0.4233795404434204, 0.28106325864...
} ... } ``` I got it all working. As mentioned by others, the UI thread was being blocked and I needed to transfer the CPU intensive code to another thread. This freed up the UI (main) thread to update the progressbar. I did that by making the following changes * Deleting all the INotifyPropertyChanged co...
[ -0.012908867560327053, 0.1564832478761673, 0.5268935561180115, -0.15660139918327332, 0.20746783912181854, 0.2534135580062866, 0.3106713891029358, -0.013157662004232407, -0.28782838582992554, -0.7199035286903381, -0.012570432387292385, 0.4269423484802246, -0.3234318792819977, 0.274479418992...
class MainPage : PhoneApplicationPage private BackgroundWorker bw = new BackgroundWorker(); ... public MainPage() { ... bw.WorkerReportsProgress = true; bw.WorkerSupportsCancellation = false; bw.DoWork += new DoWorkEventHandler(bw_DoWork); bw.ProgressChanged += new Progres...
[ -0.21396073698997498, -0.1451442837715149, 0.47359803318977356, -0.2982562780380249, 0.36734604835510254, 0.3291882276535034, 0.7073758244514465, -0.09590162336826324, -0.106107197701931, -0.5953760743141174, -0.25067445635795593, 0.6626858711242676, -0.5571790933609009, 0.0813934132456779...
LoadData(); //LINQ2SQL queries to display DB } void bw_ProgressChanged(object sender, ProgressChangedEventArgs e) { ProBar.Value = e.ProgressPercentage; } void bw_DoWork(object sender, DoWorkEventArgs e) { double total = 0; double count = 0; BackgroundWorker worker ...
[ 0.17588301002979279, -0.12881676852703094, 0.3258025050163269, -0.3265860378742218, 0.11538098007440567, 0.5270389914512634, 0.6000956892967224, -0.4937959611415863, -0.3358173370361328, -0.287759929895401, -0.17875653505325317, 0.3555057644844055, -0.5621111989021301, 0.32482001185417175,...
{ ... Does lots of IsoStore operations / XML serialising / DB updating count++; double cntr = count / total * 100; worker.ReportProgress((int)cntr); } } private void PhoneApplicationPage_Loaded(object sender, RoutedEventArgs e) { ...
[ 0.2855784595012665, -0.19033083319664001, 0.5637611150741577, -0.14199967682361603, 0.1686490774154663, 0.11754477024078369, 0.4473082721233368, -0.31169795989990234, -0.2053549736738205, -0.27113303542137146, -0.06798181682825089, 0.5704519152641296, -0.5085818767547607, -0.01911241002380...
bw.RunWorkerAsync(); ... } ```
[ 0.23034365475177765, 0.1702616959810257, 0.07201747596263885, -0.3502269387245178, 0.28282251954078674, -0.35009804368019104, 0.22619955241680145, -0.05872432887554169, -0.11619681864976883, -0.41635334491729736, -0.31008180975914, 0.6722419261932373, -0.3355374038219452, 0.287075787782669...
I have a javascript code in regards to customising a group of check box. However the result is not what I am look for. Its almost 90% there. This is the code I will explain what it does below: ``` <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML> <HEAD> <title>checkboxes</title> <meta content="Mic...
[ 0.49552810192108154, 0.0485696904361248, 0.6008233428001404, -0.09072062373161316, -0.16508452594280243, 0.07484373450279236, 0.07318919152021408, -0.7549263834953308, 0.0860900729894638, -0.6794607639312744, 0.05780591443181038, 0.23180080950260162, -0.33988216519355774, -0.18615280091762...
id="class" name="cat[]" value="class 2" onclick="SingleSelect('chk',this);" /> <br/>Class 3<input type="checkbox" id="class" name="cat[]" value="class 3" onclick="SingleSelect('chk',this);" /> <br/>Class 4<input type="checkbox" id="cat" name="cat[]" value="class 4" /> <br/>Class 5<input type="checkbox" id="cat" name="...
[ 0.21164093911647797, 0.057427842170000076, 0.610200822353363, 0.14041267335414886, 0.18446777760982513, 0.1701778918504715, 0.027017520740628242, -0.5285886526107788, -0.16828948259353638, -0.6255838871002197, -0.19376656413078308, 0.2836165726184845, -0.2338869869709015, -0.01862200535833...
single or leave it. However what i want is: Of Class 1, Class 2 and Class 3, Users are only allowed to choose 1 or don't choose. Of Class 4, Class 5, Class 6 and Class 7, I do not mind if users select multiple or single or leave it. But of the 7 choices, Users must at least choose 1 in order to submit or else there ...
[ 0.47871121764183044, -0.27772584557533264, 0.041687652468681335, 0.2514312267303467, -0.10047046095132828, 0.06187226623296738, -0.035213906317949295, -0.04150104150176048, -0.39278197288513184, -0.584006667137146, 0.12586671113967896, 0.23431137204170227, -0.4651016294956207, -0.068032287...
Class 3 Group of check box. Thanks very Much in advance CHeers This javascript should work for you: ``` <script language="javascript"> // fix form so that only one of the first three is clicked at a time. // return false if form has no elements clicked. function validateForm(clickedElement) { var myForm = document....
[ -0.05882750079035759, 0.12044921517372131, 0.6420984864234924, -0.3031791150569916, -0.3723643720149994, -0.1474178284406662, 0.5661097168922424, -0.9466044902801514, 0.1279260367155075, -0.5931927561759949, -0.17512086033821106, 0.38896605372428894, -0.42989256978034973, -0.21858301758766...
if(elem != clickedElement) { elem.checked = false; } } if (elem.checked) { hasOneChecked = true; } } return hasOneChecked } // validate the form and alert the user if there is a problem function SingleSelect(e) { var isValid = validateForm(e); if(!isValid) { alert("Please check at least one item....
[ 0.19587752223014832, -0.01149537693709135, 0.7092669010162354, -0.05637810751795769, 0.23627722263336182, -0.10951085388660431, 0.3567776381969452, -0.657683253288269, -0.06861423701047897, -0.7495262026786804, -0.18728716671466827, 0.7428836226463318, -0.17214994132518768, -0.069130375981...
improve the rest of your page. Some things to consider: 1. Each `id` attribute should be unique 2. A table that contains a single piece of data is pretty useless 3. Formatting your code will make it easier to read 4. Remember to close all of your tags correctly (no missing angle brackets) 5. Consider adding `type="tex...
[ 0.5164340734481812, -0.012480424717068672, 0.3852401077747345, -0.0445631667971611, -0.16521362960338593, -0.3686384856700897, 0.45418021082878113, -0.13074196875095367, -0.07120531052350998, -0.9200903177261353, -0.057978421449661255, 0.6212471127510071, -0.1891956627368927, -0.2727804183...
i want to record my app in ipad is there any esay way to do it or any free screen recoder app which can record it plz help me out. thanks in advance This javascript should work for you: ``` <script language="javascript"> // fix form so that only one of the first three is clicked at a time. // return false if form has ...
[ 0.4415864050388336, 0.24041730165481567, 0.8274456858634949, -0.2005337029695511, 0.204867422580719, 0.24861563742160797, 0.3879249691963196, -0.5936254262924194, -0.1989925056695938, -0.8157809376716614, 0.06211673095822334, 0.3813570737838745, -0.23478150367736816, -0.23053766787052155, ...
>= 3 && elem == clickedElement) { clickedFirstThree = false; } if(clickedFirstThree && i < 3) { if(elem != clickedElement) { elem.checked = false; } } if (elem.checked) { hasOneChecked = true; } } return hasOneChecked } // validate the form and alert the user if there is a problem function ...
[ 0.29547902941703796, 0.0394531674683094, 0.8600168228149414, -0.07953717559576035, 0.2605472505092621, -0.06286732107400894, 0.4491574168205261, -0.833835244178772, -0.12140721082687378, -0.7721374034881592, -0.19952458143234253, 0.6590135097503662, -0.27873533964157104, -0.043470017611980...
out of the way, I think that the other answers here have given you lots of good advice about how you can improve the rest of your page. Some things to consider: 1. Each `id` attribute should be unique 2. A table that contains a single piece of data is pretty useless 3. Formatting your code will make it easier to read ...
[ 0.6159017086029053, 0.21336479485034943, 0.29906165599823, -0.057961881160736084, -0.1797385811805725, -0.40328577160835266, 0.3827473819255829, -0.21549740433692932, 0.009061487391591072, -0.7492150068283081, 0.04898044466972351, 0.5642497539520264, -0.22367748618125916, -0.13773837685585...
I am developing an application. I want to get the names of all .xml files from a document directory, So please tell me how to do this one. Try this : ``` NSArray *documentPaths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString *documentsDir = [documentPaths objectAtIndex:0];...
[ 0.11776875704526901, -0.10463700443506241, 0.4979570508003235, 0.07578147947788239, 0.12888191640377045, -0.19722820818424225, 0.056646138429641724, -0.15649259090423584, -0.3339248597621918, -0.8883620500564575, -0.019158674404025078, 0.276580274105072, -0.33264079689979553, -0.0158778075...
So I'm trying to figure out the best way to solve simple logarithms using objective c. For example ln 30 = 3.4012. I'm not too sure if there's any built in functionality in objective c to do this. Any ideas? In fact it is "c" question because Objective-C is based on c, and all primitive math functions like logarithms a...
[ -0.19956369698047638, 0.33804407715797424, 0.4411827027797699, -0.019135501235723495, -0.11793525516986847, 0.12371539324522018, 0.22789736092090607, -0.18247613310813904, -0.25518709421157837, -0.40275898575782776, -0.17832326889038086, 0.6350692510604858, -0.4186311960220337, -0.26267704...
**A little background:** I'm writing a small word based maze game starting with a simple maze made of X's, O's and F. My maze is a list of lists representing the maze itself where X is a wall, O is an open spot and F is the finish line. I'm trying to write a function that takes the name of the maze and the user's cu...
[ 0.10858448594808578, 0.1080024391412735, 0.5429570078849792, 0.1216772273182869, 0.309784471988678, 0.39604389667510986, 0.2137194722890854, -0.22852455079555511, -0.21805071830749512, -0.7051427960395813, 0.05527570843696594, 0.1663607805967331, -0.09215011447668076, -0.15554258227348328,...
legal = [] if maze[x-1][y] == 'O' or maze[x-1][y] == 'F': legal.append('N') if maze[x+1][y] == 'O' or maze[x+1][y] == 'F': legal.append('S') if maze[x][y+1] == 'O' or maze[x][y+1] == 'F': legal.append('E') if maze[x][y-1] == 'O' or maze[x][y-1] == 'F': legal.append('W')...
[ -0.3955097794532776, -0.15529471635818481, 0.4072864055633545, 0.30431821942329407, 0.2429197132587433, 0.19285139441490173, 0.3002986013889313, -0.616509199142456, -0.37646347284317017, -0.4604600965976715, -0.7142665386199951, 0.538600742816925, -0.5130308866500854, -0.25041791796684265,...
['X', 'O', 'X', 'O', 'X'], ['X', 'O', 'O', 'O', 'X'], ['X', 'X', 'X', 'X', 'X'], ['X', 'X', 'X', 'X', 'X']] >>> ``` input: `get_legal_directions(maze1, (1,1))` output: `['S']` so the function appears to work normally here, however when I use the function within another function in order for the user to interact wit...
[ -0.06584591418504715, -0.12501591444015503, 0.7383490204811096, 0.05362234264612198, 0.2127295434474945, 0.13663136959075928, 0.4309642016887665, -0.30190810561180115, -0.19525113701820374, -0.6783616542816162, -0.25045743584632874, 0.3671453595161438, -0.37480252981185913, 0.1674248874187...
at position', pos command = raw_input('Command: ') if command == 'Q': com = raw_input('Are you sure you want to quit? [y] or [n]: ') if com =='y': print 'Thank you for playing - Goodbye!'
[ -0.27059420943260193, -0.24581578373908997, 0.15351158380508423, -0.2637947201728821, 0.460738867521286, -0.14300532639026642, -0.009838682599365711, 0.0957135483622551, -0.34702515602111816, -0.38468173146247864, -0.04940922185778618, 0.5925143957138062, -0.22011597454547882, -0.094343870...
break else: continue elif command == 'L': get_legal_directions(maze, pos) else: print 'invalid command' ``` I get the following: ``` >>> interact() Maze File: maze1 You are at position (1, 1) Command: L " if maze[x-1][y] == 'O' or maze[x-1][y] == 'F': IndexError: string ...
[ -0.025595752522349358, -0.22289352118968964, 0.4983345866203308, 0.09154100716114044, 0.31735485792160034, -0.0015462167793884873, 0.5676552653312683, -0.1703578680753708, -0.3258187174797058, -0.4192812442779541, -0.35177096724510193, 0.574952244758606, -0.35215574502944946, -0.1295297592...
get the command `L` to call the function `get_legal_directions()`? This makes maze a string: ``` maze = raw_input('Maze File: ') ``` Your function expects a list of lists instead.
[ -0.08950517326593399, -0.21209877729415894, 0.5077112317085266, 0.0976523905992508, 0.20164303481578827, -0.08834619075059891, 0.17559300363063812, -0.13512876629829407, -0.0974632278084755, -0.5445036292076111, -0.2395692616701126, 0.5340531468391418, -0.5146286487579346, 0.01728190667927...
I am planning to set up Magento in a cluster with load balancing, so is it possible to have two Magento installations pointing to the same database? If it possible - how should I configure the base url for these servers? Should the servers have the same name? Looking at weight for example, you generate a random weight...
[ 0.416808545589447, -0.05189907178282738, 0.6160611510276794, -0.020695850253105164, -0.05454656481742859, 0.28742510080337524, -0.18994252383708954, -0.4714435040950775, -0.1710892915725708, -0.2505949139595032, 0.08904601633548737, 0.3206605613231659, 0.050989728420972824, -0.234720945358...
data[i] = new BodyMassIndex(name, age, weight, height); ``` So your problem is that each iteration of the loop is using the same random value. You need to be generating a new random value *inside the loop* so each entry in the array gets a different value: ``` for (int i = 0; i < numberOfPeople; i++) { double we...
[ 0.5606589913368225, -0.25194573402404785, 0.1816926896572113, -0.02491348795592785, 0.2045784890651703, 0.33009520173072815, 0.2919866144657135, -0.3876459300518036, -0.5424099564552307, -0.3825143277645111, 0.13842201232910156, 0.20629630982875824, -0.4841087758541107, 0.09151989966630936...
`printArray` method. It's reprinting the same value rather than reading it off the objects you have created. In that method read the values off your `BodyMassIndex` objects. Also, I don't think your `loadRandomWeights()` method other similar ones needs a `data` parameter as you're neither writing to or reading from th...
[ 0.4085526764392853, -0.16852913796901703, 0.42738476395606995, -0.05797277018427849, -0.10784883797168732, 0.3283277153968811, 0.03686639294028282, -0.5671153664588928, -0.2998389005661011, -0.37066370248794556, 0.05333508178591728, 0.5008487701416016, -0.35929274559020996, -0.173617839813...
return weight; } ``` This could just be: ``` public static double generateRandomWeight() { double min = 100; double max = 300; return randomInt(min, max); } ```
[ 0.26103800535202026, -0.532872200012207, 0.06082043796777725, -0.09726608544588089, 0.017969312146306038, 0.2400047928094864, -0.0246698260307312, -0.40364590287208557, -0.14679376780986786, -0.3483053743839264, -0.08116258680820465, 0.5234613418579102, -0.1637764424085617, 0.1389003396034...
I have ``` $j("input[id^='tab_name_edit']").each(function(){ var divcnt = $j(this).attr('id'); var divcnt = divcnt.split(/[_]/); nosoftabs = divcnt[divcnt.length-1]; var tabnm1 = $j(this).val(); addInputGroup(tabnm1); automateDynamicFields(nosoftabs); }); function autom...
[ 0.17104864120483398, -0.054033469408750534, 0.6462772488594055, -0.25062090158462524, 0.1895468384027481, 0.06272372603416443, 0.17155523598194122, -0.5321635603904724, 0.17526042461395264, -0.5009419322013855, -0.14112265408039093, 0.5882545113563538, -0.1439628154039383, 0.27721476554870...
calling another function and passing a value `nosoftabs`. This value is recieved and the `function automateDynamicFields` works perfectly when i write Alert in it. I know this has to do something with DOM elements not being ready. Is there any way to check if a `variable` is loaded in jQuery. I know using `$('myDiv')....
[ 0.1437995284795761, -0.11226380616426468, 0.2962833642959595, -0.24298135936260223, 0.055639781057834625, -0.2830619812011719, 0.36775293946266174, -0.20749841630458832, -0.10542196035385132, -0.4879833459854126, -0.05004961043596268, 0.9017888307571411, -0.5399909019470215, 0.081724703311...
automateDynamicFields(nosoftabs); } else{ setTimeout(function(){ automateDynamicFields(nosoftabs); },800); } ``` and make addInputGroup return somthing.
[ -0.02406422607600689, -0.3308846056461334, 0.434987336397171, -0.02295744977891445, 0.1975809782743454, -0.02305755577981472, 0.05096727982163429, -0.2740035355091095, 0.07863815873861313, -0.3875412940979004, -0.24125255644321442, 0.8550779223442078, -0.3032005727291107, -0.09637737274169...
I have a Java Server that sending the java serializable object to my client, and receive java serializable object for execution. If my client is also java written, which is nice, that allow me to do communication within any problems. But now, I would like to extend my programme to not only java client, the client may...
[ 0.2649516463279724, 0.14631295204162598, 0.08367068320512772, 0.05509663373231888, -0.29616355895996094, 0.1818511188030243, 0.2528391182422638, -0.04832908511161804, -0.3778926432132721, -0.40983515977859497, 0.20288114249706268, 0.5132204294204712, -0.10182623565196991, -0.01011755224317...
Java object to the Server, but I also need a layer that convert back the Java object to JSON to the client. My Question is except make a JSON-Java Translation layer, is there any other ways to do so? Also, we can afford to change some code in server side, but we must use Java as our primary language for that. Any sug...
[ 0.1598372906446457, 0.0038042631931602955, 0.28332850337028503, -0.01902710273861885, -0.028242018073797226, -0.07529880106449127, 0.3108076751232147, -0.10133060067892075, -0.1404838263988495, -0.775592029094696, -0.07999061048030853, 0.7028196454048157, -0.38094958662986755, 0.0444804802...
else{ setTimeout(function(){ automateDynamicFields(nosoftabs); },800); } ``` and make addInputGroup return somthing.
[ 0.21735826134681702, -0.3411448001861572, 0.43526342511177063, -0.09982844442129135, 0.40088772773742676, -0.03369626775383949, 0.11316081881523132, -0.357862651348114, 0.010535319335758686, -0.4843563437461853, -0.26692110300064087, 0.8513472676277161, -0.2619953155517578, -0.089050441980...
I have UITextField in each Cell of UITableview and I have added UIPickerview as inputView of UITextField and showing with Done button at its tool bar My question is how can I hide this this pop up (Picker + toolbar) on click of done button ? and show selected value of picker in text box in particular cell ? Thanks a...
[ -0.13991302251815796, -0.2782420516014099, 0.7532411217689514, 0.03475688025355339, -0.1010044515132904, -0.07032011449337006, 0.08834277838468552, -0.24914734065532684, 0.19222457706928253, -0.8106880784034729, -0.03394867479801178, 0.5329614877700806, -0.10439734905958176, 0.042887073010...
cell = [[[PremiumProductsDescriptionCell alloc] initShoppingCartCellWithFrame:CGRectZero reuseIdentifier:CellIdentifier] autorelease]; } ShopProduct *p = (ShopProduct *)[[ShopProduct GetShoppingCart] objectAtIndex:indexPath.row]; cell.Quantity.text = [NSString stringWithFormat:@"%d",p.Quantity]; UIPickerView...
[ -0.016994288191199303, -0.012668726034462452, 0.5506143569946289, -0.020187346264719963, 0.1447782814502716, 0.4106387197971344, 0.3109802007675171, -0.5202739834785461, 0.12534242868423462, -0.37198686599731445, -0.345371276140213, 0.7767063975334167, 0.044456783682107925, -0.083618082106...
target:self action:@selector(hideKeyBoard)]; quantityPicker.tag = indexPath.row; [myToolbar setItems:[NSArray arrayWithObject: doneButton] animated:NO]; cell.Quantity.inputAccessoryView = myToolbar; cell.Quantity.inputView = quantityPicker; cell.Quantity.delegate = self; return cell; } ``` S...
[ -0.28205665946006775, -0.4299316108226776, 0.47396135330200195, -0.31521978974342346, -0.06370272487401962, 0.5353729724884033, 0.2036730796098709, -0.3840334415435791, 0.030438747256994247, -0.5030576586723328, -0.07998506724834442, 0.6126057505607605, -0.5175333023071289, -0.200378388166...
(void)textFieldDidBeginEditing:(UITextField *)textField { currentTextBox = textField; } ``` UIPopOver cant be dismissed from their class and you need to dismiss it from the calling class. You have to call dismiss method from popover calling class, when user presses the done button ``` -(void)doneButtonClikd { ...
[ -0.25082477927207947, 0.11790931969881058, 0.646068811416626, -0.3179749846458435, 0.016506638377904892, -0.10473644733428955, 0.3612871468067169, 0.022566402330994606, -0.032273028045892715, -0.5914785265922546, -0.5749346613883972, 0.5204833745956421, -0.2800426781177521, 0.2360057681798...
I need to map an xml file subset of nodes to a Java Bean. For example map ``` <data> <field1>Value</field1> <field2>Value</field2> <field3>Value</field3> <field4>Value</field4> <field5>Value</field5> </data> ``` to ``` public class DataBean { private String field2; private String field5...
[ 0.2587309181690216, 0.03453266620635986, 0.1925308108329773, -0.0033945085015147924, 0.05747427046298981, -0.204443097114563, -0.07096950709819794, -0.05920524522662163, -0.3516714870929718, -0.7715877890586853, 0.01390121690928936, 0.40181341767311096, -0.10536716878414154, -0.14181450009...
can be done with MOXy's implementation of the JAXB `Binder`: **DataBean** ``` package forum9988170; import javax.xml.bind.annotation.XmlRootElement; @XmlRootElement(name="data") public class DataBean { private String field2; private String field5; public String getField2() { return field2; ...
[ 0.09799788892269135, -0.46101781725883484, 0.2670959234237671, -0.29533591866493225, 0.45288559794425964, -0.21009838581085205, 0.1662157028913498, -0.1703682243824005, 0.00850239023566246, -0.2835962474346161, -0.48713356256484985, 0.9048832654953003, -0.42610985040664673, -0.084041230380...
this.field5 = field5; } } ``` **jaxb.properties** To specify MOXy as your JAXB provider you need to add a file named `jaxb.properties` in the same package as your domain classes with the following entry, ``` javax.xml.bind.context.factory=org.eclipse.persistence.jaxb.JAXBContextFactory ``` **Demo** ``` pack...
[ 0.27279865741729736, 0.0719304159283638, 0.3144965171813965, -0.10449733585119247, 0.14964744448661804, -0.013532212935388088, 0.32185113430023193, -0.5860925912857056, -0.2057131975889206, -0.6904160976409912, -0.6235653162002563, 0.7537175416946411, -0.49633750319480896, 0.04766221344470...
File xml = new File("src/forum9988170/input.xml"); Document document = db.parse(xml); Binder<Node> binder = jc.createBinder(); DataBean dataBean = (DataBean) binder.unmarshal(document); dataBean.setField2("NEW FIELD 2"); dataBean.setField5("NEW FIELD 5"); binder.updateXM...
[ -0.08751533180475235, -0.39721202850341797, 0.7016415596008301, -0.2886267900466919, -0.13301165401935577, 0.15606684982776642, 0.3621181547641754, -0.5647321343421936, -0.0963117703795433, -0.6476190090179443, -0.6449989676475525, 0.5397627949714661, -0.5242789387702942, 0.334668964147567...
DOMSource(document); StreamResult result = new StreamResult(System.out); t.transform(source, result); } } ``` **Output** ``` <?xml version="1.0" encoding="UTF-8" standalone="no"?> <data> <field1>Value</field1> <field2>NEW FIELD 2</field2> <field3>Value</field3> <field4>Value</fie...
[ -0.23125912249088287, -0.1190272644162178, 0.9105893969535828, -0.14982973039150238, -0.14638330042362213, -0.09598486870527267, 0.13840176165103912, -0.44722980260849, -0.27105432748794556, -0.5101776719093323, -0.4541599452495575, 0.673109769821167, -0.22394785284996033, -0.0959668830037...
Recently I had a need to do 'special case' scenario if only one element exist in collection. Checking for `...size() == 1` and retrieving by using `...iterator.next()` looked ugly so I've created two methods in home brew Collections class: ``` public class Collections { public static <T> boolean isSingleValue(Coll...
[ 0.0001147480434156023, -0.33097246289253235, 0.3602432906627655, -0.18932273983955383, -0.163284569978714, 0.07311633229255676, 0.2857353687286377, -0.5825664401054382, -0.4560129940509796, -0.5125156044960022, -0.20646488666534424, 0.5015473365783691, -0.18024393916130066, 0.3125852048397...
I discovered that Guava has method called [Iterables.getOnlyElement](http://docs.guava-libraries.googlecode.com/git/javadoc/com/google/common/collect/Iterables.html#getOnlyElement%28java.lang.Iterable%29). It covers my need and replaces `singleValue`, but I can't find match for `isSingleValue`. Is that by design? Is it...
[ -0.26583027839660645, 0.4517028033733368, 0.3085796535015106, -0.10453226417303085, -0.35806843638420105, 0.10316088050603867, 0.23640026152133942, -0.24865904450416565, -0.4736301600933075, -0.24541455507278442, 0.1526440531015396, 0.49118152260780334, -0.39949527382850647, 0.165880128741...
I'd rather write `if( values.size() == 1 )` or `if( SomeHelper.size(values) == 1 )` than `if( SomeHelper.isSingleValue(values) )` - the intent is much clearer in the first two approaches and it's as much code to write as with the third approach.
[ 0.12946803867816925, 0.1648334115743637, 0.05317147076129913, -0.29525482654571533, -0.1212906688451767, -0.1174580454826355, 0.00498360488563776, -0.15534484386444092, -0.1124439463019371, -0.44655686616897583, -0.04249684512615204, 0.29280775785446167, 0.06508739292621613, 0.037096753716...
Configuration File Path : **/etc/php.ini** Additional .ini files under **/etc/php.d** : curl.ini, fileinfo.ini,gd.ini,json.ini, mysql.ini, mysqli.ini, pdo.ini, pdo\_mysql.ini, pdo\_sqlite.ini, phar.ini,sqlite3.ini,zip.ini The problem is I can not find where to config these items like "post\_max\_size", "disable\_fu...
[ 0.014326120726764202, -0.10538458824157715, 0.41826051473617554, 0.17515036463737488, 0.19448329508304596, -0.03527018055319786, 0.04140501841902733, 0.01116155181080103, -0.24484819173812866, -1.0697503089904785, -0.23510286211967468, 0.6233415007591248, -0.3641740083694458, -0.0652775391...
I have a Maven project. One of my dependencies is a zip file. Maven downloads this zip file to the local repository but the pom file is not there too. How can I instruct Maven to download also the pom file? the type of my dependency is zip. **the pom file exists in the remote repository.** the pom file: ``` <modelVe...
[ 0.18788456916809082, 0.06490793824195862, 0.521155059337616, -0.32291215658187866, 0.07210034877061844, 0.03392164781689644, -0.08842094987630844, -0.08638148009777069, -0.15395262837409973, -0.8128314018249512, -0.08173899352550507, 0.45085862278938293, -0.14845097064971924, 0.20326577126...
<descriptors> <descriptor>createZip.xml</descriptor> </descriptors> </configuration> <executions> <execution>
[ 0.32199427485466003, -0.20980213582515717, -0.3329630494117737, 0.2779293656349182, -0.1346025913953781, 0.12654446065425873, 0.24557898938655853, -0.6151599287986755, -0.5801291465759277, -0.7864240407943726, -0.4164184331893921, 0.10579285025596619, -0.6334301233291626, 0.337690889835357...
<id>make-assembly</id> <phase>package</phase> <goals> <goal>single</goal> </goals>
[ 0.42264699935913086, -0.400937557220459, -0.33764883875846863, 0.20210212469100952, -0.2604975998401642, 0.13209693133831024, -0.13582909107208252, -0.4784756898880005, -0.08072870969772339, -0.5268080234527588, 0.04528193920850754, -0.29594793915748596, -0.5311846137046814, -0.16088391840...
</execution> </executions> </plugin> </plugins> </build> ``` the deploy command: ``` call mvn clean install call mvn deploy:deploy-file -Durl=url -Dpackaging=zip -Dfile="%~dp0\target\art-1-SNAPSHOT.zip" -DgroupId=com.g.g -DartifactId=art -Dversion=1-SNAPSHOT -DrepositoryId=... -DpomFile="p...
[ 0.026454104110598564, -0.1327379196882248, 0.955403745174408, -0.4011613130569458, 0.17917422950267792, -0.10191289335489273, -0.17380015552043915, -0.4860159754753113, -0.5623680353164673, -0.668632984161377, -0.5120350122451782, 0.8834816813468933, -0.34912630915641785, -0.33762222528457...
dependency: the Maven dependency plugin has a [get mojo](http://maven.apache.org/plugins/maven-dependency-plugin/get-mojo.html) that allows downloading of named artifacts from a remote repository.
[ 0.14929424226284027, 0.15264883637428284, 0.12505297362804413, 0.24482351541519165, 0.0542524978518486, -0.2539268136024475, 0.07705497741699219, -0.010811291635036469, -0.023292679339647293, -0.2737509310245514, -0.4357445538043976, 0.5002532005310059, -0.14996638894081116, 0.308804214000...
I make modular App in netbeans platform, and I don't know how to check in which OS this App is running java? accoriding that I want to set the path of my folder and images in my App. and I want to check that at run time. Please suggest me. If you are using the NetBeans Platform then you should add a dependency with the...
[ 0.34349849820137024, 0.12986266613006592, 0.32029828429222107, -0.24837490916252136, 0.10531777888536453, -0.007294512819498777, -0.04727957770228386, -0.5215532183647156, -0.29284027218818665, -0.8735354542732239, -0.08974884450435638, 0.750756025314331, -0.46667078137397766, -0.181624531...
Utilities.OS_IRIX: case Utilities.OS_LINUX: case Utilities.OS_MAC: case Utilities.OS_OPENBSD: case Utilities.OS_OS2: case Utilities.OS_SOLARIS: case Utilities.OS_SUNOS: case Utilities.OS_TRU64: case Utilities.OS_WIN95: case Utilities.OS_WIN98: case Utilities.OS_WIN2000: ``` (Well, and all the rest...
[ -0.194904625415802, 0.12599246203899384, 0.3158458471298218, -0.12353816628456116, -0.03471601381897926, 0.06955219805240631, -0.06398115307092667, 0.1175469234585762, -0.08097436279058456, -0.8400213122367859, -0.37676504254341125, 0.6619816422462463, -0.5249095559120178, 0.23384331166744...
I have a table with column for storing product code. ``` | product_id | Product-name | product_code| | 1 | soap | QTI4589 | 2 abc DRT45869 3 xyz
[ 0.32475414872169495, 0.6313586831092834, 0.3872455954551697, -0.3675740361213684, 0.028930963948369026, 0.36559024453163147, -0.0021788515150547028, -0.38063880801200867, 0.3024519681930542, -0.7495836019515991, 0.0706360712647438, 0.21842841804027557, -0.41274771094322205, 0.5784338712692...
IND458 ``` I want to update all values under column product\_code with QTY-4589 , DRT-45869, IND-458 ... means want to put "-" between code and number. Tried with `replace()` mysql function but not working. Please help me how to do this. Did you try the [INSERT(str,pos,len,newstr)](http://dev.mysql.com/doc/refman/5...
[ -0.07746060192584991, 0.35906288027763367, 0.362512469291687, -0.1324962079524994, 0.059459537267684937, 0.3131304979324341, 0.048418909311294556, -0.3367387652397156, -0.021848617121577263, -0.5644081234931946, -0.01624234952032566, 0.5327820777893066, -0.3546091914176941, -0.011267976835...
Is there a way to write a single query to check if a set of rows matches a set of values? I have one row per set of values that I need to match and I'd like to know if all rows are matched or not. I could perform this via multiple queries such as: ``` select * from tableName where (value1, value2) = ('someValue1', 'so...
[ -0.03954711928963661, 0.06894475221633911, 0.24015048146247864, 0.05964117869734764, -0.1253502368927002, 0.43614572286605835, 0.0433843620121479, -0.23891665041446686, -0.07162703573703766, -0.6026003956794739, 0.21319985389709473, 0.4938070476055145, -0.14262843132019043, 0.1523413956165...