Posts

php - Select data from SQL database and display in table does not work -

Image
i don't understand why isn't working, have been stuck on ages , tried lots of different alternatives, doesn't print data database. at moment trying id print, want print of data in database (not including hash). here code: <!doctype html> <html> <head> <title>staroids leaderboard</title> </head> <body> <table border=1px> <thead> <tr> <td>name</td> <td>score</td> </tr> </thead> <tbody> <?php $connect = mysql_connect("localhost","root", "password"); if (!$connect) { die(mysql_error()); } mysql_select_db("staroids"); $results = mysql_query("select id scores"); while($row = mysql_fetch_array($results)) { $nam...

shell - Executables deployment in multiple servers regularly -

if there code base , many servers, how should deploy executable in multiple servers regularly? need script this there many system management tools. chef use, great there bit of learning curve. may want os's default package manager , distribute packages of code base.

Android ListView summary -

i'm using listactivity in usual way: load arraylist of item database , use custom adapter show data. display listview (each row item ): date field1 field2 ... fieldn 2012/03/02 ... ... ... 2012/03/02 ... ... ... 2012/03/02 ... ... ... 2012/04/07 ... ... ... what want show row summary grouping date. example, want display previous list next one: date field1 field2 ... fieldn ** 2012/03/02 3 rows 2012/03/02 ... ... ... 2012/03/02 ... ... ... 2012/03/02 ... ... ... ** 2012/04/07 1 row 2012/04/07 ... ... ... so, question how can it? need implement own listview? or there feature of listview don't know yet? use expandablelistview instead, "** 2012/03/02 3 rows" , "** 2012/04/07 1 row" parent items , rest children items. here place can up: http://developer.android.com/reference/android/widget/expan...

sql - Trying to show zero instyead of #Error in visual studio -

Image
in visual studio want state if calculation box blank due there being no figures available on particluar project, show zero. my calculation simple: =(reportitems!textbox21.value) / (reportitems!textbox19.value) for wrote iif statement: =iif( isnothing(reportitems!textbox21.value) or isnothing(reportitems!textbox19.value), 0, ((reportitems!textbox21.value)/(reportitems!textbox19.value))) but still shows #error if there blank in either of textbox 21 or 19. see below picture. can advise on how fix this? can try use isnumeric instead of isnothing, =iif(isnumeric(reportitems!textbox21.value) , isnumeric(reportitems!textbox19.value),((reportitems!textbox21.value)/(reportitems!textbox19.value)), 0)

c# - Paying using PayPal account without redirection to PayPal's website -

let me explain situation. have mobile application allows user enter credit card details , make payment using paypal direct payment api. mobile application not operate using browser works via web services framework. i thinking of adding option. user enters paypal username , password mobile application. mobile application should make request paypal, buyer's paypal username , password passed parameters in addition transaction details. however, buyer should stay on mobile application. should not redirected paypal's website or other website. is possible? if yes, version of paypal api need use? thank in advance. i don't believe possible, paypal client should never have access username/password, , user confirms payment on paypal website itself

java - Thread.interrupt() Confusion -

i reading interrupts oracle docs. unable figure out following part. states that what if thread goes long time without invoking method throws interruptedexception? must periodically invoke thread.interrupted, returns true if interrupt has been received. example: for (int = 0; < inputs.length; i++) { heavycrunch(inputs[i]); if (thread.interrupted()) { // we've been interrupted: no more crunching. return; } } i scratching head understand, mean if thread goes long time without invoking method throws interruptedexception? secondly, usage of thread.interrupted(), way, thread can send interrupt itself? whats practical usage of scenario? thanks. this technique keep thread available interruption. thread.interrupted() : checks whether present thread (itself) interrupted other thread , clears interrupted status flag. asks whether interrupted exit doing while performing big big task , not listening someone. imagine have happened...

android - StrictMode.ThreadPolicy.Builder Purpose and Advantages? -

i referred strictmode.threadpolicy.builder android document strictmode.threadpolicy.builder . i have no clear idea strictmode.threadpolicy.builder . when have use class strictmode.threadpolicy.builder . what advantage , purpose of strictmode.threadpolicy.builder . i want detailed explanation for strictmode.threadpolicy policy = new strictmode.threadpolicy.builder() .detectall() .penaltylog() .build(); strictmode.setthreadpolicy(policy); the advantages of defining stictmode policies within application force you, in development phase, make application more behaved within device running on: avoid running consuming operation on ui thread, avoids activity leakages, , one. when define these in code, make application crashes if defined strict polices has been compromised, makes fixes issues you've done (the not behaved approaches, network operations on ui thread). i following first when start new project: public class myapplication extends application { private s...