Posts

Featured post

html - How to open UIWebView from another UIWebView? -

Image
i have web view @ bottom of 1 of view controllers contains links. want when user clicks on 1 of links in web view opens web view takes screen with content of page user has clicked on. or maybe when user clicks on 1 of links in web view, user taken safari display content of link. know how this? cheers. above screen shot of web view links user can click on.. try this: -(bool)webview:(uiwebview *)webview shouldstartloadwithrequest:(nsurlrequest *)request navigationtype:(uiwebviewnavigationtype)navigationtype; { nsurl *requesturl =[ request url ]; if ( ( [ [ requesturl scheme ] isequaltostring: @"http" ] || [ [ requesturl scheme ] isequaltostring: @"https" ] || [ [ requesturl scheme ] isequaltostring: @"mailto" ]) && ( navigationtype == uiwebviewnavigationtypelinkclicked ) ) { return ![ [ uiapplication sharedapplication ] openurl: requesturl] ; } return yes; }

apache - Why should we keep index.php in the public folder instead of in the root? -

Image
i still don't quite understand why must keep index.php in public directory instead of in root directory. root/of/project public/ index.php .htacess (html, image, css, etc) then, write following in our virtual host file: documentroot /path/to/myapp/app/public <directory "/path/to/myapp/app/public"> # other setting here </directory> the .htaccess file redirects non-existing urls index.php: rewriteengine on rewritecond %{request_filename} !-d rewritecond %{request_filename} !-f rewriterule ^ index.php [qsa,l] i notice frameworks so, such symfony , zend, this tutorial. actual benefits having trouble of modifying virtual host file? why shouldn't have below instead without modifying virtual host file? security risk or something? root/of/project index.php .htacess public/ (html, image, css, etc) if keeping index.php , modifying virtual host file better, how can modify virtual host file i

java - Does Glassfish server consist of a webserver also? -

according defintions have read web server can serve http requests (e.g apache). a web container can serve servlets , jsps etc. since tomcat can both serve http requests , serve servlets , jsps considered both web server , web container. application servers jboss, glassfish fledged java ee servers include other containers apart web container. now in order application server glassfish work on own, needs web server(an http server) built it. therefore should contain webserver work on won, , if doesn't contain webserver built it, there should way plug existing web servers apache application server. what actual implementation? include webserver or should plug webservers these java ee application servers? yes, includes full web tier. java servlet spec covers of this.

java - My CSS stopped working -

i have problem css file haven't been able solve while. i'm relatively new in java web technologies , have no clue could've caused that. i'm trying write mvc based application servlets work controllers, jsp's views , database model. homecontroller supposed retrieve names of categories database , forward view (home.jsp). works fine, can display categories in view since i've implemented homecontroller css file have stopped working. ended working controller , awfull view. have no idea problem is. here's significant files: web.xml: <?xml version="1.0" encoding="utf-8"?> <web-app xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xsi:schemalocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" id="webapp_id" version="3.0"> <context-param> <param-name>databaseurl</param

JDBC SQL Server Exception: java.lang.NumberFormatException -

i using minecraft jdbc logging plugin (logblock), automatically parses inputs server name, login, password, , port valid jdbc command. have set server , user using microsoft sql server express 2014 , tested login using this method , told me succeded. can assume error in parsing of inputs. find way not have change source code of plugin, instead edit inputs trick plugin parsing correctly. here's code give plugin: mysql: host: bob\sqlexpress database: minecraft password: testest12/345 user: skrublord9000 port: 3306 bob computer name, sqlexpress server name. can't think it's backwards slash that's causing problem. here's output of jdbc plugin: [logblock] connecting skrublord9000@jdbc:mysql://bob\sqlexpr ess:3306/minecraft?useunicode=true&characterencoding=utf-8... [logblock] error while fetching connection: com.mysql.jdbc.exceptions.jdbc4.mysqlnontransientconnectionexception: cannot loa d connection cl

using HTML div and CSS -

so, html code <head lang="en"> <meta charset="utf-8"> <title>test</title> <link rel="stylesheet" href="style.css" type="text/css"> </head> <body> <div> <div class="header"> <input name="1" value="1" disabled /> </div> </div> and css-file: .header { background-color: yellow; color: green } the problem have, css code isn't changing html, made quick test , put css code in html file , worked. i know that, if use "id" insead of "class" works, task not change html file my problem don't want css code in html file, possible? edit: tried online worked, seems problem of webstorm since set in html file: <link rel="stylesheet" href="style.css" type="text/css"> your style.css file must in same folder html file. also, ;

android - BluetoothAdapter variable not being found? -

Image
hello working on android ble project , running problem can't check if bluetoothadapter variable null? why that. should straight forward? did forget import something?