Posts

css - Inline-blocks inside fixed width content overflowing -

i have 2 inline-blocks of fixed content, i'm trying display these next each other. they're both held within div of width: 1000px; , 2 inline-block divs both width: 400px; , width: 600px; respectively. the 2 divs don't display inline, second div collapses underneath first, if drop width of second width: 550px; both display inline, question being: how come 2 divisions have combined width of 1000px can't both fit inside container has width of 1000px; ? fiddle below. <div class="layout"> <div class="width"> <div class="area left"> </div> <div class="area right"> </div> </div> </div> and css .layout { box-sizing: border-box; padding-left: 250px; padding-right: 250px; padding-top: 50px; } .layout .area.left, .layout .area.right { display: inline-block; height: 250px; } .layout .area.left { width: 400px; background: green; } .la...

html - Addding a item to a list in JavaScript -

i'm debutant in javascript please patient me, in code have list of ingredients, when user puts in input area , click on body, text must added item in list before last one, code not working , can't find problem. <!doctype html> <html> <head> <title>kitchen</title> <script type="text/javascript"> function ajout(){ var newingredient = document.createelement("li"); var ingredient = document.getelementbyid("in2").value; var text=document.createtextnode(ingredient); newingredient.appendchild(text); var lastone=document.getelementbyid("last"); var list=getelementbyid("listecommissions"); list.insertbefore(newingredient, lastone); } </script> </head> <body onclick="ajout()"> <br /><br /><br /> <ul id=...

ios - Moving between UIViewControllers without Segue -

i have storyboard has 8 uiviewcontroller s on (and counting). need able move between pair of these on demand. essentially, trying mimic functionality of uitabbarcontroller . since there many of these, can't use uitabbarcontroller (that solve problem immediately), using uipopovercontroller embedded uitableview allow user choose destination. of course, create segues on storyboard, set of segues need currently, have create 56 such segues view controllers have right now, , potentially many more things grow. one idea had create 'hub' view controller doesn't other hold segues each of 'real' vcs , delegate of each of vcs. then, when want switch between vcs, first dismiss view controller , pass segue name destination hub. hub can perform segue, gets me want. think work, seems sort of hackish. does know how if there better way accomplish this? thank you! why don't give each 1 storyboard identifier, grab need identifier using this: uiviewcontro...

How to open google play store url in android webview -

i'm gonna open google play app url on webview. says this browser no longer supported. please use google play store app access google play. i've researched solve issue didn't find solution. there ways open on activity there no way open on webview yet. i know same message when i'm going access url in normal web browser. anyhow there solution? you need change user agent : http://developer.android.com/reference/android/webkit/websettings.html#setuseragentstring(java.lang.string e.g. webview.getsettings().setjavascriptenabled(true); webview.getsettings().setuseragentstring("mozilla/5.0 (x11; linux x86_64; rv:10.0) gecko/20100101 firefox/10.0"); // linux desktop mozilla user agent then load google play.

hibernate - Grails many to many relationship not creating expected tables -

hi have 2 domain classes. idea user can create events, guest @ other peoples events: class event { appuser creator static belongsto = appuser static hasmany = [guests: appuser] and class appuser { static hasmany = [friends: appuser, events: event] the problem is, expected make creator_id column in event table, , appuser_events table appuser_id , event_id , including creator_id column here , making primary key. i tried creating event class this: class event { static belongsto = [creator:appuser] static hasmany = [guests: appuser] but grails not recognize belongto relationship. any idea how fix? ok, solved issue. key add 2 hasmany references event class appuser, , add mappedby, event class contains: static hasmany = [friends: appuser, events: event, invites:event] static mappedby = [invites: "guests", events: "creator"] the appuser class unchanged first example in question.

Exact meaning of dashtype index in the Gnuplot 5.0? -

Image
i got problem in gnuplot 5.0, dashtype index, such ``set dashtype 1 (2,5,2,15)` in manual. my question is: these numbers in parenthesis mean? tried change them feeling, great know exact meaning. my actual problem is, using dashtype n , gives lines different previous 4.6 version, unfortunately. try reproduce plots made in gnuplot 4.6. those numerical pairs <solid length>,<empty length> those lengths factors internal unit length. dash pattern length further depends on dashlength terminal option , line width. so, having plot x dt (2,4,2,6) plots dash, empty space twice long, again dash of same length , empty space 3 times dash length. the actual length of first dash then linewidth * terminal_linewidth * solid_length * terminal_dashlength * dash_unit first example: set terminal pngcairo size 600,50 dashlength 2 linewidth 1 set output 'dash1.png' unset border; unset key; unset tics plot 0 dt (2,4,2,6) lw 10 what might confusing is,...

apache - htaccess HTTPS only no redirect -

i want block port 80 (http) , allow https requests. have found many examples of how redirect http https prefer display error instead. cannot block port 80 in config file hosting provider not allow me modify these files. if possible, how can achieve same results htaccess. the reason me wanting on api.domain.com added security after reading article . quote article... aside abandoning http basic altogether there easy fix. close port 80 on api host. stops connection being made dead in tracks, preventing credentials being sent in clear try: rewriteengine on rewritecond %{https} off rewritecond %{request_uri} !/error\.php rewriterule ^ http://%{http_host}/error.php [l,r] or rewriteengine on rewritecond %{https} off rewriterule ^ - [l,f]