Posts

Showing posts from May, 2011

java - Spring Security: anonymousUser blocked from .authenticated() configuration? -

when not logged in spring security, authentication's currentprincipalname anonymoususer , method .authenticated() returns true . however, configuration asks requests authenticated , anonymoususer denied. here configuration code: @override protected void configure(httpsecurity http) throws exception { characterencodingfilter characterencodingfilter = new characterencodingfilter(); characterencodingfilter.setencoding("utf-8"); characterencodingfilter.setforceencoding(true); http.addfilterbefore(characterencodingfilter, csrffilter.class); http .formlogin()//support form login .loginpage("/login") .and() .authorizerequests() .antmatchers("/spitter/me").authenticated() .antmatchers(httpmethod.post, "/spittles").authenticated() .anyrequest().permitall(); } both of 2 antmatchers blocked anonymoususer accessing. there reason why? edit: why duplicate? asking different que

python - Remember exceptions raised to handle them later -

tldr: i'd let function run through exceptions, display them @ end , make function raise exception. i building function (see below) path each value in dictionary, creating dictionary of form "value":"path". have recursive sub-function traversing dictionary doing processing on each node, throwing typeerror when node isn't of supported types, , keyerror when value present. what i'd do processing on entire dictionary ignoring exceptions , handle them in end, can give path each problematic value. want save flattened dictionary if no exception has been raised. as stands if wrap call flatten_dict in try...except block first exception raised make changing problematic values tedious. thought using logging, don't know how can make function still raise exception @ end can act accordingly. i'm wondering if there's way that, or if it's sign should change design ? thanks def flatten_dict(dictionary): """ flattens

javascript - Why HOC are applied during exporting of component in place of importing it -

my basic understading hoc connect (for connecting redux store) , other hoc's applied component while exporting it. like this import react, { component } 'react'; import './app.css'; import myhoc './myhoc/index'; class app extends component { render() { return ( <div classname="app"> </div>); } } export default myhoc({})(app); where better thing apply hoc during import make easier make reusable component. same component can pick props store or props , responsibility of parent component check give hoc apply on component. i know can use container components takes component , render children adds code in jsx (wont if there many container components) though can this import react, { component } 'react'; import './app.css'; import myhoc './myhoc/index'; import appchild './appchild'; const newappchild = myhoc({}, ()=> { })(appchild); class app extends component { state =

javascript - How to POST multiple observations through REST in OpenMRS -

when sending single observation getting created multiple observations throwing error 500. for single observations query - type- post uri - /openmrs-standalone/ws/rest/v1/obs body- { "concept" : "5086aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "person" : "610b0696-7529-4b4a-b65b-37336a75962a", "obsdatetime": "2017-07-24t15:33:49+05:30", "encounter": "3bc0672d-ebc6-4e65-aae1-8a1d4de759bf", "value" : "90" } multiple sending type- post uri - /openmrs-standalone/ws/rest/v1/obs body- [{"concept" : "5089aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ", "person" : "610b0696-7529-4b4a-b65b-37336a75962a", "obsdatetime": "2017-07-24t15:33:49+05:30", "encounter": "3bc0672d-ebc6-4e65-aae1-8a1d4de759bf", "value" : "99" }, { "concept" : "5090aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "person" :

javascript - fa icons pushing the elements away -

Image
i trying create navigation menu tabs. however, tabs under tabs "fa icons" kinda taking space , other elements shifted right or below (if there third line). how can avoid pushing? it looks this: http://jsfiddle.net/63peh71b/1/ .slider { position: fixed; top: 168px; background-color: white; left: 48px; right: 48px; z-index: 3; padding-top: 6px; } .nav-tabs { border-bottom: 1px solid #c4c4c4; } .nav { padding-left: 0; margin-bottom: 0; list-style: none; } ol, ul { margin-top: 0; margin-bottom: 10px; } * { -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; } ul, menu, dir { display: block; list-style-type: disc; -webkit-margin-before: 1em; -webkit-margin-after: 1em; -webkit-margin-start: 0px; -webkit-margin-end: 0px; -webkit-padding-start: 40px; } <link href="https://cdnjs.cloudflare.com

have comment for table in MySQL workbench -

i create table in mysql workbench don't have comment there way have ??? notice : want comment table not column create comment on table create table (...) comment='table_comment'; display comments by: show table status name='table_name'; edit alter table test_comments comment = 'another comment';

salesforce - How to write test class for apex trigger on opportunity -

i have created trigger calls future class make http callout third party url, everthing working fine here test class not covering opportunity fields iswon & isclosed. modification need in test class make code coverage @ least 75 % trigger. // apex trigger trigger opptrigger on opportunity (before update) { string opptype = ''; for(opportunity opp : trigger.new){ if (opp.isclosed == true){ // closed if (opp.iswon == true){ opptype = 'won'; // closed-won }else{ opptype = 'lost'; // closed-lost } } else { // open opptype = 'open'; } // call method @future annotation futurecls.srvccallout(opp.id,opp.amount,opptype); } } // future class trigger future method global class futurecls { @future(callout=true) public static void srvccallout(string oppid, decimal oppamt, string opptype){ // create http request httprequest req = new httprequest(); req.setmethod('post'); req.setheader(&#

python - Hough circle transform to circular shadow -

Image
i have image in trying apply hough circle transforms circular objects in view. i having difficulty finding circle fits outer shadow of cyclinder. can done segment shadow , fit circle it? code: img = cv2.medianblur(im,7) cimg = cv2.cvtcolor(img,cv2.color_gray2bgr) plt.imshow(cimg) plt.show() circles = cv2.houghcircles(img,cv2.hough_gradient,1,20, param1=50,param2=150,minradius=100,maxradius=0) circles = np.uint16(np.around(circles)) in circles[0,:]: # draw outer circle cv2.circle(cimg,(i[0],i[1]),i[2],(255,0,0),10) # draw center of circle cv2.circle(cimg,(i[0],i[1]),2,(0,0,255),20) radius = i[2] print 'radius', radius, 'px' plt.imshow(cimg) plt.show() i'm going write out code , not go through because there's lot of functions , hate assume know or don't know , spend long time doing write-up. if have any questions feel free ask , i'll add them in post. you asked fit circle c

C# and Visual Studio Application Can't Dragging -

Image
my application custom game launcher, looks like: i can't dragging , when click icon in taskbar notting happens. when click icon in taskbar, not coming windowsstate.minimize

reactjs - xhr options failed without statuscode -

Image
i'm using react-axios in order handle http-requests. sporadically requests fail without status-code, error-message: (failed) net::err_invalid_http_response the error thrown @ xhr.js:175 is: 021: var request = new xmlhttprequest(); ... 175: request.send(requestdata); the onerror function in xhr.js implemented this: // handle low level network errors request.onerror = function handleerror() { // real errors hidden browser // onerror should fire if it's network error reject(createerror('network error', config)); // clean request request = null; }; the file located in node_modules folder: axios/lib/adapters/xhr.js. modify onerror function , add error parameter: request.onerror = function handleerror(err) {...} the err doesn't tell why error occurs, error far can see: unfortunately can't see server-logging or debug rest-server. there way find out goes wrong requests?

html - SWF file not opening in chrome and firefox -

i have package file includes collection of swf files , html files. , when run html file shows swf file running in ie, however, not running in chrome , firefox. please find package here https://1drv.ms/u/s!ajjr1bsrusfcvjyloaqtlwe4co0l

java - How to search TreeItem in SWT Tree? -

Image
hi have made 1 program has produce correct output when single check box selected when multiple check box selected not produce correct output.plz me. condition multiple checkbox: when multiple checkbox (checked == true)then child compare other parent , child same level,if name found other node output should match name list. code single checkbox has working good. public class treeclass { public static void main(final string[] args) { final display display = new display(); final shell shell = new shell(display); final tree tree = new tree(shell, swt.border | swt.check | swt.v_scroll); final string[] root_items = { "parent1", "parent2", "parent3", "parent4", "test2", "test3" }; final string[] middle_items = { "test1", "test2", "test3" }; final string[] child_items = { "test", "test2", "test3" }; (int = 0; < root_item

node.js - Rendering data in handlebars using express framework -

hello working in express framework, using handlebars render data mysql table. while trying render data using below code,instead of rendering value displaying [object object]. posted code below. index.js: var query = connection.query('select * requestor_auth question_id = ? , answer = ? , app_key = ? limit 1', [data.qid, data.ansvalue, data.appid], function(err,rows) { if(err) { console.log("error selecting : %s ",err ); res.redirect('/'); } else { res.render('requestform',{page_title:"edit customers - node.js",data:rows}); } requestform.hbs: <div class="addressto"> <h4>to,</h4> <br> <span style="font-size:18px;margin-left:10px;">the collector of</span> <input type="text" value="{{data}}" class="line" class=

Javafx tableview adding image -

@fxml private javafx.scene.control.tableview<user> usertableview; @fxml private tablecolumn<user, image> isactivecolumn; @fxml private tablecolumn<user, string> usernamecolumn; @fxml private tablecolumn<user, string> taskcolumn; @fxml private tablecolumn<user, string> firstnamecolumn; @fxml private tablecolumn<user, string> lastnamecolumn; @fxml private tablecolumn<user, string> editdeletecolumn; public static observablelist<user> data; public void initialize() throws sqlexception { try { data = fxcollections.observablearraylist(); addusers(); } catch (sqlexception e) { e.printstacktrace(); } } public void clickadduser() throws exception{ fxmlloader fxmlloader = new fxmlloader(getclass().getresource("/fxml/adduser.fxml")); parent root = fxmlloader.load(); stage stage = new stage(); stage.setscene(new scene(root)); stage.show(); } //tablewiev'e kullanici eklenme

Form field and tags PHP -

i don't thing called try descripe. so have form couple fields , textarea. want user add "tags" textarea , tags replaced variables db/array in code. example if user writes textarea "hello how {name} today?" when form saved, {name} replaced string array. how or method called google , learn more it? you're looking parser. can use regular expressions and/or string replacements that. typically there parsing methods both encoding , decoding. implement class that. functionalities used in forums or cms. simplest example smiley codes. once understand workflow of that, use tag-functions. such {listgroup|25} produce list of 25 users of group.

jquery - Issue displaying javascript on website -

i've been given javascript colleague (who uncontactable) , want know how display number javascript creating on web page. i've loaded javascript using <script language=javascript src="https://www.mywebsite.com/java/counter.js"></script> however don't know html use give me result. var currstr = 0; var targetstr = 0; var animtimer = null; $(document).ready(function() { currstr = calculatecups(); $('.tea-count > .figure').html(currstr.tostring().replace(/(\d)(?=(\d\d\d)+(?!\d))/g, "$1,")); setinterval(anim, 1000); }); function anim() { targetstr = calculatecups(); animtimer = setinterval(function() { if (currstr < targetstr) { currstr += 155; $('.tea-count > .figure').html(currstr.tostring().replace(/(\d)(?=(\d\d\d)+(?!\d))/g, "$1,")); } if (currstr >= targetstr) { clearinterval(animtimer); } }, 25)

maven - How externalise dependencies using spring-boot:run -

i have requirement of externalize dependencies filesystem. so, achieve requirement using loader.path on propertieslauncher features. works perfect running follow: java -dloader.path=/users/myuser/external/lib/ -jar my-ms-0.0.1-snapshot-exec.jar however when try use feature spring boot maven plugin, doesn't work. try in many ways, without success mvn spring-boot:run -drun.jvmarguments="-dloader.path=/users/myuser/external/lib/" any ideas.

sql server - make rows to become columns in txt with powershell -

Image
i have input txt file different data this: ------------------------------------------------------------------------ current local time: fri jul 01 04:54:27 2016 current gmt time: thu jun 30 20:54:27 2016 machine id: 6090 machine name: wl6090 display s/n: 0253g020tg terrain version: 5.3.843.843 caestasklist dll version: 5.3.843.843 application type: terrain / caes ultra operating system: 1.04 total ram used active files: 339.72 kb ---------------------------------------------------------------------------------------------------------- disk space free disk space: 6758 mb total disk space: 7076 mb ---------------------------------------------------------------------------------------------------------- current local time: 07-01-16, 04:54:27 current service hours: 314.41 a

mysql - Getting the results Null not included -

i wanted list of persons has null values on person_discharge_date need consider create_date(get latest) name of person not show twice. for question, how query show person_discharge_date null values based on latest create_date? i have trouble showing values have null on person_discharge_date , vise versa. my intake table intaketable intake_id| person_id |person_discharge_date |create_date ---------|------------|------------------------|----------------------- 2263 | 2289 |2010-06-28 00:00:00.000 |2012-04-17 13:41:54.503 2264 | 2289 |2010-08-28 00:00:00.000 |2012-04-17 13:41:54.547 4465 | 4489 |2011-02-12 00:00:00.000 |2012-04-17 13:41:54.563 1267 | 1218 |2009-12-11 00:00:00.000 |2012-04-17 13:41:54.707 7373 | 2348 |2010-06-03 00:00:00.000 |2012-04-17 13:41:55.297 4463 | 4429 |2011-09-20 00:00:00.000 |2012-04-17 13:41:57.133 6164 | 6129 |2011-05-18 00:00:00.000 |201

java - How to use Ctrl+Z to stop asking for input? -

i writing program takes integers user , stores them in array, calculates arrays average. the array can hold @ maximum 100 integers. if user wants less 100, hit ctrl + z (or command + d ) stop prompting numbers. here main method: public static void main(string[] args) { scanner input = new scanner (system.in); int [] array = new int[100]; system.out.printf("enter stream of numbers: "); readintoarray(input, array); (int = 0; i<=array.length;i++) { array[i] = input.nextint(); } } and here method reads array. public static int readintoarray(scanner input, int[] nums) { int count = 0; //number of elements entered array while (count <= nums.length && input.hasnextint()) { nums[count]=input.nextint(); count++; } return count; } and here average method. public static void printaboveaverage(int[] nums, int size) { double average; int sum = 0

ajax - jquery on hover does not work on bootstrap tree view -

my problem not expected on li jquery onhover trigger anonymous function . html structure $(document).ready(function () { $.ajax({ url: "fetch.php", method: "post", datatype: "json", success: function (data) { $('#treeview').treeview({data: data}); } }); }); $("#treeview").on('click','.list-group', function () { // var t = $(this).find('li'); alert('here'); console.log($(this)); <div class="container" style="width:900px;"> <div id="treeview"> </div> </div> but onhover of li jquery function not triggering after ajax respond html structure become this <div id="treeview" class="treeview"> <ul class="list-group"> <li class="list-gro

r - Shiny - how to reset/ refresh the form? -

how can refresh or reset ui/ form in shiny? i have button in ui.r: actionbutton("resetinput", "reset inputs") what should in server.r reset form? observeevent(input$resetinput, { // refresh or reset form }) i tried answer , error: warning: error in library: there no package called ‘shinyjs’ does package exist? any better way of doing without installing new packages? you should put library(shinyjs) above server definition, missing in example referring to. so: library(shinyjs) library(shiny) runapp(shinyapp( ui = fluidpage( shinyjs::useshinyjs(), div( id = "form", textinput("text", "text", ""), selectinput("select", "select", 1:5), actionbutton("refresh", "refresh") ) ), server = function(input, output, session) { observeevent(input$refresh, { shinyjs::reset("form") }) } )) i

javascript - framework 7 swipebox not able to display append images in cordova android app -

Image
<img src="img/banner2.png" alt="image" class="col-100"> 1.above code display image in row. works fine when used static link append html using jquery. <a href="img/banner2.png" rel="gallery-1" class="swipebox col-33" title="my caption"></a> 2.when click on image, (image slider start) image enlarge , able swap left , right see other images. static code slider works fine append code image not enlarge , slider not working times. html code below <div class="gallery row" > <div id="gallery1" class="gallery row no-gutter "> <a href="http://192.168.0.104/upload/gallery/3.jpg-22-2017-07-24-15-04:36:15pm.jpg" rel="gallery-1" class="swipebox col-33" title="my caption"> <img src="http://192.168.0.104/catking/upload/gallery/3.jpg-22-2017-07-24-15-04:36:15pm.jpg"

Need help getting links set in wordpress admin dashboard -

Image
i trying links set in dashboard, under appearance >> customize >> menus >> top menu cannot seem find single way on internet. want fetch ones set in menu i have tried found on internet <?php var_dump($globals['menu']) ?> to <?php wp_get_nav_menu_items('primary'); ?> i looked @ on 60 webpages , cannot find how it. can tell me how them? want let user define links in top menu can dynamically change links @ time

c# - Setting properties of an instance the same way as object initializer -

what i'd having object initializer , instance of object has been created. this: myclass myobj = myclass.newobj(); //... myobj { prop1 = val1, prop2 = val2, ... prop50 = val50 }; this better writing: myobj.prop1 = val1; myobj.prop2 = val2; //... myobj.prop50 = val50; because you'd list of remaining properties (and properties!) haven't been given value (just object initializer). there syntax construct allows currently? (c# 6.0) i think looking with operator in vb. answer no. there no such thing in c#. although can code workarounds if need , if agree use dynamic objects. check example below: public class program { public static void main(string[] args) { //your code goes here console.writeline("first:"); myclass c = new myclass(); c.set(new {property1="1", property2="2", property4="4"}); console.writeline(c); console.writeline("second:"); c.

c# - Read each node in IEnumerable<XElement> using XMlReader -

i have ienumerable<xelement> thetestcasenodes has following kind of xelements <testcase> <main> <test_step type ="action"> <name>goto</name> <description>xxxxxxxxx</description> </test_step> <test_step type ="check"> <name>click</name> <description>xxxxxxxxx</description> </test_step> </main> </testcase> <testcase> <main> <test_step type ="action"> <name>goto</name> <description>xxxxxxxxx</description> </test_step> <test_step type ="check"> <name>type</name> <description>xxxxxxxxx</description> </test_step> </main> </testcase> basically testcase , want execute th

android volley failed to load images -

Image
i want timeline of app facebook followed tutorial . the timeline works fine volley failed load profile pic , post image . public class feedlistadapter extends baseadapter { private activity activity; private layoutinflater inflater; private list<feeditem> feeditems; imageloader imageloader = appcontroller.getinstance().getimageloader(); public feedlistadapter(activity activity, list<feeditem> feeditems) { this.activity = activity; this.feeditems = feeditems; } @override public int getcount() { return feeditems.size(); } @override public object getitem(int location) { return feeditems.get(location); } @override public long getitemid(int position) { return position; } @override public view getview(int position, view convertview, viewgroup parent) { if (inflater == null) inflater = (layoutinflater) activity .getsystemservice(context.layout_inflater_service); if (convertview == null) convertview = infla

javascript - cash denomination calculator -

i've created cash denomination calculator in jquery, , it's working fine once add entry suppose if try change entries it's not calculating values expected. just fill values , you'll total of all, if try change value of input box inside div '.mul_by' class[i.e. small input box before '=' sign] it's not calculating total properly. and here's jsfiddle same. $('.mul_by').each(function (i) { var _this = $(this), //set default input value 0 inside .mul-by div setzero = _this.find('.form-control').val(0), //set default input value 0 inside .mul-val div setdenominationval = _this.siblings('.mul_val').find('.form-control').val(0), //set default input value 0 inside .total div settotalval = $('.total').val(0); setzero.on('change', function () { //watch , store input val. inside .mul_by var getupdatedval = _this.

ruby on rails - ArgumentError: Missing host to link to! Please provide the :host parameter, set default_url_options[:host], or set :only_path to true -

i have built module in solidus , ruby on rails , try create tests. i trying create integration tests , have error: e error: prescriptionphotostest#test_/prescription_photos_post_endpoint_throws_an_error_when_wrong_params: argumenterror: missing host link to! please provide :host parameter, set default_url_options[:host], or set :only_path true test/integration/prescription_photos_test.rb:6:in `block in ' i read this , this , doesn't make difference. my code returning error on line: @user = factorygirl.create(:user) here code files. prescription_photos_rest.rb require 'test_helper' class prescriptionphotostest < actiondispatch::integrationtest setup spree::auth::config[:confirmable] = false @user = factorygirl.create(:user) end def authenticated_header token = knock::authtoken.new(payload: { sub: @user.id }).token { 'authorization': "bearer #{token}" } end test '/prescription_p

excel - I need to sum up the number of times a range of strings appear -

Image
so have data imported multiple databases. 1 column range of strings imported , these strings change. in column on spreadsheet imported to, need sum of how many times each string has appeared in imported list. i have macro producing unique string column sums can go next that. i thinking whether can compare imported list unique list , +1 in specific cells each time each unique name appears , cycle through unique list names? eg: imported list unique list sum abc abc 2 cbc cbc 1 aop aop 1 aoz aoz 1 abc xyz 1 xyz is possible , if how? with data in column a , consider: sub demo() dim range, b range, c range dim n long, long set = range("

snmp - MIB monitoring for HP Servers -

we have bunch of dell servers being monitored (particulary raid) using snmp. monitor raid array use oids: virtual disk state : 1.3.6.1.4.1.674.10893.1.20.140.1.1.4 array disk state : 1.3.6.1.4.1.674.10893.1.20.130.4.1.4 with 2 oid can alarm tell if virtual disk having issues or physical disks. this oids works dell servers. now we've got proliant dl380 g7 , need same monitoring device. i've found online mibs apparently works ( https://h20566.www2.hpe.com/hpsc/swd/public/detail?switemid=mtx_ad470f02a64f416eb686f2525e ) there many oids. do guys know if raid array can monitored using snmp on proliant?. thanks much. regards. francisco.

How can I use two database connections in node.js? (mysql) -

i want make requests 2 databases using express , mysql modules , listen on port 8000. you create multiple db connections using mysql node package like: var mysql = require('mysql'); var connection = mysql.createconnection({...}); var otherconnection = mysql.createconnection({...}); see node-mysql documentation createconnection creates new, separate database connection object on each call.

php - Setting of POSTFIX or SENDMAIL from MAMP and MAC OS SIERRA -

i looking me configure postfix or sendmail mamp , mac os sierra in order test php mail() locally. struggling since few days ! still unable make working. i try change in php.ini used mamp follows. then modified file main.cf in /etc/postfix . i specify beginner in coding ;-) thanks understanding

VBA Loop not working properly -

i trying create loop pull data 1 tab tab in excel using vba. of novice @ moment vba bear me. i have data on 2 different rows, in 3 different columns. first row has summary #, second row has processing area (which duplicated numerous times), , fourth row has units(which duplicated numerous without sum of units). i need loop show summary, processing area(once), , units on same row summed together. summary on a1 equal 21445 processing area on b2, b3, b4, b5 equal "bb" units on c2, c3, c4, c5 equal 234, 567, 765, 432 every time try loop can never pull processing area , units on same row summary way need happen.

Can't create an appropriate css selector -

there 2 type of links in webpage. 1 type of link contains class , itemprop both in , other contains class in it. in below links, first 1 both class , itemprop , second 1 class. however, if want selector not select links "itemprop" in it, how selector like? <a href="/los-angeles-ca/mip/crispy-crust-hollywood-location-443529?lid=1000226108758" itemprop="name" class="business-name"></a> <a href="/los-angeles-ca/mip/casa-bianca-pizza-pie-13519?lid=1000203432051" data-analytics="{&quot;target&quot;:&quot;name&quot;,&quot;feature_click&quot;:&quot;&quot;}" rel="" class="business-name" data-impressed="1"></a> i've tried below 1 selects all: a.business-name when tried this, selects links both item: a[itemprop="name"].business-name when tried class in it, doesn't work: a[not(itemprop="name")].business-nam

inno setup - InnoSetup executing code before installation -

i'm attempting installing websites on iss trowh innosetup, first , need check if iss installed on machine; i've found code here on stack overflow, but, need check before all, before inno setup ask user he/she want install web site; so, need check @ first, before wizard page that, showing user string "chechinkg iss in machine" or this, , pass path iss located parameters "default" path in inno setup steps ask user install thanks all

php - Codeingiter : Image upload through web services -

i trying upload 1 image through web services . following code public function upload() { $config['upload_path'] = './uploads/'; $config['allowed_types'] = 'gif|jpg|png|mp4|jpeg'; $config['max_size'] = 100; $config['max_width'] = 1024; $config['max_height'] = 768; $this->load->library('upload', $config); $this->upload->initialize($config); $this->data['data']= $_files; echo json_encode($this->data); die; if ( ! $this->upload->do_upload('userfile')) { $error = array('error' => $this->upload->display_errors()); $this->data['data']= $error ; echo json_encode($this->data['data']); die; } else { $data = ar

java - How to configure -D arguments in Eclipse -

i trying run maven test , testng execution. need pass config values pom.xml , when execute command using -d flag, working. how can add these values in eclipse ? my command line argument -dusername=username , in pom.xml getting <systempropertyvariables> <username>${user_name}</username> </systempropertyvariables> now without specifying run configurations, when try execute testng , maven test showing error states reference undefined variable username . tried adding envirnment variables in eclipse, not working. if go run configuration in eclipse, there tab called arguments can specify program arguments or vm arguments

windows - How to re-run a stopped named Ubuntu in docker? -

i've create ubuntu container in docker (on windows 10) following: > docker run --name omuntu -it ubuntu after that, installed packages in named container such python. then, exited container exit command. now, question how can start named container again, how run commands inside bash , access previous installed packages? i should have mentioned docker start omuntu run service , following on docker ps : container id image command created status ports names 932a2859c1ca ubuntu "/bin/bash" 36 minutes ago 3 seconds omuntu but cannot run command such i've ran first time, instance , command: root@932a2859c1ca:/# python -v you should using 2 default false options --attach, -a , --interactive, -i such below: > docker start -ai omuntu after that, get: root@932a2859c1ca:/# now, can run command inside ubun

PHP - Merge 2 multidimensional array based on value -

currently, have 2 multidimensional array , i'm looking combine them 1 giant array value's name in array 1 matches value's name in array 2. array's followed... array1 ( [0] => array ( [id] => 1 [name] => test1 [desc] => test_desc [quantity] => 3 ) [1] => array ( [id] => 2 [name] => test2 [desc] => test_desc [quantity] => 33 ) ) array2 ( [0] => array ( [holder] => 'john' [name] => test1 [desc] => test_desc [location] => atl ) [1] => array ( [holder] => 'jackie' [name] => test3 [desc] => test_desc [location] => sf ) ) i'm looking merge arrays 'name' column in array1 matches in array2 , combine columns in a