Posts

Featured post

elasticsearch - what is the equivalent data type for geo_point in hibernate search? -

i using elastic search hibernate search.i want make 1 property data type geo_point ,so can draw tile map using kibana.is there equivalent data type in hibernate search geo_point in elastic search? you can use spatial feature of hibernate search: import org.hibernate.search.annotations.*; @entity @indexed @spatial public class hotel { @latitude double latitude @longitude double longitude // ... } you end geo_point field named location in document. for more information: https://docs.jboss.org/hibernate/stable/search/reference/en-us/html_single/#spatial wiki

ROS vtk and kubuntu problems -

i trying compile ros-package downloaded here . follow instructions , have installed ros lunar, since running kubuntu 17.04. now, when run rosmake dvo_core i following in cmake: -- imported target "vtkrenderingpythontkwidgets" references file "/usr/lib/x86_64-linux-gnu/libvtkrenderingpythontkwidgets.so" file not exist. possible reasons include: * file deleted, renamed, or moved location. * install or uninstall procedure did not complete successfully. * installation package faulty , contained "/usr/lib/cmake/vtk-6.3/vtktargets.cmake" not files references. -- imported target "vtk" references file "/usr/bin/vtk" file not exist. possible reasons include: * file deleted, renamed, or moved location. * install or uninstall procedure did not complete successfully. * installation package faulty , contained "/usr/lib/cmake/vtk-6.3/vtktargets.cmake" not files references. and thereafter: /usr/bin/ld: /usr/lib/l

Jenkins: find build number for git commit -

each commit git repo triggers build of jenkins pipeline. i want retrieve buildnumber of old build commit hash. how can that? i know information exists because can find in ui. some background why want this: when tags commit want create release (by tagging docker image). each build push image containing build number. want find out build number corresponds commit can find image want release. if understand question correctly, first need create git hook trigger new build. part covered in answer how react new tags in git hooks? ', though if using github, bitbucket or gitlab, there may other ways of going it. then when build initiated, there build number provided variable ' build_number ' ,in jenkins. if want include git tag name, can use in script, there seems fews ways: git parameter plugin git tag message plugin typically these plugins create environment variable can consumed scripts. not providing more concrete examples, since not aware of exact

firebase - How to wait value in Ionic 2 -

i'm trying wait value may change after execute "this.bookmarlist.take(1).subscribe(..." my problem when run application, execute second if statement "if(found==false)" before execute subscribe. this code may found thing wrong or need add additions solve problem. let loader = this.loadingctrl.create({ content: "", }); let found=false; loader.present().then(()=>{ this.bookmarklist.take(1).subscribe(data=>{ data.foreach(b=>{ if(b.nid==this.appservice.id && b.url==url){ let alert = this.alertctrl.create({ title: 'already bookmarked', subtitle: 'this note image bookmarked', buttons: ['ok'] }); alert.present(); found=true; } }) }) }).then(()=>{ if(found==false){ this.afd.list('/bookmark/').push({ uemail: th

typescript - Typings for sub-folders inside a root index.d.ts -

we created typings material-ui@next , want ship them library, did last beta. here link index.d.ts . but typings not usable in current form. in development used locally , worked fine, when shipping files library typescript seems use different discovery strategy. all typings reference subfolder (e.g. declare 'material-ui/button/button' ) not found typescript. when importing components error show up: [ts] not find declaration file module 'material-ui/button/button'. '<project path>/node_modules/material-ui/button/button.js' implicitly has 'any' type. try `npm install @types/material-ui/button/button` if exists or add new declaration (.d.ts) file containing `declare module 'material-ui/button/button';` does typescript not accept declaring other imports when used inside npm_modules folder? because said, using them locally or moving them @types/material-ui make them work. also, typescript seems find index.d.ts , because impor

python - Minimize function with Scipy minimize -

trying obtain d value (integer) std_diff objective function minimal, using scipy minimize. my code: def std_diff(d): return std(diff(df['bn'].values,d)); scipy.optimize import minimize b=(3,) res = minimize(std_diff,(1,), method='slsqp', bounds = b) **df['bn'].values** out[72]: array([ 2, 2, 2, 2, 3, 2, 7, 5, 7, 11, 8, 2, 11, 7, 15, 8, 7, 12, 21, 19, 32, 35, 40, 35, 21, 19, 25, 20, 40, 80, 99], dtype=int64) error is"indexerror: many indices array " in case not use bounds : res = minimize(std_diff,(1,), method='slsqp'), error: > in _minimize_slsqp(func, x0, args, jac, bounds, constraints, maxiter, > ftol, iprint, disp, eps, callback, **unknown_options) > 368 fx = float(np.asarray(func(x))) > 369 except: > --> 370 raise valueerror("objective function must return scalar") > 371 # compute constraints > 3

highcharts - Displaying highest value in high chart (on pie chart) -

how display highest value , show untested values in pie chart? please check url clarification all helps appreciated. you can use chart.renderer() function add custom text chart. take @ example prepared you. api reference: http://api.highcharts.com/highcharts/renderer.text http://api.highcharts.com/highcharts/legend example: http://jsfiddle.net/0k86pb18/ wiki