Posts

ios - Background fetch stops working after about 10 to 14 hours -

my application uses backgroud fetch send , upload small portion of data every 30 minutes. service working correctly 10 - 14 hours after application minimized working in foregroud - application correctly sending , receiving data every 30 minutes. does know happens service after couple of hours? ios system automatically terminate application , therefore background fetch stops working? can explain? ios provides 30 seconds time frame in order app woken up, fetch new data, update interface , go sleep again. duty make sure performed tasks manage finished within these 30 seconds, otherwise system stop them. maybe internet slow app took more 30 seconds & system stopped application. -(void)application:(uiapplication *)application performfetchwithcompletionhandler:(void (^)(uibackgroundfetchresult))completionhandler{ nsdate *fetchstart = [nsdate date]; // make process here [viewcontroller fetchnewdatawithcompletionhandler:^(uibackgroundfetchresult result) ...

html - having difficulty with responsive web design -

i image larger size on computer, fit smaller devices. when try have larger image size computer, increase size on phone, , shrinks , pushes navigation (which supposed in middle) left. (my navigation meant on left hand side on computer, in middle horizontally on smaller devices) how can set different image sizes different devices? tried @media doesn't seem working. i'm beginner, see i'm doing wrong? areas experience issue on .typecontainer, .type, .type1 link screenshots: http://imgur.com/bm5xdwr,p9eux4v,mq3gpp1#0 html: <!doctype html> <html> <head> <title>example</title> <link rel=”stylesheet” type=”text/css” href=”style.css” /> <meta name=”viewport” content=”width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0”> </head> <body> <div id=”topnav”> <nav class=”navigation” role=”navigation”> <ul> <li class=”work”> <a href=”work.html”>work...

java - Why this Regular Expression doesn't work? -

i have regular expression extract 2 tokens, delimiters [ ' ] , words between apostrophes ' stack overflow '. question is, why regular expression doesn't work? regex: (['])|'([^']*)' here link explain it: regular expression only works extracting apostrophes but, words between apostrophes no. note: need extract apostrophe , word between apostrophe separately 'stack overflow'. the result like: ' stack overflow ' greetings. your regex says match either single quote or content between quotes, it's exclusive or way have it. each of them capture group use regex: (')([^']*)(') to first quote, that's not quote last quote

javascript - Date class converts Timestamp wrong -

in application, creating live console output messages timestamp , contents. read, approach using below date() class should work expected, timestamp multiplied 1000 milliseconds. i logging timestamp debugging purposes , getting values "1441041070066". when plug these epoch/unix converters, date/time correct. code giving nonsense "22:7:46" , 1 minute later "20:48:37". can please explain doing wrong in case? messages.foreach( function (item) { var timestamp = item.timestamp; // /date(1440823073243)/ var timestamp = timestamp.substring(timestamp.lastindexof("(")+1, timestamp.lastindexof(")")); console.log(timestamp); var source = item.source; var type = item.type; var contents = item.contents; // date/time in milliseconds var date = new date(timestamp * 1000); var time = date.gethours() + ":" + date.getminutes() + ":" + date.getseconds(); console_log("<font colo...

reflection - Java Dynamic Casting in Apache POI -

i using apache poi yield excel reports, , since each column compatible respective datatype (date, number, integer ...), made static method return object can "casted". since prone reducing code as possible, chose following: string value = resultset.getstring(i); object castablevalue = engine.formattingvalue(value); cell.setcellvalue((castablevalue.getclass().cast(castablevalue))); however, not accepted @ compile time poi library, while sure work @ run time. i have use if else 4 datatypes (double, integer, calendar, , string). any suggestions achieve dynamic solution ?

javascript - how to debug a div that shows and hides almost instantly -

on website, have lot of code, many js vendors, etc. on 1 specific page, have king of right sidebar pops out less half second, never enough me click on , try debug weird thing (i'm thinking of putting display none on class). i've tried go through dom , place dom breakpoints in chrome browser it's not doing nothing. does know how debug ? thanks lot ! use "inspect element" detect sidebar , navigate class or id has display:none; property. can click on or off in developer toolbar...

Array of values loaded through UART in VHDL -

i working on project in vhdl wich includes mutliplying matrices. able load data pc arrays on fpga using uart. making first bigger steps in vhdl , not sure if taking right attitude. i wanted declare array of integer signals, , implement uart receive data form pc , load signals. however, can't use for-loop that, synthesised load data parallelly (which impossible, because values comming pc 1 after another, using serial port.) , because matrices may various sizes, in order assign signals 1 one need write lots of specific code (and appears bad practice me.) is idea use array of signals , load data signals through uart realizable? , if approach entirely wrong, how achieve that? what want doable need design kind of hardware monitor act intermediate between uart , storage (your array of integer signals). hardware monitor interpret commands coming uart , perform read/write operations in storage. have 1 interface storage , uart. have define kind of protocol syntax commands ,...