Posts

javascript - Issue with jquery select all option -

i have code here need in order make possible multiple selection. now, @ moment optionally, chose single selection or multiple selection, code below: <span>selection mode: </span> <select onchange="$('#dg').datagrid({singleselect:(this.value==1)})"> <option value="0">single row</option> <option value="1">multiple rows</option> </select><br/> selectoncheck: <input type="checkbox" checked onchange="$('#dg').datagrid({selectoncheck:$(this).is(':checked')})"><br/> checkonselect: <input type="checkbox" checked onchange="$('#dg').datagrid({checkonselect:$(this).is(':checked')})"> what can in order make multiple selectable? thanks.. remove that. in page's javascript file, or in embeded <script> block write: $('#dg').datagrid({singleselect:false});

objective c - GPUImage memory usage -

i noticed more use gpuimage, more memory app takes on time (using instruments monitor memory use). as example, use each filter in different methods: (uiimage*)toonfilter:(uiimage*)theimage { gpuimagesmoothtoonfilter *smoothtoonfilter = [[gpuimagesmoothtoonfilter alloc] init]; [smoothtoonfilter settexelheight:0.0025]; [smoothtoonfilter settexelwidth:0.0025]; return [smoothtoonfilter imagebyfilteringimage:theimage]; } (uiimage*)sketchfilter:(uiimage*)theimage { gpuimagesketchfilter *sketchfilter = [[gpuimagesketchfilter alloc] init]; [sketchfilter settexelheight:0.003]; [sketchfilter settexelwidth:0.003]; return [sketchfilter imagebyfilteringimage:theimage]; } (uiimage*)pixellatefilter:(uiimage*)theimage { gpuimagepixellatefilter *pixellatefilter = [[gpuimagepixellatefilter alloc] init]; [pixellatefilter setfractionalwidthofapixel:0.01; return [pixellatefilter imagebyfilteringimage:theimage]; } and h...

javascript - Can't remove cookies, which are generated by PHP -

here how create cookie in php , javascript php, before loading page, first create cookie via php . setcookie('my_key', $value, 0,admin_cookie_path); javascript. i'm using jquery cookie plugin. when dropdown changed, change cookie value. jquery.cookie("my_key", selected); in google chrome, works expected. the value of my_key cookie altered when dropdown changed. in firefox, generates identical cookie. yes, identical my_key cookie generated php: same name, same expire(browser session), same domain, same path, same httponly(blank), same security(blank) the difference new cookie set new value. i try jquery.removecookie('my_key') can delete new cookie. i'm not sure if bug of firefox, or did wrong. but, truly, annoying issue. update 1: it's true didn't specific path in javascript , right can change cookie generated php when set path. still not able delete cookie via js. fyi, i'm able delete cookies in php...

iscroll4 - Why does iScroll is bouncing back to initial position? -

i using iscroll , works until 1 point @ point scrolling area bouncing back. settimeout(function () { var gridscroll = new iscroll('iscroll-wrapper-grid'); }, 100); http://jsfiddle.net/hjakw/ ul { margin:0; } fixes problem. not sure why iscroll doesn't take margin account. maybe says in docs that.

python - Creating Period for Multi Quarter Timespan in Pandas -

many companies release quarterly financial data maps nicely pandas period: p = period('2012q1', freq='q-dec') which in filings labeled "three months ended march 31, 2012". however financial data released in form: "nine months ended september 30, 2005". how create period object "nine months ended september 30, 2005"? another way of expressing period "2005(q1-q3)". i asked: extract quarterly data multi quarter periods

Creating javascript regex tp replace characters using whitelist -

i'm trying create regex replace characters not in specified white list (letters,digits,whitespaces, brackets, question mark , explanation mark) code : var regex = /^[^(\s|\w|\d|()|?|!|<br>)]*?$/; qstr += tempstr.replace(regex, ''); what wrong ? thank you the anchors wrong - allow regex match entire string the lazy quantifier wrong - wouldn't want regex match 0 characters (if have removed anchors) the parentheses , pipe characters wrong - don't need them in character class . the <br> wrong - can't match specific substrings in character class. the \d superfluous since it's contained in \w (thanks alex k.!) you're missing global modifier make sure can more 1 replace. you should using + instead of * in order not replace lots of empty strings themselves. try var regex = /[^\s\w()?!]+/g; and handle <br> s independently (before regex applied, or brackets removed).

database - Will "where `id` in (...)" be comparable in performance with common "where" statement? -

the title tells all. let's say, have separate class, serves query processor in dsl. is, feed query in dsl, , runs query. this query processor talk whatever database connector library use , extract only ids of records matching criteria. this... let's "sets", of ids fed class actual orm on database , constructs domain objects records having ids. this way not need include query parsing abilities orm mechanics , have totally dumb method fetch records ids. as addition, let's suppose have types of caching imaginable, starting web page cache down dbms query cache. will scheme have bad performance compared traditional building of (sql or, maybe, mongodb-style) queries , running them on database directly? i understand require 2 queries per fetch operation, instead of one. question magnitude of difference. my overall goal separate interface queries interface of actual objects gotten queries. example, yii's cactiverecord s fail @ it, being combinatio...