text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
I have an application in C++ and C# (both of them in the same project). In some scenario (not reproducible every time) the application crashes and I can't see any reason to this crash.
I added a try..catch block to every place that can cause the crash - I even added a try..catch to the 'Program.cs' code that should c... | [
0.3645226061344147,
0.06757064908742905,
0.11294239014387131,
0.1769905686378479,
0.1096777692437172,
-0.12080144882202148,
0.303304523229599,
0.18398532271385193,
-0.3669905662536621,
-0.7899990677833557,
-0.27099770307540894,
0.25643181800842285,
-0.30690521001815796,
0.09867942333221436... | |
WinDbg). Then check the call stack for clues. | [
-0.13612131774425507,
-0.06869781017303467,
0.7107943296432495,
-0.09214586019515991,
0.05193088576197624,
-0.24855518341064453,
0.536228597164154,
-0.34209269285202026,
-0.23747393488883972,
-0.4189487099647522,
-0.2653610408306122,
0.4222926199436188,
0.0477280467748642,
0.05508738383650... | |
Is there way to set `@include mixin();` to variable?
I tried this
```css
@mixin bg-gradient($fallback, $type, $positionX, $positionY, $from, $from-percent, $to, $to-percent){
background: $fallback;
background: -webkit-#{$type}-gradient($positionX $positionY, $from $from-percent, $to $to-percent);
backgroun... | [
0.0509420670568943,
-0.18039359152317047,
0.4822103679180145,
0.0009847559267655015,
0.16797903180122375,
0.2585434913635254,
0.1289159059524536,
-0.10830658674240112,
0.004442716017365456,
-0.3161867558956146,
0.05764380097389221,
0.44548937678337097,
-0.32371291518211365,
-0.136652678251... | |
settings on that particular type of gradient, you could write a wrapper mixin for it:
```
@mixin navBg() {
@include bg-gradient(#eee, radial, top, center, #999, 0%, #555, 100%);
}
body { @include navBg; }
```
**Edit**:
[Here](http://sass-lang.com/docs/yardoc/file.SASS_REFERENCE.html#variables_)'s a list of data... | [
0.29787611961364746,
0.022974282503128052,
0.2345820963382721,
-0.19733205437660217,
-0.1432710736989975,
0.24338524043560028,
0.29339560866355896,
-0.4688494801521301,
0.13869312405586243,
-0.40513351559638977,
-0.1222643181681633,
0.18165451288223267,
-0.41671499609947205,
0.000464956479... | |
Table1
```
ID Loc
-----------
001 null
002 null
003 PYD
004 null
....
```
Table2
```
ID Loc
-----------
001 TMB
002 null
003 PYD
004 SHD
....
```
I want to update table1 from table2. I'd need something like this:
```
update table1 set LoC = Select LoC from table2
```
And the exp... | [
-0.39004945755004883,
0.1851194202899933,
0.4073019325733185,
-0.24956859648227692,
0.062109898775815964,
0.1745719462633133,
-0.07885821163654327,
-0.34873196482658386,
-0.4321332275867462,
-0.5372927188873291,
-0.25383320450782776,
0.5815516114234924,
-0.3749900758266449,
-0.301470965147... | |
table1 t
inner join table2 t2 on t.id =t2.id
``` | [
-0.18614022433757782,
0.09325233101844788,
0.21551966667175293,
-0.21633540093898773,
-0.044532693922519684,
0.07083714753389359,
0.005686159711331129,
-0.25363582372665405,
-0.19143788516521454,
-0.7122320532798767,
-0.3351692855358124,
0.30408281087875366,
-0.32979902625083923,
-0.069662... | |
I have a querydict that looks like the following:
```
<QueryDict: {u'{"content":"aa","id":"1"}': [u'']}>
```
How would I extract out `id`?
I have tried doing `queryDictExample.get("id")`, but it didn't work.
It seems like your client is posting JSON rather than formencoded data. Instead of accessing `request.POST`,... | [
0.2503056526184082,
-0.06025107949972153,
0.5113633275032043,
-0.026051096618175507,
-0.5428153276443481,
-0.046134669333696365,
0.2127736359834671,
-0.2007780373096466,
0.002377358265221119,
-0.6511517763137817,
-0.05285760387778282,
0.46161043643951416,
-0.30111339688301086,
0.1212145537... | |
So I have been battling with this for some time and I need your help with it. I added the licensing code to my application, uploaded the application but didn't publish it. so I think it is called a "draft" now. I need to test licensing before making it available. I am using my google account (publisher account) in my p... | [
0.7853094339370728,
0.3064285218715668,
0.3737149238586426,
0.14925995469093323,
0.09593156725168228,
-0.47310400009155273,
0.30498528480529785,
-0.362372487783432,
-0.0210280679166317,
-0.7268338203430176,
0.34193938970565796,
0.45414865016937256,
0.05871117487549782,
0.1926547884941101,
... | |
to the edit profile and made the static code to be not licensed. However, I still keep getting the "licensed OK". I tried removing the app, and rerunning it but same answer.
PLEAAAAE help me, how can I test all the conditions? I keep getting the same status code over and over again
Thank you
Anyone? Comon, there have... | [
0.9341508150100708,
0.27057093381881714,
0.5545121431350708,
0.20079457759857178,
-0.22087211906909943,
-0.264082670211792,
0.5028780102729797,
-0.05330821871757507,
-0.33230680227279663,
-0.13278447091579437,
0.34068533778190613,
0.6585869193077087,
-0.09173433482646942,
-0.00399895012378... | |
account to the website.Hope it helps someone | [
0.5491152405738831,
0.2197009176015854,
0.014898324385285378,
0.1615878790616989,
0.11553842574357986,
-0.21509002149105072,
0.5030903220176697,
0.6180869936943054,
-0.20813243091106415,
-0.5138413310050964,
0.23187726736068726,
0.11707379668951035,
0.5204681158065796,
-0.09688279777765274... | |
I have an interface (called `Subject`) that has the following method:
```
public void addObserver(Observer o);
```
I then have another interface that extends `Subject` called `TimerSubject`. This interface is a more specific version of `Subject`, used for timing. It has a few other miscellaneous methods.
There are ... | [
0.27750903367996216,
-0.018305305391550064,
0.3891671299934387,
-0.04558485373854637,
-0.14124467968940735,
-0.1061282679438591,
0.025599146261811256,
-0.3675086200237274,
-0.08200519531965256,
-0.8159083127975464,
-0.019267188385128975,
0.5398619174957275,
-0.5963738560676575,
0.145976424... | |
addObserver(**TimerObserver e**) {
observers.add(e);
}
```
This does not work, since the arguments are not the same as the arguments from the method being overridden.
So is there a way to override a method with arguments that are polymorphic?
A few solutions come to mind:
Your TimerSubject implementation could ... | [
0.15234878659248352,
-0.10763264447450638,
0.09334587305784225,
-0.011875766329467297,
0.011335749179124832,
-0.1728147268295288,
0.3029465079307556,
-0.4131928086280823,
-0.1412348747253418,
-0.5481296181678772,
0.052075739949941635,
0.5569103360176086,
-0.9145896434783936,
0.045940257608... | |
Presumably your TimerSubject extends a Subject which already has an implementation of addObserver(Observer); if that implementation would be entirely defunct, you can override and throw an error. But if TimerSubject really has no use for an addObserver(Observer) method and that method is entirely defunct, then perhaps ... | [
0.21229703724384308,
-0.04206198453903198,
0.05332052707672119,
0.08371911197900772,
-0.024950550869107246,
-0.20724605023860931,
0.09605163335800171,
-0.03448791429400444,
-0.3026147186756134,
-0.5287076234817505,
0.012409819290041924,
0.3040248453617096,
-0.5570873618125916,
0.0054231621... | |
I have a link button inside UpdatePanel in a div popup. On Button\_Click, I wish to open a new window through javascript.
I tried both ScriptManager.RegisterStartupScript as well as ScriptManager.RegisterClientScriptBlock, but Window doesn't open.
```
<asp:UpdatePanel ID="UpdatePanel2" runat="server">
... | [
0.1753496527671814,
0.09064468741416931,
0.44012555480003357,
-0.13701976835727692,
-0.09641967713832855,
0.10275625437498093,
0.4353429675102234,
0.027216266840696335,
-0.14180094003677368,
-1.1256797313690186,
0.1411382555961609,
0.31525954604148865,
-0.13449792563915253,
0.1299519985914... | |
class="message-form" action="#">
<fieldset>
<asp:LinkButton ID="LinkButton1" runat="server" class="btn-facebook" Text="facebook" OnClick="LinkButton1_Click"></asp:LinkBu
tton>
<label for="TextBox1">Or send a message on Blissdate here:</label>
<div class="text... | [
0.021168511360883713,
-0.5664342641830444,
0.35063204169273376,
-0.09329354017972946,
-0.41001027822494507,
0.3280753195285797,
0.39881986379623413,
-0.17986002564430237,
-0.11473535746335983,
-0.5677773952484131,
-0.31098514795303345,
0.22513717412948608,
-0.27432411909103394,
-0.11779209... | |
ID="lbl" runat="server" />
</div>
<div class="btn-holder">
<asp:LinkButton ID="LinkButton2" runat="server" class="btn-send" Text="send" OnClick="LinkButton2_Click"></asp:LinkButton>
</div>
</fieldset>
</form>
```
```
protected vo... | [
0.060408253222703934,
-0.1319669485092163,
0.47761696577072144,
-0.3641924262046814,
-0.18044915795326233,
0.2326628863811493,
0.061887532472610474,
-0.35560765862464905,
-0.33324626088142395,
-0.2928908169269562,
-0.3993598520755768,
0.374555766582489,
-0.2286866456270218,
0.1512870937585... | |
EventArgs e)
{
DataRow[] row1 = ds.Tables[0].Select("FB_Id='" + HiddenField3.Value + "'");
string url = row1[0].ItemArray[3].ToString();
lbl.Text = url;
//ScriptManager.RegisterClientScriptBlock(this, GetType(), "newPage", "window.open('" + url +');", true);
Sc... | [
-0.4156513512134552,
-0.49849483370780945,
0.624815821647644,
-0.17620748281478882,
-0.024605529382824898,
0.05969374626874924,
0.43740758299827576,
-0.391389936208725,
-0.1426294893026352,
-0.5071666836738586,
-0.4839523434638977,
0.7303812503814697,
-0.06664778292179108,
-0.0785420089960... | |
var w = window.open(url, '', 'width=1000,height=600,toolbar=0,status=0,location=0,menubar=0,directories=0,resizable=1,scrollbars=1');
w.focus();
}
</script>
```
Please tell me if something is wrong with the code..
Rename your `open` function to something else. If you launch the javascript console in you... | [
0.11514236032962799,
0.15947213768959045,
0.7704125642776489,
-0.3931479752063751,
0.12767499685287476,
-0.09307223558425903,
0.5204479694366455,
-0.16338194906711578,
-0.13767790794372559,
-0.8370035290718079,
-0.5176069140434265,
0.8637391328811646,
-0.38559800386428833,
0.32924294471740... | |
I'd like to use the html5 widget + it's api (http://developers.soundcloud.com/docs/html5-widget)
My question: can tha widget be styled via CSS? FireBug shows style information, once the player is loaded, and I'm wondering, if it is possible to change those styles?
No, this isn't possible. The widget is inserted into th... | [
0.6440155506134033,
0.017417583614587784,
0.5116527676582336,
0.11397191137075424,
0.22667646408081055,
0.08161611109972,
-0.23501059412956238,
0.005792860873043537,
0.07665529102087021,
-0.7474271059036255,
0.06522147357463837,
0.7388740181922913,
0.049549832940101624,
0.14661242067813873... | |
highlights:
<http://w.soundcloud.com/player/?url=http%3A%2F%2Fapi.soundcloud.com%2Fusers%2F2&show_artwork=true&show_comments=false&color=ff00ff&show_playcount=false&liking=false>
Here's the url reformatted for legibility:
```
http://w.soundcloud.com/player/
?url=http%3A%2F%2Fapi.soundcloud.com%2Fusers%2F2
&show_artw... | [
-0.4960908889770508,
-0.1488228738307953,
0.26790907979011536,
0.0056180632673203945,
-0.44801923632621765,
-0.2319001704454422,
-0.018223920837044716,
-0.2572557330131531,
-0.5938725471496582,
-0.1934545487165451,
-0.5104802250862122,
0.6696054339408875,
0.06496435403823853,
-0.3152519166... | |
String urlString="http://myApp:8080/new/bin/save/SellerMyPage/WebHome"
i want to check whether above string contains the string "MyPage" between two forward slashes. Also it should be in the end between the slashes and should be prefixed
with some characters. here is the result i am expecting
```
"http://myApp:8080... | [
-0.14352232217788696,
0.32897916436195374,
0.8778232932090759,
-0.012740732170641422,
-0.3580681085586548,
0.009992091916501522,
0.18028311431407928,
-0.222106471657753,
-0.09942154586315155,
-0.3847857415676117,
-0.1347499042749405,
0.28340357542037964,
-0.12798023223876953,
0.29073590040... | |
return SellerMyPage
For extracting part i used below code snippet but to me iam not convinced it is optimized way. I am sure there should be better way than this?
```
String extractedElement="";
String[] urlSpliArray=urlString.split("/");
for(String urlElement:urlSpliArray)
if(urlElement.endsWit... | [
-0.1137525886297226,
-0.287265419960022,
1.0630799531936646,
-0.28932589292526245,
0.004074242431670427,
0.2488694041967392,
0.07142291963100433,
-0.38752976059913635,
0.1087203100323677,
-0.4439154863357544,
-0.38501420617103577,
0.501595675945282,
-0.3806837797164917,
0.2822698652744293,... | |
For some reason my app crashes when I run it without Xcode. When it is run through Xcode, there are no problems AT ALL. I have no idea why this is happening.
Has anyone has this happen to them?
Thanks
```
Pattern p = Pattern.compile("^.*/([^/]+MyPage)/.*");
Matcher m = pattern.matcher(urlString);
if (m.find()) {
ex... | [
0.06639552116394043,
0.002318833488970995,
0.5183700323104858,
-0.18503381311893463,
0.21815289556980133,
0.11441326886415482,
0.4488072693347931,
-0.19440773129463196,
-0.2886206805706024,
-0.6608498692512512,
-0.17737917602062225,
0.5179657340049744,
-0.6622889637947083,
-0.1137208342552... | |
How do I connect to MySQL database through two SSH hosts ?
Here is my situation: I have two SSH hosts as show below. MySQL is running in BOX2 host.
```
MyBox(MySQL GUI client) -----SSH(port 22)--->BOX1(IP: 190.xx.xx.xx)---SSH(port 22)--->BOX2(IP: 190.xx.xx.xx)[MySQL server]
```
My question is how do I connect if I ... | [
-0.20173847675323486,
0.05858580395579338,
0.3804699182510376,
-0.047677427530288696,
-0.04946279153227806,
0.10206077992916107,
0.2774166464805603,
-0.0022426836658269167,
-0.2626662254333496,
-1.0361297130584717,
0.010492658242583275,
0.36770662665367126,
-0.38107842206954956,
0.38594713... | |
listening at port 3306)
```
In tunnelling info
```
SSH host : localhost
SSH pass : ssh-password-of-Box2
SSH port : some-local-port
``` | [
-0.018671482801437378,
0.23182044923305511,
0.4002952575683594,
-0.05268683284521103,
0.12392482161521912,
-0.11436527967453003,
0.7453392148017883,
0.11433464288711548,
-0.19875310361385345,
-0.7267814874649048,
-0.4088444113731384,
0.6559770107269287,
-0.08119581639766693,
0.153943821787... | |
> **Possible Duplicate:**
>
> [Pick random property from a Javascript object](https://stackoverflow.com/questions/2532218/pick-random-property-from-a-javascript-object)
suppose I have a javascript object:
```
Config.UI.Area = {
"uuid": {
"_type": "string"
},
"frame": {
... | [
-0.019804535433650017,
-0.07183099538087845,
0.257709801197052,
-0.08262228220701218,
0.08654215931892395,
-0.04371298477053642,
-0.011573209427297115,
-0.33890771865844727,
-0.23218190670013428,
-0.6594285368919373,
-0.05283068120479584,
0.13692821562290192,
0.07248285412788391,
0.3066566... | |
"_type": "string"
}
}
```
then I want get each of the property's name,like "uuid","frame","zIndex"
by using for loop:
```
var prop=config.ui.area;
var arr=new Array()
for(var i in prop){
//do something with prop[i]?
//arr.push(prop[i].....)?
}
```
I can not directly use prop[i],it would return me ... | [
0.09288527816534042,
-0.07031888514757156,
0.5079588294029236,
-0.22262154519557953,
0.011198137886822224,
0.03736299276351929,
0.31991204619407654,
-0.6395264267921448,
-0.13841024041175842,
-0.4310711920261383,
-0.2757870554924011,
0.5296838283538818,
-0.32220903038978577,
0.351119995117... | |
prop){
if (prop.hasOwnPropery(name) {
arr.push(name);
}
}
``` | [
-0.10874639451503754,
-0.38717228174209595,
0.8849989175796509,
-0.5436971187591553,
0.3727000653743744,
0.10683734714984894,
0.19187863171100616,
-0.44092994928359985,
-0.2420799434185028,
-0.3791402280330658,
-0.4348106384277344,
0.5672606825828552,
-0.4859876036643982,
0.405741840600967... | |
The tools are opened on the bottom of the chrome window per default. This is a rather bad choice for a wide screen display since there is plenty of empty space to the right but not much vertical space to spare. Unfortunately, I have found no way to reposition the tools. I would like to have them on the side, similar to... | [
0.11934653669595718,
0.25955137610435486,
0.44317924976348877,
0.06654990464448929,
-0.1317165642976761,
-0.07341432571411133,
-0.0005032031331211329,
-0.052344899624586105,
0.0070832837373018265,
-0.878250241279602,
0.08064571022987366,
1.0586646795272827,
0.06970112770795822,
0.101660922... | |
back though, so an "integrated" solution would be nice.
Chrome 46 or newer
------------------
Click the vertical ellipsis button ( ⋮ ) then choose the desired docking option.

Chrome 45 or older
------------------
Long-hold the dock icon in the top right. It pops up an option... | [
0.02610376849770546,
-0.137494295835495,
0.6504688858985901,
-0.16133363544940948,
-0.21291279792785645,
0.27793270349502563,
-0.055936578661203384,
0.09758661687374115,
-0.3001410961151123,
-0.7203400731086731,
-0.12286729365587234,
0.6799092888832092,
-0.24998655915260315,
-0.20272156596... | |
I'm new to shell,I just learned that use (command) will create a new subshell and exec the command, so I try to print the pid of father shell and subshell:
```
#!/bin/bash
echo $$
echo "`echo $$`"
sleep 4
var=$(echo $$;sleep 4)
echo $var
```
But the answer is:
```
$./test.sh
9098
9098
9098
```
My questions are:
... | [
0.5644820928573608,
0.4648754298686981,
0.13704562187194824,
-0.48659995198249817,
0.06233741715550423,
0.14125680923461914,
0.44935154914855957,
-0.5010717511177063,
-0.02797718159854412,
-0.2818528711795807,
0.03519244119524956,
0.29620009660720825,
-0.36296868324279785,
0.25578340888023... | |
$xyzzy
hello
```
Secondly, all those `$$` variables are evaluated in the *current* shell which means they're turned into the current PID *before* any children start. The children see the PID that has already been generated. In other words, the children are executing `echo 9098` rather than `echo $$`.
If you want the... | [
-0.011566451750695705,
0.2604628801345825,
0.24155373871326447,
-0.3314749002456665,
0.16686280071735382,
-0.041829511523246765,
0.3228476941585541,
0.03773275017738342,
-0.002177865244448185,
-0.07505134493112564,
-0.42257440090179443,
0.08702009171247482,
-0.37472450733184814,
0.24752594... | |
> **Possible Duplicate:**
>
> [How to pass object from one activity to another in Android](https://stackoverflow.com/questions/2736389/how-to-pass-object-from-one-activity-to-another-in-android)
I have two activities `Activity 1` and `Activity 2`. For these two activities, I have two XML layout 1.xml and 2.xml. In ... | [
0.2463003695011139,
-0.2607268691062927,
0.5672414898872375,
-0.19846275448799133,
-0.16412046551704407,
-0.027430422604084015,
0.25835633277893066,
-0.3081323206424713,
-0.5105270147323608,
-0.940232515335083,
-0.06067788600921631,
0.3756604492664337,
-0.3930565416812897,
-0.4122523367404... | |
then this text will be displayed in `TextView`.
Note: `Button` is on Activity1 and `TextView` is on Activity2
[INTENT](http://developer.android.com/reference/android/content/Intent.html) Use `Intent` to pass data, `putExtra()` will allow you to put data
**ActivityA**
```
Intent myIntent = new Intent(ActivityA.this, ... | [
0.4292236268520355,
-0.3292357325553894,
1.0356379747390747,
-0.2592911124229431,
0.06740185618400574,
-0.061083197593688965,
0.25665780901908875,
-0.370885968208313,
0.12863540649414062,
-0.8351110816001892,
-0.34609395265579224,
0.7884262800216675,
-0.08194829523563385,
-0.36917656660079... | |
If the client disabled push notifications, can he still receive notifications while the app is running? I read somewhere that if the notification doesn't specify "aps" as the namespace, it'll still go through despite the fact that push notifications have been disabled. The notifications of course will not appear if the... | [
0.3909226357936859,
-0.18633775413036346,
0.8186277747154236,
-0.289393812417984,
0.10038851946592331,
0.0878133624792099,
0.34240248799324036,
-0.4422246217727661,
-0.09980883449316025,
-0.6261498332023621,
-0.23388220369815826,
0.6348161697387695,
-0.41969984769821167,
-0.327501893043518... | |
I am working on an app which uses Commonslang.jar libraries. I was trying to setup it on a new system with newly installed Eclipse.The project is not showing any error But when I run the project it force closes with NoClassDefFoundError at each point where I use Commonslang lib.
I dont know how to fix this problem.Ple... | [
0.26831674575805664,
0.296940416097641,
0.2530873417854309,
0.0839143693447113,
-0.22446420788764954,
-0.2371591180562973,
0.633978545665741,
-0.05924101918935776,
-0.16962018609046936,
-1.1418551206588745,
0.3339789807796478,
0.6170603632926941,
-0.16140273213386536,
0.12336321920156479,
... | |
I have often heard complaints against Java for not having unsigned data types. See for example [this](https://gamedev.stackexchange.com/questions/25492/is-java-viable-for-serious-game-development/25512#comment43373_25494) comment. I would like to know how is this a problem? I have been programming in Java for 10 years ... | [
0.25317099690437317,
0.14957359433174133,
0.13881008327007294,
-0.3466974198818207,
-0.15194092690944672,
-0.12757772207260132,
0.1320052444934845,
0.04816877469420433,
-0.5427464842796326,
-0.49642106890678406,
0.2689293920993805,
0.4068121612071991,
0.04534975811839104,
0.134413763880729... | |
bit integer types you can use bitmasks if needed.
* When converting numbers to decimal format, usually to Strings.
* Interoperating with non-Java systems through API's or protocols. Again the data is just bits, so I don't see the problem here.
* Using the numbers as memory or other offsets. With 32 bit ints this might ... | [
0.28452199697494507,
-0.0013072766596451402,
0.24548448622226715,
0.08199812471866608,
-0.5127463936805725,
0.25753599405288696,
0.025221100077033043,
-0.05961547791957855,
-0.3426251709461212,
-0.47102412581443787,
0.16086693108081818,
0.4998689591884613,
-0.17713572084903717,
-0.06219045... | |
having those make Java better?
> Occasionally when converting bytes to ints a & 0xFF is needed, but I don't consider that as a problem.
Why not? Is "applying a bitwise AND with 0xFF" actually part of what your code is trying to represent? If not, why should it have to be part of have you write it? I actually find that... | [
0.2572074830532074,
0.11740344762802124,
0.0856175348162651,
-0.08142544329166412,
-0.3946825861930847,
-0.2715747356414795,
0.4256017506122589,
-0.20475485920906067,
-0.40115436911582947,
-0.7633945941925049,
0.11556703597307205,
0.5876680016517639,
-0.3188976049423218,
-0.065766409039497... | |
which will *always* return a non-negative value, or only *accepts* non-negative values. Using an unsigned type allows you to express that clearly, without any need for validation. Personally I think it's a shame that unsigned types aren't used *more* in .NET, e.g. for things like `String.Length`, `ICollection.Count` et... | [
0.45324939489364624,
-0.0755743533372879,
-0.3319162428379059,
-0.07737850397825241,
-0.2948321998119354,
-0.3659718334674835,
0.46011850237846375,
0.07717197388410568,
-0.48282551765441895,
-0.7355117797851562,
0.06189866364002228,
0.6090878248214722,
-0.40586864948272705,
-0.157178580760... | |
around it, but it's not ideal and you'll be using code that doesn't really reflect the underlying data correctly.
Suppose you *are* interoperating with another system, which wants an unsigned 16 bit integer, and you want to represent the number 65535. You claim "the data is just bits, so I don't see the problem here" ... | [
0.22919775545597076,
0.20364752411842346,
0.23768018186092377,
0.19717510044574738,
-0.04650949686765671,
-0.008063476532697678,
0.3938850462436676,
-0.22964070737361908,
-0.2511247992515564,
-0.5727298259735107,
-0.27673065662384033,
0.25172072649002075,
-0.2637321949005127,
0.00056877767... | |
consider operations between unsigned and signed numbers and the conversions between those.
The only times you would *need* to consider those operations is when you were naturally working with values of two different types - one signed and one unsigned. At that point, you *absolutely* want to have that difference point... | [
0.22447451949119568,
0.09476473182439804,
-0.1433785855770111,
-0.027891522273421288,
0.1425597071647644,
-0.07473444938659668,
0.18259325623512268,
-0.08550170063972473,
-0.34445345401763916,
-0.4589797854423523,
-0.3093736469745636,
0.3966219127178192,
-0.051892366260290146,
-0.280552506... | |
is really signed
short foo = /* some value */;
boolean result = foo < length;
```
Suppose `foo` is 100 and `length` is -1. What's the *logical* result? The value of `length` *represents* 65535, so logically `foo` is smaller than it. But you'd probably go along with the code above and get the wrong result.
Of course... | [
0.3198517858982086,
0.18093280494213104,
0.4447284936904907,
-0.19721004366874695,
0.01784951612353325,
-0.022848455235362053,
0.1934623420238495,
-0.015943028032779694,
-0.2879398465156555,
-0.02911664918065071,
0.04535103216767311,
0.4002271890640259,
-0.24332810938358307,
0.019057475030... | |
also want to read [this interview with Joshua Bloch](http://webcache.googleusercontent.com/search?q=cache%3aU2dQLJSDtasJ%3ajava.sun.com/developer/technicalArticles/Interviews/bloch_effective_08_qa.html&hl=en&gl=us&strip=1) (Google cache, as I believe it's gone from java.sun.com now), including:
> Ooh, good question...... | [
0.27171799540519714,
0.45730775594711304,
-0.15479139983654022,
0.17860935628414154,
-0.03500670939683914,
-0.25010451674461365,
0.27947065234184265,
0.10764430463314056,
-0.26305603981018066,
-0.3815669119358063,
0.020211441442370415,
0.13559706509113312,
-0.05654609203338623,
0.143031746... | |
I am developing an iPhone application. In my iPhone application, I am using the `view-based` application template. Now I want to use the `Cocoa` framework for using `NSOpenPanelController` in my iOS application. How do I use the Cocoa framework, and where do I use it in iOS? Can somebody please explain this to me in de... | [
0.339950293302536,
0.4056374728679657,
0.29004475474357605,
-0.13792771100997925,
0.2440730780363083,
0.2343883514404297,
-0.011468099430203438,
0.13513071835041046,
-0.39919498562812805,
-0.8014829158782959,
0.050928108394145966,
0.5009803175926208,
-0.34113261103630066,
-0.21635577082633... | |
ios application. That step is successful, but when I started build and run, then it again asked for `AppKit` framework. I dragged that one too in the same manner as `Cocoa`. Then it asked for `foundation` framework. In both the applications for iOS and Cocoa applications, `foundation` framework is different. How to do ... | [
0.36146286129951477,
0.17810285091400146,
0.36564064025878906,
-0.031286828219890594,
0.05797780677676201,
0.01501760259270668,
-0.06098112836480141,
-0.07825770229101181,
-0.31614989042282104,
-0.7016854882240295,
-0.03640424460172653,
0.6862583160400391,
-0.6108819246292114,
-0.410742312... | |
Simulator, but they will fail to build for the actual device.)
iOS does not expose the file system to the user, so there is no equivalent to NSOpenPanel available. You will need to choose a different approach to whatever it is you're doing. | [
0.21766141057014465,
-0.34815534949302673,
0.33766019344329834,
0.44668111205101013,
0.5099747180938721,
-0.168732151389122,
0.2420874983072281,
0.11653085052967072,
0.01730310544371605,
-0.7077545523643494,
0.013733500614762306,
0.7093907594680786,
-0.15970788896083832,
-0.352817624807357... | |
```
$result = $this->db->query($query)->result_array();
if($result[9]['b_code'] != FALSE)
{
$result_array = array(
'0' => $result[0]['b_code'],
'1' => $result[1]['b_code'], | [
-0.003954480402171612,
0.14927518367767334,
0.23304075002670288,
-0.38380488753318787,
-0.03893597796559334,
-0.19704669713974,
0.2710106372833252,
-0.6666662693023682,
0.048473116010427475,
-0.27405717968940735,
-0.3487541377544403,
0.4553191661834717,
-0.46084168553352356,
0.173009857535... | |
'2' => $result[2]['b_code'],
'3' => $result[3]['b_code'],
'4' => $result[4]['b_code'], | [
0.2229829728603363,
0.2161126583814621,
0.1739007979631424,
-0.3294801712036133,
-0.2302650809288025,
0.372450590133667,
0.22261430323123932,
-0.5515661835670471,
-0.007014920935034752,
-0.1915411651134491,
-0.5171515345573425,
0.31087565422058105,
-0.49860879778862,
0.08256187289953232,
... | |
'5' => $result[5]['b_code'],
'6' => $result[6]['b_code'],
'7' => $result[7]['b_code'], | [
0.2768147587776184,
0.05525811389088631,
0.24353063106536865,
-0.3445902466773987,
0.01897645741701126,
0.3983129560947418,
0.2723873555660248,
-0.40650880336761475,
-0.12470199167728424,
-0.16406874358654022,
-0.5359506607055664,
0.3237358033657074,
-0.24186231195926666,
0.328332662582397... | |
'8' => $result[8]['b_code'],
'9' => $result[9]['b_code']
);
return $result_array;
}
else | [
-0.06360911577939987,
-0.19880682229995728,
0.24529153108596802,
-0.4813484847545624,
0.04593525826931,
0.1580815613269806,
0.2992544174194336,
-0.42360544204711914,
-0.3223455846309662,
-0.07590995728969574,
-0.48323798179626465,
0.6260361671447754,
-0.41977646946907043,
-0.01591864041984... | |
return FALSE;
```
It extracts 10 data in rows and make it a new array as $result\_array;
Sometimes, it won't have 10 results and may extract 5 or 8.
So, I wanna check wether there is a value for last one, which is $result[9]['b\_code] or not.
Should I use isset?
> Should I use isset?
Yes, [`isset`*Docs*](http://... | [
0.25749021768569946,
0.13665318489074707,
0.17960308492183685,
-0.20464657247066498,
0.006455007940530777,
0.17196305096149445,
0.4959808886051178,
-0.39127013087272644,
-0.10751156508922577,
-0.404786616563797,
-0.3506406545639038,
0.6648334860801697,
-0.4321598410606384,
-0.2174426019191... | |
return FALSE;
}
return array_map(function($v) {return $v['b_code'];}, $result);
```
Note that in this example we're preventing to repeat ourselves 10 times only to copy each `b_code` element. Instead, this is done with array mapping, see [`array_map`*Docs*](http://php.net/array_map).
A probably more readable varia... | [
0.1606433093547821,
-0.22899854183197021,
0.3786488175392151,
-0.4782208800315857,
-0.14437274634838104,
0.07479013502597809,
0.42941388487815857,
-0.7405840754508972,
-0.39519962668418884,
-0.3109860122203827,
-0.2299363911151886,
0.24147352576255798,
-0.42105424404144287,
-0.024908928200... | |
I'm declaring a String array of [2][5]. Up until that point everything is fine. I can insert things into the array.
But when I insert an integer value into the array, 'null' keyword is automatically added before that int value.
So let's say I inserted 5 into arrayName[1][0]. When I print it afterwards I get 'null5'. ... | [
0.43789610266685486,
0.03476257994771004,
0.15271936357021332,
-0.24844668805599213,
-0.1238812580704689,
-0.2576685845851898,
0.72186279296875,
-0.04739973694086075,
-0.5354498028755188,
-0.5332672595977783,
-0.022843440994620323,
0.6230335235595703,
-0.2651430070400238,
0.435769528150558... | |
is because you are concatenating the string "null" with 5:
```
a[0] = (String) null + 1
```
So the question is what are you trying to achieve? Simply setting the value or adding to it?
If you just want to set it use:
```
String[] a = new String[1];
a[0] = Integer.toString(1);
System.out.println(a[0]);
```
If yo... | [
0.14267200231552124,
-0.0464056022465229,
0.22308258712291718,
-0.31247660517692566,
0.07741148769855499,
-0.018930349498987198,
0.4537662863731384,
-0.6388877034187317,
-0.33959123492240906,
-0.30633530020713806,
-0.2996428310871124,
0.621845006942749,
-0.3371964395046234,
-0.072166182100... | |
i have listview with checkboxes and "save" button.
Whichever checkboxes i check and click save button, i want to save the data related to those checked rows into database
here is my code
```
public class CardDetailsAdapter extends BaseAdapter {
private static ArrayList<CardDetails> searchArrayList;
p... | [
-0.044825054705142975,
-0.31333673000335693,
0.9249336123466492,
-0.2118031233549118,
0.006633068900555372,
0.015849677845835686,
0.26376873254776,
-0.569686770439148,
-0.1379454880952835,
-0.7590492367744446,
-0.042978398501873016,
0.6674174070358276,
-0.25690245628356934,
0.0165209062397... | |
{
return searchArrayList.size();
}
public Object getItem(int position) {
return searchArrayList.get(position);
}
public long getItemId(int position) {
return position;
}
public View getView(final int position, View convertView, final ViewGroup parent) {
final ViewHolder holder;
if (convertView =... | [
-0.21913330256938934,
-0.28467318415641785,
1.1345595121383667,
-0.4137902557849884,
-0.06255505979061127,
0.4803197681903839,
0.3529336750507355,
-0.3177533447742462,
-0.024291520938277245,
-0.53134685754776,
-0.6018253564834595,
0.44384104013442993,
0.029699355363845825,
0.42227044701576... | |
= (CheckBox) convertView.findViewById(R.id.chkBoxID);
System.out.println("is checked==> " + holder.chkbox.isChecked());
convertView.setTag(holder);
} else {
holder = (ViewHolder) convertView.getTag();
}
holder.bankName.setText(searchArrayList.get(position).getBankName());
... | [
-0.12245848029851913,
-0.3009481132030487,
1.0133614540100098,
-0.313475638628006,
0.18602482974529266,
0.00003474842742434703,
0.4482695460319519,
-0.7373005747795105,
-0.26835179328918457,
-0.591722846031189,
-0.3691638708114624,
0.40168848633766174,
-0.2947305738925934,
0.08235277980566... | |
public void onClick(View v) {
HashMap<Integer, Boolean> mSimpleAdapter = new HashMap<Integer, Boolean>();
int p = (Integer) (v.getTag());
if (holder.chkbox.isChecked() == true) {
itemChecked[Integer.valueOf(position)] = holder.chkbox.isChecked(); | [
-0.23530976474285126,
-0.342988520860672,
0.7697829008102417,
-0.09950201958417892,
0.35217177867889404,
0.11093399673700333,
0.25555822253227234,
-0.21204552054405212,
-0.24654679000377655,
-0.34403565526008606,
-0.38163241744041443,
0.4363832175731659,
-0.2621433138847351,
0.319240480661... | |
}else{
itemChecked[Integer.valueOf(position)] = holder.chkbox.isChecked();
}
mSimpleAdapter.put(p, itemChecked[position]);
holder.chkbox.setChecked(itemChecked[position]);
}
});
return convertView;
}
static class ViewHolder | [
-0.10980323702096939,
-0.5673308968544006,
0.7143187522888184,
-0.08760989457368851,
0.1615629494190216,
0.08564246445894241,
0.11967898160219193,
-0.1792929321527481,
-0.005226069130003452,
-0.5441514849662781,
-0.3977707028388977,
0.7300160527229309,
-0.07329260557889938,
0.2381687462329... | |
{
TextView bankName;
TextView messages;
CheckBox chkbox;
}}
```
and activity class
```
import com.ispl.CFSMS.helper.CardDetailsAdapter;
public class WelcomePage extends Activity{
CardDetailsAdapter mListAdapter;
ArrayList<Integer> arList = new ArrayList<Integer>();
public void onCreate(B... | [
-0.005341628100723028,
-0.6431118845939636,
1.2346529960632324,
-0.34575462341308594,
-0.12849099934101105,
-0.04570195823907852,
0.2949904799461365,
-0.638414740562439,
-0.22642512619495392,
-0.6662023067474365,
-0.6780603528022766,
0.6836654543876648,
-0.26033249497413635,
-0.16730608046... | |
welcomelist.setAdapter(new CardDetailsAdapter(this, cardResults));
welcomelist.setOnItemLongClickListener(new OnItemLongClickListener() {
public boolean onItemLongClick(AdapterView<?> a, View v, int position, long id) {
Object o = welcomelist.getItemAtPosition(p... | [
-0.5999947786331177,
-0.3062609136104584,
1.221048355102539,
-0.35967037081718445,
0.16724757850170135,
0.25993719696998596,
0.4738471210002899,
-0.3165723979473114,
-0.14845339953899384,
-0.7129704356193542,
-0.6170738339424133,
0.418038934469223,
-0.03623392432928085,
0.11309309303760529... | |
(CardDetails)o;
Intent r=new Intent(WelcomePage.this , CardMenuActivity.class);
r.putExtra("BankName", fullObject.getBankName());
r.putExtra("CardNumber", fullObject.getCardNumber());
startActivityForResult(r, position);
return false; | [
-0.16847312450408936,
-0.34309136867523193,
1.0576249361038208,
-0.31739088892936707,
0.21109765768051147,
-0.0025892932899296284,
0.3757551908493042,
-0.6021744012832642,
-0.19144956767559052,
-0.273138165473938,
-0.34879904985427856,
0.4945218861103058,
0.06602099537849426,
0.03369051590... | |
}
});
CheckBox checkbox = (CheckBox)findViewById(R.id.chkBoxID);
Button saveTODbBtn = (Button)findViewById(R.id.saveID);
saveTODbBtn.setOnClickListener(new OnClickListener() {
public void onClick(View v) { | [
-0.3354629874229431,
-0.5799490213394165,
0.8864318132400513,
-0.3299378454685211,
0.30956295132637024,
0.35934504866600037,
0.7484844326972961,
-0.6145604848861694,
-0.16533395648002625,
-0.6610326170921326,
-0.12469392269849777,
0.7576637864112854,
-0.25080952048301697,
0.342419475317001... | |
//get the checkbox status and save related details into database
Intent intent=new Intent(WelcomePage.this, BankProjectActivity.class);
startActivity(intent);
}
});
}
private ArrayList<CardDetails> GetCardDetails(){
ArrayList<CardDetails> carddetailr... | [
0.10954498499631882,
-0.4724281132221222,
0.955080509185791,
-0.24744991958141327,
0.32992231845855713,
-0.16592994332313538,
0.36492544412612915,
-0.6898046135902405,
-0.1589643806219101,
-0.4839000701904297,
-0.029855910688638687,
0.6259039640426636,
-0.13497394323349,
-0.264947772026062... | |
CardDetails sr1 = new CardDetails();
sr1.setBankName("Select All");
sr1.setCardNumber("");
sr1.setMessages("");
carddetailresults.add(sr1);
sr1 = new CardDetails();
sr1.setBankName("HDFC Bank" +" "+ "xxxxx1234");
sr1.setMessages("Messages: " + "10");
... | [
-0.1060410588979721,
-0.37104830145835876,
0.9154598712921143,
-0.10608500987291336,
-0.0027945663314312696,
-0.012893803417682648,
0.33287209272384644,
-0.7211648225784302,
-0.2622496485710144,
-0.4433146119117737,
-0.5788516402244568,
0.20553337037563324,
-0.44427618384361267,
-0.1138355... | |
sr1 = new CardDetails();
sr1.setBankName("ICICI" + " "+ "xxxxx2134");
sr1.setMessages("Messages: 5");
carddetailresults.add(sr1);
sr1 = new CardDetails();
sr1.setBankName("HSBC" + " "+ "xxxxx8796");
sr1.setMessages("Messages: 2");
carddetailresults.add(sr1... | [
-0.21094363927841187,
-0.19025273621082306,
0.9003815650939941,
-0.25719255208969116,
-0.11649180203676224,
-0.04265754297375679,
0.42506280541419983,
-0.7134324312210083,
-0.38788172602653503,
-0.45642298460006714,
-0.614552915096283,
0.28775063157081604,
-0.5001233816146851,
0.0720074102... | |
am able to get the status. but how do i save those status and get all the status in activity class so that on click of save button i save all the data related to those checked rows...?
Hi in the `GetCardDetails()` method add `sr1.setSelected(true)` or `sr1.setSelected(false)`
in adapter add the following
```
publ... | [
-0.11135723441839218,
-0.07682669907808304,
0.8542026281356812,
-0.16179399192333221,
0.21101178228855133,
-0.1730608344078064,
0.4557380676269531,
-0.916279137134552,
-0.010852383449673653,
-0.699462890625,
-0.42520827054977417,
0.7005760669708252,
-0.16464462876319885,
-0.076947920024394... | |
itemChecked1 = new ArrayList<Boolean>();
for (int i = 0; i < results.size(); i++) {
itemChecked1.add(i, results.get(i).isSelected()); // initializes all items value with false
}
}
```
in getview
```
holder.chkbox.setOnClickListener(new View.OnClickListener() {
public void onClick(Vi... | [
-0.0715131089091301,
-0.3386303186416626,
0.9675400853157043,
-0.16036519408226013,
0.003348313271999359,
0.22021444141864777,
0.34612828493118286,
-0.6131930351257324,
-0.5825875997543335,
-0.40968406200408936,
-0.20205694437026978,
0.39967596530914307,
-0.2598329484462738,
0.198217108845... | |
//planet.setSelected(cb.isChecked());
if (holder.chkbox.isChecked()) {
itemChecked1.set(position, true);
holder.chkbox.setChecked(true);
planet.setSelected(true);
} else if (!holder.chkbox.isChecked()) { | [
0.019833113998174667,
0.1695130467414856,
0.3831104040145874,
0.13574768602848053,
0.41176673769950867,
0.042008642107248306,
0.010754263028502464,
-0.07014234364032745,
-0.53193598985672,
-0.3285907208919525,
-0.3740423619747162,
0.286678671836853,
-0.13144640624523163,
0.5022079944610596... | |
itemChecked1.set(position, false);
holder.chkbox.setChecked(false);
planet.setSelected(false);
}
}
});
``` | [
-0.16782991588115692,
-0.20139333605766296,
0.5192978382110596,
0.04467684403061867,
0.16210532188415527,
-0.0025642074178904295,
0.3270568549633026,
-0.07712286710739136,
-0.4395032823085785,
-0.23403224349021912,
-0.4997667372226715,
0.4419504702091217,
-0.3605838119983673,
0.28242218494... | |
I have developed tower of hanoi game in java script. Now, I want to make login page for the same but, I don't want to validate username and password by using my database information.
My requirement: I want to allow to play game to any user who are having google account. can i do this?
if yes, how?
please help.
would... | [
0.42616236209869385,
0.4815540611743927,
0.15261927247047424,
-0.16403008997440338,
0.04327747970819473,
0.03341224789619446,
0.03241819143295288,
-0.01633542589843273,
-0.21233795583248138,
-0.5994090437889099,
0.14007805287837982,
0.7074198722839355,
0.021008698269724846,
-0.163522168993... | |
```
SELECT COUNT(`t`.id)
FROM `product` `t`
INNER JOIN `category` `c1` ON ( `c1`.id ='15' )
LEFT JOIN `category` `c2` ON ( `c2`.`parent_category_id` = '15' )
LEFT JOIN `category` `c3` ON ( `c3`.`parent_category_id` = `c2`.`id` )
LEFT JOIN `category` `c4` ON ( `c4`.`parent_category_id` = `c3`.`id` )
LEFT JOIN `cate... | [
-0.5306574702262878,
0.3633221685886383,
0.5151352286338806,
-0.17856624722480774,
0.061619386076927185,
0.0045118206180632114,
-0.07529997080564499,
-0.4215737283229828,
-0.27701160311698914,
-0.18819555640220642,
-0.6378000378608704,
0.37005501985549927,
-0.1689717024564743,
0.3001891374... | |
is sub category.
```
SHOW PROFILE Result (ordered by duration)
state duration (summed) in sec percentage
Sending data 1.69029 99.96392
freeing items 0.00015 0.00887
statistics 0.00015 0.00887
checking query cache for query 0.00009 0.00532
init 0.00006 0.00355
preparing 0.00003 0.00177
checking p... | [
-0.3975885510444641,
-0.10407964885234833,
0.4165681004524231,
0.043312180787324905,
-0.1194269210100174,
0.3058367669582367,
0.7811136245727539,
-0.37130364775657654,
-0.4580296277999878,
-0.4386046230792999,
-0.3338524103164673,
0.46684327721595764,
-0.32330217957496643,
0.10899488627910... | |
To Execution Of Query
variable value description
Bytes_received 291 Bytes sent from the client to the server
Bytes_sent 72 Bytes sent from the server to the client
Com_select 1 Number of SELECT statements that have been executed
Handler_read_key 133514 Number of requests to read a row based on a key
Han... | [
-0.26154401898384094,
0.04221004620194435,
0.4270263612270355,
0.008398621343076229,
-0.11989051848649979,
0.4247298836708069,
0.2752165198326111,
-0.3591238856315613,
-0.3855360150337219,
-0.3542206883430481,
-0.16600126028060913,
0.39143937826156616,
-0.2594372034072876,
0.13907670974731... | |
from disk. Indicates insufficient key cache size
Key_write_requests 200 Number of MyISAM key blocks that were written to cache
Key_writes 105 Number of MyISAM key blocks written to disk. Indicates insufficient key cache size
Last_query_cost* 19845567 The total cost of this query as computed by the query optimiz... | [
-0.4150907099246979,
0.44600123167037964,
0.32268884778022766,
0.12786538898944855,
-0.08684609830379486,
0.46033379435539246,
0.44956842064857483,
-0.30338698625564575,
-0.2983526587486267,
-0.4561156630516052,
-0.23797519505023956,
0.5399761199951172,
-0.06709817051887512,
0.113903924822... | |
not cached by the Query Cache. They are not cacheable or was not cached due to the query_cache_type setting
Questions 1 Number of statements executed by the server
Table_locks_immediate 574 The number of requests for table locks that could be granted immediately
Threads_cached 6 The number of threads in the th... | [
0.1709391474723816,
0.11130518466234207,
0.5359454154968262,
-0.05833837389945984,
0.02210872434079647,
0.2772182524204254,
0.2942095398902893,
-0.4291454255580902,
-0.5881722569465637,
-0.5073196887969971,
-0.14482586085796356,
0.16560034453868866,
-0.36559146642684937,
0.3117650747299194... | |
Extra
1 SIMPLE c1 const PRIMARY PRIMARY 4 const 1 Using index
1 SIMPLE t ref category_id, mod mod 2 const 48 Using where
1 SIMPLE c2 ref parent_category_id parent_category_id 5 const 18
1 SIMPLE c3 ref parent_category_id parent_category_id 5 ucuzolur.c2.id 7
1 SIMPLE ... | [
0.1350419521331787,
0.15618272125720978,
0.4460753798484802,
0.13275334239006042,
-0.3456776440143585,
0.3869979977607727,
0.0028312026988714933,
-0.7310134768486023,
-0.2028639167547226,
-0.15451502799987793,
-0.3947469890117645,
0.3199833929538727,
-0.37679070234298706,
-0.06508634984493... | |
5 ucuzolur.c3.id 7
1 SIMPLE c5 ref parent_category_id parent_category_id 5 ucuzolur.c4.id 7
1 SIMPLE c6 ref parent_category_id parent_category_id 5 ucuzolur.c5.id 7
1 SIMPLE c7 ref parent_category_id parent_category_id 5 ucuzolur.c6.id 7 Using where
```
You can find the profil... | [
-0.1791801005601883,
-0.056847188621759415,
0.7941395044326782,
-0.13930197060108185,
-0.16000185906887054,
0.23772616684436798,
0.08116883039474487,
-0.11194112151861191,
-0.11436803638935089,
-0.5281456708908081,
-0.35734647512435913,
0.2549845278263092,
-0.11761657148599625,
0.321436911... | |
and how can I improve this query. I have 20000 rows in category table.
The below should work
```
response.AddHeader("Content-Disposition",
string.Format("attachment; filename = \"{0}\"",
System.IO.Path.GetFileName(FileName)));
```
More details on why <http://kb.mozillazine.or... | [
0.06933992356061935,
0.15535815060138702,
0.4376090466976166,
0.029330076649785042,
0.013057165779173374,
0.04649690166115761,
0.006421793717890978,
-0.1786380559206009,
-0.403323769569397,
-0.6989222764968872,
-0.03212886303663254,
0.6464462876319885,
-0.14160123467445374,
0.3700038194656... | |
I'm looking for some best practices for form submission in GWT with MVP.
In my application a Dialog box is opened where a simple from is rendered. When the 'Ok' button is clicked, element values are read and assigned to a value object. This object is then added to a new Place.
View:
```
onOkButtonClicked(event){
... | [
0.12219823151826859,
-0.0588206872344017,
0.5563694834709167,
-0.32496142387390137,
-0.04284599795937538,
-0.102991983294487,
0.18915605545043945,
-0.023395175114274025,
-0.19697193801403046,
-0.670268177986145,
-0.5266668200492859,
0.42365020513534546,
-0.30833759903907776,
0.061725758016... | |
place;
}
start(...){
if(this.place.getAction().equals("addrecord")){
// RPC call to add the new record: this.place.getNewRecord();
// RPC returns list of records
view.setRecordList();
container.setWidget(view.asWidget());
}
}
```
Is this the right way to submit data to server with MVP A... | [
-0.20882797241210938,
0.1468513160943985,
0.3251880705356598,
-0.11688648164272308,
0.26042282581329346,
0.1693052351474762,
-0.06444398313760757,
-0.19435574114322662,
-0.29301708936691284,
-0.6865626573562622,
-0.2672359049320221,
0.1116143986582756,
-0.09289855509996414,
0.3767206370830... | |
= pre.`coupon_code`
WHERE oc.uniuqueid IS NULL
``` | [
-0.07997249066829681,
0.203875333070755,
0.09113041311502457,
-0.1626586765050888,
0.36360085010528564,
0.06573570519685745,
0.06841132044792175,
0.07603868097066879,
0.15414132177829742,
-0.27421024441719055,
-0.4478479325771332,
0.31327366828918457,
-0.2081485241651535,
0.191183403134346... | |
I know how to write tab host,but here the scenario is little bit different
I have a screen ,in that 2 tabs are there 1.ABC 2.XYZ
when ever we click on the XYZ tab next page onwords we need to display 4 other tabs P,Q,R,S
how to set tabhosts to meet the above criteria please specify any suggestions
Add that method in... | [
0.4797360301017761,
0.22599691152572632,
0.8540896773338318,
-0.3442356288433075,
0.009600902907550335,
-0.1819658726453781,
0.4405117928981781,
-0.24837560951709747,
0.009950908832252026,
-0.7654151916503906,
0.05864961817860603,
0.8396800756454468,
-0.42272692918777466,
0.046986289322376... | |
TabHost.TabSpec spec = tabHost.newTabSpec(name);
spec.setIndicator(name);
spec.setContent(intent);
tabHost.addTab(spec);
}
public void addMyFourNewTabs()
{
addTab("P", PActivity.class);
addTab("Q", QActivity.class);
addTab("R", RActivity.class);
addT... | [
0.220378577709198,
-0.3046875,
0.5348910689353943,
-0.2024070769548416,
-0.11603643000125885,
0.010874561965465546,
0.6515414714813232,
-0.4490402042865753,
-0.004391609691083431,
-0.31660670042037964,
-0.4987661838531494,
0.8208654522895813,
-0.5355212688446045,
-0.14763906598091125,
0.... | |
I have a strange issue with eclipse. When I put a .xls file in the `src/test/resources` path it is copied by eclipse to the `target` path.
However, the file in the target path is not the same anymore. I cannot open it in MS Excel anymore and when I compare the two files, I see some binary differences. How can this ha... | [
0.3568420708179474,
0.14788027107715607,
0.18559686839580536,
-0.0064564840868115425,
-0.22556567192077637,
-0.11462528258562088,
0.08608809858560562,
0.07803791016340256,
0.07640901952981949,
-0.9242420196533203,
0.17800933122634888,
0.558732807636261,
-0.3975013792514801,
-0.049827318638... | |
<configuration>
<encoding>UTF-8</encoding>
<nonFilteredFileExtensions>
<nonFilteredFileExtension>xls</nonFilteredFileExtension>
</nonFilteredFileExtensions>
</configuration>
</plugin>
``` | [
-0.17307798564434052,
-0.05168963596224785,
0.1216619685292244,
-0.08991158753633499,
0.05931719020009041,
-0.10092968493700027,
0.25020188093185425,
-0.12275712937116623,
-0.1863270103931427,
-0.8031215071678162,
-0.7813318371772766,
0.3385286331176758,
-0.6385613083839417,
-0.03341569751... | |
```
num = "0000001000000000011000000000000010010011000011110000000000000000"
for n in 0...num.length
temp = num[n]
dec = dec + temp*(2**(num.length - n - 1))
end
puts dec
```
When i am running this code in irb the following error message is the output. and when i compiled the same logic in python it is worki... | [
0.14729821681976318,
-0.023761294782161713,
0.4213826060295105,
-0.2620030641555786,
-0.05334934592247009,
0.07354816794395447,
0.32473474740982056,
-0.20591866970062256,
-0.21513427793979645,
-0.5376010537147522,
-0.1258804351091385,
0.7180112600326538,
-0.27948442101478577,
0.19221383333... | |
from (irb):4:in block in irb_binding'
from (irb):2:ineach'
from (irb):2
from C:/Ruby193/bin/irb:12:in `'
```
Try this
```
num = "0000001000000000011000000000000010010011000011110000000000000000"
dec = 0
for n in 0...num.length
temp = num[n]
dec = dec + temp.to_i * (2**(num.length - n -... | [
-0.00691912230104208,
0.05609889328479767,
0.3741215765476227,
-0.457576185464859,
-0.09993346035480499,
0.08576610684394836,
0.25156906247138977,
-0.6874347925186157,
-0.18268676102161407,
-0.5676795840263367,
-0.079288050532341,
0.42229947447776794,
-0.23358982801437378,
0.21413099765777... | |
I have a textbox inside the anchor tag. And I want to get its value using JavaScript.
My code is
```
<a rel="tooltip" title="This information comes from the Income/Expense worksheet.">
<span class="TooltipTextBox">
<asp:TextBox ID="txt_Helo" runat="server" CssClass="small_text_box" ReadOnly="true" Ta... | [
0.4815223813056946,
0.25620827078819275,
0.6012023687362671,
-0.16782137751579285,
-0.06958497315645218,
0.05769975110888481,
-0.13078278303146362,
-0.35767775774002075,
-0.2720510959625244,
-0.6195856928825378,
-0.0690537840127945,
0.5938425064086914,
-0.0948980301618576,
-0.1787826716899... | |
do the following:
```
<script>var clientID = "<%=txt_hello.ClientID%>"</script>
```
Then you can access the text box with the ID:
```
<script>var txtBoxElement = document.getElementById(clientID);</script>
```
And then you can access the value of txtBoxElement.
The other approach would be purely JS based but you... | [
0.10318102687597275,
-0.10203998535871506,
0.40146467089653015,
-0.21527129411697388,
-0.3216671943664551,
0.0044478061608970165,
-0.035782717168331146,
-0.3577231764793396,
-0.17205406725406647,
-0.7467373013496399,
-0.2608889937400818,
0.7292479276657104,
-0.18549062311649323,
-0.0578636... | |
I am writing a stored procedure in SQL Server 2008. Here I have a database table as
```
Id LastUpdateTime
1 2011-12-27 11:15:03.700
2 2011-12-27 11:16:03.700
3 2011-12-27 11:15:03.700
```
In my stored procedure, I want to check that
```
if (currentSystemTime - LastUpdateTime > 5 minute)
{... | [
-0.1948632448911667,
0.1796271651983261,
0.6609538793563843,
-0.05158312991261482,
-0.07073336839675903,
0.04124138876795769,
0.3273725211620331,
-0.0917319729924202,
-0.1525849550962448,
-0.5213623642921448,
0.22823657095432281,
0.2509315311908722,
0.048615455627441406,
0.0932229012250900... | |
I am using a `Gallery` and I bind a `ImageView`, `ImageButton` and a `ProcessBar` to it. There are more than 50 images in the gallery and in the `getView()` method when took the `ViewGroup.getChildCount()`. It returns only an int value of 3.
Why the `ViewGroup.getChildCount()` returns 3 even if I scroll all the images... | [
0.20117305219173431,
-0.02871205471456051,
0.7571855783462524,
-0.22732067108154297,
0.13128997385501862,
0.13532541692256927,
0.23975153267383575,
-0.6073517799377441,
-0.16681115329265594,
-0.7084671854972839,
-0.18020986020565033,
0.5153897404670715,
-0.45307037234306335,
-0.01645254716... | |
R.drawable.sample_2,
R.drawable.sample_3,
R.drawable.sample_4,
R.drawable.sample_5,
R.drawable.sample_6,
R.drawable.sample_7
}; | [
-0.2569429278373718,
-0.029533300548791885,
0.17183543741703033,
-0.40159204602241516,
0.18609610199928284,
0.37765830755233765,
-0.059958457946777344,
-0.2480386197566986,
0.07262169569730759,
-0.006710443180054426,
-0.34088170528411865,
0.4800835847854614,
-0.6559691429138184,
-0.0539059... | |
/** Called when the activity is first created. */
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
Gallery gallery = (Gallery) findViewById(R.id.gallery);
gallery.setAdapter(new ImageAdapter(this,mIm... | [
0.3815292418003082,
-0.5386861562728882,
0.6182792782783508,
-0.16707037389278412,
0.13864482939243317,
-0.03867804631590843,
0.445244163274765,
-0.28858935832977295,
-0.18154050409793854,
-0.6265559196472168,
-0.4811672568321228,
0.7076815962791443,
-0.642745316028595,
-0.0638330355286598... | |
mContext;
private Integer[] Images;
private int[] ID;
private ProgressBar process;
private ImageButton imgBtn;
private ImageView imageview;
public ImageAdapter(Activity c,Integer[] images) {
this.mContext = c;
this.Images=images;
TypedArray attr = mContext.obtainStyledAt... | [
-0.12219437956809998,
-0.07048254460096359,
0.9643908739089966,
-0.09196869283914566,
0.048808544874191284,
0.5047382712364197,
0.7049703001976013,
-0.5467572808265686,
-0.2880932092666626,
-0.48985040187835693,
-0.476538747549057,
0.8980564475059509,
-0.4792432188987732,
0.254767745733261... | |
attr.recycle();
ID=new int[getCount()];
}
public int getCount() {
return Images.length;
}
public Object getItem(int position) {
return position;
}
public long getItemId(int position) {
return 1;
}
public View getView(final int position, View convertVi... | [
0.14488649368286133,
-0.5094722509384155,
0.8279520869255066,
-0.0892161875963211,
-0.2191026210784912,
0.38472306728363037,
0.13864187896251678,
-0.2836218476295471,
-0.11674823611974716,
-0.5283545255661011,
-0.3921376168727875,
0.5872098207473755,
-0.09747305512428284,
0.191689968109130... | |
View rowView = convertView;
if(rowView==null)
{
LayoutInflater inflater = mContext.getLayoutInflater();
rowView = inflater.inflate(R.layout.test, null, true);
imageview=(ImageView) rowView.findViewById(R.id.ImageViewuser);
imgBtn=(ImageButton)rowView.findViewBy... | [
-0.0877641811966896,
-0.2675686478614807,
1.0442079305648804,
-0.15823177993297577,
-0.1497488170862198,
0.634560227394104,
0.4313713610172272,
-0.6633245348930359,
-0.34701862931251526,
-0.7340739369392395,
-0.2796778976917267,
0.6081867814064026,
-0.24572323262691498,
0.40593549609184265... | |
imageview.setScaleType(ImageView.ScaleType.CENTER_INSIDE);
imageview.setBackgroundResource(mGalleryItemBackground);
if(position==0)
{
if(ID[position]==1)
{
imgBtn.setVisibility(View.INVISIBLE); | [
-0.11797162145376205,
-0.5760769844055176,
0.8438010215759277,
-0.16454459726810455,
-0.22348429262638092,
0.15612328052520752,
0.25242432951927185,
-0.36212560534477234,
-0.3013027310371399,
-0.6978613138198853,
-0.23390601575374603,
0.5729576945304871,
-0.33000633120536804,
0.02494168654... | |
process.setVisibility(View.VISIBLE);
}
}
if(ID[position]==position && position!=0)
{
imgBtn.setVisibility(View.INVISIBLE);
process.setVisibility(View.VISIBLE);
} | [
0.011283510364592075,
-0.40717172622680664,
0.4122321605682373,
-0.10456576943397522,
0.0706503614783287,
0.30047106742858887,
0.08124593645334244,
-0.3288417458534241,
-0.48234879970550537,
-0.784222424030304,
-0.2964111268520355,
0.3857240080833435,
-0.31432873010635376,
0.12520293891429... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.