Posts

react native - Fix children container width truble -

Image
my children views may different width, not bigger parent view. how can fix it? this screenshot of how looks now: you can give parent view width device window width this: var {height, width} = dimensions.get('window'); implement height , width required in parent view: <view style={{height:height, width:width}}></view> after constructing parent view, can give child view width , height own interest : style={{height:40, width:250}} also should have knowledge on react-native flex construct others layout can view here

amazon web services - issue while running uiautomator 2.0 tests on AWS device farm -

i new automated testing, , started using uiautomator 2.0 android studio, have 3 apk files, app-debug, app-debug-androidtest-unaligned , app-debug-unaligned. in aws device farm first uploading app-debug, choose instrumentation type, uploading app-debug-andriodtest-unaligned. and when tried run 2 tests (setup suite , tear down suite) running. please me identify issue.

javascript - onChange event---> only alert working?!! other functions not working -

<div class="col-md-2"><select id="ddluser" onchange="loadcheckboxesforuser()" class="form-control" style="width:100%;" > function loadcheckboxesforuser() { alert("hi"); $("#checkbox1").attr("checked", "checked"); } only alert working, not make checkbox checked, otherwise when use function on $(document).ready , works fine you can use .prop method check checkbox $("#checkbox1").prop("checked", "checked");

node.js - neo4j.ClientError: [Neo.ClientError.Security.Unauthorized] -

i'm new neo4j tried insert data neo4j database via node4js error has occurred resolve problem. var express=require("express"); var app=express(); var neo4j=require('neo4j'); var neo4jdb = new neo4j.graphdatabase('http://localhost:7474/browser'); var crypto=require('crypto'); var bodyparser = require('body-parser'); app.use(bodyparser.urlencoded({ extended: true })) var appsecret=process.env.app_secret; app.get('/',function (req,res){ res.send("hello world"); }) app.get('/index',function(req,res){ res.sendfile('test.html',{'root': __dirname }); }) app.post('/insert',function (req,res){ var email = req.body['email']; var password = req.body['password']; var query = [ 'create (user:user {newuser})', 'return user' ].join('\n'); var params = { newuser: { ...

AngularJS two way binding variables to array items -

to view code follow link i've created directive handles array of items (it 2 because it's "from" , "to" date pair). i want make array items accessible separate values later use refer array items vm.data = ['data a', 'data b']; vm.separatedata = vm.data[0]; vm.otherdata = vm.data[1]; when implement 2 way bind directive, vm.data[0] , vm.data[1] references updated vm.separatedata , vm.otherdata aren't. is there way of making work or should restructure rest of app (where needed) accomodate array items? in fiddle link (same above) try changing text input values , you'll see mean. vm.data[0] string , primitive datatype in javascript immutable. bind immutable string 'data a' vm.separatedata, not reference data[0]. if want copy reference array vm.separatedata try wrap strings in other javascript objects, e.g. vm.data = [{"value":"data a"}, {"value":"data b...

Tail stdout from multiple Docker containers -

i have script starts 10 containers in background mode (fig -d option). want aggregate stdout or log in /var/log of them. how can this? the containers started using different docker-compose files can not docker-compose target1 target2 target3 docker logs accepts 1 container parameter. i considering creating volume /var/log on containers, mapping them directory outside of docker, making sure logs not have colliding name , using bash tail -f * . appreciate more elegant solution this bash script want: docker-logs #!/bin/bash while [ $# -ne 0 ] (docker logs -f -t --tail=10 $1|sed -e "s/^/$1: /")& shift done wait usage: $ docker-logs containerid1 containerid2 ... containeridn the output of script has each line tracked logs prepended container id. the script works in --follow mode , must interrupted ctrl-c . note options of docker logs hardcoded in script. if need able control options of docker logs command line need parse command lin...

PHP shell_exec command not working in Windows -

i have following code doesn't seem work, works when open command prompt , run command: <!doctype html> <html> <head> </head> <body> <form action="ping.php" method="post"> <label for="pc_number">provide target pc names (separate ":"): </label> <input type="text" name="pc_number" id="pc_number"> <input type="submit"> </form> <?php if(empty($_post["pc_number"])==false) { $number = explode(":", $_post["pc_number"]); foreach($number $pc) { $restart = shell_exec("shutdown /r /m {$pc} /t 0"); echo "restarting {$pc}... <br>\n"; echo $restart; } } ?> </body> how come works in command prompt not when execute via php? trying restart windows pc remotely.