Posts

ios - iOS4: how do I use video file as an OpenGL texture? -

i'm trying display contents of video file (let's without audio now) onto uv mapped 3d object in opengl. i've done fair bit in opengl have no idea begin in video file handling, , of examples out there seems getting video frames cameras, not i'm after. at moment feel if can individual frames of video cgimageref i'd set, i'm wondering how this? perhaps there better ways this? should start , what's straight forward file format video playback on ios? .mov? apologies; typing on iphone i'll little brief. create avurlasset url of video - can local file url if like. quicktime can fine, mov or m4v in h.264 best source. query asset tracks of type avmediatypevideo. should 1 unless source video has multiple camera angles of that, taking objectatindex:0 should give avassettrack want. use create avassetreadertrackoutput. want specify kcvpixelformattype_32bgra. create avassetreader using asset; attach asset reader track output output. , call start...

templates - Componentheading and contentpagetitle joomla -

if have problem componentheading , contentpagetitle. i got sectionblog articles. title of page componentheading. title of articles (intro) contentpagetitle. if click on title of article, can see entire article. title of page title of article (contentpagetitle), , good. the problem is, title needs same layout componentheading. if this, titles of articles layout in sectionblog how can make sure got 2 different styles, or contentpagetitle changes in componentheading while looking @ full article? i don't uderstand i'm saying go http://csm.infowebpreview.be/nl/realisaties , , click on first title 'realisatie'. full article opens , title 'realisatie' should underlined now. or correct: if article article on page title should layout thanks you can being more specific css selector - this 1 apply of titles, make 1 one main heading underline - h2.contentheadingrealisaties{border-bottom: 1px solid #333} then use single out article titles in ...

html - jquery LI's anchor hover problem [JSFiddle inside] -

please see jsfiddle pretty clear idea of problem - http://jsfiddle.net/peyyz/ the above sort of want. when hover on li.parent , ul.child menu fades in, fine. want sub menu remain open, unless user selects li.parent . tried messing mouseleave ,but don't think that's i'm after. the logic need is: if user hovers on li class parent , show it's ul.child if user moves mouse somewhere else isn't li.parent , ul.child should remain open. if user moves li.parent , li.parent ul.child should open, , open 1 should disappear. thanks in advance like this? http://jsfiddle.net/nzfz6/ had edit css part too.

algorithm - Big O Question - Algorithmic Analysis II -

i doing question asks find complexity of nested loop simplified using big o notation. the question is: for <- 1 n j <- 1 n k <- 1 (i+j) unit cost operation i have prove above using sum of series notation. kind of grasping concept , have given crack. want know whether doing correctly or not. here answer: **assume sum(x=i, y) capital sigma notation x lower bound , y upper bound. => sum(i=1, n) sum(j=1, n) sum(k=1, i+j) 1 => sum(i=1, n) sum(j=1, n) (i+j) => sum(i = 1, n) n*i => n * sum (i = 1, n) i subbing in rule sum of arithmetic series gives: => n*n/2(n+1) => (n^3 + n^2) / 2 using big oh rule -> max(f(x), g(x)): => max(n^3/2, n^2/2) => o(n^3) i know answer correct not sure if calculations prior are.... with small correction: sum(i=1, n) sum(j=1, n) sum(k=1, i+j) 1 = sum(i=1, n) sum(j=1, n) (i+j) = [ sum(i=1, n) sum(j=1, n) ] + [ sum(i=1, n) sum(j=1, n) j ] = sum(i = 1, n) n*i + ...

python - How can I retrieving a timestamp from a dictionary and converting it to datetime object? -

i have dictionary of timestamps in form 2011-03-01 17:52:49.728883 , ids. how can retrieve latest timestamp , represent in python datetime object? the point able use latest date of timestamp instead of currnt date in above code. latest = datetime.now() the structure of dictionary not entirely clear question, i'll assume keys strings containing timestamps 1 in question. if d dictionary: datetime.strptime(max(d.keys()),'%y-%m-%d %h:%m:%s.%f') the above code uses fact lexicographical ordering of datetime strings sorts timestamps in chronological order. if you'd rather not rely on that, use: max(map(lambda dt:datetime.strptime(dt,'%y-%m-%d %h:%m:%s.%f'),d.keys()))

sql - One row with 2 same name columns -

i wish have resultset 2 columns of data coming same column. select cust,date,data cust_a1 ai_code between '17' , '19'; this return multiple rows 1234567 | 04-04-2011 | special offer 1234567 | 04-04-2011 | cheep offer 1345678 | 04-04-2011 | friday offer 1345678 | 04-04-2011 | special offer i shape this: 1234567 | 04-04-2011 | special offer | cheep offer 1345678 | 04-04-2011 | special offer | friday offer how can done? this known pivot

datetime - Binning Dates in R -

i struggle dates , times in r, hoping basic task. here dataset: > str(temp.df) 'data.frame': 74602 obs. of 2 variables: $ time : posixct, format: "2011-04-09 03:53:20" "2011-04-09 03:53:15" "2011-04-09 03:53:07" "2011-04-09 03:52:39" ... $ value: num 1 1 1 1 1 1 1 1 1 1 ... > head(temp.df$time, n=10) [1] "2011-04-09 03:53:20 edt" "2011-04-09 03:53:15 edt" "2011-04-09 03:53:07 edt" "2011-04-09 03:52:39 edt" [5] "2011-04-09 03:52:29 edt" "2011-04-09 03:51:56 edt" "2011-04-09 03:51:54 edt" "2011-04-09 03:51:46 edt" [9] "2011-04-09 03:51:44 edt" "2011-04-09 03:51:26 edt" and convenience... > dput(head(temp.df$time, n=10)) structure(c(1302335600, 1302335595, 1302335587, 1302335559, 1302335549, 1302335516, 1302335514, 1302335506, 1302335504, 1302335486), class = c("posixct", "posixt"), tzone = ...