Posts

php - How to send SQL count data & array data together? -

i have script designed print out values of students have accrued more 3 tardies. want script print out both student name, , amount of times they've been tardy, far i've been able print out names following script: $sql = "select distinct studentid,classid,date attendance_main status = 'tardy' , classid '%adv%'"; $result = mysql_query($sql) or die (mysql_error()); while($row=mysql_fetch_array($result)) { $studentid = $row['studentid']; $sql2 = "select distinct studentid,classid,date attendance_main studentid = '$studentid' , status = 'tardy' , classid '%adv%'"; $result2 = mysql_query($sql2) or die (mysql_error()); while($row2=mysql_fetch_array($result2)) { $tardycount = mysql_num_rows($result2); $studentid = $row2['studentid']; if($tardycount >= 3) { $sql3 = "select * students rf...

How to send multiple items to PayPal -

i want send multiple item names , item prices paypal unable post item name , price below code can please me? <form method="post" name="cart" action="https://www.sandbox.paypal.com/cgi-bin/webscr"> <input type="hidden" name="cmd" value="_xclick"> <input type="hidden" name="business" value="navive_1295939206_biz@gmail.com"> <input type="hidden" name="lc" value="us"> <input type="hidden" name="currency_code" value="usd"> <input type="hidden" name="button_subtype" value="services"> <input type="hidden" name="notify_url" value="http://newzonemedia.com/henry/ipn.php" /> <input type="hidden" name="bn" value="pp-buynowbf:btn_buynowcc_lg.gif:nonhosted"> <input type=...

python - Django: Uploading photo and word doc on same form not working correctly -

i have upload form allow user upload photo, word doc, or both. need logic long have photo or document selected uploading, form valid , upload work. works when have both photo , doc, appears randomly work when it's photo or document. here current code: def upload(request): """ uploads document/photo """ if request.method == 'post': form1 = documentform(request.post, request.files) form2 = photoform(request.post, request.files) if form1.is_valid() , form2.is_valid() : post1 = document(user = request.user, document= form1.cleaned_data['document'], title = form1.cleaned_data['title']) post1.save() post2 = photo(user = request.user, alias = request.user.username, img = form2.cleaned_data['img'], title = "") post2.save() return httpresponse(template.template(''' <html><head><title>uploaded</title></...

c# - Most efficient way to reverse the order of a BitArray? -

i've been wondering efficient way reverse order of bitarray in c#. clear, don't want inverse bitarray calling .not(), want reverse order of bits in array. cheers, chris public void reverse(bitarray array) { int length = array.length; int mid = (length / 2); (int = 0; < mid; i++) { bool bit = array[i]; array[i] = array[length - - 1]; array[length - - 1] = bit; } }

android - App Freez and UI Blocking -

hy! i have 2 classes: main: public class main extends activity { /** called when activity first created. */ @override public void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); //setcontentview(r.layout.main); startactivityforresult(new intent(main.this, login.class), 1); } } login: public class login extends activity{ progressdialog pd = null; @override protected void oncreate(bundle savedinstancestate) { // todo auto-generated method stub super.oncreate(savedinstancestate); setcontentview(r.layout.login); final edittext user = (edittext)findviewbyid(r.id.login_etuser); final edittext pw = (edittext)findviewbyid(r.id.login_etpw); button btlogin = (button)findviewbyid(r.id.login_btlog); final thread thread = new thread (){ public void run() { try { string result = "...

objective c - how to receive object (on iphone side)returned by webservice? -

in xcode want call webservice return value object ? 1. soap message call web service ? 2. how xcode receive object , use? right have 1 method return string , know how call use of soap, dont know if change in case of object.. thank in advance generally webservice has return kind of standard xml. if webservice conforms strictly soap return soap-xml message like: <?xml version="1.0"?> <soap:envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope"> <soap:header> </soap:header> <soap:body> <m:getstockprice xmlns:m="http://www.example.org/stock"> <m:stockname>ibm</m:stockname> </m:getstockprice> </soap:body> </soap:envelope> for more information see soap on wikipedia

cluster computing - Programming through PBS -

i want schedule program on multiple nodes how can so.im new programming got hint pbs.how can following. in advance if have particular problem, should describe in question. if have no idea how deal pbs, should read following: http://www.phy.bme.hu/~cluster/docs/pbs.html http://www.adaptivecomputing.com/resources/docs/torque/index.php (section 2) once again, advise post complete description of want submit on cluster (kind of job, input data, output data, number of jobs, ...), can bit more.