Posts

java - How to run "Eclipse Che" behind NGINX reverse proxy? -

i have installed on server eclipse che , runs on machine when use locally localhost:8080 i make available internet, behind nginx front reverse proxy. here idea: example.com/che/ ---> nginx reverse proxy ---> server:8080/ i tried many different nginx configuration... without success. information, eclipse che embeds tomcat instance rewrite rules: rewriterule ^/api/ext/(.*)$ /ide/ext/$1 [l] rewriterule ^/api/(.*)$ /ide/api/$1 [l] rewriterule ^/$ /dashboard [r] there 3 webapps deployed on tomcat server: ide dashboard swagger if eclipse che behind nginx, above rewrite rules useless , can done directly nginx (that's did) i have 1 single block in nginx configuration (if possible) here tried far, it's not working , eclipse che not load (my guess websockets not proxified, , miss something) basically, tried "proxypass" different webapps, may not best option. location /dashboard { proxy_pass http://localhost:8080/dashboard; proxy_redirect off; ...

java - How to write ArrayList<Object> to a csv file -

i have arraylist<metadata> , want know if there java api working csv files has write method accepts arraylist<> parameter similar linqtocsv in .net. know opencsv available csvwriter class doesn't accept collection. metadata class public class metadata{ private string page; private string document; private string loan; private string type; } arraylist<metadata> record = new arraylist<metadata>(); once populate record, want write each row csv file. please suggest. surely there'll heap of apis you, why not such simple case? save dependency, thing project of size. create tocsvrow() method in metadata joins strings separated comma. public string tocsvrow() { return stream.of(page, document, loan, type) .map(value -> value.replaceall("\"", "\"\"")) .map(value -> stream.of("\"", ",").anymatch(value::contains) ? "\"...

php - Update entity file field -

i have issues update of entity file field on it. don't know can be, because did lot of time, today won't work. entity: <?php namespace appbundle\entity; use doctrine\orm\mapping orm; use symfony\component\validator\constraints assert; /** * consigli * * @orm\table() * @orm\haslifecyclecallbacks * @orm\entity(repositoryclass="appbundle\entity\repository\consiglirepository") */ class consigli { /** * @var integer * * @orm\column(name="id", type="integer") * @orm\id * @orm\generatedvalue(strategy="auto") */ private $id; /** * @var string * * @orm\column(name="titolo", type="string", length=255) */ private $titolo; /** * @var string * * @orm\column(name="testo", type="text") */ private $testo; /** * @var string $image * @assert\file( maxsize = "60000000", mim...

ruby on rails - 'Where-in' query in postgresql for two different queries showing same result -

i have active record assosciation relation follows. @tasks = #<activerecord::associationrelation [#<task id: 3130, title: "commit @ least 1 small win today", content: "when check-in on app lets me acknowledge m...",created_at: "2016-01-13 01:36:15", updated_at: "2016-01-13 04:47:57", state: "active", #<task id: 3131, title: "purposefully walk 3 minutes ", content: "more ordinary day, choose 5 minutes ...", created_at: "2016-01-13 04:52:32", updated_at: "2016-01-13 04:56:22", state: "active", #<task id: 3132, title: "1km walk or run sunday", content: "i pick direction, start 10 minute warm up,...", created_at: "2016-01-13 04:56:05", updated_at: "2016-01-13 04:56:05", state: "active",#<task id: 3249, title: "1km walk or run wednesday", content: "i pick direction, start 10 minute warm up,...", create...

deployment - Create a script to git pull/checkout from specific branch -

i'm trying write script deploy our webapp git. have 2 servers ("production" , "development"). i've made new develop branch, , after first clone on server situation git branch -a this: * master remotes/origin/head -> origin/master remotes/origin/develop remotes/origin/master i'm trying write simple script pull master on production server, , develop on development server. after clone did git pull origin develop git checkout develop and situation this: * develop master remotes/origin/head -> origin/master remotes/origin/develop remotes/origin/master the files matching develop branch. far good. i've tried same master: git pull origin master git checkout master and got message: your branch ahead of 'origin/master' 5 commits. (use "git push" publish local commits) and files seems same of develop. i guess knkowledge git , local/remote branch not enough, i'm missing something. ...

php - Laravel4.2&mongoDB. Class 'MongoClient' not found when try to call command from command line -

as topic title. work cron service execute artisan command every minute. have problem when try execute command via terminal debuging. got error class 'mongoclient' not found . so try simple query in laravel route $m = new mongoclient('mongodb://localhost:27017'); $db = $m->rootan; print_r($db) ; $result = $db->campaigns->findone(); print_r($result) ; i got result no error perfectly. so question why error when execute command terminal. problem permission? sorry english. ps. use ubuntu14.04 laravel4.2 , mongodb3

qtquick2 - QML: Center variable text and image -

Image
i need horizonally center variable-length text (red box) , image (yellow box) in big box (green box). text shall wrap if not fit box. existing code: item { id: bigbox x: 255 y: 0 width: 800 height: 100 image { id: imagebox source: "image.png" width: 52 height: 46 anchors.left: parent.left anchors.leftmargin: 12 anchors.verticalcenter: parent.verticalcenter horizontalalignment: image.alignleft verticalalignment: image.alignvcenter fillmode: image.pad } text { id: textbox anchors.left: symbol.right anchors.leftmargin: 12 anchors.right: parent.right anchors.verticalcenter: parent.verticalcenter text: qstr("heading text") font.pixelsize: 36 font.bold: true horizontalalignment: text.aligncenter } } update: actual running code , real screenshot showing problem: import q...