Posts

android - Removing ActionBar (Tittle) splash screen with icon -

just started developing action bar. having problem. have customized action bar wanted ( sort of, still cant position buttons on left :)). have removed icons, button, tittle action bar. problem is, when i'm launching application tittle bar (with icon , tittle) flashes second, before customized action bar appear... how can stop splash? i have saw answers include removing tittlebar android theme, because tittlebar , actionbar same thing, removing tittlebar causes actionbar dissapear. if want remove actionbar in 1 activity in particular, best way deal use theme. in androidmanifest, declare application theme of app, , can declare activity 1 theme in particular : <application android:icon="@drawable/ic_launcher" android:label="@string/app_name" android:theme="@style/apptheme"> <activity android:name="splashactivity" android:theme="@style/appthemenotitle" android:label=...

php - Get XML code count using XMLReader -

i trying parse product feed provided google merchant. thing want more interactive using function convert xml array , show percentage user how products updated. have read xmlreader more efficient other parsing techniques. how can make xmlreader more effective. can number of nodes using xmlreader. or how can iterate on xml can more responsive. converting xml array wrong idea. mean build data structure in memory. have data structure, converting array mean loose data , features. read xml directly , use it. here several ways archive want. if feed small can use dom directly. allows use xpaths count() function. the google product-feed bases on rss 2.0 or atom 1.0. atom better format let's use that. // create dom document , load xml $dom = new domdocument(); $dom->loadxml($xml); // create xpath object , register prefixes 2 namespaces $xpath = new domxpath($dom); $xpath->registernamespace('atom', 'http://www.w3.org/2005/atom'); $xpath->reg...

jquery - Bootstrap popover to appear on hover and remain for a second -

i popover appear on hover, remain if user interacting (it contains links) if not, should disappear after 500ms. javascript $(document).ready(function(){ $('[data-toggle="tooltip"]').popover({ title: 'look! bird!', html:true, delay: { show: 100, hide: 1000 } }); }); php <button type="button" class="badge btn btn-default" data-trigger="click" data-toggle="tooltip" data-placement="top" data-html=true data-content="@foreach($tag->tracks $track) <a href='/tracks/{{ $track->mdbid }}'>{{ $track->title }}</a> @endforeach">{{ $tag->tracks->count() }}</button> ignore funny code inside brackets (it laravel blade syntax) jsfiddle i have created jsfiddle although doesn't work (it on machine). have got delay working. however, if mouse within popover, still disappears. how can prevent , make disappear when mouse outside popover? this ...

Speed up a loop in R -

i using following function estimate kernel density of data kdens = function(x,h,n) { fx = matrix(0,n,1) kx = ak(x,h,n) (i in 1:n) { fx[i] = sum(kx[i,], na.rm=t)/n } return(fx) } i know not first question speeding loop. checked around in site, found using apply function faster, not case if manage correctly set loop. in above code, every "not needed thing" left out of loop, - if understood correctly - suggested speed computation. however, made comparison between above kdens function , density function implemented in r default. well, density needs 1 or 2 seconds, while kdens needs ~30 on machine. trywiththis <- rnorm(4800) x = trywiththis n = length(trywiththis) h = 1.059*sd(trywiththis , na.rm=t)*(n^(-0.2)) edit: information provided not complete kerf = function(x){ return(dnorm(x)) } ker = function(x,x0,h){ temp = kerf((x-x0)/h)/h return(temp) } ak = function(x,h,n) { k = ...

ios7 AVFoundation performance issues (memory leak) -

i using avfoundation capture qr codes in app. in ios 7.0 seeing major issues regards video capture. capture takes longer , longer each time it, leading app crash due memory leak issues. it works fine ios 7.1 . known issue? to fix this, had add following code when stopping capturesession [_capturesession removeinput:self.captureinput]; i not sure why didn't present issue on ios 7.1 though.

java - AWS S3 - Listing all objects inside a folder without the prefix -

i'm having problems retrieving objects(filenames) inside folder in aws s3. here's code: listobjectsrequest listobjectsrequest = new listobjectsrequest() .withbucketname(bucket) .withprefix(foldername + "/") .withmarker(foldername + "/") objectlisting objectlisting = amazonwebservice.s3.listobjects(listobjectsrequest) (s3objectsummary summary : objectlisting.getobjectsummaries()) { print summary.getkey() } it returns correct object prefix in it, e.g. foldename/filename i know can use java perhaps substring exclude prefix wanted know if there method in aws sdk. there not. linked list of methods available. reason behind s3 design. s3 not have "subfolders". instead list of files, filename "prefix" plus filename desire. gui shows data similar windows stored in "folders", there not folder logic present in s3. http://docs.aws.amazon.com/awsjavasdk/latest/jav...

Using Servicestacks c# redis client how do I set the URN? -

i have code like: public vehicle neworupdate(vehicle vehicle) { try { redismanager.execas<vehicle>(r => { r.store(vehicle); //save new or update }); } catch (exception ex) { errormessage = ex.tostring(); haserror = true; throw; } return vehicle; } how can set urn item being added? see createurn extension on object don't see way set explicitly. default creates urn of "urn:vehicle:id". id have urn "urn:vehicles-{myspecialid}:id" possible control this? or way ask this... can make own urn objects store? vehicle v = new vehicle(); v.createurn = "urn:mine"; redismanager.execas<vehicle>(r => { r.store(v); }); it looks it's not hard, if know look. create list urn want: string urn = string.format("urn:dealer:{0}:vehicles", dealer.dealerid); var vehicleclient ...