Posts

interpolation - How to interpolate scattered data on a predefined 3D surface in Matlab? -

i need interpolate scattered data on model represented 3d surface in matlab. tried using "scatteredinterpolant", results quite bad. function allows specify query points not 'connectivitylist' because internally performs own delaunay triangulation specified point set. however, know not points 'connectivitylist', can create matlab 'triangulation representation' using "triangulation". so question following. there way give predefined 'triangulation' "scatteredinterpolant"? if not possible, there other maltab function or class able perform data interpolation on triangulated 3d surface instead of performing own triangulation query points?

android - Couldn't connect to Google API client -

i can't fetch last known location. have enabled geocoding api , google places api android in google console. added api key manifest file: <meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" /> <meta-data android:name="com.google.android.geo.api_key" android:value="@string/google_api_key" /> but keep getting message in console: " couldn't connect google api client: connectionresult{statuscode=api_unavailable, resolution=null} " update i use google sample protected synchronized void buildgoogleapiclient() { mgoogleapiclient = new googleapiclient.builder(this) .addconnectioncallbacks(this) .addonconnectionfailedlistener(this) .addapi(locationservices.api) .build(); } @override public void onconnected(bundle connectionhint) { location mlastlocation = locationservices.fusedl...

java - NDK application Signature Check -

i have security key in application. want store securly. store in native shared library (maybe generated code). after want returned method check signature of original apk. no 1 can use file except trusted applications. know, ndk library decompiled, harder make reverse engineering of native code java .class files. question: is there way calk signature of origin apk native code (c/c++)? how can make sure library called trusted application? i try answer first question here: signature of application stored in dex(dalvik executable) file of apk. dex files have following structure: header data section (contains strings, code instructions, fields, etc) arrays of method identifiers, class identifiers, etc so, beginning of header of dex file: dex_file_magic constant - ubyte[8] adler-32 checksum of application(except dex_file_magic , checksum itself) - uint sha-1 signature of application(except of dex_file_magic, checksum , hash itself) - ubyte[20] so, c...

c++ - The perfect callback function -

goal : obtain callback function take type of parameters callback function's parameters .h template <typename f, typename a> void delayedcallback(f&& callbackfunction, a&& args = null); / .cpp void delayedcallback(f&& callbackfunction, a&& args) { //timer function received function pointer "callback" function timer((std::bind(std::forward<f>(callbackfunction), std::forward<a>(args)))()) } / delayedcallback(&hudexit); void hudexit() {} / error : delayedcallback(fname,float,f &&,a &&)' : not deduce template argument 'a' what doing wrong? i'm new of these concept in c++, more of c# programmer edit : it's not error, i'm pretty sure it's not 1 making. your error message doesn't match signature of delayedcallback template <typename f, typename a> void delayedcallback(f&& callbackfunction, a&& args = null) delayedcallb...

neo4j - Find the nodes with the most mutual connecting nodes? -

i'm working data set contains customers, purchases , businesses purchased from, , i'm trying determine businesses share highest number of mutual customers. ideally output table lists connected businesses , number of mutual customers. i.e.: | business_1 - business_2 | 4 | | business_1 - business_5 | 3 | | business_3 - business_7 | 2 | | business_4 - business_9 | 2 | i don't have @ point, query i'm working looks this: match (c:customer)<-[:trans_cust]-(t:transaction)-[:trans_business]->(b:business) return c, t, b thanks in advance i guess should trick, maybe provide sample dataset on http://console.neo4j.org help. match (b:business) match (b)<-[:trans_business]-(t:transaction)-[:trans_cust]->(c:customer) match (c)<-[:trans_cust]-(:transaction)-[:trans_business]->(other:business) b <> other b, other, collect(distinct(customer)) customers return b, other, size(customers) sharedcustomers order sharedcustomers desc

javascript - Get North,South,East,West street names from Geocode in Google Map -

i have implemented property search through google maps , each property marked pin in google map. in need, user can able know street names of single property (geocode) north, south, east, west, northeast, northwest, southwest , southeast directions.i need list out each direction street names. for example searching below property has return property : 18,maha street,coimbatore,tamilnadu (27.268255,-95.55666) north : main street south : anna street east : river road west : school street northeast : kmskj street northwest : ring road southwest : hasbdagh road southeast : outer ring road is possible achieve in google map. please me out. if geocode direction can apply reverse geocode right? i have achieved server side geocode process, below methods involved: public geocoderlocation locate(string query) { geocoderlocation n = new geocoderlocation(); geocoderlocation s = new geocoderlocation(); geocoderlocation e = new geocoderlocation...

node.js - Can I install an NPM module from GitHub from a certain branch or tag? -

when have now: "dependencies": { "mymodule": "owner/repo" } or "dependencies": { "mymodule": "git+ssh://git@github.com/owner/repo.git" } npm installs module github master branch. is there way tell npm install tag or head of branch other master ? https://docs.npmjs.com/files/package.json#git-urls-as-dependencies "dependencies": { "mymodule": "git+ssh://git@github.com/owner/repo.git#commit-ish" } the commit-ish can tag, sha, or branch can supplied argument git checkout. default master.