text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
it = X.begin(); it != X.end(); ++it)
Y.insert(Y.end(), it->begin(), it->end());
```
If you know the size of the resulting vector, you could call `Y.reserve(finalYSize)` before the loop. | [
0.03305957466363907,
-0.5427027344703674,
0.18527516722679138,
-0.07186993956565857,
0.4012730121612549,
0.003871460445225239,
-0.03381379693746567,
-0.3382476270198822,
-0.08267008513212204,
-0.3137483596801758,
-0.3541327118873596,
0.40413299202919006,
-0.27705585956573486,
0.06684428453... | |
I have a simple question regarding `jQuery` selectors. I'm using the `tablesorter` and I use a selector to filter out a table that has no records.
```
$('#mytable:has(tbody tr)').tablesorter();
```
The problem arises when I have multiple sorted tables on the page.
```
var x = 0;
while(x < 10) {
$('#myTable + x:... | [
-0.044082723557949066,
0.2431226521730423,
0.03560370206832886,
0.0174364373087883,
-0.2032923847436905,
-0.24209649860858917,
0.07082923501729965,
-0.14119955897331238,
-0.2508024275302887,
-0.8127345442771912,
0.10375893115997314,
0.5508015155792236,
-0.44599488377571106,
0.0932943671941... | |
id="ID"
onchange="DoYourTaskHere(this);">
<option value="select" selected="selected">Select</option>
<c:forEach items="${A.List}" var="Variable"> | [
-0.24290339648723602,
-0.3933580219745636,
0.07787780463695526,
-0.14784184098243713,
0.2413136214017868,
0.29152587056159973,
-0.14252130687236786,
-0.4827987253665924,
-0.09492599219083786,
-0.3143191635608673,
-0.39355742931365967,
0.5577765107154846,
-0.1756134033203125,
0.054122675210... | |
<option value="${ID}">
<c:out value="${ID}" />
</option> | [
-0.2804068922996521,
-0.45660606026649475,
-0.039438385516405106,
-0.2246927171945572,
0.4554770588874817,
0.06695330888032913,
-0.3909589350223541,
0.0573631152510643,
-0.15437908470630646,
-0.07421544194221497,
-0.5141058564186096,
0.8822787404060364,
-0.08941350132226944,
-0.06069166958... | |
</c:forEach>
</select>
```
And in the script you write the code as follows.
```
function loadValue(ID) {
if (ID.value != "select") {
if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera,
// Safari | [
0.252764493227005,
-0.0857529491186142,
0.33921265602111816,
-0.3635143041610718,
-0.004445197992026806,
-0.08585455268621445,
0.100615493953228,
-0.2327018678188324,
0.013008397072553635,
-0.7811683416366577,
-0.27957895398139954,
0.7565737962722778,
-0.4935963451862335,
-0.16167148947715... | |
ValueXmlHttpReq = new XMLHttpRequest();
} else {// code for IE6, IE5
ValueXmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP");
}
ValueXmlHttpReq.onreadystatechange = processLoadValues;
ValueXmlHttpReq.open("POST", "getValue.htm?ID="
+ ID.value, true);
... | [
0.08367577940225601,
-0.06685332208871841,
0.710853099822998,
-0.08490031212568283,
-0.13149219751358032,
0.08944082260131836,
0.45420846343040466,
-0.4501413106918335,
-0.098909892141819,
-0.6950299739837646,
-0.5441047549247742,
0.3764580488204956,
-0.434794545173645,
0.15588966012001038... | |
var objSelect = document.getElementById("ValueId");
var currentValueListLength = objSelect.options.length;
while (currentValueListLength > 0) {
objSelect.remove(1);
currentValueListLength--;
}
var objSelect = document.getElementById("2ndDropDownWhereYouWantToPopu... | [
-0.5178623795509338,
-0.3377959430217743,
0.9424912929534912,
-0.12967848777770996,
0.4227316379547119,
0.09800095856189728,
0.48490360379219055,
0.09188298881053925,
-0.317426472902298,
-0.3920723795890808,
-0.4768432676792145,
0.2605888545513153,
-0.3638950288295746,
0.1797739714384079,
... | |
objSelect.remove(1);
currentSecondValueListLength--;
}
}
}
``` | [
-0.6228353977203369,
-0.2982684075832367,
0.6088894605636597,
-0.34807321429252625,
0.264037162065506,
-0.002985635306686163,
0.48518940806388855,
0.06414750963449478,
-0.068259097635746,
-0.6010204553604126,
-0.26746150851249695,
0.08751112967729568,
-0.54757159948349,
0.17211192846298218... | |
I have a bunch of models that may or may not have a property "CommonProperty". I want to set that property when I am creating a new object of a selected model. What I have so far, which works is:
```
ModuleItem model = db.ModuleItems.Find(ModuleItemID);
object o = GetModuleType(model.ControllerName);
private object G... | [
0.15531042218208313,
-0.08852747827768326,
0.601159930229187,
-0.107344850897789,
0.23981919884681702,
-0.0467972531914711,
0.3438699543476105,
-0.5129754543304443,
-0.10578955709934235,
-0.6680744886398315,
-0.1027233898639679,
0.7667784690856934,
-0.30216172337532043,
0.5384892821311951,... | |
Because its not static I can't call it directly and if I create a new ModelBase then when calling the method it doesn't get overriden by the type that object "o" is. I looked at creating an interface but 1 I don't even know how these work, and 2 (probably because of 1) I am not even able to create a way of doing this w... | [
0.046990297734737396,
-0.030736081302165985,
0.37600213289260864,
0.04796716198325157,
-0.05696367472410202,
-0.038061708211898804,
0.0962064266204834,
0.1991703361272812,
-0.16267263889312744,
-0.6688747406005859,
0.2677806317806244,
0.40768295526504517,
-0.3458309769630432,
0.05884002894... | |
seem to be able to call the method though because it's not a recognised (or set) type during build only during runtime and therefore I can't build the solution.
It is a little difficult to read the entire code, but I will show you how to display an `AlertDialog` from a background `Thread`:
Create a handler inside `onC... | [
0.43557360768318176,
-0.10742317885160446,
0.5585156679153442,
-0.13336926698684692,
0.46901923418045044,
-0.18016387522220612,
0.3349248766899109,
-0.1786252111196518,
-0.0785505473613739,
-0.6111294627189636,
-0.3023381233215332,
0.6272993683815002,
-0.595511257648468,
0.0809073150157928... | |
pass your Activity class, not the Thread
AlertDialog.Builder builder = new AlertDialog.Builder(MyActivity.this);
//... setup dialog and show
}
});
``` | [
0.8310880064964294,
-0.24796000123023987,
0.5310544967651367,
-0.17376622557640076,
0.16191548109054565,
-0.5081350207328796,
0.5841162204742432,
-0.17103634774684906,
-0.17187368869781494,
-0.7340912818908691,
-0.054330095648765564,
0.5813171863555908,
-0.6578376293182373,
-0.058004170656... | |
I can chroot with `Dir.chroot`
```
Dir.chroot("/var/chroot/mychroot")
```
But how can I return back from chroot?
The point of a `chroot` is that you can't get out. However, if you don't `chdir` to `/var/chroot/mychroot`, then you can still access the outside filesystem using `.`, and `..`
I don't know much Ruby, bu... | [
-0.1387363076210022,
0.3107971251010895,
0.3092813491821289,
0.02938917651772499,
0.1925518959760666,
-0.13366450369358063,
0.4876271188259125,
-0.12389891594648361,
0.011128881946206093,
-0.44237467646598816,
-0.36252161860466003,
0.3873516619205475,
-0.16725493967533112,
0.23363272845745... | |
'opt', 'scratch', 'var', 'proc', 'usr', 'etc', 'lib', 'srv', 'sys', 'media', 'root', 'selinux', 'vmlinuz', 'dev', 'tmp', 'home', 'sbin']
``` | [
0.5305944085121155,
-0.042317114770412445,
0.5567556619644165,
-0.22684384882450104,
0.15168698132038116,
0.4868837893009186,
-0.28684863448143005,
0.28054994344711304,
-0.12411773949861526,
-0.4812295138835907,
-0.4605615437030792,
0.7710028290748596,
-0.31249022483825684,
0.2421804219484... | |
I've got the following query
```
SELECT 1, 2 FROM DUAL
```
AND I'd like something like
```
SELECT TRANSPOSE(SELECT 1, 2 FROM DUAL)
```
Which outputs the same as
```
SELECT 1 FROM DUAL
UNION
SELECT 2 FROM DUAL
```
I'd like it to swap lines with columns.
Using `dbms_xmlgen.getxmltype` and `XMLTABLE`:
```
SELECT... | [
-0.2191447913646698,
-0.08154977113008499,
0.6996617913246155,
-0.06855853646993637,
-0.20672646164894104,
0.26027271151542664,
0.17113251984119415,
-0.5695162415504456,
-0.1965571790933609,
-0.6365690231323242,
0.09459082037210464,
0.37854892015457153,
0.058795444667339325,
-0.05678976699... | |
I have created a View which prompts the user to input some records with an invoice number and save them to the DB. Now a new requirement came in, we must be able to save 1..N invoice numbers for one record. No problem in the database, but I cant find a clean way to change the view and the model.
As of now I'm doing thi... | [
0.15387973189353943,
0.19273239374160767,
0.291850745677948,
-0.27434104681015015,
-0.2589200735092163,
-0.045405063778162,
0.20982709527015686,
-0.2268056869506836,
-0.10083632916212082,
-0.8145875334739685,
0.26690471172332764,
0.5291960835456848,
-0.18438439071178436,
0.3002341389656067... | |
@Html.TextBoxFor(x => x.InvoiceNumber1)
@Html.ValidationMessageFor(x => x.InvoiceNumber1)
</div>
```
To satisfy the new requirement I'd have to create a button of some kind which lets the user add additional textboxes (via qjuery) to the view. But how would I bind those dynamically added textboxes... | [
0.18397743999958038,
-0.16998964548110962,
0.4019295275211334,
0.005039018578827381,
-0.45453470945358276,
0.23404118418693542,
0.324043869972229,
-0.550774097442627,
-0.16743768751621246,
-0.6198455095291138,
-0.00649689044803381,
0.4373418986797333,
-0.3915480077266693,
-0.07990011572837... | |
COLUMNS val VARCHAR(100) PATH '.');
```
**[db<>fiddle demo](https://dbfiddle.uk/?rdbms=oracle_18&fiddle=05b7d944d550de041cc6825aa8101d01)**
Advantage over unpivot - there is no need to specify column list in advance | [
-0.6270825266838074,
0.060005951672792435,
0.6862205266952515,
-0.07484699785709381,
-0.3745070695877075,
0.4277505576610565,
0.17668837308883667,
-0.6706767082214355,
-0.20000305771827698,
-0.24974900484085083,
0.05009908974170685,
0.40645554661750793,
0.2264876514673233,
-0.2357061505317... | |
How to find out what class is referenced the most?
I want to find the most important classes in a large system and i think that is the best way to do it. any ideas?
maybe the [JDepend](http://www.clarkware.com/software/JDepend.html) is what you looking for. | [
0.35907068848609924,
-0.003959612920880318,
-0.14144082367420197,
0.2935929000377655,
-0.18679861724376678,
0.06106598675251007,
-0.039732854813337326,
0.6223301887512207,
-0.26417604088783264,
-0.5203070044517517,
0.2722182869911194,
0.590198814868927,
0.06210213899612427,
0.0262724254280... | |
I've created a class called listItem and the following list:
```
List<listItem> myList = new List<listItem>();
```
At some point in my code, I want to convert it to an array, thereby using:
```
listItem[] myArray = myList.ToArray();
```
Unfortunately, this doesn't work, and I get this error message:
```
Cannot c... | [
0.1823960393667221,
0.25438204407691956,
0.5553708672523499,
-0.07231275737285614,
-0.4005691111087799,
0.050981514155864716,
0.5443599224090576,
-0.2805386781692505,
-0.436473548412323,
-0.6277397274971008,
0.010533385910093784,
0.7958823442459106,
-0.4147740304470062,
0.02370800450444221... | |
answers.
This is the error (as pointed out from Darkshadw and Jon Skeet)
```
listItem myList = new List<listItem>();
```
You are assigning the value of a List to a listItem.
Replace it with
```
List<listItem> myList = new List<listItem>();
```
to create a list of listItem. Then
```
listItem[] myArray = myList.... | [
0.019574474543333054,
0.08349397033452988,
0.17554418742656708,
-0.03381859138607979,
-0.01572864130139351,
0.041151080280542374,
0.22734202444553375,
-0.5258038640022278,
-0.28511279821395874,
-0.42725688219070435,
-0.2438950538635254,
0.44013482332229614,
-0.6269400715827942,
-0.05373767... | |
I need to round up any integer between 1 and infinity in php to the next significant figure (though in practice I'm unlikely to need to round up infinity, so will be happy to settle on reasonable internal limits) eg:
```
$x <= 10 ? $x = 10
10 < $x <= 100 ? $x = 100
100 < $x <= 1000 ? $x = 1000
```
etc.
Round /... | [
-0.2576002776622772,
0.2966430187225342,
0.5889217853546143,
-0.12820614874362946,
-0.026643622666597366,
0.05765892565250397,
0.05423616245388985,
-0.13298922777175903,
0.07945467531681061,
-0.43149158358573914,
0.07459189742803574,
0.4673960208892822,
-0.08078901469707489,
0.033911831676... | |
if($in == 1) return $in;
if($in == pow(10, strlen($in)-1)) return $in;
return pow(10, strlen($in));
}
echo my_ceil(11); //100
echo my_ceil(10); //10
``` | [
-0.039771921932697296,
0.24032266438007355,
0.0812409520149231,
-0.7112439870834351,
0.24632376432418823,
0.24367618560791016,
0.49848371744155884,
-0.4068211317062378,
0.13731427490711212,
-0.17044515907764435,
-0.4437233805656433,
0.29272544384002686,
-0.2458636313676834,
-0.081466101109... | |
```
<div class = "a">
<div class = "a b">
text
</div>
</div>
<script>
alert($(".a").html());
alert($(".a b").html());
</script>
```
I have to add a script to a HTML page that I didn't write, and in this script I need to select a class that has a name containing two words separated by space. Th... | [
0.12349645793437958,
0.056268248707056046,
0.06614004075527191,
-0.3346114158630371,
-0.07840602099895477,
0.09818647801876068,
0.45864757895469666,
-0.4418953061103821,
-0.12638641893863678,
-0.688947856426239,
-0.331545352935791,
0.4706495702266693,
-0.620082437992096,
-0.075912453234195... | |
AND 'b'
``` | [
0.4627346396446228,
0.7334622740745544,
0.05597296357154846,
-0.21473552286624908,
-0.16565053164958954,
0.15888628363609314,
0.017498644068837166,
0.33922648429870605,
-0.18106360733509064,
-0.14720699191093445,
-0.36939573287963867,
0.4983314871788025,
-0.18446847796440125,
0.39969173073... | |
SOLVED IT
I've written a program that loads Strings after an equal sign, and has it count how many times its done this. After counting, I tell it to tell me how large the int is. The value I'm looking for is 3, and it tells me, 3. I then change it to an String, the value stays three. Then, I put it into an 4d array, a... | [
-0.4811549186706543,
0.38017022609710693,
0.4068753123283386,
-0.469687819480896,
0.001414636499248445,
0.3148743808269501,
0.33755403757095337,
-0.3022000193595886,
-0.4085540175437927,
-0.3361063301563263,
0.02979571931064129,
0.2989746034145355,
-0.42028942704200745,
0.08325952291488647... | |
else if (list.equals("Weapon")) {//If the word weapon is before the =
weapon = value; //take the string after the = and put it into String weapon
troopStats[times][1][weaponTimes][0] = weapon; | [
0.010499442927539349,
-0.28126105666160583,
0.3157872259616852,
-0.18754634261131287,
0.16818900406360626,
0.09607626497745514,
0.25087273120880127,
-0.7946401238441467,
-0.02609911561012268,
-0.4201897382736206,
-0.38802680373191833,
0.5530156493186951,
-0.07902433723211288,
-0.4136231839... | |
weaponTimes++;
System.out.println(weaponTimes+"weapontimes"+times);
}
weaponTimesStr = Integer.toString(weaponTimes); | [
-0.2513231337070465,
-0.36151307821273804,
0.7532374262809753,
-0.23233278095722198,
0.12632083892822266,
0.317807137966156,
0.551199734210968,
-0.7024438381195068,
0.0002197684079874307,
-0.40865322947502136,
-0.2552459239959717,
0.7442654371261597,
-0.28383868932724,
-0.2109927088022232,... | |
System.out.println(weaponTimesStr+"string");
troopStats[times][1][0][1] = weaponTimesStr;
System.out.println(troopStats[times][1][0][1]+"InArray");
times++ | [
-0.32916826009750366,
-0.27898794412612915,
0.29340577125549316,
-0.13303956389427185,
0.17264871299266815,
0.347378134727478,
0.5051867365837097,
-0.3618083596229553,
-0.3850640654563904,
-0.5325360298156738,
-0.42526885867118835,
0.47728538513183594,
-0.36928844451904297,
-0.005162373650... | |
//loops
```
The Output:
```
3weapontimes //Counted the equals sign 3 times, Note that this is from the part of the
omitted code
3string // Changed the integer to a string and got 3
2InArray // Put it into an array, and got 2 back
```
What Is going on?
(I know that I could just ... | [
0.18127046525478363,
0.08281783759593964,
0.14656314253807068,
-0.17134308815002441,
0.041710902005434036,
-0.10290219634771347,
0.7121132016181946,
-0.34082549810409546,
-0.48038506507873535,
-0.32725635170936584,
0.1884181797504425,
0.45453810691833496,
-0.6619266867637634,
0.04337377101... | |
for a unknown number of things later on)
To help, I've posted the entire code:
```
public class TroopLoader {
static String[][][][] troopStats;
static int times = 0;
static int weaponTimes = 0;
static int armorTimes = 0;
static int animalTimes = 0;
static String weaponTimesStr;
static Stri... | [
0.3809066712856293,
-0.07754926383495331,
0.5651066303253174,
-0.21980877220630646,
-0.1378251612186432,
0.4979386627674103,
0.4280833899974823,
-0.6107621788978577,
-0.17096132040023804,
-0.3957790732383728,
-0.3618841767311096,
0.6743288040161133,
-0.14419914782047272,
-0.075844481587409... | |
static String speed;
static int total = 0;
/*
* [][][]
*
* [total number of troops (total)]
*
* [stats] 0= name 1= weapon 2= armor 3= animal 4= speed
*
* [different things within stat]
*/
public void readTroop() {
File file = new File("resources/objects/... | [
0.115554578602314,
-0.5113636255264282,
0.15611706674098969,
0.21911895275115967,
0.08227799832820892,
0.33728739619255066,
0.16332852840423584,
-0.4430696964263916,
-0.4206121563911438,
-0.46160367131233215,
-0.4081512689590454,
0.6255623698234558,
-0.2522630989551544,
-0.1340534687042236... | |
BufferedReader reader = null;
try {
reader = new BufferedReader(new FileReader(file));
String text = null;
// repeat until all lines is read
while ((text = reader.readLine()) != null) { | [
-0.16555705666542053,
-0.4238508641719818,
0.6935523748397827,
-0.31106117367744446,
0.09844927489757538,
0.270322322845459,
0.5283302068710327,
0.014586720615625381,
-0.15562783181667328,
-0.5339867472648621,
-0.39762306213378906,
0.3096500337123871,
-0.44229161739349365,
0.45981439948081... | |
StringTokenizer troops = new StringTokenizer(text, "=");
if (troops.countTokens() == 2) {
String list = troops.nextToken();
if (list.equals("Troop")) {
total++; | [
-0.1597360223531723,
-0.5709702968597412,
0.51580810546875,
-0.18425454199314117,
-0.014659584499895573,
0.35999640822410583,
0.3536141812801361,
-0.6547002792358398,
-0.4936675429344177,
-0.2882690131664276,
-0.43526214361190796,
0.1822308748960495,
-0.34597963094711304,
-0.03192580118775... | |
}
else {
}
} else {
} | [
-0.15031908452510834,
0.20202557742595673,
-0.08077879250049591,
-0.27414581179618835,
0.40370795130729675,
-0.2634406089782715,
0.07520423084497452,
0.4369693398475647,
0.2612214982509613,
-0.3161109685897827,
-0.15224725008010864,
0.7877782583236694,
-0.27298638224601746,
-0.013512930832... | |
}
troopStats = new String[total][5][10][2];
}
catch (FileNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block | [
0.08514485508203506,
-0.501442015171051,
0.14395591616630554,
-0.10401676595211029,
0.3960321843624115,
0.2774319052696228,
0.21223314106464386,
-0.6072553396224976,
-0.12422369420528412,
-0.37154421210289,
-0.2157396823167801,
0.4990411698818207,
-0.42986756563186646,
-0.44239503145217896... | |
e.printStackTrace();
}
finally {
try {
if (reader != null) {
reader.close();
} | [
-0.2660972774028778,
-0.19533999264240265,
0.701386570930481,
-0.14885254204273224,
0.21096941828727722,
-0.038126394152641296,
0.21627385914325714,
-0.2483808398246765,
0.07039596885442734,
-0.6734002828598022,
-0.35470864176750183,
0.43483373522758484,
-0.5106279850006104,
0.074412919580... | |
} catch (IOException e) {
e.printStackTrace();
}
}
File file2 = new File("resources/objects/troops.txt");
BufferedReader reader2 = null;
try {
reader2 = new BufferedReader(new FileReader(file2)); | [
-0.15881524980068207,
-0.4560691714286804,
0.33079519867897034,
-0.2642632722854614,
0.2804616391658783,
0.28670528531074524,
0.22317637503147125,
-0.35851287841796875,
-0.09636590629816055,
-0.6739488840103149,
-0.3397303521633148,
0.44680359959602356,
-0.473768413066864,
0.09596823155879... | |
String text = null;
// repeat until all lines is read
while ((text = reader2.readLine()) != null) {
StringTokenizer troops = new StringTokenizer(text, "=");
if (troops.countTokens() == 2) { | [
-0.010519182309508324,
-0.4140060842037201,
0.6250428557395935,
-0.13739913702011108,
0.13612881302833557,
0.3536466062068939,
0.7299537658691406,
-0.5798836350440979,
-0.3691152334213257,
-0.35436540842056274,
-0.3807057738304138,
0.03652380406856537,
-0.39824149012565613,
0.1496380865573... | |
String list = troops.nextToken();
String value = troops.nextToken();
if (list.equals("Troop")) {
troop = value;
troopStats[times][0][0][0] | [
-0.32792383432388306,
-0.5403275489807129,
0.5333771109580994,
-0.25092944502830505,
0.12126726657152176,
0.18727900087833405,
0.34497782588005066,
-0.5951889157295227,
-0.5512397885322571,
-0.33228692412376404,
-0.3112035393714905,
0.15904788672924042,
-0.09409624338150024,
-0.16167633235... | |
= troop;
}
else if (list.equals("Weapon")) {
weapon = value;
troopStats[times][1][weaponTimes][0] = weapon; | [
-0.031934283673763275,
-0.2983161211013794,
0.3691415786743164,
-0.1919468194246292,
0.004612885881215334,
0.2375628650188446,
0.5853604078292847,
-0.7393689155578613,
-0.3164713382720947,
-0.39447787404060364,
-0.3200664222240448,
0.40079283714294434,
-0.09035172313451767,
-0.324930012226... | |
weaponTimes++;
System.out.println(weaponTimes+"weapontimes"+times);
}
else if (list.equals("Armor")) { | [
-0.19873152673244476,
-0.2904101312160492,
0.7402963638305664,
-0.2191673219203949,
-0.0007819881429895759,
0.24674877524375916,
0.505638062953949,
-0.7149527668952942,
-0.08517300337553024,
-0.5626596212387085,
-0.23747393488883972,
0.9186539053916931,
-0.06586606055498123,
-0.39539462327... | |
armor = value;
troopStats[times][2][armorTimes][0] = armor;
armorTimes++;
} | [
-0.1414671242237091,
-0.0971774160861969,
0.38017815351486206,
-0.1286807805299759,
0.040945082902908325,
0.3367037773132324,
0.3023965060710907,
-0.6367389559745789,
-0.04293643310666084,
-0.620833158493042,
-0.38191306591033936,
0.7341309785842896,
0.09072303026914597,
-0.237616971135139... | |
else if (list.equals("Animal")) {
animal = value;
troopStats[times][3][animalTimes][0] = animal;
animalTimes++; | [
0.22624684870243073,
-0.3708621859550476,
0.13172349333763123,
-0.3923639953136444,
0.3289766013622284,
0.32070058584213257,
0.34354010224342346,
-0.7107590436935425,
-0.12615200877189636,
-0.3372623324394226,
-0.12784160673618317,
0.6930214762687683,
-0.44340187311172485,
-0.2863534688949... | |
}
else if (list.equals("Speed")) {
speed = value;
troopStats[times][4][0][0] = speed;
} | [
0.04162612929940224,
-0.4486613869667053,
0.5244618058204651,
0.20772671699523926,
0.3636484146118164,
0.1613597571849823,
0.18901163339614868,
-0.41758057475090027,
-0.4149727523326874,
-0.5816214084625244,
-0.09025947004556656,
0.8570020794868469,
-0.06478304415941238,
-0.158663526177406... | |
else if (list.equals("Done")) {
weaponTimesStr = Integer.toString(weaponTimes);
System.out.println(weaponTimesStr+"string");
armorTimesStr = Integer.toString(armorTimes); | [
-0.2075035125017166,
-0.2690733075141907,
0.6591636538505554,
-0.3203125298023224,
0.25406497716903687,
0.22449173033237457,
0.3684748113155365,
-0.7930278182029724,
-0.0034623178653419018,
-0.3888690173625946,
-0.43237778544425964,
1.0717623233795166,
-0.16740670800209045,
-0.402237325906... | |
animalTimesStr = Integer.toString(animalTimes);
troopStats[times][1][0][1] = weaponTimesStr;
troopStats[times][1][0][1] = armorTimesStr;
troopStats[times][1][0][1] = | [
0.009355990216135979,
-0.11770515888929367,
0.3553856313228607,
0.05685393139719963,
0.002689873334020376,
0.44541770219802856,
0.41743728518486023,
-0.8899720907211304,
-0.2248343527317047,
-0.3227979838848114,
-0.3276611566543579,
0.8627448678016663,
-0.22590041160583496,
-0.395389854907... | |
animalTimesStr;
System.out.println(troopStats[times][1][0][1]+"InArray"+times);
times++;
troop = "";
weapon = | [
-0.006753431633114815,
-0.310424268245697,
0.06038684397935867,
-0.17429880797863007,
0.067252017557621,
0.43605443835258484,
0.8125078082084656,
-0.5132066607475281,
-0.3967196047306061,
-0.38354238867759705,
-0.3603077530860901,
0.3960798978805542,
-0.39241424202919006,
-0.05655369907617... | |
"";
armor = "";
animal = "";
speed = ""; | [
-0.4144096374511719,
0.018653038889169693,
0.0498337596654892,
0.11606259644031525,
-0.3563973903656006,
0.4147868752479553,
0.8139992356300354,
-0.3583660125732422,
-0.1139504536986351,
-0.3741031289100647,
-0.9491640329360962,
0.49823686480522156,
0.17249555885791779,
-0.1711434274911880... | |
weaponTimes = 0;
armorTimes = 0;
animalTimes = 0;
}
else { | [
-0.057356901466846466,
-0.2979046106338501,
0.15387798845767975,
-0.13076722621917725,
0.07503709942102432,
0.20127886533737183,
0.5093944668769836,
-0.5727769732475281,
0.21204547584056854,
-0.26641878485679626,
-0.2222125083208084,
1.0379880666732788,
-0.06981611251831055,
-0.38909927010... | |
}
} else {
}
}
} catch (FileNotFoundException e) {
// TODO Auto-generated catch block | [
-0.1191091537475586,
-0.6205198764801025,
-0.012625767849385738,
-0.26224061846733093,
0.23004722595214844,
-0.25380855798721313,
0.16266171634197235,
-0.3015003800392151,
0.2673071324825287,
-0.36267024278640747,
-0.1173187717795372,
0.45942041277885437,
-0.4859103858470917,
-0.1129109561... | |
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
finally {
try {
if (reader2 != null) { | [
-0.0808735191822052,
-0.4696193039417267,
0.3430182933807373,
-0.20728854835033417,
0.17057418823242188,
0.00163901480846107,
0.40545377135276794,
-0.40126264095306396,
0.261893630027771,
-0.5046445727348328,
-0.1429077535867691,
0.616340160369873,
-0.531268835067749,
-0.2323622852563858,
... | |
reader2.close();
}
} catch (IOException e) {
e.printStackTrace();
}
}
}
}
```
In the earlier part of the code, I had the program store a value in | [
-0.2508378028869629,
-0.10256238281726837,
0.43323636054992676,
-0.36104899644851685,
0.11879875510931015,
0.12282735109329224,
0.013882603496313095,
-0.29582521319389343,
0.18867935240268707,
-0.5406590104103088,
0.0994483157992363,
0.4899270236492157,
-0.44492441415786743,
-0.06116353347... | |
the location on the array with the weaponTimes variable, not storing the weaponTimes variable. My mistake, sorry for wasting your time.
I wrote a [SSCCE](http://sscce.org) with what you posted and it prints what you would expect:
```
public static void main(String[] args) {
String[][][][] troopStats = new String[4... | [
0.0011221951572224498,
-0.03536428138613701,
0.5456258654594421,
-0.1008017435669899,
0.12131458520889282,
0.3791278004646301,
0.5191049575805664,
-0.34865376353263855,
-0.5623520016670227,
-0.6486762762069702,
-0.19583992660045624,
0.4183279871940613,
-0.39214274287223816,
0.0242194309830... | |
I need to find a way to pass click events from a div on top to the div below it (and ignore the clicks on the higher div).
**There is a known way of simulating the click event and passing it to the other div, but this is not a natural behavior and the least wanted option.**
It seems that event bubbling will not help ... | [
0.1328633725643158,
-0.09077741950750351,
0.3181997537612915,
-0.07074791938066483,
-0.1616881787776947,
-0.342558890581131,
0.2230045646429062,
0.11630179733037949,
-0.18072959780693054,
-0.6245604157447815,
-0.012157151475548744,
0.42521190643310547,
-0.3609309792518616,
0.01691077277064... | |
you cannot. It is possible to pass the event to the div below, however, the position is important - there can be a link which I want the user to be able to click on.
add this css property to the overlay `div`:
```
pointer-events: none;
```
You can read more about it at: <http://robertnyman.com/2010/03/22/css-poin... | [
0.06853405386209488,
0.043204281479120255,
0.017081666737794876,
-0.16229762136936188,
0.01910652033984661,
-0.07562235742807388,
0.27167990803718567,
0.16676068305969238,
-0.2825561463832855,
-0.5124315023422241,
-0.0967097133398056,
0.5375453233718872,
-0.39166364073753357,
0.10715895891... | |
I have a solution with many projects and I would like to disable Postsharp for debug builds to reduce local developer build times. Is there any way to do this without editing each project file?
I know this may sound like a bad idea, but we are only using Postsharp for exception logging and our builds go through severa... | [
0.8292543888092041,
-0.0825190618634224,
-0.040590401738882065,
0.14434213936328888,
-0.04194898530840874,
-0.2703578472137451,
0.33414068818092346,
0.04461105912923813,
-0.560348391532898,
-0.27406230568885803,
0.15081079304218292,
0.27068498730659485,
-0.6409940123558044,
0.0619519613683... | |
mode only. | [
0.1280217468738556,
-0.3767126202583313,
0.29549118876457214,
0.23594044148921967,
-0.18310922384262085,
-0.20672717690467834,
0.3542296886444092,
0.2488325834274292,
0.28035253286361694,
-0.2741934657096863,
-0.12834163010120392,
0.9451675415039062,
-0.4752098619937897,
-0.270753532648086... | |
do you know how to do a class-type inside another class-type?
Let's say I have a LinkedList class, and I want to do a Node class inside.
```
class LinkedList
{
class Node
{
int val;
Node *next;
Node *prev;
};
};
```
And now I want to write methods in a .cpp file for the Node class. Can I write them in the .cpp... | [
0.14218398928642273,
0.07048503309488297,
0.2634757459163666,
0.04903363808989525,
0.09916374832391739,
-0.23320318758487701,
0.24943815171718597,
-0.320368230342865,
-0.20425763726234436,
-0.5394009947776794,
0.07346220314502716,
0.6833818554878235,
-0.299556165933609,
0.20980575680732727... | |
should take a look at [`.on()`](http://api.jquery.com/on/) instead.
With `.on()` you can delegate the event, like this for instance:
```
$("body").on("click", ".test", function() {
alert('Hello');
});
```
Now any element (current and future) with the class `test` available within your body will have a click-even... | [
0.4602647125720978,
-0.13184776902198792,
0.06257852911949158,
-0.014401893131434917,
0.0859919935464859,
-0.1225830614566803,
0.056547313928604126,
-0.3179953992366791,
0.08885151892900467,
-0.5950224995613098,
-0.2796228229999542,
0.5687786936759949,
-0.2064053863286972,
-0.0563802346587... | |
I have a has many through association.
Firms have many Users through Follows.
I want Users to be able to Follow Firms. - I am using Devise for the users.
I have the following action in my firms controller.
```
def follow
@firm.users << current_user
end
```
in my routes.rb
```
resources :firms do
post :follow, ... | [
-0.1164577305316925,
0.02428026683628559,
0.7687065005302429,
-0.10471663624048233,
0.030126268044114113,
-0.07756512612104416,
0.1906733363866806,
-0.3780195415019989,
-0.07043436914682388,
-0.7432304620742798,
-0.000256336759775877,
0.4682220220565796,
-0.2737860381603241,
0.158498480916... | |
=> [:show, :index]
def index
@firm_names = Firm.all.map &:name
direction = params[:direction]
direction ||= "ASC"
@firms = Firm.order("name #{direction}")
respond_to do |format|
format.html # index.html.erb
format.js
end
end
def follow
@firm.users << current_user
end
```
I am usin... | [
-0.1675981730222702,
-0.12506172060966492,
0.9685953855514526,
-0.2985381782054901,
0.29831603169441223,
0.05078524723649025,
0.20156756043434143,
-0.5057206749916077,
-0.09649413079023361,
-0.18711647391319275,
-0.36689719557762146,
0.6284765005111694,
-0.26334723830223083,
0.067711897194... | |
can delegate the event, like this for instance:
```
$("body").on("click", ".test", function() {
alert('Hello');
});
```
Now any element (current and future) with the class `test` available within your body will have a click-event listener. | [
0.39020150899887085,
-0.20395147800445557,
0.013782566413283348,
0.07962420582771301,
0.02113971672952175,
-0.11157342046499252,
0.09639535844326019,
-0.31528234481811523,
0.12864439189434052,
-0.6034179925918579,
-0.32768693566322327,
0.5378527641296387,
-0.21555231511592865,
-0.023553943... | |
I am trying to get GIF write support working on my Qt Windows application.
I have compiled the 3rd party image plugin project:
<https://gitorious.org/qt-gif-plugin>
Whilst the reading is working, the writing is not. I want to get debug messages out, in my main I have installed a qInstallMsgHandler() so that I can se... | [
0.382449746131897,
0.12732857465744019,
0.32018089294433594,
-0.34837794303894043,
-0.3307604491710663,
-0.18091583251953125,
0.3231711685657501,
-0.21796491742134094,
0.16530704498291016,
-0.8088303208351135,
-0.03925074636936188,
0.9544191360473633,
-0.3889297544956207,
0.175678148865699... | |
the event, like this for instance:
```
$("body").on("click", ".test", function() {
alert('Hello');
});
```
Now any element (current and future) with the class `test` available within your body will have a click-event listener. | [
0.19460196793079376,
-0.07554201781749725,
0.07539983838796616,
-0.13410674035549164,
0.08971467614173889,
-0.01994837448000908,
0.08755841106176376,
-0.08248601853847504,
0.16372640430927277,
-0.5314815640449524,
-0.3415699005126953,
0.5977762341499329,
-0.20710694789886475,
-0.0388440303... | |
I am trying to inject the currently logged in user into a service. My goal is to extend some twig functionality to output it based on user preferences. In this example I want to output any date function using the user specific Timezone.
There doesn't seem to be any way to inject the current user into a service, which ... | [
0.5404275059700012,
-0.1456257551908493,
0.0739954262971878,
-0.3470444083213806,
0.13140229880809784,
-0.15993885695934296,
0.36543089151382446,
0.04767394810914993,
-0.07296155393123627,
-0.6064633727073669,
-0.07334381341934204,
0.20513032376766205,
-0.20402191579341888,
0.1255936473608... | |
class: App\AppBundle\Services\TwigDateRequestListener
arguments: [@twig, @security.context]
tags:
- { name: kernel.event_listener, event: kernel.request, method: onKernelRequest }
<?php
namespace App\AppBundle\Services;
use Symfony\Component\HttpKernel\HttpKernelInterface;
use Symfony\Com... | [
-0.25657373666763306,
-0.17078574001789093,
0.33689016103744507,
-0.24730804562568665,
-0.009549492970108986,
0.33243492245674133,
0.3083471357822418,
-0.4809100329875946,
-0.11761848628520966,
-0.6209991574287415,
-0.6212993860244751,
0.659166157245636,
-0.6702672839164734,
-0.06408157199... | |
// $this->twig->getExtension('core')->setDateFormat($user->getProfile()->getFormat());
// $this->twig->getExtension('core')->setTimeZone($user->getProfile()->getTimezone());
}
}
output:
object(Symfony\Component\Security\Core\SecurityContext)[325]
private 'token' => null
private 'accessDecisionManager' ... | [
-0.1277729868888855,
-0.36490848660469055,
0.2562515139579773,
0.1103731170296669,
0.04360758513212204,
0.20723038911819458,
0.0436546690762043,
-0.7373167276382446,
-0.1254143863916397,
-0.42846056818962097,
-0.30422961711883545,
0.4081493020057678,
-0.24704627692699432,
-0.12020748853683... | |
object(Symfony\Component\Security\Core\Authorization\Voter\AuthenticatedVoter)[153]
...
2 =>
object(Symfony\Component\Security\Acl\Voter\AclVoter)[155]
...
private 'strategy' => string 'decideAffirmative' (length=17)
private 'allowIfAllAbstainDecisions' => ... | [
-0.14514556527137756,
-0.1419922113418579,
0.5146003365516663,
0.13460665941238403,
0.05218859761953354,
-0.08078257739543915,
0.3175766170024872,
-0.6278982758522034,
0.052042849361896515,
-0.3805106580257416,
-0.35312435030937195,
0.5437799692153931,
-0.4052135944366455,
-0.3902098834514... | |
object(Symfony\Component\Security\Core\Authentication\AuthenticationProviderManager)[324]
private 'providers' =>
array
0 =>
object(Symfony\Component\Security\Core\Authentication\Provider\DaoAuthenticationProvider)[323]
...
1 =>
object(Symfony\Co... | [
-0.299736887216568,
0.2104596495628357,
0.4677143096923828,
0.06880804151296616,
-0.332335501909256,
0.1821628212928772,
0.012769293040037155,
-0.5462172627449036,
-0.41810277104377747,
-0.24124491214752197,
-0.3005584180355072,
0.19638511538505554,
-0.35340452194213867,
0.0033054505474865... | |
private 'eraseCredentials' => boolean true
private 'alwaysAuthenticate' => boolean false
```
Am I missing something?
I would use a twig extension for that:
```
class UserDateExtension extends \Twig_Extension
{
private $context;
public function __construct(SecurityContext $context)
{
$this->con... | [
0.17332617938518524,
-0.24516652524471283,
0.28510040044784546,
-0.18322542309761047,
0.31260696053504944,
-0.10605606436729431,
0.4925116300582886,
0.03236909955739975,
-0.17879560589790344,
-0.23760877549648285,
-0.3415831923484802,
0.8398778438568115,
-0.42327967286109924,
-0.1523740142... | |
'user_date' => new \Twig_Filter_Method($this, "formatUserDate"),
);
}
public function formatUserDate($date, $format)
{
$user = $this->getUser();
// do stuff
}
```
Now in `services.xml`
```
<service id="user_date_twig_extension" class="%user_date_twig_extension.class%">
... | [
0.1026657372713089,
-0.1312938928604126,
0.5214188098907471,
-0.4753137528896332,
0.042967624962329865,
-0.22923679649829865,
0.18471737205982208,
-0.028995372354984283,
-0.08298030495643616,
-0.839330792427063,
-0.44864827394485474,
0.3916841447353363,
-0.1825173795223236,
0.1584713160991... | |
| user_date('d/m/Y') }}
``` | [
-0.09813195466995239,
0.3457041084766388,
0.31181347370147705,
-0.33197838068008423,
0.4420070946216583,
-0.17211520671844482,
0.1518218070268631,
0.5549150109291077,
0.0032628991175442934,
-0.5797646641731262,
-0.40030449628829956,
0.47686585783958435,
-0.24567797780036926,
0.313291430473... | |
I would like your help regarding a query I can't seem to obtain in one single query.
```
Table timeaccount
Field Type
id mediumint(8) --> Primary key autoincrement
user varchar(40) --> user, e.g. 'john.fisher'
type varchar(15) --> can only be 'SUM' or 'SUBSTRACT'
minutes smallint(5) --> an am... | [
0.0462777242064476,
0.13525550067424774,
0.6142802238464355,
0.048916883766651154,
0.2784964144229889,
0.22925058007240295,
-0.19823162257671356,
-0.47341617941856384,
-0.38697516918182373,
-0.5436497926712036,
0.0015868128975853324,
0.3512880504131317,
-0.2244824916124344,
0.3327950239181... | |
the balance from a specific worker, in pseudo-sql it would be:
```
select sum(minutes) from timeaccount where worker = 'john.fisher' and type = 'SUM'
-
select sum(minutes) from timeaccount where worker = 'john.fisher' and type = 'SUBSTRACT'
as balance
```
Thanks for your help,
Alternatively:
```
SELECT SUM(minute... | [
0.24217185378074646,
0.17229348421096802,
0.1440466046333313,
-0.03412032127380371,
0.18729960918426514,
0.44761306047439575,
-0.17937448620796204,
-0.5704951286315918,
-0.12490733712911606,
-0.34910327196121216,
-0.13407179713249207,
0.27143993973731995,
-0.13549791276454926,
0.1683162003... | |
I am still a little bit new to C# and I was wondering how i can minimize this code.
This is what I have so far:
```
private void CheckFiles()
{
if (!File.Exists(ProgramLocation + "\\Server Files\\" + "Bukkit.jar"))
{
DownloadBukkitJar();
}
else
{
Close();
}
if (!File.Exis... | [
0.12569110095500946,
0.02915399894118309,
0.9364398717880249,
-0.3488176763057709,
-0.07843028753995895,
-0.20456050336360931,
0.3582037687301636,
-0.012359936721622944,
-0.006812951527535915,
-0.5507522225379944,
-0.23774565756320953,
0.5775482058525085,
-0.23751507699489594,
0.0297443922... | |
else
{
Close();
}
}
```
So how could I make this in less code?
```
private void CheckFile(string path, Action actionIfMissing)
{
if (!File.Exists(path))
{
actionIfMissing();
}
else
{
Close();
}
}
public void CheckFiles()
{
var bukkitPath = Path.Combine(Prog... | [
0.36199668049812317,
-0.12480450421571732,
0.7273783087730408,
-0.4248054623603821,
-0.12169747054576874,
0.24014028906822205,
0.4888858199119568,
-0.29351386427879333,
-0.11678602546453476,
-0.5595056414604187,
-0.34751996397972107,
0.610190212726593,
-0.5717268586158752,
-0.1011112630367... | |
String.Format("{0}{1}{2}", "dlls", Path.DirectorySeparatorChar, "HtmlAgilityPack.dll");
CheckFile(htmlAgilityPackPath, DownloadHtmlAgilityPackDLL);
}
```
Note - be wary when hard-coding file paths, you should use `Path.DirectorySeparatorChar` if you are building up a path, or when combining paths use `Path.Combin... | [
-0.011799166910350323,
-0.2634906768798828,
0.6866060495376587,
0.06130983307957649,
0.11803953349590302,
-0.2236609011888504,
-0.043945327401161194,
-0.13174031674861908,
-0.23184257745742798,
-0.840786874294281,
-0.11529497802257538,
0.6446843147277832,
-0.2294992059469223,
-0.0144030153... | |
I'm working on an online booking system, basically I want a textbox to change to paragraph text when a user clicks on a button.
Basically, removing the textbox and just displaying the value that is inserted.
This is the HTML of the textbox that I want changing:
```
<input type="text" class="input-txt-xxxsml left" id=... | [
0.2290957272052765,
0.04625567048788071,
0.7981262803077698,
-0.4409746825695038,
0.004676785320043564,
0.12364025413990021,
-0.19479089975357056,
-0.1926187425851822,
-0.30173081159591675,
-0.8286029696464539,
-0.011489871889352798,
0.6076105237007141,
-0.34273743629455566,
0.159480437636... | |
return '<div>' + $(this).val() + '</div>';
});
})
```
For your example:
```
$('.btn-med').click(function() {
$('#txt-pickup-hn').replaceWith(function() {
return '<div>' + $(this).val() + '</div>';
});
});
```
You should really give your button an ID by the way :) | [
0.1897227168083191,
-0.3175850510597229,
0.802161455154419,
-0.4663648009300232,
0.29466864466667175,
0.32719138264656067,
0.06941059231758118,
-0.3796158730983734,
-0.4190162420272827,
-0.6320351362228394,
-0.2458932101726532,
0.748385488986969,
-0.47691234946250916,
0.05157919600605965,
... | |
In my routes I have:
```
resources :accounts
```
This produces:
```
accounts GET /accounts(.:format) accounts#index
POST /accounts(.:format) accounts#create
new_account GET /accounts/new(.:format) accounts#new
edit_account GET /accounts/:id/edit(.:format) accounts... | [
0.3434097170829773,
0.3030855357646942,
0.4219495356082916,
-0.057011812925338745,
-0.053376998752355576,
0.32599934935569763,
0.22762207686901093,
-0.0769369900226593,
-0.17391537129878998,
-0.8233340978622437,
0.025566115975379944,
0.3999127447605133,
-0.0035629135090857744,
-0.094691939... | |
/accounts/:id(.:format) accounts#update
DELETE /accounts/:id(.:format) accounts#destroy
```
I'd like to change ONLY the following resource path:
```
new_account GET /accounts/new(.:format) accounts#new
```
to
```
new_account GET /register(.:format) accounts#new
```
Is th... | [
0.3761654794216156,
-0.2736951410770416,
0.6084081530570984,
0.35288187861442566,
0.19227533042430878,
-0.02529197558760643,
0.17665547132492065,
-0.09050677716732025,
-0.43459418416023254,
-0.7813597321510315,
0.0635819211602211,
0.5447439551353455,
-0.268505334854126,
-0.1787357181310653... | |
I am writing an native application in C++ under android, and I need to broadcast some intents. Is this possible?
If you are going to point me to JNI, please give me more details, as I am not sure how this is done :)
---
What I will do if this is not possible is having a named pipe between the NDK daemon and a Java-A... | [
0.5602526664733887,
0.13808540999889374,
0.6561283469200134,
-0.08783800899982452,
0.03246351704001427,
-0.116417296230793,
0.3025525212287903,
-0.03415925055742264,
0.18908366560935974,
-0.9281460046768188,
0.05627911165356636,
0.6667459607124329,
-0.3170381486415863,
0.015284145250916481... | |
be implemented in the future).
So what you have to do is to use JNI to make an upcall to Java whenever you want to broadcast an Intent (google JNI and upcall if you need to know how this is done), and have Java code that creates and sends the Intent. So if you're starting your application through a Java Activity and c... | [
0.7004318833351135,
-0.157981738448143,
0.5550276637077332,
0.06551037728786469,
-0.11542987823486328,
-0.3019774854183197,
0.1835169941186905,
0.040628448128700256,
-0.16053937375545502,
-0.780272364616394,
-0.005871398840099573,
0.6553481817245483,
-0.2747018039226532,
-0.298089027404785... | |
Having everything installed and compiled successfully, I am getting this lovely output, anyone has an idea? (it's a centos 5.7 without x server, so I am emulating this using the infamous xvfb-run)
```
./xvfb-run ./CutyCapt
Locking assertion failure. Backtrace:
#0 /usr/lib64/libxcb-xlib.so.0 [0x7f58396d690c]
#1 /usr/l... | [
0.10211241990327835,
-0.045107487589120865,
0.40972310304641724,
0.3677978813648224,
0.18171902000904083,
-0.06841658055782318,
0.5796753764152527,
-0.235930934548378,
-0.2752762734889984,
-0.6468804478645325,
-0.2947518229484558,
0.7700299620628357,
-0.2178497016429901,
0.0126113947480916... | |
this one runs OK:
```
./xvfb-run /usr/bin/xclock
```
I have fixed this by setting LIBXCB\_ALLOW\_SLOPPY\_LOCK environment variable:
```
export LIBXCB_ALLOW_SLOPPY_LOCK=1
``` | [
-0.2632167637348175,
0.13481579720973969,
0.5055957436561584,
-0.13962675631046295,
0.177390456199646,
-0.3272954523563385,
0.3474460542201996,
-0.06277726590633392,
-0.2563864588737488,
-0.2727973759174347,
-0.1804663985967636,
0.4220215678215027,
-0.5007021427154541,
0.06837406009435654,... | |
I have few jar files which I am not getting from any repositories.I have these jar files in WEB-INF\lib folder for src directory. Is there a way to add these as dependencies in POM without specifying the actual path of the jar files (relative path is fine..)?
You can define the dependencies as follows:
```
<dependency... | [
0.07562731206417084,
0.19406946003437042,
0.6234487295150757,
-0.0807051882147789,
-0.02519659325480461,
0.023111162707209587,
0.21505644917488098,
-0.28142666816711426,
-0.42490482330322266,
-0.6481309533119202,
0.29697856307029724,
0.5802276730537415,
-0.2204151749610901,
0.3178410232067... | |
be an absolute path, but can take maven properties. Details [here](http://maven.apache.org/pom.html#Dependencies).
You would do this for each such jar that you have. | [
0.22179554402828217,
-0.14190444350242615,
0.19595620036125183,
-0.014443951658904552,
-0.06636495888233185,
-0.34415847063064575,
0.6926416158676147,
-0.33335185050964355,
-0.06739510595798492,
-0.5159401297569275,
0.19420945644378662,
0.523465633392334,
0.08598674088716507,
-0.1747925877... | |
I have two columns X and Y where the values could be as below:
```
X Y
--------------
rob one.1
rob two.2
rob abc.3
rob pqr.4
harry lmn.3
harry lkja.4
harry lkjs.6
```
I am querying on column X. That is
```
select Y where X='rob'
select Y where X='harry'
```
I want to writ... | [
0.1767541915178299,
0.29911091923713684,
0.5057969093322754,
-0.21651078760623932,
-0.10390654951334,
0.6276667714118958,
0.2954638600349426,
-0.34494346380233765,
0.04505427926778793,
-0.406829297542572,
0.02576519176363945,
0.47594746947288513,
-0.31707799434661865,
-0.14851605892181396,... | |
of the result string will be the X value followed by a constant # followed by the numbers in Y after '.' dot.
So rob gets 1,2,3,4 and harry has 3,4,6
Thanks for reading
I achieved it using aggregate functions in db2:
```
concat('Harry # ',substr( xmlserialize( xmlagg( xmltext( concat( ', ', substr(myTable.salary, l... | [
0.03889526426792145,
0.17528338730335236,
0.8730146884918213,
-0.1845090538263321,
0.006913244258612394,
0.40946337580680847,
0.18775761127471924,
-0.637710452079773,
0.017721816897392273,
-0.1508197784423828,
-0.08726443350315094,
0.7518591284751892,
0.06808558106422424,
-0.10212463140487... | |
I found that when we change the orientation of current activity by screen rotation, the previous activity will be recreated in background.
What I'm trying to say is, for example:
I had set the screen orientation for both activity in the manifest file
```
<activity android:screenOrientation="portrait" android:name="p... | [
0.3553282916545868,
-0.20419053733348846,
0.8401498198509216,
-0.5106368064880371,
0.026074441149830818,
0.0424807146191597,
0.33475571870803833,
-0.4753405749797821,
-0.20131775736808777,
-0.920678973197937,
0.11757102608680725,
0.670398473739624,
-0.4051998257637024,
-0.16710777580738068... | |
1. the screen orientation for both activities is different or
2. Screen rotation is enabled for MyActivity (screenOrientation="user"). OnCreate() method in PotraitActivity is called every time we rotated MyActivity.
Anyone has idea about this?
Set `android:configChanges="orientation"` to your **package.PotraitActivity... | [
0.20418399572372437,
-0.1613800823688507,
0.7338133454322815,
-0.1018817126750946,
0.07134588807821274,
0.01618196815252304,
0.13834333419799805,
-0.1400223672389984,
-0.19112154841423035,
-0.9035230875015259,
0.12954846024513245,
0.740725040435791,
-0.36524856090545654,
-0.205743148922920... | |
i have a problem to change the name of the application in Visual Studio 2010 ,i explain better my trouble;
last year i develop a project and i called it "Project2011\_2012"(it was the original name of the Assembly Name of the project in Visual Studio) and now i develop ,with the copy of the same project, the version 20... | [
0.01165552344173193,
0.17782925069332123,
0.3146260380744934,
-0.3147127628326416,
-0.07365567237138748,
0.076982781291008,
0.25692713260650635,
-0.18371015787124634,
-0.2549164593219757,
-0.6807988882064819,
-0.04162643104791641,
0.665842592716217,
-0.4479546844959259,
-0.0409562774002552... | |
already a version in the my computer that get the same name (it is the older version of the project 2011\_2012) but i can not delete it because in my office they need it to work then do you have any idea how i can publish the both projects with the different name in Assembly Name without error?
Thansk so much for your... | [
0.18950453400611877,
-0.004182836040854454,
0.6830241680145264,
-0.1786390095949173,
-0.06997241079807281,
-0.044990573078393936,
0.2501858174800873,
-0.2519535720348358,
-0.2423623651266098,
-0.9045579433441162,
-0.003975232597440481,
0.6668158769607544,
-0.13525576889514923,
-0.182699069... | |
> **Possible Duplicate:**
>
> [Representing dynamic typing in C](https://stackoverflow.com/questions/1485505/representing-dynamic-typing-in-c)
A professor at my History of Computation side-lecture went into great depth about manifestly typed or type-inferred languages and generally praised the greatness of latently... | [
-0.034212686121463776,
-0.20424909889698029,
-0.3234809935092926,
0.010759307071566582,
-0.19616378843784332,
0.2940099537372589,
0.30203044414520264,
0.18111515045166016,
-0.3953360617160797,
-0.603386640548706,
0.21172098815441132,
0.500616729259491,
-0.5490050315856934,
-0.3932227492332... | |
C that implements some of the benefits of both ?
For instance, I could create Unions to accept all user driven data, like so :
```
typedef union {
int int_type;
char char_type;
//and so on
} dynamic;
// Var Creation :
dynamic data;
// For unknown return type
void* functio... | [
0.35194501280784607,
-0.20260028541088104,
-0.2588104009628296,
-0.14480285346508026,
-0.07444066554307938,
-0.32056924700737,
-0.14025825262069702,
-0.06278344243764877,
-0.009427681565284729,
-0.2989969551563263,
-0.023322593420743942,
0.8053010106086731,
-0.691514253616333,
0.1198458522... | |
What other approach could I take ? I'm just trying for a demonstration.
I tried for an answer from [this question](https://stackoverflow.com/questions/1485505/representing-dynamic-typing-in-c). But honestly, I could not follow the arguments closely.
I apologize if the question seems silly.
PS
Using suggestions from... | [
0.07120334357023239,
-0.13295656442642212,
-0.013005873188376427,
-0.13819994032382965,
-0.07294212281703949,
0.17884637415409088,
0.17432263493537903,
0.10322891920804977,
-0.22695857286453247,
-0.5611374974250793,
0.19060268998146057,
0.3813363015651703,
-0.12641611695289612,
-0.20275825... | |
experienced statically typed languages, I would strongly suggest trying out [Python](http://python.org/). It is highly dynamic and will teach you new ways of thinking.
And last but not least, there also is [Cython](http://cython.org/) which is a Python dialect using C as intermediate language. It can mix static typing... | [
0.12101690471172333,
-0.038546111434698105,
-0.08806563913822174,
0.19889813661575317,
-0.1396103948354721,
0.06798233836889267,
-0.006449732463806868,
0.4915515184402466,
-0.22723078727722168,
-0.3873211145401001,
-0.19638817012310028,
0.6418885588645935,
-0.3067842423915863,
-0.215829804... | |
I am using SQL Server 2008 and I have a situation where I have view that within my application code I always order by a date contained therein, so I was wondering about efficiency etc.
I came across this blog post [SQL Server - Order a View](http://code.rawlinson.us/2007/01/sql-server-order-view.html) that explains th... | [
-0.010027024894952774,
0.09274109452962875,
0.2997981309890747,
-0.16584180295467377,
-0.36204782128334045,
0.36255088448524475,
0.02063145861029625,
-0.33827298879623413,
-0.12761828303337097,
-0.548667311668396,
0.10774045437574387,
0.47603708505630493,
-0.16856247186660767,
0.3830891251... | |
of the above is the more efficient?
If I want it to be as fast as possible would I be better off with the second approach or does it make no difference and sql server will work it all out the same regardless?
complementing Remus answer, if you have a view `v` like your that contains:
`SELECT a,b,d FROM t`
once you ... | [
0.08209315687417984,
-0.055808309465646744,
0.26724883913993835,
0.1358521729707718,
-0.23098976910114288,
0.2083033323287964,
0.025543291121721268,
-0.3682965338230133,
0.04614482447504997,
-0.5080336332321167,
-0.156460702419281,
0.7309077978134155,
-0.26068973541259766,
0.15737077593803... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.