Posts

objective c - CLLocationManager Overheating iPhone -

i'm making app augmented reality. have screen image camera, radar view , markers on screen. i'm using cllocationmanager updates on heading , location. need heading updates turned on, because radar rotation depends on it. i'm using location updates position , based on i'm looking markers show. problem when i've got both turned on iphone overheating little on time (10 +- minutes). i've got accuracy set every 100 metres , distance filter 100. should set timer stop , start updating of location prevent overheating (and save battery life too)? there other approach this? advices. this time user "time profiler" instrument. i'm sure using gps responsible of heat have other part of code using cpu or gpu heavily. there's opengl performance tool, @ see if can find parts taxing gpu much. another possibility using avfoundation camera image, , see if can specify less expensive preview parameters video image overlaying.

jquery - How would you achieve this 3d hover effect? -

i'm trying 3d mouseover effect when you're on div. here's it's now http://jsfiddle.net/6tnbu/ i know how make in sort lower-left , top-right corner have cleaner shadow, oblique style. thought maybe load triangle on corners know if there's other way achieve that. thanks if don't mind using pseudo-elements, there's ::before , ::after (although note that, recall, ie doesn't recognise double-colon declaration, you'd have use :before , :after ): #box::before { content: ' '; position: absolute; top: -10px; left: -10px; bottom: 0; height: 100%; background-color: #f90; border-bottom: 10px solid white; border-right: 10px solid black; } #box::after { content: ' '; position: absolute; top: -10px; left: -10px; right: 0; width: 100%; border-bottom: 10px solid black; border-right: 10px solid white; } js fiddle demo .

Proxy Basic Authentication in C#: HTTP 407 error -

i working proxy requires authentication, i.e., in browser if try open page ask credentials. supplied same credentials in program fails http 407 error. here code: httpwebrequest request = (httpwebrequest)webrequest.create(url); iwebproxy proxy = webrequest.getsystemwebproxy(); credentialcache cc = new credentialcache(); networkcredential nc = new networkcredential(); nc.username = "username"; nc.password = "password"; nc.domain = "mydomain"; cc.add("http://20.154.23.100", 8888, "basic", nc); proxy.credentials = cc; //proxy.credentials = system.net.credentialcache.defaultcredentials; request.proxy = proxy; request.proxy.credentials = cc; request.credentials = cc; request.preauthenticate = true; i have tried every possible thing seem missing something. like, have make 2 requests? first out credentials , once hear server need credentials, make same request credentials? this method may avoid need hard code or configure p...

OpenCV, ffmpeg and eclipse on linux -

i'm writing program using ffmpeg , opencv. installing ffmpeg have ran sudo apt-get install ffmpeg, , opencv make & sudo make install. have made project , need tell eclipse headers , lib files are. they? thanks, nahum i don't run debian, these paths may not right you, packages using binary packages (via apt-get, rather apt-src) install libraries in /usr/lib , include headers in /usr/include . on system include directory ffmpeg /usr/include/libavformat , include directory opencv /usr/include/opencv , /usr/include/opencv2 . both libraries in default location of /usr/lib . if know name of library, can use find , locate commands location. e.g find / -iname name* .

operators - || in javascript -

can please tell me || doing here (function() { window.myapp = window.myapp || {}; window.myapp.lang = window.myapp.lang || {}; myapp.lang.extend = function(subclass, superclass) { subclass.prototype = new superclass(); }; })(); window.myapp = window.myapp || {}; it means: create window.myapp empty object if not exist.

objective c - dynamically resizing view height -

i've seen many questions regarding topic, yet cannot find 1 satisfactory answer. i've created sample view using interface builder, attached below: layout sample now text content dynamic, , when have list of such views 1 underneath other, strange state in views overlap each other. looking simple way view resize itself, or @ least expend size of subviews. all explanations find have single label, in manual calculations of size. there no simple mechanism provided coca toch this? thank you you have subclass superview containing other items. override -layoutsubviews method , in method calculate sizes , reposition subviews.

lightopenid - OpenID, Google, and pass-through variables? -

i new openid, , using lightopenid provide authentication against google accounts. possible perform authentication doesn't involve header redirection or can pass through , post variables exist within original http request? any variables in original http request lost when header redirection takes place. thanks! you can set parameters in $openid->return_to . for example, if do: $openid->return_to .= '?a=5&b=23' you $_get['a'] == 5 , , $_get['b'] == 23 in request after authentication. there no way set post parameters way, or avoid redirections.