Posts

java - JUnit Testing for User Interface with Database Integration in Eclipse -

i've been told test user interface via junit testing. however, how can go testing aspects of user interface such login credentials? example, want test happens if enters in wrong password. right now, password verified comparing entered password hashed password in database. unsure how test different password parameters. can done using junit testing? i suggest junit + dbunit + spring-test the testing problem can resolved mocking database. in point of view, it's little complex explain here, can example? https://bitbucket.org/dperezcabrera/fest-swing-test i think can help.

excel - Define a cell as a variable to be used in workbook reference -

i attempting define cell variable can use when calling upon workbook. cell changes daily , before running macro create brand new workbook cell title. this have won't work: dim wbk workbook set wbk = "x:\myname\testocd\&"sheets("mockuphelp").range("d29")""" the cell referencing changes daily in sheet mockuphelp d29 . try, set wbk = workbooks.open("x:\myname\testocd\" & sheets("mockuphelp").range("d29").value & ".xlsx") not sure if need .xlsx thrown on tail end should give general idea.

javascript - How to save PHP variable in loop after AJAX requests more posts? -

i have been looking @ code far long , getting can me! i building wordpress site, , main blog page, want display content tiles, every 3 or 7, want display promo content post-type. can fine, when add load more posts button, resets counter have keeping track of promo content 0, therefore showing first 2 promo pieces on , on each new load. i appreciate help. i'm going in circles now. the important parts of home.php file : <div class="blog-post-tiles"> <?php //variables $counter = 0; $promo_counter = 0; $args = array( 'post_type' => 'promo', ); //$postlist = new wp_query( $args ); $postlist = get_posts($args); $posts = array(); foreach ( $postlist $post ) { $promo_posts_array[] += $post->id; } ?> <?php if ( hav...

what does this error mean in android studio?, how to solve this issue? -

error:the supplied javahome seems invalid. i cannot find java executable. tried location: c:\users\abhi pattar\appdata\local\android\sdk\bin\java.exe" try eliminating space in "abhi pattar". run errors if have spaces in pathname. try renaming folder "abhipattar" or "abhi_pattar".

makefile - Make runs target with variable name regardless of whether file exists -

i'm using gnu make work data. when try run target variable name, make run target, regardless of whether target file exists . consider following makefile : include config.mk .phony : all : $(pg_db).db $(pg_db).db : createdb $(pg_db) -u $(pg_user) touch $@ where config.mk contains: makeflags += --warn-undefined-variables shell := bash .shellflags := -eu -o pipefail .default_goal := .delete_on_error: .suffixes: pg_user="foo" pg_db="foo" when run make , make creates postgres database, , touches file foo.db . however, when run make again, output is: createdb "foo" -u foo createdb: database creation failed: error: database "foo" exists make : *** ["foo".db] error 1 this shouldn't have happened! expect make , in situation, check prerequisites phony target all , see foo.db exists, , exit without doing anything. strangely, happens when rid of variables in target names: include config.mk .phony : all : f...

How to take selected value from option field in html using node.js code? -

i working on node.js new me stucked here..how take selected value option field in html using node.js here html code : <select name="selectedvalue" class="form-control hidden"> <option>1</option> <option>2</option> <option>3</option> <option>4</option> <option>5</option> <option selected="selected">6</option> <option>7</option> </select> so how selected option value through node.js here node.js code: var _numberofpass=req.body.selectedvalue; but got output undefined didn't success ed take selected option value html please tell me solution above problem.

PHP - using a namespace in another namespace -

i'm trying use files namespace inside 1 of own namespaces, it's not recognising exceptions defuse\crypto namespace. i've checked files, , there stored in directory. can include autoloader no exceptions too. what can cleanly use both namespaces in same file? here's code: namespace defuse\crypto; $path = '/my/path/to/defusecrypto/autoloader'; require_once $path; use \defuse\crypto\crypto; use \defuse\crypto\exception ex; namespace mynamespace; class myclass { static function encrypt_key($key) { try { $ciphertext = crypto::encrypt($key, $privatekey); return $ciphertext; } catch (ex\cryptotestfailedexception $ex) { return false; } catch (ex\cannotperformoperationexception $ex) { return false; } } static function decrypt_key($key) { try { $decryptedkey = crypto::decrypt($key, $private...