Posts

ruby on rails 4 - Rendering wrong head with login layout -

can tell me how possibile following layout in rails 4 app # app/views/layout/login.html.erb <!doctype html> <html> <head> <meta content="text/html; charset=utf-8" http-equiv="content-type"> <title>pippo</title> <meta content="yes" name="apple-mobile-web-app-capable"> <meta content="black-translucent" name="apple-mobile-web-app-status-bar-style"> <meta name="viewport" content="initial-scale = 1.0,maximum-scale = 1.0" /> <link href="/assets/login.css" media="all" rel="stylesheet" /> <script src="/assets/login.js"></script> <%= csrf_meta_tags %> </head> <body> <div class="main-content"> <%= yield %> </div> </body> </html> with following controller class sessionscontroller < ...

java - How to Send Data from Ajax to Servlets -

servlet code protected void doget(httpservletrequest request, httpservletresponse response) throws servletexception, ioexception { response.setcontenttype("text/html"); string s = request.getattribute("stopname").tostring(); response.getwriter().write(s); } ajax code function makerequest(i) { var stopname = document.getelementbyid('newstopname' + i).value; var longitude = document.getelementbyid('newlongitude' + i).value; var latitude = document.getelementbyid('newlatitude' + i).value; var description = document.getelementbyid('newstopdesc' + i).value; document.getelementbyid('hidnewstopname' + i).value = stopname; document.getelementbyid('hidnewlongitude' + i).value = longitude; document.getelementbyid('hidnewlatitude' + i).value = latitude; documen...

sql - getting the column name -

Image
i've below html. <!doctype html> <html> <head> <meta charset="utf-8"> <title>untitled document</title> </head> <body> <form name="new" method="post" action="getr.jsp"> <div class="main"> <table width="200" border="1"> <tr> <td>units</td> <td><input type="text" name="units" id="units"></td> </tr> <tr> <td>product type</td> <td><input type="text" name="prodt" id="prodt"></td> </tr> <tr> <td>hours</td> <td><input type="text" name="hours" id="hours"></td> </tr> <tr> <td colspan="2"><input name="submit" type="submit" id...

Mysql PHP won't work -

i have code ill show information database won't work connecta.php code <?php $dbhost = '*'; $dbuser = '*'; $dbpass = 'nq4*jh5!'; $conn = mysql_connect($dbhost, $dbuser, $dbpass); if(! $conn ) { die('could not connect: ' . mysql_error()); } mysql_select_db('*'); mysql_query("set names utf8"); ?> and source of page have problem <?php $id = $_request['id']; require("../connecta.php"); $sql = 'select mirror_link fallaga_tbl id=\'$id\' '; $retval = mysql_query( $sql, $conn ); if(! $retval ) { die('could not data: ' . mysql_error()); } ?> <!doctype html> <html> <head> <title>zone-p || fallaga mirror</title> <link rel="stylesheet" type=...

sql - How to select rows using outer join -

i have 2 a1 , a2 tables wit single column. a b - - 1 3 2 4 3 5 4 6 i need select records not in b. tried select [a1] left outer join a2 c on a.[a]=c.[b] select 1 , 2 more 1 time, want unique results only, want 1 , 2 only . refereed few links outer join not able understand fully. know silly question new joins. what not in combined distinct you're not getting duplicates select distinct a1 not in (select b a2)

python - see output of print statements on android using kivy - kivy launcher -

Image
i have created program print instructions on stdoutput while running . can see them when execute app on windows when run same app on android device samsung s3 not see output of print statements . sometimes can see .kivy directory on device in same directory program log files contains kivy specific logs ignore print statement outputs . can 1 give advice how use ... use adb logcat output of application, or use 1 of apps available on-line display logs , grep 'python'. detailed steps above:: enable developer options on device (google friend). enable usb debugging . image taken http://androidfannetwork.com/ then connect device pc using usb cable type adb devices in console. should show device (there might prompt asking permissions connect computer). one simpler way use visual indication on widget instead of printing on console. create functions app bubprint from kivy.core.window import window kivy.clock import clock kivy.factory import factory kivy.la...

ios - Does Google Maps causes high live bytes? -

i'm using google maps ios sdk in current application. map view displays lot of markers (about 900). i'm drawing marker 1 image reference per marker already, live bytes in application extremly high (around 45mb). i see in instruments tool glengine of time responsible library. responsible caller allocatewcmemory , glecreatevertexarrayhashobject . 4kb page size of buffer allocated glengine. may check whether gldeletebuffer when not need buffer more.