Posts

Showing posts from May, 2014

linux - Parallel Processing in While Loop -

i have .sh reading in lines .txt used parameters shell script.every 2 lines process in parallel. currently: current code read in lines in file (2 @ time) first .sh call, lines second .sh call, last .sh call problem: need first 2 lines in first .sh, second .sh, last .sh..then loop , process next 2 lines hheeelllppp!!! :) now: cat xxxxx.txt | while read line; export step=${line//\"/} export step=executemodel_${step//,/_} export pov=$line $dir"/hpm_ws_client.sh" processcalcscriptoptions "$appname" "$pov" "$layers" "$stages" "" "$stages" "$stages" false > "$dir""/"$step"_processid.log" $dir_shell_model"/check_process_status.sh" "$dir" "$step" > "$dir""/""$step""_monitor.log" & $dir"/hpm_ws_client.sh" processcalcscriptoptions "$appname" "$pov" "$laye

ios8 - CloudKit Push Notification, App running on background -

Image
when ios8.2-app running in background, not receive push notification, while if running on foreground, receives push notifications fine. any idea going on ? running on cloudkit development mode, subscription add,edit,and remove, , using following didreceiveremotenotification : -(void)application:(uiapplication *)application didreceiveremotenotification:(nsdictionary *)userinfo fetchcompletionhandler:(void (^)(uibackgroundfetchresult))completionhandler { nslog(@"push received."); nsdictionary * apsdict = [userinfo objectforkey:@"aps"]; nsstring * alerttext = [apsdict objectforkey:@"alert"]; //todo: record information notification , create appropriate message string. if(application.applicationstate == uiapplicationstateactive) { uialertview * alert = [[uialertview alloc] initwithtitle:@"notification" message:alerttext delegate:nil cancelbuttontitle:@"ok" otherbuttontitles: nil]; [alert s

tree - How do I connect two broken lines along the same direction in matlab -

Image
i'm trying select vessel branch based on user selection. i've got center lines extracted , removed branch points big gap. i'm thinking if user click on vessel starting point, trace way until meeting branch: if it's 3-line crossing both lines belonging branch. if it's 4-lines crossing, vertical-ish line belongs same branch , other horizontal-ish lines belongs branch, not selected. how can done? result imagined.. i think got decent results using imerode , thinning values obtained trail , error, may not generic solution. notice top of "tree" disappears. i've included last image. %if image isn't binary turn logical array bwim = im2bw(im); %13 came trial , error, can play shape , use %besides disk thick = imerode(bwim,strel('disk',13)); %the infinite means untill no changes occur. use ~thick becasue thin %works on 1 pixels, not 0's. invert output of bwmorph our %image normal (0 foregroun 1 background) thinned = ~bwmor

java - Merge Sort count number of swaps and compares -

i have existing code need add swap , compare counter for. far believe have counts correctly cannot output no display loop of each swap. public void mergesort(int[] a, int howmany) { if (a.length >= 2) { // split array 2 halves int[] left = arrays.copyofrange(a, 0, a.length/2); int[] right = arrays.copyofrange(a, a.length/2, a.length); // sort 2 halves mergesort(left,howmany); mergesort(right, howmany); // merge sorted halves sorted whole merge(a, left, right); } } // merges left/right elements sorted result. // precondition: left/right sorted public static void merge(int[] result, int[] left, int[] right) { int i1 = 0; // index left array int i2 = 0; // index right array int compcount = 0; int swapcount = 0; (int = 0; < result.length; i++) { compcount++; if (i2 >= right.length || (i1 < left.length

amazon s3 - Location to put credential file AWS android sdk accessing AWS s3 -

i have android app calls s3 upload , download pics bucket, have working cognitocachingcredentialsprovider now, want start using access key credential, in creating s3client object. know , hard code aws_access_key_id , aws_secret_key, put them environment variable or in file in home directory. since going use aws_access_key_id , aws_secret_key in android app, environment variable wont available. question put these keys can use s3client in android app. file reside if app go app store. you should never have access key , secret key in android application, hard coded, or in separate file. true if going on app store. large security risk, can decompile app , credentials. what wrong cognito credentials using?

cakephp - Shopify API getting order by name or order_number -

im using plugin cakephp make calls obtain orders. can call orders fields, wondering how have make call orders name or order_number? here source call shopify . authenticated , everything: public function call($method, $path, $params=array()) { if (!$this->isauthorized()) return; $password = $this->is_private_app ? $this->secret : md5($this->secret.$this->shopifyauth->token); $baseurl = "https://{$this->api_key}:$password@{$this->shopifyauth->shop_domain}/"; $url = $baseurl.ltrim($path, '/'); $query = in_array($method, array('get','delete')) ? $params : array(); $payload = in_array($method, array('post','put')) ? stripslashes(json_encode($params)) : array(); $request_headers = in_array($method, array('post','put')) ? array("content-type: application/json; charset=utf-8", 'expect:') : array(); $reques

javascript - Using a function as an Object's key -

i have function accepts function parameter i'd use key object... function foo(func) { return { func: true }; } this, of course, returns object string 'func' key (not want). is right solution create string func , create object? is there way create hash function? bearing in mind object keys strings should able use syntax: result = {}; result[func] = true; return result;

c# - Json write can not be serialized -

process: create player class. create player list<player>() . add players list. write json serial file. when click on writejson button receive error: "type `'editplayers.player'` cannot serialized. consider marking `datacontractattribute` attribute, , marking of members want serialized `datamemberattribute` attribute. if type collection, consider marking `collectiondatacontractattribute`.see microsoft .net framework documentation other supported types." question: how mark list<player>() collectiondatacontractattribute . class player { public int memberid { get; set; } public int gender { get; set; } public string lname { get; set; } public string fname { get; set; } public int tee { get; set; } public int team { get; set; } public int flight { get; set; } public int ohc { get; set; } public decimal hcix { get; set; } } private async void writejason_click(object sender, routedeventargs e) {

java - Writting SQL command to traverse Vertex on Edges conditions -

Image
imagine following schema let's each edge of type "manage" attribute "permissions" set "rw" or "r-" or "--" , each vertex of type account. here, account 3 not able write in account 5, since account 1 able write in account 3, want account 1 able write in account 5. what want java function able check if connected user (account 1) able write in account given parameter. have check if first edge on way go to-be-modified-account has write permission. (hope that's clear) i think work have recursive function, i'd find way sql command. i thinking use "$depth" keyword like select (traverse out('manage') #1 while $depth <= 1) @class='account' i need had "where permissions='rw'" somewhere, not find how edge instance this. and once condition have been implemented first outgoing edge, need continue traversing edges, without condition anymore. may not possible do, please l

java - Adding ActionListeners to array of buttons -

i'm trying write first swing app, simple chess engine in java. i've made grid of jbuttons represent squares. looks ok, i've come across problem when trying add actionlisteners each square. want squares co-ordinates , print console when clicked. tried(i guess don't understand how actionlisteners work): // chessboardsquares[][] 8x8 array of jbuttons (int = 0; < 8; i++) { (int j = 0; j < 8; j++) { chessboardsquares[i][j].addactionlistener(new actionlistener(){ @override public void actionperformed(actionevent e) { system.out.println("x: "+i+"y: "+j); } }); } } you need use either fields or final local variables inside anonymous inner class. for (int = 0; < 8; i++) { (int j = 0; j < 8; j++) { final int finali = i; final int finalj = j; chessboardsquares[i][j].addactionlistener(new

How can I import modules to Python in Processing? -

i testing processing python implementation, can't seem find way import modules it. for example trying import ib module , get: importerror: no module named ib even though when go python in terminal , import it, works fine. also when try import other modules processing following from threading import rlock it works fine. any idea why processing might reading of modules , not? any tip appreciated. it sounds processing uses own python interpreter. should able use sys.executable find path of current python interpreter, within processing repl, do: import sys print(sys.executable) if doesn't output location of system python (on windows: c:\pythonxy xy python version) know that's problem. python interpreter can't find modules weren't installed its folder! a possible solution in case install global modules separate directory , point pythonpath env var @ directory. careful this, though, if have both python3 , python2 on system.

javascript - What does $() in jquery mean -

i know $() selector , can't figure out selects, since there's nothing inside parenthesis. practice or bad? example see used...making call data service. $().dataservice({ url: geturl('application', data), params: params, success: getresponse, error: errorresponse }) from jquery 1.4 release notes : in jquery 1.3, jquery() returned jquery set containing document. in jquery 1.4, returns empty jquery set. can useful creating empty set , adding elements dynamically. so answer question, selects nothing, returning empty set. acceptable use, , not considered bad practice.

Create PDF from different ranges in multiple Excel sheets with VBA -

i need export several excel sheets 1 pdf file. using following: sub createpdf() sheets("reportpage1").select range("print_area").select sheets("reportpage2").select range("print_area").select sheets("reportpage3").select range("print_area").select thisworkbook.sheets(array("reportpage1", "reportpage2", "reportpage3")).select selection.exportasfixedformat _ type:=xltypepdf, _ filename:="c:\temp\temp.pdf", _ quality:=xlqualitystandard, _ includedocproperties:=true, _ ignoreprintareas:=false, _ openafterpublish:=true sheets("reportpage1").select range("a1").select end sub the problem print areas different. pdf generated using range address of print area reportpage1 pages. i tried in excel itself, outside of vba, , when have selected, examp

javascript - selenium-webdriver npm: how to switch focus to new window from target="_blank" -

in building bank of selenium tests have bit of brick wall javascript selenium-webdriver npm. this particular test requires selenium check target="_blank" link works querying content of page loaded. cannot seem selenium shift focus new window. from reading docs , s.o. seem should work: driver.switchto().defaultcontent(); but nothing. simple test: //1 load url driver.get( testconfig.url + '/britain/england/cornwall/hotelx' ).then(function(){ //2 find link , click driver.findelement(by.css('.details-web')).click().then(function(){ //3 timeout of 10 seconds allow other window open settimeout(function(){ //switch focus new window (ie current active window) driver.switchto().defaultcontent().then(function(){ //5 wait till new el visible driver.wait( function(){ return driver.iselementpresent(by.css("#infinite

url - Download link not working on server -

i trying add download link file on page, file can either microsoft word document, pdf file, or zip file or other kind of document, have path file stored in database, issue works on localhost on server get: notfoundhttpexception this how link generated: <a href="{{ url::to($row->file_url) }}" class="widget-control-right"><span class="fa fa-download"></span></a> this how file url looks like: 'uploads/data/library/g7tkxmdk7bab12cn//guide.pdf' in problem, try use helper function called link_to_asset . {{ link_to_asset($row->file_url, "download", array("class" => "widget-control-right")) }} but better approach here : <a href="{{ route('file.download', $row->id) }}" class="widget-control-right"><span class="fa fa-download"></span></a> in route.php route::get("file/download/{id}", array(&q

java - Cannot set value of generic Property in Map -

i trying set value of property in map following error: the method setvalue(capture#7-of ?) in type writablevalue<capture#7-of ?> not applicable arguments (capture#8-of ?) here code: map<string, property<?>> map1 = new hashmap<string, property<?>>(); map<string, property<?>> map2 = new hashmap<string, property<?>>(); map1.put("key1", new simpleintegerproperty(5)); map1.put("key2", new simplestringproperty("hi")); //i need multiple property types in map, of implement property map2.put("key1", new simpleintegerproperty(5)); map2.put("key2", new simplestringproperty("hi")); //i can assume value of properties same key of same type map2.get("key1").setvalue(map1.get("key1").getvalue()); //error map2.get("key2").setvalue(map1.get("key2").getvalue()); //error i cannot this, must copied value only: map2.put("key1", m

iphone - Calling close() in iOS on a bluetooth connection causes data to be lost -

we have application sending data on bluetooth closes connection. the root problem calling close() before data has been sent on bluetooth causes ios not send data. this looks ios issue. each write done @ lowest nsoutputstream level, (we've added code catch event generated after each write says more space available) appears ios somehow buffering things internally , out of our control. when final close() called, depending on timing, ios might discard pending data though calls write had returned success , associate event of more space available received. i've been looking @ apple's documentation easessions , associated streams, haven't been able find way determine if there still pending data in flight internally within ios. so far, rough hack of adding call sleep() arbitrary number of seconds before close() eliminate problem, delay needed dependent on how data sent , how underlying bluetooth transfer takes, there's not easy way know before-hand how many

mysql - Replace field with field from other table in SELECT query -

let have 2 tables follows: database.users user_id | username ------------------- 1 | some_name 2 | another_name ... database.comments user_id | comment ------------------ 1 | some_comment 2 | another_comment ... how run select gets comments based on user_id , return result user_id replaced username database.users ? here query: select u.username, c.comment users u join comments c on u.user_id = c.user_id order u.username i added "order by" clause, comments 1 user together. alternatively, can add "where" clause select particular user.

How to clear div append results formed during Jquery Autocomplete -

i using jquery auto complete our application . the issue facing results captured during auto complete aren't being cleared . (the data being added div cleardiv) when tried clear manually on click of button ,, auto complete functionality isn't working . <input type='text' title='tags' id='tags' /> <div class="autosearch_result_wrap" id="tags_result"></div> <input type="button" id="cleardiv" value="clear" name="clear"><br> $(document).ready(function() { var atags = ["ask","always", "all", "alright", "one", "foo", "blackberry", "tweet","force9", "westerners", "sport"]; $( "#tags" ).autocomplete({ source: atags , minlength: 2, appendto: "#tags_result", }); $(document).on('click', &

c++ - Boost Spirit Parser with a vector of three strings compiling into a struct, adapt not working -

i´m student , need write parser in c++ boost-library. therefore write grammer in qi because need parse struct. far, good. i give example-code. think easier writing whole program down. description: first take txt-file , read it, parser goes on it, says "parsing ok!" , parse struct. our output struct in console. that works fine, code examples. here can see grammar in boost spirit qi: subject %= lexeme[lit("fach: ") >> +(char_("a-za-z")) >> lit("\n")]; //works! dozent %= lexeme[lit("dozent: ") >> +(char_("a-za-z")) >> lit("\n")]; date %= lexeme[lit("datum: ") >> digit >> digit >> lit("-") >> digit >> digit >> lit("-") >> digit >> digit >> digit >> digit >> lit("\n")]; count %= lexeme[lit("anzahl: ") >> +digit >> lit("\n&quo

Javascript - How can I pass a jQuery object (table) to a web worker? -

i have html table different columns , rows. table can edited inline user. when user edits table, calculate sums on rows of table. the function calculates sums in main script , took lot of time making browser unresponsive. solve performance issue, have created web worker in javascript calculate sums on table. the problem web worker cannot access dom. i'm looking way pass jquery object table web worker. if try pass jquery object receive error: uncaught datacloneerror: failed execute 'postmessage' on 'worker': object not cloned. how can pass table web worker? thank you [edit adding further information ] the sum take long time because table has lot of rows , calculate different sums (total, subtotal,etc). values sum stored in table (so worker need access table perform calculation). my idea pass dom object worker calculate sums. after calculation, worker return sums main thread in order update values in dom. in short cannot pass dom ele

c# - MVC Enitity Framework DropDownListFor<> -

i have searched around site solution , whilst trying numerous methods cant seem working required, follow best mvc best practise creating droplists. i have 3 models (i have cut them down purposes of this) model 1 student public int id {get;set;} public string name {get;set} public site siteid {get;set;} model 2 site public int id {get;set;} public string sitename {get;set} model 3 vm public int id {get;set} public student students {get;set;} public datetime date { { return datetime.now; } } public bool criteria {get;set;} in vm view using editorfor html helpers populate vm , student models. site model pre populated @ database seed. i looking best way include dropdownlist of sites on vm view, map student model. how correctly set models achieve this? many in advance, rob in short, want dropdownlistfor extension method , put list<site> view model. here fiddle demonstrates case . fiddle has more details. nuts , bolts here: viewmodel - add l

pandas - splitting at underscore in python and storing the first value -

i have pandas data frame df column construct_name construct_name aaaa_t1_2 cccc_t4_10 bbbb_g3_3 and on. want first split names @ underscore , store first element (aaaa,cccc, etc.) column name. expected output construct_name name aaaa_t1_2 aaaa cccc_t4_10 bbbb and on. i tried following df['construct_name'].map(lambda row:row.split("_")) , gives me list like [aaaa,t1,2] [cccc,t4,10] and on but when df['construct_name'].map(lambda row:row.split("_"))[0] first element of list error. can suggest fix. thanks just use vectorised str method split , use integer indexing on list first element: in [228]: df['first'] = df['construct_name'].str.split('_').str[0] df out[228]: construct_name first 0 aaaa_t1_2 aaaa 1 cccc_t4_10 cccc 2 bbbb_g3_3 bbbb

java - LibGDX Timer doesn't start after game resumed on android -

i'm creating 2 timers in code. 1 logic timer updates logic every 0.017 seconds: logictimer = new timer(); logictimer.scheduletask(new timer.task() { @override public void run() { updatelogic(); } }, 0f, timeperprocessing); and other 1 generating obstacles every 3 seconds: meteoroidtimer = new timer(); meteoroidtimer.scheduletask(new timer.task() { @override public void run() { generatemeteoroids(); } },1f,3f); when pause game , resume afterwards, logic timer still works obstacle timer doesn't. thought because use random object in method call in timer, tried simple: system.out.println("it showing"); and still doesn't resume. my code pause , resume: @override public void pause(){ meteoroidtimer.stop(); logictimer.stop(); } @override public void resume(){ meteoroidtimer.start(); logictimer.start(); } you dont need use timer.stop ,

jquery - HTML Top Bar fixed and rescalling when scrolling -

i want make topbar not fixed when scrolling, decreasing size in height. when scroll down, know how make fixed, wanna know how improve site's visibility rescaling height. example: http://www.kriesi.at/themedemo/?theme=enfold-overview i tried search solution fixed topbar, not size. you listen scroll event - not best solution regarding performance, quick , easy use solution now. $(window).scroll(function() { if ($(window).scrolltop() > ($(window).height()-80)) { $('.navigation').addclass('nav--closed')// > 100px top - show div } else { $('.navigation').removeclass('nav--closed')// > 100px top - show div // <= 100px top - hide div } }); and css be: .navigation { position: fixed; top: 0; left: 0; height: 8em; width: 100%; z-index: 5; background-color: black; transform: translate3d(0,0,0); transition:height 0.4s ease-in-out; color: white; } .navigation.nav--closed{

webgl - Sharing Resources across WebGLRendering Contexts -

does know present , future of sharing resources across webglrendering contexts ? now make hidden gl handler makes me useful images in "timeout process"(i cant use main context creation little images), create samplers these images in main context. think sharing resources between webgl contexts me out.

mysql - What is wrong with this INSERT MAX+1 query? -

i'm having problem query: insert invoices(invuid, linenumber) values (?, select(select max(linenumber)+1 invoices invuid=?)) it keeps saying: "general error: 1093 can't specify target table 'invoices' update" your syntax invalid, use insert ... select , remove values part this: insert invoices(invuid, linenumber) select ?, max(linenumber)+1 invoices invuid=?

excel - cell value change not getting captured in vba macro -

i want capture when value changes in cell a2 i tried below code not working private sub worksheet_change(byval target range) if not intersect(target, me.range("h5")) nothing macro end sub i have breakpoint inside macro not coming till there tried below, no luck private sub worksheet_change(byval target range) msgbox (target.column) end sub worksheet_change takes single parameter target of type range . check if have changed range interested in can compare target range, in case: if target = range("a2") 'do end if this lets compare range object range object minimal fuss. and put in correct sheet.... :p

Failure: Expected 0 to be >= 1 on ruby on rails -

i'm doing hartle tutorial , see failure every time run rake test see failure: 1) failure: staticpagescontrollertest#test_should_get_help [.../sample_app/test/controllers/static_pages_controller_test.rb:14]: <help | ruby on rails tutorial sample app> expected <ruby on rails tutorial sample app>.. expected 0 >= 1. what mean? , how can solve it? static_pages_controller_test.rb file. require 'test_helper' class staticpagescontrollertest < actioncontroller::testcase test "should home" :home assert_response :success assert_select "title", "ruby on rails tutorial sample app" end test "should help" :help assert_response :success assert_select "title", "help | ruby on rails tutorial sample app" end test "should about" :about assert_response :success assert_select "title", "about | ruby on rails tutorial sample app"

javascript - Displaying PostGIS Data with Leafletjs -

i'm learning gis postgis , wanted try funny downloaded shape files osm, imported in postgres postgis extension , want represent data postgis visually. have pulled data query select st_asgeojson(geom) "dar-es-salaam_tanzania.land_coast; i got bunch of geojson , wanted show them user. unfortunately not show it. use yii2 write codes pulls data. here controller code: public function actionindex() { $cmd = yii::$app->db->createcommand('select st_asgeojson(geom) "dar-es-salaam_tanzania.land_coast";'); $gjsons = []; foreach($cmd->queryall() $row) { $gjsons[] = json_decode($row['st_asgeojson']); } return $this->render('index', ['geojson'=>json_encode($gjsons)]); } and in view <?php /* @var $this yii\web\view */ $this->title = 'map application'; $this->registerjs(" var map = l.map('map').setview([6.8000, 39.2833], 13); l.tilelayer('https://{

node.js - Sails.js Waterlock How to override login action (How to write custom login action) -

i use sails.js , waterlock. in 1 place, need able authenticate user (say) phone number instead email. in othe place, shoud have unique pin code authentication field. i thought there possibility override login/register action custom one, did not find example. how done, can please kindly provide me example(tutorial) of custom realization action sails.js/waterlock login action? please describe solutions briefly, unfortunately, i'm not experienced understand clues. in advance. i able override register , login actions in following way: /* -------------------------------- signup ---------------------------------*/ /** * adds new user , logs in first time * signup works out of box in order custom validation , * add fields user had add our own */ signup: function( req, res){ // perform validation data used before store var invalid = {}; if( !userservice.validateusername( req.param('username'), invalid ) || !userservice.

filter, sum and div in rethinkdb query -

how can join these 2 query ... mean ctr amount of time...i have tried different way solve couldn't find way write query in rethinkndb... **r.expr({total_page_position:r.table('test_pagol')('position').sum(), total_page_load: r.table('test_pagol')('page').sum()}).merge({crt: r.row('total_page_load').div(r.row('total_page_position'))** **r.table("test_pagol").filter( (r.row["timestamp"] >= 1429617902988) & (r.row["timestamp"] >= 1429617922119))** you can use map , reduce command that: r.table("test_pagol").filter( r.row("timestamp").ge(1429617902988) .and(r.row("timestamp").le(1429617922119)) ).map({ 'total_page_position': r.row('position'), 'total_page_load': r.row('page') }).reduce(function(left, right) { return { 'total_page_position': left('total_page_position'

Weird multithreading behaviour (Java) -

just messing around multithreading learn more regards synchronized keyword , other aspects wrote simple class , main class call methods of class in different threads. saw expecting few times (values changing 2 instead of 1) came across larger jump can't understand - know how happened? here's code: public class seatcounter { private int count = 0; public int getseatcount() { return count; } public void bookseat() { count++; } public void unbookseat() { count--; } } and public class main { public static void main(string args[]) { final seatcounter c = new seatcounter(); thread t1 = new thread() { public void run() { while(true) { c.bookseat(); system.out.println(c.getseatcount()); } } }; thread t2 = new thread() { public void run() { while(true) {

How to break XSLT for-each loop -

this xml structure want parse value using each in run time <header> 'xml structure start here' <docnumber>743439</docnumber> 'document number' <order> <order>450</order> '1 st order number' <orderdetails> <itemcode>1232954</itemcode> <qty> 'quantity; 72 </qty> </orderdetails> <orderdetails> <itemcode>1232955</itemcode> <qty> 72 </qty> </orderdetails> </order> <order> <order>451</order> 'second order number' <orderdetails> <itemcode>1232954</itemcode> <qty> 72 </qty> </orderdetails> <orderdetails>

oracle - Query very slow after a few execution -

Image
i'm new of oracle , i'm becoming crazy following situation. i'm working on oracle 11g database , many times happening run query sql developer , correctly executed in 5/6 seconds, others time instead same query take 300/400 second executed. there tools debug happening when query employs 300/400 second? update 1 sql developer screenshot problem seems direct path read temp update 2 report update 3 report2 any suggestion? try setting trace. user being whatever user experiencing delay sys: grant alter session user; as user executing trace: alter session set events '10046 trace name context forever, level 8'; alter session set tracefile_identifier = "my_test_session"; produce error/issue, user testing: alter session set events '10046 trace name context off'; as system find out trace files kept: show parameter background_dump_dest; go directory , .trc/.trm files containing my_test_session . example orcl_ora_2977

Accessing data in git bare repo -

i've set remote server want push git commits to. i've set git init --bare based on advice, noticed doesn't have files there (working tree) after content pushed there. aka. if have file called something.txt , add , commit local repo, push remote repo, record commit can't see something.txt on remote filesystem. the problem want manipulate file remotely via hook. aka. once push branch, "update" hook read file in repo , send program. at moment, can print file list remotely via git ls-tree --full-tree -r head i'm not yet sure how view individual files or if should doing way (doesn't seem it's designed way). if create remote repo without --bare , error when trying push due lack of working tree. of course can print file command line tools, want? can create local checkout ( git clone $path-to-bare-repository $somewhere ). if care 1 file, have @ git cat-file , e.g. git cat-file -p $id_from_ls_tree as one-liner: git cat-file -p

objective c - Native resolution on iPhone 6, works on simulator but not on device -

i'm having problems enabling native resolution on iphone 6 on actual device itself, when run in simulator runs @ native 375x667 (verified both launchscreen , nslog of viewcontroller size. 2015-04-29 13:24:24.220 aqrew_ios[7851:1294675] viewcontroller:didlayoutsubviews() - width=375.000000 height=667.000000 however when run same code on actual iphone 6 (ios8.3) running @ scaled iphone 5 resolution. 2015-04-29 13:17:02.614 aqrew_ios[720:179633] viewcontroller:didlayoutsubviews() - width=320.000000 height=568.000000 i've been through so how enable native resoltuion , have following in launchimage assets setup , working, app portrait only, iphone only: launchimage screenshot appicons are: appicon screenshots (i'm not allowed post images on account (work) dont have 10 rep points!) however whilst works on ios simulator not working on real device, appreciate ideas.... thanks if go device settings app, in 'display & brightness'

java - How to decrypt properties used in @ConfigurationProperties beans? -

i'm using spring boot 1.2.3 , i'd understand if it's possible decrypt property value before injected bean annotated @configurationproperties . suppose have following in application.properties file: appprops.encryptedproperty=enc(encryptedvalue) and sample application so: package aaa.bb.ccc.propertyresearch; import org.springframework.boot.springapplication; import org.springframework.boot.autoconfigure.springbootapplication; import org.springframework.boot.context.properties.configurationproperties; import org.springframework.boot.context.properties.enableconfigurationproperties; import javax.annotation.postconstruct; @springbootapplication @enableconfigurationproperties(propertyresearchapplication.applicationproperties.class) public class propertyresearchapplication { public static void main(string[] args) { springapplication.run(propertyresearchapplication.class, args); } @configurationproperties("appprops") public stat

Configure tcServer in Hybris -

how can configure tcserver in hybris ? i have found tcserver setting in /bin/platform/project.properties , properties need configured? tomcat.context.template=${hybris_config_dir}/tomcat/tomcat_context.tpl # directory files created "ant production" created #production.output.path=${hybris_temp_dir}/hybrisserver # choose type of server: tomcat or tcserver bundled.server.type=tcserver # absolute path tomcat #bundled.tomcat.home=${platformhome}/tomcat #version of tomcat server #bundled.tomcat.version=7.0.52 # absolute path tcserver bundled.tcserver.home=${hybris_config_dir}/tcserver # tcserver's tomcat version bundled.tcserver.tomcat.version=7.0.42.a.release # relative path tcserver's tomcat bundled.tcserver.tomcat.home=tomcat-${bundled.tcserver.tomcat.version} # name of server instance #bundled.tcserver.instance=instance1 # name of instance template use: hybris or hybris_insight bundled.tcserver.template=hybris production.output.path=${hybris_temp_d