Posts

sparql - where to get data about all european cities, villages from? -

i looking data european cities, villages , towns. interested in name, postal codes, telephone area codes, latitude, longitude, population , country belongs to. 1. can extract comprehensive amount of data from? 2. how query data linkedgeodata to begin with, tried extract data linkedgeodata ( http://linkedgeodata.org/sparql ). however, can't reasonable results. when following query executed, population occassionally appears, other fields left blank. select * { ?place <http://linkedgeodata.org/ontology/place> . optional { ?place <http://linkedgeodata.org/property/opengeodb:name> ?name . } optional { ?place <http://linkedgeodata.org/ontology/opengeodb:lat> ?lat . } optional { ?place <http://linkedgeodata.org/ontology/opengeodb:lon> ?lon . } optional { ?place <http://linkedgeodata.org/property/opengeodb:postal_codes> ?postal . } optional { ?place <http://linkedgeodata.org/ontology/opengeodb:telephone_area_code> ?tel ...

iphone - iOS is it possible to convert CLLocation into some sort of XYZ metric coordinate system? -

i'm building augmented reality game, , working cllocation rather cumbersome. is there way locally approximate cllocation xyz coordinate, expressed in meters origin starting @ arbitrary point (for example initial position when game started)? lets i'm working 1 mile radius , not care curvature of earth. is possible approximate or somehow simplify location based calculations local position tracking? alternatively, there coordinate system can used cllocation incorporates roll, pitch, yaw of cmattitude compass orientation? clarification: far understand, problem latitude , longitude units vary in size, depending on position on globe. should've specified x,y,z should in standard units, meters or feet. thank you! the haversine formula may useful. i found article on @ http://www.jaimerios.com/?p=39 code examples.

Performance penalty of using functor to provide a function or an operator as a C++ template parameter? -

i have family of complex functions performing similar tasks except 1 operator right in middle of function. simplified version of code that: #include <assert.h> static void memopxor(char * buffer1, char * buffer2, char * res, unsigned n){ (unsigned x = 0 ; x < n ; x++){ res[x] = buffer1[x] ^ buffer2[x]; } }; static void memopplus(char * buffer1, char * buffer2, char * res, unsigned n){ (unsigned x = 0 ; x < n ; x++){ res[x] = buffer1[x] + buffer2[x]; } }; static void memopmul(char * buffer1, char * buffer2, char * res, unsigned n){ (unsigned x = 0 ; x < n ; x++){ res[x] = buffer1[x] * buffer2[x]; } }; int main(int argc, char ** argv){ char b1[5] = {0, 1, 2, 3, 4}; char b2[5] = {0, 1, 2, 3, 4}; char res1[5] = {}; memopxor(b1, b2, res1, 5); assert(res1[0] == 0); assert(res1[1] == 0); assert(res1[2] == 0); assert(res1[3] == 0); assert(res1[4] == 1); char res2[5] = {}; me...

c# - Hosting WCF service and static html files -

we developing application has static html pages + jquery on client side. client gets data rest-ful wcf service hosted in iis. i'm bit confused on how structure in vs/host it.one of pre requisite i'm not allowed put client side html static content asp.net app sake of it. my aim following: - have mechanism client dev , service dev can integrate there work easily, i.e on running single project should seeing there progress of there work. - separate client , service projects allowed, client cannot hosted in asp.net app. - within client code, should able retrieve data relatively service uri's. i.e should not tied down specific port or localhost, if /getmydata wcf serivce, rather http://localhost:51345/getmydata , should return data service. for service side, i'm using route table instead of svc file. right now, thinking bundle service , client static content single host project , query data relatively.my question - there better approach this? should taking care o...

printing - Print Sample for MonoMac -

does know of monomac sample shows how implement print (to printer)? haven't been able find one. i don't know of one, conceptual docs apple relevant, , sample snippets should straightforward port c#: https://developer.apple.com/library/mac/#documentation/cocoa/conceptual/printing/printing.html

cpu - Some general information about assembly -

i accidentally ended here: http://altdevblogaday.com/2011/11/09/a-low-level-curriculum-for-c-and-c/ , , turned out 1 of informative collection of stuff have read far. knew assembly kind of low level language can executed directly processor, but, read each processor has it's own assembly. questions: is true? will able run basic assembly on both netbook , pc? is difference between, say, avrs (who use risc architecture) , x86 processors use cisc, instruction set use? how run assembly code , in kind of files store it? yes, extend. although 2 processors same family might have different assembly languages, in reality 1 language may extension of other. processors different manufacturers (e.g. intel , amd) share great deal of instruction set. moreover, in spite of vast number of assembly languages out there, share relatively small number of fundamental concepts. once learn program in 1 assembly language, learning second 1 order of magnitude easier undertaking. of co...

symfony - Symfony2 load conditional configuration -

i started symfony2, i'm still noob. i need load config file (yml) based on either request uri, or specific route. e.g /{dynamicroute} should load dynamicroute.yml and /{anotherdynamicroute} should load anotherdynamicroute.yml (hope makes sense) update : basically want to this: we have 1 backend system our clients can log in. there can set facebook applications. i'm using fosfacebookbundle users can connect facebook. fosfacebookbundle requires facebook settings set in config.yml, because have multiple facebook applications running of 1 system, can't put facebook settings in config.yml. so thinking load client specific configuration based on route. example create route this: // src\acme\mybundle\controller\democontroller.php /** * @route("/client/{client_id}") */ public function indexaction($client_id) { // load client specific data so when user loads specific client's page, want load yml configuration facebook details speci...