text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
I'm new to Java and XPath syntax. I have complex xml document. What I need is to select all the nodes, that don't have children (I need their values actually).
```
<root>
<a>
<b>text1</b>
<c>text2</c>
</a>
<d>
<e>
<f>text3</f>
</e>
</d>
<f>text4</f>
</roo... | [
-0.017460694536566734,
0.18618065118789673,
0.45234379172325134,
-0.332156777381897,
0.06632746011018753,
0.2706320583820343,
0.0922359749674797,
-0.17445506155490875,
0.08945861458778381,
-1.0157631635665894,
-0.055154070258140564,
0.5835564732551575,
-0.1594967395067215,
-0.0386808924376... | |
Could you help me with XPath expression?
Ok, this is, what I need
```
root.selectNodes("//*[not(*)]")
``` | [
0.19656424224376678,
0.0007589735323563218,
0.28073233366012573,
0.0072707063518464565,
0.09130187332630157,
-0.1421172022819519,
0.2920965552330017,
0.3018532395362854,
0.18384277820587158,
-0.7133446335792542,
-0.16708822548389435,
0.7535863518714905,
-0.18421489000320435,
-0.03694831207... | |
I want to design an interactive website (with checkboxes, radiobuttons etc.) which I would later link up with a MySQL database. But I don’t know any HTML. Is there any (free) software that enables me to design my website using drag-and-drop of controls and generates the HTML automatically? Which is the best software in... | [
0.6295139193534851,
0.14027036726474762,
0.23363429307937622,
0.012763585895299911,
0.1263255625963211,
-0.12210340797901154,
0.09634983539581299,
0.15451836585998535,
-0.15030568838119507,
-0.6136311292648315,
0.1282387524843216,
0.4111745059490204,
-0.24640817940235138,
0.075949266552925... | |
Can anybody tell me what is the difference between `SENSOR_DELAY_NORMAL`, `SENSOR_DELAY_GAME`, `SENSOR_DELAY_UI` and `SENSOR_DELAY_FASTEST` in Android sensors.
Where should a developer use all these things? What will user feel by using all these?
int SENSOR\_DELAY\_FASTEST get sensor data as fast as possible
int SENSO... | [
-0.0706968829035759,
-0.31336140632629395,
0.6236979961395264,
0.3324646055698395,
0.05202033743262291,
0.1929338276386261,
-0.1028275266289711,
-0.22594673931598663,
-0.5147266983985901,
-0.7054393887519836,
0.2016131430864334,
0.7120513916015625,
-0.1545250415802002,
-0.10326723009347916... | |
If my client is not comfortable with manually editing the JSON files that drive their data, what is the best way to have them edit the JSON file? A cross-platform app would work, or a website that doesn't look like it was thrown together overnight.
Anything that looks professional and modern, for that matter, is what ... | [
0.1505812704563141,
-0.20422524213790894,
0.30464211106300354,
0.3433988094329834,
0.1506500244140625,
-0.14694207906723022,
0.06303473562002182,
0.29049092531204224,
-0.31375691294670105,
-0.7864876389503479,
0.044251199811697006,
0.6475160717964172,
0.09934063255786896,
-0.16433568298816... | |
When I create a module with its sole content:
```
class Classname(randomobject):
pass
```
And I try to run the .py file of the module the interpreter says that `randomobject` is not defined.
But when I do:
```
class Classname(object):
pass
```
The module runs just fine. So if `object` is not a keyword, t... | [
-0.08634638041257858,
-0.15855219960212708,
0.06161276623606682,
0.04687218368053436,
-0.1286228448152542,
-0.2893843948841095,
0.18079429864883423,
-0.014303998090326786,
-0.10166545957326889,
-0.4468673765659332,
-0.08084098249673843,
0.4435793161392212,
-0.5976133346557617,
0.1436635106... | |
that isn't a keyword or operator is an identifier. | [
0.5669371485710144,
0.26825395226478577,
-0.011334847658872604,
0.061587877571582794,
0.2648581564426422,
-0.24155977368354797,
0.1330798715353012,
0.0338117815554142,
0.0580785907804966,
-0.3534541428089142,
-0.3284009099006653,
-0.021308086812496185,
-0.1953103393316269,
0.28311985731124... | |
I use this regex in combination with asp:RequiredFieldValidator to force user to enter minimum 7 characters:
```
[0-9a-zA-Z]{7,}
```
But when user enter non letter **@, ., -** etc then this doesn't work.
How to enable to enter all characters and minimum 7
Try this `Regex` expression:
```
^.{7,}$
``` | [
-0.0717526376247406,
0.0417621023952961,
0.5527675151824951,
-0.20049357414245605,
0.09108392894268036,
0.21301566064357758,
0.5218865871429443,
-0.1111593171954155,
0.029717249795794487,
-0.5760574340820312,
-0.10846751183271408,
0.9620492458343506,
-0.2572372555732727,
0.0404728017747402... | |
```
if(stringName.charAt(0) != 'Q' || stringName.charAt(0) != 'W' || stringName.charAt(0) != 'E'){
SetID = "Yes";
}
```
The above code when I use alert to popup the windows the value of My.String.charAt(0) is returning the correct value but I don't know why it goes inside the if statement and change the... | [
0.10767846554517746,
0.11112158745527267,
0.36077114939689636,
-0.3657357394695282,
0.20021386444568634,
-0.18121784925460815,
0.443247526884079,
-0.040928468108177185,
0.18216203153133392,
-0.46576839685440063,
-0.3513392210006714,
0.8156510591506958,
-0.11811962723731995,
0.1203034147620... | |
is not 'Q', or it's not 'W', or it's not 'E', then ..." — even if it is one of those characters, it will not be the others, so the expression evaluates to `true`. | [
0.17557092010974884,
0.0674104318022728,
0.3225504755973816,
-0.19425012171268463,
0.031647469848394394,
0.015178660862147808,
0.5330694317817688,
0.2304086834192276,
0.5597533583641052,
-0.460661381483078,
-0.6188262701034546,
0.6108819246292114,
-0.030548246577382088,
0.09079844504594803... | |
### Person.java
```
public class Person {
public String firstName, lastName;
public Person(String firstName,
String lastName) {
this.firstName = firstName;
this.lastName = lastName;
}
public String getFullName() {
return(firstName + " " + lastName);
}
}
```
#... | [
-0.36638379096984863,
-0.30944308638572693,
0.24171563982963562,
-0.2741706967353821,
0.11048486828804016,
0.4463207423686981,
0.4181906282901764,
-0.24817995727062225,
-0.09518847614526749,
-0.801476240158081,
-0.357156902551651,
0.549744188785553,
-0.02731814607977867,
0.2427242994308471... | |
new Person(NameUtils.randomFirstName(),
NameUtils.randomLastName()); //this line
}
for(Person person: people) {
System.out.println("Person's full name: " +
person.getFullName());
}
}
}
```
In above code, we used twice "new". Is this ... | [
-0.4354857802391052,
-0.09856263548135757,
0.27458977699279785,
-0.14597351849079132,
-0.01004159264266491,
0.4667453169822693,
-0.025595443323254585,
-0.2506089210510254,
-0.35012269020080566,
-0.6969815492630005,
-0.32681941986083984,
0.1798032969236374,
-0.17280493676662445,
0.328927576... | |
the line:
```
new Person(NameUtils.randomFirstName(),
NameUtils.randomLastName()); //this line
```
fills it [the array] by instantiating objects of type `Person`, and assigning the reference in the array. | [
-0.3923507034778595,
-0.14667551219463348,
0.36074593663215637,
-0.026699641719460487,
0.03160911425948143,
0.37748250365257263,
-0.18954084813594818,
0.1358870416879654,
0.06143945828080177,
-0.5712942481040955,
-0.37953633069992065,
-0.021300652995705605,
-0.3065526485443115,
0.302242934... | |
Consider the following "tweets" (left) and "retweets" (right) tables:
```
+----------+-----------------+ +----------+----+
| tweet_id | text | | tweet_id | rt |
+----------+-----------------+ +----------+----+
| 1 | foo {RT|123} bar| | 1 | 123|
| 2 | foobar ... | [
0.08091489970684052,
0.3239944875240326,
0.43594884872436523,
-0.15046192705631256,
0.03911307454109192,
-0.01191335916519165,
0.385817289352417,
-0.4740985631942749,
-0.2720192074775696,
-0.3197803199291229,
-0.3160848915576935,
0.6477811336517334,
-0.5962530970573425,
-0.2431902289390564... | |
| 3 | 456|
| 3 | {RT|456} baz | | 4 | 789|
| 4 | bazbar {RT|789} | +----------+----+
| 5 | bar baz |
+----------+-----------------+
```
The tweets table contains millions of preprocessed tweets. In some tweets, | [
-0.05335614085197449,
0.5671683549880981,
0.2551141083240509,
-0.21287477016448975,
-0.027228254824876785,
0.6022621393203735,
0.42070239782333374,
-0.15323200821876526,
-0.20887544751167297,
-0.40692198276519775,
-0.5458494424819946,
0.14045384526252747,
-0.5590783953666687,
0.03786116838... | |
a custom label is added of the form {RT|xx} **with xx being a 17 to 20 figure number**. The retweets table is currently empty, but it needs to be filled as demonstrated: tweets.text should be scanned for {RT|xx} labels, and if found, the number should be extracted from the label and inserted into the retweets table tog... | [
0.2801447808742523,
-0.004707435145974159,
0.5047486424446106,
-0.03715934604406357,
-0.22410710155963898,
0.2930457890033722,
0.10297936946153641,
-0.49862295389175415,
-0.397749125957489,
-0.6135713458061218,
-0.012927571311593056,
0.6975188255310059,
-0.1121915802359581,
0.0529424324631... | |
expression, and then perform an INSERT INTO operation. This, however, would take a lot of time - making me wonder if this would perhaps be faster with a SQL query? And if so, what would the query have to look like? I have never worked with regular expressions in SQL statements before.
If your database if MySQL, you can... | [
0.016819952055811882,
0.0639197826385498,
0.3978741765022278,
-0.08881482481956482,
0.04815477505326271,
0.29650571942329407,
0.3415636420249939,
-0.20727750658988953,
0.11124926805496216,
-0.4520415663719177,
-0.29344844818115234,
0.9398252367973328,
-0.33889415860176086,
-0.2108071893453... | |
How would you implement a layout with multiple columns, where the rows of each column don't line up? I'm thinking of something like:
```
----------
| | | |
| | | |
|--| | |
| |--| |
|--| |--|
| |--| |
...
```
And so on. An example of something like this is a website like Pinterest.
I'm looking for bes... | [
0.6334658861160278,
-0.009473934769630432,
0.4059031009674072,
0.28487709164619446,
-0.2498042732477188,
0.03150728717446327,
-0.05713728815317154,
-0.0030977700371295214,
-0.36446458101272583,
-0.8732510209083557,
0.368263304233551,
0.4441990554332733,
-0.212875634431839,
0.38418051600456... | |
project: <https://github.com/maurycyw/StaggeredGridView>
(via [androidviews.net](http://www.androidviews.net/2013/01/pinterest-like-adapterview/)). It's pretty much like the Pinterest app layout. | [
0.3441072404384613,
-0.2260819673538208,
0.4780369699001312,
-0.0005018179654143751,
-0.2459837794303894,
0.2555460035800934,
-0.02918388321995735,
-0.12365050613880157,
-0.25801533460617065,
-0.617102324962616,
0.12488986551761627,
0.12873013317584991,
0.1781919300556183,
0.21442216634750... | |
I want my picture to fade in (I think this is how you call it...). I am currently trying to use the alpha to do this (see below). But the alpha is getting a black screen and then showing the picture. I need the animation to show the picture in the beginning but a transparent one or very bright picture and then get dark... | [
0.5854804515838623,
0.0828428566455841,
0.324688583612442,
-0.28198695182800293,
0.06966481357812881,
0.1248394325375557,
0.12350867688655853,
-0.28294429183006287,
0.11910155415534973,
-0.9415133595466614,
-0.23253586888313293,
0.1962457001209259,
-0.6929104328155518,
0.33611688017845154,... | |
animationmove=3;
```
If you want it to partially visible to start with, you can do one of the two following options:
1. Create a low opacity image and set it as the background of the parent layout.
2. Change the initial alpha to a small, non-zero value:
AlphaAnimation fadein = new AlphaAnimation(0.2, 1);
After anim... | [
0.21694299578666687,
-0.13020898401737213,
0.6613149642944336,
-0.2822434902191162,
-0.020041491836309433,
0.2253187745809555,
0.0716746523976326,
-0.12471091747283936,
0.019927171990275383,
-0.7153533101081848,
-0.42693597078323364,
0.39719870686531067,
-0.38863447308540344,
0.14676131308... | |
files between the , . | [
0.1548745185136795,
0.3371230363845825,
0.23517920076847076,
0.11750935763120651,
0.3868660628795624,
0.14308619499206543,
-0.22547876834869385,
0.015718482434749603,
-0.10538631677627563,
-0.41501161456108093,
-0.11100873351097107,
0.23565347492694855,
0.1543426364660263,
0.39658844470977... | |
I have a script (**insertvalues.php**) where all of the MySQL coding happens (such as queries and inserting values in the database using PHP).
I also want to use PHP to upload a file.
What I want to know is: is it better for the PHP code which does the file uploading to be stored in the same page as as **insertvalu... | [
0.3027162551879883,
0.23831453919410706,
0.20105625689029694,
-0.213346466422081,
-0.2208631932735443,
-0.19882188737392426,
0.3353143334388733,
-0.12380056828260422,
0.06432583928108215,
-0.863929271697998,
0.1124236211180687,
0.5476625561714172,
-0.22527796030044556,
0.2578558921813965,
... | |
$imagequery = "SELECT ImageId FROM Image WHERE (ImageFile = '". mysql_real_escape_string($_POST['imageFile[]'])."')";
$imagers = mysql_query($imagequery);
$imagerecord = mysql_fetch_array($imagers);
$imageid = $imagerecord['ImageId'];
$insertquestion[] = "'".
mysql_real_escape_... | [
-0.3319421410560608,
-0.08732576668262482,
0.8769216537475586,
0.01859818585216999,
-0.22477521002292633,
0.1464829444885254,
0.2955772578716278,
-0.49118614196777344,
-0.1536794900894165,
-0.7055231332778931,
-0.2501627504825592,
1.0271975994110107,
-0.37784549593925476,
-0.16259472072124... | |
function submitform()
{
var fieldvalue = $("#QandA").val();
$.post("insertvalues.php", $("#QandA").serialize() ,function(data){
var QandAO = document.getElementById("QandA");
QandAO.submit();
});
alert("Your Details for this Session has been submitted");
}
```
I suggest looking into ... | [
0.31150487065315247,
-0.23795093595981598,
0.46390238404273987,
-0.23341090977191925,
-0.08383708447217941,
-0.08551333099603653,
0.43551045656204224,
-0.521653413772583,
0.014480025507509708,
-0.5928422808647156,
-0.20827235281467438,
0.5873268842697144,
-0.33433032035827637,
0.1538322418... | |
I want to find first and last 20 character after the particular keyword from database.
Suppose the keyword is "Account" then I want to find first 20 character before "Account" appear in a line and 20 character after "Account" appear in a line.
Currently I am using this query:
```
SELECT LEFT(Line1,20), RIGHT(Line,20)... | [
-0.22772036492824554,
0.0762048214673996,
0.7622553110122681,
-0.08603744208812714,
0.25659632682800293,
0.5220929980278015,
0.09590201079845428,
-0.36395615339279175,
-0.09911390393972397,
-0.7574671506881714,
-0.20463411509990692,
0.5373395681381226,
0.12861227989196777,
-0.1161242350935... | |
GREATEST(LOCATE('Accounts', m.WorkDesc) - 20, 0), -- Force pos >= 0
LENGTH('Accounts') + 20)
FROM minde_candidate_workexp m
WHERE
m.WorkDesc LIKE '%Accounts%'
:
```
See also this similar question: [Extract X number of words surrounding a given search string within a string](https://stackoverflow.com... | [
-0.4065724015235901,
-0.03470989316701889,
0.5239925980567932,
-0.07670041173696518,
-0.1867959350347519,
-0.06592302769422531,
0.4842398166656494,
-0.3789799213409424,
-0.40907877683639526,
-0.4028228223323822,
-0.3640262186527252,
0.5464516878128052,
0.2274070680141449,
-0.14953909814357... | |
I have downloaded the Facebook Android SDK from [Git](http://git-scm.com/) and followed the steps as in [developers.facebook](http://developers.facebook.com/docs/mobile/android/sso/) and got an application ID and run some sample code. I can post status on the wall. Now I am trying to upload a photo on the wall with a d... | [
0.43408387899398804,
0.12540291249752045,
0.32306915521621704,
-0.34886911511421204,
-0.2720251977443695,
0.2605634927749634,
0.45032456517219543,
-0.5229864716529846,
-0.14948444068431854,
-0.676363468170166,
0.0032795530278235674,
0.3011484742164612,
-0.42162013053894043,
-0.306114226579... | |
= baos.toByteArray();
Bundle params = new Bundle();
params.putString(Facebook.TOKEN, mFacebook.getAccessToken());
params.putString("method", "photos.upload");
params.putByteArray("picture", data);
params.putString("caption", "So Cuuteee!!");
AsyncFacebookRunner mAsyncRunner = new AsyncFacebookRu... | [
-0.3069062829017639,
-0.20208989083766937,
0.7063427567481995,
-0.008235950022935867,
-0.3752726912498474,
0.32917430996894836,
0.4316427707672119,
-0.6110695600509644,
-0.5087940692901611,
-0.2642986476421356,
-0.21722252666950226,
0.31653088331222534,
-0.45854511857032776,
0.053164880722... | |
mAsyncRunner.request("me/photos", params, "POST", new SampleUploadListener(), null);
```
and
```
mAsyncRunner.request("me/feed", params, "POST", new SampleUploadListener(), null);
```
For both, I got the following as response
```
{"error":{"message":"Unsupported method, photos.upload","type":"Exception"}}
... | [
0.2070775330066681,
0.15048423409461975,
0.35846924781799316,
-0.04311405494809151,
-0.46173402667045593,
0.38450345396995544,
0.22227397561073303,
-0.4407535195350647,
-0.2631913721561432,
-0.6591232419013977,
-0.09612901508808136,
0.31589365005493164,
-0.30955779552459717,
-0.12525270879... | |
I don't get the values 100 to 900 in CSS font-weight. I see 100 to 500 like regular size and 600 to 900 like bold. Only two font weights. Tried h1, font-size:60px, etc. Is there something I am missing?
As Rich said, depends on the font, but it's a really good question because it does impact how the font renders, especi... | [
0.43987420201301575,
0.1000056192278862,
0.2733076214790344,
-0.09846174716949463,
-0.19344747066497803,
0.24183665215969086,
0.31779760122299194,
0.0685979351401329,
-0.1263771504163742,
-0.48826396465301514,
0.4077190160751343,
0.38903528451919556,
0.08923404663801193,
0.0593349039554595... | |
I did search and can't find any sites listing available font-weights per font. Would be a handy resource! For now you could just try the various font selling sites like [Fontspring](http://www.fontspring.com/), [Google Web Fonts](http://www.google.com/webfonts#ChoosePlace%3aselect) etc, or search for the font you're us... | [
0.593532383441925,
0.24019549787044525,
0.15483678877353668,
-0.23891772329807281,
-0.2367538958787918,
0.4518200755119324,
0.08399759978055954,
0.09878858923912048,
-0.05679211765527725,
-0.4654732048511505,
0.397715300321579,
0.5095953345298767,
0.14094127714633942,
-0.026177430525422096... | |
I have an application with the desired functionality.
Howerver, at certain times toasts are displayed and I want a double beep to play at the same time that the toasts are displayed to alert the user to the messages being displayed.
I'm not sure what the best approach is for playing sounds in android or if there is s... | [
0.6774821877479553,
0.11512885987758636,
0.4805574417114258,
-0.3675989508628845,
0.20015849173069,
-0.27471181750297546,
0.250476211309433,
0.06034810468554497,
-0.14954465627670288,
-0.8092436194419861,
0.11260563135147095,
0.8656038641929626,
-0.3564574718475342,
0.23928587138652802,
... | |
public void run(){
MediaPlayer player = null;
int countBeep = 0;
while(countBeep<2){ | [
0.29636579751968384,
-0.702657163143158,
0.08245653659105301,
0.043611105531454086,
0.10737891495227814,
-0.2265521138906479,
0.4778251051902771,
-0.003065523225814104,
-0.06569625437259674,
-0.403505802154541,
-0.16197846829891205,
0.7756652235984802,
-0.7197468876838684,
0.39364627003669... | |
player = MediaPlayer.create(context,R.raw.beep);
player.start();
countBeep+=1;
try { | [
-0.1665550321340561,
-0.6817474365234375,
0.2813437283039093,
-0.34234002232551575,
0.032162152230739594,
-0.09653092920780182,
0.35220712423324585,
-0.359660267829895,
-0.2714971899986267,
-0.45282262563705444,
-0.2807922959327698,
0.5062202215194702,
-0.5326688289642334,
0.36597755551338... | |
Thread.sleep(player.getDuration()+100);
} catch (InterruptedException e) {
// TODO Auto-generated catch block | [
0.013896223157644272,
-0.6483473181724548,
0.2195737212896347,
-0.2625260353088379,
0.6717656254768372,
-0.007525753695517778,
0.18922725319862366,
0.05956253409385681,
-0.26540911197662354,
-0.4350230097770691,
-0.12037963420152664,
0.584896981716156,
-0.4693315625190735,
0.27769523859024... | |
e.printStackTrace();
}
}
}
}; | [
-0.12453298270702362,
-0.20107415318489075,
0.3086054027080536,
-0.21836447715759277,
0.35821130871772766,
-0.2833552658557892,
0.06048502027988434,
-0.2108203023672104,
0.02408120222389698,
-0.553644061088562,
-0.3489547073841095,
0.6281082630157471,
-0.524785578250885,
0.0672700703144073... | |
t.start();
}
```
I have a sound file named beep in **res/raw**
How can I call this method in an if statement where a toast is displayed so the 2 occur at the same time?
**UPDATE 2:**
Here is the code where I'm trying to call the alerting method:
```
if (elapsedTime > hourAlert)
{
... | [
0.4040059447288513,
0.050664737820625305,
0.8191857933998108,
-0.41954469680786133,
0.22912980616092682,
-0.3049103021621704,
0.417804092168808,
-0.33810484409332275,
-0.10861142724752426,
-0.7971906661987305,
-0.29380881786346436,
0.6615651845932007,
-0.2928485572338104,
0.286521732807159... | |
View layout = inflater.inflate(R.layout.toast_layout,
(ViewGroup) findViewById(R.id.toast_layout_root));
TextView text = (TextView) layout.findViewById(R.id.text);
text.setText("HOUR PASSED");
Toast toast | [
0.049402106553316116,
0.3173326849937439,
0.7257295846939087,
-0.5890688896179199,
-0.34000271558761597,
-0.06178293749690056,
0.6635640263557434,
-0.11061154305934906,
-0.24782250821590424,
-0.8240319490432739,
-0.46896663308143616,
0.5240055322647095,
-0.08698133379220963,
0.135550588369... | |
= new Toast(getApplicationContext());
toast.setGravity(Gravity.BOTTOM, 0, 160);
toast.setDuration(Toast.LENGTH_LONG);
toast.setView(layout);
toast.show();
playAlertTone(getApplicationContext()); // Edited here now call
```
You can put your audio file in **res... | [
0.5864866971969604,
-0.03219395875930786,
0.8381063342094421,
-0.2545825242996216,
0.29905885457992554,
-0.3489001393318176,
0.37187278270721436,
-0.4172130227088928,
-0.19535841047763824,
-0.6983245015144348,
-0.4923713803291321,
0.8342376947402954,
-0.2742884159088135,
0.3192068934440613... | |
public void run(){
MediaPlayer player = null;
int countBeep = 0;
while(countBeep<2){
player = MediaPlayer.create(context,R.raw.beep); | [
0.1942911595106125,
-0.6497452259063721,
0.1814323365688324,
-0.13304771482944489,
0.09785488247871399,
-0.10384391993284225,
0.4471685588359833,
-0.213893324136734,
-0.16083556413650513,
-0.49158352613449097,
-0.324980765581131,
0.7070059180259705,
-0.6960721015930176,
0.5362375378608704,... | |
player.start();
countBeep+=1;
try {
// 100 milisecond is duration gap between two beep
Thread.sleep(player.getDuration()+100); | [
-0.005195899400860071,
-0.3182900547981262,
0.3662143349647522,
-0.5537029504776001,
0.46225351095199585,
-0.08278848230838776,
0.343568354845047,
-0.48009955883026123,
-0.17007550597190857,
-0.5141399502754211,
-0.219185471534729,
0.4953922629356384,
-0.2123650461435318,
0.255209118127822... | |
player.release();
} catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace(); | [
-0.35813823342323303,
-0.6274224519729614,
0.24210064113140106,
-0.38524186611175537,
0.4853852391242981,
-0.07268769294023514,
0.08473016321659088,
-0.0766180232167244,
-0.1425870805978775,
-0.21556292474269867,
-0.43456220626831055,
0.6497344970703125,
-0.6493269801139832,
0.206803560256... | |
}
}
}
};
t.start();
}
//call it like this from your activity' any method
if(myCondition){
Toast.makeText(getApplicationContext(), text, duration).show();
playAlertTone(getApplicationContext());
}
``` | [
0.4824063777923584,
-0.059077125042676926,
0.6230624318122864,
-0.41656172275543213,
0.1816980093717575,
-0.6195357441902161,
0.4627911150455475,
0.05872410535812378,
-0.17107607424259186,
-0.7483485341072083,
-0.4317721128463745,
0.4867549538612366,
-0.3810635805130005,
0.2118741571903228... | |
I want to perform `:group` and `:order` on my module, since Mysql does group by before order by you get mixed results and not what you expected.
the SQL solution for that would be:
```
SELECT * FROM
(
select * from `my_table` order by timestamp desc
) as my_table_tmp
group by catid
order by nid desc
```
how c... | [
-0.07467021048069,
0.21173438429832458,
0.33509063720703125,
-0.2592945992946625,
-0.250435471534729,
0.10347096621990204,
0.2878085970878601,
-0.3764655888080597,
-0.02970145456492901,
-0.5675358772277832,
-0.16204947233200073,
0.5730966329574585,
-0.5636352300643921,
-0.05380081012845039... | |
I have a simple rendering process that sends a set of vertices to a geometry shader and renders sprites from that information.
The memory usage of the little app goes through the roof, continuously increasing. I ran a quick test with `_CrtDumpMemoryLeaks()` and Visual Leak Detector, and they both claim no leaks.
I ha... | [
0.17187146842479706,
0.3220776915550232,
0.5810906887054443,
-0.05767922103404999,
-0.3539148271083832,
-0.09703031927347183,
0.5865697860717773,
-0.3810857832431793,
0.06057427078485489,
-0.7131227254867554,
-0.02826078049838543,
0.6688894033432007,
-0.32456931471824646,
0.303669631481170... | |
initData.pSysMem = &((*sprites)[0]);
D3D10_BUFFER_DESC bd;
bd.Usage = D3D10_USAGE_DEFAULT;
bd.ByteWidth = sizeof(SpriteVertex)*(numSprites);
bd.BindFlags = D3D10_BIND_VERTEX_BUFFER;
bd.CPUAccessFlags = 0;
bd.MiscFlags = 0;
// As soon as the following line is uncommented, memory starts leak... | [
-0.11110969632863998,
0.172178715467453,
0.7826552987098694,
-0.02532820589840412,
-0.14938358962535858,
0.12582054734230042,
0.7635930180549622,
-0.07909291237592697,
-0.1761501580476761,
-0.695831835269928,
-0.33982542157173157,
0.4009716510772705,
-0.21630974113941193,
0.354167789220809... | |
a quick manner and comments are a bit too short - here goes - another quickie. **You asked what else is needed to update the created buffers at runtime**:
You could change the buffer usage from `D3D10_USAGE_DEFAULT` (GPU read/write only) to `D3D10_USAGE_DYNAMIC` which enables facilities like `CopyResource()` and `Copy... | [
-0.03298039361834526,
-0.2377742975950241,
0.6902714371681213,
-0.01890699751675129,
-0.06445697695016861,
0.10343675315380096,
0.15444032847881317,
0.020380793139338493,
-0.31590914726257324,
-0.7234333157539368,
-0.21799790859222412,
0.7375044822692871,
-0.3257499039173126,
-0.0668896287... | |
Yarrr, me hearty, new data. And a complementary keg of rum.
I'll try to give more information on the why behind the how, but still keep it *fun to read*. Various websites, including Wikipedia, suck the fun out of everything computer science related. The key point is to give the programmer intuitive understanding, the ... | [
0.7803535461425781,
0.7449011206626892,
0.08998843282461166,
0.1331474483013153,
-0.32923734188079834,
-0.1349646896123886,
0.41694268584251404,
0.4165496528148651,
0.0535140298306942,
-0.35684913396835327,
-0.0429372601211071,
0.7646881937980652,
0.3296256363391876,
0.07141270488500595,
... | |
a million times, an understanding of motivation goes a long way towards proper understanding.
**The memory leak problem** is caused by the fact you're not managing memory properly as others have said thus far. Usually, a good indicator whether or not you have to worry about memory (when *classic* C/C++ indicators don'... | [
0.20131343603134155,
-0.12133970111608505,
-0.14450083673000336,
0.4381208121776581,
-0.027668455615639687,
0.15599294006824493,
0.41295018792152405,
0.21041250228881836,
-0.35953661799430847,
-0.6608483791351318,
0.034540459513664246,
0.5865526795387268,
-0.01174741331487894,
-0.211336255... | |
you don't know. But, let's talk about COM and one of the quirks first - memory management. It's really simple actually, doesn't really differentiate much from classic C++ objects, if you take out the special creation/initialization approach.
While there is no *manual allocation per se* of a buffer (the case at hand), ... | [
0.21443785727024078,
-0.03565791994333267,
-0.02274908684194088,
0.08842063695192337,
-0.11465861648321152,
-0.014164719730615616,
-0.16709230840206146,
0.2880649268627167,
-0.29083046317100525,
-0.5769155025482178,
-0.07498202472925186,
0.7387964129447937,
-0.1804227977991104,
0.105045542... | |
`delete` keyword we all learned to cherish and love. So, yeah, make sure you follow Microsoft's directives on managing their COM objects you acquire by querying various *creation functions* (equivalents of constructors) which will fill your interface pointers with addresses to actual initialized COM component instances... | [
0.20327439904212952,
-0.07930213212966919,
0.49666035175323486,
0.2861262261867523,
-0.0015536233549937606,
-0.12367518991231918,
0.14133043587207794,
0.29525142908096313,
-0.06479091197252274,
-0.6615742444992065,
-0.2753041088581085,
0.5879443287849426,
-0.2451464980840683,
0.48862805962... | |
it's their way of implementing the usual interface-driven code which in pure C++ is done by abstract classes and happy fun time with vtables and inheritance which drive the notion of polymorphism. But, you must be curious why simply not use C++? You see, DirectX, which is quite old by birth ( think 1994./1995.), around... | [
0.09965578466653824,
0.13382607698440552,
0.3092559576034546,
0.09043392539024353,
-0.3481695353984833,
0.10851500183343887,
-0.3107254207134247,
0.5222963094711304,
-0.24901613593101501,
-0.5452099442481995,
0.06280726194381714,
0.5189850926399231,
-0.40978649258613586,
0.1647503823041916... | |
saw potential to extend this a bit more. The reasoning argued to enable creation of various resources in a form of COM components which would respond to a standardized interface accessible through a language in which a COM component makes its debut to solve problems. That way, Microsoft could encapsulate a lot of their... | [
0.27088597416877747,
-0.022291094064712524,
0.03559936583042145,
0.2863026261329651,
-0.1746917963027954,
0.16020521521568298,
-0.0867324098944664,
-0.001316749257966876,
-0.2861069142818451,
-0.5347305536270142,
-0.025757694616913795,
0.34626030921936035,
-0.10303729772567749,
0.073482424... | |
grown on its basis to provide cross-process cooperation and accessing vice-versa. It also features various problems which relate to all sorts of development problems that arise with OS development and shared functionality (like reusable interactions, the open file dialogue is a famous example). Naturally, DirectX (and,... | [
0.272563636302948,
-0.053929347544908524,
0.5074912905693054,
0.16129876673221588,
-0.15542346239089966,
0.08140112459659576,
-0.3103099763393402,
0.10228393971920013,
-0.2674435079097748,
-0.8763647079467773,
0.13714560866355896,
0.483609676361084,
-0.3861665427684784,
0.6066589951515198,... | |
unified function call which requires GUID identification, a pointer to your interface pointer and get back a working D3D10 device based on the description you gave it. That's why you also provide the actual pointer as an LPVOID (or basically saying here are the bytes, do what you have to). If your usage is correct, und... | [
-0.17686747014522552,
-0.08108467608690262,
0.8902826905250549,
0.08749394863843918,
0.09163126349449158,
-0.041638825088739395,
-0.3750340938568115,
-0.1623428761959076,
-0.2995636761188507,
-0.4584318697452545,
-0.21080425381660461,
0.8319072723388672,
-0.40610256791114807,
0.04676194116... | |
those components usually get shoved into a bunch of DLLs which have been "rendered" for proper versioning without problems. And you get a decent API implementation which, truth be told, isn't that bad. It's actually kind of pretty.
### *"Difference"* between .NET and COM
Today, some of its primary features might be c... | [
0.12932181358337402,
-0.035889167338609695,
0.26817673444747925,
-0.06889944523572922,
-0.3431023359298706,
-0.10605502128601074,
-0.00519779184833169,
0.43145304918289185,
-0.49002912640571594,
-0.759435772895813,
0.13786879181861877,
0.6146787405014038,
0.0009104287601076066,
0.331778794... | |
while the .NET framework has been intentionally developed to offer a cross-language standard platform for all sorts of developers working for Windows. COM's potential was seen after it had initially been implemented. .NET was driven by the potential and the need.
Such a decision was logical for a platform widespread a... | [
0.05438932403922081,
0.15411847829818726,
0.060836851596832275,
0.31197598576545715,
-0.18861299753189087,
-0.31393322348594666,
0.3120453953742981,
-0.09142964333295822,
-0.11629684269428253,
-0.5523493885993958,
-0.21593593060970306,
0.4465986490249634,
-0.2916622459888458,
-0.0986948981... | |
to external functions which were actually written in C/C++ which is faster (pow() is an example of this).
More to the point, .NET not only *outruns* COM (if they have to "compete", it's almost pointless), but they are fundamentally different in the way they do things. That's why Microsoft has made various ways to conn... | [
0.3289968967437744,
-0.002127448795363307,
0.017582271248102188,
0.15858939290046692,
-0.35526540875434875,
0.03813266381621361,
0.04649016633629799,
0.2222675085067749,
-0.2586844861507416,
-0.5781506299972534,
0.04893654212355614,
0.6719225645065308,
-0.19442406296730042,
-0.014938999898... | |
intuitive understanding. Hope it helps and happy coding. And try not to create stuff in the render function, especially if you're responsible for its memory management. | [
0.09532496333122253,
0.22646218538284302,
-0.09933554381132126,
0.3536752462387085,
0.07939562946557999,
0.0697295069694519,
0.3977155387401581,
0.5924389958381653,
0.060697708278894424,
-0.8719676733016968,
-0.047234565019607544,
0.6795909404754639,
0.34281399846076965,
-0.463544875383377... | |
In 2 java classes , If class A implements Serializable and class B extends A, then by default is Class B Serializable also? From what I understand, it is.
Yes. This follows from the concept of inheritance in Java. Since A is serializable and B extends A, B is serializalbe. Worth noting, notice that B is not "Default" S... | [
-0.06775251030921936,
-0.19014233350753784,
-0.09742407500743866,
-0.1584273725748062,
-0.05236421898007393,
-0.41520607471466064,
0.17252670228481293,
-0.1134793683886528,
-0.324856698513031,
-0.607631266117096,
-0.2145838886499405,
0.38142290711402893,
-0.5364967584609985,
0.114641398191... | |
Where/how does Apples GCC store DWARF inside an executable?
I compiled a binary via `gcc -gdwarf-2` (Apples GCC). However, neither `objdump -g` nor `objdump -h` does show me any debug information.
Also libbfd does not find any debug information. (I asked on the binutils-mailinglist about it [here](http://sourceware.o... | [
-0.2937292158603668,
0.5284925699234009,
0.27734678983688354,
-0.33534419536590576,
-0.3159458339214325,
-0.016890941187739372,
0.7356881499290466,
0.22361111640930176,
-0.36632490158081055,
-0.5307386517524719,
-0.2900421619415283,
0.4367724359035492,
-0.2935464680194855,
0.30742731690406... | |
the program executable so having the linker process all of the debug info and include it in the executable binary was a serious detriment to link times. For iterative development - compile, link, compile, link, debug, compile link - this was a real hit.
Instead, the compiler generates the `DWARF` debug information in ... | [
-0.053195271641016006,
0.24273183941841125,
0.2575392723083496,
0.18872608244419098,
0.013427067548036575,
0.00891197845339775,
0.3310472369194031,
-0.022741731256246567,
-0.012762508355081081,
-0.4351384937763214,
-0.4033941328525543,
0.4620661437511444,
-0.33044004440307617,
0.2358558773... | |
and processes all of the DWARF in the .o files as-needed, remapping the symbols as per the debug map's instructions.
`dsymutil` can be thought of as a debug info linker. It does this same process -- read the debug map, load the DWARF from the .o files, relocate all the addresses -- and then outputs a single binary of ... | [
-0.10654093325138092,
-0.11379116773605347,
0.5888925194740295,
0.04992854222655296,
-0.35784071683883667,
-0.14237849414348602,
0.16174961626529694,
-0.01992446556687355,
-0.20557762682437897,
-0.6850517988204956,
-0.5485143065452576,
0.31589198112487793,
-0.09181773662567139,
0.207518488... | |
that makes all of this work, the UUIDs included in Mach-O binaries. Every time the linker creates a binary, it emits a 128-bit UUID in the LC\_UUID load command (v. `otool -hlv` or `dwarfdump --uuid`). This uniquely identifies that binary file. When `dsymutil` creates the dSYM, it includes that UUID. The debuggers will... | [
-0.10934311896562576,
-0.04686633497476578,
0.7801746129989624,
0.2070624679327011,
0.1255325824022293,
-0.28744250535964966,
0.09436385333538055,
-0.078461192548275,
-0.17324312031269073,
-0.7059347033500671,
-0.25823089480400085,
0.49473389983177185,
-0.3046649694442749,
0.32900261878967... | |
use to search for them, e.g.
`mdfind "com_apple_xcode_dsym_uuids == E21A4165-29D5-35DC-D08D-368476F85EE1"`
if the dSYM is located in a Spotlight indexed location. You can even have a repository of dSYMs for your company and a program that can retrieve the correct dSYM given a UUID - maybe a little mysql database or s... | [
0.18105080723762512,
0.10493617504835129,
-0.011723893694579601,
0.2882412075996399,
-0.06060437113046646,
-0.15794159471988678,
0.18395255506038666,
0.3911796510219574,
-0.3429126739501953,
-0.6439688801765442,
-0.21682493388652802,
0.2227683663368225,
-0.29909902811050415,
0.553134024143... | |
.o files have the DWARF, and when `dsymutil` is run these are combined to create the dSYM bundle.
If you want to see the debug map entries, do `nm -pa executable` and they're all there. They are in the form of the old stabs `nlist` records - the linker already knew how to process stabs so it was easiest to use them -... | [
-0.17718584835529327,
-0.13515479862689972,
0.4041760563850403,
0.00485279131680727,
0.04617184028029442,
-0.06490150839090347,
0.038746606558561325,
0.23244664072990417,
-0.18692146241664886,
-1.016934871673584,
-0.3144490420818329,
0.0927267000079155,
-0.15637150406837463,
0.224679142236... | |
I'm trying to setup NServiceBus in Azure. During local development I am using the storages queues and when deployed in the cloud I am using the Azure Service Bus. For some reason when an error occurs, messages are not moved to the error queue. In fact, the error queue isn't even created.
In my Web.config file I have t... | [
0.031040780246257782,
0.040350861847400665,
0.14944693446159363,
-0.007179319858551025,
-0.05940229073166847,
-0.0683702677488327,
0.3880048990249634,
0.26298773288726807,
-0.24491922557353973,
-1.2306345701217651,
0.23947155475616455,
0.46015673875808716,
-0.21065343916416168,
0.117352284... | |
work.
My first guess is that the error queue can not be created as captials in the name are not allowed
If that doesn't work, we'll have to do a more thorough ananlysis, but that would require a little more information from the logs.
Hope this helps | [
0.711811363697052,
-0.007217079866677523,
0.2509373426437378,
0.42097437381744385,
0.37372836470603943,
-0.3014099597930908,
0.5314119458198547,
0.27986419200897217,
-0.2572665214538574,
-0.5016523003578186,
-0.034624986350536346,
0.4998728930950165,
-0.07797851413488388,
-0.16290652751922... | |
I have a lot of strings containing custom tags:
```
hello {RT|12} world {RT|465} this is {RT|13243}a string with{RT|13}examples
```
I need a regex to filter out all numbers of tags of the form {RT|xx} with xx being a number of any possible length. Since I'm not that good with regex, I've been trying the following:
... | [
0.3966849744319916,
0.012331575155258179,
0.23411619663238525,
-0.08329009264707565,
-0.10082414001226425,
-0.09545141458511353,
0.27126607298851013,
-0.31086844205856323,
-0.08396503329277039,
-0.7303367257118225,
0.12218465656042099,
0.6051086187362671,
-0.45305123925209045,
-0.070194937... | |
so:
`[gradientLayer setMask:shapeLayer];` | [
-0.1593077927827835,
-0.274598628282547,
0.5264361500740051,
-0.19355931878089905,
-0.13401193916797638,
0.32357776165008545,
-0.24963200092315674,
-0.3633962869644165,
0.14963413774967194,
-0.6721932291984558,
-0.07030478864908218,
0.4329758882522583,
-0.0523563027381897,
-0.0552952662110... | |
I changed my nib file by editing the info.plist file, and set the File's Owner to my class extending NSViewController, but now it gives me above error:
> Running…
> 2012-04-06 15:11:45.552 Rooster[1251:a0f] Unable to load nib file: RoosterView.xib, exiting
>
>
>
> ```
> Debugger stopped.
> Program exited with stat... | [
0.19977730512619019,
0.25873953104019165,
0.20530299842357635,
-0.05557997152209282,
0.034207530319690704,
-0.030317623168230057,
0.4452764093875885,
-0.14564074575901031,
-0.06908196955919266,
-0.5784566402435303,
0.16629523038864136,
0.5254323482513428,
-0.17758937180042267,
0.3311780691... | |
(which I take to be a `NSViewController` subclass), load your RoosterView.xib using `NSViewController`'s `– initWithNibName:bundle:` method.
Finally, in your revived MainMenu.xib, add an Custom View object to your window. Make the Custom View's class that of your RoosterView.
Good luck to you in your endeavors. And i... | [
0.4937260150909424,
0.06677839905023575,
0.220551535487175,
0.05652790889143944,
-0.16649694740772247,
-0.1148194819688797,
0.4821326434612274,
0.45982471108436584,
0.051071006804704666,
-0.8243098258972168,
-0.019561322405934334,
0.8247144818305969,
-0.08646481484174728,
0.093728490173816... | |
I have a client. Let's say their domain is www.mydomain.com.
We are creating a new page at www.mydomain.com/newsection.
On the /newsection page, the client would like to add a link that says "Go back to main site" (www.mydomain.com) ONLY if the user was previously on the main site before.
So, I set up a code snippe... | [
0.5306153893470764,
0.12626492977142334,
0.8680000305175781,
-0.3458694517612457,
-0.1492186188697815,
-0.3002282381057739,
0.26342877745628357,
0.05647002160549164,
-0.25445884466171265,
-0.4297805428504944,
0.10433473438024521,
0.08196474611759186,
-0.08470377326011658,
0.693991422653198... | |
not getting?
Is the issue that my new page (www.mydomain.com/newsection) is still on that main domain?
The slashes in the expression need to be escaped because they're also the delimiter. Alternatively, you can choose another delimiter:
```
preg_match('~http://www\.mydomain\.com~', $referral)
```
Note I also escape... | [
0.3776620328426361,
-0.2500438392162323,
0.8251160979270935,
0.14306144416332245,
-0.013318458572030067,
-0.16047269105911255,
0.4273214340209961,
0.28522396087646484,
-0.32458218932151794,
-0.32767266035079956,
-0.2938723862171173,
0.4506461024284363,
-0.2500055134296417,
0.35106658935546... | |
I have following rather simple query
```
select count(*) from tbl t1, tbl t2
```
For some reason it takes tens of seconds to execute this command. I wonder why it happens? It seems that it builds Cartesian product of that tables (table has about 270k rows), but amount of rows is obvious without building product.
So... | [
0.09256637096405029,
0.041478466242551804,
0.30919280648231506,
0.03409717604517937,
-0.33267268538475037,
0.1179446429014206,
0.119185671210289,
-0.3730698525905609,
-0.21678157150745392,
-0.748744010925293,
0.1220329999923706,
0.32036131620407104,
-0.21744239330291748,
0.1355320215225219... | |
tbl
```
and build the product yourself.
(I assume that you have a more useful case in mind than the rather senseless self-join you posted :-), please add some more info on what you want to achieve.) | [
0.730379581451416,
0.10294139385223389,
-0.007355821318924427,
0.18848156929016113,
0.08550389111042023,
-0.0629248395562172,
0.2727804481983185,
0.1775834709405899,
0.18281465768814087,
-0.5345237851142883,
-0.12042476236820221,
0.5697809457778931,
-0.17164595425128937,
-0.126887097954750... | |
I want to format monetary values in my `DataGrid` so that they start with the dollar sign (`$`).
How can I do this?
If you're talking about showing the data in a monetary format, or even simply adding a "$" to the beginning of data so that
1.49
displays as
$1.49
then you can do this in several ways. On a DataGri... | [
0.37337741255760193,
0.0843101292848587,
0.7290657758712769,
0.20172816514968872,
-0.06013021618127823,
0.06745448708534241,
-0.40974152088165283,
-0.1404956728219986,
-0.18555736541748047,
-0.5256578922271729,
0.1847521811723709,
0.2626846134662628,
0.030851678922772408,
0.418831974267959... | |
HeaderText="Price"
DataFormatString="{0:c}">
```
Another option is to use a CustomFormatString, which gives you more refined control over how it's displayed. Say you always want it to be EXACTLY three digits to the right of the decimal and EXACTLY two digits to the left, you can use
{0:$00.000}
Mo... | [
0.4567013382911682,
-0.180965393781662,
0.2888149917125702,
0.2147785723209381,
-0.14322878420352936,
-0.11118806153535843,
-0.20498937368392944,
-0.2134905308485031,
-0.3014358878135681,
-0.39169415831565857,
0.16813495755195618,
0.5272844433784485,
-0.04779230058193207,
-0.13439387083053... | |
it to the column's DefaultCellStyle as shown here: <http://msdn.microsoft.com/en-us/library/f9x2790s.aspx>
```
dataGridView1.Columns["UnitPrice"].DefaultCellStyle.Format = "c";
``` | [
-0.195474773645401,
0.008167051710188389,
0.9589410424232483,
0.05022905021905899,
0.26719585061073303,
0.1486361175775528,
0.09860840439796448,
0.07984493672847748,
-0.17037536203861237,
-0.26504799723625183,
-0.5088070631027222,
0.09376907348632812,
-0.2530398964881897,
0.256665885448455... | |
I'm really confused so I hope you guys can help me. I know how to access the API with an app since I have all those information like app secret and API key. But what should I do with a standard page? Like <https://www.facebook.com/NASAKennedy>
We created many pages that are not apps. I couldn't find any API informati... | [
0.8071384429931641,
0.25488045811653137,
0.2187911868095398,
0.4608640968799591,
-0.16333545744419098,
-0.08835728466510773,
0.293405145406723,
0.16943004727363586,
-0.2836703360080719,
-0.7070898413658142,
0.18724305927753448,
0.6751862168312073,
0.33474913239479065,
0.10236921161413193,
... | |
I created this regex to match all words that start with "@" in my string, there could be something before the @ tokens as well. it works well but it also catches email addresses and i would like to fix that.
```
(?<=@)\w+\b
```
Example string would be:
> hello @bob, how are you? @mark, @emma and @chief are with me.... | [
0.3674212396144867,
0.17442725598812103,
0.32198435068130493,
-0.053422167897224426,
-0.06430487334728241,
0.24495543539524078,
0.6217039227485657,
-0.027267329394817352,
-0.08636347949504852,
-0.6637216806411743,
0.20536485314369202,
0.4544106721878052,
-0.1813298910856247,
-0.20114162564... | |
I'm trying to get the current user login status via javascript sdk but I get the following error:
> FB.getLoginStatus() called before calling FB.init()
Here is my code:
```
<div id="fb-root"></div>
<script>
window.fbAsyncInit = function() {
FB.init({
appId : '000000000000000000', // App ID
sta... | [
0.09528730809688568,
0.059674475342035294,
0.7032869458198547,
-0.1849716603755951,
0.12145780026912689,
0.0017996326787397265,
0.41698819398880005,
0.07361141592264175,
-0.20387807488441467,
-0.9646479487419128,
-0.04231272637844086,
0.47570309042930603,
-0.4550226032733917,
0.10705024749... | |
: true // parse XFBML
});
console.log(FB.getLoginStatus); //THIS DOESN'T WORK!!
};
// Load the SDK Asynchronously
(function(d){
var js, id = 'facebook-jssdk', ref = d.getElementsByTagName('script')[0];
if (d.getElementById(id)) {return;}
js = d.createElement('script'); js.id = id; j... | [
0.2184707224369049,
-0.20556508004665375,
0.5899453163146973,
-0.14364704489707947,
0.07843780517578125,
-0.15173128247261047,
0.6440662741661072,
-0.3774982690811157,
0.09003889560699463,
-0.4864698052406311,
-0.5668804049491882,
0.4111489951610565,
-0.30791038274765015,
-0.00601759832352... | |
quick google turned up this [How to detect when facebook's FB.init is complete](https://stackoverflow.com/questions/3548493/how-to-detect-when-facebooks-fb-init-is-complete) | [
-0.11533216387033463,
-0.4140421152114868,
0.4210304617881775,
0.1706593930721283,
-0.06538338959217072,
-0.4546556770801544,
0.4773544669151306,
0.12149035185575485,
-0.08388656377792358,
-0.4516444802284241,
-0.14545133709907532,
0.23573051393032074,
-0.12693503499031067,
-0.620041131973... | |
im writing a script to get services from local and remote machines. I've had to split the wmi call for local and remote machines (remote machines require different credentials). I want to output them as System.Object. How do i create a function for the output of system.object?
heres the code i have so far:
```
$objS... | [
0.21237540245056152,
0.005619727540761232,
0.4002770483493805,
-0.2598661184310913,
0.07026950269937515,
0.4313723146915436,
0.5878802537918091,
-0.2220635563135147,
-0.1897023618221283,
-0.921191930770874,
0.06217683106660843,
0.5303976535797119,
-0.4430809020996094,
0.19326026737689972,
... | |
{
$objService = New-Object System.Object
$objService | Add-Member -MemberType NoteProperty -Name SystemName -Value $Services.SystemName
$objService | Add-Member -MemberType NoteProperty -Name Name -Value $Services.Name
$objService | Add-Member -MemberTyp... | [
-0.7170999646186829,
0.3546774685382843,
0.48027145862579346,
-0.3766317367553711,
0.0904635488986969,
0.3896241784095764,
0.3993726670742035,
0.1734105497598648,
-0.5170373916625977,
-0.76860111951828,
-0.3960895538330078,
-0.08249121159315109,
-0.35951581597328186,
0.25858038663864136,
... | |
$objService | Add-Member -MemberType NoteProperty -Name StartName -Value $Services.StartName
$objService | Add-Member -MemberType NoteProperty -Name Status -Value $Services.Status
#$objServiceCol += $objService
AddServiceObjects += $objService
} | [
-0.6342166662216187,
0.3507533073425293,
0.567214846611023,
-0.28392741084098816,
-0.0018518312135711312,
0.40589848160743713,
0.44610416889190674,
0.30379870533943176,
-0.39541324973106384,
-0.8110215067863464,
-0.4411497116088867,
0.09219997376203537,
-0.4176935851573944,
0.1632778197526... | |
}
# Executes local WMI
If ($Servers -contains "localhost")
{
$Services = Get-WMIObject Win32_Service -ComputerName "localhost" | Select-Object SystemName, Name, StartMode, StartName, Status
AddServiceObjects $Services
}
...#execute remote wmi...
```
In .NET, System.Object is the root... | [
0.06147470325231552,
-0.27793699502944946,
0.3160361349582672,
0.019786788150668144,
0.3703456223011017,
-0.15178611874580383,
0.5134302973747253,
-0.1204291507601738,
-0.24883727729320526,
-0.7444556951522827,
-0.2509525418281555,
0.4628159999847412,
-0.38359877467155457,
0.46023365855216... | |
in $Services)
{
New-Object psobject -Property @{
SystemName = $service.SystemName
Name = $service.Name
StartMode = $service.StartMode
StartName = $service.StartName
Status = $service.Status | [
-0.13997957110404968,
-0.13140925765037537,
0.3414749503135681,
-0.23055455088615417,
0.3341439366340637,
0.2025156021118164,
0.50450599193573,
-0.025380877777934074,
-0.23670269548892975,
-0.938635528087616,
-0.4783184230327606,
0.33672502636909485,
-0.1394510418176651,
0.3639790415763855... | |
}
}
}
```
Note that by virtue of not assigning the `New-Object` output to a variable it will get output from the function - one object for every iteration through the loop. Also note that your foreach iteration variable was `$service` but your were referencing the global `$Services` in your `New-Object` command. | [
-0.13418743014335632,
-0.19687087833881378,
0.26517248153686523,
-0.32755887508392334,
0.1616867482662201,
-0.06291114538908005,
0.350506991147995,
0.16816557943820953,
-0.13113687932491302,
-0.6087459325790405,
0.19529074430465698,
0.5880740284919739,
-0.3567337691783905,
0.23893819749355... | |
I have rm -i inside a for loop but when I run it, it prints the question ("do you want to delete this?) but doesn't stop to let me answer.
```
find .. -name "*.tex" | while read line; do
printf "${line%%tex}""aux" | xargs rm -i
done
```
How do I fix this?
Also I was originally trying to do it by using exec like... | [
-0.1033022329211235,
0.22640717029571533,
0.5584157705307007,
-0.2698938548564911,
0.011591318994760513,
-0.24868611991405487,
0.5016348361968994,
-0.15854619443416595,
-0.13806034624576569,
-0.24687664210796356,
0.13257622718811035,
0.8940846920013428,
-0.584570050239563,
0.23829787969589... | |
if you have a single argument, but you do need to access the original tty somehow while inside the loop. The above works on Linux, there are probably similar tricks on other systems.
Another (possibly more portable) way to do this is to "save" `stdin` before entering the while loop (assuming you're not using fd 9 for ... | [
-0.08028967678546906,
-0.23759382963180542,
0.5170925855636597,
-0.089192695915699,
0.13443449139595032,
-0.049297161400318146,
0.3700280487537384,
-0.0247290451079607,
-0.06071614474058151,
-0.3340096175670624,
-0.2935344874858856,
0.8983151316642761,
-0.2934023141860962,
-0.0081175463274... | |
was outside the loop. | [
0.26808443665504456,
-0.0678463876247406,
-0.03907070681452751,
0.2447122484445572,
-0.03780701383948326,
-0.45659953355789185,
0.21266977488994598,
0.23668766021728516,
0.06483884900808334,
-0.024072399362921715,
0.15717680752277374,
0.07879290729761124,
-0.16532306373119354,
0.0357902795... | |
Is there a simple description of how the dictionary file in Proguard should be structured?
I've read about `-?obfuscationdictionary`, but I couldn't find anything about the files themselves.
Besides, I'd like to change the naming scheme to something more complex, and not just `a`, `b` etc. and `paramX`, `paramY`... I... | [
0.3168635964393616,
-0.020594758912920952,
0.15120835602283478,
0.0869864821434021,
-0.3614717125892639,
0.32061874866485596,
0.27591267228126526,
-0.18090622127056122,
-0.12326400727033615,
-0.4523087441921234,
0.003995667211711407,
0.5333675146102905,
-0.2946182191371918,
-0.012479578144... | |
dictionary of random strings, you could write a simple program to generate them and dump them to a text file, or use <http://www.random.org/strings> which has a nice simple web interface for creating random strings. It spits them out one per line, so you could use its output directly as your dictionary file.
Here's so... | [
0.18785706162452698,
0.06318192929029465,
0.03757527098059654,
0.013658321462571621,
-0.4770090579986572,
0.16137011349201202,
-0.02975301817059517,
-0.038295477628707886,
-0.07935230433940887,
-0.5161312818527222,
0.1939329355955124,
0.17930391430854797,
-0.556995153427124,
0.045459304004... | |
automatically replace reserved keywords, and the effect can fairly simply be
# undone by obfuscating again with simpler names.
# Usage:
# java -jar proguard.jar ..... -obfuscationdictionary keywords.txt
#
do
if
for
int
new
try
byte
case
char
else
goto
long
this
void
break
catch
class
const
final
float
short
super
... | [
0.1771003007888794,
-0.18450422585010529,
0.3440302312374115,
-0.23047436773777008,
0.08824671804904938,
-0.2568187713623047,
0.34341707825660706,
-0.4616430103778839,
-0.12570016086101532,
-0.2754865288734436,
-0.2699592709541321,
0.8044863343238831,
-0.5586714148521423,
-0.00247182766906... | |
I have created two functions that sum and subtract the numeric values of two chars and return the char of the result in PHP. It's something like this:
```
function sumchars($c1, $c2) {
return chr(ord($c1) + ord($c2));
}
function subchars($c1, $c2) {
return chr(ord($c1) - ord($c2));
}
```
Well, I also create... | [
0.06316132843494415,
0.16354310512542725,
0.41581568121910095,
-0.23634591698646545,
-0.3423886001110077,
0.10357777774333954,
0.052661944180727005,
-0.2750696539878845,
-0.10957752913236618,
-0.2272217720746994,
0.14176033437252045,
0.42654967308044434,
-0.2738264203071594,
0.223919034004... | |
knows how to treat results that are outside the ASCII range (greater than 255) and also those that are negative (less than 0). Not the same happens in Java (where instead of a function I just cast the integer result). I know that I could create a simple function for that but I wonder if there's already one. I want thes... | [
-0.07688047736883163,
0.3169477581977844,
0.10955823957920074,
0.25451183319091797,
0.15597620606422424,
-0.19186048209667206,
0.40719130635261536,
-0.22547295689582825,
-0.13230952620506287,
-0.47832921147346497,
0.3346676826477051,
0.7579236626625061,
-0.04152528569102287,
-0.22268143296... | |
that result by 256 to make sure it's not larger than 256. ( alternatively, use `if else` statements ).
```
public static String sumchars(char c1, char c2) {
return (char)((((int)c1 + int(c2)) + 256) % 256);
}
public static String subchars(char c1, char c2) {
return (char)(((int)c1 - int(c2)) + 256) % 256);
}
... | [
-0.18432742357254028,
0.046525098383426666,
0.4352130889892578,
-0.32096344232559204,
0.11454976350069046,
0.1516997218132019,
0.3052469491958618,
-0.5963102579116821,
-0.37100502848625183,
-0.14066967368125916,
-0.5600179433822632,
0.3822101950645447,
-0.23331032693386078,
0.0872548297047... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.