Posts

javascript - Call an event from another element -

i have button a onclick = "alert(1);" and button b . how do, when click on button b , should call event on button a ? click b -> eventb -> eventa html: <button id="buttona"> button </button> <button id="buttonb"> button b </button> javascript: var = g('buttona'), b = g('buttonb'); function g(s) { return document.getelementbyid(s); } a.onclick = function() { alert('button clicked!'); }; b.onclick = function() { alert('button b clicked!'); a.click(); } live demo: http://jsfiddle.net/tapwr/1/ update: if button b inside iframe use top object reference window object of "parent" page. iframe code so: var b = document.getelementbyid('buttonb'); b.onclick = function() { alert('button b clicked!'); top.document.getelementbyid('buttona').click(); }

cryptography - rijndael s-box with an example in simple words -

all on google , wiki i'm not able understand rijndael s-box key scheduling... can explain them in simple words , clear example???? check this flash presentation , i've seen when studying rijndael cypher , needed understand it, hope :)

ruby on rails - JRuby Rails3 Trinidad/Jetty_Rails fails on simplest install - feeling as dim as a 2watt bulb -

ok. been getting quite frustrated trying jruby/rails3 running jetty , tomcat. trying local install of jruby/rails3 , jetty/tomcat app running on os-x. (and ubuntu stage , live server) error on startup could not find activerecord-jdbc-adapter-1.1.1 in of sources try running `bundle install`. i've tried googling myself distraction trying find out why happens. 1 source mentioned issue 'bundler' didn't give version information. others gave varying options change gemfile have tried exhaustively last 5 hours no luck. in exasperation decided start scratch plain install. installed jruby in /opt/jruby-1.6.0.rc1/ symlink /opt/jruby. gems installed: jruby -s gem list *** local gems *** abstract (1.0.0) actionmailer (3.0.3, 2.3.5) actionpack (3.0.3, 2.3.5) activemodel (3.0.3) activerecord (3.0.3, 2.3.5) activerecord-jdbc (0.5) activerecord-jdbc-adapter (1.1.1) activerecord-jdbcmysql-adapter (1.1.1) activeresource (3.0.3, 2.3.5) activesupport (3.0.3, 2.3.5) arel (2.0...

asp.net mvc - Why is NHibernate persisting new objects in the wrong order of creation even inside a transaction? -

in asp.net mvc app have log object tracks happens in forum. when comment added inside transaction following happens: a new comment added submissions table a new log entry reference id of comment added logs table finally transaction committed , no exceptions generated. turns out when transaction committed, nhibernate first inserts log record , comment record, therefore saving log record incorrect comment id 0. here code show happening: using (iatomictransaction transaction = unitofwork.begintransaction()) { try { submissionrepository.addcomment(comment, parentsubmission); logrepository.addcommententry(comment); transaction.commit(); } catch { transaction.rollback(); throw; } } unitofwork , atomictransaction wrappers around isession , itransaction objects nhibernate apis. , here log generated confirms problem: 2011-02-09 14:42:05,631 [15] debug nhibernate.sql - insert logs (version, created_at...

database design - Except joining 20 tables any other options for writting / reading data? -

i creating user profile. fields lookup based own tables favourite movies, favourite music, favourite food, sports, etc... these not text fields auto suggest fields system maintained list. reason these in own table have more colunms unique them. so read data @ user input ok after 2 problems: 1) writting data: since m:m relationship need 20 different tables? 2) reading data @ profile load time: need join these 20 tables user's data? what other option have store these user details? concern performance since social site. 20 joins not good. not sure other techniques. using mysql , php. the other option can think of store data in array in db although dont know how searches work that. install favorite dbms. create user table, , 2 or 3 user favorites tables. write little program generate , load million random users. write little program generate , load 10 million favorite movies (or whatever) million users. run queries. if speed problem, post schema "datab...

where to get the SP 2010 Enterprise Search Query sample? -

where sp 2010 enterprise search query sample? with "contains" , "freetext" option. i find tool complex not working in share point 2010 sites. is there tool available generate sp 2010 search query? what tool codeplex did try? i use sharepoint searchcoder tool of zevenseas http://mosssearchcoder.codeplex.com/

facebook - FQL and Graph API in iOS -

have used fql of graph api in ios? trying users posts different groups have read fql documentation need see example me proceed? please help here example: nsmutabledictionary * params = [nsmutabledictionary dictionarywithobjectsandkeys: @"select uid,name user uid=4", @"query", nil]; [facebook requestwithmethodname: @"fql.query" andparams: params andhttpmethod: @"post" anddelegate: self];