Posts

jquery - Animate absolute positioned div outwards on both sides of parent -

i have structure this: .sectors-column-right { float: right; width: 800px; height: 796px; position: relative; } .sectors-modal { background: #fff; width: 764px; height: 500px; position: absolute; top: 58px; right: 18px; z-index: 1111; -webkit-box-shadow: 0 0 5px rgba(0, 0, 0, 0.2); box-shadow: 0 0 5px rgba(0, 0, 0, 0.2); } <div class="sectors-column-right"> <div class="sectors-column"> </div> <div class="sectors-column"> </div> <div class="sectors-modal"> </div> </div> how can make .sectors-modal animate outwards (on both sides @ same time), say, on click? can css, or need javascript? remove width on .selectors-modal place left: 0 , right: 0 (or positive values if want gap) on .selectors-modal stretch it give .selectors-modal suitable transition on hover (or click jquery) change left , right values in ...

mysql - get list of parent records from a list of child records with joins or includes -

lets suppose have models class parent < activerecord::base has_many :kids end class kid < activerecord::base belongs_to :parent end and have array of kids [k1, k2, k3, k4] i want list of parents of these kids like [p1, p2] i want use of includes or joins 1 can me. if want via active record: parent.joins(:kids).where("kids.id" => array_of_kids).pluck(:id)

asp.net mvc - How can i add checkbox in my webgrid in mvc 5 -

i want add checkbox in webgrid can tell me how can this? , tell me how can select checkbox , delete them. code:- @{ var grid = new webgrid( model, rowsperpage: 5, defaultsort: "catagoryid", columnnames: new[] { "category_name", "parent_category_id", "category_desc", "isgenderapplicable", "isageapplicable", "isactive" } ); } @grid.gethtml( fillemptyrows: false, mode: webgridpagermodes.all, columns:grid.columns( grid.column("category_name", header: "catagory name"), grid.column("parent_category_id", header: "parant catid"), grid.column("category_desc", header: "description"), grid.column("isgenderapplicable", header: "gender application"), grid.column("isageapplicable", header:"age application"), grid.column("isactive", header: "active") ) ) ...

Sort An array with its specified key value PHP -

this question has answer here: how sort array of associative arrays value of given key in php? 16 answers i have array array ( [0] => stdclass object ( [id] => 3870 [title] => ignacio gonzález visita los terrenos donde se ubicará el futuro aeródromo del suroeste [id_galeria] => 3784 [noticia_id] => [medio] => [programa] => [fecha] => 2013-06-26 [created] => 0000-00-00 00:00:00 [video] => /descargas/flv/20130626_aerodromo.flv [descargable] => /descargas/mp4/20130626_aerodromo.mp4 [miniatura] => /images/img/videos/20130626_01.jpg [published] => 1 [checked_out] => 0 [checked_out_time] => 0000-00-00 00:00:00 [noticia] => 6020 [metakey] => [ordering] => [state] =...

p2p - tranferring android framebuffer to another devices -

i'm planning make program connect each other , control thier android device yes, it's sort of remote control native application. so, i'm wondering frame buffer in android can tranfered streaming technologies such gstreamer or web rtc i've seen few postings didn't make sense.. i think .. possible move framebuffer image file , show image on device . if program repeatedly, 2 android devices can sharing screen makes screen issues can solved on project please give me solutions thanks. you need root android phone frame buffers.

sqlite: Can I mock the current time `now()` for testing? -

i build test suite program runs lot of sql statements now() against sqlite data base. mock sqlite clock --- test behaviour designed take several days within 1 second. not want touch system clock. is possible sqlite? sqlite's built-in functions can redefined sqlite3_create_function . [edit yaakov belch --- additional information:] in perl, can access api through $dbh->sqlite_create_function method of dbd::sqlite data base handle. for python or php see stackoverflow answer .

matching - Why doesn't Scala optimize calls to the same Extractor? -

take following example, why extractor called multiple times opposed temporarily storing results of first call , matching against that. wouldn't reasonable assume results unapply not change given same string. object name { val namereg = """^(\w+)\s(?:(\w+)\s)?(\w+)$""".r def unapply(fullname: string): option[(string, string, string)] = { val namereg(fname, mname, lname) = fullname some((fname, if (mname == null) "" else mname, lname)) } } "john smith doe" match { case name("jane", _, _) => println("i know you, jane.") case name(f, "", _) => println(s"hi ${f}") case name(f, m, _) => println(s"howdy, ${f} ${m}.") case _ => println("don't know you") } wouldn't reasonable assume results unapply not change given same string. unfortunately, assuming isn't enough (static) compiler. in order memoizing legal opti...