Wednesday 15 July 2015

json - slc loopback:model does not allow selection of datasource -



json - slc loopback:model does not allow selection of datasource -

following through tutorial , couldn't model creation allow me manually take datasource. automatically chooses "db (memory)"

numerous datasources created via "slc loopback:datasource"... datasource.json follow:

{ "db": { "name": "db", "connector": "memory" }, "accountdb": { "name": "accountdb", "connector": "memory" }, "anotherdb": { "name": "anotherdb", "connector": "mysql" }, "yetanotherdb": { "name": "yetanotherdb", "connector": "mongodb" }, "blah2db": { "name": "blah2db", "connector": "mysql" } }

when creating model:

[?] come in model name: account

[?] come in model name: account

[?] select data-source attach business relationship to: db (memory)

[?] expose business relationship via rest api? (y/n)

versions info:

node --version v0.10.31

slc --version strongloop v2.9.1 (node v0.10.31) ├── strong-build@0.2.1 ├─┬ strong-supervisor@1.0.1 │ └── strong-agent@0.4.14 ├── node-inspector@0.7.4 ├── strong-deploy@0.1.4 ├── strong-pm@1.2.0 ├── strong-registry@1.1.1 ├── nodefly-register@0.3.3 └── generator-loopback@1.3.1

i not able reproduce virtually same installation. os using?

also, sure, see next prompt (what pasted different):

[?] select data-source attach business relationship to: (use arrow keys) ❯ db (memory)

if/when see that, can please seek hitting down-arrow key: happens?

thanks, rand

json strongloop

PHP check if value exists in MySQL -



PHP check if value exists in MySQL -

i tried re-create check if value exists in mysql , create own, reason wont work...

this got:

<?php $host = '127.0.0.1'; $username = 'root'; $password = ''; $dbname = 'multiplayer'; $con=mysqli_connect($host, $username, $password, $dbname); $check_player_ip=mysqli_query($con, 'select `player_ip` `playerdata` username = "remco" , active = 0'); if (mysqli_num_rows($check_player_ip) == 0) { //didnt find } else{ //found } ?>

i error: parse error: syntax error, unexpected '$check_player_ip' (t_variable) in c:\xampp\htdocs\test.php on line 1

solution

if t_variable error, check varriable before rule. may forgot place ';' xd

thanks support!

try this:

<?php $host = '127.0.0.1'; $username = 'root'; $password = ''; $dbname = 'multiplayer'; $con = new mysqli( $host, $username, $password, $dbname ); /* check connection */ if ( $con->connect_error ) { printf( "connect failed: %s\n", $con->connect_error ); exit(); } /* query - returns resultset */ if ( $result = $con->query('select `player_ip` `playerdata` username = "remco" , active = 0 ') ) { if ( $result->num_rows <= 0 ) { //didnt find printf("no player"); } else { //found printf("select returned %d rows.\n", $result->num_rows); } /* free result set */ $result->close(); } /* close connection */ $con->close(); ?>

php mysql

javascript - Can't set breakpoint in source mapped file (example with jquery) -



javascript - Can't set breakpoint in source mapped file (example with jquery) -

i have problem set breakpoint on javascript source file minified mapped on real sources source map file.

the problem can demonstrated jquery.com website.

on site, imported script jquery.min.js contains //# sourcemappingurl=jquery.js directive.

this can observed on chromium 37 debugger :

on "real source file", i'm trying setup breakpoint on line 500, bug breakpoint appears on line 6955.

what is wrong utilize case ? possible ?

this happen when line set breakpoint not have proper mapping compiled source code. have checked , indeed line mapped weird (unexisiting) position in jqeury.min.js file.

consider filing jquery issue. please note, however, while in recent versions of jquery source map url not included in minified version default, can still download site , check if fixed.

javascript jquery google-chrome debugging source-maps

scala - How to set up prod mode to have configuration file in conf directory (not inside jar)? -



scala - How to set up prod mode to have configuration file in conf directory (not inside jar)? -

i'm using activator create project , utilize command universal:packagebin generate .zip file.

i wondering if it's possible set application read configuration file conf folder instead of configuration classpath ( .conf file within jar).

is possible? if it's, how can it?

see https://www.playframework.com/documentation/2.3.x/productionconfiguration mechanism of telling play application pickup config from.

to tie in universal:packagebin, pass -dconfig.file script within bin directory. e.g. if application called foo:

unzip foo-1.0-snapshot.zip foo-1.0-snapshot/bin/foo -dconfig-file=/path/to/app.conf

scala playframework-2.0 typesafe-activator

Combining two lists into a dictionary in python -



Combining two lists into a dictionary in python -

this question has reply here:

map 2 lists dictionary in python 9 answers

for example, if had 2 lists:

lista = [1, 2, 3, 4, 5] listb = [red, blue, orange, black, grey]

i'm trying figure out how display elements in 2 argument lists in 2 columns, assigning 1: red, 2: blue... , on.

this has done without using built-in zipfunction.

>>> lista = [1, 2, 3, 4, 5] >>> listb = ["red", "blue", "orange", "black", "grey"] >>> dict(zip(lista, listb)) {1: 'red', 2: 'blue', 3: 'orange', 4: 'black', 5: 'grey'}

python list dictionary

diskspace - Linux du directory size, how is this possible? -



diskspace - Linux du directory size, how is this possible? -

i have folder called joblibscratch. , see this

ubuntu@memo:~$ du -s joblibscratch 2831128 joblibscratch

this 2831128 kilobytes, 2.836024gb. , see this

ubuntu@memo:~$ du -hs joblibscratch 2.7g joblibscratch

so du saying folder both 2.7gb , 2.83 gb. how can be? if makes difference i'm using virtual hard drive on cloud server.

2831128 / 1024 = 2764.7734375 2764.7734375 / 1024 = 2.69997406005859375

linux diskspace

commonsware cwac - Load HTML Content to android RichEditText -



commonsware cwac - Load HTML Content to android RichEditText -

i'm using cwac-richedit librar in project user write text in , app save user input html content

problem when want show saved content user, displays html content. tried :

spanned description = html.fromhtml(stepcontent); rtxtstepdescription.settext(description);

and looks this

edited: user writes in edittext: app saves content html.tohtml(rtxtstepdescription.geteditabletext())

after that, next time open app app loads: <p dir="rtl"><u>&#1587;&#1604;&#1575;&#1605;</u><br> &#1605;&#1578;&#1606; <i>&#1570;&#1586;&#1605;&#1575;&#1740;&#1588;&#1740;</i> &#1576;&#1585;&#1575;&#1740; <b>&#1587;&#1608;&#1575;&#1604;</b></p>

figured out. these html entities, see 1 convertor online here.

use apache stringescapeutils apache commons lang:

import org.apache.commons.lang.stringescapeutils; ... string withcharacters = stringescapeutils.unescapehtml(yourstring);

javadoc says:

unescapes string containing entity escapes string containing actual unicode characters corresponding escapes. supports html 4.0 entities.

for example, string "&lt;fran&ccedil;ais&gt;" become "<français>"

if entity unrecognized, left alone, , inserted verbatim result string. e.g. "&gt;&zzzz;x" become ">&zzzz;x".

as described in answer here

android commonsware-cwac

javascript - Parallax Based on Mouse Posistion in a div -



javascript - Parallax Based on Mouse Posistion in a div -

i made parallax function using greensock, , works pretty good. problem know how find pagex value. page margins set auto pagex varies depending on user. tried write function find new starting point x value based on parent div, can't seem new starting point variable work parallax function.

$('#viewport').mouseover(function(e){ var parentoffset = $(this).offset(); var relx = e.pagex - parentoffset.left; var rely = e.pagey - parentoffset.top; homecoming relx; }); function doparallax(){ var backlayer = document.getelementbyid('bggrid'); var middlelayer = document.getelementbyid('graphs'); var frontlayer = document.getelementbyid('notes'); $('#viewport').mousemove( function(event){ var bmouse = event.relx / 3; tweenlite.to(backlayer, 1, { css:{left:'-' + bmouse + 'px'}, overwrite:true } ); var mmouse = event.relx / 0.205; tweenlite.to(middlelayer, 1, { css:{left:'-' + mmouse + 'px'}, overwrite:true } ); var fmouse = event.relx / 0.5; tweenlite.to(frontlayer, 1, { css:{left:'-' + fmouse + 'px'}, overwrite:true } ); $('#train').css({'left':event.clientx - 200}); } ); } settimeout('doparallax()', 2000);

any help appreciated.

javascript jquery html parallax greensock

css - jquery resize, keep comments position relative to image -



css - jquery resize, keep comments position relative to image -

jsfiddle

i created script allow users comment on top of image. img responsive comments on top of img , not. when resize, comments remain @ original top , left positions, , can not them maintain respective positions. uploaded jquery fiddle see. utilize help!

var oldheight = $('#proofnow').height(), oldwidth = $('#proofnow').width(); $(window).resize(function() { var parent = $('#proofnow'), parentwidth = parent.width(), parentheight = parent.height(); $("img.tdot").each(function(){ var top = parseint($(this).css("top")), left = parseint($(this).css("left")), topratio = oldheight / top, leftratio = oldwidth / left, newtop = parentheight / topratio, newleft = parentwidth / leftratio; //console.log('top: ' + top + ', left: ' + left); $(this).css("top", newtop); $(this).css("left",newleft); }); console.log(parent.width()); });

i'm guess math wrong, still can not figure out. need able go both ways

i confused why need javascript this? preventing letting browser hard work, , utilize css/html.

css block

div { position: relative; left: 0px; top: 0px; width="60%" }

html block

<div> <div name="comments"> ... </div> <img src="..." /> </div>

jquery css resize position

php - Why Laravel4.2 Encryption Key less than Encryption Key character in CodeIgniter? -



php - Why Laravel4.2 Encryption Key less than Encryption Key character in CodeIgniter? -

i'm study laravel4.2 , start compared codeigniter found problem on encryption key character below code i've used key testing in laravel 4.2 don't work because got messages "mcrypt_encrypt(): size of key big algorithm"

but it's work perfect when i've used same encryption key in codeigniter latest version.

my question:how larave 4.2 secure if used mcrypt_rijndael_256 of encryption key

'key' => 'sdrlcczte2ujltzv5s3jzkn5bjvgqkrdsdrlcczte2ujltzv5s3jzkn5bjvgqkrdsdrlcczte2ujltzv5s3jzkn5bjvgqkrdsdrlcczte2ujltzv5s3jzkn5bjvgqkrdsdrlcczte2ujltzv5s3jzkn5bjvgqkrdsdrlcczte2ujltzv5s3jzkn5bjvgqkrdsdrlcczte2ujltzv5s3jzkn5bjvgqkrdsdrlcczte2ujltzv5s3jzkn5bjvgqkrdsdrlcczte2ujltzv5s3jzkn5bjvgqkrdsdrlcczte2ujltzv5s3jzkn5bjvgqkrdsdrlcczte2ujltzv5s3jzkn5bjvgqkrdsdrlcczte2ujltzv5s3jzkn5bjvgqkrdsdrlcczte2ujltzv5s3jzkn5bjvgqkrdsdrlcczte2ujltzv5s3jzkn5bjvgqkrdsdrlcczte2ujltzv5s3jzkn5bjvgqkrdsdrlcczte2ujltzv5s3jzkn5bjvgqkrdsdrlcczte2ujltzv5s3jzkn5bjvgqkrdsdrlcczte2ujltzv5s3jzkn5bjvgqkrdsdrlcczte2ujltzv5s3jzkn5bjvgqkrdsdrlcczte2ujltzv5s3jzkn5bjvgqkrdsdrlcczte2ujltzv5s3jzkn5bjvgqkrdsdrlcczte2ujltzv5s3jzkn5bjvgqkrdsdrlcczte2ujltzv5s3jzkn5bjvgqkrdsdrlcczte2ujltzv5s3jzkn5bjvgqkrdsdrlcczte2ujltzv5s3jzkn5bjvgqkrdsdrlcczte2ujltzv5s3jzkn5bjvgqkrdsdrlcczte2ujltzv5s3jzkn5bjvgqkrdsdrlcczte2ujltzv5s3jzkn5bjvgqkrdsdrlcczte2ujltzv5s3jzkn5bjvgqkrdsdrlcczte2ujltzv5s3jzkn5bjvgqkrdsdrlcczte2ujltzv5s3jzkn5bjvgqkrdsdrlcczte2ujltzv5s3jzkn5bjvgqkrdsdrlcczte2ujltzv5s3jzkn5bjvgqkrdsdrlcczte2ujltzv5s3jzkn5bjvgqkrdsdrlcczte2ujltzv5s3jzkn5bjvgqkrdsdrlcczte2ujltzv5s3jzkn5bjvgqkrdsdrlcczte2ujltzv5s3jzkn5bjvgqkrdsdrlcczte2ujltzv5s3jzkn5bjvgqkrdsdrlcczte2ujltzv5s3jzkn5bjvgqkrdsdrlcczte2ujltzv5s3jzkn5bjvgqkrdsdrlcczte2ujltzv5s3jzkn5bjvgqkrdsdrlcczte2ujltzv5s3jzkn5bjvgqkrdsdrlcczte2ujltzv5s3jzkn5bjvgqkrdsdrlcczte2ujltzv5s3jzkn5bjvgqkrdsdrlcczte2ujltzv5s3jzkn5bjvgqkrdsdrlcczte2ujltzv5s3jzkn5bjvgqkrdsdrlcczte2ujltzv5s3jzkn5bjvgqkrdsdrlcczte2ujltzv5s3jzkn5bjvgqkrdsdrlcczte2ujltzv5s3jzkn5bjvgqkrd', 'cipher' => mcrypt_rijndael_256,

aes keys need indistinguishable random , either 16, 24 or 32 bytes in length. seems laravel adds additional check aes key valid size.

basically php's mcrypt (not sure c-code) extends key info 00 valued bytes if key smaller 32 bytes, until gets first legal aes key size. if key larger 32 bytes cuts 32 bytes. absolutely against practice regards handling keys.

so aes key interpreted 'sdrlcczte2ujltzv5s3jzkn5bjvgqkrd', encoded ascii. kind of key not provide total security of aes-256 key reduces key space (with more 8 bytes if 62 character alphabet used, assuming each value within alphabet as likely).

and note mcrypt_rijndael_256 not aes, able decrypt libraries back upwards rijndael block size of 256.

php codeigniter security encryption laravel-4

maven - Update pom to use released versions -



maven - Update pom to use released versions -

trying find way update pom utilize latest versions of released dependency instead of snapshot.

we have assembly project assembles image deployed during development uses snapshot dependencies.

but want update dependencies utilize latest released dependencies. tried using versions:use-latest-releases affects released versions in pom.

any ideas?

edit (can not security reasons post pom here's example)

<project> .... <dependencies> <dependency> <groupid>a.b.c</groupid> <artifactid>c-d-f</artifactid> <version>1.0.1-snapshot</version> <type>war</type> </dependency> <dependency> <groupid>a.b.c</groupid> <artifactid>g-h-i</artifactid> <version>1.1.6-snapshot</version> <type>war</type> </dependency> ... </dependencies> ... </project>

given component a-b-c , g-h-i has been released version 1.0.1 , 1.1.6 want replace versions in pom these version numbers. remove snapshot dependencies in pom.

edit should add together automated process minimal human interaction. reason can versions:update-properties work if versions in release state. if have snapshot version 0.0.1-snapshot , want update 0.0.1 doesn't happen , have verified release exists. same thing versions:use-latest-relese, , versions:use-releases nil @ all.

i see 2 approaches here:

you can create multiple profiles in maven pom. best way create profile of "snapshot" , 1 "release". described here: different dependencies different build profiles in maven you can utilize maven pom properties define variables dependency versions. see here: http://books.sonatype.com/mvnref-book/reference/resource-filtering-sect-properties.html#resource-filtering-sect-user-defined

hope helps!

maven

Non diverse Global Secondary Index in DynamoDB -



Non diverse Global Secondary Index in DynamoDB -

let's assume have table next attributes:

unique user_id (primary hash key) category_id (gsi hash index) timestamp

i have lot of users, few categories.

user_id | category_id 1 1 3 1 4 1 5 3 .. .. 50000000 1

is ok store millions of records same category_id value global secondary index? should expect restrictions?

i'm wondering if scan not bad choice. utilize filtering category_id 1 time day. cost (time , money) of scanning millions of records?

thanks!

according limits documentation, limitation is:

no practical limit tables without local secondary indexes.

for table local secondary indexes, there limit on item collection sizes: every distinct hash key value, total sizes of table , index items cannot exceed 10 gb. depending on item sizes, may constrain number of range keys per hash value. more information, see item collection size limit.

now sec question of whether should doing query or scan, asked both performance , monetary cost. maintaining gsi expensive, because have pay throughput (and if recall correctly storage) paying table, plus table throughput have monitor create sure aren't beingness throttled. on other hand, performance much better.

if you're planning on going through categories 1 time day (which means every document in table), scan way go. aren't gaining querying. plus cheaper (no gsi) , don't have worry projections.

amazon-dynamodb

android - Encryption while disk caching -



android - Encryption while disk caching -

so accomplish apply encryption while caching images on disk. have decided go universal image loader, understand have add together custom disk caching implementation of own don't know start with.

how can accomplish this, encryption while writing byte stream in file , decryption while getting stream only file.

any kind of help appreciated :)

thanks not replying :p

but did end solving it. , here did, maybe help else. had create custom disk cache , custom downloader. in custom disk caching class, in method uil write byte stream file, encrypted byte stream. , in custom downloader, override method take byte stream file , decrypted it.

android caching encryption universal-image-loader

c# - Formatting and getting missing data -



c# - Formatting and getting missing data -

i'm beginner in c#. have info construction resourceid, editionid, locationid, viewcount, , clickcount. each entry has date , information. shown in next image.

in days may different editionid, resourcesid,viewcount,clickcount same resourceid

i have next var enteries = new dictionary<igaadkey, igaentry>(); igaadkey has resourceid,locationid,editionid. igaentry has viewcount , clickcount.

i have hashset<int> of resources there. have dictionary<string, hashset<int>> resourcesdate day -> resources ids available in day, can set empty places in row, if there resourceid in current processing date not in date, set in row, empty places.

using information, format table, still have problems in populating info correctly. row in wrong place,..etc

the code utilize populate data:

foreach (igaadkey adkey in enteries.keys) { igaentry entry; if (enteries.trygetvalue(adkey, out entry)) { streamwriter.write(adkey.locationid + ","); streamwriter.write(adkey.editionid + ","); streamwriter.write(entry.mclickcount + ","); streamwriter.write(entry.mviewcount + ","); streamwriter.write(","); } else { (int = 0; < 5; i++) { streamwriter.write(","); } } }

update:

the code shown never output empty line. that's because loop though keys of enteries dictionary, seek value key. value found, since you're looping through keys. improve loop through dictionary collection of keyvaluepair<tkey, tvalue> objects.

there very similar question asked earlier problem grouping dictionary entries same resourceid different values editionid or locationid. assuming same issue, 1 way create igaadkey implement icomparable<igaadkey> so:

public class igaadkey : iequatable<igaadkey>, icomparable<igaadkey> { public int resourceid; public int editionid; public int locationid; public override bool equals(object obj) { if (referenceequals(this, obj)) homecoming true; else if (referenceequals(null, obj)) homecoming false; if (obj.gettype() != gettype()) homecoming false; var other = (igaadkey)obj; homecoming resourceid == other.resourceid && editionid == other.editionid && locationid == other.locationid; } public override int gethashcode() { homecoming resourceid.gethashcode() ^ editionid.gethashcode() ^ locationid.gethashcode(); } public override string tostring() { homecoming string.format("resourceid={0}, editionid={1}, locationid={2}", resourceid, editionid, locationid); } #region iequatable<igaadkey> members public bool equals(igaadkey other) { homecoming equals((object)other); } #endregion #region icomparable<igaadkey> members public int compareto(igaadkey other) { if (other == null) homecoming -1; // @ end? if (object.referenceequals(this, other)) homecoming 0; int diff; if ((diff = resourceid.compareto(other.resourceid)) != 0) homecoming diff; if ((diff = editionid.compareto(other.editionid)) != 0) homecoming diff; if ((diff = locationid.compareto(other.locationid)) != 0) homecoming diff; homecoming 0; } #endregion }

having done this, can either:

store objects in sorteddictionary:

var enteries = new sorteddictionary<igaadkey, igaentry>() // build dictionary foreach (var pair in enteries) { // write csv file }

in case keys identical resourceid adjacent.

store them in regular dictionary , sort them writing:

var enteries = new dictionary<igaadkey, igaentry>() // build dictionary foreach (var pair in enteries.orderby(pair => pair.key)) { // write csv file }

incidentally, if going using igaadkey dictionary key, should create immutable, reasons discussed here.

update

although question isn't clear, code able determine trying output table 2d grid of smaller tables. along x axis resource ids, 5 columns of info each. along y axis dates, , each date, many rows needed each location & edition found each resource + date combination.

in case, need to:

collect files , index them date (you doing that).

scan through files find resource ids (you doing that).

sort list of resources consistent order, output of programme not random in way:

var allresourcesinorder = allresources.tolist(); allresourcesinorder.sort();

output 5 columns each resource:

foreach (int resourceid in allresourcesinorder) { stream.write(resourceid + ","); stream.write("location id" + ","); stream.write("edition id" + ","); stream.write("click count" + ","); stream.write("view count" + ","); } stream.write("\n");

for each date, output cells each resource found date in files found date:

/// <summary> /// reads & merges files 1 specific date , create iga entry, merge values, write them file /// </summary> /// <param name="date"></param> /// <param name="files"></param> /// <param name="streamwriter"></param> private static void readmergeandwritefilesforday( datetime date, list<string> files, streamwriter streamwriter, ilist<int> allresourcesinorder // specifies column order. ) { var enteries = new dictionary<igaadkey, igaentry>(); foreach (string filename in files) readfileforday(filename, enteries); var dateresources = new dictionary<int, list<igaadkey>>(); foreach (var key in enteries.keys) dateresources.add(key.resourceid, key); // sort resources output them in consistent order. not required practice. dateresources.sortall(); (int irow = 0, nrows = dateresources.maxcount(); irow < nrows; irow++) { (int index = 0; index < allresourcesinorder.count; index++) { if (index == 0) streamwriter.write(date.todatestring() + ","); else streamwriter.write(","); // date goes under resource id first resource; otherwise leave empty. int resourceid = allresourcesinorder[index]; igaadkey key; igaentry value; if (dateresources.trygetvalue(resourceid, irow, out key) && enteries.trygetvalue(key, out value)) { streamwriter.write(key.locationid + ","); streamwriter.write(key.editionid + ","); streamwriter.write(value.mclickcount + ","); streamwriter.write(value.mviewcount + ","); } else { streamwriter.write(","); streamwriter.write(","); streamwriter.write(","); streamwriter.write(","); } } } }

note readfileforday extracted first half of mergefilesforday, here.

add few useful extension methods create life easier:

public static class returns { public static bool false<tvalue>(out tvalue value) { value = default(tvalue); homecoming false; } } public static class listdictionaryextensions { public static void add<tkey, tvalue>(this idictionary<tkey, list<tvalue>> listdictionary, tkey key, tvalue value) { if (listdictionary == null) throw new argumentnullexception(); list<tvalue> values; if (!listdictionary.trygetvalue(key, out values)) { listdictionary[key] = (values = new list<tvalue>()); } values.add(value); } public static bool trygetvalue<tkey, tvalue>(this idictionary<tkey, list<tvalue>> listdictionary, tkey key, int index, out tvalue value) { list<tvalue> list; if (!listdictionary.trygetvalue(key, out list)) homecoming returns.false(out value); if (index < 0 || index >= list.count) homecoming returns.false(out value); value = list[index]; homecoming true; } public static void sortall<tkey, tvalue>(this idictionary<tkey, list<tvalue>> listdictionary) { if (listdictionary == null) return; foreach (var list in listdictionary.values) list.sort(); } public static int maxcount<tkey, tvalue>(this idictionary<tkey, list<tvalue>> listdictionary) { if (listdictionary == null) homecoming 0; int count = 0; foreach (var list in listdictionary.values) count = math.max(count, list.count); homecoming count; } }

full code here. of course of study can't test since don't have of input files.

c# algorithm sorting csv

c - Win32 - A better way to intercept a window before it is created -



c - Win32 - A better way to intercept a window before it is created -

i trying automate external windows application. goal create application start minimized without showing active window/splash screens , without stealing focus other applications.

i wrote little programme on c calls enumwindows() in loop , uses showwindow() minimize required window. quite fast , works in 80% of cases. unfortunately, application window still showing , stealing focus short period of time.

what improve (sure) way intercept window? using setwindowshookex hooks alternative?

have tried using wshowwindow fellow member of startupinfo structure pass createprocess() when starting application? designed things this.

if dwflags specifies startf_useshowwindow, fellow member can of values can specified in ncmdshow parameter showwindow function, except sw_showdefault. otherwise, fellow member ignored.

for gui processes, first time showwindow called, ncmdshow parameter ignored wshowwindow specifies default value. in subsequent calls showwindow, wshowwindow fellow member used if ncmdshow parameter of showwindow set sw_showdefault.

for example:

startupinfo si = { sizeof(si) } si.dwflags = startf_useshowwindow; si.wshowwindow = sw_minimize; createprocess(..., &si, ...);

c windows winapi

sqlite - Android and SQLlite: escape quote and get it back -



sqlite - Android and SQLlite: escape quote and get it back -

i have save info within of sqllite. text info can contain quote ('). there way escape char on insert, , when getting info database?

in particular, name references file. file can named "hel'lo.file". before escaping database, should "hel''lo.file". when need 1 time again "hel'lo.file" string within db matches file name.

i'm using content provider , sqliteopenhelper.

inside content provider, insert i'm doing this:

_id = db.insert(texteditorcontract.noteentry.table_name, null, values);

my insert within activity:

contentvalues values = new contentvalues(); ... values.put(noteentry.column_title, getfiletitle()); uri recorduri = contentresolver.insert(noteentry.content_uri, values);

use sqliteopenhelper - can utilize prepared statements. see question: android sqlite example

edit

string file = "/storage/emulated/0/note/hello 'world.txt" string sql = "select _id recents percorso=? order _id asc"; string[] info = {file}; cursor cursor = database.rawquery(sql, data);

android sqlite escaping

java - Applying the use of Functions and Procedures -



java - Applying the use of Functions and Procedures -

public static void main (string[] args) { scanner sc = new scanner(system.in); int number; system.out.println("enter number find factorial of it: "); number= sc.nextint(); int factor=1; if (number<0 && number>10) { system.out.println("invalid!! number has between 1 , 10"); } for( int x=1; x<=number; x++ ) { factor = factor*x; system.out.println("the factorial of "+number+" = " +factor); } }

can u check code @tnt? tell me if that's u wanted me do

here possible solution:

scanner sc = new scanner(system.in); int number; system.out.println("enter number find factorial of it: "); number= sc.nextint(); int factor = 1; // edit status numbers fall outside range 0-10 cause error // message display if (number < 1 || number > 10) system.out.println("invalid!! number has between 1 , 10"); else { for( int x=1; x<=number; x++ ) { factor = factor*x; } system.out.println("the factorial of "+number+" = " +factor); }

java bluej

Create multiple tabs on excel via classic asp -



Create multiple tabs on excel via classic asp -

i can export page excel file via code below:

response.contenttype = "application/vnd.ms-excel" response.addheader "content-disposition", "attachment; filename=test.xls"

but want create multiple tabs on same excel file, how can it?

thanks helps.

you cannot using response.contenttype directive. command transforms page excel not have ability create new page of html read 1 page.

the solution depends on requirements are.

free

the free solution know building page , pushing browser xml file. if create file want in excel , save in xml format, can open file , see how page should build in asp.

pros free. not need permission install server. passing xml file client.

cons excel not default viewer xml files, notepad is. people not understand how open file in excel. means method internal applications can alter everyone's computer open xml files in excel default.

3rd party program

when needed accomplish same task had entertained using 3rd party programs in classic asp. wish remember programme have cost around ~$1,000 use.

pros these programs feature rich , allow want in exporting excel. cleaner , bit simpler utilize on writing own xml file open in excel.

cons costs money. may require server permissions not have. programs require save file server before serving client

asp.net

you can take instead create new page in asp.net , utilize excel features create file need.

pros free. same extensive feature set available in 3rd programs classic asp available method.

cons classic asp , .net not able communicate straight things password protection on page become issue if needed. need know or larn .net framework. files saved server before beingness sent client.

excel asp-classic

backbone.js - Complex validation of an enitre backbone model -



backbone.js - Complex validation of an enitre backbone model -

i utilize backbone's plugin backbone.validation model fields validations. great declarative way of validation, plugin introduces. i'm missing, way of validating not particular field, whole model. here i'd have:

var somemodel = backbone.model.extend({ validation: { field1: { required: true }, field2: { required: true }, field3: { required: true } 'whole model': function () { // method makes complex validation logic , expected // called each time validation of model (some fields) performed } } });

i can easy when not using backbone.validation plugin, how can same when i'm using it?

you can that, see here: https://github.com/thedersen/backbone.validation#validate

"you can phone call manually without parameters validate entire model."

the plugin overwrites backbone.model.prototype.validate behind scenes. if declared rules , phone call modelinstance.validate() should validate properties.

validation backbone.js

javascript - AngularJS: Infinite scroll w/ -



javascript - AngularJS: Infinite scroll w/ <table> -

i have infinite scroll working w/ 1 set of info properly. when i'm doing similar task (image index) using html table, loadmore() function beingness called far often. 1 lite scroll go through whole set of data. google didn't give me specific illustration using table, wondering if i'm messing up.

<table> <span infinite-scroll="loadmore()" infinite-scroll-distance='2' infinite-scroll-disabled="load_disabled"> <tr data-ng-repeat="row in data"> <td data-ng-repeat="item in row"> <div class="image_box"> <img data-ng-src="{{item.thumb_src}}"><br>{{item.title_eng}} </div> </td> </tr> </span> </table>

javascript. note $scope.data array of arrays of items. $scope.data[0] have 5 items, hold thumbnail, , bit of text.

angular.module('myapp', ['ngroute','infinite-scroll']) .controller("imagecontroller", ['$scope', '$http', '$routeparams', '$rootelement', '$location', function($scope,$http,$routeparams,$rootelement,$location) { $scope.data = new array(); row = -1; ( var = 0; < 100; i++ ) { if ( % 5 == 0 ) { row++; $scope.data[row] = new array(); } var item = []; item["title_eng"] = "title " + i; $scope.data[row].push( item ); } console.log( "we got " + row + 1 + " rows." ); $scope.rows = new array(); var row_ix = 0; $scope.loadmore = function() { if ( !$scope.data[row_ix] || !$scope.data[row_ix].length ) { return; } var x = 1; // 1 @ time console.log( "row_ix: " + row_ix + "." ); ( var = 0; < x; i++ ) { $scope.rows[row_ix] = new array(); $scope.rows[row_ix] = $scope.data[row_ix].slice(0); row_ix++; } } angular.module('infinite-scroll').value('throttle_milliseconds', 250);\

edit: coming after time off. throttle seems not working. :(

javascript angularjs infinite-scroll nginfinitescroll

optimization - I need some help to optimize a python code -



optimization - I need some help to optimize a python code -

i'm working on knn classifier using python have problems. next piece of code takes 7.5s-9.0s completed , i'll have run 60.000 times.

fold in folds: dot2 in fold: """ distances[x][0] = class of dot2 distances[x][1] = distance between dot1 , dot2 """ distances.append([dot2[0], calc_distance(dot1[1:], dot2[1:], method)])

the "folds" variable list 10 folds summed contain 60.000 inputs of images in .csv format. first value of each dot class belongs to. values in integer. there way create line run faster ?

here calc_distance function

def calc_distancia(dot1, dot2, distance): if distance == "manhanttan": total = 0 #for each coord, take absolute difference x in range(0, len(dot1)): total = total + abs(dot1[x] - dot2[x]) homecoming total elif distance == "euclidiana": total = 0 x in range(0, len(dot1)): total = total + (dot1[x] - dot2[x])**2 homecoming math.sqrt(total) elif distance == "supremum": total = 0 x in range(0, len(dot1)): if abs(dot1[x] - dot2[x]) > total: total = abs(dot1[x] - dot2[x]) homecoming total elif distance == "cosseno": dist = 0 p1_p2_mul = 0 p1_sum = 0 p2_sum = 0 x in range(0, len(dot1)): p1_p2_mul = p1_p2_mul + dot1[x]*dot2[x] p1_sum = p1_sum + dot1[x]**2 p2_sum = p2_sum + dot2[x]**2 p1_sum = math.sqrt(p1_sum) p2_sum = math.sqrt(p2_sum) quociente = p1_sum*p2_sum dist = p1_p2_mul/quociente homecoming dist

edit: found way create faster @ to the lowest degree "manhanttan" method. instead of:

if distance == "manhanttan": total = 0 #for each coord, take absolute difference x in range(0, len(dot1)): total = total + abs(dot1[x] - dot2[x]) homecoming total

i put

if distance == "manhanttan": totalp1 = 0 totalp2 = 0 #for each coord, take absolute difference x in range(0, len(dot1)): totalp1 += dot1[x] totalp2 += dot2[x] homecoming abs(totalp1-totalp2)

the abs() phone call heavy

there many guides "profiling python"; should search some, read them, , walk through profiling process ensure know parts of work taking time.

but if core of work, it's fair bet that calc_distance bulk of running time beingness consumed.

optimizing require using numpy accelerated math or similar, lower-level approach.

as quick , dirty approach requiring less invasive profiling , rewriting, seek installing pypy implementation of python , running under it. have seen easy 2x or more accelerations compared standard (cpython) implementation.

python optimization artificial-intelligence classification knn

c# - Change web.config security mode pragmatically (edit XML file) -



c# - Change web.config security mode pragmatically (edit XML file) -

if have config looks this...

<?xml version="1.0" encoding="utf-8" ?> <configuration> <system.servicemodel> <services> </services> <bindings> <basichttpbinding> <binding name="serviceconfiguration" closetimeout="00:01:00" opentimeout="00:01:00" receivetimeout="00:01:00" sendtimeout="00:01:00" maxreceivedmessagesize="33554432" messageencoding="text" textencoding="utf-8"> <readerquotas maxdepth="32" maxstringcontentlength="524288" maxarraylength="1048576" maxbytesperread="4096" maxnametablecharcount="16384" /> <security mode="transportcredentialonly"> <transport clientcredentialtype="windows" /> </security> </binding> </basichttpbinding> </bindings> </system.servicemodel> </configuration>

i alter

<security mode="transportcredentialonly"> <security mode="transport">

<transport clientcredentialtype="windows" /> <transport clientcredentialtype="none" />

so far have read xml file , read security node

webconfig = @"c:\xml.xml"; xmldocument myxmldocument = new xmldocument(); myxmldocument.load(webconfig); xmlnodelist oldnodes; oldnodes = myxmldocument.getelementsbytagname("security");

but i'm unsure how alter xml nodes , save file.

we need have alter configs manually after deployment , there hundreds of them, i'm pragmatically recursively going through files , ending them.

in case want go on using xmldocument, can follow illustration select element name , specific attribute value :

.... //select <security> element having mode attribute value equals "transportcredentialonly" xmlnode security = myxmldocument.selectsinglenode("//security[@mode='transportcredentialonly']"); if(security != null) { //edit attribute value security.attributes["mode"].value = "transport"; } .... //save edited xmldocument file myxmldocument.save(webconfig);

c# xml xmldocument

vbscript - Run exe from vbs error -



vbscript - Run exe from vbs error -

i'm trying run executable vbscript. tried this:

oshell = createobject("shell.application") oshell.shellexecute("cmd.exe", , , "runas", 1) oshell.run("file.exe")

however, gives me sub error on sec line. did mistake?

i assume want execute file.exe elevated privileges , maintain window open.

vbscript:

set oshell = createobject("shell.application") oshell.shellexecute "cmd.exe", "/k file.exe", "", "runas", 1

note runas verb undocumented.

powershell:

start-process -filepath "cmd.exe" -argumentlist @("/k", "file.exe") -verb "runas"

vbscript

javascript - Module 'flow' not available in angularjs app -



javascript - Module 'flow' not available in angularjs app -

in app.js have included dependency flow

var myapp = angular.module('myapp',['ui.router', 'ngresource', 'flow']);

i have included javascript in index file load follows

<script type="text/javascript" src="//cdn.jsdelivr.net/flow.js/2.0.0b2/flow.js"></script>

i getting error module 'flow' not available!

uncaught error: [$injector:modulerr] failed instantiate module myapp due to: error: [$injector:modulerr] failed instantiate module flow due to: error: [$injector:nomod] module 'flow' not available! either misspelled module name or forgot load it. if registering module ensure specify dependencies sec argument. http://errors.angularjs.org/1.2.23/$injector/nomod?p0=flow

this because if want utilize ['flow'] module in angularjs have include both:flow.js , ng-flow. if using bower , configured place libraries on js/vendor have this.

bower install "ng-flow#~2" --save {{ html::script('js/vendor/flow.js/dist/flow.min.js') }} {{ html::script('js/vendor/ng-flow/dist/ng-flow.min.js') }}

if not, ng-flow cdn.

best regards!

javascript angularjs flow-js

Adding 1 day to timestamp in PHP -



Adding 1 day to timestamp in PHP -

i have web app stores dates utc time stamps. dates changed display purposes clients using timezone setting. however, i've nail border case lastly sunday (2 nov 2014) when dst ended in usa. thought code handled case because uses strtotime , "+1 day" doesn't. here code i've got:

$current_date_start=$this->date_start; //$this->date_start utc timestamp $current_date_end=strtotime('+1 day', $current_date_start); { $current_date_start=strtotime('+1 day', $current_date_start); $current_date_end=strtotime('+1 day', $current_date_start); echo format_local_date($current_date_start,'america/los_angeles',"d f j y h s")."<br />"; } while ($current_date_start<$this->date_end); function format_local_date($timestamp,$timezone,$format_str='') { $date_time=new datetime_52("now",new datetimezone($timezone)); $date_time->settimestamp($timestamp); if ($format_str=='') $format_str="f j y"; homecoming $date_time->format($format_str); } // //datetime_52 class // /** * provides backwards back upwards php 5.2's lack of settimestamp , gettimestamp */ class datetime_52 extends datetime{ /** * set time of datetime object unix timestamp * @param int $unixtimestamp * @return datetime_52 */ public function settimestamp($unixtimestamp){ if(!is_numeric($unixtimestamp) && !is_null($unixtimestamp)){ trigger_error('datetime::settimestamp() expects parameter 1 long, '.gettype($unixtimestamp).' given', e_user_warning); } else { $default_timezone=date_default_timezone_get(); $this_timezone= $this->gettimezone(); date_default_timezone_set($this->gettimezone()->getname()); $this->setdate(date('y', $unixtimestamp), date('n', $unixtimestamp), date('d', $unixtimestamp)); $this->settime(date('g', $unixtimestamp), date('i', $unixtimestamp), date('s', $unixtimestamp)); date_default_timezone_set($default_timezone); } homecoming $this; } /** * time of datetime object unix timestamp * @return int unix timestamp representing time in datetime object */ public function gettimestamp(){ homecoming $this->format('u'); } }

and here's output:

sun nov 2 2014 00 00 00 sun nov 2 2014 23 00 00 mon nov 3 2014 23 00 00 tue nov 4 2014 23 00 00 wed nov 5 2014 23 00 00 thu nov 6 2014 23 00 00 fri nov 7 2014 23 00 00 sat nov 8 2014 23 00 00

as can see it's dropped hour. dst border case. thought "+1 day" should handle that. help!

your order of operations wrong. you're adding +1 day utc time, doesn't have dst variance. should convert local timezone first, , add together +1 day, , that'll trick, since calculation within right timezone check automatically expected.

php

jquery - FullCalendar 2.1.1 addEventSource by function -



jquery - FullCalendar 2.1.1 addEventSource by function -

i using fullcalendar 1.6 version. upgraded 2.1.1. after upgrade addeventsource did not work .

function setcalendarevents(start, end, callback){ start = math.round(start.gettime() / 1000); end = math.round(end.gettime() / 1000); ajax({ url : '<?php echo admin_url('event/events') ?>', info : { filter : { filters : _filters }, start : start, end:end }, type : 'post', datatype:'json', success : function(json){ var events = []; callback(json); } }); } calendarobj.fullcalendar('addeventsource', setcalendarevents);

it throws start.gettime() not function. wrote console, callback false, start , end not have gettime() method. looked documentation http://fullcalendar.io/docs/event_data/addeventsource/ there no plenty information.

i did chage , worked.

from start.gettime() >> start.todate().gettime()

jquery fullcalendar

javascript - n3-Charts line-chart(Angular JS), not able to find custom click event handling to drill down -



javascript - n3-Charts line-chart(Angular JS), not able to find custom click event handling to drill down -

i using n3-charts line charts in angular js application. requirement when user clicks on point in line or on 'bar' need details @ point, can custom stuff info. not find click event handling related documentation @ https://github.com/n3-charts/line-chart. please provide me pointers or examples.

javascript angularjs charts

Check If Java Interface Method Is Populated -



Check If Java Interface Method Is Populated -

i have interface implemented next method: public void shutdown() quite few of classes implement method not utilize it. there way check if body of implementation has content in it?

i suppose add together boolean check, i'd avoid additional overhead.

in subclass, can throw java.lang.unsupportedoperationexception in shutdown() if there no implementation.

your calling class need grab exception you'll know class doesn't implement method.

java

android - SQLite Sort across columns across tables -



android - SQLite Sort across columns across tables -

i have 8 tables in sqlite database, each having field called time time when info inserted in table.

i want perform bring together on time column such info ordered time ascending across tables. if theres exact match of time in table record should displayed on same row otherwise empty.

it possible implement total outer joins compound queries, 8 tables, become rather complex.

assuming time values unique, possible concatenate tables while using null columns come other tables, utilize grouping 1 output row per timestamp, , utilize max() pick out non-null values:

select time, max(name1), max(name2), max(name3), ... (select time, name1, null name2, null name3, ... table1 union select time, null, name2, null, ... table2 union select time, null, null, name3, ... table3 ...) grouping time order time

android sorting join sqlite3 android-sqlite

c++ - qt open excel name passing error -



c++ - qt open excel name passing error -

now making 1 programme reads 2 excel sheets , makes one.

and fine. have 1 problem

that is

qaxwidget *excel=new qaxwidget("excel.application", this); excel->dynamiccall("setvisible", true); qaxobject *workbooks=excel->querysubobject("workbooks"); workbooks->dynamiccall("open(const qstring&)", qstring(":/temp/temp.xls")); qaxobject *workbook=excel->querysubobject("activeworkbook"); qaxobject *worksheets=workbook->querysubobject("worksheets");

my qrc file

<rcc> <qresource prefix="/"> <file>temp/temp.xls</file> </qresource> </rcc>

workbooks->dynamiccall("open(const qstring&)", qstring(":/temp/temp.xls")); part occurs error

i inserted 1 excel template file resource.qrc

and tried open didn't work.

if passed absolute path of file, work. if passed relative path of file, don't work

how can solve this?? please allow me know.. thanks

you can set excel file in directory within project docs or something.

set current directory qdir::setcurrent(qcoreapplication::applicationdirpath())

you can access files within doc folder "docs/anyfile.xls"

if set xls file within resources bundled within executable , won't accessible microsoft office com components.

c++ excel qt

python - Need to add appointments into empty dictionary -



python - Need to add appointments into empty dictionary -

i need create appointment calendar application in python , im struggling with first part.

i have empty dictionary called appointments , im trying add together appointments. working reason not accumulating appointments:

appointments = {} while (true): (... had selection variable here inquire user either create appointment, cancel, or view list of appointments. right now, focusing on making appointments.) elif selection == 1: #making appointment apptdate = input('enter date (mm/dd/yy)\n') appttime = input('enter time (hh:mm)\n') apptdesc = input('enter brief description of appointment\n') #checking see if key in dictionary if apptdate not in appointments: newappt = appttime + '\t' + apptdesc appointments[apptdate] = newappt else: appointments[apptdate] = newappt

i have place appttime + '\t' + apptdesc in appointments dictionary using apptdate key. thought doing right.

check see if apptdate in appointments dictionary because affects way supposedly add together new appointment.

any help great, give thanks you

for purposes utilize default dict (imported collections). allows initialise dictionary give key value if key not in there. in case may want consider each date having list of appointments (so if there no appointments, default dict initialised empty list:

from collections import defaultdict def default(): homecoming [] appointments = defaultdict(default)

then, whenever want add together appointment key,

appointments['date'].append("info")

this pretty clean, , avoids checking statements

edit: if insist doing way, lastly paragraph can be:

if apptdate not in appointments: newappt = appttime + '\t' + apptdesc appointments[apptdate] = [newappt] else: newappt = appttime + '\t' + apptdesc appointments[apptdate].append(newappt)

python loops dictionary while-loop choice

c - Difference between ++*argv, *argv++, *(argv++) and *(++argv) -



c - Difference between ++*argv, *argv++, *(argv++) and *(++argv) -

currently learning c , trying head around these instructions. different?

++*argv *argv++ *(++argv) *(argv++)

thanks!

it's postfix increment operator has higher precedence pointer de-reference operator, not prefix increment. these 2 equivalent:

*p++ *(p++)

the prefix increment has same precedence *, *++p increments pointer, , same *(++p). also, ++*p same ++(*p).

c arrays pointers command-line-arguments

sql - Filling empty auto increment values -



sql - Filling empty auto increment values -

i've got table structure:

|id|name|

id incrementing when add together new row in table. illustration i've got 3 rows:

1|john 2|bob 3|alice

if delete row id 2 there that:

1|john 3|alice

how insert new row id = 2 if won't know id's empty? (or - how insert rows unused id (auto increment) values?) thanks.

from documentation:

on insert, if rowid or integer primary key column not explicitly given value, filled automatically unused integer, 1 more largest rowid in use. true regardless of whether or not autoincrement keyword used.

in other words, should able specify id explicitly when performing insert , won't autoincrement.

sql sqlite sqlite3

asp.net - How to reload another frame after postback? -



asp.net - How to reload another frame after postback? -

i have 2 frames in .net app (frame1 , frame2). in frame2, have button switch 1 language 1 , works fine within frame -> postback done, language switched , page reloads in other language. problem there localized buttons in other frame (frame1) not refresh. how , should trigger refresh of frame1 ?

sorry maybe not beingness clear, i'm still newbie in frames...

the thought phone call iframe parent window, there function reload frames parent (main window) contains , refresh them.

for illustration can have function on top window, contains iframe, handle refresh on iframes.

function reloadrestframes(butnotme) { if(butnotme != 'iframe_a_id') document.getelementbyid('iframe_a_id').contentwindow.location.reload(); if(butnotme != 'iframe_b_id') document.getelementbyid('iframe_b_id').contentwindow.location.reload(); }

then frame create post phone call on load as:

parent.reloadrestframes("iframe_a_id");

and create iframes (except 1 create call) on same page reload.

related: iframe function calling iframe parent page javascript function what's best way reload iframe using javascript? how refresh iframe using javascript?

asp.net frame reload

jboss7.x - JBOSS EAP6.2 to IBM MQ Integration -



jboss7.x - JBOSS EAP6.2 to IBM MQ Integration -

we planning migrate our applications websphere jboss eap6.2, part of looking integrate wmq7.5.2 jboss eap in domain mode, have searched on jboss forums , made necessary changes in domain.xml , uncertainty below

i have 2 nodes/unix servers jboss eap

node 1 has below

1) jboss eap installed , running in domain mode ( master) , modified domain.xml , host.xml

2) server 1 - part of server group

3) qmgr a

node 2 has below

1) jboss eap installed , running in slave mode , modifed host.xml

2) server 2 - part of same server grouping server 1

3) qmgr b

i have integrated ibm wmq changing parameters in domain.xml

<subsystem xmlns="urn:jboss:domain:resource-adapters:1.1"> <resource-adapters> <resource-adapter id="wmq.jmsra.rar"> <archive> wmq.jmsra.rar </archive> <transaction-support>notransaction</transaction-support> <config-property name="logwriterenabled"> true </config-property> <config-property name="traceenabled"> true </config-property> <config-property name="tracelevel"> 3 </config-property> <config-property name="connectionconcurrency"> 5 </config-property> <config-property name="maxconnections"> 15 </config-property> <connection-definitions> <connection-definition class-name="com.ibm.mq.connector.outbound.managedconnectionfactoryimpl jndi-name="java:jboss/xxxprimaryqcf" enabled="true" use-java-context="true" pool-name="aptpprimaryqcf"> <config-property name="port"> 1420 </config-property> <config-property name="hostname"> xx.xx.xx.xx1 </config-property> <config-property name="channel"> system.def.svrconn </config-property> <config-property name="transporttype"> client </config-property> <config-property name="queuemanager"> xxxxxx1 </config-property> </connection-definition> <connection-definition class-name="com.ibm.mq.connector.outbound.managedconnectionfactoryimpl jndi-name="java:jboss/xxxsecondaryqcf" enabled="true" use-java-context="true" pool-name="aptpsecondaryqcf"> <config-property name="port"> 1420 </config-property> <config-property name="hostname"> xx.xx.xx.xx2 </config-property> <config-property name="channel"> system.def.svrconn </config-property> <config-property name="transporttype"> client </config-property> <config-property name="queuemanager"> xxxxxx2 </config-property> </connection-definition> <admin-objects> <admin-object class-name="com.ibm.mq.connector.outbound.mqqueueproxy" jndi-name="java:jboss/jms/xxxwriterprimaryqueue" pool-name="odswriterqueue"> <config-property name="basequeuemanagername"> xxxxxx1 </config-property> <config-property name="basequeuename"> xx.xq.qa </config-property> </admin-object> <admin-object class-name="com.ibm.mq.connector.outbound.mqqueueproxy" jndi-name="java:jboss/jms/xxxwritersecondaryqueue" pool-name="odswriterqueue"> <config-property name="basequeuemanagername"> xxxxxx2 </config-property> <config-property name="basequeuename"> xx.xq.qb </config-property> </admin-object> <admin-object class-name="com.ibm.mq.connector.outbound.mqqueueproxy" jndi-name="java:jboss/jms/xxxxwriterprimaryqueue" pool-name="odswriterqueue"> <config-property name="basequeuemanagername"> xxxxxx1 </config-property> <config-property name="basequeuename"> xx.xq.qa </config-property> </admin-object> </admin-objects> </resource-adapter> </resource-adapters> </subsystem> <mdb> <resource-adapter-ref resource-adapter-name="wmq.jmsra.rar"/> <bean-instance-pool-ref pool-name="mdb-strict-max-pool"/> </mdb> <subsystem xmlns="urn:jboss:domain:ee:1.1"> <spec-descriptor-property-replacement>true</spec-descriptor-property-replacement> <jboss-descriptor-property-replacement>true</jboss-descriptor-property-replacement> </subsystem>

in our websphere enviroment have created jms resources @ node scope , server 1 communicated qmgr , server 2 communicated qmgr b , not sure how configure scope here in jboss server 1 on node 1 have reference qmgr1 , server 2 on node 2 have reference qmgr2 , can please guide me

based on can see of configuration:

both hostname , queuemanager properties allow expressions, means can define them ${hostname} , ${queuemanager} in profile, , define system properties hostname , queuemanager @ server-config level, @ server startup, expressions replaced specific value concerned server-config. principle can applied other variables long allow expression, can check in cli :read-resource-description() command, you're looking "expressions-allowed" information, , value set true.

some info regarding expressions: expressions - jboss 7.1 - project documentation editor

let me know if info clear enough, can update examples if needed.

finally little warning, setting configuration outbound (generating messages)? because if configuring listeners through config, you'll end errors.

hope helps.

jboss7.x websphere-mq jboss-eap-6

html - Overlap of text on SCSS Transitions -



html - Overlap of text on SCSS Transitions -

click here jsfiddle

( works web-kit browsers )

i creating navigation links become wider , show text 1 time hover on them. works correctly except 1 issue; text not vanish quick plenty when moving mouse away button , pushed underneath button split sec (and looks ugly!).

i struggling find solution problem, have tried setting spans width , height 0 speed transition text vanishes quicker, neither seem work..

html:

<nav> <ul id="items"> <li>><span class="extra"> view</span> </li> <li>+<span class="extra"> add</span> </li> </ul> <div id="search"> <input type="text" ng-model="typed" /> </div> </nav>

scss:

nav { width: 100%; padding: 6px 6px 4px 6px; position: fixed; top: 0; background-color: #dde; div { display: inline-block; float: right; padding: 4px 15px 4px 5px; } } ul#items { float: left; li { display: inline-block; padding: 5px 10px; background-color: #eef; color: #99a; width: 10px; height: 20px; overflow: hidden; -webkit-transition: width 0.2s linear, color 0.5s linear, background-color 0.5s linear; } li:hover { background-color: #ccd; color: #778; width: 45px; cursor: pointer; } li:hover span { opacity: 1; visibility: visible; } span { opacity: 0; font-size: 14px; padding-left: 8px 5px; -webkit-transition: opacity .25s linear, visibility .1s linear .3s; visibility: hidden; } }

if add together #items li{ white-space: pre; }, contents of li won't wrap, , label become visible after + while growing, , disappear without glitch while shrinking.

see fiddle

html css sass css-transitions css-animations

ios - How to rotate a UITextView without it resizing? -



ios - How to rotate a UITextView without it resizing? -

i trying rotate uitextview in vc. when seek rotate uitextview resizes its?

here code.

- (void)viewdidload { [super viewdidload]; self.edgesforextendedlayout = uirectedgenone; self.title = @"signature view"; [self.signatureview setlinewidth:2.0]; self.signatureview.foregroundlinecolor = [uicolor colorwithred:0.204 green:0.596 blue:0.859 alpha:1.000]; nslog(@"contentsize: %.0f, %.0f", self.view.frame.size.width, self.view.frame.size.height); <-- (contentsize: 320, 568) self.howtotextview.frame = cgrectmake(0, 0, self.view.frame.size.height, self.view.frame.size.width); [self.howtotextview setneedsdisplay]; <-- create redraw [self.howtotextview settransform:cgaffinetransformmakerotation(-90* m_pi/180)]; nslog(@"contentsize: %.0f, %.0f", self.howtotextview.contentsize.width, self.howtotextview.contentsize.height); <--- turns out (contentsize: 103, 138)same on storyboard design }

update(with code uitextview in place , frame right, not text won't resize fill uitextviews new frame size. stuck downwards in bottom corner?):

- (void)viewdidload { [super viewdidload]; self.edgesforextendedlayout = uirectedgenone; self.title = @"signature view"; [self.signatureview setlinewidth:2.0]; self.signatureview.foregroundlinecolor = [uicolor colorwithred:0.204 green:0.596 blue:0.859 alpha:1.000]; nslog(@"contentsize: %.0f, %.0f", self.view.frame.size.width, self.view.frame.size.height); self.howtotextview = [[uitextview alloc] init]; self.howtotextview.backgroundcolor = [uicolor redcolor]; self.howtotextview.text = @"this day. going create millions today. smiling while on phone best way increment business. hope app have work hard on it. please sign name or decline if decline understand lose coverage."; [self.view addsubview:self.howtotextview]; [self.howtotextview settransform:cgaffinetransformmakerotation(-90* m_pi/180)]; self.howtotextview.frame = cgrectmake(0, 0, 80, self.view.frame.size.height); [self.howtotextview setneedsdisplay]; nslog(@"contentsize: %.0f, %.0f", self.howtotextview.contentsize.width, self.howtotextview.contentsize.height); }

update 2: sticking textview within uiview makes content size right, code uitextview/uiview in top right corner of app, though set them both 0,0 x,y? not sure why is?

self.howtotextview = [[uitextview alloc] init]; [self.howtotextview setframe:cgrectmake(0, 0, self.view.frame.size.height-20, 110)]; self.howtotextview.backgroundcolor = [uicolor redcolor]; self.howtotextview.text = @"this day. going create millions today. smiling while on phone best way increment business. hope app have work hard on it. please sign name or decline if decline understand lose coverage."; uiview *myrotateview = [[uiview alloc] init]; [myrotateview setframe:cgrectmake(0, 0, self.view.frame.size.height, 120)]; [myrotateview setbackgroundcolor:[uicolor greencolor]]; [myrotateview addsubview:self.howtotextview]; myrotateview.transform = cgaffinetransformmakerotation(-90* m_pi/180); [[self view] addsubview:myrotateview];

after 2 days of struggling, found workaround:

create uiview. add uitextview sub view it. get proper size of uitextview, using sizethatfits(). set uitextview frame. set uiview frame 0 heigh , 0 width (it's important!). rotate uiview.

now if want alter font size this:

mytextview.font = uifont.boldsystemfontofsize(size) allow maxsize = cgsizemake(screen_width, screen_height) allow frame = mytextview.sizethatfits(maxsize) mytextview.frame = cgrectmake(0, 0, frame.width, frame.height)

at end rotate uiview again.

ios uitextview

jquery - What's the difference between [attribute~=value] and [attribute*=value]? -



jquery - What's the difference between [attribute~=value] and [attribute*=value]? -

what's difference between these 2 jquery selectors?

here definitions w3schools.com:

the [attribute~=value] selector selects each element specific attribute, value containing specific string.

the [attribute*=value] selector selects each element specific attribute, value containing string.

update:

here definitions jquery.com. answers question:

[attribute~=value] - selects elements have specified attribute value containing given word, delimited spaces.

[attribute*=value] - selects elements have specified attribute value containing given substring.

*= attributecontains selector , jquery docs:

selects elements have specified attribute value containing given substring.

~= attributecontainsword selector , jquery docs:

selects elements have specified attribute value containing given word, delimited spaces.

see attributecontains selector illustration of usage here , attributecontainsword selector illustration , usage here

the attributecontains selector string contained in attribute value while attributecontainsword selector string seperated delimeted space. official jquery examples explain it.

explanation: attribute contains selector [name*="value"]

html:

<input name="man-news"> <input name="milkman"> <input name="letterman2"> <input name="newmilk">

jquery:

$( "input[name*='man']" ).val( "has man in it!" );

output:

demo example:

example of attribute contains selector [name*="value"]

attribute contains word selector [name~="value"]

html:

<input name="man-news"> <input name="milk man"> <input name="letterman2"> <input name="newmilk">

jquery:

$( "input[name~='man']" ).val( "mr. man in it!" );

output:

demo example:

example of attribute contains word selector [name~="value"]

jquery jquery-selectors

ruby on rails - Devise strong parameters not working? -



ruby on rails - Devise strong parameters not working? -

i have beingness next instructions devise github's on sign giving warning

warning: can't mass-assign protected attributes user: email, password, password_confirmation

here code snippets

registrationcontroller

class registrationcontroller < devise::registrationscontroller private def account_update_params params.require(:user).permit( :email, :password, :password_confirmation, :current_password) end def sign_up_params params.require(:user).permit(:email, :password, :password_confirmation) end end

ruby-on-rails ruby-on-rails-4 devise

jquery - Youtube video ends fade out -



jquery - Youtube video ends fade out -

i trying create youtube video api frame fade out after playing, can't work. worked while ago, must have done script mess up.

i have tried document.getelementbyid("video").style.display = "none"; aswell, , doesn't work. want create fade out.

<div id="player"></div> <script> var tag = document.createelement('script'); tag.src = "https://www.youtube.com/iframe_api"; var firstscripttag = document.getelementsbytagname('script')[0]; firstscripttag.parentnode.insertbefore(tag, firstscripttag); var player; function onyoutubeiframeapiready() { player = new yt.player('player', { height: '480', width: '853', videoid: '7u-liw-xre4', playervars: { 'autoplay': 1, 'showinfo': 0, 'controls': 0, 'rel' : 0 } }); } function onplayerready(event) { event.target.playvideo(); } var done = false; function onplayerstatechange(event) { if(event.data === yt.playerstate.ended) { stopvideo(); } } function stopvideo() { player.stopvideo(); document.getelementbyid("video").fadeout(); } </script>

what looking event send yt api when video has ended. you're giving command end video. 2 different things. seek this:

function onplayerstatechange(event) { if (event.data == yt.playerstate.playing) { console.log('awesome video playing'); } if (event.data == yt.playerstate.ended) { jquery('your element').fadeto('fast', 0).hide(); } }

and i'd advise not mix javascript , jquery styling in code can confusing.

jquery youtube youtube-api

Bash script for finding the square root of a number(Babylonian Method) -



Bash script for finding the square root of a number(Babylonian Method) -

i wrote code find square root of given x number, lastly part gives me "integer look expected" , can do? (i'm shell/bash noob)

#bin/bash 2 clear 3 echo "hello, calculate square root of number x" 4 echo "we're going utilize babylonian method" 5 echo "give me valor x" 6 read x 7 if [ $x -lt 0 ] 8 9 clear 10 echo "the roots of number imaginary" 11 elif [ $x -eq 0 ] 12 13 clear 14 echo "the square root of 0 0" 15 else 16 echo "now give me base of operations b , vertical height h bh=x" 17 18 echo "give me b" 19 read b 20 echo "give me h" 21 read h 22 fi 23 24 if [ $b -eq $h ] 25 26 echo:"b or h square root of h" 27 else 28 until [ $b -eq $h ] 29 30 b=`echo "scale=3; ($b + $h)/2"|bc -l` 31 h=`echo "scale=3; $x/$b"|bc -l` 32 done 33 fi 34 echo "the square root of x $b or $h" 35

bash can handle integers. same applies [ ... ] (check man test):

integer1 -eq integer2 integer1 equal integer2

in order compare floats, utilize bc correctly counting.

bash

SQL Server add new column to table and filled random integer in range -



SQL Server add new column to table and filled random integer in range -

i understand how add together new column , default int table.

alter table cards add together amex int not null default(1) // how can add together random number (between 1, 10) or random date (jan feb etc)? go

how add together new column table, , fill random integer between 1 , 10, or random date?

edit - reply below:

create table cards ( amex int not null default (cast(right(cast(checksum(newid()) varchar(255)), 1) int) + 1) );

you can update. number 1 10, next should work:

update cards set amex = cast(right(cast(checksum(newid()) varchar(255)), 1) int) + 1

edit:

here illustration of beingness used in create table statement.

sql sql-server database-administration

Magento Onepage Checkout Place Order button redirects to empty cart instead to success page -



Magento Onepage Checkout Place Order button redirects to empty cart instead to success page -

i have issue, , can not find causing it. on local machine working fine when moved code staging server on place order button, i'm getting redirected empty cart page. have looked system.log , exceptions.log, , inspected through firebug, can't find anything. did had similar issue, or know how prepare this. btw magento ee 1.14

magento checkout

javascript - jquery div animate right and after pauze animate left -



javascript - jquery div animate right and after pauze animate left -

im seek slide div left right after clicking button submit, give little pauze , div automaticaly slide left

now have done slide right..

js

$(document).ready(function() { $('#submit').click(function(e) { reslide(); function reslide() { $('#mainform').delay().animate({width: '510px', left: '1050'}, 600).delay(5000).animate({width: '510px', right: '1000px'}, 200, function() { settimeout(reslide, 3000); }); } $('.hello').fadein(1500); $("<b>successfully send</b>").appendto(".hello"); $('.hello').fadeout(2500); }); });

html

<div id="mainform"> <!-- required div starts here --> <form id="form"> <h3>contact form</h3> <div class="hello"></div> <input type="button" id="submit" value="send message"/> </form> </div>

css

#mainform{ position: absolute; display: block; padding-top:20px; font-family: 'fauna one', serif; }

when give feedback user after/before submiting, seek utilize css3 transform instead of moving/resizing object.

function slide($obj) { // jquery object of element $obj.css("transform", "translatex (50px)"); settimeout(function(){ $obj.css("transform", "none"); }, 5000); }

to create smooth (real animation) apply css3 transition property.

<style> .object { transition: transform 0.6s; } </style>

or can shorten, if you're sure everything'd go smoothly.

function slide($obj) { // jquery object of element $obj.animate("transform", "translatex (50px)") .delay(600). .animate("transform", "translatex (0px)"); }

ps; in expirience jquery.delay(); wasn't working queueing animations, i'm not exclusively sure why. matter of fact, happened sometimes. tought wasn't working

// not working $("smth").animate({"rule":"val"}).delay(500).animate("rule":"val"); // working $("smth").animate({"rule":"val"}) settimeout(function(){ $("smth").animate({"rule":"val"}) }, 1000);

javascript jquery html css animation

eclipse - New ECL Command related to RCPTT testing tool -



eclipse - New ECL Command related to RCPTT testing tool -

i referencing site "https://www.eclipse.org/rcptt/documentation/userguide/ecl/new-command-guide/" new ecl command creation.

as per new command guide, downloaded rcptt plugin sources eclipse workspace, , when seek create new eclipse instance using these next plugins per guide, errors exists eg., org.eclipse.rcptt.ecl.parser plugin, unsatisfied version constraint 'org.antlr.runtime:[3.2.0, 3.3.0)'. why getting that, , version of org.antlr.runtime should have?

you should install antlr runtime 3.2 version http://download.eclipse.org/tools/orbit/downloads/drops/r20140525021250/repository/

eclipse

The process cannot access the file 'R:\mft classes\c# fundamental\c#.net apps\employee info\fileList.txt' because it is being used by another process -



The process cannot access the file 'R:\mft classes\c# fundamental\c#.net apps\employee info\fileList.txt' because it is being used by another process -

i'm trying write file names in "filelist.txt".the file has been created when seek write in , shows me error above. should do?

string strfilepath; //the current path : "r:\mft classes\c# fundamental\c#.net apps\employeeinfo\windowsformsapplication2\bin\debug" strfilepath = directory.getcurrentdirectory(); strfilepath = directory.getparent(strfilepath).tostring(); strfilepath = directory.getparent(strfilepath).tostring(); strfilepath = directory.getparent(strfilepath).tostring(); strfilepath = strfilepath + "\\filelist.txt"; file.create(strfilepath); foreach (string saveme in listbox1.items) { file.writealltext(strfilepath, saveme); }

use stream author instead.

string strfilepath; //the current path : "r:\mft classes\c# fundamental\c#.net apps\employeeinfo\windowsformsapplication2\bin\debug" strfilepath = directory.getcurrentdirectory(); strfilepath = strfilepath + "\\filelist.txt"; using (streamwriter sw = new streamwriter(strfilepath, true)) { foreach (string saveme in listbox1.items) { sw.write(saveme); } }

c#

continuous integration - Jenkins job for remote deployment - multiple environments -



continuous integration - Jenkins job for remote deployment - multiple environments -

i'm trying create generic jenkins job deploying different projects different git repos , branches different application servers (in combination).

i have 2 string build parameters repo , branch, , little shell script in pre-build step based on build params creates deploy.properties file properties url , profile.

another pre-build step inject environment variables uses deploy.properties file created.

i'm utilize url property in jenkins deploy plugin in next way: tomcat url field - $url.

also, in build section, i'm using profile property: clean install -p$profile .

the problem placeholders or not replaced values i've set in shell script. not post-build action , i'm echoing same placeholders, values replaced , seems work. other check i've done environment variables section given build , variable values there, injection works.

any ideas?

try below , create sure don't have cmd in single quotes or anything.

clean install -p${profile}

jenkins continuous-integration jenkins-plugins continuous-deployment

express - Creating Paypal Recurring Payments between other enterprise and user -



express - Creating Paypal Recurring Payments between other enterprise and user -

we develop management scheme other companies receive online payments paypal. single payments have implemented adaptive express checkout, money goes straight user business relationship company account.

but trying implement recurring payments in same way. i've research hundreds of forum threads , official documentation , couldn't find guide accomplish this. people it's impossible create recurring payments on other companies behalf.

however, find there specific permission in profile->api access->api permissions section says: "create , manage recurring payments". if 1 business business relationship gives permission api business relationship should able it, how?

thanks in advance.

i did similar recurring payment company website. created subscription payment button , added them webpage. straight forwards set in paypal website. did in sandbox environment , tested whether works.

does requirement allow have payment buttons? in case create life easy.

express paypal payment checkout recurring

java - is beanstalk plugin deploy nothing to aws elb? -



java - is beanstalk plugin deploy nothing to aws elb? -

i'm trying deploy war file aws elb. in logs can see that:

war file uploaded s3 new application created elb environment replaced

but in aws log can't see actions application...

pom.xml:

<plugin> <groupid>br.com.ingenieux</groupid> <artifactid>beanstalk-maven-plugin</artifactid> <version>1.3.5</version> <configuration> <environmentname>my</environmentname> <cnameprefix>my</cnameprefix> <s3bucket>archive-for-elb</s3bucket> <s3key>${project.build.finalname}-${maven.build.timestamp}.war</s3key> <artifactfile>target/my.war</artifactfile> </configuration> </plugin>

maven log:

[info] [info] --- beanstalk-maven-plugin:1.3.5:upload-source-bundle (default-cli) @ --- [info] target path: s3://archive-for-elb/my-0.1.0-2014-10-23t22:21:21z.war [info] uploading artifact file: .../my.war 100.00% 29 mib/29 mib done [info] artifact uploaded [info] success [info] [info] --- beanstalk-maven-plugin:1.3.5:create-application-version (default-cli) @ --- [info] success [info] * datecreated: fri oct 24 01:21:39 fet 2014 [class: date] [info] * sourcebundle: {s3bucket: archive-for-elb,s3key: my-0.1.0-2014-10-23t22:21:21z.war} [class: s3location] [info] * versionlabel: 0.1.0 [class: string] [info] * description: update beanstalk-maven-plugin [class: string] [info] * applicationname: [class: string] [info] * dateupdated: fri oct 24 01:21:39 fet 2014 [class: date] [info] [info] --- beanstalk-maven-plugin:1.3.5:replace-environment (default-cli) @ --- [info] creating new environment on my-0.elasticbeanstalk.com [info] excluding alternative setting: aws:elasticbeanstalk:application:environment:aws_secret_key[''] [info] excluding alternative setting: aws:cloudformation:template:parameter:appsource['http://s3-eu-west-1.amazonaws.com/elasticbeanstalk-samples-eu-west-1/elasticbeanstalk-sampleapp.war'] [info] including alternative setting: aws:elasticbeanstalk:container:tomcat:jvmoptions:xmx['1024m'] [info] excluding alternative setting: aws:elasticbeanstalk:application:environment:aws_access_key_id[''] [info] excluding alternative setting: aws:elasticbeanstalk:container:tomcat:jvmoptions:jvm options[''] [info] including alternative setting: aws:cloudformation:template:parameter:jvmoptions['jvm options=,xx:maxpermsize=128m,xmx=1024m,xms=512m'] [info] excluding alternative setting: aws:elasticbeanstalk:application:environment:param1[''] [info] excluding alternative setting: aws:elasticbeanstalk:application:environment:param2[''] [info] including alternative setting: aws:cloudformation:template:parameter:instanceport['80'] [info] excluding alternative setting: aws:elasticbeanstalk:application:environment:param4[''] [info] excluding alternative setting: aws:elasticbeanstalk:application:environment:param3[''] [info] including alternative setting: aws:cloudformation:template:parameter:environmentvariables['param3=,param4=,param1=,param2=,jdbc_connection_string=,aws_secret_key=,param5=,aws_access_key_id='] [info] excluding alternative setting: aws:elasticbeanstalk:application:environment:param5[''] [info] including alternative setting: aws:elasticbeanstalk:hostmanager:logpublicationcontrol['false'] [info] including alternative setting: aws:elasticbeanstalk:container:tomcat:jvmoptions:xx:maxpermsize['128m'] [info] including alternative setting: aws:elasticbeanstalk:container:tomcat:jvmoptions:xms['512m'] [info] including alternative setting: aws:autoscaling:launchconfiguration:instancetype['m1.small'] [info] excluding alternative setting: aws:elasticbeanstalk:application:environment:jdbc_connection_string[''] [info] including alternative setting: aws:elb:loadbalancer:crosszone['false'] [info] including alternative setting: aws:elb:healthcheck:interval['30'] [info] including alternative setting: aws:elb:loadbalancer:loadbalancerhttpsport['off'] [info] including alternative setting: aws:elb:healthcheck:timeout['5'] [info] excluding alternative setting: aws:elb:loadbalancer:sslcertificateid[''] [info] including alternative setting: aws:elb:healthcheck:unhealthythreshold['5'] [info] excluding alternative setting: aws:ec2:vpc:elbsubnets[''] [info] including alternative setting: aws:elb:policies:stickiness policy['false'] [info] including alternative setting: aws:elb:policies:connectiondrainingtimeout['20'] [info] including alternative setting: aws:elb:loadbalancer:loadbalancerportprotocol['http'] [info] including alternative setting: aws:elb:loadbalancer:loadbalancersslportprotocol['https'] [info] including alternative setting: aws:elb:healthcheck:target['tcp:80'] [info] including alternative setting: aws:elb:policies:stickiness cookie expiration['0'] [info] including alternative setting: aws:elb:healthcheck:healthythreshold['3'] [info] including alternative setting: aws:elb:policies:connectiondrainingenabled['false'] [info] including alternative setting: aws:ec2:vpc:elbscheme['public'] [info] including alternative setting: aws:elb:loadbalancer:loadbalancerhttpport['80'] [info] including alternative setting: aws:autoscaling:launchconfiguration:imageid['ami-937474e7'] [info] including alternative setting: aws:autoscaling:launchconfiguration:monitoringinterval['5 minute'] [info] excluding alternative setting: aws:autoscaling:launchconfiguration:securitygroups['awseb-e-5dguwgvhms-stack-awsebsecuritygroup-16adzataghya2'] [info] excluding alternative setting: aws:autoscaling:launchconfiguration:rootvolumetype[''] [info] excluding alternative setting: aws:autoscaling:launchconfiguration:iaminstanceprofile[''] [info] excluding alternative setting: aws:autoscaling:launchconfiguration:rootvolumesize[''] [info] excluding alternative setting: aws:autoscaling:launchconfiguration:blockdevicemappings[''] [info] excluding alternative setting: aws:autoscaling:launchconfiguration:ec2keyname[''] [info] excluding alternative setting: aws:autoscaling:launchconfiguration:rootvolumeiops[''] [info] excluding alternative setting: aws:ec2:vpc:associatepublicipaddress[''] [info] including alternative setting: aws:autoscaling:asg:maxsize['4'] [info] including alternative setting: aws:autoscaling:asg:cooldown['360'] [info] including alternative setting: aws:autoscaling:asg:minsize['1'] [info] including alternative setting: aws:autoscaling:asg:availability zones['any'] [info] excluding alternative setting: aws:autoscaling:updatepolicy:rollingupdate:mininstancesinservice[''] [info] including alternative setting: aws:autoscaling:updatepolicy:rollingupdate:rollingupdateenabled['false'] [info] excluding alternative setting: aws:autoscaling:asg:custom availability zones[''] [info] excluding alternative setting: aws:ec2:vpc:subnets[''] [info] excluding alternative setting: aws:autoscaling:updatepolicy:rollingupdate:maxbatchsize[''] [info] excluding alternative setting: aws:autoscaling:updatepolicy:rollingupdate:pausetime[''] [info] excluding alternative setting: aws:ec2:vpc:vpcid[''] [info] including alternative setting: aws:autoscaling:trigger:upperthreshold['6000000'] [info] including alternative setting: aws:autoscaling:trigger:period['5'] [info] including alternative setting: aws:autoscaling:trigger:statistic['average'] [info] including alternative setting: aws:autoscaling:trigger:measurename['networkout'] [info] including alternative setting: aws:autoscaling:trigger:lowerthreshold['2000000'] [info] including alternative setting: aws:autoscaling:trigger:evaluationperiods['1'] [info] including alternative setting: aws:autoscaling:trigger:unit['bytes'] [info] including alternative setting: aws:autoscaling:trigger:breachduration['5'] [info] including alternative setting: aws:autoscaling:trigger:lowerbreachscaleincrement['-1'] [info] including alternative setting: aws:autoscaling:trigger:upperbreachscaleincrement['1'] [info] including alternative setting: aws:elasticbeanstalk:control:rollbacklaunchonfailure['false'] [info] including alternative setting: aws:elasticbeanstalk:control:defaultsshport['22'] [info] including alternative setting: aws:elasticbeanstalk:control:launchtype['migration'] [info] including alternative setting: aws:elasticbeanstalk:monitoring:automatically terminate unhealthy instances['true'] [info] including alternative setting: aws:elasticbeanstalk:control:launchtimeout['0'] [info] including alternative setting: aws:elasticbeanstalk:environment:environmenttype['loadbalanced'] [info] including alternative setting: aws:autoscaling:launchconfiguration:sshsourcerestriction['tcp,22,22,0.0.0.0/0'] [info] excluding alternative setting: aws:elasticbeanstalk:sns:topics:notification topic arn[''] [info] excluding alternative setting: aws:elasticbeanstalk:sns:topics:notification endpoint[''] [info] including alternative setting: aws:elasticbeanstalk:command:batchsize['100'] [info] including alternative setting: aws:elasticbeanstalk:command:timeout['600'] [info] excluding alternative setting: aws:elasticbeanstalk:application:application healthcheck url[''] [info] excluding alternative setting: aws:elasticbeanstalk:sns:topics:notification topic name[''] [info] including alternative setting: aws:elasticbeanstalk:sns:topics:notification protocol['email'] [info] including alternative setting: aws:elasticbeanstalk:command:batchsizetype['percentage'] [info] , it'll named my-0 [info] using latest available application version 0.1.0 [info] environment lookup [info] ... environmentid equal 'e-wt6wzxjpyj' [info] ... status set 'ready' [info] ... health equal 'green' [info] info fri oct 24 01:21:48 fet 2014 using elasticbeanstalk-eu-west-1-896684893807 amazon s3 storage bucket environment data. [info] info fri oct 24 01:22:02 fet 2014 created load balancer named: awseb-e-w-awsebloa-ws5l7g9xb5xu [info] info fri oct 24 01:22:23 fet 2014 created security grouping named: awseb-e-wt6wzxjpyj-stack-awsebsecuritygroup-ut0k8k743bwj [info] info fri oct 24 01:22:26 fet 2014 created auto scaling launch configuration named: awseb-e-wt6wzxjpyj-stack-awsebautoscalinglaunchconfiguration-onmfrqkqfvf1 [info] info fri oct 24 01:23:24 fet 2014 created auto scaling grouping named: awseb-e-wt6wzxjpyj-stack-awsebautoscalinggroup-1glbecapxkowg [info] info fri oct 24 01:23:28 fet 2014 created auto scaling grouping policy named: arn:aws:autoscaling:eu-west-1:896684893807:scalingpolicy:315fb3b8-e461-441d-8d8d-5aa9e9e09f40:autoscalinggroupname/awseb-e-wt6wzxjpyj-stack-awsebautoscalinggroup-1glbecapxkowg:policyname/awseb-e-wt6wzxjpyj-stack-awsebautoscalingscaleuppolicy-iuq473krvy73 [info] info fri oct 24 01:23:28 fet 2014 created auto scaling grouping policy named: arn:aws:autoscaling:eu-west-1:896684893807:scalingpolicy:96912dc4-b9ac-4c47-9d76-99ef4087600e:autoscalinggroupname/awseb-e-wt6wzxjpyj-stack-awsebautoscalinggroup-1glbecapxkowg:policyname/awseb-e-wt6wzxjpyj-stack-awsebautoscalingscaledownpolicy-1hpvbp4235ci2 [info] info fri oct 24 01:23:31 fet 2014 created cloudwatch alarm named: awseb-e-wt6wzxjpyj-stack-awsebcloudwatchalarmhigh-1b5fqs201rin7 [info] info fri oct 24 01:23:32 fet 2014 created cloudwatch alarm named: awseb-e-wt6wzxjpyj-stack-awsebcloudwatchalarmlow-v2im7cxm1xr0 [info] waiting environmentid e-wt6wzxjpyj ready state [info] environment lookup [info] ... environmentid equal 'e-wt6wzxjpyj' [info] ... status set 'ready' [info] ... health equal 'green' [info] swapping environment cnames e-wt6wzxjpyj , e-5dguwgvhms [info] skipping r53 domain binding [info] environment lookup [info] ... environmentid equal 'e-wt6wzxjpyj' [info] ... status set 'ready' [info] terminating environmentid=e-5dguwgvhms (attempt 1/15) [info] success [info] * solutionstackname: 32bit amazon linux running tomcat 7 [class: string] [info] * description: [class: string] [info] * health: gray [class: string] [info] * dateupdated: fri oct 24 01:21:44 fet 2014 [class: date] [info] * datecreated: fri oct 24 01:21:44 fet 2014 [class: date] [info] * environmentid: e-wt6wzxjpyj [class: string] [info] * versionlabel: 0.1.0 [class: string] [info] * tier: {name: webserver,type: standard,version: 1.0} [class: environmenttier] [info] * environmentname: my-0 [class: string] [info] * cname: my-0.elasticbeanstalk.com [class: string] [info] * applicationname: [class: string] [info] * status: launching [class: string] [info] ------------------------------------------------------------------------ [info] build success [info] ------------------------------------------------------------------------

catalina.out aws:

------------------------------------- /var/log/tomcat7/catalina.out ------------------------------------- tomcat7-7.0.27 rpm installed oct 23, 2014 10:25:48 pm org.apache.catalina.core.aprlifecyclelistener init info: apr based apache tomcat native library allows optimal performance in production environments not found on java.library.path: /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/i386/client:/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/i386:/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/../lib/i386:/usr/java/packages/lib/i386:/lib:/usr/lib oct 23, 2014 10:25:49 pm org.apache.coyote.abstractprotocol init info: initializing protocolhandler ["http-bio-8080"] oct 23, 2014 10:25:49 pm org.apache.coyote.abstractprotocol init info: initializing protocolhandler ["ajp-bio-8009"] oct 23, 2014 10:25:49 pm org.apache.catalina.startup.catalina load info: initialization processed in 1507 ms oct 23, 2014 10:25:49 pm org.apache.catalina.core.standardservice startinternal info: starting service catalina oct 23, 2014 10:25:49 pm org.apache.catalina.core.standardengine startinternal info: starting servlet engine: apache tomcat/7.0.27 oct 23, 2014 10:25:49 pm org.apache.catalina.startup.hostconfig deploydirectory info: deploying web application directory /var/lib/tomcat7/webapps/root oct 23, 2014 10:26:04 pm org.apache.catalina.core.applicationcontext log info: no spring webapplicationinitializer types detected on classpath oct 23, 2014 10:26:04 pm org.apache.coyote.abstractprotocol start info: starting protocolhandler ["http-bio-8080"] oct 23, 2014 10:26:04 pm org.apache.coyote.abstractprotocol start info: starting protocolhandler ["ajp-bio-8009"] oct 23, 2014 10:26:04 pm org.apache.catalina.startup.catalina start info: server startup in 14683 ms

upd1

<properties> <beanstalker.region>eu-west-1</beanstalker.region> </properties>

upd2

i got access instance via ssh , found deployed application in /var/lib/tomcat7/webapps/root described in log. dowloaded same version of tomcat , tried deploy in same folder same war (i downloaded war aws) in aws - fine , application started...

any ideas why not started in aws tomcat?

can confirm availability zone aws console?

by default, beanstalker uses us-east-1, new aws accounts, default tends us-west-1 instead

java maven amazon-web-services elastic-beanstalk