Posts

java - OSRM functions vs. GoogleMaps functions -

is there url in osrm ( http://project-osrm.org/ ) call in java program , parse json file returned, instance: https://maps.googleapis.com/maps/api/geocode/json?address=rue+de+la+chambre+33+paris i have ! nominatim (from latin, 'by name') tool search osm data name , address , generate synthetic addresses of osm points (reverse geocoding) http://nominatim.openstreetmap.org/search?format=json&q=42+rue+de+la+folie-m%c3%a9ricourt+11e+paris

c - Function address is different in nm output and gdb -

let's focus on rect_isempty() function. the nm command gives me output: (...) 00021af0 t rect_isempty (...) on other hand, when launch gdb , see address of function, get: (gdb) info address rect_isempty symbol "rect_isempty" @ 0x8057c84 in file compiled without debugging. could anyone, please, explain why these addresses not same? gdb address from? nm gives mangled name symbol table's address offset. gdb gives actual virtual process's memory address. when looking address of function (in case gdb), shows address of inside code segment of unit located: current process or shared library. if function located inside object file running, code segment being loaded process's memory each time run os. in other case, if function in shared library , don't explicitly load dlopen , os loads it's code segment no in process memory in place. so, code segment of shared libraries shared between applications using it, it's data segme...

android - How to update the user location after enabling the GPS from an in App prompt -

i developing android app prompts user enable gps if it's not on , have used alertdialog purpose. after enable gps settings , come app pressing button, mapview doesn't reflect current location. although if have gps on before running app, app displays location. want know method use refresh user location after enabling gps purpose. relevant article help. following code gps part: gpstracker.java public class gpstracker extends service implements locationlistener { private final context mcontext; // flag gps status boolean isgpsenabled = false; // flag network status boolean isnetworkenabled = false; // flag gps status boolean cangetlocation = false; location location; // location double latitude; // latitude double longitude; // longitude // minimum distance change updates in meters private static final long min_distance_change_for_updates = 10; // 10 meters // minimum time between updates in milliseconds private static final long min_time_bw_updates = 1000 * 60 * ...

Callback function for push notifications while app is killed (titanium iOS) -

i cant find clear answer in titanium documentation. possible directly respond push notification while app killed ? i know callback called when open app trough push notification. there way respond when app opened manually ? i tried use remote-notification uibackgroundmodes, helps paused apps. my goal show push notification in in-app message center. you should never rely on push notifications deliver payloads, limited that. if user receives 5 push notifications , opens app via app icon, never receive of payloads. if opens app via 1 of notifications receive payload. you use silentpush: http://docs.appcelerator.com/platform/latest/#!/guide/ios_background_services-section-37539664_iosbackgroundservices-silentpush but app should query back-end actual data. that's how whatsapp well, can see when open via notification still fetch message(s) form server.

c# - Can't refresh data on a DataGridView -

i have datagridview on top of tablepanellayout . datagridview 's data bound on database , using code: dgvitems.datasource = gc.cshr_sorepo.tolist(); now, have other methods changes values database table datagridview references to. when change happens, can't refresh values of grid. i have tried dgvitems.refresh(); tablepanellayout.refresh(); , tablepanellayout.refreshedit(); even refreshing form itself. missing something?

c++ - Read file with separator a space and a semicolon -

i wrote parse file numbers, separator space. goal read every number of file , store in corresponding index of matrix a. so, first number read, should go a[0][0], second number a[0][1] , on. #include <iostream> #include <string> #include <fstream> using namespace std; int main() { const int n = 5, m = 5; double a[n*m]; string fname("test_problem.txt"); ifstream file(fname.c_str()); (int r = 0; r < n; ++r) { (int c = 0; c < m; ++c) { file >> *(a + n*c + r); } } (int r = 0; r < n; ++r) { (int c = 0; c < m; ++c) { cout << *(a + n*c + r) << " "; } cout << "\n"; } cout << endl; return 0; } now, trying parse file this: 1 ;2 ;3 ;4 ;5 10 ;20 ;30 ;40 ;50 0.1 ;0.2 ;0.3 ;0.4 ;0.5 11 ;21 ;31 ;41 ;5 1 ;2 ;3 ;4 ;534 but print (thus read) garbage. should do? edit here attempt in c, fails: ...

javascript - How to prevent this ad network http requests ? and how are the requests being inserted? -

i have simple webpage javascript sends various requests server. between getting following network requests , website not responsible. my html page <div class="container"> <div class="row"> <div> <div class="row"> <div class="col-md-6 "> <div class="form-group"> <label for="inputdate" class="col-sm-1 control-label">date</label> <div class="col-sm-6"> <input type="date" class="form-control" id="inputdate" name="inputdate" placeholder="date" required> </div> <button type="submit" class="btn btn-primary get" onclick="getdata()">get</button> </div> </div> </div> </div> </div> <div class="...