text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
QMSF job this error log:
```
Message ID. . . . . : Severity CPFAF98. . . . . . . : 60
Message type. . . . : Informational
Submit Date. . . . . . : 13/04/12 Time sent. . . . . . : 12:44:02
Message. . . : The job has stopped processing 320083/QMSF/QMSF
MSF message.
Cause. . . . . : The program exit point in the libra... | [
-0.5672993063926697,
0.05177442729473114,
0.8509716987609863,
-0.2560791075229645,
0.2648380398750305,
0.12964396178722382,
0.7031227350234985,
-0.28831443190574646,
-0.26214051246643066,
-0.8779845237731934,
-0.3927173912525177,
0.4560345411300659,
-0.24744223058223724,
0.2804817855358124... | |
be revised
the next command execution STRMSF (Start Mail Server Framework)
Correction. . . : Determine because the program exit point has
indicated the need to end processing of a message. in
joblog may be listed messages that have caused
incorrect program. Correct errors, and run the
ENDMSF command (closing ma... | [
-0.08495857566595078,
0.06422674655914307,
0.7094279527664185,
-0.16689981520175934,
0.27548539638519287,
-0.043851230293512344,
0.7624003887176514,
-0.36488622426986694,
-0.31764742732048035,
-0.5847161412239075,
-0.15696541965007782,
0.5651529431343079,
-0.06773746013641357,
0.1558731198... | |
The Wordpress codex says that:
> `query_posts()` is only one way amongst many to query the database and generate a list of posts. Before deciding to use query\_posts(), be sure to understand the drawbacks.
but it does not list what those alternatives to `query_posts()` are. Should I be using something else?
Take a lo... | [
0.18786832690238953,
-0.07394448667764664,
0.2171134203672409,
0.22331364452838898,
-0.1938450038433075,
-0.0727873221039772,
0.36968716979026794,
0.06223873794078827,
-0.27115246653556824,
-0.6536264419555664,
-0.0851055234670639,
0.13538144528865814,
-0.41528379917144775,
-0.019536701962... | |
I have a created a custom view (Display) that accepts non view Icons that create semi static (rarely changing) bitmaps. The idea is to pass a number of Icons to the Display to be printed to its canvas. My problem is that I cannot get the Display to actually draw the Icons bitmap into its canvas.
The code below is a w... | [
0.7161533832550049,
-0.3090849816799164,
0.35938331484794617,
-0.20807482302188873,
0.21623291075229645,
0.29694315791130066,
0.399762898683548,
-0.39452993869781494,
-0.11680632829666138,
-0.7234686017036438,
0.012544864788651466,
0.669636070728302,
-0.6559358835220337,
-0.130218937993049... | |
super.onCreate(savedInstanceState);
FrameLayout fl = new FrameLayout(this);
Display tv = new Display(this);
tv.setLayoutParams(new LayoutParams(200, 200));
fl.addView(tv);
setContentView(fl);
}
public class Display extends View {
Paint vPaint = new Paint();
... | [
0.24484388530254364,
-0.37183627486228943,
0.9047957062721252,
-0.34530383348464966,
0.051152098923921585,
0.4477342665195465,
0.46497395634651184,
-0.3703249990940094,
-0.25834038853645325,
-0.8128965497016907,
-0.32951998710632324,
0.7200305461883545,
-0.21257731318473816,
0.235655844211... | |
Display(Context context) {
super(context);
vPaint.setStyle(Paint.Style.FILL_AND_STROKE);
vPaint.setColor(0x0ff000000);
setBackgroundColor(0xffffffff);
}
@Override public void onDraw(Canvas canvas) {
canvas.scale(200, 200);
item.onD... | [
0.1321791410446167,
-0.5290145874023438,
0.7565910816192627,
-0.3017720580101013,
-0.16035118699073792,
0.5260326862335205,
0.28609538078308105,
-0.5537400245666504,
-0.31019723415374756,
-0.6631424427032471,
-0.11611059308052063,
0.5166066288948059,
-0.1424616128206253,
0.2707433104515075... | |
canvas.drawLine(0.0f, 0.0f, 1.0f, 1.0f, vPaint);
}
}
public class Icon {
Bitmap myImage;
Paint mPaint = new Paint();
public Icon() {
myImage = Bitmap.createBitmap(50, 50, Bitmap.Config.ARGB_8888);
mPaint.setStyle(Style.FILL); | [
-0.10239740461111069,
-0.4103354513645172,
0.7538065314292908,
-0.1915377378463745,
0.15885333716869354,
0.5661550760269165,
0.3747226595878601,
-0.4864771366119385,
-0.2781403958797455,
-0.7824557423591614,
-0.349756121635437,
0.6484818458557129,
-0.17879784107208252,
-0.0256225373595953,... | |
mPaint.setColor(0xffff0000);
Canvas c = new Canvas(myImage);
c.scale(50, 50);
c.drawCircle(0.5f, 0.5f, 0.5f, mPaint);
}
public void onDraw(Canvas canvas) {
canvas.drawBitmap(myImage, 0, 0, null);
}
}
}
```
This code should be printing out a | [
0.15807068347930908,
-0.3568781018257141,
0.8300252556800842,
-0.29677820205688477,
0.055887673050165176,
0.44308334589004517,
0.1761423796415329,
-0.561460018157959,
-0.3475109040737152,
-0.6848717331886292,
-0.11534111946821213,
0.5071554183959961,
-0.4296932816505432,
0.1079493463039398... | |
line from upper-left to lower-right and draw a 50px diameter circle from 0,0 to 50, 50. Instead all I get is the line. However, if I print the bitmap to a file, the file outputs exactly what it should.
Does any one have a clue as to what is happening?
**EDIT**
To clarify my question, I am creating a Bitmap that i... | [
0.3516978621482849,
-0.27200645208358765,
0.7812330722808838,
0.053410813212394714,
-0.28144848346710205,
0.18033447861671448,
0.0016072264406830072,
-0.3705035448074341,
-0.2727336287498474,
-0.7381804585456848,
0.10720212757587433,
0.37616413831710815,
-0.0191239882260561,
0.078114815056... | |
In the Diplay's onDraw method, I moved the line `items.onDraw(canvas);` to before `canvas.scale(200, 200);`. Now the test circle draws correctly. What is such a simple change doing to completely ignore drawing the circle the pervious way?
As it turns out, I @MartinAsenov was mostly correct. What I ended up needing to d... | [
0.4733344316482544,
0.027442030608654022,
0.42158186435699463,
-0.060760755091905594,
-0.15540291368961334,
0.39117196202278137,
0.36148801445961,
-0.5754023194313049,
-0.12203442305326462,
-0.7783609628677368,
0.28518587350845337,
0.5129771828651428,
0.04188152030110359,
-0.00394937209784... | |
the final working test activity.
```
public class AndroidTestoActivity extends Activity {
@Override public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
FrameLayout fl = new FrameLayout(this);
Display tv = new Display(this);
tv.setLayoutParams(new L... | [
0.4140244424343109,
-0.36700499057769775,
0.9355697631835938,
-0.15178877115249634,
0.2717103660106659,
0.2724171280860901,
0.6332928538322449,
-0.5567526817321777,
0.12342153489589691,
-0.8089697360992432,
-0.28235942125320435,
0.6376788020133972,
-0.2938154339790344,
0.00407954677939415,... | |
= new Paint();
Icon item = new Icon();
public Display(Context context) {
super(context);
vPaint.setStyle(Paint.Style.FILL_AND_STROKE);
vPaint.setColor(0x0ff000000);
setBackgroundColor(0xffffffff);
}
@Override public void onDraw(Canvas can... | [
0.14788226783275604,
-0.5474392175674438,
0.740196168422699,
-0.3029544949531555,
0.034645430743694305,
0.42258715629577637,
0.39767566323280334,
-0.47196483612060547,
-0.30576953291893005,
-0.6247348189353943,
-0.22174479067325592,
0.6643677949905396,
-0.24396345019340515,
0.1076000556349... | |
item.onDraw(canvas);
canvas.save(Canvas.MATRIX_SAVE_FLAG);
canvas.scale(getWidth(), getHeight());
canvas.drawLine(0.0f, 0.0f, 1.0f, 1.0f, vPaint);
canvas.restore();
}
}
public class Icon {
Bitmap myImage;
Paint mPaint = new Paint(); | [
-0.13009010255336761,
-0.4958374798297882,
0.7643246650695801,
-0.20623332262039185,
0.1587592363357544,
0.706596851348877,
0.45284610986709595,
-0.5169671773910522,
-0.4686528444290161,
-0.7878355979919434,
-0.40296101570129395,
0.6337295770645142,
-0.35713669657707214,
0.2416062504053115... | |
public Icon() {
myImage = Bitmap.createBitmap(50, 50, Bitmap.Config.ARGB_8888);
mPaint.setStyle(Style.FILL);
mPaint.setColor(0xffff0000);
Canvas c = new Canvas(myImage);
c.scale(50, 50);
c.drawCircle(0.5f, 0.5f, 0.5f, mPaint); | [
-0.10886586457490921,
-0.5065954923629761,
0.8984078168869019,
-0.04717966914176941,
-0.004248053301125765,
0.6176953911781311,
0.06995311379432678,
-0.5165646076202393,
-0.2977873682975769,
-0.7980864644050598,
-0.24383749067783356,
0.5993767976760864,
-0.25114479660987854,
0.129103079438... | |
}
public void onDraw(Canvas canvas) {
canvas.drawBitmap(myImage, 50, 50, null);
}
}
}
``` | [
0.08797008544206619,
-0.3169916570186615,
0.36951935291290283,
-0.17822588980197906,
0.1958339363336563,
0.22525249421596527,
0.1406410187482834,
-0.16029760241508484,
-0.20415325462818146,
-0.7238157987594604,
-0.19843776524066925,
0.6662042737007141,
-0.2637520432472229,
0.05427708849310... | |
I am building an Excel add-in that sends the active workbook as an attachment in an Outlook email template to a specific Contact Group.
I've gotten the first two parts to work with the code below, but I am not sure how to set the `.TO` field to a contact group.
```
Public Sub Mail_Reports()
Dim rng As Range
D... | [
0.3378792405128479,
0.0471256822347641,
0.8195780515670776,
-0.22929634153842926,
0.05719360336661339,
-0.10612904280424118,
0.10304141044616699,
-0.3155783712863922,
0.0012123463675379753,
-0.6279329061508179,
-0.0282933097332716,
0.8155698180198669,
-0.2774219810962677,
-0.17475508153438... | |
End With
On Error Resume Next
Set OutApp = CreateObject("Outlook.Application")
'Set this line to the path and file name of your template
Set OutMail = OutApp.CreateItemFromTemplate("C:\Users\moses\AppData\Roaming\Microsoft\Templates\test.oft")
On Error Resume Next
With OutMail
'.TO f... | [
0.10633869469165802,
0.14186204969882965,
0.7420612573623657,
-0.28531312942504883,
-0.02880479209125042,
0.10479380935430527,
0.6959440112113953,
-0.34745845198631287,
-0.19396555423736572,
-0.5490140318870544,
-0.29158082604408264,
0.6199700236320496,
-0.5196751356124878,
-0.182360008358... | |
.Subject = Replace(OutMail.Subject, strOldPeriod, strNewPeriod)
'To display the email leave as is; to send the Email, change to .Send
.Display 'or Send
End With
On Error GoTo 0
With Application
.EnableEvents = True
.ScreenUpdating = True
End With
Set OutMail = ... | [
0.28336429595947266,
-0.1516694873571396,
0.6505582928657532,
-0.14537981152534485,
-0.03936785086989403,
0.0869673639535904,
0.5623090863227844,
-0.3960103392601013,
-0.2011149376630783,
-0.6395875215530396,
-0.3315945267677307,
0.2778846323490143,
-0.5925155878067017,
-0.0002629858208820... | |
= Nothing
End Sub
```
Just use the name of the contact group (formerly called "distribution lists"). I just tried it, as suggested on [Ron de Bruin's](http://www.rondebruin.nl/win/s1/outlook/tips.htm) site, and it works. | [
0.28193092346191406,
-0.05687827616930008,
0.5012930631637573,
-0.18144738674163818,
-0.10757703334093094,
-0.47237199544906616,
0.20527805387973785,
-0.07088310271501541,
-0.08653110265731812,
-0.11904804408550262,
-0.036224957555532455,
0.592192530632019,
-0.23760153353214264,
0.00939758... | |
Okay so this is a bit complex but I need to loop through this hash to find if each element meets one of following conditions:
**The Value is a String**
or
**The Value is a Hash, containing Strings, Not Hashes**
or
**The Value is a Hash, containing Strings and/or Hashes**
or
**The Value is an Array**
**UPDATE:*... | [
-0.036207593977451324,
0.042006492614746094,
0.5525000691413879,
0.023981625214219093,
-0.08868381381034851,
-0.2393241822719574,
0.2973044514656067,
-0.4755480885505676,
-0.3167979121208191,
-0.32538196444511414,
-0.11034027487039566,
0.5495429635047913,
-0.3557499945163727,
0.00208259373... | |
{"$t"=>"Thomas"}
irb> my_hash['gd:name']['gd:givenName']['$t']
=> "Thomas"
```
---
```
{
"gd:etag"=>"\"Rnk7fjVSLyt7I2A9WhVQEU4KRQI.\"",
"id"=>{
"$t"=>"da513d38e88d949"
},
"gd:name"=>{
"gd:givenName"=>{"$t"=>"Thomas"}, "gd:familyName"=>{"$t"=>"Chapin"}
},
"gd:phoneNumber"=>[
{
"rel"=>"m... | [
0.0100932065397501,
0.039017628878355026,
0.6196256279945374,
0.05899079516530037,
0.37682244181632996,
-0.03390107303857803,
0.6770068407058716,
0.0658082440495491,
-0.208987757563591,
-0.7412497401237488,
-0.39829984307289124,
0.8613216876983643,
-0.190084308385849,
0.19654333591461182,
... | |
name of the contact group (formerly called "distribution lists"). I just tried it, as suggested on [Ron de Bruin's](http://www.rondebruin.nl/win/s1/outlook/tips.htm) site, and it works. | [
0.473127543926239,
0.0928586795926094,
0.4125421345233917,
-0.18107545375823975,
-0.09287718683481216,
-0.29735347628593445,
-0.26265066862106323,
0.22617390751838684,
-0.23854687809944153,
-0.2668871581554413,
0.208771750330925,
0.6515214443206787,
0.38702458143234253,
-0.0051548988558351... | |
I am using the adRotator control with my Windows Phone 7 app. They have a file that specifies what ads to play based on the country you are in:
```
<AdSettings>
<CultureDescriptors>
<AdCultureDescriptor CultureName="en-US">
<Probabilities Probability="60" AdType="Smaato" />
<Pro... | [
0.5246188044548035,
0.13445214927196503,
0.8546103239059448,
-0.2598830461502075,
0.2951986491680145,
-0.20035478472709656,
0.5415821075439453,
-0.2501941919326782,
0.0436968095600605,
-0.7551565170288086,
-0.1793428510427475,
0.5778326392173767,
-0.5563839673995972,
-0.022728392854332924,... | |
<Probabilities Probability="60" AdType="Smaato" />
<Probabilities Probability="40" AdType="AdMob" />
</AdCultureDescriptor>
<AdCultureDescriptor CultureName="de-DE">
<Probabilities Probability="80" AdType="Smaato" />
<Probabilities Probability="20" AdType="AdMob"... | [
0.5057035684585571,
0.002423239406198263,
0.4965820014476776,
-0.15171809494495392,
0.08791051805019379,
0.19975696504116058,
0.2642081379890442,
-0.7667659521102905,
-0.04048158973455429,
-0.6553623080253601,
-0.1032322570681572,
0.5675176382064819,
-0.33215969800949097,
-0.10138688981533... | |
different cultures (en-US, en-GB and de-DE). However, 2 of them have settings that are exactly the same (en-US, en-GB).
Is there a way to specify multiple cultures on the same node? I tried the following, but doesn't seem to work.
```
<AdSettings>
<CultureDescriptors>
<AdCultureDescriptor CultureName=... | [
0.6866672039031982,
-0.24591457843780518,
0.4101952314376831,
0.2389206886291504,
0.18503624200820923,
0.3780131936073303,
0.3184257745742798,
0.008731381967663765,
-0.038830146193504333,
-0.7355483174324036,
-0.0686815157532692,
-0.03973713144659996,
-0.2978318929672241,
0.313105612993240... | |
Is this the correct way to pass two ids in jQuery?
I am having the following issue as seen in the image.
Domain Registration: Doesn't show input box.
Domain Transfer: Only shows one input box.
**Image:**

**CSS:**
```
#domainToBeReged, #domainT... | [
0.07585383951663971,
-0.21975794434547424,
0.5265799760818481,
0.0599592886865139,
-0.28186020255088806,
-0.2147490531206131,
-0.18230986595153809,
0.07872146368026733,
-0.2531725764274597,
-0.8406448364257812,
0.05691946670413017,
0.25048255920410156,
-0.21153073012828827,
0.5091317296028... | |
<option value="yes">Yes</option>
<option value="no">No</option>
</select>
<div id="domainToBeReged">
<label for="domainToBeReged">Domain One:</label><input name="domainToBeReged" id="domainToBeReged" type="text" placeholder="http://www." /> | [
-0.1575537919998169,
-0.4981236457824707,
0.4794618785381317,
0.06073954701423645,
-0.04616443067789078,
-0.11325119435787201,
-0.5106639862060547,
-0.09102126210927963,
-0.03440304845571518,
-0.6938743591308594,
-0.3358806371688843,
0.3813581168651581,
-0.20770816504955292,
0.653963983058... | |
<label for="domainToBeReged0">Domain Two:</label><input name="domainToBeReged0" id="domainToBeReged0" type="text" placeholder="http://www." />
</div>
<label for="domainTransfer">Domain Transfer: </label>
<select name="domainTransfer" id="domainTransfer">
<opt... | [
-0.15968061983585358,
-0.35708102583885193,
0.6839133501052856,
0.08241688460111618,
-0.14012311398983002,
-0.14776624739170074,
-0.44166451692581177,
-0.20955419540405273,
-0.10232794284820557,
-0.6178281903266907,
-0.2536144256591797,
0.5501042008399963,
-0.11913209408521652,
0.847477316... | |
<option value="yes">Yes</option>
<option value="no">No</option>
</select>
<div id="domainToBeTransfered">
<label for="domainToBeTransfered">Domain:</label><input name="domainToBeTransfered" id="domainToBeTransfered" type="text" placeholder="http://... | [
-0.10067697614431381,
-0.10272347927093506,
0.5030168890953064,
0.0686182975769043,
-0.07300123572349548,
-0.0903858095407486,
-0.24485337734222412,
-0.3694482445716858,
-0.13150015473365784,
-0.5060698390007019,
-0.16542838513851166,
0.48443254828453064,
-0.12570568919181824,
0.6693242788... | |
for="domainToBeTransfered0">Domain:</label><input name="domainToBeTransfered0" id="domainToBeTransfered0" type="text" placeholder="http://www." />
</div>
<label for="currentHosting">Current Hosting: </label>
<textarea cols="10" rows="10" name="currentHosting" id="currentHosting"></textarea>
... | [
-0.44838881492614746,
-0.3516584038734436,
1.154637336730957,
0.007859625853598118,
0.23639421164989471,
-0.052784115076065063,
-0.20470596849918365,
-0.33541640639305115,
-0.16692019999027252,
-0.7692000865936279,
-0.41811031103134155,
0.44476714730262756,
-0.13256195187568665,
0.61251151... | |
== 'yes') {
$domain.show();
} else {
$domain.hide();
}
}); | [
0.2607303559780121,
-0.15777558088302612,
0.7380489110946655,
-0.06364458054304123,
0.05459187552332878,
-0.2406938225030899,
0.5351894497871399,
-0.44847729802131653,
0.18713493645191193,
-0.25733551383018494,
-0.42985036969184875,
0.3939823806285858,
-0.41239821910858154,
0.5926777720451... | |
$('select[name="domainTransfer"]').change(function() {
var $domain = $('#domainToBeTransfered');
if ($(this).val() == 'yes') {
$domain.show();
} else {
$domain.hide(); | [
0.27404889464378357,
-0.2740303575992584,
0.9696739912033081,
-0.17456315457820892,
0.1493186056613922,
-0.17743879556655884,
0.2005075067281723,
-0.3646617829799652,
0.19075535237789154,
-0.44814279675483704,
-0.3406197428703308,
0.587498664855957,
-0.33324745297431946,
0.8493484258651733... | |
}
});
});
```
It's not completely correct:
* `$("selector1", "selector2")` is searching for `selector1` inside `selector2`. It's basically equivalent to `$("selector2").find("selector1")`. You seem to just want two independent selectors. Use the *comma selector* instead.
* You can use `.... | [
0.09096469730138779,
-0.21996955573558807,
0.32527342438697815,
-0.14772501587867737,
0.16531215608119965,
-0.21269293129444122,
0.285467267036438,
-0.134261816740036,
-0.12174230813980103,
-0.4286041259765625,
-0.25128379464149475,
0.7781723737716675,
-0.3435125946998596,
0.40713277459144... | |
How can I store and pass the contents of `r` from `main` to `two`? It will print `r` if I set it to a fixed value; but how do I do it with variable contents? I tried `random.getstate`/`setstate` but it was saying "function object not subscriptable".
```
import random
from random import randrange
def main():
r = r... | [
-0.05633098632097244,
-0.1569911688566208,
-0.14458510279655457,
-0.5306329131126404,
-0.20523059368133545,
0.21609584987163544,
0.09497903287410736,
-0.3484603762626648,
-0.2690483629703522,
-0.40061578154563904,
-0.08341757208108902,
0.7089123725891113,
-0.5749443173408508,
0.03889109939... | |
make a class or return the data, then pass it in as an argument, the latter is probably what you want given your code, so, for example:
```
def main():
...
r = do_something()
...
return r
def two(r):
...
do_something_else(r)
...
r = main()
two(r)
```
If this was happening within something you could d... | [
0.04010574892163277,
-0.13545306026935577,
-0.20893673598766327,
-0.2764192223548889,
-0.17906726896762848,
-0.029592951759696007,
0.3633260428905487,
-0.2955681085586548,
-0.2716260850429535,
-0.3886779546737671,
-0.3651769161224365,
0.42799070477485657,
-0.38545793294906616,
0.2450072616... | |
Main()
main.main()
main.two()
```
However, in this case, this is unnecessary as you are creating a class that doesn't really encapsulate anything. | [
-0.06560390442609787,
0.06099770590662956,
-0.18604202568531036,
-0.21589258313179016,
-0.24949868023395538,
-0.2522348463535309,
0.2738806903362274,
0.2301395982503891,
-0.0556318573653698,
-0.6094647645950317,
-0.44875359535217285,
0.19040429592132568,
-0.5000317096710205,
0.322370707988... | |
The li tag in the ul is not indented for some reason. is there something i am missing?
Line 1 of your CSS file is the issue.
```
* {
margin: 0;
padding: 0;
}
```
With that declaration you are setting the margin and padding of your list item to 0; as a result it does not appear indented.
To solve the issue, ... | [
-0.1712610125541687,
-0.04985480383038521,
0.8225666880607605,
-0.22547511756420135,
-0.12716731429100037,
0.5737080574035645,
0.17852148413658142,
-0.21362972259521484,
-0.3503168821334839,
-0.5800370573997498,
-0.41446805000305176,
0.44243142008781433,
-0.3026939630508423,
-0.12939190864... | |
browsers */article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:'';content:none}table{border-collapse:collapse;border-spacing:0}
/*Generic Styles*/
ul{list... | [
-0.07471377402544022,
0.04560835659503937,
0.5851020216941833,
0.1301451176404953,
-0.27845099568367004,
-0.10397850722074509,
0.6365259289741516,
0.3729698061943054,
-0.34109893441200256,
-0.9955500960350037,
-0.4609709680080414,
0.013081439770758152,
-0.3180108964443207,
0.24395696818828... | |
Is this possible to change bundle structure in Symfony 2, for example:
* MyBundle
+ EntityName
- Controller.php
- Entity.php
- EntityRepository.php
- view
* index.html.twig
* etc
+ SecondEntity
+ etc
Is this possible and how can I start doing such thing?
When you alloc/init a class, the returned inst... | [
0.1319657564163208,
-0.5344435572624207,
0.31811419129371643,
0.253904789686203,
-0.11825694143772125,
-0.4865715205669403,
0.08677805215120316,
-0.17561860382556915,
-0.29053807258605957,
-0.659156858921051,
0.012151498347520828,
0.5508753657341003,
-0.3850616216659546,
-0.234651908278465... | |
I do not know if this is possible, but here goes. And working with callbacks makes it even more difficult.
I have a directory with html files that I want to send back to the client in Object chunks with node.js and socket.io.
All my files are in /tmpl
So socket needs to read all the files in /tmpl.
for each file it... | [
0.2197827845811844,
0.16806095838546753,
0.30263036489486694,
-0.19979676604270935,
-0.3079250454902649,
0.04632164537906647,
0.2750517725944519,
0.06294020265340805,
-0.08671113103628159,
-0.813510537147522,
-0.04292059317231178,
0.6951012015342712,
-0.2726812958717346,
0.3539672493934631... | |
function(err, html){
if(err) throw err;
//filename must be without .html at the end
data['filename'] = html;
});
socket.emit('init', {data: data});
```
The final callback is also wrong. It has to be called when all the files in the directory are done.
But I do not know how to create the code, a... | [
-0.09192033112049103,
-0.07608812302350998,
0.45407724380493164,
-0.35983169078826904,
-0.056297630071640015,
0.3056305944919586,
0.4631718397140503,
-0.6591514945030212,
0.26577022671699524,
-0.42841288447380066,
-0.4221865236759186,
0.8675110936164856,
-0.40798646211624146,
-0.1767349392... | |
onError(err);
return;
}
filenames.forEach(function(filename) {
fs.readFile(dirname + filename, 'utf-8', function(err, content) {
if (err) {
onError(err);
return;
}
onFileContent(filename, content);
});
});
});
}
```
Here's the storing part:
... | [
-0.6564332246780396,
-0.06620270013809204,
0.4871651530265808,
-0.2750452756881714,
0.18960990011692047,
0.061427708715200424,
0.03940963000059128,
-0.2666604816913605,
0.07020869851112366,
-0.4177420735359192,
-0.5408958196640015,
0.7017755508422852,
-0.36333879828453064,
0.07998996227979... | |
{
data[filename] = content;
}, function(err) {
throw err;
});
```
The sending part is up to you. You may want to send them one by one or after reading completion.
If you want to send files after reading completion you should either use sync versions of `fs` functions or use promises. Async callbacks is not a goo... | [
0.19086354970932007,
-0.22380198538303375,
0.5186262130737305,
0.33029261231422424,
-0.006715316325426102,
-0.005601579323410988,
0.4678313136100769,
-0.3917570412158966,
0.02996259368956089,
-0.3607252240180969,
-0.7845949530601501,
0.8100587725639343,
-0.22017472982406616,
-0.11442077159... | |
I thought I had a good understanding of how quicksort works, until I watched the vid on <http://code.google.com/edu/algorithms/index.html> where Jon Bentley introduced his "beautiful quicksort code", which is as follows:
```
void quicksort(int l, int u){
int i, m;
if(l >= u) return;
m = l;
for(i = l+1;... | [
0.26917576789855957,
-0.2325914055109024,
-0.1726846843957901,
0.09196515381336212,
0.28277587890625,
0.2746085524559021,
-0.043176040053367615,
0.36877578496932983,
-0.1423380821943283,
-0.8386093378067017,
-0.39362239837646484,
0.2454170286655426,
-0.31503844261169434,
0.2707782983779907... | |
m);
quicksort(l, m-1);
quicksort(m+1, u);
}
```
Another part of the algo that confuses me is the final swap after the FOR loop. Why is that neccessary? Lets assume that the array is already in order. If that is true, no swaps will occur since x[i] > x[l]. At the end, we swap l with m. That screws up the ord... | [
-0.3929825723171234,
-0.27859312295913696,
0.37897875905036926,
-0.40003612637519836,
0.26929202675819397,
0.04610908403992653,
0.13838030397891998,
-0.2807983458042145,
-0.2240144908428192,
-0.6487679481506348,
-0.41069865226745605,
0.5469521284103394,
-0.45033541321754456,
-0.01153936423... | |
`x[l]`, it moves it **just after the current** `m`.
That means, when `m > l`, then elements on all positions from `l+1` to `m`, are lesser than element `x[l]`.
For example:
```
3 5 4 2 1 l = 0, m = 0, i = 1
^
3 5 4 2 1 l = 0, m = 0, i = 2
^
3 2 4 5 1 l = 0, m = 1, i = 3
^
3 2 1 5 4 l = 0, m = 2, i = 4 | [
-0.4455072283744812,
0.04353029653429985,
0.5954017043113708,
-0.48973265290260315,
0.2677021026611328,
0.2951080799102783,
-0.045376721769571304,
-0.22341862320899963,
-0.067644864320755,
-0.6399359107017517,
-0.24644695222377777,
0.033079057931900024,
-0.1632809340953827,
0.3079321682453... | |
^
```
and at the end, we swap the last of the smaller numbers with the first (partitioning) element to get:
```
1 2 3 5 4
```
If there are no smaller elements than the first one, the swap does nothing (because `m` is equal to `l`). | [
-0.18157848715782166,
0.0007326134364120662,
0.410305917263031,
-0.18851087987422943,
0.2755028307437897,
0.18351447582244873,
-0.07991781830787659,
-0.2585110366344452,
-0.1200728788971901,
-0.6522258520126343,
-0.5917204022407532,
0.2461506873369217,
-0.2559313476085663,
-0.1510211378335... | |
I have this function in Python:
```
def Rotate_Vector(vector, axis, direction):
```
where **vector** is a tuple of 3 elements (each element represent the three coordinates x,y,z of the vector on Cartesian axes), **axis** are the coordinates of an axis, and **direction** is an integer representing the clockwise or co... | [
-0.2370324432849884,
-0.08943642675876617,
0.8190850615501404,
-0.044611379504203796,
-0.2923595607280731,
0.3005589246749878,
-0.23319962620735168,
-0.3142668306827545,
-0.309261292219162,
-0.3587411344051361,
0.14859746396541595,
0.42467790842056274,
-0.315641850233078,
0.071764804422855... | |
way to do these controls (types, values and numbers of elements) in a function.
Edit:
**axis** could be 6 possibile cases: (1,0,0) (-1,0,0) (0,1,0) (0,-1,0) (0,0,1) (0,0,-1)
As said previously, python is duck typed, thus you simply do things as you normally would, and expect the user to deal with any exceptions raise... | [
0.19378770887851715,
-0.12752723693847656,
0.15260159969329834,
0.12458830326795578,
-0.1780698448419571,
0.18673095107078552,
0.2866381108760834,
-0.24041961133480072,
-0.37174487113952637,
-0.10662906616926193,
0.11230500787496567,
0.5512686967849731,
-0.35543307662010193,
-0.28718751668... | |
(e.g. `isinstance(direction, int)`) for debugging purposes, but this is really just the "poor man's unit test".
Using python's principles (*ask for forgiveness, not permission*, and *explicit is better than implicit*), I would do something like this:
```
import math
def rotate_vector(vector, axis, direction):
tr... | [
0.04313473775982857,
0.07197227329015732,
0.4567455053329468,
0.06033923849463463,
-0.2937808036804199,
0.1753375083208084,
0.23592615127563477,
-0.47621792554855347,
-0.2651721239089966,
-0.2627449333667755,
0.12315095216035843,
0.3897539973258972,
-0.26985400915145874,
0.1144624724984169... | |
{0}".format(axis))
try:
ax, ay, az = axis
except TypeError:
raise TypeError("Invalid axis {0}".format(axis))
# do math to rotate the vector
# rotated = ...
try:
# You really only need the sign of the direction
return math.copysign(rotated, direction)
# or:
... | [
0.23299597203731537,
-0.09409284591674805,
0.6528215408325195,
0.23298445343971252,
-0.04930615425109863,
0.1675865352153778,
0.005305756814777851,
-0.09765136986970901,
-0.3205054998397827,
-0.26231318712234497,
0.19197872281074524,
0.5253698229789734,
-0.2905902862548828,
0.1679100990295... | |
math.copysign(1, direction)
except TypeError:
raise TypeError("Invalid direction {0}".format(direction))
```
Since you really only care about the sign of direction, you can just use that and eliminate any error checking for it. The special case of `0` will be treated as `1`, which you may want to raise a ... | [
-0.06449027359485626,
0.05650017410516739,
0.3920939266681671,
0.11516698449850082,
-0.024274377152323723,
-0.043456222862005234,
-0.04581712558865547,
-0.17706279456615448,
-0.1715123951435089,
-0.48537778854370117,
0.029994618147611618,
0.49871906638145447,
-0.08679795265197754,
-0.22315... | |
values in the question) | [
-0.1706942319869995,
0.19524423778057098,
0.3924596607685089,
0.2948194146156311,
-0.03528907522559166,
0.3330126404762268,
0.25578364729881287,
-0.5399085283279419,
-0.10474687814712524,
-0.014665932394564152,
-0.41876184940338135,
0.5883632898330688,
-0.2058265209197998,
0.09553091973066... | |
My intention is for a new `<input>` fields to be created every time there is only one blank one left - so when the top one loses focus. This happens, but only once (so only three `<input>` fields can ever be made.
My working example is at <http://sas98.user.srcf.net/guestlist/> under number 4.
The code is:
```
<div ... | [
0.2714880704879761,
-0.00023267728101927787,
0.6396856307983398,
-0.4616108536720276,
0.15168385207653046,
0.11610814929008484,
0.06498975306749344,
-0.3216060400009155,
-0.23038141429424286,
-0.7652366757392883,
-0.32384026050567627,
0.4749867022037506,
-0.22276301681995392,
0.13437330722... | |
}
});
});
</script>
```
EDIT:
```
$('#names').append(name);
```
Changed to
```
$('#names').append(name.clone());
```
Makes it work a couple more times before getting stuck. It seems temperamental - I can't see a pattern to it.
The problem is the event handler is not updated.
for Jquery <... | [
0.1591760367155075,
-0.30258908867836,
0.675301730632782,
-0.3562828004360199,
0.21583010256290436,
-0.0990486666560173,
0.3145715594291687,
-0.13397815823554993,
-0.23901011049747467,
-0.6358855962753296,
-0.3223976492881775,
0.6498399972915649,
-0.600511908531189,
0.23778030276298523,
... | |
Currently in my iPhone application I have about 200 image views, and I will need to edit just about all of them specifically in my code. Do I really have to create outlets for each and every one of the imageviews, or is there an easier (quicker) way to reference and edit each imageview individually in my code?
Thanks!... | [
0.19974370300769806,
0.15160782635211945,
0.7205721139907837,
0.194919154047966,
-0.03731062263250351,
0.15403948724269867,
0.20284441113471985,
-0.2516534924507141,
-0.39112362265586853,
-0.8074343800544739,
-0.02018231712281704,
0.698096752166748,
-0.035387780517339706,
0.109052695333957... | |
I want to use oscpack (<http://code.google.com/p/oscpack/>) as a static library for my project but when I try to add it to an example, I get linking errors, for example:
> 1>oscpackd.lib(UdpSocket.obj) : error LNK2019: unresolved external symbol \_\_imp\_\_socket@12 referenced in function "public: \_\_thiscall UdpSock... | [
-0.05721908435225487,
0.10398263484239578,
0.7145146131515503,
-0.016501663252711296,
0.16199229657649994,
0.08454564213752747,
0.05043504014611244,
-0.24245063960552216,
-0.35257086157798767,
-0.625536322593689,
-0.10735250264406204,
0.33032241463661194,
-0.5351408123970032,
0.11810976266... | |
of the oscpack library, then on the Linker tab I added the folder location of the libs and the name of the libs.
Right-click your project in the Solution Explorer window and click Properties > Linker > Input > Additional Dependencies setting. You'll have to add ws2\_32.lib.
The VS project templates take care of tellin... | [
0.15364176034927368,
-0.1396123319864273,
0.4818195104598999,
0.05397925153374672,
-0.10355447232723236,
-0.18592101335525513,
0.1595001220703125,
-0.03491257131099701,
-0.05693737417459488,
-0.9227885603904724,
-0.24994349479675293,
0.6890473961830139,
-0.4065982699394226,
0.0985003784298... | |
MSDN article about, say, closesocket(). It is at the bottom of the article. The **Header** bit tells you what you need to #include, you got that right. The **Library** bit tells you what you need to tell the linker to link. Not automatic, you have to take care of it yourself. | [
0.11023376137018204,
-0.19309452176094055,
0.5513753294944763,
0.36433249711990356,
-0.042943574488162994,
-0.4693734049797058,
0.13329097628593445,
0.4464156925678253,
-0.33515235781669617,
-0.6538082361221313,
-0.3083469867706299,
0.22137023508548737,
-0.22535432875156403,
-0.01228949148... | |
I use `<?php echo __("this is my string"); ?>` inside my views to display text in multiple languages. I created a .po-file directory for german:
=> app/Locale/ger/LC\_MESSAGES/default.po
> msgid "this is my string"
>
>
> msgstr "dies ist meine zeichenkette"
When I add `Configure::write('Config.language','ger');` t... | [
-0.03596804663538933,
0.2688573896884918,
0.7509618997573853,
-0.40440550446510315,
-0.09362784773111343,
0.1681104302406311,
0.7052974104881287,
-0.1688152551651001,
0.008583460003137589,
-0.5849772095680237,
-0.16892854869365692,
0.2693382799625397,
-0.3895564675331116,
-0.09400025010108... | |
I can't change the value, even if I try to override it in **AppController.php** beforeFilter with:
```
Configure::write('Config.language', 'deu'); //'de' also doesn't work
CakeSession::write('Config.language', 'deu'); //'de' also doesn't work
```
If I change the value in core.php it works perfectly fine but once set... | [
-0.08326442539691925,
0.08883663266897202,
0.5096770524978638,
0.1351480931043625,
0.3243301510810852,
-0.003395578358322382,
0.4884316623210907,
-0.1077757328748703,
-0.0009829746559262276,
-0.9318298101425171,
-0.4204655885696411,
0.7162171006202698,
-0.26506105065345764,
-0.119884975254... | |
Hello i am new in android and i really need help with something. I got a prepopulate database in my sqlitehelper class and i need a query request returns a String[] table.
Example my database got 3 columns id, name, tel my query will be based on id so the cursor will get {1 mary 2134} i want that to be converted to an... | [
-0.30574485659599304,
0.1612669825553894,
0.5974662899971008,
-0.23062388598918915,
-0.22654323279857635,
0.4706418216228485,
0.35030943155288696,
-0.19053423404693604,
-0.44046950340270996,
-0.8696377873420715,
0.32557520270347595,
0.20174314081668854,
-0.3080480694770813,
0.1959230452775... | |
public String[] getSingleRow(String id){
String[] asColumnsToReturn = new String[] { COLUMN_ID,COLUMN_NAME, COLUMN_TELEPHONE}
Cursor cursor = this.dbSqlite.query(TABLE_NAME, asColumnsToReturn, COLUMN_ID + "=" + id, null, null, null, null);
//here is where i need help
String table[]=new String[2];
i... | [
-0.4277043044567108,
0.07330622524023056,
0.6827268600463867,
-0.09946172684431076,
-0.12618418037891388,
0.23600491881370544,
0.49730825424194336,
-0.48337510228157043,
-0.018952742218971252,
-0.5503682494163513,
-0.3065258264541626,
0.5659667253494263,
-0.38853558897972107,
0.23990863561... | |
i++;
cursor.moveToNext();
}
cursor.close();
return table;
}
```
I need that so in my main class i can set textview like:
```
TextView myTextView = (TextView)findViewById(R.id.textView1);
Table= SQLiteHelper.getSingleRow(id);
myTextView.setText(Table[0]); // "0"for i... | [
-0.19380460679531097,
0.0498080812394619,
0.9121149182319641,
-0.26709359884262085,
-0.28808555006980896,
0.11424484103918076,
0.3220875561237335,
-0.4141278862953186,
0.13876867294311523,
-0.8235313296318054,
-0.17473943531513214,
0.57562655210495,
-0.3010207712650299,
0.11984879523515701... | |
to a String[]
Armatus answer looks good to me. I consider the left and right element as redundant. Having a logical expression it doesn't matter if i evaluate them left right or right left.
```
<expr type="or">
<expr type="and">
<sig>x</sig>
<sig>y</sig>
</expr>
<expr type="and">
... | [
-0.2672959566116333,
0.03270162269473076,
0.2292831540107727,
-0.01259707286953926,
-0.30296841263771057,
0.22160953283309937,
0.42387375235557556,
-0.4885066747665405,
0.08376476168632507,
-0.3175746202468872,
-0.5507331490516663,
0.27186697721481323,
-0.5111812949180603,
-0.2542875707149... | |
p) | (y & x)`
furthermore its possible to add more than just two signals. | [
0.17437906563282013,
0.0288980882614851,
0.4268364906311035,
-0.20431406795978546,
-0.1056165024638176,
0.39818572998046875,
0.04961082711815834,
-0.3222460150718689,
-0.14364032447338104,
-0.43165865540504456,
-0.29788264632225037,
0.5439373850822449,
-0.3650749921798706,
-0.0445133671164... | |
What I want to do is have several radio buttons all on a different picture so when you click on that radio button it becomes the Back Ground, If I put the radio buttons in a Radio Group all of the buttons go right beside each other, But I need them basically on the four edges of the page. I have my layout in Relative l... | [
0.3972755968570709,
0.4479445219039917,
0.1437082439661026,
-0.04163404554128647,
-0.1447145938873291,
-0.22431914508342743,
0.1132187768816948,
-0.06573846191167831,
-0.35454222559928894,
-0.5468407273292542,
0.18963390588760376,
0.8649863600730896,
-0.36261627078056335,
-0.04847762361168... | |
android:id="@+id/PictureSelection"
android:layout_width="wrap_content"
android:orientation="horizontal"
android:layout_height="wrap_content"
android:layout_alignBottom="@+id/textView1"
android:layout_alignRight="@+id/Picture1" >
<RadioButton
android:id="@+id/... | [
-0.10823093354701996,
0.041443560272455215,
0.5629646182060242,
-0.42988523840904236,
0.068485789000988,
0.117416612803936,
0.42676427960395813,
-0.5976800322532654,
-0.2235289365053177,
-0.4365847110748291,
-0.43557098507881165,
0.7823185324668884,
-0.08966130763292313,
-0.196824729442596... | |
android:layout_alignRight="@+id/Picture1" />
<RadioButton
android:id="@+id/radioButton4"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<RadioButton
android:id="@+id/radioButton2"
android:layout_width="wrap_conten... | [
0.0220686923712492,
-0.0583919882774353,
0.49294313788414,
-0.47960808873176575,
-0.016849318519234657,
0.05578693747520447,
0.240437850356102,
-0.582133412361145,
-0.27231931686401367,
-0.48881688714027405,
-0.31351643800735474,
0.8476927876472473,
-0.21130885183811188,
-0.198708474636077... | |
android:layout_height="wrap_content"
android:layout_alignBottom="@+id/Picture2"
android:layout_alignRight="@+id/Picture2" />
<RadioButton
android:id="@+id/radioButton3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
... | [
-0.165445014834404,
0.05896078050136566,
0.43519771099090576,
-0.21257658302783966,
0.0984959602355957,
-0.00779744004830718,
0.4838167130947113,
-0.866448700428009,
0.0343974232673645,
-0.3633843660354614,
-0.45199939608573914,
0.7318176627159119,
-0.28615716099739075,
-0.2235625386238098... | |
looks good to me. I consider the left and right element as redundant. Having a logical expression it doesn't matter if i evaluate them left right or right left.
```
<expr type="or">
<expr type="and">
<sig>x</sig>
<sig>y</sig>
</expr>
<expr type="and">
<sig>p</sig>
<sig>q</... | [
-0.13911843299865723,
0.37056902050971985,
0.2613789737224579,
-0.2937665283679962,
0.035757098346948624,
0.08930151909589767,
0.20541223883628845,
-0.18935894966125488,
0.0820477157831192,
-0.7118708491325378,
-0.15986227989196777,
0.48859092593193054,
-0.04934448003768921,
-0.42631873488... | |
x)`
furthermore its possible to add more than just two signals. | [
0.38430672883987427,
0.10470655560493469,
0.20099879801273346,
0.008603839203715324,
-0.21428082883358002,
-0.09889853745698929,
0.046157144010066986,
-0.20016255974769592,
0.02143111824989319,
-0.6858477592468262,
-0.31218838691711426,
0.5277760624885559,
-0.5100994110107422,
0.0314344316... | |
What's the best way to retrieve the GET (in URL) variables passed to a .php page
Armatus answer looks good to me. I consider the left and right element as redundant. Having a logical expression it doesn't matter if i evaluate them left right or right left.
```
<expr type="or">
<expr type="and">
<sig>x</s... | [
-0.17564107477664948,
-0.042552366852760315,
0.47114601731300354,
0.3578150272369385,
-0.14169809222221375,
-0.06279218196868896,
0.22082024812698364,
-0.3122275769710541,
0.13671855628490448,
-0.4467499554157257,
-0.2093016356229782,
0.38102447986602783,
-0.07112708687782288,
-0.405486136... | |
`(x & y) | (p & q)` is the same as `(q & p) | (y & x)`
furthermore its possible to add more than just two signals. | [
0.1704825907945633,
0.09643751382827759,
0.24956868588924408,
-0.1460779458284378,
-0.1563340723514557,
0.30716633796691895,
0.07369014620780945,
-0.32784363627433777,
-0.05499551445245743,
-0.5099422931671143,
-0.21863026916980743,
0.5133224725723267,
-0.3933546245098114,
0.00480311363935... | |
I am writing a small program in Visual Studio 11 (beta) that a console mfc app. I have never programmed for this environment before and I am trying to figure out how to detect the Escape-key press in the console. I have looked extensively at online resources and tried many different things can't figure it out.
Here is... | [
-0.2757163941860199,
-0.02531561441719532,
0.2932279109954834,
-0.046290576457977295,
0.30378487706184387,
-0.031730443239212036,
0.3820595145225525,
-0.47932401299476624,
0.15255330502986908,
-0.5966693758964539,
-0.006383418571203947,
0.8404987454414368,
-0.35099512338638306,
-0.08116577... | |
maxReached = false;
}
}
exit(-1);
```
Any help would be much appreciated.
Kamal
No. There will be no performance difference.
If you doubt this, ask yourself, "Will it take longer for the computer to look up my variable if it's 2000 bytes away, than it will if it's 200 bytes or 20 bytes away?" The answer should ... | [
0.24181407690048218,
-0.1412186175584793,
0.4261687994003296,
0.05239013954997063,
0.12171074748039246,
-0.09327774494886398,
0.32085517048835754,
-0.33014795184135437,
-0.17446067929267883,
-0.5486599802970886,
0.02575566992163658,
0.5848831534385681,
-0.0743444561958313,
0.06816573441028... | |
improve speed. But it would take a lot of code between the variable and its use for that to happen.
It is also possible that the compiler will compile your method down to the same bytecode anyway. In short, I think you don't have to worry about it. | [
0.353496253490448,
0.1744081676006317,
-0.012368699535727501,
0.3512420356273651,
0.04660977050662041,
-0.06608163565397263,
0.21516115963459015,
0.02485710196197033,
-0.1682102382183075,
-0.7986568212509155,
0.46161121129989624,
0.6924067139625549,
-0.11205163598060608,
-0.305129677057266... | |
I am trying to understand a bit about partial postbacks using updatepanels and while lots of things are stumping me, this one has me baffled.
I am using tabs inside of a UpdatePanel and becuase this is an data entry application, I am putting the content into user controls, so each tab has its own user control. In addi... | [
0.5338077545166016,
-0.027498506009578705,
0.4543968439102173,
0.01261152420192957,
-0.2711326777935028,
-0.16907314956188202,
0.11455653607845306,
0.22512371838092804,
0.006494250148534775,
-0.8956432938575745,
0.08632249385118484,
0.5225794911384583,
-0.18333826959133148,
0.1511021107435... | |
postbacks.
To simulate this I created a very simple app (using Master Pages with ScriptManager control on the master page) in VS2010.
The content panel of the default page has the following
```
<asp:UpdatePanel runat="server" UpdateMode="Conditional" ChildrenAsTriggers="true">
<ContentTemplate>
<asp:Button runat... | [
-0.3838108777999878,
-0.04267805069684982,
0.5448042154312134,
0.09812874346971512,
-0.20009012520313263,
0.34523311257362366,
0.027500981464982033,
-0.3341713547706604,
-0.1553615778684616,
-0.5160514712333679,
-0.11957785487174988,
0.40999937057495117,
-0.3177776634693146,
-0.01753167062... | |
the click handler of the button I also load the control (or a different control when toggling, as described further in)
```
Button_Click
Panel.Controls.Clear()
Panel.Controls.Add(LoadControl("SomeControl.ascx"))
```
So when the page is first loaded the alert fires, however when you click the button and the page is... | [
0.021324893459677696,
-0.12829525768756866,
0.5954827666282654,
-0.207772895693779,
-0.1706102192401886,
-0.3025687038898468,
0.21650639176368713,
-0.05951860547065735,
0.03994802013039589,
-0.49590620398521423,
-0.16301386058330536,
0.8728692531585693,
-0.540622353553772,
-0.1764226257801... | |
I then went one step forward and moved my javascript in the controls into a function so I could call the function from the PageRequestManager, or from document.ready.
So now my two controls contain this script (with the alert containing a different message for each control)
```
<script type="text/javascript">
func... | [
-0.1102079302072525,
-0.011914943344891071,
0.7774836421012878,
-0.18738393485546112,
-0.15039843320846558,
-0.07010428607463837,
-0.067586749792099,
-0.5679077506065369,
-0.12219041585922241,
-0.6857389211654663,
-0.06202470883727074,
0.42740729451179504,
-0.3548777401447296,
0.0813593789... | |
1. Page intially loads UserControl1 - the alert for UserControl1 fires
(not shown here - the userLoad function is being called in jquery
document.ready)
2. User clicks button - which should load UserControl2
3. UserControl2 is loaded on the screen, but the alert for UserControl1
fires
A bit wordy, apologies for that, ... | [
-0.11545030027627945,
-0.07994692772626877,
0.7053480744361877,
0.040438730269670486,
-0.15505853295326233,
-0.3760391175746918,
0.07054170221090317,
-0.15965740382671356,
0.012561062350869179,
-0.6539943218231201,
-0.19057467579841614,
0.6137617230415344,
-0.5373005270957947,
-0.088155969... | |
add a reference to the script file in the content page via a
```
<script src='UC1.js'>
```
then register startup script to call this function
```
ScriptManager.RegisterStartupScript(ctrl, ctrl.GetType(), "UserJS", "UC1Load()", True)
```
The biggest problem with this is that I am now having to download a bunch ... | [
0.46041545271873474,
0.2970218062400818,
0.20491071045398712,
-0.005473841447383165,
0.09278081357479095,
-0.3073158264160156,
0.3522443473339081,
-0.022377939894795418,
0.34031471610069275,
-0.6289616227149963,
0.17385998368263245,
0.774502158164978,
-0.18010753393173218,
-0.0141103053465... | |
CodeFile="TestControl1.ascx.cs"
Inherits="Controls_TestControl1" %>
This is Test Control 1
```
TestControl2
------------
```
<%@ Control Language="C#"
AutoEventWireup="true"
CodeFile="TestControl2.ascx.cs"
Inherits="Controls_TestControl2" %>
This is Test Control ... | [
-0.014010007493197918,
0.2663451135158539,
0.22015991806983948,
0.0484328493475914,
0.018826516345143318,
-0.307229608297348,
0.42447584867477417,
-0.5218893885612488,
0.06732052564620972,
-0.7104328870773315,
-0.2943960130214691,
0.4791978895664215,
-0.4482203423976898,
-0.035593241453170... | |
CodeFile="10049777.aspx.cs"
Inherits="_10049777" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="Server" />
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="Server">
<asp:UpdatePanel ID="UpdatePanel1" runat="server"
UpdateMode="Conditional"
Ch... | [
-0.16969458758831024,
0.037235327064991,
0.34601664543151855,
0.20866447687149048,
0.17763873934745789,
0.07397687435150146,
0.21971961855888367,
-0.12266309559345245,
-0.12717896699905396,
-0.7364903092384338,
-0.5978891849517822,
0.12374044209718704,
-0.19225873053073883,
-0.044649731367... | |
OnClick="Button1_Click" />
<br /><br />
<asp:Panel runat="server" ID="Panel1" />
</ContentTemplate>
</asp:UpdatePanel>
</asp:Content>
```
10049777.aspx.cs
----------------
```
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
var TestControl... | [
-0.26439255475997925,
-0.06958814710378647,
0.6494216918945312,
0.04787439480423927,
0.17326147854328156,
0.13995636999607086,
0.1718919277191162,
-0.41699865460395813,
-0.20879046618938446,
-0.6496840715408325,
-0.3373951315879822,
0.42645546793937683,
-0.4373946487903595,
-0.025666886940... | |
TestControl1.GetType(),
"TestControl1Script", | [
0.2799478769302368,
-0.32994914054870605,
-0.05013870447874069,
0.04840303584933281,
-0.251041054725647,
-0.21683983504772186,
0.4142411947250366,
-0.17845866084098816,
0.2785288095474243,
-0.7148251533508301,
-0.2937377393245697,
0.3433472812175751,
-0.7349329590797424,
-0.257265567779541... | |
"alert(\"control 1\");",
true);
}
}
protected void Button1_Click(object sender, EventArgs e)
{
var TestControl2 = LoadControl("Controls\\TestControl2.ascx");
Panel1.Controls.Clear();
Panel1.Controls.Add(TestControl2);
ScriptManager.RegisterStartupScrip... | [
-0.2106209248304367,
-0.24487178027629852,
0.3358738422393799,
-0.17301684617996216,
0.4275513291358948,
-0.03685876354575157,
0.5021646618843079,
-0.28002873063087463,
0.003206456545740366,
-0.4669830799102783,
-0.5311715006828308,
0.5875229835510254,
-0.4674389064311981,
-0.1368018388748... | |
TestControl2.GetType(),
"TestControl2Script", | [
0.2259189784526825,
-0.23797166347503662,
-0.04459884390234947,
0.007089867722243071,
-0.2063102126121521,
-0.2966828942298889,
0.39018142223358154,
-0.15834462642669678,
0.23355403542518616,
-0.7674558162689209,
-0.39699408411979675,
0.29147690534591675,
-0.6376165151596069,
-0.2411755621... | |
"alert(\"control 2\");",
true);
}
``` | [
0.18105141818523407,
-0.017900578677654266,
0.43074697256088257,
-0.4187150299549103,
0.603169858455658,
-0.29978272318840027,
0.35829994082450867,
-0.08023956418037415,
0.07103897631168365,
-0.4033263325691223,
-0.7224693298339844,
1.0062586069107056,
-0.6693791151046753,
0.02405596897006... | |
I would like to work with very long Strings in Eclipse.
So my Problem is: Everytime I put in a String in the Brackets Eclipse just recognizes the First line as a String(There are linebreakes in the String)
The String:
```
public static final String EXAMPLE_TEST =""
```
When I insert the String:
```
public static ... | [
0.081730417907238,
-0.053706828504800797,
0.40116366744041443,
0.04229665920138359,
-0.28177326917648315,
0.15530237555503845,
0.3145843744277954,
-0.3399602770805359,
-0.026443514972925186,
-0.13558904826641083,
-0.13690923154354095,
0.5084721446037292,
-0.2735711634159088,
-0.17466899752... | |
no sea takimata sanctus est Lorem ipsum
4. dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore
5. magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren,
6. no sea tak... | [
-0.17801743745803833,
0.0520353764295578,
0.24868839979171753,
-0.052169475704431534,
0.3701549470424652,
0.6436195969581604,
0.5263127088546753,
-0.052827369421720505,
0.0036395061761140823,
-0.5042324066162109,
-0.26138943433761597,
0.7889707088470459,
-0.15953853726387024,
-0.3677333295... | |
pasting into a string literal". | [
0.24524717032909393,
-0.22614942491054535,
0.27954456210136414,
0.1656140685081482,
0.24235206842422485,
-0.13114209473133087,
0.22185103595256805,
-0.016446448862552643,
-0.13929203152656555,
-0.060867756605148315,
-0.0430750697851181,
0.13123288750648499,
-0.1798231154680252,
0.125891774... | |
I'd like the `Margin` property to reference the center of the `UIElement` and not the top-left corner. That way when I change the width/height of the `UIElement` it stays in the same spot.
Is there a way to configure this behavior or I'll have to rely on Binding to make the adjustment ?
Thanks.
For instance if I cha... | [
-0.17016151547431946,
0.11317732185125351,
0.7361878156661987,
0.05367978289723396,
-0.018812743946909904,
0.171391561627388,
-0.44916215538978577,
-0.28855225443840027,
-0.16382957994937897,
-0.8006468415260315,
0.0890471488237381,
0.1726173609495163,
-0.001512921298854053,
0.090046480298... | |
center.
This code make my Rectangle behaves like I wanted.
```
<Grid>
<Rectangle Fill="#FF991C1C" Width="10" Height="40" HorizontalAlignment="Center" Margin="90,161,0,0" VerticalAlignment="Center"/>
</Grid>
``` | [
-0.22717206180095673,
-0.0022959134075790644,
0.6646484136581421,
0.11780956387519836,
-0.0500788651406765,
0.19747394323349,
-0.3300420343875885,
-0.15159964561462402,
-0.3949432075023651,
-0.9729925990104675,
0.0070457132533192635,
0.11265873908996582,
-0.0685582235455513,
0.085267595946... | |
```
foreach($apps as $app){
echo $this->Form->input('Application', array('type'=>'checkbox', 'id'=>$app['Application']['description'], 'div'=>false,'type'=>'checkbox','value' => $app['Application']['description'],'label'=>$app['Application']['description']));
}
<div class="checkboxes">
<input type="... | [
-0.012924622744321823,
0.44982248544692993,
0.5297116041183472,
-0.2586350440979004,
-0.009267243556678295,
0.08186188340187073,
0.08015981316566467,
-0.5954306125640869,
-0.043010883033275604,
-0.580713152885437,
-0.4832490384578705,
0.3695196807384491,
-0.35004767775535583,
-0.0022031459... | |
sure where the hidden field is coming from.
thanks
For an obscure reason I couldn't figure out that the Rectangle Alignment should be Center if I wanted the Margin to be relative to the center.
This code make my Rectangle behaves like I wanted.
```
<Grid>
<Rectangle Fill="#FF991C1C" Width="10" Height="40" Horizont... | [
-0.09000668674707413,
-0.299932062625885,
0.4188244938850403,
0.08953757584095001,
0.1008300706744194,
0.027737097814679146,
-0.07533349096775055,
-0.0861361026763916,
-0.11463377624750137,
-0.7499421834945679,
0.08360254019498825,
0.36264994740486145,
0.007212512660771608,
-0.108783036470... | |
I've been programming for some time but never got interested in knowing in theory what each concept means, I may be using a variety of programming concepts, but without knowing it.
**Service Locator**:
For me, refers to a record of shortcuts to speed up development by reducing the amount of code. One question is: may ... | [
0.3363806903362274,
0.0943976566195488,
0.22729775309562683,
-0.03064681403338909,
0.106320321559906,
0.2524362802505493,
0.1708785444498062,
-0.3085794150829315,
-0.3532901108264923,
-0.6190319657325745,
-0.2033434808254242,
0.47682783007621765,
-0.5326399207115173,
-0.006901193410158157,... | |
DI Container?
Here is my understanding of it:
```php
$app = new System\Application(System\Config::load());
```
**Inversion of Control**:
Don't understand this Design Pattern (or understand but don't know if what I do is IoC)
Then, in theory (preferably with simple examples), what does each of these concepts mean? ... | [
0.18449506163597107,
-0.10517146438360214,
0.16656780242919922,
0.0684061050415039,
-0.05855412036180496,
-0.03227893263101578,
0.14649446308612823,
-0.31780335307121277,
-0.08032780140638351,
-0.5254928469657898,
0.05672990530729294,
0.5598753094673157,
-0.4559149742126465,
0.132125467061... | |
{
//$dep has to be injected
$this->_dep=$dep;
}
//this is wrong because it couples MyClass to a specific Dependency implementation
public function __construct()
{
$this->_dep=new Dependency();
}
}
$dep=new Dependency();
$obj=new MyClass($dep);
```
... | [
0.07303972542285919,
-0.1427803933620453,
0.14300639927387238,
-0.22944723069667816,
0.2036128044128418,
0.22309929132461548,
0.2419617623090744,
-0.33455875515937805,
0.11150006204843521,
-0.6653167605400085,
-0.1576366424560547,
0.6437351703643799,
-0.663957417011261,
0.09871139377355576... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.