Posts

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

app store - Does Apple reject the app if Bundle Display Name and iTunes app name are not identical? -

does apple reject app if bundle display name , itunes app name not identical? ex : app name abc, itunes doesn't let me use in app store it's taken else. so, i'm going change abc - country name. does make confusion user? , app rejected apple? always maintain app names in itunes connect , displayed on device should similar, not cause confusion. please refer 3.4 apple review guide. apple review guide wiki

java - How to ignore inner/nested classes with JaCoCo? -

i'm trying ignore generated classes, , classes ignored fine. if classes have inner classes, classes still included, despite parent class being excluded. configuration: <plugin> <groupid>org.jacoco</groupid> <artifactid>jacoco-maven-plugin</artifactid> <version>0.7.9</version> <executions> <execution> <goals> <goal>prepare-agent</goal> </goals> </execution> <execution> <id>report</id> <phase>prepare-package</phase> <goals> <goal>report</goal> </goals> <configuration> <excludes> <exclude>**/*db.*</exclude> <exclude>**/*dto.*</exclude> </excludes> </configuration...

API for hotels and room rates -

i'm working on project need colllect list of hotels selected area, , room rates hotels. looked many popular ones ean, hotelscombined, bookings.com have booking requirements (for example, ean requires @ least 1 booking every 5000 requests). i'm not doing bookings in project, need gather data analysis. can point me in right direction? wiki

bash - How to read XML and write to text file using shell script? -

how read xml tags , it's value in shell script? searched , found possible when know tag name. but, want script reads tags in xml(repeated tags), contains values. in xml, tags may change. so, want script can work different xmls. <data> <employees> <employee location = "paris"> <name> andy </name> <id> 101 </id> </employee> <employee location = "germany"> <name> batman </name> <id> 202 </id> </employee> </employees> </data> i want read xml , write text file below: name : alex id: 101 location: paris name : batman id: 202 location: germany try following , let me know if helps you. awk ' /<\/data>/{ a=""; next } /<data>/{ a=1; next } /location/ && a{ gsub(/\"|>/,"",$nf); location=$nf; next } /...

java - How do I locate an element whose partialTagValues are dynamic -

i error saying 'an invalid or illegal selector specified'. note:- in last findelement statement, have given cssselector ("//td[id*='verificationmsg']/p[2]) because id closest unique locator find capture data. , part of doesn't change. eg:- current id value id="m_7959323670053369637verificationmsg" number keeps changing in recurring emails "verificationmsg" part of doesn't. this in reference previous question , suggestions got package amazon; import java.awt.awtexception; import java.awt.robot; import java.awt.event.keyevent; import java.util.iterator; import java.util.set; import java.util.concurrent.timeunit; import org.openqa.selenium.by; import org.openqa.selenium.keys; import org.openqa.selenium.webdriver; import org.openqa.selenium.webelement; import org.openqa.selenium.chrome.chromedriver; import org.openqa.selenium.interactions.actions; public class verifyamazonsigninpage { public static void mai...

ruby on rails - string interpolation in Get URI with httparty issue -

so using splunk rest api generate search id thorugh post , search results through request. i using httpparty, & post , request follows: def sid self.class.post( "/services/search/jobs", headers: {'content-type' => 'application/json'}, basic_auth: @auth ).parsed_response end the generated sid looks this: 1503402217.608 i make necessary request follows: def results(sid) self.class.get( "/services/search/jobs/#{sid}/results/", headers: {'content-type' => 'application/json', 'accept' => 'text/html'}, basic_auth: @auth ) end the above request gives 204 no content. if manually paste sid in code , run it, results back. for eg: "/services/search/jobs/1503402217.608/results/" so question how can interpolate above results back. edit: dyamic request looks in console: <- "get /services/search/jobs/1503402217.608/res...

android - Alternate of ActivityManager.getRunningServices(int) after Oreo -

i shocked this deprecated , return caller's own services on oreo(api 26). there alternative way list of services on oreo? wiki

sbt.ResolveException: unresolved dependency: org.apache.predictionio#pio-build;0.11.0-incubrating -

hi new predictionio( v 0.11.0-incubrationg spark- 2.1.0 elasticsearch- 5.2.1 hbase - 1.2.6)and using template https://github.com/alexice/template-scala-parallel-svd-item-similarity . template compaitable min 0.9.2 version of predictionio , require apache pio conversion . replaced io.prediction org.apache.predictionio , changed version 0.11.0-incubrating in files(build.sbt,template.json,project/assembly.sbt,project/pio-build.sbt) after in template folder ran pio build --verbose , git following error : [info] [engine$] [warn] :::::::::::::::::::::::::::::::::::::::::::::: [info] [engine$] [warn] :: unresolved dependencies :: [info] [engine$] [warn] :::::::::::::::::::::::::::::::::::::::::::::: [info] [engine$] [warn] :: org.apache.predictionio#pio-build;0.10.0-incubrating: not found [info] [engine$] [warn] :::::::::::::::::::::::::::::::::::::::::::::: [info] [engine$] [warn] [info] [engine$] [warn] note: unresolved dependencies have att...

javascript - Form with two submit buttons with different actions -

so have form has 3 buttons <td > <input type="submit" id="stsave" class="button button_save pointer" value=""/> <input type="submit" id="stsavereturn" class="button button_save_return pointer" value=""/> <button id="stcancel" class="button button_cancel pointer simplemodal-close"></button> </td> when click save. saves , modal stays open. great when hit cancel closes. great however can't figure out how go making when click save , return submit form , close modal. tried add onclick() event triggers before submit seems. here form deceleration looks like. <form:form method="post" action="${ctx_path}/admin/statepost" commandname="detailsdto" enctype="multipart/form-data"> you use jquery listen submit event of stsavereturn input. ...

android - Cursor adapter or Custom adapter for chat application -

i developing chat application along file transfer. and using custom adapter taking messages database using db-flow in list. i want know benefit of cursor adapter on custom adapter in chat application. and want show file transfer upload progress, should use notifydatasetchange() or notifyitemchanged() wiki

android - Webpage with gif not working in WebView -

i've been searching quite while cant seem crack problem. have script on webpage, simple html page javascript behind it. gets random gif giphy, , when finishes, gets one, , one... infinitely. i want show gif infinite generator in android application. i'm using webview: webview wb = (webview) findviewbyid(r.id.webgif); wb.getsettings().setjavascriptenabled(true); wb.getsettings().setdomstorageenabled(true); wb.getsettings().setloadwithoverviewmode(true); wb.getsettings().setsupportzoom(true); wb.getsettings().setdefaulttextencodingname("utf-8"); wb.setwebviewclient(new webviewclient(){ @override public boolean shouldoverrideurlloading(webview view, string url) { view.loadurl(url); return true; } @override public void onpagefinished(webview view, final string url) { } }); wb.loadurl("http://vladmarton.com/rangif/index.html"); i tried, google.com ...

java - JPA query works with number but not with Integer variable -

i have written code retrieving list of object postgres db. query gives me correct result if write value of id_utente_pres (for example 68) in criteria. if use integer variable called "id" result set empty. code retreive correct result set: public list<prenotazione> getprenotazioni(integer id) throws remoteexception { session session; session = sessionfactory.opensession(); criteriabuilder builder = session.getcriteriabuilder(); criteriaquery<prenotazione> criteria = builder.createquery(prenotazione.class); root<prenotazione> prenotazionefind = criteria.from(prenotazione.class); criteria.select(prenotazionefind); parameterexpression<integer> p = builder.parameter(integer.class); criteria.where(builder.equal(prenotazionefind.get("id_utente_pren"), 68)); list<prenotazione> prenotazioniutente = session.createquery(criteria).getresultlist(); session.close(); return prenotazioniutente; } ...

raspberry pi3 - Pi - enable dbus for development -

i new developing on linux. write applications talk on dbus learning basic concepts of interacting dbus. i'm working on new-ish raspberry pi 3; can see dbus folders on various locations on filesystem. however, when #include <dbus/bus.h> error: "unresolved include file" leads me believe library files or developer options not enabled dbus? i wanted find out how can enable dbus development? thanks in advance. 24 aug 2017 edit: believe have necessary library files i.e. (but not limited to...) /usr/lib/arm-linux-gnueabihf/libdbus-1.a /usr/include/dbus-1.0/dbus/dbus.h but how point netbeans ide them while developing on remote host (the pi)?? 28 aug 2017 edit: after installing dbus-dev libraries. removed , re-added raspberry pi local host on netbeans ide. now, when i #include <dbus/dbus.h> or #include <dbus.h> i receive error: fatal error: dbus/dbus.h: no such file or directory so, ended having add /usr/include/dbus-1.0;/usr...