Posts

ember.js - How to use Ember.Select in emberjs? -

i have posted code here . i new ember.js , still in learning phase.here trying build simple crud program. i trying use select in above crud program using ember.select not able use it. {{view ember.select contentbinding="objtype.content" valuebinding="objtype.selected" prompt="please select type" }} how use ember.select in above crud program create/update record? change this: objtype: ember.object.create({ selected: null, content: ['1', 2] }) to this: objtype: ember.object.create({ selected: null, content: ['1', 2] }) you should notice changed 'o' 'o', , need update select use right property name

php - Iterate through array changing all values in an array that match a from/to associated array -

i have list of operating systems. if enters "ubuntu", correct "linux ubuntu". have various other corrections , i'm wondering if there efficient way go through array making these corrections? i thinking of having associative array name , key pairs; key being "from" field , name being "to". there better way more efficiently? sample array: $os = array('ubuntu', 'vmware', 'centos', 'linux ubuntu'); the above values example of of data. of them correct, not though, , need corrected. what using array preg_grep ( string $pattern , array $input [, int $flags = 0 ] ) [1] kind less or more sophisticated regular expression? might need simple array of corrected (like linux ubuntu) values that. edit: code example crystal clearance: $regex = '/^[a-z ]*' . $user_input . '[a-z ]*$/'; $correct_values = {"linux ubuntu", "linux debian", "windows xp", ...}; //co...

debugging - Browser Console for AOL Desktop? -

Image
i participate in development of site has significant number of users view our site through aol desktop v9.7 windows - spawns browser windows inside itself. when debugging, don't have tooling able invoke (for example chrome's developer console ; firebug; msie's f12 developer tools ). when inside aol desktop, don't appear have of these, or similar. there developer mode or console can invoke, unearth? what meant in comments, use decent javascript debugger manual dom inspecting features, comes visual studio ( [edited] including free edition). tricks, work aol desktop, (what amusing piece of software is, btw :) of course, not same ie's f12 tools, lacks interactive features visual dom tree, css tracing etc. still allows step through code, watch locals , objects, evaluate expressions , access dom elements. it's invaluable tool , use lot projects host webbrowser control. after all, that's aol does, too. anyway, if you're familiar this, give post...

r - What is the cause of "Error in .C("unlock solver")" Error in deSolve Package? -

i have been using desolve package in mcmc algorithm estimate parameters in ode , wrote functions used in solver in c speed algorithm. sometimes, not error error in .c("unlock solver") when running ode function. able compile , link c files using commands system("r cmd shlib [insert-file-path]") dyn.load("[dll-file-path]") but when try solve ode using dll file, error thrown. then, when running simple script 1 below, same error. think issue related using compiled code, don't know how , cannot find references on error. > require(desolve) > initval <- c(y=1) > times <- seq(0, 1, 0.001) > parms <- c(k=1) > model1 <- function(t, y, parms){ + with(as.list(c(y, parms)),{ + dy <- -k*y; + list(c(dy)) + }) + } > out <- ode(y=initval, times=times, parms=parms, func=model1) error in .c("unlock_solver") : "unlock_solver" not resolved current namespace (desolve) partial solution ...

css3 - Overflow Hidden Not working correctly with radius border -

i trying create nice hover effect project working on , overflow hidden doesn't seem working in safari take look. learn.michaelscimeca.com html: <div class="thumnnail"> <img class="mainbg" src="img/shoppee.jpg" alt=""> <div class="textbox"> <img src="/img/eye.png" alt=""> <span class="launch"><a href="http://www.shoppedelee.com">view project</a></span> </div> </div> css: .thumnnail .textbox .launch { margin-left: -78px; text-align: center; margin-top: 10px; font-size: 12px; font-weight: bold; color: #ffffff; padding: 15px 40px; position: absolute; top: 45px; left: 50%; background-color: #1c51c8; border-radius: 100%; text-transform: uppercase; -ms-transition: .5s ease; /* animation effect bring textbox down , down */ -webkit-transition: .5s ease; -moz-transition: .5s ease; -...

svn - Installing subversion under /apps other than /var/www/ is not working. Centos Linux version -

i m installing subversion 1st time , have lot ofquestions. svn under /var/www/svn , on rot (/) has 50 gb of space. our devlopers might need lot of space 50gb. m trying create repositoies under /apps ( or install svn under /apps modifying subversion.conf file when access page saying forbidden. seems apache can access svn if under /var/www/. can me in solving issue. /apps filesystem has 1tb of space.and separate mount /. in httpd.conf file document root section probally says <directory "/var/www"> also can give apache ownership of directory if such placed in document root. (if understand may not work you) chown -r apache.apache /apps apache can access items outside root soemthing not familiar , can apache alias edit comment under op says svnadmin should able create repo , should able hit it. mkdir /app/svn svnadmin create /app/svn/testrepository chown svn:svn -r /app/svn subversion nice keeping space low since stores revisions projects instead ...

python - Default buffer size for a file on Linux -

the documentation states default value buffering is: if omitted, system default used . on red hat linux 6, not able figure out default buffering set system. can please guide me how determine buffering system? since linked 2.7 docs, i'm assuming you're using 2.7. (in python 3.x, gets lot simpler, because lot more of buffering exposed @ python level.) all open (on posix systems) call fopen , , then, if you've passed buffering , setvbuf . since you're not passing anything, end default buffer fopen , c standard library. (see the source details. no buffering , passes -1 pyfile_setbufsize , nothing unless bufsize >= 0 .) if read glibc setvbuf manpage , explains if never call of buffering functions: normally files block buffered. when first i/o operation occurs on file, malloc (3) called, , buffer obtained. note doesn't size buffer obtained. intentional; means implementation can smart , choose different buffer sizes different cases. (ther...