Posts

Showing posts from 2013

Different results between MySQL and PHP using the LIKE operator -

i trying create search bar on website search users name. when using mysql on database code works fine when use on website results not same. select * `users` username '%neva%' this returns user named nevada. when try on site this. $friendquery = "neva" if(isset($_get['friendquery']) && $_get['friendquery'] != ""){ $friendquery = preg_replace("/[^0-9a-za-z ]/", "", $_get['friendquery']); $friendquery = htmlentities($friendquery); $sql = "select * users username '%$friendquery%'"; $query = mysqli_query($db_connect, $sql); $u = $row["username"]; echo $u; any great thanks

r - Grouping very small numbers (e.g. 1e-28) and 0.0 in data.table v1.8.10 vs v1.9.2 -

i noticed frequency tables created data.table in r seem not distinguish between small numbers , zero? can change behavior or bug? reproducible example: >library(data.table) dt <- data.table(c(0.0000000000000000000000000001,2,9999,0)) test1 <- as.data.frame(unique(dt[,v1])) test2 <- dt[, .n, = v1] as can see, frequency table (test2) not recognize differences between 0.0000000000000000000000000001 , 0 , put both observations in same class. data.table version: 1.8.10 r: 3.02 it worth reading r faq 7.31 , thinking accuracy of floating point represenations. i can't reproduce in current cran version (1.9.2). using r version 3.0.3 (2014-03-06) platform: x86_64-w64-mingw32/x64 (64-bit) my guess change in behaivour related news item. o numeric data still joined , grouped within tolerance before instead of tolerance being sqrt(.machine$double.eps) == 1.490116e-08 (the same base::all.equal's default) significand ro

python - input inside script with Subprocess.call() -

if run git push origin master , asks github username , password. how put these in call() call(['git', 'push', 'origin', 'master']) ? when @ git-push man page, says nothing these being arguments. i switched protocol of repo ssh https. removes need enter password

javascript - Add "highlight" button to ContentEditable -

i'm making little wysiwyg project, , need ability highlight text, click button, , append span around selection class of ".highlight". span have yellow background. this have far elsewhere on appending text instead of html. http://jsfiddle.net/agzvp/ here's js: function wrap(tag) { var sel, range; if (window.getselection) { sel = window.getselection(); if (sel.rangecount) { range = sel.getrangeat(0); selectedtext = range.tostring(); range.deletecontents(); range.insertnode(document.createtextnode('[' + tag + ']' + selectedtext + '[/' + tag + ']')); } } else if (document.selection && document.selection.createrange) { range = document.selection.createrange(); selectedtext = document.selection.createrange().text + ""; range.text = '[' + tag + ']' + selectedtext + '[/' + tag + &#

javascript - Issue with jQuery .animate command -

i using animate command jquery , reason doesn't work: $('#my_div_id').animate({left:'calc(50% + 50px)'}, 1000); is there way around this? i know code works if put '50%', or '50px', want div animate 50% of screen + 50px. thanks in advance! it seem calc cannot animated, fortunately it's easy calculate 50% of width of screen since have power of javascript. $("#my_div_id").animate({left: $("body").width() / 2 + 50 + "px"}, 1000); this assumes #my_div_id positioned relative body (i.e. no relative position ancestory -- otherwise have use that).

constructor - confused about C++ compiler error -

i'm totally confused. posted code in forum (cplusplus) earlier , got don't understand why compiler gave me error , when asked there there no response hoping explain in more detail here. this error: person.cpp: in constructor ‘person::person(qstring)’: person.cpp:12:16: error: no matching function call ‘position::position()’ : m_name(name) as can see code posted below line pointed in error - person.cpp:12:16 - not "‘position::position()’ : m_name(name). this suggested solutions (#2 worked): you didn't specify constructor should used construct m_position compiler assumes want use default constructor (the constructor takes no arguments). problem position doesn't have default constructor why error. there 2 ways can solve this. add default position. specify in person constructor want use existing constructor construct m_position. person::person(qstring name) : m_name(name), m_position("123", "

php - MongoDate aggregation with timezone correction -

i generating report of orders broken down date, month , year using aggregate group function. date stored in mongodate object in utc. '$group' => array ( '_id' => array ( 'year' => array ( '$year' => '$created' ), 'month' => array ( '$month' => '$created' ), 'day' => array ( '$dayofmonth' => '$created' ), ) ) i have tried adding date object using project, seems cannot add mongodate object. (as seen here: https://stackoverflow.com/a/18854229/1069277 ) '$project' => array ( 'created' => array ( '$add' => array ( '$created' => 8 * 60 * 60 * 1000 ) ) ) is adding field stores timezone corrected way achieve @ moment? i go on using date operators aggregation , doing date math in order change timestamp value (which referenced answer doing, not

C++ cashier code -

the question: giving change. implement program directs cashier how give change. program has 2 inputs: amount due , amount received customer. display dollars, quarters, dimes, nickels, , pennies customer should receive in return. what have far: #include <iostream> using namespace std; int main() { double amount_due; double amount_recieved; cout << "enter amount due: " << endl; cin >> amount_due; cout << "enter amount received: "; cin >> amount_recieved; int change = amount_recieved - amount_due; int dollar = 100; int quarters = 25; int dimes = 10; int nickels = 5; int pennies = 1; //return change in full dollars cout << "dollars: " << change % 100 << endl; //return change in quarters cout << "quarters: " << (change % 100) % 25 << endl; //return change in dimes cout << "dimes: " << ((change % 100) % 25) % 10 <<

java - Why can't I use .pollFirst() method for a Set that was initialized as a TreeSet? -

say i've intialized set new treeset : set<integer> foo = new treeset<integer>(); and want use .pollfirst() method, because i'm lazy , don't want have use temp variable because have handy method reduce otherwise 3-4 lines of code 1 line. however, following code, way compile code call foo treeset . while (foo.size() > 1) { int lower = foo.pollfirst(); int higher = foo.pollfirst(); foo.add(higher - lower); } so why java doesn't realize foo treeset ? should cast treeset if didn't want intialize foo treeset ? or better intialize way? further testing casting: while (foo.size() > 1) { int lower = (int) ((treeset) foo).pollfirst(); int higher = (int) ((treeset) foo).pollfirst(); foo.add(higher - lower); } this makes compile without explicitly calling treeset upon intialization. that's because set doesn't define pollfirst() method, defined navig

android - Is it possible to reconnect to the room? -

currently once client has been interrupted phone calls or home button has been pressed user, client disconnected. p.s. implementing google play game service real time multiplayer in real time turn based game, example, pokers, worms. these real time games did not need players response or inside in whole game because turn-based. turn-based api not suit situation since same reason said before. is there way let player reconnect room has not been on yet after being interrupted? if using google play services, not possible player re-enter room after being disconnected. from https://developers.google.com/games/services/common/concepts/realtimemultiplayer#4_participant_connection_phase : gameplay phase once required number of participants game have been connected, app can start gameplay session. after participants have joined game , room "full", players can leave game, no other players can join; not fill spot player has vacated.

c - 3-digit integer number program won't execute -

yes, basic c coding homework problem. no, not looking me. considering first programming class, i'm not surprised can't work, , i'm there plenty wrong it. want pointing out problems in code , things missing can fix them on own. homework question: write program read 1 integer number (your input must 1 3 digit number 100 999), , think of number being abc (where a, b, , c 3 digits of number). now, form number become abc, bca, , cab, find out remainder of these 3 numbers when divided 11. assume remainders respectively x, y, , z , add them x+y, y+z, , z+x. if of these summations odd number, increase 11 if summation plus 11 less 20, otherwise decrease summation 11 (this summation operation must positive number less 20). finally, divide each of sums in half. now, print out resulting digits. my code: #include <math.h> #include <stdio.h> #include <stdlib.h> int main() { //declare variables

javascript - How to disable some drop downs until the first/main drop down is selected? -

i have 4 drop downs in form display results "main" dropdown should selected. question how should disable other dropdowns until user selects option specific dropdown? **main** <select class="form-control" name="make"> <option><option> </select> **others** <select class="form-control" name="model"> <option><option> </select> <select class="form-control" name="year"> <option><option> </select> <select class="form-control" name="price"> <option><option> </select> first disable 3 drop-down menus. , enable them upon changes of main menu simple jquery. working example: http://jsfiddle.net/kny2t/ <select class="form-control" name="make"> <option><option> </select> <select class="form-control" name="model" disabled> <

ios - Interface Builder does not recognize outlet -

it's been awhile since i've used xcode , resumed old project working on awhile ago. created new uitableviewcell subclass. in storyboard, dragged uitableviewcell onto uitableview of uiviewcontroller. changed type of uitableviewcell subclass, when control + drag uitableviewcell subclass uitextfield, doesn't allow me make connection. .h of uitableviewcell custom subclass @property (nonatomic, weak) iboutlet uitextfield *titletextfield; i must going crazy because thought worked. saw in uiviewcontroller there custom subclass uitableview when worked on project last. changed subclass having problem type of uitableviewcell subclass , i'm still not able ctrl+drag make iboutlet connection. missing here? wasn't worked way? there new i'm not aware of? tried using assistant editor drag code, doesn't work either. went uitableviewcell subclass have connection made when last worked on this, , tried ctrl+dragging label again, , doesn't bring menu on ou

jquery - possible to turn content thats scrolling to a fixed position at a current position on page -

i trying find away make 1 page site, the first view of site fixed. each layer scrolls in bottom becomes fixed when take full position of viewport next frame slide in while scrolling. how can this? is possible css? if not jquery plugin can use this? are looking this .header{ width:100%; height:20px; color:white; margin-top:-10px; position:fixed; background-color:#000; } demo fiddle

c# - Month calendar highlights the dates that i dont wont? -

Image
i have created following set of month calendar controls the top set of calendar controls identify th start , end of course feb 2014 month month after feb i have code follows in load() event of form datetime dtsem1 = new datetime(mcsem1start.selectionrange.start.year, 2, 1); datetime dtsem2 = new datetime(mcsem2start.selectionrange.start.year, 6, 1); mcsem1start.selectionstart = dtsem1; mcsem1end.selectionstart = dtsem1.addmonths(1); mcsem2start.selectionstart = dtsem2; mcsem2end.selectionstart = dtsem2.addmonths(1); mcsem1start_datechanged(mcsem1start, new daterangeeventargs(dtsem1, dtsem1)); mcsem2start_datechanged(mcsem2start, new daterangeeventargs(dtsem2, dtsem2)); if can see have set date of first month calendar of top row 1st of feb , seond 1 1st of march. there highlighting beteen dates range did not code highlight them, why hightlights date range , how fix it? thanks when set selectionstart , no selectionend , it's automatically selecting range o

http status code 404 - if-URL-exists check with javascript -

i'm trying create if-file-exists check on url. <!doctype html> <html> <head> </head> <body> <script> function createcorsrequest(method, url) { var xhr = new xmlhttprequest(); if ("withcredentials" in xhr) { xhr.open(method, url, true); } else if (typeof xdomainrequest != "undefined") { xhr = new xdomainrequest(); xhr.open(method, url); } else xhr = null; return xhr; } function urlexists(url) { var http = createcorsrequest('head', url); http.onreadystatechange = function() { if (this.readystate == this.done) { if (this.status == 404) { alert(url + " not available!"); } else if (this.status != 0) { alert(url + " available!"); } } }; http.send(); } urlexists("http://bar.baz"); urlexists("http://google.com"); </script> testing urls </body> </html> currently getting xmlhttprequest can

gamekit - How to play news in TV when i switch on, using scripting language in Unity3D? -

Image
i new in unity3d. need know how can play news in tv when switch on using scripting languages in unity3d you might interested in movietexture. movie textures animated textures created video file. placing video file in project's assets folder, can import video used use regular texture. video files imported via apple quicktime. supported file types quicktime installation can play (usually .mov, .mpg, .mpeg, .mp4, .avi, .asf). on windows movie importing requires quicktime installed. if (input.getbuttondown ("jump")) { if (renderer.material.maintexture.isplaying) { renderer.material.maintexture.pause(); } else { renderer.material.maintexture.play(); } } note: pro/advanced feature only.

ruby - "rails generate rspec:install" fails -

i'm trying run rails generate rspec:install error. i'm using ruby 2.0.0p353 , rails 4.0.3. the error is: /home/adminuser/.rvm/gems/ruby-2.0.0-p353/gems/execjs-2.0.2/lib/execjs/runtimes.rb:51:in autodetect': not find javascript runtime. see https://github.com/sstephenson/execjs list of available runtimes. (execjs::runtimeunavailable) /home/adminuser/.rvm/gems/ruby-2.0.0-p353/gems/execjs-2.0.2/lib/execjs.rb:5:in ' /home/adminuser/.rvm/gems/ruby-2.0.0-p353/gems/execjs-2.0.2/lib/execjs.rb:4:in <top (required)>' /home/adminuser/.rvm/gems/ruby-2.0.0-p353/gems/uglifier-2.4.0/lib/uglifier.rb:3:in require' /home/adminuser/.rvm/gems/ruby-2.0.0-p353/gems/uglifier-2.4.0/lib/uglifier.rb:3:in <top (required)>' /home/adminuser/.rvm/gems/ruby-2.0.0-p353@global/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in require' /home/adminuser/.rvm/gems/ruby-2.0.0-p353@global/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in

sharepoint - Always prompting of log in information for users -

i have requirement prompting of log in information users in sharepoint site rather taking logged in credentials. any idea?? depending on setup have. remove sharepoint site trusted sites or local intranet under ie's security tab using group policy. cause prompt every time go site. you need reverse steps found here regards, vince

javascript - Diasble DiV on form load and enable the DIV on buttonClick using Jquery -

i have form in mvc, has button visible , div tag supposed not visible on form load. on click of button, want make content of div tag visible. here, code>> <form id="displaycomment" onload="hidetextbox()" > <label> comment </label> <input type="button" id="submit" name="submit" value="add comment" onclick="opentextbox();"/> <div id="managetextbox" > <input type="text" id="commentbox" name="entercomment" value="" /><br /> <input type="button" id="addcomment" name="addcomment" value="submit"/> <input type="button" id="cancelcomment" name="cancelcomment" value="cancel"/> </div> </form> i have 2 jquery , disable div tag on form load , on button

Loops not incrementing correctly in C -

hello i'm new c i'm using c99 compile , i'm making program prints different shapes using *. i'm having issue making diagonal line here code i'm using while loop nested loop inside of switch statement. if tell there 5 * 3 in return , if give number 7 4. spacing works correctly isn't finishing out loop. any great! case 'd': printf("size: "); scanf("%d", &num); index =0; while (index<=num){ // makes spaces (int i=0; i<num-1; i++){ printf(" "); } printf("*"); printf("\n"); num--; index++; } break; input size: 5 output: * * * try code below.. shoud draw diagonal you. changes: while (index<num){ while condition edited. for (int i=index-1; >= 0; i--) for edited index 0. num--; not required. while (index<num){ // makes spaces (int i=index-1; >= 0

unable to redirect using nginx to another domain -

hey changed domain name domain1.ourapp.com domain2.ourapp.com i redirect requests domain1.ourapp.com domain2.ourapp.com using nginx conf. want browser url change. in nginx conf have following server { listen 80; rewrite ^ https://$host$request_uri? permanent; } server { server_name domain1.ourapp.com; rewrite ^ $scheme://domain2.ourapp.com$request_uri permanent; } server { listen 443 ssl; server_name domain2.ourapp.com # rest of stuff } the trouble urls domain1.ourapp.com return right response there browser redirection happening. in regard.

cloud - Error on running BSplines example in PCL 1.7 -

why receiving following error, when running 'fitting trimmed b-splines unordered point clouds' example point cloud library(pcl) tutorials, same cmakelists file? pcl : 1.7.1(compiled source @ /usr/local/include/pcl-1.7.1/pcl/) os : ubuntu 12.04 cmakefiles/bspline_fitting.dir/bspline.cpp.o: in function `main': bspline.cpp:(.text+0x282):` undefined reference `pointcloud2vector3d(boost::shared_ptr<pcl::pointcloud<pcl::pointxyz>` >, std::vector<eigen::matrix<double, 3, 1, 0, 3, 1>, eigen::aligned_allocator<eigen::matrix<double, 3, 1, 0, 3, 1> > >&)' bspline.cpp:(.text+0xb41): undefined reference `visualizecurve(on_nurbscurve&, on_nurbssurface&, pcl::visualization::pclvisualizer&)' collect2: ld returned 1 exit status make[2]: *** [bspline_fitting] error 1 make[1]: *** [cmakefiles/bspline_fitting.dir/all] error 2 make: *** [all] error

php - Why the form submitted using AJAX is redirecting to next page and the error/success messages are not displayed into alert on the same page? -

i'm using php, smarty, jquery, ajax, etc. website.following html code of form i'm submitting using ajax: <form name="question_issue_form" id="question_issue_form" action="http://localhost/xyz/pqr/web/control/modules/questions/question_issue.php"> <input type="hidden" name="form_submitted" id="form_submitted" value="yes"/> <input type="hidden" name="op" id="op" value="question_issue"/> <input type="hidden" name="question_id" id="question_id" value="35718"/> <table class="trnsction_details" width="100%" cellpadding="5"> <tbody> <tr> <td></td> <td> <input type="checkbox" name = "que_issue[]" value = "question wrong" id =&qu

android - How to make Circular Logo in Action Bar? -

Image
my requirement make circular icon actionbar . used custom view display circular image(you can see in screenshot.) want use home icon(in case, green android icon) circular image. how can make home icon circular image?? note: in case i'm downloading images server , setting actionbar using setlogo() or seticon() method. make image default logo of application. change in manifest file or drawable folder.

Python lamba function to convert to a dictionary? -

i having list of dictionary representation follows: a = [{'score': 300, 'id': 3}, {'score': 253, 'id': 2}, {'score': 232, 'id': 1}] i new python , need python lambda function through output : dict = [{3:300}, {2:253}, {1:232}] so can find value given key >>> print dict[3] >>> 300 i appreciate on this. don't use dict variable name, because shadow builtin type name dict ; {3, 300} not dictionary, {3:300} is; you can use dict comprehension : in [6]: dic = {d['id']: d['score'] d in a} in [7]: dic out[7]: {1: 232, 2: 253, 3: 300} or dict constructor @jon mentioned backward compatibility since dict-comp available on py2.7+ : in [12]: import operator ...: dict(map(operator.itemgetter('id', 'score'), a)) out[12]: {1: 232, 2: 253, 3: 300}

internet explorer - Sharepoint Upload Multiple Document Option Gray Out -

to enable sharepoint 2010 upload multiple document option stsupld uploadctl must enabled in add on. clients getting multiple upload option grayed out. so checked systems of client have issue. on of systems there stsupld.dll present stsupld uploadctl class not listed under add-on in internet explorer. thing more needed after installation of office install add on. please suggest....

javascript - Drilling down many levels (children and decendants) with jquery to get text -

trying drill down , name within table element. have id name table. best way of drilling down great-great nesting element desired span , , text ins ? html ....<ins id="target"></ins>... <table id="names"> <tbody> <tr>...</tr> <tr> <td>..</td> <td>..</td> <td> <img /> <button>...</button> <span>text get</span> </td></tr></tbody></table> incomplete jquery: $(document).ready(function() { $("#target").text($("#names>tbody>???drilldown???).text()); }); try $("#names").find('span').text(); check demo here jsfiddle

asp.net - select Query with AND Condition -

i want select user cant . here's query sqlcommand mycommand = new sqlcommand("select * users email=" + useremailpass.email + "and password=" + useremailpass.password, conn); sqldatareader detailsreader = mycommand.executereader(); is query correct or not>? please help if email , password string fields need encapsulate values used comparison in single quotes, correct way use parameterized query sqlcommand mycommand = new sqlcommand("select * users " + "where email=@mail , password=@pwd" conn); mycommand.parameters.addwithvalue("@mail",useremailpass.email); mycommand.parameters.addwithvalue("@pwd",useremailpass.password); sqldatareader detailsreader = mycommand.executereader(); if use parameterized query avoid sql injection problem , don't have worry encapsulate string values quotes, doubling them if values contain quote, not mention appropriate decim

CSS3 animation transform rotate with no visible transition -

Image
so, have image: i'd rotate on hover, give illusion of squares animating different colours. however, had settle for: .logo:hover { transform: rotate(90deg); } as if used animation , keyframes % step, physically see logo rotate, i'd snap next deg value, if possible. how infinitely on hover? you can use timing-functions steps , @-webkit-keyframes rotate { { -webkit-transform: rotate(0deg); } { -webkit-transform: rotate(360deg); } } .logo:hover { -webkit-animation: rotate 1s infinite steps(2, start); } http://jsfiddle.net/g3m2c/ https://developer.mozilla.org/en/docs/web/css/timing-function

javascript - Generating div on the fly with jQuery fails to load picture -

i using jquery diplay dialog on page. div written in html, , show or hide when need jquery (open/close of .dialog() method). "issue" div loaded @ start of page , if not visible, markup still visible in source. generate dive on fly when click on button only. here div : <div class="dialog" id="uploaddialog" title="uploading..."> <div> file <i><span id="fileinfo"></span></i> being uploaded<br /> <b>estimate time </b><span id="temps"></span><br /><br /> <b>please wait</b><br /><br /> <i>this window willclose automatically @ end of upload</i> </div> <table width="100%"> <tr> <td width="33%"></td> <td width="33%" align="left"> <img alt="loading..."

php - Custom Template styling in Wordpress Theme -

i made custom template , added widget area meant custom template. page custom template listens .css command. body.full-width .site-content width=100% this causes site-content push away sidebar. have sidebar next content. right @ right (good) below content (bad). of course, when comment out aforementioned command in css page looks great rest of pages (who use full-width) logically affected well... can help? have little coding experience... thanks, these magic words (to go in child theme style.css): body.page-template-page-templatescustom-php .site-content { width: 65.104166667%; }

Excel formula to sum row until blanks in columns -

Image
i looking sum set of cells in row based on other row value or until blank column found in same row. please refer below table example. b c d e f g h j values sum 1 1 1 2 3 1 1 helper 1 0 0 1 0 0 0 1 0 1 output required 1 2 6 1 i need formula in last row(output). formula should able sum until blank column in first row or until 1 in helper row. example: in a1, value 1 output in a3 1. in h2 when value 1 helper row, in h3 should sum f1+g1+h1 = 6. formula sum can either use helper row or blanks in first row. hope there formula result. if comfortable sum appearing @ start of break, can try formula: =if(a2="..",sum(offset(b2,,,,(match("..",b2:$y$2,0)))),"") you not needing helper row formula!! press ctrl+shift+enter execute data in a1:y3

cakephp set values to model before saving form data -

i'm learning cakephp. want submit form data database , before saving, wish modify few fields. here tried: public function addproduct() { $this->layout = false; $this->render ( false ); $this->loadmodel ( 'product' ); $this->product->create(); $conditions = array('product.category_id' => $this->request->data["categoryproduct"], 'product.company_id' => $this->request->data["companyproduct"], 'product.name' => $this->request->data["name"] ); $product = $this->product->find ( 'first', array ('conditions' => $conditions ) ); if ($product) echo "duplicate"; else{ $discount = $this->request->data["discount"]; if($discount>0){ $cost = $this->request->data["cost"];

java ee - jsp request/response timeout implementation -

i calling web service (jsp page) returns data me. have timeout because takes long time respond. proper way achieve that? how can set both request timeout , response timeout? these achieved session.setmaxinactiveinterval() ? my jsp page looks `public jsonobject performlogic(jsonobject state, map additionalparams) throws exception { string callingsystem = state.getstring("caller"); string cli = state.getstring("cli"); string taxnumber = state.getstring("taxnumber"); posdatareaderservice posservice = new posdatareaderservice(); posdatareader pos = posservice.getposdatareadersoapport(); orderdatarequest orderdatarequest = new orderdatarequest(); orderdatarequest.settaxnumber(taxnumber); caller caller = new caller(); caller.setcallingsystem(callingsystem); orderdataresponse orderdataresponse = pos.getorderdata(orderdatarequest, caller); jsonobject result = new jsonobject(); result.put("var_ws_passportstatuscode", orderdataresponse.getpas

php - How to store version number in MySQL database -

i want store version number of application in mysql database ex: version 1.1.0 1.1.1 1.1.2 which data type should use. you have 2 options: use varchar use 3 numeric fields, major, minor, patch use both. each option has advantages , disadvantages. option 1 1 field, it's easy version. isn't sortable, since 2.0.0 lexicographically higher 10.0.0. option 2 sortable, have 3 fields. option 3 can implemented using view: table tversion ( major number(3), minor number(3), patch number(3) ) view vversion select major || '.' || minor || '.' || patch version, major * 1000000 + minor * 1000 + patch sortorder tversion;

parameters - Paramaters with the same value - android -

i have listview shows paramaters. 2 of parameters returns same value? how can differentiate two? email , voucher. voucherobj obj = new voucherobj(); obj.customerid=item[0]; obj.type=item[1]; obj.name=item[2]; obj.searchstr=item[3]; <---- same parameter obj.searchstr=item[4]; <---- same parameter obj.branch=item[5]; obj.issued=item[6]; obj.expiration=item[7]; obj.status=item[8]; obj.vouchername=item[9]; obj.employeeid=item[10]; items.add(obj); voucher.class public class voucherobj { public string customerid=""; public string type=""; public string name=""; public string email=""; public string voucher=""; public string branch=""; public string issued = ""; public string expiration=""; public string status = ""; public string vouchername = ""; public string employeeid = ""; public string searchstr; } if you'll have stati

paypal - 403 Forbidden during setExpressCheckout -

i getting following error during expresscheckout in sandbox account using setexpresscheckout method. using soap library paypal_base.jar , paypal_stubs.jar pm com.paypal.sdk.exceptions.transactionexception <init> severe: (403)forbidden anyone me resolve issue? please refer to https://www.paypal-notify.com/eventnotification/event_details?eventid=4283 . can try use "org.apache.axis.transport.http.commonshttpsender" in axis support http1.1. have use axis 1.3 or more 1.2 has bug https connection

post value in perl cgi and HTML not inserting properly -

i new perl , using perl in end script , html in front end , cgi framework . reading details flat file , displaying them . trying print details in form of checkboxes. using use data::dumper; module check values . input value of last checkbox has space shown below print '<form action="process.pl " method="post" id="sel">'; print '<input type="checkbox" onclick="checkedall()">select all<br />'; foreach $i (@robos) { print '<input type="checkbox" name="sel" value="'; print $i; print '">'; print $i; print '<br />'; } print '<input type="submit" value="submit">'; print '</form>'; print "response " . dumper \$data; however in process.pl selected value retrieved using @server = $q->param('sel'); but response of selection print "r

php - Cakephp routing to alternative login screen -

i have cakephp application , 1 of clients wants own login screen users. when login see logo of clients' company. i tried solve problem adding new route routes.php : router::connect('/client', array('controller' => 'users', 'action' => 'loginclient', 'home')); so able type businesslearning.nl/client go login screen of company. in users_controllers.php copied login action, changed name 'loginclient' , added loginclient layout it. i created loginclient layout. this looked bit overkill me don't know of other possibility solve this. and unfortunately didn't work: error: requested address '/client' not found on server.

php - Cannot list the data in my Aandroid application from Mysql -

am new in android development. trying database crud operation in android application. can insert data mysql.am using php , json parsing it.when data inserted database, next activity should listing data.the problem no data coming listing activity. activity coming without data. kindly me . here in code , trying display 3 data , "name, price, description. php file retrieve data database mysql , , convert strings json objects. javacode call json class , list data. can insert data mysql.am using php , json parsing it.when data inserted database, next activity should listing data.the problem no data coming listing activity. activity coming without data. java code listing products is public class allproductsactivity extends listactivity { // progress dialog private progressdialog pdialog; // creating json parser obje