Posts

Featured post

jquery - Why is my content spilling past the bottom of the container? -

Image
it seem if there "max-width" (or having similar effect) set on div somewhere, there isn't, far can tell. yet bottom of container spills out on bottom edge so: why that, , how can prevent it? update what happening here html5 section elements being dynamically (programmatically, via jquery) added tab's content area. pertinent code: html: <div id="tabs" class="content-wrapper"> <ul> <li><a href="#tab-books">books</a></li> <li><a href="#tab-movies">movies</a></li> <li><a href="#tab-music">music</a></li> </ul> <div id="tab-books"> <select id="bookdropdown"> <option value="pulitzer">pulitzer</option> <option value="nbcc">national book critics circle</option> <optio

ruby - Hash.fetch(not_exist_key) raises IndexError instead of KeyError -

in docs, says: fetch(key [, default] ) → obj ; fetch(key) {| key | block } → obj returns value hash given key. if key can’t found, there several options: no other arguments, raise keyerror exception; if default given, returned; if optional code block specified, run , result returned. in terminal, irb says: irb(main):001:0> hash = { 1 => "no one", 2 => "gonna", 3 => "fetch me" } => {1=>"no one", 2=>"gonna", 3=>"fetch me"} irb(main):002:0> hash.fetch(4) indexerror: key not found (irb):2:in `fetch' (irb):2 :0 can me explain that? seems using older version of ruby. according 1.8.7 docs raises indexerror : returns value hash given key. if key can’t found, there several options: no other arguments, raise indexerror exception; if default given, returned; if optional code block specified, run , result returned. note keyerror subclass of inde

android - Button for Submitting to Database Error -

i want insert data row in sqlite database table filling form , has error when click submit button. here's piece of code , logcat public void calldialogconfirmation(){ alertdialog.builder confirm = new alertdialog.builder(form.this); confirm.settitle("please confirm"); confirm.setpositivebutton("yes", new dialoginterface.onclicklistener() { public void onclick(dialoginterface dialog, int id) { string inputansavings = spinner1.getselecteditem().tostring(); string tglmsk = spinner2.getselecteditem().tostring(); sharedpreferences.editor editor = somedata.edit(); editor.putstring("sharedstring1", inputansavings); editor.putstring("sharedstring2", tglmsk); editor.commit(); string inputsalary = salary.gettext().tostring(); dbhelper.createincome("routine income",inputsalary);

javascript - What is the purpose of Object.prototype.toString()? -

i see code in underscore.js. here is, alias applied: tostring = objproto.tostring, however, use tostring accessible directly this, w/ out using above code @ all. tostring() try out in console works fine. try out in direct code , works fine well. guess older browsers may not have accessible in way. how can further? caniuse not not have information on it. google pulls nothing useful in first 10 or hits. because on object.prototype , accessible global objects inherit object ( inherit, not global objects ), such number. but point is, is accessible directly out having use global object instance @ all. tostring(some_var); here 1 so q/a suggests window.tostring not supported in browsers , why is. global objects inherit object, that's wrong assumption, global objects host objects , can inherit whatever want or not inherit @ all. code example doesn't work in ie10. the particular tostring method stored on object.prototype 1 returns in

java - Spring file upload not binding to model attribute object -

i want build simple file upload functionality using spring mvc. i have multipartresolver in place , working: <bean id="multipartresolver" class="org.springframework.web.multipart.commons.commonsmultipartresolver"> <property name="maxuploadsize" value="10240000"/> </bean> when uploading file logged: debug:[org.springframework.web.multipart.commons.commonsmultipartresolver]: found multipart file [imageupload] of size 29081 bytes original filename [xyz.jpg], stored @ [/home/myuser/workspace/myproject/target/tmp/upload_67f1107c_1b8f_402c_bebd_6cd8a6e4c830_00000032.tmp] which tells me it's working. this part of jsp: <form:form modelattribute="placeform" action="/platz/save" method="post" cssclass="placeform" enctype="multipart/form-data"> ... <label for="imageupload">upload</label> <form:input type="file"

html - z-index issue with fixed and relative div's in a container -

i facing issue z-index layout draft form here : jsfiddle i trying achieve following the #topbar , #navigations , #infobar needs fixed always.(achieved) z-index of #mainmenu . needs between #contentborder , #content (has shadow). z-index of #categorys . needs top of #contentbordera , #content . any highly appreciated. seen on www.w3schools.com definition , usage the z-index property specifies stack order of element. an element greater stack order in front of element lower stack order. note: z-index works on positioned elements (position:absolute, position:relative, or position:fixed).

php - var dump is showing result but data is not getiing inserted in DB -

i trying post value in db reason data not being inserted. array returned view not empty. query not executing. part of view: <?echo form_open_multipart('eva/evluation_questions_value_entry'); ?> <input type="hidden" name="id" value="<?php echo htmlspecialchars($id) ?>"> <?php foreach ($info $row){ echo "<div class='row'>"; $i=$row->id; echo "<div class='firstc'>".$row->id ."</div>"; echo "<div class='secondc'>".$row->name ."</div>"; echo '<input type="hidden" name="training_evaluation_entry_id'.$i.'" value='.$i.'>'; //some codes <input id="submit" type="submit" value="submit" name="submit"> </form> the controller: public function evluation_questions_value_entry() { $