Posts

twitter - Zipkin is not nesting parent trace to its child -

we using finagle stack , taught of adding zipkin tracing our micro-services. i able see our tracing happening parent finishes before child. i have opened issue here: https://github.com/openzipkin/docker-zipkin/issues/100 any appreciated. i recording wrong annotation i.e client instead of server. just simple change did trick. trace.traceservice("function1","test") sample working zipkin example: https://gist.github.com/akhilj876/3e38757c28d43924f296dd2d147c0bd9#file-zipkintracing_example-l34

algorithm - Can an ant walk towards or away from a point with a polygon obstacle? -

Image
given polygon s , point p lies outside s, imagine ant can follow straight line towards or away p. for shapes (fig. 1), there choice of p such ant can move unobstructed in @ least 1 of 2 possibilities: towards (t) p, or away (a) it. condition corresponds ray cast p intersecting perimeter of s 0 or 2 times. however, same shape (fig. 2) there may points lead blocked (b) regions, ant bump polygon whichever direction tries move in. yet other shapes (fig. 3) there may no choice of p leads no blocked regions. having blocked regions corresponds rays cast p intersect perimeter of s more 2 times. is there algorithm determines whether p exists satisfies condition given polygon s? if such points exist, can determine region contains them? find concave corners of polygon obstacle. each corner, extend 2 edges infinitely. sector between these 2 rays, , (as nico schertler pointed out) point-reflected region of sector, define point must obstacle not hide corner form point's rays...

What are the roles of each of these when creating IONIC application? -

i kind of confused , know (not ambiguous or opinionated) roles of these programming languages when creating ionic mobile application 1: ionic 2: angularjs 3: c# 4: asp.net mvc how role contribute on creating ionic application. if have built app else did use , why? ionic framework hybrid mobile development, framework7 , has nothing back-end , server languages c# or architectural pattern mvc framework.ionic build on html5, css , javascript , angularjs, of them used design , front end purposes. but u can use c# , mvc backend, example can create webapi communicate front end.

jsf - PrimeFaces ajax don't work -

why, when use ajax = true action button primefaces not work? whenever happens me, has same situation? <p:commandbutton action="#{usuariobean.insert()}" value="gravar" icon="/resources/img/accept.ico"> <p:confirm header="confirmação" message="tem certeza??" icon="ui-icon-alert"/> </p:commandbutton> <p:confirmdialog global="true" showeffect="fade" hideeffect="fade"> <p:commandbutton value="sim" type="button" styleclass="ui-confirmdialog-yes" icon="ui-icon-check"/> <p:commandbutton value="não" type="button" styleclass="ui-confirmdialog-no" icon="ui-icon-close"/> </p:confirmdialog> in case, need 2 things , none work. you should review "action" attribute in commandbutton ( action="#{usuariobean.insert}...

celery - What methods are available in the Flower HTTP API? -

i want use flower http api monitor celery, can't seem find documentation of available rest methods, other few examples on readme. can point me in right direction, or reading source code option? all http api methods documented , available @ http://flower.readthedocs.org/en/latest/api.html

java - How to add two int array values together? -

i trying add 2 int arrays sum. first array contains 0000000000000000123456789 , second array contains 0001111111111111111111111. sum should 1111111111111234567900. i'm trying without biginteger or bigdecimal. for(int i=0; i<number1.length;i++){ add= number1[i]+number2[i]; if(plus>=10){ sum[i-1]+=add/10; sum[i] = add%10; }else{ sum[i]=add; } } the output produced @ moment 00011111111111112345678100. how can fix code 8 becomes 9? this kinda works. can think of couple of cases break, if arrays {9,9,9} , {9,9,9}, result {9,9,8} instead of {1,9,9,8}. it's minor fix being left activity reader. public static void main(string []args){ int[] number1 = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,3,4,5,6,7,8,9}; int[] number2 = {0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}; int carry = 0, sum = 0; int[] result = new int[number1.length]; (int = number1.length - 1; >= 0 ; i--) { ...

powershell v2.0 - I would like to read content of txt file ends it with ( ; ) semi-colon character -

i have txt file has 50 long character in line1 but, want read first 10 11 or less character , end on semi-colon. basically, want characters before semi-colon. first.txt 1234567891;45416564653afsd second.txt 124562;455466asdfa appreciate anyone's help.. the following returns portion of each line input file file before first ; . if there no ; entire line returned. get-content file | foreach-object { ($psitem -split ';')[0] } to give sense of elasticity of powershell, can rewrite following more terse form, utilizing built-in aliases (though it's better verbose , avoid aliases in scripts ): gc file | % { ($_ -split ';')[0] }