Search Results

Search found 107 results on 5 pages for 'row1'.

Page 1/5 | 1 2 3 4 5  | Next Page >

  • passing values to php print page

    - by DAFFODIL
    In this wen i select a value in drop down box it will list out that name value in table .There will be a check box ,the checked values should be passed to pring page which is below the 1st part of code. Any help ii be appreciated <?php $con = mysql_connect("localhost","root",""); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("form1", $con); error_reporting(E_ALL ^ E_NOTICE); $nam=$_REQUEST['select1']; $row=mysql_query("select * from inv where name='$nam'"); while($row1=mysql_fetch_array($row)) { $Name=$row1['Name']; $Address =$row1['Address']; $City=$row1['City']; $Pincode=$row1['Pincode']; $No=$row1['No']; $Date=$row1['Date']; $DCNo=$row1['DCNo']; $DcDate=$row1['DcDate']; $YourOrderNo=$row1['YourOrderNo']; $OrderDate=$row1['OrderDate']; $VendorCode=$row1['VendorCode']; $SNo=$row1['SNo']; $descofgoods=$row1['descofgoods']; $Qty=$row1['Qty']; $Rate=$row1['Rate']; $Amount=$row1['Amount']; } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Untitled Document</title> <script type="text/javascript"> function ram() { var q=document.getElementById('qty').value; var r=document.getElementById('rate').value; document.getElementById('amt').value=q*r; } </script> </head> <body> <form id="form1" name="form1" method="post" action=""> <table width="1315" border="0"> <script type="text/javascript"> function g() { form1.submit(); } </script> <tr> <th>Name</th> <th align="left"><select name="select1" onchange="g();"> <option value="" selected="selected">select</option> <?php $row=mysql_query("select Name from inv "); while($row1=mysql_fetch_array($row)) { ?> <option value="<?php echo $row1['Name'];?>"><?php echo $row1['Name'];?></option> <?php } ?> </select></th> </tr> <tr> <th>Address</th> <th align="left"><textarea name="Address"><?php echo $Address;?></textarea></th> </tr> <tr> <th>City</th> <th align="left"><input type="text" name="City" value='<?php echo $City;?>' /></th> </tr> <tr> <th>Pincode</th> <th align="left"><input type="text" name="Pincode" value='<?php echo $Pincode;?>'></th> </tr> <tr> <th>No</th> <th align="left"><input type="text" name="No2" value='<?php echo $No;?>' readonly="" /></th> </tr> <tr> <th>Date</th> <th align="left"><input type="text" name="Date" value='<?php echo $Date;?>' readonly="" /></th> </tr> <tr> <th>DCNo</th> <th align="left"><input type="text" name="DCNo" value='<?php echo $DCNo;?>' readonly="" /></th> </tr> <tr> <th>DcDate:</th> <th align="left"><input type="text" name="DcDate" value='<?php echo $DcDate;?>' /></th> </tr> <tr> <th>YourOrderNo</th> <th align="left"><input type="text" name="YourOrderNo" value='<?php echo $YourOrderNo;?>' readonly="" /></th> </tr> <tr> <th>OrderDate</th> <th align="left"><input type="text" name="OrderDate" value='<?php echo $OrderDate;?>' readonly="" /></th> </tr> <tr> <th width="80">VendorCode</th> <th width="1225" align="left"><input type="text" name="VendorCode" value='<?php echo $VendorCode;?>' readonly="" /></th> </tr> </table> <table width="1313" border="0"> <tr> <td width="44">&nbsp;</td> <td width="71">SNO</td> <td width="527">DESCRIPTION</td> <td width="214">QUANTITY</td> <td width="214">RATE/UNIT</td> <td width="217">AMOUNT</td> </tr> <?php $i=1; $row=mysql_query("select * from inv where Name='$nam'"); while($row1=mysql_fetch_array($row)) { $descofgoods=$row1['descofgoods']; $Qty=$row1['Qty']; $Rate=$row1['Rate']; $Amount=$row1['Amount']; ?> <tr> <td><input type="checkbox" name="checkbox" value="checkbox" /></td> <td><input type="text" name="No" value='<?php echo $No;?>' readonly=""/></td> <td><input type="text" name="descofgoods" value='<?php echo $descofgoods;?>' /></td> <td><input type="text" name="qty" maxlength="50000000" id="qty"/></td> <td><input type="text" name="Rate" value='<?php echo $Rate;?>' id="rate" onclick="ram()";></td> <td><input type="text" name="Amount" id="amt"/></td> </tr> <?php $i++;} ?> <tr> <th colspan="2"><a href="pp.php?msg=<?php echo $nam;?>">Print</a></th> </tr> </table> <label></label> </form> </body> </html> - <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title></title> <script type = "text/javascript"> function a() { var q = document.getElementsByName('Amount'); var count = 0; for (i = 0; i < q.length; i++) count += parseInt(q[i].value,10); document.getElementById('s').value = count; } </script> </head> <?php $con = mysql_connect("localhost","root",""); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("form1", $con); error_reporting(E_ALL ^ E_NOTICE); $nam=$_GET['msg']; $row=mysql_query("select * from inv where Name='$nam'"); while($row1=mysql_fetch_array($row)) { $Name=$row1['Name']; $Address =$row1['Address']; $City=$row1['City']; $Pincode=$row1['Pincode']; $No=$row1['No']; $Date=$row1['Date']; $DCNo=$row1['DCNo']; $DcDate=$row1['DcDate']; $YourOrderNo=$row1['YourOrderNo']; $OrderDate=$row1['OrderDate']; $VendorCode=$row1['VendorCode']; $SNo=$row1['SNo']; $descofgoods=$row1['descofgoods']; $Qty=$row1['Qty']; $Rate=$row1['Rate']; $Amount=$row1['Amount']; } ?> <body> <form id="form1" name="form1" method="post" action=""> <table width="846" border="0"> <tr> <td width="411" height="113">&nbsp;</td> <td width="412">&nbsp;</td> </tr> </table> <table width="846" border="0"> <tr> <td height="38">&nbsp;</td> </tr> </table> <table width="846" border="0"> <tr> <td width="390" rowspan="4">&nbsp;</td> <td width="92" height="35">&nbsp;</td> <td width="136"><?php echo $No;?></td> <td width="36">&nbsp;</td> <td width="170"><?php echo $Date;?></td> </tr> <tr> <td height="37">&nbsp;</td> <td><?php echo $DCNo;?></td> <td>&nbsp;</td> <td><?php echo $DcDate;?></td> </tr> <tr> <td height="34">&nbsp;</td> <td><?php echo $YourOrderNo;?></td> <td>&nbsp;</td> <td><?php echo $OrderDate;?></td> </tr> <tr> <td height="29">&nbsp;</td> <td><?php echo $VendorCode;?></td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> </table> <table width="845" border="0"> <tr> <td height="38">&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td width="34">&nbsp;</td> <td width="457">&nbsp;</td> <td width="104">&nbsp;</td> <td width="79">&nbsp;</td> <td width="149">&nbsp;</td> </tr> <?php $i=1; $row=mysql_query("select * from inv where Name='$nam'"); while($row1=mysql_fetch_array($row)) { $descofgoods=$row1['descofgoods']; $Qty=$row1['Qty']; $Rate=$row1['Rate']; $Amount=$row1['Amount']; ?> <tr> <td><?php echo $i;?></td> <td><?php echo $descofgoods;?></td> <td><?php echo $Qty;?></td> <td><?php echo $Rate;?></td> <td><input name="Amount" type = "text" value="<?php echo $Amount; ?>" /></td> </tr> <?php $i++;} ?> </table> <table width="844" border="0"> <tr> <td width="495" height="1065">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <input type="text" name="textfield2" width="150" /> &nbsp; &nbsp; &nbsp; &nbsp; </td> <td width="191">&nbsp;</td> <td width="144"><input type="text" name="to" id="s" onclick="a()";/></td> </tr> </table> </form> </body> </html>

    Read the article

  • Python 2.7.3 memory error

    - by Tom Baker
    I have a specific case with python code. Every time I run the code, the RAM memory is increasing until it reaches 1.8 gb and crashes. import itertools import csv import pokersleuth cards = ['2s', '3s', '4s', '5s', '6s', '7s', '8s', '9s', 'Ts', 'Js', 'Qs', 'Ks', 'As', '2h', '3h', '4h', '5h', '6h', '7h', '8h', '9h', 'Th', 'Jh', 'Qh', 'Kh', 'Ah', '2c', '3c', '4c', '5c', '6c', '7c', '8c', '9c', 'Tc', 'Jc', 'Qc', 'Kc', 'Ac', '2d', '3d', '4d', '5d', '6d', '7d', '8d', '9d', 'Td', 'Jd', 'Qd', 'Kd', 'Ad'] flop = itertools.combinations(cards,3) a1 = 'Ks' ; a2 = 'Qs' b1 = 'Jc' ; b2 = 'Jd' cards1 = a1+a2 cards2 = b1+b2 number = 0 n=0 m=0 for row1 in flop: if (row1[0] <> a1 and row1[0] <>a2 and row1[0] <>b1 and row1[0] <>b2) and (row1[1] <> a1 and row1[1] <>a2 and row1[1] <>b1 and row1[1] <>b2) and (row1[2] <> a1 and row1[2] <> a2 and row1[2] <> b1 and row1[2] <> b2): for row2 in cards: if (row2 <> a1 and row2 <> a2 and row2 <> b1 and row2 <> b2 and row2 <> row1[0] and row2 <> row1[1] and row2 <> row1[2]): s = pokersleuth.compute_equity(row1[0]+row1[1]+row1[2]+row2, (cards1, cards2)) if s[0]>=0.5: number +=1 del s[:] del s[:] print number/45.0 number = 0 n+=1

    Read the article

  • php check box selection

    - by DAFFODIL
    I have a form in which data fro back end will be listed out in table.There will a chk box at beginning of each row. For eg,if there are 10 items and ,i need only two items,i ii chk in check box,when i press print it should be passed to print page. Mates thnx in advance. mysql_select_db("form1", $con); error_reporting(E_ALL ^ E_NOTICE); $nam=$_REQUEST['select1']; $row=mysql_query("select * from inv where name='$nam'"); while($row1=mysql_fetch_array($row)) { $Name=$row1['Name']; $Address =$row1['Address']; $City=$row1['City']; $Pincode=$row1['Pincode']; $No=$row1['No']; $Date=$row1['Date']; $DCNo=$row1['DCNo']; $DcDate=$row1['DcDate']; $YourOrderNo=$row1['YourOrderNo']; $OrderDate=$row1['OrderDate']; $VendorCode=$row1['VendorCode']; $SNo=$row1['SNo']; $descofgoods=$row1['descofgoods']; $Qty=$row1['Qty']; $Rate=$row1['Rate']; $Amount=$row1['Amount']; } ? Untitled Document function ram(id) { var q=document.getElementById('qty_'+id).value; var r=document.getElementById('rate_'+id).value; document.getElementById('amt_'+id).value=q*r; } function g() { form1.submit(); } Name select " Address City ' / Pincode ' No ' readonly="" / Date ' readonly="" / DCNo ' readonly="" / DcDate: ' / YourOrderNo ' readonly="" / OrderDate ' readonly="" / VendorCode ' readonly="" /   SNO DESCRIPTION QUANTITY RATE/UNIT AMOUNT ' readonly=""/ ' / "/ ' id="rate_" onclick="ram('')"; "/ "Print

    Read the article

  • drop down and post data to data base

    - by DAFFODIL
    This is a form which retrieves data from db and displays them in table. At the beginning of each row there will be a check box. If there are 10 rows fetched, I ii check 5 rows and insert them in to diff db but here when, I click drop down box data is getting in to db automatically,bcoz I use onchange event. Any alternative to prevent this to happen. Data should be inserted only when, I click submit button. Any help will be appreciated <?php $con = mysql_connect("localhost","root",""); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("form1", $con); error_reporting(E_ALL ^ E_NOTICE); $nam=$_REQUEST['select1']; $row=mysql_query("select * from inv where name='$nam'"); while($row1=mysql_fetch_array($row)) { $Name=$row1['Name']; $Address =$row1['Address']; $City=$row1['City']; $Pincode=$row1['Pincode']; $No=$row1['No']; $Date=$row1['Date']; $DCNo=$row1['DCNo']; $DcDate=$row1['DcDate']; $YourOrderNo=$row1['YourOrderNo']; $OrderDate=$row1['OrderDate']; $VendorCode=$row1['VendorCode']; $SNo=$row1['SNo']; $descofgoods=$row1['descofgoods']; $Qty=$row1['Qty']; $Rate=$row1['Rate']; $Amount=$row1['Amount']; } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Untitled Document</title> <script type="text/javascript"> function ram(id) { var q=document.getElementById('qty_'+id).value; var r=document.getElementById('rate_'+id).value; document.getElementById('amt_'+id).value=q*r; } </script> </head> <body> <form id="form1" name="form1" method="post" action=""> <table width="1315" border="0"> <script type="text/javascript"> function g() { form1.submit(); } </script> <tr> <th>Name</th> <th align="left"><select name="select1" onchange="g();"> <option value="" selected="selected">select</option> <?php $row=mysql_query("select Name from inv "); while($row1=mysql_fetch_array($row)) { ?> <option value="<?php echo $row1['Name'];?>"><?php echo $row1['Name'];?></option> <?php } ?> </select></th> </tr> <tr> <th>Address</th> <th align="left"><textarea name="Address"><?php echo $Address;?></textarea></th> </tr> <tr> <th>City</th> <th align="left"><input type="text" name="City" value='<?php echo $City;?>' /></th> </tr> <tr> <th>Pincode</th> <th align="left"><input type="text" name="Pincode" value='<?php echo $Pincode;?>'></th> </tr> <tr> <th>No</th> <th align="left"><input type="text" name="No2" value='<?php echo $No;?>' readonly="" /></th> </tr> <tr> <th>Date</th> <th align="left"><input type="text" name="Date" value='<?php echo $Date;?>' /></th> </tr> <tr> <th>DCNo</th> <th align="left"><input type="text" name="DCNo" value='<?php echo $DCNo;?>' readonly="" /></th> </tr> <tr> <th>DcDate:</th> <th align="left"><input type="text" name="DcDate" value='<?php echo $DcDate;?>' /></th> </tr> <tr> <th>YourOrderNo</th> <th align="left"><input type="text" name="YourOrderNo" value='<?php echo $YourOrderNo;?>' readonly="" /></th> </tr> <tr> <th>OrderDate</th> <th align="left"><input type="text" name="OrderDate" value='<?php echo $OrderDate;?>' /></th> </tr> <tr> <th width="80">VendorCode</th> <th width="1225" align="left"><input type="text" name="VendorCode" value='<?php echo $VendorCode;?>' readonly="" /></th> </tr> </table> <table width="1313" border="0"> <tr> <td width="44">&nbsp;</td> <td width="71">SNO</td> <td width="527">DESCRIPTION</td> <td width="214">QUANTITY</td> <td width="214">RATE/UNIT</td> <td width="217">AMOUNT</td> </tr> <?php $i=1; $row=mysql_query("select * from inv where Name='$nam'"); while($row1=mysql_fetch_array($row)) { $SNo=$row1['SNo']; $descofgoods=$row1['descofgoods']; $Qty=$row1['Qty']; $Rate=$row1['Rate']; $Amount=$row1['Amount']; ?> <tr> <td><input type="checkbox" name="checkbox" value="checkbox" checked="checked"/></td> <td><input type="text" name="No[<?php echo $i?>]" value='<?php echo $SNo;?>' readonly=""/></td> <td><input type="text" name="descofgoods[<?php echo $i?>]" value='<?php echo $descofgoods;?>' /></td> <td><input type="text" name="qty[<?php echo $i?>]" maxlength="50000000" id="qty_<?PHP echo($i) ?>"/></td> <td><input type="text" name="Rate[<?php echo $i?>]" value='<?php echo $Rate;?>' id="rate_<?PHP echo($i) ?>" onclick="ram('<?PHP echo($i) ?>')";></td> <td><input type="text" name="Amount[<?php echo $i?>]" id="amt_<?PHP echo($i) ?>"/></td> </tr> <?php $i++;} ?> <tr> <td><input type="submit" value="submit" header("location:values to be brought for print page.php");/></td> </tr> </table> <label></label> </form> </body> </html> <?php /*error_reporting(E_ALL ^ E_NOTICE); $con = mysql_connect("localhost","root",""); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("form1", $con); /*if(checked=checkbox) { mysql_query="INSERT INTO invo (Name, Address, City, Pincode, No, Date, DCNo, DcDate, YourOrderNo, OrderDate, VendorCode, SNo, descofgoods, Qty, Rate, Amount) VALUES ('$_POST[Name]','$_POST[Address]','$_POST[City]','$_POST[Pincode]','$_POST[No]','$_POST[Date]','$_POST[DCNo]','$_POST[DcDate]','$_POST[YourOrderNo]','$_POST[OrderDate]','$_POST[VendorCode]','$_POST[SNo]','$_POST[descofgoods]','$_POST[qty]','$_POST[Rate]','$_POST[Amount]')"; } else { header("location:values to be brought for print page.php"); }*/ header("ins.php"); ?>

    Read the article

  • Multiplying values using javascript

    - by DAFFODIL
    i have used js to multiply but only 1st row is getting multiplied other rows are nt getting multiplied. <?php $con = mysql_connect("localhost","root",""); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("form1", $con); error_reporting(E_ALL ^ E_NOTICE); $nam=$_REQUEST['select1']; $row=mysql_query("select * from inv where name='$nam'"); while($row1=mysql_fetch_array($row)) { $Name=$row1['Name']; $Address =$row1['Address']; $City=$row1['City']; $Pincode=$row1['Pincode']; $No=$row1['No']; $Date=$row1['Date']; $DCNo=$row1['DCNo']; $DcDate=$row1['DcDate']; $YourOrderNo=$row1['YourOrderNo']; $OrderDate=$row1['OrderDate']; $VendorCode=$row1['VendorCode']; $SNo=$row1['SNo']; $descofgoods=$row1['descofgoods']; $Qty=$row1['Qty']; $Rate=$row1['Rate']; $Amount=$row1['Amount']; } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Untitled Document</title> <script type="text/javascript"> **function ram() { var q=document.getElementById('qty').value; var r=document.getElementById('rate').value; document.getElementById('amt').value=q*r; }** </script> </head> <body> <form id="form1" name="form1" method="post" action=""> <table width="1315" border="0"> <script type="text/javascript"> function g() { form1.submit(); } </script> <tr> <th>Name</th> <th align="left"><select name="select1" onchange="g();"> <option value="" selected="selected">select</option> <?php $row=mysql_query("select Name from inv "); while($row1=mysql_fetch_array($row)) { ?> <option value="<?php echo $row1['Name'];?>"><?php echo $row1['Name'];?></option> <?php } ?> </select></th> </tr> <tr> <th>Address</th> <th align="left"><textarea name="Address"><?php echo $Address;?></textarea></th> </tr> <tr> <th>City</th> <th align="left"><input type="text" name="City" value='<?php echo $City;?>' /></th> </tr> <tr> <th>Pincode</th> <th align="left"><input type="text" name="Pincode" value='<?php echo $Pincode;?>'></th> </tr> <tr> <th>No</th> <th align="left"><input type="text" name="No2" value='<?php echo $No;?>' readonly="" /></th> </tr> <tr> <th>Date</th> <th align="left"><input type="text" name="Date" value='<?php echo $Date;?>' readonly="" /></th> </tr> <tr> <th>DCNo</th> <th align="left"><input type="text" name="DCNo" value='<?php echo $DCNo;?>' readonly="" /></th> </tr> <tr> <th>DcDate:</th> <th align="left"><input type="text" name="DcDate" value='<?php echo $DcDate;?>' /></th> </tr> <tr> <th>YourOrderNo</th> <th align="left"><input type="text" name="YourOrderNo" value='<?php echo $YourOrderNo;?>' readonly="" /></th> </tr> <tr> <th>OrderDate</th> <th align="left"><input type="text" name="OrderDate" value='<?php echo $OrderDate;?>' readonly="" /></th> </tr> <tr> <th width="80">VendorCode</th> <th width="1225" align="left"><input type="text" name="VendorCode" value='<?php echo $VendorCode;?>' readonly="" /></th> </tr> </table> <table width="1313" border="0"> <tr> <td width="44">&nbsp;</td> <td width="71">SNO</td> <td width="527">DESCRIPTION</td> <td width="214">QUANTITY</td> <td width="214">RATE/UNIT</td> <td width="217">AMOUNT</td> </tr> <?php $i=1; $row=mysql_query("select * from inv where Name='$nam'"); while($row1=mysql_fetch_array($row)) { $descofgoods=$row1['descofgoods']; $Qty=$row1['Qty']; $Rate=$row1['Rate']; $Amount=$row1['Amount']; ?> <tr> <td><input type="checkbox" name="checkbox" value="checkbox" /></td> <td><input type="text" name="No" value='<?php echo $No;?>' readonly=""/></td> <td><input type="text" name="descofgoods" value='<?php echo $descofgoods;?>' /></td> <td><input type="text" name="qty" maxlength="50000000" id="qty"/></td> <td><input type="text" name="Rate" value='<?php echo $Rate;?>' id="rate" onclick="ram()";></td> <td><input type="text" name="Amount" id="amt"/></td> </tr> <?php $i++;} ?> <tr> <th colspan="2"><a href="pp.php?msg=<?php echo $nam;?>">Print</a></th> </tr> </table> <label></label> </form> </body> </html>

    Read the article

  • Calculating the total in JavaScript

    - by DAFFODIL
    OP, please replace this text with a detailed description of your problem. Your code is below. I used document.getElementById but the math is not working. I need total to be calculated: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title></title> <script type = "text/javascript"> function a() { var q = document.getElementById('ad').value; document.getElementById('s').value=q + q; } </script> </head> <?php $con = mysql_connect("localhost","root",""); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("form1", $con); error_reporting(E_ALL ^ E_NOTICE); $nam=$_GET['msg']; $row=mysql_query("select * from inv where Name='$nam'"); while($row1=mysql_fetch_array($row)) { $Name=$row1['Name']; $Address =$row1['Address']; $City=$row1['City']; $Pincode=$row1['Pincode']; $No=$row1['No']; $Date=$row1['Date']; $DCNo=$row1['DCNo']; $DcDate=$row1['DcDate']; $YourOrderNo=$row1['YourOrderNo']; $OrderDate=$row1['OrderDate']; $VendorCode=$row1['VendorCode']; $SNo=$row1['SNo']; $descofgoods=$row1['descofgoods']; $Qty=$row1['Qty']; $Rate=$row1['Rate']; $Amount=$row1['Amount']; } ?> <body> <form id="form1" name="form1" method="post" action=""> <table width="846" border="0"> <tr> <td width="411" height="113">&nbsp;</td> <td width="412">&nbsp;</td> </tr> </table> <table width="846" border="0"> <tr> <td height="38">&nbsp;</td> </tr> </table> <table width="846" border="0"> <tr> <td width="390" rowspan="4">&nbsp;</td> <td width="92" height="35">&nbsp;</td> <td width="136"><?php echo $No;?></td> <td width="36">&nbsp;</td> <td width="170"><?php echo $Date;?></td> </tr> <tr> <td height="37">&nbsp;</td> <td><?php echo $DCNo;?></td> <td>&nbsp;</td> <td><?php echo $DcDate;?></td> </tr> <tr> <td height="34">&nbsp;</td> <td><?php echo $YourOrderNo;?></td> <td>&nbsp;</td> <td><?php echo $OrderDate;?></td> </tr> <tr> <td height="29">&nbsp;</td> <td><?php echo $VendorCode;?></td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> </table> <table width="845" border="0"> <tr> <td height="38">&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td width="34">&nbsp;</td> <td width="457">&nbsp;</td> <td width="104">&nbsp;</td> <td width="79">&nbsp;</td> <td width="149">&nbsp;</td> </tr> <?php $i=1; $row=mysql_query("select * from inv where Name='$nam'"); while($row1=mysql_fetch_array($row)) { $descofgoods=$row1['descofgoods']; $Qty=$row1['Qty']; $Rate=$row1['Rate']; $Amount=$row1['Amount']; ?> <tr> <td><?php echo $i;?></td> <td><?php echo $descofgoods;?></td> <td><?php echo $Qty;?></td> <td><?php echo $Rate;?></td> <td><input name="Amount" type = "text" id ="ad" value="<?php echo $Amount;?>" /></td> </tr> <?php $i++;} ?> </table> <table width="844" border="0"> <tr> <td width="495" height="1065">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <input type="text" name="textfield2" /> &nbsp; &nbsp; &nbsp; &nbsp; </td> <td width="191">&nbsp;</td> <td width="144"><input type="text" name="tot" id="s" onclick="a()"; /></td> </tr>

    Read the article

  • Python csv reader acting weird

    - by PylonsN00b
    So OK if I run this wrong code: csvReader1 = csv.reader(file('new_categories.csv', "rU"), delimiter=',') for row1 in csvReader1: print row1[0] print row1[8] category_sku = str(row[8]) if category_sku == sku: classifications["Craft"] = row[0] classifications["Theme"] = row[1] I get: Knitting 391 Traceback (most recent call last): File "upload_all_inventory_ebay.py", line 403, in <module> inventory_item_list = get_item_list(product) File "upload_all_inventory_ebay.py", line 294, in get_item_list category_sku = str(row[8]) NameError: global name 'row' is not defined Where Knitting and 391 are exactly right, of course I need to refer to row[8] as row1[8]...k so I do this: csvReader1 = csv.reader(file('new_categories.csv', "rU"), delimiter=',') for row1 in csvReader1: print row1[0] print row1[8] category_sku = str(row1[8]) if category_sku == sku: classifications["Craft"] = row1[0] classifications["Theme"] = row1[1] And I get this: ........... Crochet 107452 Knitting 107454 Knitting 107455 Knitting 107456 Knitting 107457 Crochet 108200 Crochet 108201 Crochet 108205 Crochet 108213 Crochet 108214 Crochet 108217 108432 Quilt 108451 108482 108488 Scrapbooking 108711 Knitting 122363 Needlework Beading Crafts & Decorating Crochet Crochet Crochet Traceback (most recent call last): File "upload_all_inventory_ebay.py", line 403, in <module> inventory_item_list = get_item_list(product) File "upload_all_inventory_ebay.py", line 292, in get_item_list print row1[0] IndexError: list index out of range Where the output you see there is every effing thing in column 0 and column 1 !!!!!!!!!! Why? And WHY is row1[0] out of range if it wasn't before. YAY Fridays!

    Read the article

  • facing problems while updating rows in hbase

    - by sammy
    Hello i've just started exploring hbase i've run samples : SampleUploader,PerformanceEvaluation and rowcount as given in hadoop wiki: http://wiki.apache.org/hadoop/Hbase/MapReduce The problem im facing is : table1 is my table with the column family column create 'table1','column' put 'table1','row1','column:address','SanFrancisco' hbase(main):020:0 scan 'table1' ROW COLUMN+CELL row1 column=column:address, timestamp=1276351974560, value=SanFrancisco put 'table1','row1','column:name','Hannah' hbase(main):020:0 scan 'table1' ROW COLUMN+CELL row1 column=column:address,timestamp=1276351974560,value=SanFrancisco row1 column=column:name, timestamp=1276351899573, value=Hannah i want both the columns to appear in the same row as a different version similary, if i change the name column to sarah, it shows the updated row.... but i want both the old row and the changed row to appear as 2 different versions so that i could make analysis on the data........ whatis the mistake im making???? thank u a lot sammy

    Read the article

  • Python In-memory table

    - by nsharish
    What is the right way to forming in-memory table in python with direct lookups for rows and columns.I thought of using dict of dicts this way, class Table(dict): def __getitem__(self, key): if key not in self: self[key]={} return dict.__getitem__(self, key) table = Table() table['row1']['column1'] = 'value11' table['row1']['column2'] = 'value12' table['row2']['column1'] = 'value21' table['row2']['column2'] = 'value22' >>>table {'row1':{'column1':'value11','column2':'value12'},'row2':{'column1':'value21','column2':'value22'}} I had difficulty in looking up for values in columns. >>>'row1' in table True >>>'value11' in table['row1'].values() True Now how do I do lookup if 'column1' has 'value11' Is this method of forming tables wrong?Is there a better way to implement such tables with easier lookups?.Thanks

    Read the article

  • Net::Cassandra::Easy equivalent of "SELECT * FROM ..."

    - by knorv
    When using Perl's Net::Cassandra::Easy the following code will retrieve columns col[1-3] from rows row[1-3]: $result = $cassandra->get(['row1', 'row2', 'row3'], family => 'Standard1', byname => ['col1', 'col2', 'col3'); The corresponding SQL would be: SELECT col1, col2, col3 FROM rows WHERE id IN ('row1', 'row2', 'row3'); Suppose instead that I want to retrieve all columns. In SQL terms that would be: SELECT * FROM rows WHERE id IN ('row1', 'row2', 'row3'); To get all columns I am currently using: $result = $cassandra->get(['row1', 'row2', 'row3'], family => 'Standard1', byoffset => { "count" => 1_000_000 }); This works as long as the number of columns does not exceed one million. While this works I'd assume that there is a cleaner way to do it. My question is: Is there any cleaner way to specify to Cassandra that I want to retrieve all columns for the maching rows?

    Read the article

  • displaying a group once in php mysql

    - by JPro
    I have some data like this : 1 TC1 PASS 2 TC2 FAIL 3 TC3 INCONC 4 TC1 FAIL 5 TC21 FAIL 6 TC4 PASS 7 TC3 PASS 8 TC2 FAIL 9 TC1 TIMEOUT 10 TC21 FAIL If I try the below code : <?php mysql_connect("localhost", "root", "pop") or die(mysql_error()); mysql_select_db("jpd") or die(mysql_error()); $oustanding_fails = mysql_query("select * from SELECT_PASS ") or die(mysql_error()); $resultSetArray = array(); $platform; while($row1 = mysql_fetch_array( $oustanding_fails )) { if(trim($row1['TESTCASE']) <> trim($platform)) { echo $row1['TESTCASE']."-"; $platform = $row1['TESTCASE']; } echo $row1['RESULT'] ."<br>"; } ?> to get a result like this : TC1 PASS FAIL TIMEOUT TC2 FAIL FAIL TC3 INCONC PASS TC4 PASS AND SO ON. I am unable to get the result I want. Any ideas where exactly I am making mistake? Thanks.

    Read the article

  • core data saving in textboxes in table view controller

    - by user1489709
    I have created a five column (text boxes) cell (row) in table view controller with an option of add button. When a user clicks on add button, a new row (cell) with five column (text boxe) is added in a table view controller with null values. I want that when user fills the text boxes the data should get saved in database or if he changes any data in previous text boxes also it get saved. this is my save btn coding.. -(void)textFieldDidEndEditing:(UITextField *)textField { row1=textField.tag; NSLog(@"Row is %d",row1); path = [NSIndexPath indexPathForRow:row1 inSection:0]; Input_Details *inputDetailsObject1=[self.fetchedResultsController objectAtIndexPath:path]; /* Update the Input Values from the values in the text fields. */ EditingTableViewCell *cell; cell = (EditingTableViewCell *)[self.tableView cellForRowAtIndexPath:[NSIndexPath indexPathForRow:row1 inSection:0]]; inputDetailsObject1.mh_Up= cell.cell_MH_up.text; inputDetailsObject1.mh_down=cell.cell_MH_dn.text; inputDetailsObject1.sewer_No=[NSNumber numberWithInt:[cell.cell_Sewer_No.text intValue]]; inputDetailsObject1.mhup_gl=[NSNumber numberWithFloat:[cell.cell_gl_MHUP.text floatValue]]; inputDetailsObject1.mhdn_gl=[NSNumber numberWithFloat:[cell.cell_gl_MHDN.text floatValue]]; inputDetailsObject1.pop_Ln=[NSNumber numberWithInt:[cell.cell_Line_pop.text intValue]]; inputDetailsObject1.sew_len=[NSNumber numberWithFloat:[cell.cell_Sewer_len.text floatValue]]; [self saveContext]; NSLog(@"Saving the MH_up value %@ is saved in save at index path %d",inputDetailsObject1.mh_Up,row1); [self.tableView reloadData]; }

    Read the article

  • Updating value in Linq to SQL IEnumerable

    - by Learner
    Using Linq to SQL: if(!parentlist.childlist.Contains(row1)) parentlist.childlist.Add(row1); else How do I update the required childlist row with row1? Each row of the child list has a unique id. parentlist implements IEnumerable and childlist is IList.

    Read the article

  • retrieve value from db in php

    - by wangdoo
    I have a db in which 1 column value will be always null.I want it to pass to next page but it is passing all values of other column except this null value column. This is my code $row=mysql_query("SELECT * FROM `thirdpartycategorymaster` WHERE ISNULL(`delete`)"); while($row1=mysql_fetch_array($row)) { <td><b><a href="catdel.php?head1=<?php echo $row1['ThirdPartyCategoryName'] . '&&msg1=' . $row1['ThirdPartyCategoryID'] . '&&ctdel=' . $row1['delete']; ?> ">Delete</a></b></td> This my db table ThirdPartyCategoryID ThirdPartyCategoryName delete 29 ecommerce NULL

    Read the article

  • Windows Phone XAML and XNA Apps with Game Components

    - by row1
    I am using the Windows Phone Template "Windows Phone XAML and XNA Apps" and targeting Windows Phone 7/8. Most examples show your game inheriting from Microsoft.Xna.Framework.Game and then adding Microsoft.Xna.Framework.GameComponent items to the Components collection. But as my game page inherits from PhoneApplicationPage there isn't a Components collection or a Game property. How can I use GameComponent from within PhoneApplicationPage?

    Read the article

  • Certain grid lines not rendering as expected

    - by row1
    I am drawing a simple quad (a triangle strip with 4 vertices) as the floor and then drawing an 8x8 grid over top (a collection of vertex pairs for a line list). The vertical grid lines work fine (apart from being very aliased), but some of the horizontal lines do not get rendered. The grid renders fine if I do not draw the quad. foreach (EffectPass pass in _Effect.CurrentTechnique.Passes) { pass.Apply(); CurrentGraphicsDevice.SetVertexBuffer(_VertexFloorBuffer); _Engine.CurrentGraphicsDevice.DrawPrimitives(PrimitiveType.TriangleStrip, 0, 2); //Some of the horizontal lines seems to disappear if we draw the above quad. CurrentGraphicsDevice.SetVertexBuffer(_VertexGridBuffer); CurrentGraphicsDevice.DrawPrimitives(PrimitiveType.LineList, 0, _VertexGridBuffer.VertexCount / 2); } What could be causing these lines to not be rendered? Update: I added the below code after I draw my quad and grid and it started working. But I am not sure why that works as I thought this code was to draw the WPF controls elementRenderer.Render(); spriteBatch.Begin(); spriteBatch.Draw(elementRenderer.Texture, Vector2.Zero, Color.White); spriteBatch.End();

    Read the article

  • Can't include Javascript variable in PHP mysql_query call? [on hold]

    - by user198895
    I want the PHP mysql_query call to retrieve user values based on the Agency drop-down value but I can't get this to work. Am I unable to include the Javascript variable agency.value in PHP? <script type="text/javascript"> var agency = document.getElementById("agency"); var user = document.getElementById("user"); agency.onchange = onchange; // change options when agency is changed function onchange() { <?php include 'dbConnect.php'; ?> <?php $q = mysql_query("select id as UserID, CONCAT(LastName, ', ' , FirstName) as UserName from users where Agency = " . ?>agency.value<?php . " order by UserName");?> option_html = "<option value=0 selected>- All Users -</option>"; <?php while ($row1 = mysql_fetch_array($q)) {?> if (agency.value == 0 || agency.value == '<?php echo $row1[AgencyID]; ?>') { option_html += "<option value=<?php echo $row1[UserID]; ?>><?php echo $row1[UserName]; ?></option>"; } <?php } ?> user.innerHTML = option_html; } </script>

    Read the article

  • Tables created programmatically don't appear in WebBrowser control

    - by John Hall
    I'm creating HTML dynamically in a WebBrowser control. Most elements seems to appear correctly, with the exception of a table. My code is: var doc = webBrowser1.Document; var body = webBrowser1.Document.Body; body.AppendChild(webBrowser1.Document.CreateElement("hr")); var div = doc.CreateElement("DIV"); var table = doc.CreateElement("TABLE"); var row1 = doc.CreateElement("TR"); var cell1 = doc.CreateElement("TD"); cell1.InnerText = "Cell 1"; row1.AppendChild(cell1); var cell2 = doc.CreateElement("TD"); cell2.InnerText = "Cell 2"; row1.AppendChild(cell2); table.AppendChild(row1); div.AppendChild(table); body.AppendChild(div); body.AppendChild(webBrowser1.Document.CreateElement("hr")); The HTML tags are visible in the OuterHTML property of the body, but all that appears in the browser are the two horizontal rules. If I replace div.AppendChild(table); with div.InnerHtml = table.OuterHtml then everything appears as expected.

    Read the article

  • Problem with my whiteboard application

    - by swift
    I have to develop a whiteboard application in which both the local user and the remote user should be able to draw simultaneously, is this possible? If possible then any logic? I have already developed a code but in which i am not able to do this, when the remote user starts drawing the shape which i am drawing is being replaced by his shape and co-ordinates. This problem is only when both draw simultaneously. any idea guys? Here is my code class Paper extends JPanel implements MouseListener,MouseMotionListener,ActionListener { static BufferedImage image; int bpressed; Color color; Point start; Point end; Point mp; Button elipse=new Button("elipse"); Button rectangle=new Button("rect"); Button line=new Button("line"); Button empty=new Button(""); JButton save=new JButton("Save"); JButton erase=new JButton("Erase"); String selected; int ex,ey;//eraser DatagramSocket dataSocket; JButton button = new JButton("test"); Client client; Point p=new Point(); int w,h; public Paper(DatagramSocket dataSocket) { this.dataSocket=dataSocket; client=new Client(dataSocket); System.out.println("paper"); setBackground(Color.white); addMouseListener(this); addMouseMotionListener(this); color = Color.black; setBorder(BorderFactory.createLineBorder(Color.black)); //save.setPreferredSize(new Dimension(100,20)); save.setMaximumSize(new Dimension(75,27)); erase.setMaximumSize(new Dimension(75,27)); } public void paintComponent(Graphics g) { try { g.drawImage(image, 0, 0, this); Graphics2D g2 = (Graphics2D)g; g2.setPaint(Color.black); if(selected==("elipse")) g2.drawOval(start.x, start.y,(end.x-start.x),(end.y-start.y)); else if(selected==("rect")) g2.drawRect(start.x, start.y, (end.x-start.x),(end.y-start.y)); else if(selected==("line")) g2.drawLine(start.x,start.y,end.x,end.y); } catch(Exception e) {} } //Function to draw the shape on image public void draw() { Graphics2D g2 = image.createGraphics(); g2.setPaint(color); if(selected=="line") g2.drawLine(start.x, start.y, end.x, end.y); if(selected=="elipse") g2.drawOval(start.x, start.y, (end.x-start.x),(end.y-start.y)); if(selected=="rect") g2.drawRect(start.x, start.y, (end.x-start.x),(end.y-start.y)); repaint(); g2.dispose(); start=null; } //To add the point to the board which is broadcasted by the server public synchronized void addPoint(Point ps,String varname,String shape,String event) { try { if(end==null) end = new Point(); if(start==null) start = new Point(); if(shape.equals("elipse")) selected="elipse"; else if(shape.equals("line")) selected="line"; else if(shape.equals("rect")) selected="rect"; else if(shape.equals("erase")) { selected="erase"; erase(); } if(end!=null && start!=null) { if(varname.equals("end")) end=ps; if(varname.equals("mp")) mp=ps; if(varname.equals("start")) start=ps; if(event.equals("drag")) repaint(); else if(event.equals("release")) draw(); } } catch(Exception e) { e.printStackTrace(); } } //To set the size of the image public void setWidth(int x,int y) { System.out.println("("+x+","+y+")"); w=x; h=y; image = new BufferedImage(w, h, BufferedImage.TYPE_INT_RGB); Graphics2D g2 = image.createGraphics(); g2.setPaint(Color.white); g2.fillRect(0,0,w,h); g2.dispose(); } //Function which provides the erase functionality public void erase() { Graphics2D pic=(Graphics2D) image.getGraphics(); pic.setPaint(Color.white); pic.fillRect(start.x, start.y, 10, 10); } //Function to add buttons into the panel, calling this function returns a panel public JPanel addButtons() { JPanel buttonpanel=new JPanel(); JPanel row1=new JPanel(); JPanel row2=new JPanel(); JPanel row3=new JPanel(); JPanel row4=new JPanel(); buttonpanel.setPreferredSize(new Dimension(80,80)); //buttonpanel.setMinimumSize(new Dimension(150,150)); row1.setLayout(new BoxLayout(row1,BoxLayout.X_AXIS)); row1.setPreferredSize(new Dimension(150,150)); row2.setLayout(new BoxLayout(row2,BoxLayout.X_AXIS)); row3.setLayout(new BoxLayout(row3,BoxLayout.X_AXIS)); row4.setLayout(new BoxLayout(row4,BoxLayout.X_AXIS)); buttonpanel.setLayout(new BoxLayout(buttonpanel,BoxLayout.Y_AXIS)); elipse.addActionListener(this); rectangle.addActionListener(this); line.addActionListener( this); save.addActionListener( this); erase.addActionListener( this); buttonpanel.add(Box.createRigidArea(new Dimension(10,10))); row1.add(elipse); row1.add(Box.createRigidArea(new Dimension(5,0))); row1.add(rectangle); buttonpanel.add(row1); buttonpanel.add(Box.createRigidArea(new Dimension(10,10))); row2.add(line); row2.add(Box.createRigidArea(new Dimension(5,0))); row2.add(empty); buttonpanel.add(row2); buttonpanel.add(Box.createRigidArea(new Dimension(10,10))); row3.add(save); buttonpanel.add(row3); buttonpanel.add(Box.createRigidArea(new Dimension(10,10))); row4.add(erase); buttonpanel.add(row4); return buttonpanel; } //To save the image drawn public void save() { try { ByteArrayOutputStream bos = new ByteArrayOutputStream(); JPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder(bos); JFileChooser fc = new JFileChooser(); fc.showSaveDialog(this); encoder.encode(image); byte[] jpgData = bos.toByteArray(); FileOutputStream fos = new FileOutputStream(fc.getSelectedFile()+".jpeg"); fos.write(jpgData); fos.close(); //add replce confirmation here } catch (IOException e) { System.out.println(e); } } public void mouseClicked(MouseEvent arg0) { // TODO Auto-generated method stub } @Override public void mouseEntered(MouseEvent arg0) { } public void mouseExited(MouseEvent arg0) { // TODO Auto-generated method stub } public void mousePressed(MouseEvent e) { if(selected=="line"||selected=="erase") { start=e.getPoint(); client.broadcast(start,"start", selected,"press"); } else if(selected=="elipse"||selected=="rect") { mp = e.getPoint(); client.broadcast(mp,"mp", selected,"press"); } } public void mouseReleased(MouseEvent e) { if(start!=null) { if(selected=="line") { end=e.getPoint(); client.broadcast(end,"end", selected,"release"); } else if(selected=="elipse"||selected=="rect") { end.x = Math.max(mp.x,e.getX()); end.y = Math.max(mp.y,e.getY()); client.broadcast(end,"end", selected,"release"); } draw(); } //start=null; } public void mouseDragged(MouseEvent e) { if(end==null) end = new Point(); if(start==null) start = new Point(); if(selected=="line") { end=e.getPoint(); client.broadcast(end,"end", selected,"drag"); } else if(selected=="erase") { start=e.getPoint(); erase(); client.broadcast(start,"start", selected,"drag"); } else if(selected=="elipse"||selected=="rect") { start.x = Math.min(mp.x,e.getX()); start.y = Math.min(mp.y,e.getY()); end.x = Math.max(mp.x,e.getX()); end.y = Math.max(mp.y,e.getY()); client.broadcast(start,"start", selected,"drag"); client.broadcast(end,"end", selected,"drag"); } repaint(); } @Override public void mouseMoved(MouseEvent arg0) { // TODO Auto-generated method stub } public void actionPerformed(ActionEvent e) { if(e.getSource()==elipse) selected="elipse"; if(e.getSource()==line) selected="line"; if(e.getSource()==rectangle) selected="rect"; if(e.getSource()==save) save(); if(e.getSource()==erase) { selected="erase"; erase(); } } } class Button extends JButton { String name; public Button(String name) { this.name=name; Dimension buttonSize = new Dimension(35,35); setMaximumSize(buttonSize); } public void paintComponent(Graphics g) { super.paintComponent(g); Graphics2D g2 = (Graphics2D)g; g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); //g2.setStroke(new BasicStroke(1.2f)); if (name == "line") g.drawLine(5,5,30,30); if (name == "elipse") g.drawOval(5,7,25,20); if (name== "rect") g.drawRect(5,5,25,23); } }

    Read the article

  • Cassandra inserts using Net::Cassandra::Easy in Perl

    - by knorv
    When using the Perl module Net::Cassandra::Easy to interface with Cassandra I use the following code to read colums col[123] from rows row[123] in column-family Standard1: my $cassandra = Net::Cassandra::Easy->new(keyspace => 'Keyspace1', server => 'localhost'); $cassandra->connect(); my $result = $cassandra->get(['row1', 'row2', 'row3'], family => 'Standard1', byname => ['col1', 'col2', 'col3']); This works as expected. However, when trying to insert row row1 with .. $result = $cassandra->mutate(['row1'], family => 'Standard1', insertions => { "col1" => "Value to set." }); .. I get the error message Can't use string ("0") as a SCALAR ref while "strict refs" in use at .../Net/GenThrift/Thrift/BinaryProtocol.pm line 376. What am I doing wrong?

    Read the article

  • How do I insert a row with Perl's Net::Cassandra::Easy?

    - by knorv
    When using the Perl module Net::Cassandra::Easy to interface with Cassandra I use the following code to read colums col[123] from rows row[123] in column-family Standard1: my $cassandra = Net::Cassandra::Easy->new(keyspace => 'Keyspace1', server => 'localhost'); $cassandra->connect(); my $result = $cassandra->get(['row1', 'row2', 'row3'], family => 'Standard1', byname => ['col1', 'col2', 'col3']); This works as expected. However, when trying to insert row row1 with .. $result = $cassandra->mutate(['row1'], family => 'Standard1', insertions => { "col1" => "Value to set." }); .. I get the error message Can't use string ("0") as a SCALAR ref while "strict refs" in use at .../Net/GenThrift/Thrift/BinaryProtocol.pm line 376. What am I doing wrong?

    Read the article

  • PHP:Wrong Login info does not redirect to the specific page

    - by sdr
    <?php include 'lib/db_conn.php'; $uid=$_REQUEST['uid']; $pass=$_REQUEST['pass']; if(($uid==NULL && $pass==NULL) ||($uid==NULL) ||($pass==NULL)) { header("location:index.php?msg=Fields can't be left blank.."); } $pass=md5($pass); $sql1="SELECT * FROM `tb_user` WHERE `email`='$uid' AND `pass`='$pass'"; $rs1=mysql_query($sql1) or die (mysql_error()); $row1=mysql_fetch_array($rs1) or die (mysql_error()); $email=$row1['email']; if($uid==$email) { session_start(); $_SESSION['id']=$row1['id']; header("location:home.php"); } else { header("location:index.php?msg=Wrong Credentials.."); } ?>

    Read the article

  • Search by nvarchar

    - by ziks
    Hi all. I have this problem. In table I have column which is nvarcar type. and row in this column is row1= 1;6 row2 = 12 row3 =6;5;67 etc... I try to search this column. for example when i send 1 i try to get only row1. I use LIKE but in result set I get row1 and row2. How can I achieved this, any help is appreciated. Tnx...

    Read the article

  • Lock screen keeps making sound when screen is off

    - by row1
    I have my laptop (Asus UL20FT) on external power and hooked up to an external monitor. I keep the laptop lid closed and am using the 'second screen only' option. If you leave it on the lock screen for a short period of time the screen powers off. While the screen is off it keeps repeating a "duuuh duh duh" sound (sounds just like the device plugged in sound). The monitor is connected via HDMI and I have Microsoft and Logitech wireless USB dongles plugged in. How can I prevent this sound loop?

    Read the article

  • Displaying text letter by letter

    - by Evi
    I am planing to Write a Text adventure and I don't know how to make the text draw letter by letter in any other way than changing the variable from h to he to hel to hell to hello That would be a terrible amount of work since there are tons of dialogue. Here is the source code so far { /// <summary> /// This is the main type for your game /// </summary> public class Game1 : Microsoft.Xna.Framework.Game { GraphicsDeviceManager graphics; SpriteBatch spriteBatch; Texture2D sampleBG; Texture2D TextBG; SpriteFont defaultfont; KeyboardState keyboardstate; public bool spacepress = false; public bool mspress = false; public int textheight = 425; public int rowspace = 40; public string namebox = "(null)"; public string Row1 = "(null)"; public string Row2 = "(null)"; public string Row3 = "(null)"; public string Row4 = "(null)"; public int Dialogue = 0; public Game1() { graphics = new GraphicsDeviceManager(this); Content.RootDirectory = "Content"; graphics.PreferredBackBufferHeight = 600; graphics.PreferredBackBufferWidth = 800; IsMouseVisible = true; } /// <summary> /// Allows the game to perform any initialization it needs to before starting to run. /// This is where it can query for any required services and load any non-graphic /// related content. Calling base.Initialize will enumerate through any components /// and initialize them as well. /// </summary> protected override void Initialize() { // TODO: Add your initialization logic here base.Initialize(); } /// <summary> /// LoadContent will be called once per game and is the place to load /// all of your content. /// </summary> protected override void LoadContent() { // Create a new SpriteBatch, which can be used to draw textures. spriteBatch = new SpriteBatch(GraphicsDevice); // TODO: use this.Content to load your game content here sampleBG = Content.Load <Texture2D>("SampleBG"); defaultfont = Content.Load<SpriteFont>("SpriteFont1"); TextBG = Content.Load<Texture2D>("textbg"); } /// <summary> /// UnloadContent will be called once per game and is the place to unload /// all content. /// </summary> protected override void UnloadContent() { // TODO: Unload any non ContentManager content here } /// <summary> /// Allows the game to run logic such as updating the world, /// checking for collisions, gathering input, and playing audio. /// </summary> /// <param name="gameTime">Provides a snapshot of timing values.</param> protected override void Update(GameTime gameTime) { KeyboardState keyboardstate = Keyboard.GetState(); MouseState mousestate = Mouse.GetState(); // Changes Dialgue by pressing Left Mouse Button or Space #region Dialogue changer if (mousestate.LeftButton == ButtonState.Pressed && mspress == false) { mspress = true; Dialogue = Dialogue + 1; } if (mousestate.LeftButton == ButtonState.Released && mspress == true) { mspress = false; } if (keyboardstate.IsKeyDown(Keys.Space) && spacepress == false) { spacepress = true; Dialogue = Dialogue + 1; } if (keyboardstate.IsKeyUp(Keys.Space) && spacepress == true) { spacepress = false; } #endregion // ------------------------------------------------------ // Dialgue Content #region Dialgue if (Dialogue == 1) { Row1 = "Input Text 1 Here."; Row2 = "Input Text 2 Here."; Row3 = "Input Text 3 Here."; Row4 = "Input Text 4 Here."; } if (Dialogue == 2) { Row1 = "Text 1"; Row2 = "Text 2"; Row3 = "Text 3"; Row4 = "Text 4"; } #endregion // ------------------------------------------------------ base.Update(gameTime); } /// <summary> /// This is called when the game should draw itself. /// </summary> /// <param name="gameTime">Provides a snapshot of timing values.</param> protected override void Draw(GameTime gameTime) { GraphicsDevice.Clear(Color.CornflowerBlue); // TODO: Add your drawing code here spriteBatch.Begin(); spriteBatch.Draw(sampleBG, new Rectangle(0, 0, 800, 600), Color.White); spriteBatch.Draw(TextBG, new Rectangle(0, 400, 800, 200), Color.White); spriteBatch.DrawString(defaultfont, Row1, new Vector2(10, (textheight + (rowspace * 0))), Color.Black); spriteBatch.DrawString(defaultfont, Row2, new Vector2(10, (textheight + (rowspace * 1))), Color.Black); spriteBatch.DrawString(defaultfont, Row3, new Vector2(10, (textheight + (rowspace * 2))), Color.Black); spriteBatch.DrawString(defaultfont, Row4, new Vector2(10, (textheight + (rowspace * 3))), Color.Black); spriteBatch.End(); base.Draw(gameTime); } } }

    Read the article

1 2 3 4 5  | Next Page >