text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
I have a modal view controller that I am presenting on iPad via:
```
vc.modalPresentationStyle = UIModalPresentationFormSheet;
[self presentModalViewController:newDetailController animated:YES];
```
There are editable fields on the new VC. When I edit the field, the keyboard appears and covers up a chunk of the und... | [
-0.08890930563211441,
-0.11226294189691544,
1.1242711544036865,
0.07124482095241547,
-0.03027980588376522,
0.23459891974925995,
0.15728645026683807,
-0.04683755710721016,
-0.09598632901906967,
-0.7900202870368958,
0.05777888000011444,
0.6942442655563354,
-0.293438583612442,
0.1714386343955... | |
your UIWindow, that's the system the keyboard uses, and it should become a lot easier. | [
0.14441677927970886,
-0.0303865484893322,
0.6989530920982361,
0.21396292746067047,
-0.0016820572782307863,
-0.27748534083366394,
0.015603795647621155,
0.3703838586807251,
-0.0030093020759522915,
-0.8332855701446533,
0.029420530423521996,
0.8191254734992981,
0.09735573828220367,
0.030078493... | |
I have a problem that sounds basic, but I haven't found a solution anywhere.
I'm using the Ruby version of XmlSimple, specifically the xml\_out function.
**The Problem**
I'm having trouble outputting an element which would have one attribute node and a text node.
Here's what I want:
```
<lane id='1'>unchannelized</l... | [
-0.3605203628540039,
-0.014033852145075798,
0.6345621347427368,
-0.04233937710523605,
-0.2791195809841156,
0.034354519098997116,
-0.08661821484565735,
-0.1308736503124237,
-0.09779754281044006,
-0.7645499110221863,
-0.08304134011268616,
0.6134998202323914,
-0.33611592650413513,
0.143159747... | |
=> netsimLaneChannelizationCode(matchArr[matchIndex])}
```
The actual hash being generated:
```
unhappyHash << {
#more stuff here,
"LaneConfig" => {"lane" => laneConfigArr},
#more stuff here
}
```
The xml\_out call [EDITED]:
```
result["NetsimLinks"] = {"NetsimLink" => unhappyHash}
doc = XmlSimple.xml_ou... | [
-0.12711462378501892,
0.06731131672859192,
0.6915302872657776,
-0.14899849891662598,
-0.11994213610887527,
-0.1650431603193283,
0.2866150438785553,
-0.21674200892448425,
-0.04482663422822952,
-0.4990297257900238,
-0.17647576332092285,
0.694476306438446,
-0.08698496222496033,
-0.02576051652... | |
you need to produce it with `xml_out`.
So let's take a look. Say we have the following simplified XML:
```
require 'xmlsimple'
xml = %Q(
<CORSIMNetwork>
<lane id='1'>unchannelized</lane>
</CORSIMNetwork>
)
```
Now let's see what we get as a result of `XmlSimple.xml_in(xml)`:
```
{"lane"=>[{"id"=>"1", "con... | [
-0.15231354534626007,
-0.05602039396762848,
0.6292946338653564,
-0.09314016252756119,
-0.1299649029970169,
-0.20047810673713684,
0.005091746803373098,
-0.09380492568016052,
-0.009485876187682152,
-0.4976755678653717,
-0.22363539040088654,
0.5830801129341125,
0.03642630577087402,
0.10816632... | |
script that produces correct output:
```
require 'xmlsimple'
lane_config = [{ "@id" => 1, "content" => "unchannelized"}]
unhappy = {
"LaneConfig" => {"lane" => lane_config},
}
doc = XmlSimple.xml_out(unhappy, {"AttrPrefix" => true,
"RootName" => "CORSIMNetwork", | [
-0.4492502212524414,
-0.19666677713394165,
0.4762421250343323,
-0.06911427527666092,
0.04421144351363182,
0.05641084164381027,
0.2773272693157196,
-0.1991080641746521,
0.15126603841781616,
-0.7830729484558105,
-0.2981031835079193,
0.6456847190856934,
-0.23431925475597382,
-0.13507512211799... | |
"ContentKey" => "content"
})
puts doc
```
Output:
```
<CORSIMNetwork>
<LaneConfig>
<lane id="1">unchannelized</lane>
</LaneConfig>
</CORSIMNetwork>
```
Since the above works for me, the only thing I can think of is that your hash must not contain what you think it contains. | [
-0.17491373419761658,
0.13046790659427643,
0.6512133479118347,
-0.29540812969207764,
0.10125019401311874,
-0.3491156995296478,
-0.06561218947172165,
-0.045211926102638245,
-0.049660131335258484,
-0.9084259867668152,
-0.12424349784851074,
0.6730262637138367,
-0.12704497575759888,
0.20087604... | |
I have this relatively simple regex for usernames
```
// Enforce that username has to be 3-100 characters, alphanumeric, and first character a letter.
// Possibility without begin/end characters and i: [a-z][a-z0-9@.+-_]{2,100}
// Allow for simple email usernames in the future...
return !!preg_match('#^[a-zA-Z][a-zA-Z... | [
0.2473745048046112,
0.34815216064453125,
0.5779771208763123,
-0.07425013184547424,
0.1716557741165161,
-0.19353176653385162,
0.26541867852211,
-0.45359063148498535,
0.22069969773292542,
-0.5920972228050232,
0.06395172327756882,
0.7442392110824585,
-0.12323212623596191,
0.010855196975171566... | |
including all chars between '+' and '\_', try changing the order to `[+_-]` (putting the dash at the end) or escape the dash. | [
-0.25986576080322266,
-0.10412759333848953,
-0.007813806645572186,
-0.47820788621902466,
-0.06295260041952133,
0.3456819951534271,
0.5615202188491821,
0.044701386243104935,
-0.03187628462910652,
-0.18649879097938538,
-0.51516193151474,
0.4629642367362976,
-0.13459953665733337,
-0.259383052... | |
\*) I have a Delphi XE ISAPI dll running under IIS 7.5 - Server 2008 R2. The DLL launches an instance of TISAPIApplication. The application resides at a discreet, fixed, predetermined URL, and listens on a particular port (not port 80) for requests - all of this is of course a 'standard configuration'.
\*) On my serv... | [
0.08277036994695663,
-0.10144912451505661,
0.5349543690681458,
-0.09906709939241409,
-0.02027728222310543,
0.07042809575796127,
0.42135462164878845,
-0.2730829119682312,
0.090731181204319,
-0.6546773314476013,
-0.29024839401245117,
0.8962864279747009,
-0.47607138752937317,
0.00922396034002... | |
than parsing URL's).
\*) I have looked around in the docs and source code of TISAPIApplication and its ancestor and associated classes, **but I can't find anywhere a property that tells me on what port a particular instance of the application is listening - the port seems to be available only on a request by request b... | [
0.10419611632823944,
-0.0053633833304047585,
0.4083632826805115,
0.16413170099258423,
-0.00808126013725996,
-0.27960535883903503,
0.6115602850914001,
-0.24520382285118103,
-0.14487048983573914,
-0.5107700824737549,
-0.1283542811870575,
1.0716559886932373,
-0.29090413451194763,
0.1830247342... | |
**Anyone know how to do this? What property do I need grab, and from where?** In fact, I can't find anything at all that will tell me anything about the URL the application itself resides at - everything seems to work on a per request basis.
*(
Please - I'm not looking for workarounds telling me how to do it via the r... | [
0.3670532703399658,
0.1731678694486618,
0.2932535707950592,
0.4398570954799652,
-0.01676078513264656,
-0.17578357458114624,
0.3336857557296753,
0.25904130935668945,
-0.4254660904407501,
-0.46018123626708984,
-0.06740161031484604,
0.4517541229724884,
0.06994569301605225,
0.12433133274316788... | |
TISAPIApplication instance is launched when the ISAPI dll is loaded by IIS and this TISAPIApplication instance persists througout the lifetime of the ISAPI application and contains state information that is valid for the lifetime of the application instance
).*
TIA
I think maybe I'm trying to do something here that is... | [
-0.01052679680287838,
-0.15163001418113708,
0.5187578797340393,
0.252239853143692,
0.10356355458498001,
-0.10258552432060242,
0.7048300504684448,
-0.46171605587005615,
0.10906480997800827,
-0.4077273905277252,
0.006613970268517733,
0.8690778613090515,
-0.203872948884964,
-0.022869694977998... | |
listening port, which is essentially volatile. | [
-0.2520345449447632,
0.0639900416135788,
0.3132256865501404,
-0.031241243705153465,
0.22299881279468536,
-0.09584588557481766,
0.037276748567819595,
-0.06207876652479172,
0.12742190062999725,
-0.4201655685901642,
-0.2205008715391159,
0.9077106714248657,
-0.3118301033973694,
0.3852525353431... | |
I need a fastest way to find any point inside triangle(not edges) in 2D. Any help?
If your triangle is expressed as points, you're going to have to take every coordinate into consideration, so Steve Jessop's answer is nearly optimal.
Note all you actually need to do is start at one point and bump it towards the two ot... | [
0.1647743284702301,
0.2422867864370346,
-0.06345182657241821,
0.1887524425983429,
-0.022170761600136757,
0.12631966173648834,
-0.1757250428199768,
-0.48650482296943665,
-0.2661665380001068,
-0.7739430665969849,
0.17730067670345306,
0.032743483781814575,
-0.19608460366725922,
-0.06539948284... | |
(x1 + x2) / 2) / 2
ym = (y0 + (y1 + y2) / 2) / 2
```
If the variables are integer the compiler should optimize the divisions to bit shifts which, if scheduled correctly, are largely free in ARM. If the variables are floats or doubles the compiler should optimize them to simple exponent decrements. Floating point divi... | [
0.10216262191534042,
0.12085012346506119,
-0.018922239542007446,
-0.05921250954270363,
-0.1512804627418518,
0.06855054199695587,
0.1166822537779808,
-0.49278032779693604,
-0.34411823749542236,
-0.2713705897331238,
-0.16806146502494812,
0.4284665882587433,
-0.06585914641618729,
-0.024238597... | |
to why this works: First we find the midpoint of the line segment formed by `(x1, y1)` and `(x2, y2)`. Then we find the midpoint between the line segment formed by *that* point and `(x0, y0)`. If you draw a diagram of a triangle and do this, it becomes immediately clear that this works. | [
0.03443429246544838,
-0.0802813321352005,
0.22350777685642242,
-0.058589868247509,
-0.15253925323486328,
0.18811598420143127,
-0.02156321331858635,
-0.22630897164344788,
-0.1603800654411316,
-0.9477612972259521,
-0.20297308266162872,
0.037720900028944016,
-0.007744807284325361,
0.274212419... | |
Is it possible to change map element colors in a MapView in the same way that you can with a Google Map? If so, how would I go about doing this.
I'm looking to change map element colors pretty substantially, so I don't think that adding an Annotation as described [here](https://stackoverflow.com/questions/1441230/mkma... | [
0.26709842681884766,
-0.19634835422039032,
0.22752803564071655,
0.04973002150654793,
0.3366147577762604,
0.1008041501045227,
-0.09815885871648788,
-0.027062438428401947,
-0.23614861071109772,
-0.7727727293968201,
0.3173324763774872,
0.6093046069145203,
-0.015642354264855385,
0.003262391546... | |
support sucks. I shot an email to their support address about a week or two ago and have still not received any kind of response. Their most recent SVN commit is also close to a year old.
2) [This issue](https://github.com/route-me/route-me/issues/170) raised on the Route Me repo, combined with their shoddy support, s... | [
0.2527935802936554,
0.015181179158389568,
0.7191148996353149,
0.11861026287078857,
-0.17070472240447998,
0.07906872034072876,
0.5039226412773132,
0.2500879466533661,
-0.46332263946533203,
-0.5073546171188354,
0.06035624444484711,
0.17570637166500092,
0.04871658608317375,
0.1554177552461624... | |
the same question I had initially. | [
0.0928187221288681,
-0.0045251986011862755,
0.08359129726886749,
0.04596986249089241,
-0.12266477942466736,
0.008944198489189148,
-0.026834871619939804,
-0.2741299569606781,
-0.1411723494529724,
-0.07584021985530853,
0.07993713021278381,
0.17635241150856018,
-0.08701121062040329,
0.1663625... | |
Hi there i have an array of data that looks like this (it contains list number and brand name):
`["1_Sophie_Gray", "2_Atlantic_Bay", "2_Trait", "3_Tammy", "3_Flipback", "3_Duck_Dodge", "3_Bambini", "4_Bellisima"]`
What i need to do is separate these out and create a ul for each of the lists (1 is Womens clothing, 2 m... | [
0.2218284010887146,
-0.05620477348566055,
0.6517460346221924,
-0.054178331047296524,
-0.37578120827674866,
0.7077038288116455,
-0.09835320711135864,
-0.2092142105102539,
-0.4788213074207306,
-0.31512749195098877,
0.37823063135147095,
0.37687546014785767,
-0.058868955820798874,
0.2768383026... | |
list of icons for each of these new arrays. So eventually i'll end up with this:
```
<div class="store_brands">
<p id="brand_intro">
Brands and departments available in this store:
</p>
<h4>list 1</h4>
<ul>
<li>
<img src="/images/v3/brand_logos/wallis.gif" alt="list 1 brands" />
</li>
</ul>
<h4>lis... | [
0.40975916385650635,
0.2502732276916504,
0.6754893064498901,
-0.1893632411956787,
-0.16259823739528656,
0.27767688035964966,
-0.18431530892848969,
-0.5148515105247498,
-0.18335822224617004,
-0.7384008169174194,
0.08486547321081161,
0.5940019488334656,
-0.17518910765647888,
0.39394408464431... | |
<img src="/images/v3/brand_logos/tammy.gif" alt="list 3 brands" />
</li>
<li>
<img src="/images/v3/brand_logos/flipback.gif" alt="list 3 brands" />
</li>
<li>
<img src="/images/v3/brand_logos/duck_dodge.gif" alt="list 3 brands" />
</li>
</ul>
```
Here is my code:
```
function inSt... | [
0.3497084379196167,
0.2889024317264557,
0.4889148771762848,
-0.18226344883441925,
-0.26789718866348267,
0.26075413823127747,
0.01879364624619484,
-0.5382785797119141,
-0.067153699696064,
-0.5061680674552917,
-0.09528673440217972,
0.5262524485588074,
-0.06128127500414848,
0.1407080292701721... | |
brandResults = storeData.brands,
brands = brandResults.split(", "),
listCount = 1,
titleText = "list 1";
for (var i=0; i<brands.length; i++) {
listNum = brands[i].split(/_(.+)/)[0];
listNum = parseInt(listNum);
fileName = brands[i].split(/_(.+)/)[1];
... | [
0.4145330786705017,
-0.3208710253238678,
0.655785322189331,
-0.2959154546260834,
0.08322151750326157,
0.12120824307203293,
0.02701740711927414,
-0.6062100529670715,
-0.1184874176979065,
-0.23657673597335815,
-0.37831801176071167,
0.6590198278427124,
-0.08034707605838776,
0.5890471935272217... | |
function addToArray () {
brandsArr.push(brandImgsPath + fileName + '.gif');
}
if(listNum !== listCount){
buildBrandList(brandsArr, titleText);
titleText = "list " + listNum; | [
0.19003060460090637,
-0.3429683744907379,
0.8768259286880493,
-0.5445654988288879,
-0.09389650076627731,
-0.05437803640961647,
0.21936719119548798,
-0.5655591487884521,
0.2732263505458832,
-0.43703562021255493,
-0.38341018557548523,
0.849170446395874,
-0.1690026819705963,
0.090021274983882... | |
addToArray();
} else {
addToArray();
}
}
function buildBrandList(brandsArr, titleText) {
brandList += '<h4>'+titleText+'</h4>';
brandList += '<ul>';
for (i=0; i < brandsArr.length; i++) {
brandList += '<li><img src="'+brandsArr[i]+'" alt="'+titleText+... | [
-0.04452219977974892,
-0.12014122307300568,
1.1095372438430786,
-0.4167601466178894,
-0.15847168862819672,
0.09631450474262238,
0.16568541526794434,
-0.7678534984588623,
0.2523805499076843,
-0.5212157964706421,
-0.47911232709884644,
0.7890307903289795,
-0.043892648071050644,
0.381751716136... | |
}
brandList += '</ul>';
brandsArr = [];
listCount++;
}
brandList += '</div>';
return brandList;
};
```
I know the logic is horribly flawed, hence the reason it doesn't work. Can anyone help me figure this out?
You need to supply `shell=True` to execute the command through a shell int... | [
0.38330239057540894,
-0.00400850223377347,
0.5463462471961975,
-0.27643781900405884,
0.11250590533018112,
-0.04257272556424141,
0.3297100067138672,
-0.389518141746521,
0.18209223449230194,
-0.5127731561660767,
-0.16106781363487244,
0.9186400771141052,
-0.16289278864860535,
0.25482541322708... | |
raw commandline as you want it to be passed to the shell:
```
proc = subprocess.Popen('ls *.bc', shell=True,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE)
``` | [
0.06997459381818771,
0.012620431371033192,
0.07083237171173096,
-0.3149355351924896,
-0.007191206328570843,
0.18176472187042236,
0.12816312909126282,
-0.006128580309450626,
0.1943216472864151,
-0.6118695139884949,
-0.41557571291923523,
0.6486647129058838,
-0.02093694917857647,
-0.001102842... | |
I am building a page using blocks of sections:
<http://jsfiddle.net/NrkTn/3/>
You can see I have added margin to the section elements, however I'm unable to add both top and bottom margins, it uses whichever is the largest value.
Each section should have a top and bottom margin of 20px, making the space between them ... | [
0.21302106976509094,
0.1854214370250702,
0.7202131152153015,
-0.10742724686861038,
-0.41623207926750183,
0.1956443339586258,
0.1512063443660736,
-0.43733087182044983,
-0.1966649889945984,
-1.0201703310012817,
0.2010958045721054,
-0.03408706933259964,
-0.006058311089873314,
0.22130016982555... | |
I have 498 text files resulting from WebScraping results from a form on a website, and i want to convert it all to Excel standard (.xls) format using java.
I will have to do this conversion every month with the same amount of files, taking no less than 10 seconds per file on a hand-based conversion, summing a full 1h2... | [
0.6352956295013428,
0.3548969328403473,
0.2578258812427521,
-0.20977522432804108,
-0.08590245246887207,
0.3794409930706024,
0.35149678587913513,
-0.422402948141098,
0.00887815747410059,
-0.8722751140594482,
-0.20704405009746552,
0.39034077525138855,
-0.09700421988964081,
-0.150719836354255... | |
I try to connect blazeDS in actionscript project with the following code:
```
ro = new RemoteObject();
var cs:ChannelSet = new ChannelSet();
cs.addChannel(new AMFChannel("my-amf", "http://localhost:8080/Ninja/messagebroker/amf"));
ro.channelSet = cs;
ro.destination = "test";
ro.source = "me.q... | [
0.07199419289827347,
-0.19089703261852264,
0.510814905166626,
-0.09879299253225327,
-0.35523679852485657,
0.1145954579114914,
0.5444173216819763,
-0.5238347053527832,
-0.23765099048614502,
-0.670048177242279,
-0.10616548359394073,
0.5057618021965027,
-0.42211511731147766,
-0.09227168560028... | |
pro](https://i.stack.imgur.com/VVXBC.png)
In fact, I got an error from the actionscript project:
```
TypeError: Error #1034: Type Coercion failed: cannot convert Object@5bec0b9 to mx.messaging.messages.ErrorMessage.
```
I don't know what's the differenct between these two ways of remoteobject.
The best resourc... | [
-0.04041702672839165,
0.035571638494729996,
0.14105351269245148,
-0.16145789623260498,
-0.40711459517478943,
0.25713351368904114,
0.7038316130638123,
-0.28693708777427673,
-0.12015362083911896,
-0.500586211681366,
0.14695915579795837,
0.6976712346076965,
-0.3199950158596039,
0.056271184235... | |
I use awk in the environment variable:
```
NUMBER_OF_PORTS=`awk /^"number of ports:"/'{print $4}' Config_input.txt`
```
which returns the value `2`.
I try to use this variable in a while loop:
```
i=1
while (("$i" <= "$NUMBER_OF_PORTS")); do
echo "hello hello $i"
i=$(( $i+1 ))
done
```
... | [
-0.09783663600683212,
0.08724673092365265,
0.1689574271440506,
-0.17964988946914673,
-0.10002976655960083,
0.09121504426002502,
0.6434870958328247,
-0.36306628584861755,
0.029322443529963493,
-0.4160558879375458,
0.11770088970661163,
0.6795552372932434,
-0.39954251050949097,
0.069371007382... | |
like:
> let cc=$NUMBER\_OF\_PORTS+0
it does not work. It is something with the fact that the variable holds the awk command. If I set cc=5 and try to implement the while with $cc it works fine.
**Example code**
```
echo $NUMBER_OF_PORTS
#i=1
#echo $i
for (( i = 1; i < ${NUMBER_OF_PORTS}; i += 1 ));
do ... | [
0.30464914441108704,
-0.048950713127851486,
0.20117950439453125,
-0.2012714296579361,
-0.014453859068453312,
-0.17441312968730927,
0.31494227051734924,
-0.32352402806282043,
-0.1887350082397461,
-0.3146052658557892,
0.29349642992019653,
0.5913698673248291,
-0.2580089867115021,
0.3543294370... | |
This gives me the same error:
```
i=1
NUMBER_OF_PORTS=""
while (("$i" <= "$NUMBER_OF_PORTS")); do
echo "hello hello $i"
i=$(( $i+1 ))
done
```
Your awk command looks very awkward. Try this:
```
NUMBER_OF_PORTS=$(awk '/^number of ports:/ {print $4}' Config_input.txt)
```
Are you sure the string "number of port... | [
-0.18747463822364807,
0.04236917942762375,
0.18495655059814453,
-0.26689258217811584,
-0.04058163985610008,
-0.006494246888905764,
0.5470601916313171,
-0.21269109845161438,
-0.19365626573562622,
-0.4708292484283447,
-0.019849225878715515,
0.7571627497673035,
-0.06897740066051483,
-0.055965... | |
Based on your comment, try this:
```
NUMBER_OF_PORTS=$(awk -v RS='\r\n' '/^number of ports:/ {print $4}' Config_input.txt)
``` | [
0.1828784942626953,
-0.024144744500517845,
0.3439008593559265,
-0.2199963927268982,
0.10449071228504181,
0.28072577714920044,
-0.005959375761449337,
0.19079704582691193,
-0.42816540598869324,
-0.7050154209136963,
-0.11244974285364151,
0.7193997502326965,
-0.33921754360198975,
0.16617932915... | |
this is my xaml:
```
<ListView Name="myListView" ItemsSource="{Binding ElementName=IndexPage, Path=SeriesCollection}" ScrollViewer.HorizontalScrollBarVisibility="Disabled" IsSynchronizedWithCurrentItem="True" SelectionChanged="handleSelected">
<ListView.ItemsPanel >
<ItemsPanelTemplate>
<Wr... | [
-0.1666744351387024,
-0.01368749514222145,
0.7903361320495605,
-0.30632513761520386,
0.04406505450606346,
-0.12579412758350372,
-0.0469452440738678,
-0.42560243606567383,
-0.44643634557724,
-0.9261448383331299,
0.016641000285744667,
0.028933558613061905,
-0.06990928202867508,
0.11180876940... | |
>
<Image Width="214" Height="317" Source="{Binding Image}"/>
<Label Content="{Binding Name}" />
</StackPanel>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
```
and this is my code behind
```
public void handleSelected(object sender, RoutedEventArgs a... | [
0.041395265609025955,
-0.17610378563404083,
0.9627722501754761,
-0.19889694452285767,
-0.05240821838378906,
0.12148444354534149,
0.07811406999826431,
-0.4714479446411133,
-0.33339619636535645,
-0.4674394428730011,
-0.16678884625434875,
0.015952106565237045,
-0.17521783709526062,
0.41015040... | |
Console.WriteLine(currentSerie.GetType());
Console.WriteLine(currentSerie.ToString());
}
```
how do i work with currentSerie? how do i access the data which is stored in each Item? i cant access properties and i cant convert it to anything else then object.
also interesting, the output of the code is no... | [
-0.1312972754240036,
-0.09892386198043823,
0.9349976778030396,
0.0790473148226738,
0.22593532502651215,
0.037392083555459976,
-0.09569951146841049,
-0.5914710760116577,
-0.15390080213546753,
-0.5924587845802307,
-0.05455887317657471,
0.18931074440479279,
-0.23706728219985962,
0.11445582658... | |
I'm pretty new to Java so sorry if this is super basic. Basically I have some data in a array list and it works fine but in a later part of my program I need to read the list and it takes a long time because the list becomes very large. So I thought I could take certain parts of the array list(thats needed later) into ... | [
0.27987903356552124,
0.034525156021118164,
-0.011850173585116863,
-0.29819995164871216,
-0.17920838296413422,
-0.11140647530555725,
0.39202216267585754,
-0.07020364701747894,
-0.009174816310405731,
-0.6332587599754333,
0.33334359526634216,
0.5459194779396057,
-0.24238720536231995,
-0.08967... | |
each data thats created in a single loop data\_cache\_local\_loop):
```
HashMap hashmap_of_values = new HashMap(); //hashmap of arraylist
for (int i = 0; i<100; i++) {
....program logic and more loops
Set uniqie_T_cache = new HashSet(T_cache_local_loop); //make values unique
hashmap_of_values.put(i, new ArrayList(uniq... | [
0.07190126925706863,
-0.20861758291721344,
0.2844545841217041,
-0.10225079953670502,
-0.057230595499277115,
0.3596734404563904,
0.40336522459983826,
-0.7035089135169983,
-0.39238211512565613,
-0.6025086045265198,
-0.0277076568454504,
0.4933823347091675,
-0.48377740383148193,
0.150443270802... | |
items).
Can anyone suggest to me what I'm doing wrong? I'm not 100% but I think I maybe looking at the array list I add as a single item but I'm unsure of what I'm doing wrong.
You should really be using generics -- it'd help you a lot, and make these issues much more obvious -- but for the moment your problem is that... | [
0.2663502097129822,
-0.05581709370017052,
0.4568377435207367,
0.21073640882968903,
-0.3665771782398224,
-0.0036899433471262455,
0.38648009300231934,
-0.27400198578834534,
-0.48890623450279236,
-0.5883265137672424,
-0.027624929323792458,
0.44640129804611206,
-0.3337678611278534,
0.398025661... | |
list. | [
0.3235013782978058,
-0.024482378736138344,
0.09467007219791412,
0.06666256487369537,
0.20283927023410797,
0.0646992102265358,
0.34415701031684875,
-0.20286166667938232,
-0.5702333450317383,
-0.37259870767593384,
-0.24493911862373352,
0.03747120872139931,
-0.24781963229179382,
0.42703542113... | |
In Java, reading environment variables is done with `System.getenv()`.
Is there a way to do this in Scala?
Since Scala 2.9 you can use `sys.env` for the same effect:
```
scala> sys.env("HOME")
res0: String = /home/paradigmatic
```
I think is nice to use the Scala API instead of Java. There are currently several pro... | [
0.21604515612125397,
0.05983774736523628,
0.22807927429676056,
-0.26263725757598877,
-0.13337847590446472,
0.022321470081806183,
0.22403554618358612,
-0.20027442276477814,
-0.4262811839580536,
-0.7724587321281433,
0.1339063197374344,
0.54845130443573,
-0.5665433406829834,
-0.07177891582250... | |
I have a parent FragmentActivity with three child Tab Fragments. When a "Submit" button is pressed on the FragmentActivity, I want to sum the values of all the EditText fields in the different Tab Fragments. I think I have the right idea, using getSupportFragmentManager().findFragmentByTag(), however I'm finding that i... | [
0.07899884134531021,
-0.011089403182268143,
0.42016956210136414,
-0.02192535437643528,
-0.18442508578300476,
0.23765383660793304,
0.39132583141326904,
-0.4013449549674988,
-0.09231022745370865,
-0.7312260866165161,
-0.10343528538942337,
0.243464395403862,
-0.11731638014316559,
0.3078206181... | |
.getActivity();
LinearLayout linearLayout = (LinearLayout) tab
.findViewById(R.id.get_supplies_layout);
int sum = 0;
for (int i = 0; i < linearLayout.getChildCount(); i++) {
View view = linearLayout.getChildAt(i);
QuantityTextView quantity = (QuantityTextView) view
... | [
0.18164567649364471,
-0.5128600001335144,
0.9194941520690918,
-0.334282249212265,
0.2287958413362503,
0.3766742944717407,
0.0685625821352005,
-0.5622929930686951,
-0.07808373868465424,
-0.4498842656612396,
-0.18771958351135254,
0.6544018387794495,
-0.06910756230354309,
0.17936469614505768,... | |
sum += Integer.parseInt(quantity.getText().toString());
}
return sum;
}
```
In the above scenario, sum1, sum2, sum3, and sum4 will all be the same. They will be the sum for the active Tab Fragment.
Does anyone have any ideas?
Thanks!
As Barak mentioned above, you need to get a hold of the fragment(s) tha... | [
0.14732258021831512,
0.11296451836824417,
0.4182932376861572,
-0.0012032011291012168,
-0.2069517821073532,
0.17592903971672058,
0.3123457431793213,
-0.24781319499015808,
-0.3247515857219696,
-0.7092797160148621,
-0.20791102945804596,
0.47813570499420166,
-0.15392257273197174,
0.20950402319... | |
don't have many fragments.
2. Use the ViewHolder pattern to "cache" the relevant data that you need to access. | [
0.24350550770759583,
-0.1809668093919754,
-0.3096656799316406,
0.34936413168907166,
-0.042434606701135635,
-0.3209841847419739,
0.24689806997776031,
0.03654377907514572,
0.050475962460041046,
-0.8536714315414429,
-0.22194796800613403,
0.24843762814998627,
-0.1642465442419052,
0.01440600585... | |
I've created an applet that uses JavaPOS to communicate with a payment terminal on the user's local system.
When run from within the Eclipse IDE, the applet works fine, but not when run in a browser. In a browser, the applet can't seem to find the jpos/res/jpos.properties and jposxml.cfg files.
When the following sta... | [
0.08728756755590439,
0.27169308066368103,
0.43192023038864136,
-0.28504958748817444,
-0.00112338294275105,
0.24627451598644257,
0.23112545907497406,
-0.20625795423984528,
-0.10925684124231339,
-0.9600785374641418,
-0.11479499191045761,
0.6845477223396301,
-0.26199737191200256,
-0.162646383... | |
to "see" the two files:
1. jpos/res/jpos.properties is already present in one of the jars referenced by the applet. Nevertheless, I've added this file to the applet's main jar. I've also tried adding it to the directory on the server containing the jars (with the correct relative path). None of this works.
2. I can wo... | [
0.2204894721508026,
0.17989955842494965,
0.5415648818016052,
-0.1384308934211731,
-0.0994558185338974,
0.22369417548179626,
0.3819923996925354,
-0.5302042961120605,
-0.23120319843292236,
-0.8411679267883301,
-0.29642626643180847,
0.5544867515563965,
-0.3665417432785034,
0.11264272034168243... | |
server in the same directory as the jars. I've also tried creating a separate jar file containing only jposxml.cfg, but that doesn't work either. I get the following output in the Java console window:
```
[AbstractRegPopulator]getPopulatorFileIS(): populatorFileName=jposxml.cfg
[JposServiceLoader]manager.getEntryRegis... | [
0.11726449429988861,
0.16032959520816803,
0.7147569060325623,
-0.25208595395088196,
-0.19962698221206665,
0.17531025409698486,
0.266659140586853,
-0.12353439629077911,
-0.17571459710597992,
-0.7381464838981628,
0.16333243250846863,
0.6052990555763245,
-0.22636660933494568,
0.00156166066881... | |
for the reference of anyone facing a similar problem.
I couldn't get the JavaPOS code to see the jpos.properties file, but loading the values into System properties as described above works, so I'll stick with that for now.
To have JavaPOS load jpos.xml or jposxml.cfg from a URL, you need to set the property jpos.con... | [
0.2741333544254303,
-0.0884719118475914,
0.5824565291404724,
0.0823068767786026,
0.1506892442703247,
0.03986378014087677,
-0.1811424195766449,
-0.13677524030208588,
-0.19365377724170685,
-0.5536081194877625,
-0.04396235942840576,
0.34324610233306885,
-0.260916143655777,
-0.0886526405811309... | |
I want to deploy a applicacion in appharbor, in local my app read and write a file locate in C://projects/Name\_App
But in the server logically this path don't run.
How to change the path in the app to work fine in appharbor.
Thanks.
Please check [this question](https://stackoverflow.com/questions/5203945/getting-pr... | [
0.056128259748220444,
-0.0922548696398735,
0.7316597700119019,
0.24529887735843658,
0.2736358046531677,
0.0051637981086969376,
0.17913353443145752,
-0.15725961327552795,
-0.4464932084083557,
-0.8870260715484619,
-0.24464094638824463,
0.5057876706123352,
-0.2650623023509979,
-0.103456586599... | |
I have a php page inside a folder on my website.
I need to add the name of the current directory into a variable for example:
```
$myVar = current_directory_name;
```
Is this possible?
```
getcwd();
```
or
```
dirname(__FILE__);
```
or (PHP5)
```
basename(__DIR__)
```
<http://php.net/manual/en/function.get... | [
0.16987118124961853,
0.22063781321048737,
0.4714849591255188,
-0.10223441570997238,
-0.11394000053405762,
-0.23486793041229248,
0.24423319101333618,
-0.2648319602012634,
0.07537051290273666,
-0.6455375552177429,
0.03547940030694008,
0.5806955099105835,
-0.3552234172821045,
0.00941490475088... | |
call of `require_once` in `common.php` will correctly includes `editor.php` in `images/editor.php` instead of trying to look in current directory where `main.php` is run. | [
0.2803176939487457,
0.05750639736652374,
0.38706231117248535,
-0.07353397458791733,
0.15753091871738434,
-0.2749551236629486,
0.20342816412448883,
-0.2820102870464325,
-0.11129433661699295,
-0.5401703715324402,
-0.1540410816669464,
0.38500484824180603,
-0.4381902813911438,
-0.1183485463261... | |
I'm attempting to do a custom route so I can prefix a url in my application with a chosen string and the do some processing based on that. The problem I'm running into is, that the action links that are generated are not contextualized based on the url that it exists on.
Routes:
```
routes.MapRoute(
"Tes... | [
-0.020620644092559814,
-0.22010843455791473,
0.4170584976673126,
0.2947545349597931,
-0.1384640634059906,
0.20418353378772736,
0.12555146217346191,
-0.014022242277860641,
-0.3370262682437897,
-1.0051943063735962,
-0.23770426213741302,
0.02871006354689598,
-0.4954568147659302,
0.02658306807... | |
"Default",
"{controller}/{action}/{id}",
new { controller = "Space", action = "Index", id = UrlParameter.Optional });
```
Navigating to TEST/Space/Index works, as well as Space/Index, but the odd issue I need fixed is that the links generated via ActionLink do not obey the context in which the... | [
-0.03507465124130249,
-0.21063613891601562,
0.8166347146034241,
0.1370064914226532,
0.09101872891187668,
-0.2250271588563919,
0.3513685464859009,
-0.3689030706882477,
-0.44405320286750793,
-0.6284177899360657,
-0.26165771484375,
0.6625800728797913,
-0.36648789048194885,
0.08231861889362335... | |
are all referencing the TEST/ route that the calling url does not. Is this the default behavior? Is there a way to get these links to generate in the proper context?
**Edit:**
The first place I saw this was in the Html.BeginForm without the TEST/
```
Html.BeginForm("ToTheMoon", "Space", FormMethod.Post)
```
which ... | [
0.3702399730682373,
-0.06595318764448166,
0.508179783821106,
0.2154286950826645,
-0.0012922381283715367,
-0.09967603534460068,
0.08990787714719772,
-0.1001758798956871,
-0.21094147861003876,
-0.853900671005249,
-0.00015405143494717777,
0.16341045498847961,
-0.1913299560546875,
-0.143865421... | |
new { controller = "Space", action = "Index", id = UrlParameter.Optional },
new { path = @"TEST" },
new string[] { "The.Namespace" });
```
Setting the constraint on path and removing it from the route makes this routing work. Now I can hit the /TEST/Space/Index and all my links generated from ActionLink behav... | [
0.029515771195292473,
-0.41559603810310364,
0.6136140823364258,
0.20913107693195343,
0.04840478301048279,
-0.1685757339000702,
0.15225669741630554,
-0.38041722774505615,
-0.377105712890625,
-0.9134569764137268,
-0.01971704699099064,
0.4898516833782196,
-0.18824402987957,
0.1796758621931076... | |
was [on this page](http://www.asp.net/mvc/tutorials/controllers-and-routing/creating-a-route-constraint-cs). | [
-0.21585983037948608,
-0.38197609782218933,
0.6751744747161865,
0.027281438931822777,
-0.037205278873443604,
-0.27848175168037415,
-0.025527041405439377,
0.23985806107521057,
-0.4101244807243347,
-0.5715469717979431,
-0.3344874083995819,
-0.02181328646838665,
-0.20766626298427582,
-0.01153... | |
I am using an open source java library called [Weka](http://www.cs.waikato.ac.nz/ml/weka/) in an Eclipse Indigo project. The library seems a bit outdated so Eclipse is showing me thousands of warnings in regards to its code. A typical example is:
> ArrayList is a raw type. References to generic type ArrayList<E>
> sh... | [
0.7980757355690002,
-0.00029506717692129314,
-0.2563312351703644,
-0.2629529535770416,
-0.4096262454986572,
-0.2433699667453766,
0.47981196641921997,
-0.3011482357978821,
-0.05690041556954384,
-0.5473788976669312,
0.3873231112957001,
0.3134743869304657,
-0.34975889325141907,
0.152162447571... | |
open source project and I'd have to do these changes several (hundreds of?) times over.
Instead, might there be some global setting for Eclipse (or the Java compiler?) where I can indicate that I do not want to be warned for a specific project?
It has been suggested that you just turn off the "offending" warnings via ... | [
0.6490744948387146,
0.29504892230033875,
-0.08954367786645889,
-0.1449928879737854,
-0.22583502531051636,
-0.6976467370986938,
0.5423972010612488,
0.28563007712364197,
-0.3194226026535034,
-0.5282866954803467,
-0.2722635865211487,
0.5868076086044312,
-0.5555782914161682,
0.0560956336557865... | |
ignore them you are liable to get unexpected runtime exceptions.)
Another possibility would be change the project settings to set the Java compiler's source level to Java 1.4 or earlier. You should *only* do this on the Weka project. The project containing your code needs to use a source level of at least Java 1.5 ...... | [
0.5592898726463318,
0.08861073851585388,
0.0068734087981283665,
0.0959630161523819,
-0.15259383618831635,
-0.33356133103370667,
0.7022718787193298,
-0.06129433959722519,
-0.48363009095191956,
-0.567734956741333,
-0.05548898130655289,
0.695715069770813,
-0.3200139105319977,
0.02238882519304... | |
are modifying Weka, you can use the original JARs and ignore any build artifacts created by Eclipse.
* The source level and the target level are different. The source level says what version of the Java language the source code must conform to. The target level says what version of the classfile format should be used. ... | [
0.6782636642456055,
0.10606437921524048,
0.07280046492815018,
-0.030532892793416977,
-0.3217276632785797,
-0.11039884388446808,
0.31444862484931946,
-0.3260933756828308,
0.049043767154216766,
-0.5809948444366455,
0.11777884513139725,
0.5595120787620544,
-0.37460821866989136,
0.160810366272... | |
Java Compiler > Compiler compliance level?
Yes. Note that it allows you to specify the source and target levels independently ... modulo the constraint that the Java compilers only allow certain combinations. | [
0.5025259852409363,
0.13421903550624847,
-0.2173185497522354,
-0.13791942596435547,
-0.21309198439121246,
-0.2916690707206726,
0.3170199394226074,
-0.5016782283782959,
0.1419653296470642,
-0.5815542936325073,
-0.11020436137914658,
0.6058766841888428,
-0.4831392467021942,
-0.400437593460083... | |
Imagine I have a string, `$my_css_string`, and we know it contains CSS styling.
Now imagine I have a function `string url_replace(string $url)` that returns a modified URL that I want to replace every `url()` with in `$my_css_string`.
So, for simplicity's sake, let's say `url_replace()` ALWAYS returns the string `"xx... | [
0.3038930594921112,
0.31277117133140564,
0.3393018841743469,
-0.18369118869304657,
0.04692622646689415,
0.39347487688064575,
0.24188120663166046,
-0.30083170533180237,
-0.2571183741092682,
-0.6723707914352417,
-0.016437551006674767,
0.502344012260437,
-0.28808215260505676,
0.12372227013111... | |
{
background:url( "xxxx" );
border:1px solid rgb(0,0,128);
}
.cat {
background:url(xxxx);
}
```
Notice how it needs to handle multiple ways of defining URLs.
How do I do that?
You want to use [`preg_replace_callback`](http://php.net/manual/en/function.preg-replace-callback.php):
```
$my_new_css_string =... | [
0.014148683287203312,
0.04098067805171013,
0.958206057548523,
-0.1458667516708374,
0.05829308182001114,
-0.06532580405473709,
0.06663820892572403,
-0.07875491678714752,
-0.43141040205955505,
-0.44341957569122314,
-0.32134100794792175,
0.43608829379081726,
-0.32720839977264404,
0.1988244205... | |
$my_css_string);
``` | [
0.12284179776906967,
0.4593944549560547,
0.3508398234844208,
-0.327668160200119,
0.15264339745044708,
-0.1481018364429474,
0.41320306062698364,
0.26581713557243347,
-0.05823802575469017,
-0.5064350366592407,
-0.3522947430610657,
0.416586697101593,
-0.3527679443359375,
0.33062970638275146,
... | |
I have [GuitarToolkit](http://itunes.apple.com/gb/app/guitartoolkit/id284962368?mt=8 "GuitarToolkit") on my iPhone4S (iOS 5.01 - NOT jailbroken) It has a metronome feature which continues playing in the background, and also adds a red banner overlay (see screenshots) which persists on the home/lock screen and also when... | [
-0.10125786811113358,
-0.3688977360725403,
0.7476553320884705,
-0.06320849061012268,
0.300207257270813,
0.4441421627998352,
0.2870445251464844,
0.31327876448631287,
-0.1947074830532074,
-0.5957775712013245,
0.3091549873352051,
0.6581470370292664,
-0.19313237071037292,
0.4785780608654022,
... | |
listed under Notifications in Settings.
My iPhone is not jailbroken and GuitarToolkit is available in the App Store, so what APIs is it using to achieve this?
 
The banner appears because it’s got an open audio recor... | [
0.3087741732597351,
-0.01676216349005699,
0.42865678668022156,
-0.10938922315835953,
0.06785807758569717,
0.09788619726896286,
0.34715595841407776,
0.17990903556346893,
-0.36357805132865906,
-0.5387699007987976,
0.10757555067539215,
0.6755930781364441,
0.011340607888996601,
0.4135099351406... | |
I'm running a WCF application `CoreApplication` whose VS project has a reference to `AncillaryProject`. `CoreApplication` uses a class `Provider` from `AncillaryProject`; however, it is never explicitly referenced - it's invoked via Reflection.
My problem is that *sometimes* `CoreApplication` fails to find `Provider` ... | [
0.5128208994865417,
0.10555346310138702,
0.2965450882911682,
-0.2344687581062317,
0.07176712155342102,
-0.07709674537181854,
-0.0036923852749168873,
-0.0930042639374733,
-0.08996111154556274,
-0.6627941131591797,
0.031142735853791237,
0.43412861227989197,
-0.3323531448841095,
0.34336003661... | |
where typeof(BaseProvider).IsAssignableFrom(c)
select c;
```
After looking at [this question](https://stackoverflow.com/questions/2384592/c-net-is-there-a-way-to-force-all-referenced-assemblies-to-be-loaded-into-the), I tried using `GetReferencedAssemblies()`:
```
var allAssemblies = AppDomain.Curren... | [
-0.008289650082588196,
0.010900024324655533,
0.568627655506134,
-0.2259596735239029,
0.17087368667125702,
0.11109072715044022,
0.21881288290023804,
-0.3248732388019562,
-0.4265449345111847,
-0.4106443524360657,
-0.4129505157470703,
0.6244157552719116,
-0.8442133665084839,
0.255810976028442... | |
.Select(b => System.Reflection.Assembly.Load(b)));
}
var providers = from d in allAssemblies
from c in d.GetTypes()
where typeof(BaseProvider).IsAssignableFrom(c)
select c;
```
I realize that the question I referenced solves the problem through dynamically loading all d... | [
0.34814783930778503,
-0.27921393513679504,
0.3930211365222931,
-0.185506671667099,
0.002257018815726042,
-0.04293020814657211,
0.18343959748744965,
-0.3688877522945404,
-0.011676345951855183,
-0.6568114757537842,
-0.17669829726219177,
0.5858590006828308,
-0.48144128918647766,
0.24439091980... | |
or is .NET simply not loading the other Assemblies in at all? **How does this work under the hood**, and is there anything I can do about it?
According to Microsoft documentation `AppDomain.CurrentDomain.GetAssemblies()` gets the assemblies that have been loaded into the execution context of this application domain. [... | [
0.47831442952156067,
-0.004831952974200249,
0.1872655749320984,
0.16595762968063354,
0.006584578659385443,
-0.33336693048477173,
0.27524539828300476,
-0.01585077866911888,
-0.5845879912376404,
-0.7401630878448486,
-0.21274706721305847,
0.3098719120025635,
-0.4364919662475586,
0.13767987489... | |
I want to design a splash screen that can show the current loading process with a progress bar,
much like netbeans startup screen, as it shows
```
loading... modules, done!.... loading modules and so on
```
and after the loading finished the main application comes up.
I have read many articles that are related to... | [
0.4272904396057129,
0.06535457074642181,
0.48515382409095764,
-0.17035256326198578,
-0.15477725863456726,
-0.11143776029348373,
0.08750561624765396,
-0.24937301874160767,
-0.46857893466949463,
-0.8508191108703613,
0.0035591297782957554,
0.6017820239067078,
-0.17316177487373352,
-0.05259477... | |
mistake** was I was updating the GUI content in the Task Thread so My Task Thread was Blocked and could not execute the next instructions after the GUI update instructions.Now I shifted those Updating GUI instruction after Task Completion, and its working.....
Thanks Jewelsea for the right path.
I created a [splash pag... | [
0.16524183750152588,
0.05463145300745964,
-0.03922531381249428,
-0.029026152566075325,
-0.07560760527849197,
0.2976017892360687,
0.5680056214332581,
-0.40092214941978455,
-0.3811023235321045,
-0.4004979729652405,
0.2982325255870819,
0.418961763381958,
-0.2733071744441986,
-0.00024901516735... | |
property, create a JavaFX [Task](http://docs.oracle.com/javafx/2.0/api/javafx/concurrent/Task.html) which performs expensive initialization work, and monitor the progress of the `Task` via the Task's [progressProperty](http://docs.oracle.com/javafx/2.0/api/javafx/concurrent/Task.html#progressProperty) and [messagePrope... | [
0.49846184253692627,
-0.10191468149423599,
0.05263537913560867,
0.20361089706420898,
0.004487463738769293,
-0.019140325486660004,
0.0525372177362442,
-0.44767874479293823,
-0.5401522517204285,
-0.35068193078041077,
0.025898784399032593,
0.643467128276825,
0.14426922798156738,
0.18087205290... | |
I'm using SQL Server 2008's XML-parsing abilities to iterate through an XML document and perform an INSERT each element.
However, my stored procedure appears to be inserting each element into the table in an order which differs from the order in the document.
Furthermore, the more times I try this, the INSERT order s... | [
0.08702749758958817,
0.23276002705097198,
0.6052563786506653,
-0.06590248644351959,
-0.04159428924322128,
-0.20586051046848297,
0.30370035767555237,
-0.1287313550710678,
-0.27489200234413147,
-0.5410166382789612,
-0.01656905934214592,
0.36375856399536133,
-0.07315927743911743,
0.0291122868... | |
friendlyValue="0, 1" />
<tv fieldId="303" officialValue="0, 2" friendlyValue="0, 2" />
<tv fieldId="304" officialValue="0, 3" friendlyValue="0, 3" />
<tv fieldId="305" officialValue="0, 4" friendlyValue="0, 4" />
<tv fieldId="306" officialValue="0, 5" friendlyValue="0, 5" />
</t>
... | [
-0.28614625334739685,
0.36781778931617737,
1.2768819332122803,
-0.13737358152866364,
-0.18575215339660645,
-0.20836038887500763,
0.5187765955924988,
-0.036482688039541245,
-0.10689610987901688,
-0.4399350881576538,
-0.22991503775119781,
0.6240224838256836,
-0.018642326816916466,
0.10280989... | |
<tv fieldId="303" officialValue="1, 2" friendlyValue="1, 2" />
<tv fieldId="304" officialValue="1, 3" friendlyValue="1, 3" />
<tv fieldId="305" officialValue="1, 4" friendlyValue="1, 4" />
<tv fieldId="306" officialValue="1, 5" friendlyValue="1, 5" />
</t>
<t id="27db47a3-ad3f-4279-8f4f-... | [
-0.07266469299793243,
0.4025980532169342,
1.1063002347946167,
0.028374122455716133,
-0.21071118116378784,
-0.08384048193693161,
0.5746036171913147,
-0.22623921930789948,
-0.24825270473957062,
-0.512627363204956,
-0.3527427017688751,
0.4627520442008972,
0.06360943615436554,
0.25491958856582... | |
<tv fieldId="303" officialValue="2, 2" friendlyValue="2, 2" />
<tv fieldId="304" officialValue="2, 3" friendlyValue="2, 3" />
<tv fieldId="305" officialValue="2, 4" friendlyValue="2, 4" />
<tv fieldId="306" officialValue="2, 5" friendlyValue="2, 5" />
</t>
<t id="867ea26b-0341-4d60-ac48-... | [
-0.04976007342338562,
0.35026609897613525,
1.0406475067138672,
0.01800566352903843,
-0.2249601185321808,
-0.16522684693336487,
0.7188169360160828,
-0.2043810784816742,
-0.2773595154285431,
-0.5048470497131348,
-0.36279869079589844,
0.5466551184654236,
-0.000792185717727989,
0.2102679759263... | |
fieldId="303" officialValue="3, 2" friendlyValue="3, 2" />
<tv fieldId="304" officialValue="3, 3" friendlyValue="3, 3" />
<tv fieldId="305" officialValue="3, 4" friendlyValue="3, 4" />
<tv fieldId="306" officialValue="3, 5" friendlyValue="3, 5" />
</t>
</ts>
```
The stored procedure has a ... | [
0.33770450949668884,
0.2549644112586975,
1.0034635066986084,
-0.2021385282278061,
-0.20098985731601715,
-0.12698571383953094,
0.2587212324142456,
-0.5219212174415588,
0.0366630032658577,
-0.46553483605384827,
-0.19160696864128113,
0.7101033329963684,
0.003973685204982758,
-0.00851327925920... | |
SET NOCOUNT ON;
DECLARE @encryptedAccountID AS VARCHAR(200)
BEGIN TRANSACTION
BEGIN TRY
DECLARE @Handle AS INT
DECLARE @TransactionCount AS INT
EXEC sp_xml_preparedocument @Handle OUTPUT, @xmlTransaction
/* encryptedAccountId is always the same for eac... | [
-0.11466265469789505,
-0.15510216355323792,
0.6908949017524719,
-0.0669177770614624,
-0.0231105275452137,
-0.028770558536052704,
0.07102912664413452,
-0.6517577767372131,
-0.2003302127122879,
-0.4147309958934784,
-0.22968298196792603,
0.49705684185028076,
-0.1531340777873993,
-0.1632232517... | |
/* Just take the value from the first <t/> element */
SET @encryptedAccountID = (SELECT eID FROM OPENXML (@Handle, '/ts/t[1]', 2) WITH ( eID VARCHAR '@encryptedAccountId' ))
/* Go through each <t/> element in the XML document and INSERT */
INSERT INTO
[Transactions] | [
-0.2041008174419403,
-0.18255311250686646,
0.35401833057403564,
0.04390457645058632,
0.2400156557559967,
-0.040944572538137436,
-0.23369432985782623,
-0.4562698304653168,
-0.005738740786910057,
-0.43527692556381226,
-0.27263540029525757,
0.21232087910175323,
-0.36994460225105286,
-0.138426... | |
(
[ID],
[EncryptedAccountID]
)
SELECT
*
FROM | [
-0.27395737171173096,
-0.09450927376747131,
-0.24397000670433044,
-0.03866259381175041,
0.2760467231273651,
0.03325767442584038,
0.1636473536491394,
-0.15944235026836395,
0.07686419039964676,
-0.4780065417289734,
-0.4229300320148468,
0.21814477443695068,
-0.2882714867591858,
0.163930386304... | |
OPENXML (@Handle, '/ts/t', 2)
WITH
(
rID UNIQUEIDENTIFIER '@id',
rEncryptedAccountID VARCHAR (200) '@encryptedAccountId'
)
/* Loop through each TransactionValue in the XML document and | [
-0.221733957529068,
-0.0948171392083168,
0.7070862054824829,
0.14035750925540924,
0.008386468514800072,
-0.16691678762435913,
-0.06137540191411972,
-0.08659934997558594,
-0.18856002390384674,
-0.5227206945419312,
-0.4939004182815552,
0.22403249144554138,
-0.5047985911369324,
0.197623148560... | |
INSERT */
INSERT INTO
[TransactionValues]
(
FieldID,
TransactionID,
OfficialValue, | [
-0.294950008392334,
-0.1269737035036087,
0.3434216380119324,
0.24856404960155487,
0.45387598872184753,
-0.19885650277137756,
0.005053759552538395,
0.08290970325469971,
-0.17948485910892487,
-0.6067380309104919,
-0.2693174481391907,
0.33460476994514465,
-0.2644907236099243,
0.04123730584979... | |
FriendlyValue
)
SELECT
*
FROM
OPENXML (@Handle, '/ts/t/tv', 2)
WITH
( | [
0.20632141828536987,
-0.3611214756965637,
1.0767861604690552,
-0.1517844796180725,
-0.1409580558538437,
-0.22534479200839996,
0.3788534104824066,
0.13885755836963654,
0.17087656259536743,
-0.5075121521949768,
-0.5902847051620483,
0.5107389092445374,
-0.36238008737564087,
-0.017981888726353... | |
rFieldID INT '@fieldId',
rTransactionID UNIQUEIDENTIFIER '../@id',
rOfficialValue NVARCHAR (500) '@officialValue',
rFriendlyValue NVARCHAR (500) '@friendlyValue'
)
/* Dispose of the XML | [
-0.10148905217647552,
-0.13731038570404053,
0.9578428268432617,
0.04029406979680061,
-0.027229562401771545,
-0.31714099645614624,
-0.08125533908605576,
-0.5736479759216309,
0.07682762295007706,
-0.4919340908527374,
-0.3280453383922577,
0.639575719833374,
-0.2262093424797058,
0.137857019901... | |
document */
EXEC sp_xml_removedocument @Handle
COMMIT TRANSACTION
END TRY
BEGIN CATCH
RETURN @@ERROR
ROLLBACK TRANSACTION
END CATCH
END
```
Should be fairly straightforward. And yet if I query the results, they're not in the same order as the XML document. T... | [
0.270004004240036,
-0.029174216091632843,
0.6543571949005127,
0.05337509885430336,
-0.022780118510127068,
-0.36496010422706604,
0.004393533803522587,
-0.5773885846138,
-0.14102838933467865,
-0.27996182441711426,
-0.24159644544124603,
0.3561469316482544,
-0.02131004072725773,
0.088927254080... | |
second table in the correct order, but the `<t/>` elements are *not* stored in their table in the correct order.
Can anyone explain to me why the `<t/>` elements are not being INSERTed into the table in the same order as they appear in the XML document?
If I use the native XQuery support in SQL Server instead of the "... | [
-0.07227322459220886,
-0.078676238656044,
0.11954627186059952,
0.12315192818641663,
-0.06649835407733917,
-0.2019127607345581,
-0.09393515437841415,
-0.2298182100057602,
-0.0643080547451973,
-0.8137670755386353,
-0.2975335419178009,
0.24005717039108276,
-0.45245155692100525,
0.132546424865... | |
XT.value('@id', 'uniqueidentifier'),
XT.value('@encryptedAccountId', 'varchar(200)')
FROM
@xmlTransaction.nodes('/ts/t') AS Nodes(XT)
```
The same could be done for the `<tv>` subnodes, too. | [
0.4187603294849396,
-0.2563558518886566,
0.5278190970420837,
0.23349294066429138,
-0.13686074316501617,
-0.08724264800548553,
-0.12679371237754822,
-0.02060527168214321,
-0.07315053790807724,
-0.7209450006484985,
-0.4455231726169586,
0.3573932647705078,
-0.2260156273841858,
0.2392430603504... | |
I'm less experienced with Java. Currently in my app all of my URLs are set to things like `http://localhost:8080/cmt/content/3068fc93/edit.html`
On LIVE, my url will need to go to `http://www.domain.com/content/3068fc93/edit.html`
This is my first java app and I don't want to reinvent the wheel. I'd like to just be a... | [
0.23189279437065125,
0.1841612011194229,
0.4944140315055847,
-0.12422501295804977,
-0.29784128069877625,
-0.03316771984100342,
0.5190067291259766,
0.008336872793734074,
-0.22294969856739044,
-1.0774104595184326,
0.12882699072360992,
0.5750187039375305,
-0.3158206045627594,
0.22715756297111... | |
instead of the "legacy" OPENXML stuff, then it would appear that the `<t>` nodes are indeed inserted into the table in the order they appear in the XML document.
I've used code something like this:
```
INSERT INTO dbo.[Transactions]([ID], [EncryptedAccountID])
SELECT
XT.value('@id', 'uniqueidentifier'),
... | [
0.20365701615810394,
0.03367776423692703,
0.5026880502700806,
0.026965757831931114,
0.02546689845621586,
-0.2262384444475174,
-0.18654510378837585,
-0.2801094055175781,
-0.16067492961883545,
-0.6083018779754639,
-0.23780326545238495,
0.39410892128944397,
-0.13102184236049652,
0.15412814915... | |
I've tried several techniques to capture a screenshot of an app from within that app. None of the techniques appear to capture the status bar -- it ends up being black.
There apparently was once a way to do this, but that interface is internal and Apple will not let you use it.
Any ideas?
Note: This is an attempt to... | [
0.3125592768192291,
0.041914958506822586,
0.24363847076892853,
-0.0011880318634212017,
0.5466976165771484,
0.02365042082965374,
0.26913556456565857,
0.21732598543167114,
-0.6159263253211975,
-0.4729292094707489,
0.18916106224060059,
0.49886053800582886,
-0.2535039484500885,
-0.127790212631... | |
that question.
There appears to be no way to do this. | [
0.2609837055206299,
0.10591595619916916,
0.13738352060317993,
0.32937541604042053,
0.1172795370221138,
0.012013733386993408,
0.28209611773490906,
-0.28393658995628357,
-0.13603666424751282,
-0.4019026756286621,
0.030915269628167152,
0.18303170800209045,
0.06764815747737885,
0.3050196170806... | |
What is the best sort of jsduck header to put over a method of a class (such as a ExtJS subclass) that handles an event? Jsduck seems to support the same tags as jsdoc, but I'm not sure if the @event tag is appropriate.
An event handler should be documented the same as any other method (`@method`, etc.). `@event` is ta... | [
0.3822369873523712,
-0.22235368192195892,
-0.02310778759419918,
-0.03551497682929039,
-0.07083626836538315,
-0.3546124994754791,
-0.1074424535036087,
-0.22051668167114258,
-0.23904520273208618,
-0.6236663460731506,
-0.2630017101764679,
0.5805651545524597,
-0.15981408953666687,
-0.111752301... | |
*/
this.listen('sandwich-made', this.onSandwichMade, this);
}
```
Where you document your events is subjective. You might do it like I did above if that is the only entry point to that event, or [as is shown in the JsDuck docs](https://github.com/senchalabs/jsduck/wiki/@event), when event names are actually decla... | [
0.4418599605560303,
0.165572389960289,
-0.0048624793998897076,
-0.1534959375858307,
-0.056224193423986435,
-0.24212993681430817,
0.25417792797088623,
0.06280174106359482,
-0.2272840142250061,
-0.5015383958816528,
-0.32692545652389526,
0.4872005879878998,
0.061500392854213715,
0.25568449497... | |
This only happens in IE.
I'm using *swfobject* and loading the flash vars as such
```
var flashVars = {
myVar:'{"url":"http://google.com/", "id":"9999"}',
};
var params = {
allowFullScreen:"true",
wmode:"transparent",
allowScriptAccess:'always'
};
swfobject.embedSWF("mySwf.swf", "mySwf", "512",... | [
0.0653035044670105,
-0.0016783890314400196,
0.9839746356010437,
-0.2211502343416214,
-0.051756102591753006,
-0.15274974703788757,
0.6358447074890137,
-0.10047219693660736,
-0.23416201770305634,
-0.9018235802650452,
-0.22288429737091064,
0.5399368405342102,
-0.20895391702651978,
0.047377515... | |
inverted all the slashes and tried the same ritual. Nothing.
I can get the string to finally come through, with inverted quotes and using double slashes, but then my JSON parser gets mad about there being slashes in my string.
Here's an example of what works, but of what is invalid JSON:
```
"{\\'url\\':\\'http://go... | [
0.19361667335033417,
0.30643561482429504,
0.5272470116615295,
-0.3822515606880188,
-0.22043506801128387,
0.13035592436790466,
0.704123854637146,
0.032537952065467834,
-0.20657096803188324,
-0.7348832488059998,
-0.18940092623233795,
0.4624001383781433,
-0.440559059381485,
0.0548769421875476... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.