Posts

javascript - Info box similar to Google Image Search Results -

here factors borrow googles image search results: each item sits next each other , falls next row if cant fit in current row because of browser windows width. when 1 item clicked on, info box slides open directly below row of selected item, fills width of browser, indicator visible @ bottom of selected item. when info box opened, if browser width changed, items fall row can fill (top first) or fall row below. not affect 100% width of info box or position directly below row of selected item. i have implemented first bullet creating divs have display: inline-block i want solution thats html , css first, , javascript (jquery, ajax etc.) if necessary, dont using many html attributes except ones i'd need make work, id , class , src etc. use css whenever possible instead. if can stick html elements , style them css , ever remnants can't fulfilled css , html fulfilled javascript (or derivative jquery, ajax etc). an example of im @ far: <html> <head...

class - Are these java classes equivalent? -

given following 2 classes example1 , example2 , excluding performance characteristics, these 2 classes operate exact same way. is, regardless of how simple or complex either methoda or methodb or can be, result of running these 2 classes, under possible conditions (both internal , external), absolutely same ? example1 public class example1 { public static void main (string [] args) { try { // not compile since nextboolean() not static // boolean t = java.util.random.nextboolean(); // changed java.util.random r = new java.util.random(); boolean t = r.nextboolean(); if (t) { methoda(); methodb(); } } catch (throwable t) { t.printstacktrace(system.out); } } private static void methodb () { // code goes here } private static void methoda () { // c...

iphone - Possible to embed PDF files and videos into an iOS app? -

as title indicates, want know how difficult create ios app in can include few of own movies , pdf files, , make them viewable app itself. i know ios has built in pdf viewer , movie player, want make sure can access them easily, , not have write own pdf viewer or of sort. thanks in advance help! edit: if so, pointers on how should go doing this? perhaps link tutorial or something? for viewing pdf files can use uiwebview or quicklook framework (see qlpreviewcontroller class details).

osx - How to switch to edit mode of vi on mac terminal -

i new mac, trying edit .gitignore file macbook terminal, type vi .gitignore it opens file not letting me switch edit mode. how vi switches mode on mac ? on mac can more correctly type vim (vi improved) instead :) same everywhere, i switches "insert" mode , esc switches command mode. a learning resource vim included in mac. type vimtutor , teach how use vim effectively. another editing option on mac nano command line text editor easier familiar textedit/notepad.

ruby on rails - Error Adding a Migration: `default_controller_and_action': missing :action (ArgumentError) -

i'm trying add following migration: rails g migration addconfirmabletousers confirmation_token:string confirmed_at:datetime confirmation_sent_at:datetime unconfirmed_email:string however, raised following error i'm unable troubleshoot: /users/tn/.rvm/gems/ruby-2.0.0-rc1@global/gems/actionpack-3.2.13/lib/action_dispatch/routing/mapper.rb:179:in `default_controller_and_action': missing :action (argumenterror) /users/tn/.rvm/gems/ruby-2.0.0-rc1@global/gems/actionpack-3.2.13/lib/action_dispatch/routing/mapper.rb:72:in `normalize_options!' /users/tn/.rvm/gems/ruby-2.0.0-rc1@global/gems/actionpack-3.2.13/lib/action_dispatch/routing/mapper.rb:60:in `initialize' /users/tn/.rvm/gems/ruby-2.0.0-rc1@global/gems/actionpack-3.2.13/lib/action_dispatch/routing/mapper.rb:1308:in `new' /users/tn/.rvm/gems/ruby-2.0.0-rc1@global/gems/actionpack-3.2.13/lib/action_dispatch/routing/mapper.rb:1308:in `add_route' /users/tn/.rvm/gems/ruby-2.0.0-rc1@glob...

c# - Adding a single row with a single column of one datagridview into another datagridview of multiple column -

Image
i have defined datagridview 5 columns , 1 column ..what want on click of button in datagridview columns, row single column of other datagridview pops up..is possible?..this screenshot of datagridview.. i want add datarow of datagridview 1 column..i know how handle cellevent want addition of datarow 1 column.. hope helps: private void dgv1_cellcontentclick(object sender, datagridviewcelleventargs e) { if (e.columnindex == 3) { int newrow = dgv2.rows.add(); dgv2.rows[newrow].cells[0].value = dgv1.rows[e.rowindex].cells["stringtext"].value; } } this should take value stringtext cell , place in first column of newly created row in second grid when button in cell 4 clicked in first grid. edit: private void dgv1_cellcontentclick(object sender, datagridviewcelleventargs e) { if (e.columnindex == 3) { dgv1.rows[e.rowindex].cells["stringtext"].value = dgv2.rows[{y}].cells[0].value; ...

sql - Calculate no of rows created on daily basis from a huge table in mysql -

i need calculate num of rows created on daily basis huge table in mysql. i'm using select count(1) table_name group date the query taking more 2000sec , counting. wondering if there's optimized query or way optimize query. if you're interested in items created on dates, calculate count @ end-of-day , store table. that lets run count query on smaller data set ( use date(now()) = date , drop group by ) then query new table when need data.