text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
var dropShadow:DropShadowFilter = new DropShadowFilter(2,45,0, 1,4,4,1,1,true);
return [dropShadow];
}
public function removeDropShadow():Array {
return null;
}
public function setText(caption:String) {
this.btext.text = caption;
} | [
0.27655377984046936,
-0.24398402869701385,
0.6539142727851868,
-0.2225792557001114,
0.18093934655189514,
0.20749691128730774,
0.5488231182098389,
-0.31781062483787537,
-0.1668594628572464,
-0.14647391438484192,
-0.5000780820846558,
0.4440673887729645,
-0.4574844241142273,
0.123350091278553... | |
}
}
```
As you have stated btext is an instance name of an object. Here is where I assume btext is an object you created in your library.
In your class you are doing 2 things wrong. So lets examine your method.
```
public function setText(caption:String) {
this.btext.text = caption;
}
```
The first thing wr... | [
0.2942923903465271,
0.1183938980102539,
-0.13883155584335327,
-0.1632223278284073,
0.07548300176858902,
-0.4263935089111328,
0.45621752738952637,
0.07711737602949142,
-0.07173082232475281,
-0.7536720633506775,
-0.032032184302806854,
0.490851491689682,
-0.7178564667701721,
0.308063715696334... | |
library. This will give you the property is undefined error you are gettting.
Now the second issue at hand is you are about to ask "OK how do I reference btext in my class then". What you need to know is that only objects added to the display list IE:stage can access objects via the stage.
You can do this 3 ways.... | [
0.5703591108322144,
-0.04679417237639427,
0.41778239607810974,
0.21973241865634918,
0.23154763877391815,
-0.4054352343082428,
0.1428496539592743,
0.04494470730423927,
-0.12251318991184235,
-0.5820941925048828,
-0.13592378795146942,
0.626181960105896,
-0.10892770439386368,
0.214422553777694... | |
I have a method from decompiled code that i am trying to run and understand.
The 5 line does not compile and i get an error saying
incompatible types required: java util.Hashmap found: java.lang.String.
```
private void resetFieldModel(HashMap<String, Integer> to_use_map)
{
this.current_field_model.removeAllElem... | [
0.20022527873516083,
-0.0240780059248209,
0.4698088467121124,
-0.18134373426437378,
0.22889257967472076,
-0.022132081910967827,
0.2274685949087143,
-0.4407411217689514,
-0.15689687430858612,
-0.8741241693496704,
-0.06803534924983978,
0.5726528763771057,
-0.4712428152561188,
-0.058595437556... | |
i am following this howto to add a custom CMS page <http://www.magentocommerce.com/wiki/4_-_themes_and_template_customization/0_-_theming_in_magento/adding_cms_layout_templates>
the issue i am having is that i want to add a NivoSlider javascript just to this page and the only way to add it to the is to do it through t... | [
-0.05194561928510666,
0.21947968006134033,
0.7412821650505066,
0.04124804958701134,
-0.3089568316936493,
-0.19336849451065063,
-0.07526971399784088,
-0.33027783036231995,
-0.3851604163646698,
-0.8859201669692993,
0.004406196065247059,
0.714214563369751,
-0.14690138399600983,
-0.12189086526... | |
you can do
```
STATICFILES_DIRS = [os.path.join(ROOT_PATH, 'static')]
```
The reason that `STATICFILES_DIRS` wants a filesystem path is that it needs to know where the files live in the operating system (so things like `manage.py collectstatic` are possible). The `STATIC_URL` setting is for webserver paths, and that... | [
0.015821358188986778,
-0.13757476210594177,
0.46380287408828735,
0.002588195027783513,
0.045782674103975296,
-0.44146978855133057,
0.1392100304365158,
0.39032605290412903,
-0.3479418456554413,
-0.6352625489234924,
-0.18022210896015167,
0.437636137008667,
-0.4088837206363678,
0.334155768156... | |
I am trying to pass a variable within a header link. I have tried below code
```
$name = "mike";
if($name != "lopan"){
header("Location:error-page.php?$errorMssg=Please enter information?");
}
```
This page redirect to location but doesn't pass the variable that contains the message. But when i create a sim... | [
0.0031659365631639957,
0.1728968620300293,
0.46656695008277893,
-0.2280115932226181,
0.0065884520299732685,
-0.1865253746509552,
0.8950812816619873,
0.04817616567015648,
-0.17684917151927948,
-0.5949187278747559,
-0.043270956724882126,
0.46467825770378113,
-0.459645539522171,
0.02857346646... | |
to enter information huh?"));
}
```
And in error-page.php, you should get it (no need to urldecode):
```
<?php
$errorMssg = $_GET['errorMssg'];
``` | [
-0.255558580160141,
0.06487501412630081,
0.7235378623008728,
0.03941170498728752,
0.12421178817749023,
-0.06264117360115051,
0.40164563059806824,
-0.12007341533899307,
-0.07843194156885147,
-0.39656975865364075,
-0.15887974202632904,
0.5317856669425964,
-0.16698944568634033,
-0.00916278641... | |
I am trying to write a onbeforeunload event that triggers a window.open(url) etc. I want it to be triggered if the user trys to leave the page or if they close their browser, but not when they click any of the buttons on the page. The buttons on the page post data to the same page via a javascript.
javascript:
```
wi... | [
0.26080751419067383,
-0.047188691794872284,
0.7416431307792664,
-0.3066726624965668,
0.35209882259368896,
0.026183921843767166,
0.6604648232460022,
-0.14934490621089935,
0.15165352821350098,
-0.8103070855140686,
-0.4804884195327759,
0.3534030616283417,
-0.4259122610092163,
0.14347065985202... | |
nothing and allow user to leave
}
}
-->
</script>
```
The buttons calls a javascript function that creates a form and submits it. In that javascript function I set the global variable of doSync = false. I'll include the basic code of this function just to illustrate it.
```
function buttonPush(){
var form = d... | [
0.22229278087615967,
0.026277713477611542,
0.6710841059684753,
-0.06555523723363876,
0.023178160190582275,
-0.2226623296737671,
0.49123290181159973,
-0.19525445997714996,
-0.22889681160449982,
-0.7564295530319214,
-0.20011422038078308,
0.6760757565498352,
-0.39410722255706787,
0.1346442699... | |
do a `window.open('','','height=100,width=100');`
it opens fine but this below does not.
```
window.open('https://mydomain.com/support/sync_cluster.php?sync_cluster=mycluster','Synchronizing...', 'toolbar=0,scrollbars=0,location=0,statusbar=1,menubar=0,resizable=0,width=100,height=100');
```
doSync is a function, n... | [
0.053622156381607056,
-0.04336463287472725,
0.6527705192565918,
-0.07019022852182388,
0.3427107334136963,
-0.018622810021042824,
0.6106659770011902,
-0.41478848457336426,
0.13039103150367737,
-0.6485776305198669,
-0.4258187413215637,
0.7241775393486023,
-0.3795031011104584,
0.0413343347609... | |
false;
form.submit();
}
``` | [
0.3380160331726074,
0.32221752405166626,
0.007109278347343206,
-0.23541346192359924,
0.1111060231924057,
-0.22046713531017303,
0.6396567821502686,
-0.08950704336166382,
0.24409696459770203,
-0.32990971207618713,
-0.43107539415359497,
0.7161543369293213,
-0.3433215022087097,
0.4780204892158... | |
I'm using ragel with C as the host language.
I can recognise a newline simply with '\n', but I need to recognise the start of the file as an alternative.
In other implementations of regex this could be given by `\A` or `$`, but `$` is reserved for other purposes, `'\A'` maps to something else (alarm?) and `\A` gives ... | [
0.03757356479763985,
0.1871916651725769,
0.235468789935112,
-0.4250178337097168,
-0.32795122265815735,
-0.1533212959766388,
0.6221883893013,
0.11715932190418243,
0.03356068953871727,
-0.44469597935676575,
-0.2803703546524048,
0.4946538805961609,
-0.5356939435005188,
0.10675748437643051,
... | |
I have two arrays:
```
var a1 = [ { ID: 2, N:0 }, { ID: 1, N:0 } ];
var a2 = [ { ID: 1, N:0 }, { ID: 2, N:0 }, { ID: 3, N:0 } ];
```
I need to get all elements that are on `a2` but not in `a1`. An element here is distinct of another only by the property `ID`, the other properties should be ignored. And I cannot guar... | [
-0.26353704929351807,
0.08220198005437851,
0.19108079373836517,
-0.3753144443035126,
-0.24597205221652985,
0.24035687744617462,
0.09257577359676361,
-0.6458293795585632,
-0.42237842082977295,
-0.35260826349258423,
-0.025775978341698647,
0.4202224612236023,
-0.2540581226348877,
-0.131628289... | |
the example above
```
How can I do this in an efficient way? (I will be comparing arrays from 500 to 5,000 length)
To do this efficiently, you need to build an index of the items that are already in a1 so you can cycle through a2 and compare each one to the index to see if it's already been seen or not. One can use a... | [
-0.007335145026445389,
0.007548034191131592,
-0.058999478816986084,
0.07201515883207321,
0.11471071094274521,
-0.000773851468693465,
0.20314748585224152,
-0.3904193937778473,
-0.23202602565288544,
-0.7918089628219604,
-0.16321496665477753,
0.3876025080680847,
-0.37938442826271057,
-0.25280... | |
var index = {}, i;
var result = [];
// put baseItems id values into the index
for (i = 0; i < baseItems.length; i++) {
index[baseItems[i].ID] = true;
}
// now go through the testItems and collect the items in it
// that are not in the index
for (i = 0; i < testItems.length; i++) {... | [
0.014089920558035374,
-0.23410116136074066,
0.24058882892131805,
0.0028087240643799305,
0.27012279629707336,
0.1644192934036255,
0.38617002964019775,
-0.7714890837669373,
0.12533193826675415,
-0.31626632809638977,
-0.1897192895412445,
0.3850098252296448,
-0.21229122579097748,
0.08684147894... | |
{
result.push(testItems[i]);
}
}
return(result);
}
var a1 = [ { ID: 2, N:0 }, { ID: 1, N:0 } ];
var a2 = [ { ID: 1, N:0 }, { ID: 2, N:0 }, { ID: 3, N:0 } ];
var result = findUniques(a2, a1);
// [{"ID":3,"N":0}]
```
Working demo: <http://jsfiddle.net/jfriend00/uDEtg/> | [
-0.04095691069960594,
-0.42600810527801514,
0.36008578538894653,
-0.16341619193553925,
0.20279252529144287,
0.4274786710739136,
0.11514581739902496,
-0.7180144190788269,
-0.2547343075275421,
-0.5886068344116211,
-0.30963724851608276,
0.5432977080345154,
-0.035827457904815674,
-0.1240510791... | |
What is wrong with my `If` condition?
```
If Not IsEmpty(Wrkgps_L3) And Not IsEmpty(Wrkgps_L4) Then
Wrkgps_L3L4 = Wrkgps_L3 & "," & Wrkgps_L4
End If
```
The `Not` condition doesn't seem to work. The code within the `If` statement gets executed even when both `Wrkgps_L3` and `Wrkgps_L4` are empty strings.
Update... | [
0.05477278307080269,
0.18798941373825073,
0.225298210978508,
-0.1933189034461975,
0.1401742547750473,
-0.17641803622245789,
0.40908434987068176,
-0.17306217551231384,
0.14226652681827545,
-0.300309956073761,
-0.2918960750102997,
0.5991702675819397,
-0.26267632842063904,
0.37470999360084534... | |
`""`?
In Visual Basic, `Empty` and `""` (an empty string) are two different things. `Empty` is the uninitialized state of a `Variant` variable, and `IsEmpty` tests whether a `Variant` variable has the `Empty` value:
```
Dim x As Variant
If IsEmpty(x) Then
Debug.Print "x is empty"
End If
```
As you've observed, y... | [
-0.08275482058525085,
-0.11208295822143555,
0.19023360311985016,
-0.12043919414281845,
0.06910603493452072,
-0.15794602036476135,
0.18685436248779297,
-0.10935483872890472,
-0.19276419281959534,
-0.45878341794013977,
-0.45357707142829895,
0.5614640712738037,
-0.256357342004776,
0.247603580... | |
I'm making a customer administration software. There are several JPanels with much content on it, constantly communicating with a database. In the database is customer data, products etc.
For a faster access to the database data, at first I load it all in its own ArrayList, e.g. `ArrayList<Customer>`. If the user ch... | [
0.32168838381767273,
-0.15498299896717072,
0.383929580450058,
-0.0858440101146698,
-0.25412675738334656,
0.2183702141046524,
-0.26556429266929626,
-0.0457894504070282,
-0.11433234810829163,
-0.4669252634048462,
0.006904803682118654,
0.41153010725975037,
-0.28524982929229736,
0.222507685422... | |
JPanel and link them all with `View`.
For example an own class for the JPanel `Customer`, where all the customer data can be seen and edited, the same for products etc.
Does is make sense or is it inconvinient? I only want to do so to outsource the code and to make the classes clearer, especially `View`.
Is th... | [
0.2827678322792053,
-0.11280832439661026,
0.3107485771179199,
0.30724093317985535,
-0.4639500379562378,
-0.11388405412435532,
-0.05486337095499039,
0.022438980638980865,
-0.06307623535394669,
-0.6448318362236023,
-0.13304202258586884,
0.5133342742919922,
-0.33479514718055725,
0.10305014252... | |
should break out portions of that UI into other classes.
In short YES. You can always decompose any class into aggregated classes by moving portions of that code out into a new class, and have the original class contain a reference to the new class. This is called delegation or Extract Class refactor. You can read abo... | [
0.00241308961994946,
-0.3021356761455536,
-0.3929867744445801,
0.20811550319194794,
-0.06018645688891411,
-0.11057951301336288,
0.2844635248184204,
-0.12084493041038513,
-0.41321641206741333,
-0.6188721060752869,
-0.3648422658443451,
0.41242775321006775,
-0.36836138367652893,
0.04380033910... | |
classes to move all dependencies to the new class. If you feel like passing a reference back to the main UI to the aggregated class then you probably haven't fully decoupled your classes. That should be a sign either you haven't given enough responsibility to the class you are extracting, or there is some other depende... | [
-0.06357152760028839,
-0.3482131063938141,
0.012614171020686626,
0.5711119174957275,
-0.1066913902759552,
-0.1674121916294098,
0.2112973928451538,
0.2108413577079773,
-0.339799165725708,
-0.43387025594711304,
-0.06497278064489365,
0.26739031076431274,
-0.38502591848373413,
0.32129296660423... | |
its not ok to create cycles between views.
You probably would find this interesting:
[GUI guidelines for swing](https://stackoverflow.com/questions/2337323/gui-guidelines-for-swing/2337940#2337940) | [
0.37707391381263733,
-0.015532352961599827,
0.19295920431613922,
0.04045722633600235,
-0.05341630056500435,
-0.24612641334533691,
0.037728723138570786,
-0.23799055814743042,
-0.5911113619804382,
-0.016092350706458092,
0.2800041735172272,
0.44776830077171326,
-0.27388226985931396,
-0.046479... | |
I'm developing a wordpress 3.3.1 theme and I'm having troubles with the single.php file.
It displays - no matter what post (&p=111 e.g.) you select - only the content of the newest post.
This is my loop:
```
<?php if (have_posts()) : ?>
<?php while (have_posts()) : the_post(); ?>
... | [
0.5101191997528076,
0.2220882624387741,
0.8140205144882202,
-0.04706219211220741,
-0.012356417253613472,
-0.09706217795610428,
0.08137203007936478,
-0.022710757330060005,
-0.11494474858045578,
-0.6510834097862244,
-0.2852626144886017,
-0.044074807316064835,
-0.3185117244720459,
0.356460452... | |
?>
<?php $image = wp_get_attachment_image_src(get_post_thumbnail_id( $post->ID ), 'single-post-thumbnail' ); ?>
<img src="<?php echo $image[0]; ?>" class="cover" />
<?php endif; ?>
<p class="page-text">
<?php the_content(); ?> | [
0.17180773615837097,
0.03289642557501793,
0.8120657801628113,
-0.3176652789115906,
-0.09797734767198563,
0.0554363876581192,
0.026805203408002853,
-0.5651003122329712,
-0.2711535692214966,
-0.4610365927219391,
-0.4500088393688202,
0.31600508093833923,
-0.4035854935646057,
-0.05317837744951... | |
</p>
<?php endwhile; ?>
<?php endif; ?>
```
What could be wrong? I hope you've understood my problem. Thank you!
edit:
I recently updated the header file. When I delete this loop, it works fine:
```
<ul class="nav-dropdown"> | [
0.13599172234535217,
0.10355409979820251,
0.31984376907348633,
-0.031009098514914513,
0.020795216783881187,
-0.06272765249013901,
0.46120163798332214,
0.18721123039722443,
-0.39288777112960815,
-0.45997607707977295,
-0.16835321485996246,
0.4523080587387085,
-0.2954731583595276,
0.245951429... | |
<?php
$cat_args = array(
'orderby' => 'name',
'order' => 'ASC', | [
-0.12281623482704163,
0.09271366149187088,
0.5806118249893188,
-0.4763624966144562,
0.1426587998867035,
0.21793508529663086,
0.3910759687423706,
-0.3996838927268982,
-0.38538530468940735,
-0.2667122781276703,
-0.3697001338005066,
0.34351202845573425,
-0.5683393478393555,
0.0774512216448783... | |
'child_of' => 5,
'exclude' => '1,2,3,4,5,6,8,9,10,11,12,13,14'
); | [
-0.22507253289222717,
0.07326952368021011,
0.1905486136674881,
-0.34165382385253906,
0.2343425154685974,
1.0170279741287231,
0.24436505138874054,
-0.2744090259075165,
0.04394626244902611,
-0.47562864422798157,
-0.3842431902885437,
-0.02374185435473919,
-0.22918930649757385,
0.4104279875755... | |
$categories = get_categories($cat_args);
foreach($categories as $category) {
$post_args = array( | [
-0.06530880928039551,
0.0023814081214368343,
0.34519216418266296,
-0.4291916787624359,
-0.21271111071109772,
0.09967445582151413,
0.4151173233985901,
-0.33211711049079895,
-0.5122208595275879,
-0.26383477449417114,
-0.451606810092926,
0.1328483521938324,
-0.8117741346359253,
0.297546982765... | |
'category' => $category->term_id
);
$posts = get_posts($post_args); | [
-0.04106670990586281,
-0.1880057454109192,
0.4313153326511383,
-0.23210011422634125,
-0.27331095933914185,
-0.09707364439964294,
0.38717570900917053,
-0.2152601033449173,
-0.3022746443748474,
-0.5326973795890808,
-0.5650945901870728,
0.19694776833057404,
-0.5936914682388306,
0.420443117618... | |
foreach($posts as $post) {
?>
<li class="nav-dropdown"><a href="<?php the_permalink(); ?>" class="pagelink"><?php the_title(); ?></a></li> | [
-0.13230273127555847,
0.12946099042892456,
0.7599642872810364,
-0.3285110294818878,
-0.1340271532535553,
0.17316916584968567,
0.15546493232250214,
-0.26806503534317017,
0.018930256366729736,
-0.5970796346664429,
-0.39703693985939026,
0.23645834624767303,
-0.20871567726135254,
0.39137265086... | |
<?php
}
}
?> | [
0.07360322028398514,
0.1444060355424881,
0.07307377457618713,
0.055953726172447205,
-0.021330196410417557,
0.06890042871236801,
0.3999483585357666,
0.27930834889411926,
-0.16654232144355774,
-0.3419462740421295,
-0.09516246616840363,
0.20609523355960846,
-0.20899459719657898,
0.34632450342... | |
</ul>
```
I'd change your variable names in the header as ones such as `$post` are reserved by Wordpress for handling single post pages. | [
0.26455873250961304,
-0.0032018469646573067,
0.33785033226013184,
-0.011859213002026081,
-0.18276351690292358,
0.1914660632610321,
0.09002514183521271,
0.3554953336715698,
-0.27612361311912537,
-0.6333132386207581,
-0.19129540026187897,
0.10763262957334518,
-0.3942875564098358,
0.456486999... | |
I know variants of this question have been asked before (even by me), but I still don't understand a thing or two about this...
It was my understanding that one could retrieve more documents than the 128 default setting by doing this:
```
session.Advanced.MaxNumberOfRequestsPerSession = int.MaxValue;
```
And I've l... | [
-0.16232968866825104,
-0.08717692643404007,
0.6080175638198853,
0.12371806055307388,
0.17496685683727264,
-0.3210354745388031,
0.32160839438438416,
-0.44641822576522827,
-0.09458984434604645,
-0.5096153616905212,
-0.4440627098083496,
0.7768137454986572,
-0.2321702539920807,
-0.029251685366... | |
}
}
```
However, that only returns 128 documents. Why?
Note, here is the code that calls the above method:
```
RavenDataAccessComponent.GetObjectList<Ccm>(x => x.TimeStamp > lastReadTime);
```
If I add Take(n), then I can get as many documents as I like. For example, this returns 200 documents:
```
return sessi... | [
-0.16334415972232819,
-0.005655317101627588,
0.6487040519714355,
0.02724532224237919,
0.2941012978553772,
-0.05356130003929138,
0.08883441239595413,
-0.317802757024765,
-0.5320336222648621,
-0.6078360676765442,
0.05290599539875984,
0.6709679365158081,
-0.15626183152198792,
0.13122344017028... | |
thousands of documents (that have very little data in them). We keep these documents in memory and used as the data source for charts.
\*\* EDIT \*\*
I tried using int.MaxValue in my Take():
```
return session.Query<T>().Where(whereClause).Take(int.MaxValue).ToList();
```
And that returns 1024. Argh. How do I get ... | [
0.17449401319026947,
-0.03131256252527237,
0.5908674597740173,
0.32359033823013306,
0.13656125962734222,
0.11160007864236832,
0.12333721667528152,
-0.38262394070625305,
-0.4416525065898895,
-0.7645148038864136,
0.11544227600097656,
0.5212278962135315,
-0.05865401774644852,
-0.0082484139129... | |
<http://ravendb.net/docs/intro/safe-by-default> | [
0.27294406294822693,
-0.030788911506533623,
0.14848202466964722,
0.037142522633075714,
0.303459107875824,
-0.7878684997558594,
0.4262169599533081,
-0.06029042229056358,
-0.02438526228070259,
-0.13214685022830963,
-0.4538320004940033,
0.6143282055854797,
-0.22265903651714325,
-0.13129657506... | |
I have a number of png, bitmaps and icons which I want to use in both Winforms projects and WPF projects.
I'm comfortable with using resources in winforms, and happy with resources in WPF.
What are people doing where they have common resources shared by both? My current feeling is to have a WPF resource assembly an... | [
0.3911486566066742,
-0.11699579656124115,
0.0621090829372406,
0.20162051916122437,
0.035216040909290314,
-0.17181620001792908,
-0.12302453070878983,
0.05761528015136719,
-0.3884184658527374,
-1.0409069061279297,
0.2604779303073883,
0.6160074472427368,
-0.060670968145132065,
0.1106892377138... | |
path.
Assuming that your project name is "MyProject", and the images path is a folder named "MyImages", inside the projects folder, and your image name is "MyImage.bmp" you can load them as follows:
**In Winforms:**
```
new Bitmap(Assembly.GetExecutingAssembly().GetManifestResourceStream("MyProject.MyImages.MyIma... | [
0.2899535894393921,
-0.26790228486061096,
0.5919178128242493,
0.18349191546440125,
-0.07681859284639359,
-0.10102184116840363,
0.11878930777311325,
-0.15458816289901733,
-0.1336500495672226,
-1.0849828720092773,
-0.1773809790611267,
0.6208833456039429,
-0.19535304605960846,
0.0902596637606... | |
Okay, I'm getting this error when I try to execute this procedure. The thing is I'm not trying to convert to a bit at any time. At least not on purpose. I'm a bit stumped at the moment.
```
Declare @AValue varchar(max)
set @AValue = (SELECT Value
FROM dbo.Tbl
WHERE Name=@FILE
AND Value L... | [
0.5341203212738037,
0.06591114401817322,
0.4293971061706543,
-0.2602538466453552,
0.05484582483768463,
0.1902550905942917,
0.6298621892929077,
-0.3031668961048126,
-0.04750270023941994,
-0.5654758810997009,
-0.0680464655160904,
0.7973231673240662,
-0.37711402773857117,
0.41084739565849304,... | |
Value,
Type,
CDT,
UDT,
Active,
User
)
VALUES
(
'Agreement',
(CAST(@MODID AS varchar(15)) + '|' + @AValue),
'Download',
GETDATE(),
GETDATE(),
1,
@USER
)
```
Sorry, found the answer. I came back today and the error I was getting was completely different than th... | [
0.30322501063346863,
0.009622449055314064,
0.6044628620147705,
0.06934481859207153,
0.21512451767921448,
0.11197467148303986,
0.1889623999595642,
-0.26148757338523865,
-0.12195359170436859,
-0.27994298934936523,
-0.3002799153327942,
0.6140556931495667,
-0.24061374366283417,
0.2146246880292... | |
to write that error.
Problem was my WHERE clause was getting multiple returns from the database cause I had been testing a lot, so there were duplicate rows. | [
0.07359381020069122,
0.27075496315956116,
0.042308345437049866,
0.03568417206406593,
-0.17752669751644135,
0.15319430828094482,
0.5080302357673645,
-0.0017861936939880252,
-0.18511292338371277,
-0.35449621081352234,
0.6176835298538208,
0.4008781909942627,
-0.26319578289985657,
0.2189284861... | |
I need to setup a web page that listens for XML document via an HTTP POST. I don't need to POST out, I need to receive that POST. What object does this? Should I use an HTTP handler, web service, webRequest, Stream or something else? I need to use a IIS Server and prefer C#.
**I've Tried...**
1. I dont think I can us... | [
0.29800766706466675,
0.06838545203208923,
0.48243042826652527,
0.1692807376384735,
-0.41639482975006104,
-0.2204592227935791,
0.22973020374774933,
-0.031142722815275192,
-0.008140649646520615,
-0.9884587526321411,
0.16918566823005676,
0.44978758692741394,
-0.15123356878757477,
0.0782775953... | |
application? I put it in
<http://forums.asp.net/t/1371873.aspx/1>
3. I've tried a simple web service <http://msdn.microsoft.com/en-us/library/bb412178.aspx> - But when i try to visit "http://localhost:8000/EchoWithGet?s=Hello, world!", i get a "webpage cannot be found error"
If anyone has any helpful code or links tha... | [
0.0791303962469101,
0.11461147665977478,
0.4287099242210388,
-0.03751784563064575,
-0.06124161556363106,
0.1815098226070404,
0.539203405380249,
-0.18590512871742249,
-0.11487027257680893,
-0.6798990964889526,
-0.027515603229403496,
0.4279572069644928,
-0.5128459334373474,
0.060930401086807... | |
will contain the body of the request that comes from the client.
Here's an example of how you could write a generic handler (`MyHandler.ashx`):
```
public class MyHandler : IHttpHandler
{
public void ProcessRequest(HttpContext context)
{
var stream = context.Request.InputStream;
byte[] buffer ... | [
0.12155996263027191,
-0.15129104256629944,
0.5276849269866943,
-0.07282641530036926,
-0.046782638877630234,
0.06989458203315735,
0.20394058525562286,
-0.3050307631492615,
-0.04594941437244415,
-0.8441929817199707,
-0.369770884513855,
0.2749941051006317,
-0.38385653495788574,
0.246123597025... | |
// We only set the HTTP status code to 202 indicating to the
// client that the request has been accepted for processing
// but we leave an empty response body
context.Response.StatusCode = 202;
}
public bool IsReusable
{
get
{
return false; | [
0.1337880641222,
-0.2609904408454895,
0.4498656988143921,
-0.3011475205421448,
0.035159867256879807,
-0.11391301453113556,
0.5512954592704773,
-0.29353055357933044,
0.007279142737388611,
-0.42489948868751526,
-0.5651212930679321,
0.44325190782546997,
-0.20770041644573212,
-0.04892646893858... | |
}
}
}
``` | [
0.033695679157972336,
0.4034728407859802,
0.1949702352285385,
-0.15257494151592255,
0.4299153685569763,
-0.20141436159610748,
0.07711705565452576,
0.4467844069004059,
0.3091506361961365,
-0.5090379118919373,
-0.3048633635044098,
0.5600791573524475,
-0.33611243963241577,
0.3141762912273407,... | |
I'm trying to get the number of games that summoners in the queue have played today. I have tried several queries. The closest I have gotten is:
```
SELECT
s.summoner,
s.wins,
COUNT(*) as playedToday
FROM summoners s
LEFT JOIN teams_players tp ON tp.summoner_id = s.summoner
LEFT JO... | [
0.20025858283042908,
-0.08213449269533157,
0.5705849528312683,
-0.18415389955043793,
-0.2655702233314514,
0.22974061965942383,
-0.10423668473958969,
-0.08506142348051071,
-0.39246201515197754,
-0.8088574409484863,
-0.07242604345083237,
0.4412040114402771,
-0.17886897921562195,
0.1811982095... | |
b.played_on = DATE(NOW())
s.in_queue;
```
But that doesn't give the count per-user. It just gets the overall count.
None of the tables have any data on any of the summoners. What I'd like is something like:
```
+-----------------+------+-------------+
| summoner | wins | gamesPlayed |
+--... | [
-0.05210580676794052,
-0.008279355242848396,
0.8199405670166016,
-0.23170091211795807,
-0.09601530432701111,
-0.00943952426314354,
0.023531733080744743,
-0.17234018445014954,
-0.40030908584594727,
-0.12182267010211945,
0.0064319404773414135,
0.4348522424697876,
-0.3035607933998108,
0.36341... | |
| 440 | 0 |
| Nammon | 667 | 0 |
| VictorousSecret | 843 | 0 |
| Canas | 544 | | [
-0.4503994584083557,
0.3606567084789276,
-0.2207043617963791,
-0.1253497451543808,
-0.4783610999584198,
0.691578209400177,
0.4399762749671936,
-0.23430384695529938,
-0.4069431722164154,
-0.11318527907133102,
-0.42652371525764465,
0.5373474955558777,
-0.5221977233886719,
-0.3645449578762054... | |
0 |
| Sprognak | 502 | 0 |
| Ghostilocks | 808 | 0 |
| b0b d0e | 224 | 0 |
| Metroshica | 339 | | [
-0.5712146162986755,
-0.17522071301937103,
0.02803402952849865,
-0.016560157760977745,
-0.15840424597263336,
0.23358100652694702,
0.3160429894924164,
0.06828586012125015,
-0.15302622318267822,
-0.33870768547058105,
-0.18714962899684906,
0.007481672335416079,
-0.3525606393814087,
0.53216636... | |
0 |
| RubenatorX | 478 | 0 |
+-----------------+------+-------------+
```
I can't think how to express this problem generically, which is why I haven't found a solution.
---
My data set. Note that `teams.id` matches up with `matches.blue_id` and `matches.purple_id`.
```
mysql> DESCRIBE summ... | [
-0.25631508231163025,
0.0258265919983387,
0.6199530363082886,
0.044668667018413544,
-0.17413215339183807,
0.0019805312622338533,
0.43476954102516174,
-0.44878941774368286,
0.10804428905248642,
-0.4158163368701935,
-0.1644670069217682,
0.7083466649055481,
-0.45031729340553284,
0.08921358734... | |
|
+--------------+-------------+------+-----+---------+----------------+
| id | int(11) | NO | PRI | NULL | auto_increment |
| icon | int(11) | NO | | 0 | |
| summoner | varchar(32) | NO | UNI | NULL | [
-0.469222754240036,
-0.06617917865514755,
0.42014622688293457,
-0.0977371484041214,
-0.03762088343501091,
0.5492027401924133,
0.08193151652812958,
-0.5651309490203857,
-0.15627558529376984,
-0.2778575122356415,
-0.2003261297941208,
0.6226261854171753,
-0.4187770485877991,
0.118517577648162... | |
| |
| skype | varchar(32) | NO | | NULL | |
| email | varchar(32) | NO | | NULL | | [
-0.4012009799480438,
0.1267155408859253,
0.05214759707450867,
-0.16458319127559662,
-0.08670926839113235,
0.14376690983772278,
0.4213348627090454,
0.09857607632875443,
-0.17541192471981049,
-0.2932027280330658,
-0.26399466395378113,
0.4158252775669098,
-0.7428332567214966,
0.10193321108818... | |
|
| in_queue | tinyint(1) | NO | | 0 | |
| wins | int(11) | NO | | 0 | |
| level | [
-0.3635636568069458,
-0.3248680830001831,
0.1644364595413208,
0.054903529584407806,
0.3651481866836548,
0.027198240160942078,
0.037812866270542145,
0.24994440376758575,
-0.11713497340679169,
-0.4447953402996063,
-0.03301210328936577,
0.2845763564109802,
-0.23211254179477692,
0.101536549627... | |
| int(11) | NO | | 1 | |
| lan_wins | int(11) | NO | | 0 | |
| played_today | int(11) | NO | | [
-0.21285463869571686,
-0.06542006880044937,
0.07524026930332184,
-0.22765682637691498,
0.2971133887767792,
-0.2611120939254761,
-0.017188455909490585,
0.17858967185020447,
-0.2654813230037689,
-0.5478498935699463,
-0.21949610114097595,
0.3690183758735657,
-0.265570729970932,
0.051983091980... | |
| 0 | |
+--------------+-------------+------+-----+---------+----------------+
10 rows in set (0.00 sec)
mysql> DESCRIBE matches;
+-----------+-------------+------+-----+---------------------+----------------+
| Field | Type | Null | Key | Default | Extra |
+-------... | [
-0.5709546208381653,
0.004648396745324135,
0.5207536220550537,
0.10362591594457626,
0.28099238872528076,
0.1247171014547348,
0.14921095967292786,
-0.3270915150642395,
0.042149946093559265,
-0.6503745317459106,
-0.2552235424518585,
0.3279624283313751,
-0.09602668136358261,
0.000802797032520... | |
| auto_increment |
| blue_id | int(11) | NO | MUL | NULL | |
| purple_id | int(11) | NO | MUL | NULL | | [
-0.03373106196522713,
-0.11267033964395523,
0.07906008511781693,
-0.18602149188518524,
0.26824700832366943,
0.29755672812461853,
0.12184137105941772,
0.11467837542295456,
-0.09431381523609161,
-0.40074244141578674,
-0.44234082102775574,
0.448000431060791,
-0.43300023674964905,
0.1610195338... | |
|
| status | varchar(32) | NO | | display | |
| played_on | datetime | NO | | 2012-04-06 13:53:55 | |
+-----------+-------------+------+-----+---------------------+----------------+
5 rows in set (0.00 sec)
mysql> | [
-0.6067872047424316,
-0.04976910352706909,
0.609022319316864,
0.3161005675792694,
0.34797781705856323,
0.13201230764389038,
0.4129807651042938,
-0.1701665222644806,
-0.4283151924610138,
-0.7365303635597229,
-0.18473513424396515,
0.3517119884490967,
0.04038761183619499,
0.28937992453575134,... | |
DESCRIBE teams;
+---------+-------------+------+-----+------------+----------------+
| Field | Type | Null | Key | Default | Extra |
+---------+-------------+------+-----+------------+----------------+
| id | int(11) | NO | PRI | NULL | auto_increment |
| outcome | varchar(32) | NO... | [
-0.5081729888916016,
-0.11976240575313568,
-0.019875619560480118,
0.16064195334911346,
0.19248197972774506,
-0.09169391542673111,
0.29862502217292786,
-0.33299440145492554,
-0.041915904730558395,
-0.9045352339744568,
-0.3259044885635376,
0.199147030711174,
-0.29224535822868347,
-0.18224020... | |
DESCRIBE teams_players;
+-------------+---------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+-------------+---------+------+-----+---------+----------------+
| id | int(11) | NO | PRI | NULL | auto_increment |
| team_id | int(11) | NO |... | [
-0.39112111926078796,
0.04091624170541763,
-0.027159545570611954,
0.10033322125673294,
0.11593473702669144,
-0.09127072989940643,
0.23830506205558777,
-0.3507176339626312,
-0.17404966056346893,
-0.7682072520256042,
-0.2515803873538971,
0.20547886192798615,
-0.47072505950927734,
-0.25138819... | |
| MUL | NULL | |
+-------------+---------+------+-----+---------+----------------+
3 rows in set (0.00 sec)
```
So, I made a quick fiddle...
<http://jsfiddle.net/xqnWF/4/>
And, as you can see if you click "Trigger" and then "Button", it works as intended. Could you shed some more light on the sequen... | [
-0.13179437816143036,
-0.043357428163290024,
1.0782580375671387,
-0.11110980808734894,
-0.13129860162734985,
0.11349210143089294,
0.29649242758750916,
-0.7798885703086853,
-0.33640730381011963,
-0.4161922037601471,
0.2755151689052582,
0.508635938167572,
-0.07890363782644272,
0.082385189831... | |
Normally when you have a div created in html. You can check its width with offsetWidth or style.width (if declared). However if the innerHTML is changed such that the width of the div is also change, neither of those functions work (not sure, but they haven't in my cases).
some code:
```
var div = document.createEle... | [
0.31301841139793396,
-0.15599796175956726,
0.7054911255836487,
-0.15272699296474457,
-0.2508079409599304,
-0.41889432072639465,
0.3608139157295227,
-0.3884248733520508,
-0.2606983780860901,
-0.7793870568275452,
-0.3162374496459961,
0.47536155581474304,
-0.3448234498500824,
-0.1977625489234... | |
I know there are similar questions regarding serial numbers but my case is a little different.
I need to assign serial number based on the group variable. Now, I have my data sorted by the group variable. The following data is just a part of the whole dataset. Basically, I want to create "serial\_num" variable that ass... | [
0.35543909668922424,
0.30518341064453125,
0.13391968607902527,
-0.03923134133219719,
-0.08466999977827072,
0.145781010389328,
-0.022479653358459473,
0.14022545516490936,
-0.5459606051445007,
-0.5622483491897583,
0.19479840993881226,
0.49921563267707825,
-0.2777385115623474,
0.5010355710983... | |
group
----------------
1 1
2 1
. .
. .
. .
7 2
7 2
8 2
8 | [
-0.5475741028785706,
0.41190221905708313,
0.3404861092567444,
-0.3216079771518707,
-0.029439058154821396,
-0.027783330529928207,
0.03248332440853119,
-0.5875927209854126,
-0.09596910327672958,
-0.39747706055641174,
-0.08503815531730652,
-0.24755920469760895,
-0.2521970868110657,
0.30654665... | |
2
. .
. .
. .
10 3
10 3
10 3
11 3
11 3
11 3
. | [
-0.15006348490715027,
0.5779403448104858,
0.23094220459461212,
-0.3952510356903076,
-0.3862708508968353,
0.4539076089859009,
0.5067249536514282,
-0.4473963677883148,
-0.2890748977661133,
-0.8374103307723999,
-0.11104068905115128,
0.17020118236541748,
-0.15746934711933136,
-0.32840681076049... | |
.
. .
. .
```
An odd requirement, but here's a solution using plain old data step.
```
data output;
set input;
by group;
if first.group or c = group then do;
c = 0;
serial_num + 1;
end;
c + 1;
drop c;
run;
``` | [
-0.20005719363689423,
0.0492621585726738,
0.30565518140792847,
-0.23602738976478577,
0.3158549666404724,
-0.07612553238868713,
0.3410758376121521,
-0.40110915899276733,
-0.2713049054145813,
-0.2311597764492035,
-0.4243430495262146,
0.5109622478485107,
-0.4067409336566925,
0.372218877077102... | |
What I am trying to do, is create a method, that has a string and a character as parameters, the method then takes the string and searches for the given character. If the string contains that character, it returns an array of integers of where the character showed up. Here is what I have so far:
```
public class Sheet... | [
0.2325894981622696,
0.16318462789058685,
0.43196097016334534,
-0.2697450816631317,
0.09934799373149872,
0.19171549379825592,
0.2358010858297348,
-0.2955746650695801,
-0.03284792974591255,
-0.38459286093711853,
0.09052883088588715,
0.506742000579834,
-0.3640373945236206,
0.47703900933265686... | |
complete = StringSearch(string,'n').toString();
}
//********
}
public static int[] StringSearch(String string, char lookfor) {
int[]num = new int[string.length()];
for(int i = 0; i < num.length; i++){
if(string.charAt(i)== lookfor){
num[i] = i;
}
}
return num... | [
-0.11503742635250092,
-0.1025640219449997,
0.5367562174797058,
-0.5229545831680298,
-0.048082705587148666,
-0.18951302766799927,
0.5373069047927856,
-0.7523999214172363,
0.2048235386610031,
-0.5280042290687561,
-0.35473868250846863,
0.6314615607261658,
-0.3004152476787567,
0.20765903592109... | |
string so it would look like this "002300".
Is there any possible way of doing this? I have tried to do it in the starred area of the code, but I have had no success.
just do
```
StringBuffer strBuff = new StringBuffer();
for(int i = 0; i<str.length(); i++)
{
if(str.charAt(i) == reqChar)
{
strBuff.appe... | [
0.08883865177631378,
-0.00371160707436502,
0.8920250535011292,
-0.6100924015045166,
-0.024927495047450066,
0.09495212137699127,
0.569945216178894,
-0.45007002353668213,
-0.17175136506557465,
-0.6226816773414612,
-0.07428360730409622,
0.7616354823112488,
-0.3969349265098572,
0.1556981652975... | |
I have spent considerable time researching and trying to figure out where I have gone wrong with my configuration but am completely stuck. From the posts I have been reading the implication is that my driver is not in the classpath. I added the Class.forName("com.ibm.db2.jcc.DB2Driver") line to ensure that the driver i... | [
0.49616315960884094,
0.2794778645038605,
-0.030512699857354164,
-0.2508133351802826,
0.027503807097673416,
0.13945680856704712,
0.4611281156539917,
0.113095223903656,
0.20626290142536163,
-0.8436863422393799,
0.1014786884188652,
0.6288145184516907,
-0.27614715695381165,
0.3575421869754791,... | |
try {
DB2Driver drvr = (DB2Driver) Class.forName("com.ibm.db2.jcc.DB2Driver").newInstance();
Configuration cfg = new Configuration();
cfg.configure("hibernate.cfg.xml");
sessionFactory = cfg.buildSessionFactory();
Session sess = sessionFactory.getCurrentSessi... | [
0.07138531655073166,
-0.13515616953372955,
0.6099916696548462,
-0.17889776825904846,
0.1347893476486206,
0.2144366055727005,
0.5628803372383118,
-0.3836437165737152,
-0.0027522749733179808,
-0.6674841046333313,
-0.3546530604362488,
0.5823876857757568,
-0.4006286561489105,
0.214802771806716... | |
Criteria crit = sess.createCriteria(ItemData.class);
List items = crit.list();
} catch (Exception e) {
Logger logger = Logger.getLogger("");
logger.error(e.getMessage());
}
}
}
```
I get the class not found error when my code hits:
sessionFactory = cfg.buildSes... | [
0.38762086629867554,
0.005740299355238676,
0.6942914724349976,
-0.21464771032333374,
-0.016196267679333687,
0.05709991604089737,
0.45471370220184326,
-0.8989788293838501,
-0.3754919171333313,
-0.7833426594734192,
-0.17263463139533997,
0.6782621145248413,
-0.2827620208263397,
0.137209415435... | |
name="speed2db2">
<property name="hibernate.dialect">org.hibernate.dialect.DB2Dialect</property>
<property name="hibernate.connection.driver_class">com.ibm.db2.jcc.DB2Driver</property>
<property name="hibernate.connection.url">jdbc:db2://appdb:50000/MYTEST</property>
<property name="hibernate.connection.username... | [
-0.2865813672542572,
0.4515945613384247,
0.3925498425960541,
-0.08933810889720917,
-0.13023775815963745,
0.38956186175346375,
0.2600729167461395,
-0.4607003331184387,
-0.31511637568473816,
-0.7387386560440063,
-0.2815960943698883,
0.4554460644721985,
0.11480362713336945,
0.3561232089996338... | |
<property name="hibernate.connection.password" value="myPass"/>
<property name="hibernate.connection.driver_class" value="com.ibm.db2.jcc.DB2Driver"/>
</properties>
</persistence-unit>
</persistence>
```
From within Eclipse I am able to connect to the database and if I go to the Hibernate pers... | [
0.2178664654493332,
0.24284934997558594,
0.553642749786377,
-0.1431449055671692,
-0.4509182572364807,
-0.003559834323823452,
0.24047008156776428,
-0.3686405420303345,
-0.11811559647321701,
-0.6471585035324097,
-0.1570778489112854,
0.6789259910583496,
-0.05648311227560043,
0.091804243624210... | |
[org.hibernate.cfg.Configuration] (http-xxxxxx-xx.xx.xx.xxxx-15081-1) HHH000041: Configured SessionFactory: speed2db2
09:35:52,059 INFO [org.hibernate.service.jdbc.connections.internal.DriverManagerConnectionProviderImpl] (http-xxxxxx-xx.xx.xx.xxxx-15081-1) HHH000402: Using Hibernate built-in connection pool (not for ... | [
-0.10967957973480225,
0.1560918390750885,
0.5969139933586121,
-0.2620128095149994,
-0.19744418561458588,
0.17658518254756927,
0.621502697467804,
-0.3406633138656616,
-0.023777972906827927,
-0.5000386834144592,
-0.20496748387813568,
0.6722914576530457,
-0.34311482310295105,
0.29489064216613... | |
instead of trying to make the connection from Hibernate. | [
0.4804510176181793,
-0.050217997282743454,
0.012489342130720615,
0.1034112498164177,
-0.3574407994747162,
0.04163728281855583,
0.20668937265872955,
0.13216498494148254,
-0.009002257138490677,
-0.24034953117370605,
-0.009989992715418339,
0.0845889300107956,
-0.1596871167421341,
0.1381648927... | |
If a user clicks on a downloadable link such as
```
<a href="downloadable.txt">Download</a>
```
Is there a client-side (html or javascript) way to change the name of the file before the 'Save As' dialog?
No, you cannot change this from the client side (HTML or javascript). You need to change it from the server. One ... | [
0.3122512102127075,
-0.31699231266975403,
0.38662540912628174,
0.04388609528541565,
0.05811779573559761,
-0.0851311907172203,
0.07352341711521149,
0.13402993977069855,
-0.3523409366607666,
-0.7619808912277222,
-0.5915213823318481,
0.40411946177482605,
-0.25359290838241577,
0.29943376779556... | |
I'm using a SQL Server database in my program with Linq-to-SQL
I'm using this code to empty the database
```
db.Tb1.DeleteAllOnSubmit(db.Tb1.Select(x => x));
db.SubmitChanges();
```
After executing this code, everything in the database will be cleared out. But the problem is the size of database didn't decrease w... | [
0.18096329271793365,
0.429409384727478,
0.32443180680274963,
-0.02634643390774727,
0.017940880730748177,
-0.14091280102729797,
0.4080178439617157,
-0.2389177829027176,
-0.25399160385131836,
-0.5268667936325073,
0.017653102055191994,
0.41153496503829956,
-0.43555840849876404,
0.378053724765... | |
database file. Otherwise the unused space is kept and reused as new records are added. | [
0.2530140280723572,
0.22113527357578278,
0.30559322237968445,
0.45198675990104675,
0.5811818838119507,
-0.32206040620803833,
-0.09156761318445206,
0.07131290435791016,
-0.3719770014286041,
-0.48583370447158813,
-0.3464720547199249,
0.14724253118038177,
-0.1963464915752411,
0.73840141296386... | |
I'm having trouble getting IE to play nice with my regex. I'm trying to grab the background image and use it elsewhere on the site. It works in every browser except IE (of course).
Here's the code:
```
var bgImg = body.css('background-image').replace(/^url\(['"]*(.+)['"]*\).*/, '$1');
```
It really should work, but... | [
0.39030957221984863,
-0.025842059403657913,
0.5969668030738831,
-0.13097846508026123,
-0.284243106842041,
-0.1864001601934433,
0.37695154547691345,
0.16587349772453308,
0.15694069862365723,
-0.8100972771644592,
-0.09275011718273163,
0.5825192928314209,
-0.2865162789821625,
-0.1486193537712... | |
but it may have to do with the greediness of the \*.
Yours fails for me in IE9 and this regex works here: <http://jsfiddle.net/jfriend00/yyqB6/> | [
0.2775104343891144,
0.1725798100233078,
0.35417526960372925,
0.026867592707276344,
0.08394791185855865,
-0.027080392464995384,
0.711391806602478,
0.3545786440372467,
0.13163985311985016,
-0.7955024838447571,
0.10742161422967911,
0.6237965822219849,
-0.07794339954853058,
-0.0343391150236129... | |
A very basic question.. but I always do the bad implementation of this.
I have a list of ints.
And then I have a int "k" and "j"
I want to do something like this:
```
for ele in foo_list:
ele = (ele - k) / j
```
Is there a pythonic syntactic sugar to make this thing look pretty .
Also, i have a bad feeling lik... | [
0.13921062648296356,
0.28002747893333435,
-0.08134371787309647,
-0.06369078904390335,
-0.008029170334339142,
-0.049157023429870605,
0.36251527070999146,
0.01335217710584402,
-0.2285090833902359,
-0.5099042654037476,
-0.0383845753967762,
0.5239898562431335,
-0.4684678614139557,
-0.060505039... | |
some point? or is it safe to do these kind of operations?
Thanks
Thanks.
Your code should be
```
foo_list = [ (ele - k) / j for ele in foo_list]
```
Edit: To answer your second question, `val = f(val)` is fine. But the way you were trying to use it doesn't work: `ele` isn't a pointer to the element in the list, it'... | [
0.14155110716819763,
0.17373836040496826,
0.022599516436457634,
0.28324684500694275,
-0.007208982948213816,
-0.018963700160384178,
0.029614875093102455,
0.15287166833877563,
0.010005646385252476,
-0.4623725414276123,
0.03499946743249893,
0.3870418667793274,
-0.18821804225444794,
0.13581107... | |
Suppose I have a directory A, and subdirectory B. I cd into A and launch lisp. In that lisp process, I would like to launch a Python subprocess where Python sees B as its current working directory. The lisp process needs to have cwd in A, and the python process should have cwd in B. How do I do this in a cross-platform... | [
0.3002015948295593,
0.11976102739572525,
-0.02187054418027401,
-0.08614928275346756,
-0.11402929574251175,
-0.2760825455188751,
-0.11130445450544357,
-0.060719072818756104,
-0.20389078557491302,
-0.5488898158073425,
0.11210869997739792,
0.3620645999908447,
-0.545686662197113,
-0.0655451640... | |
way to change the cwd of the launched process.
I looked at Python command-line arguments, and I didn't see one that would change the cwd of the python process.
I thought about a run-program call for 'cd B; python ...', but I'm not sure how that would work, since it's really running two programs; cd, and then python.
... | [
0.433522492647171,
-0.19958916306495667,
0.15060436725616455,
0.08801562339067459,
-0.0903581902384758,
-0.012286284007132053,
-0.13558761775493622,
0.2218923270702362,
-0.21694666147232056,
-0.7066577076911926,
-0.09807325899600983,
0.6675042510032654,
-0.3070373833179474,
0.1792192459106... | |
listening to stdout of the python process launched by lisp. Adding another subprocess in between lisp and the python process that evals the input file means I'd need to do a lot of stout/stdin relaying, and I have a feeling that this would be brittle.
krzysz00's approach worked very well. Since the directory change is... | [
-0.007352570071816444,
0.20880313217639923,
0.144076406955719,
-0.30527520179748535,
-0.3593991696834564,
-0.08553921431303024,
0.4172670841217041,
-0.12564760446548462,
-0.1702466458082199,
-0.5291866660118103,
0.03748852014541626,
0.6578382253646851,
-0.5180295705795288,
-0.1584649533033... | |
Lambda](http://letoverlambda.com), to easily avoid unwanted variable capture:
```
#+:SBCL
(defun cwd (dir)
(sb-posix:chdir dir))
(defun getcwd ()
#+SBCL (sb-unix:posix-getcwd)
#+CCL (current-directory))
(defmacro! with-cwd (dir &body body)
`(let ((,g!cwd (getcwd)))
(unwind-protect (progn
... | [
0.11445474624633789,
-0.09559176117181778,
0.6830052733421326,
-0.218449667096138,
0.1890445202589035,
0.15896563231945038,
0.06613700091838837,
-0.6142056584358215,
-0.17286072671413422,
-0.09675636142492294,
-0.04721558094024658,
0.9341589212417603,
-0.5761557817459106,
-0.10428719222545... | |
[external-program](http://common-lisp.net/project/external-program/). To change the current working directory, use this slightly modified (public domain) function `cwd` from the file <http://files.b9.com/lboot/utils.lisp>, which is reproduced below.
```
(defun cwd (&optional dir)
"Change directory and set default pa... | [
-0.48094871640205383,
0.07242193073034286,
0.8382962346076965,
-0.46085840463638306,
-0.08995306491851807,
-0.10004278272390366,
0.07528956234455109,
-0.21438391506671906,
0.03839198499917984,
-0.29720747470855713,
-0.40664684772491455,
0.7148106098175049,
-0.35058993101119995,
-0.12728828... | |
#+(or cmu scl) (setf (ext:default-directory) dir)
#+cormanlisp (ccl:set-current-directory dir)
#+(and mcl (not openmcl)) (ccl:set-mac-default-directory dir)
#+openmcl (ccl:cwd dir)
#+gcl (si:chdir dir)
#+lispworks (hcl:change-directory dir)
#+sbcl (sb-posix:chdir dir)
(setq cl:*default-pathn... | [
-0.4707680344581604,
-0.09027016907930374,
1.2615432739257812,
-0.04109657183289528,
-0.05455904081463814,
-0.15808333456516266,
-0.09540177136659622,
-0.4867158830165863,
-0.36111733317375183,
-0.25464969873428345,
-0.5774877667427063,
0.5922609567642212,
-0.3771549165248871,
-0.110489122... | |
#+cormanlisp (ccl:get-current-directory)
#+lispworks (hcl:get-working-directory)
#+mcl (ccl:mac-default-directory)
#-(or allegro clisp cmu scl cormanlisp mcl sbcl lispworks) (truename ".")))
(when (stringp dir)
(setq dir (parse-namestring dir)))
dir))))
```
Combining these two fun... | [
-0.3381982147693634,
0.23450811207294464,
1.1587382555007935,
-0.25164613127708435,
0.2836100161075592,
-0.015952717512845993,
0.13085468113422394,
-0.7006227970123291,
-0.16562609374523163,
-0.09312566369771957,
-0.27754175662994385,
0.8937197923660278,
-0.6872462034225464,
0.006902683991... | |
at the `external-program` documentation for more details), and finally execute another `cwd` that returns the lisp process to A. If the lisp process should wait until the python process is finished, use `external-program:run` instead of `external-program:start`. | [
0.049996208399534225,
-0.1038038358092308,
0.20080362260341644,
-0.37155741453170776,
-0.006236594635993242,
-0.16336318850517273,
0.13710620999336243,
-0.058212343603372574,
0.005888880230486393,
-0.2589830458164215,
-0.4905488193035126,
0.7184545397758484,
-0.4167381227016449,
-0.3627582... | |
I'm trying to send out an email from my as400 unsuccessfully!
I'm using this code into a CLLE:
```
SNDDST TYPE(*LMSG) TOINTNET((*NONE) +
('address1@mail.it') +
('address2@mail.it')) DSTD('TEST') +
LONGMSG('test mail...')
```
I received an error for my user that I fixed with WRKDIRE where... | [
0.2315140664577484,
0.01558618899434805,
0.35767480731010437,
-0.09772302210330963,
-0.019011318683624268,
-0.27049416303634644,
0.6565859913825989,
-0.05520876124501228,
-0.2285892814397812,
-0.6976156830787659,
-0.08813519030809402,
0.3502882122993469,
-0.33923134207725525,
0.34586581587... | |
OK but I receive this error:
```
Tipo Tipo ----Registrata---- -----Mittente----- Num.
Opz Funzione voce Data Ora Nome lav. ID utente Indir. seq
*RTR *ERR 10/04/12 13:04:15 QMSF MARCO MT | [
-0.008167268708348274,
0.364056259393692,
0.7628880143165588,
0.24785086512565613,
0.6692041754722595,
-0.13745653629302979,
0.22346025705337524,
-0.4731478989124298,
-0.33924081921577454,
-0.17802511155605316,
-0.11309616267681122,
0.5676910877227783,
-0.06412135809659958,
-0.205028563737... | |
0013
Funzione . . . . . . . . . . : Instradamento distribuzione
Lavoro . . . . . . . . . . . : 275842/QMSF/QMSF
Data/ora . . . . . . . . . . : 10/04/12 13:04:15
Mittente: | [
-0.36228182911872864,
0.3975009024143219,
0.5976522564888,
-0.1792089194059372,
-0.011783522553741932,
0.36894333362579346,
0.402914822101593,
-0.11321842670440674,
-0.510409951210022,
-0.29388418793678284,
-0.34949228167533875,
-0.13695675134658813,
-0.061861552298069,
-0.0279415249824523... | |
ID utente/Indirizzo . . . : MARCO MT
Nome sistema/Gruppo. . . . : S6518B7A
Numero di sequenza . . . . . | [
0.09818682819604874,
-0.09244302660226822,
0.2540490925312042,
0.04781290143728256,
-0.05833221599459648,
0.3732852339744568,
0.03337256610393524,
-0.22974036633968353,
-0.009423134848475456,
-0.5551433563232422,
-0.08790922909975052,
0.3061627745628357,
-0.054502010345458984,
0.2027423679... | |
: 0013
Data/ora di origine . . . . : 10/04/12 13:04:15
Agente destinazione . . . . : OfficeVision
Codice stato SNADS . . . . . : 0001 Errore instradamento
Destinatario in errore: | [
-0.09145452827215195,
-0.06875213980674744,
0.38579946756362915,
0.1415741890668869,
0.33555859327316284,
0.49981868267059326,
0.2071433812379837,
-0.44107598066329956,
-0.17766594886779785,
-0.4105958342552185,
-0.10948924720287323,
0.2640034556388855,
-0.1252339482307434,
0.0820884406566... | |
ID utente/Indirizzo . . . : INTERNET GATEWAY
Nome sistema/Gruppo . . . : INTERNET
Voce indirizzario sistema : Definito localmente | [
0.06941040605306625,
-0.3333357274532318,
0.14964556694030762,
0.08699889481067657,
0.004651308991014957,
0.13724224269390106,
0.047951482236385345,
0.2965924143791199,
-0.21388298273086548,
-0.8258257508277893,
-0.06475701183080673,
0.40036600828170776,
-0.16515976190567017,
-0.0572292953... | |
```
I've found this error:
```
Message. . . : Failed opening file IFS (Integrated File System)
on file/MMAIL/temp/Q6.txt
Cause. . . . . : The RTCP function requires the use of a file IFS (Integrated
File System) / MMAIL/temp/Q6.txt. The error received by the call is 3025.
This file does not exist in the system ... | [
-0.122520811855793,
0.4534030556678772,
0.6318977475166321,
-0.22903268039226532,
0.3681448996067047,
-0.10050330311059952,
0.7369857430458069,
-0.07547786831855774,
-0.20751279592514038,
-0.6831269860267639,
-0.4440477788448334,
0.7667311429977417,
-0.4362117052078247,
0.24668055772781372... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.