Posts

html - javascript text doesn't display -

i making simple program "find largest number". problem is, can't display output of answer. there wrong on code? thanks <html> <head> <title> short lab activity 1 </title> <style> #compute{ text-align: center; } </style> </head> <body> <div id="compute"> input 1st number: <input type="integer" id="num1" size="20"/> </br></br> input 2nd number: <input type="integer" id="num2" size="20"/> </br></br> answer: <input type="integer" id="answer" size="20"/> </div> <center><input type="button" id="find" value="find largest" onclick()="find()"/></center> <script type="text/javascript"> function find() { var numb1 = document.getelementbyid("num1").value; var numb2 = document.get...

mysql - Wildcard query in PHP renders in SQL not in PHP -

i've been fiddling query in php day or 2 now. i'm using php 5.4 mysql 5.6. query below works fine in sql, doesn't work in php. i've googled answer , searched stack overflow wildcard answers in php , sql. quite thorn in side @ moment why not working. $search_string = preg_replace("/[^a-za-z0-9]/", " ", $_post['query']); $search_string = mysql_real_escape_string($search_string); $query = 'select * population location "'.$search_string.'%"'; let me know if need anymore information - i'm using phpmyadmin sql if helps. thanks edit: i'm trying wildcard search database of cities first 2 characters typed 'al' should produce autocomplete cities starting 'al'. if include both wildcard in front %'.$search_string.'%"'; autocomplete expected (finding matching characters ever might in string), if remove first % returns "no results." update: $query = 'select ...

c# - Messagepack, CSharp and Abstract Classes -

i have following code: _serializerresponse = messagepackserializer .get<abstractwebresponse>(); and try messagepackserializer! but gives me following error: this operation not supported because 'abstractwebresponse' cannot instanciated. yes, abstractwebresponse can not instaciated, it's child classes wich try serialize (and deserialize) can! , need so, because don't know type of class @ deserialization time! not transmited in data stream works?

c++ - Indy TCP/IP Server with Client using Chilkat Library -

im trying use client chilkat library since client has written in visual c++ , not borland c++(c++builder). connecting work try send string client server doesn't hit idtcpserverexecute function. possible use library client server using? if so, how? edit: got working client sends string server. handle client message this: unicodestring message = acontext->connection->socket->alldata(); instead of: unicodestring message = acontext->connection->socket->readln(); now there simliar option send response string server? if (idhttp->get ("http://*/index.php?option=com_bookpro&controller=customer&task=bpajaxlogin&username=" + sltokens->strings[1] + "&password=" + sltokens->strings[2] + "&product_id=" + class) == "true") { addlog("1"); char* response = "test"; acontext->connection->socke...

maven - mvn release - svn error while tagging -

while trying execute release:prepare goal, following failure : ... [info] checking in modified poms... [info] svn commit directory: c:\dev\eclipse\workspace\xxx-parent [info] tagging release label xxx-parent-0.0.1... [info] svn checkout directory: c:\dev\eclipse\workspace\xxx-parent [info] ------------------------------------------------------------------------ [info] build failure [info] ------------------------------------------------------------------------ [info] total time: 16.603s [info] finished at: thu oct 22 14:43:44 cest 2015 [info] final memory: 10m/244m [info] ------------------------------------------------------------------------ [error] failed execute goal org.apache.maven.plugins:maven-release-plugin:2.5.3:prepare (default-cli) on project xxx-parent: unable tag scm [error] provider message: [error] svn tag failed. [error] command output: [error] svn: commit failed (details follow): [error] svn: commit blocked pre-commit hook (exit code 1) output: [error] message m...

java - Tracking which HashMap values have been returned -

i have large hashmap<integer, myobject> located on server. need send string myobject across network client. problem can't figure out way keep track of myobject has been accessed send string . i'd client can repeatedly call server's function retrieve string , client can add string s arraylist . server indicate string s have been sent returning null . i can't send arraylist<string> of string s limited tiny message size due use of rsa encryption. the way i've thought of far keep static instance variable hashset<integer> holds of accessed myobject s. mean i'd have cross reference hashmap hashset every lookup. there must better way. this tiny example of map keeps track of keys did accessed. basicly has overriden get method of hashmap , additionaly adds key did accessed set import java.util.hashmap; import java.util.hashset; import java.util.set; public class trackmap<k, v> extends hashmap<k,v>{ priva...

java - how to get some value from url using jstl -

i have 2 forms have same-url action , following form on page http://www.domain.com/pre-foo-url , is <form:form commandname="some" class="form" action="/app/same-url"> <form:input path="title"/> <input type="hidden" name="redirect" value="foo"/> <button>ok</button> </form:form> and other form on http://www.domain.com/bar/{id} <form:form commandname="some" class="form" action="/app/same-url"> <form:input path="tile"/> <input type="hidden" name="redirect" value="bar"/> <button>ok</button> </form:form> two methods in controller, 1 deciding redirect to @requestmapping(value = "/same-url", method = requestmethod.post) public string handleredirect(@requestparam("redirect") string redirect) { if (redirect.equals("foo...