Posts

bash - Issues with Screen - Running Minecraft in a while loop through a screen session -

so earlier today, changed startup scripts minecraft server. problem is, after 3 hours, screen open vanished , refuses appear when using -ls . server still running , can see below, screen process should still active? serverstart.sh called during init . , contained while loop. serverstart.sh : #/bin/bash #check see if minecraft screen running linecount=`screen -r mc | grep "there no screen resumed matching mc." | wc -l` #start minecraft server in detached screen named "c" if not running #launch command line interface minecraft if arealdy running. if [ $linecount -eq 1 ] echo linecount: $linecount. starting in deteched screen named minecraft. use screen -r minecraft view. screen -dms mc sh serverloop.sh else echo linecount: $linecount. minecraft running. use screen -r minecraft view. running now. screen -r mc fi serverloop.sh : #/bin/bash while true java -server -xms4096m -xmx16384m -xx:permsize=512m -d64 -xx:+useparnewgc -xx:+cmsi...

markdown - Jekyll raw HTML in post -

i have jekyll website, posts written in markdown using kramdown parser. i add raw html within post. when try add html, parses markdown (changing < 's &lt; example). i have tried: adding html in own paragraph. including .html file. adding markdown="0" html tag (also tried 1 ). indenting (and wrapping in triple back-tick) of above. using raw tags example of have: some **markdown** `here` <iframe src="asd"></iframe> more *markdown*. the iframe should output html, not parsed text. i using github pages, jekyll extensions not optional. the html being ignored because tag attr's did not have quotes. example width=500 should have been width="500" nothing else required. html in own paragraphs no indentation , parsed.

android - error show cursor out of bound -

i'm show particular data listview bt doenot show emulator goes blank.... query as.. sqlitedatabase sd = db.getreadabledatabase(); string select = "select * pending_dues_table _pending_dues_id ="+i; cr = sd.rawquery(select, null); if (cr != null) { //cr.movetofirst(); int ii; ii=cr.getcolumnindex("pending_dues_notice"); while (cr.movetolast()){ namelist.add(cr.getstring(ii)); //studentno.add(cursor.getstring(1)); } } arraylist<string>combimelist=new arraylist<string>(); for(int j = 0; j<namelist.size();j++){ combimelist.add(namelist.get(j)); } adapter = new arrayadapter<string>(studentdues.this,r.layout.student_due, combimelist); and locat show error as.. 05-25 03:33:56.225: e/androidruntime(5134...

java - Spring Cloud - Config Client slows down metric /health -

i using configserver within spring boot + spring cloud project. used monitor endpoint /health, since configclient asks configserver within every request, invocation of metric "/health" quite slow. this due fact, every request configserver, 1 calls bitbucket –> entire request chain quite long/slow. is there way disable check configserver being available? monitor 1 separately. best fri not currently. how checking health? can submit issue have property disables health check. you work around extending configserverhealthindicator , overriding dohealthcheck . the like: @bean public configserverhealthindicator configserverhealthindicator( configservicepropertysourcelocator locator) { return new myemptyconfigserverhealthindicator(locator); }

formatting - Python's Multiplication Function -

in python found multiplication solution useful software writing. problem when using software, user asked question (i.e 8x2) prints command-type line (i.e 14). not user friendly , display in simpler form, common writing form (8x2). post pictures integrate question. on right result screen, on left code itself. if have more questions please ask. you can add dictionary operator descriptions: op_symbols = { add: '+', mul: '*', sub: '-', } and instead of str(op) , use op_symbols[op]

Passing map type argument in function in Erlang complains error -

here's code snippet. %% test.erl -export([count_characters/1]). count_characters(str) -> count_characters(str, #{}). count_characters([h|t], #{h := n} = x) -> count_characters(t, x#{h := n+1}); count_characters([h|t], x) -> count_characters(t, x#{h => 1}); count_characters([], x) -> x. %% ershell 1> c(test). test.erl:19: illegal use of variable 'h' in map test.erl:20: illegal use of variable 'h' in map test.erl:20: variable 'n' unbound test.erl:22: illegal use of variable 'h' in map error i don't know why complains such error, since following code worked out fine: %% test2.erl birthday(#{age := n} = person) -> person#{age := n+1}. %% ershell 1> c(test2). 2> test2:birthday(#{age => 333}). #{age => 334} thanks in advance. the reason simple: map hasn't been implemented yet. take at: http://learnyousomeerlang.com/maps also, might think of alternative implementations, using st...

javascript - AngularJS — Passing object/object property to be $watched into $scope.$watch -

deep watching on large objects performance killer—so i'd able pass dynamic object/property watchexpression parameter of $scope.$watch function, whenever invoke action changes particular object or property. i have bunch of different objects , don't want set watches of them. for example: var watchingfunction = function (objecttobewatched) { $scope.$watch(function (objecttobewatched) {return objecttobewatched;}, function(newvalue, oldvalue) { if (newvalue !== oldvalue) {...}; }, true); $scope.object = true; $scope.changemyobject = watchingfunction(object); html <input type="checkbox" ng-model="object" ng-change="changemyobject()"> i believe wouldn't work because invoking function watchingfunction() runs $scope.$watch() once? if define $scope.$watch on $scope (instead of wrapped inside watchingfunction() continually watching $scope.$watch's watchexpression ? if case, there creative things can return v...