Thursday, 19 September 2013

phonegap android datepicker plugin cancel button doesnt hide dialog

phonegap android datepicker plugin cancel button doesnt hide dialog

I have been able to port an old phonegap datepicker plugin to work with
phonegap 3.0.0 and its new command line feature. However after datepicker
is triggered and the cancel button is tapped the datepicker disappears and
reappear. The datepicker only disappears if a date is set. Am not really
good with java, so i dont where to begin to fix this issue
The java class can be found here at this repo Thanks for the help

Using Java processbuilder to turn of HDMI tv

Using Java processbuilder to turn of HDMI tv

I would like to send the following command below from a java program, but
not overly bothered about reading the response. any idea how I can do this
the command below turns of the TV through CEC cammand
echo "standby 0000" | cec-client -d 1 -s "standby 0" RPI
I am lloking at something like the following code below, but not sure how
I can fit the above comand to it
ProcessBuilder builder = new ProcessBuilder("ls", "-l"); // or whatever
your command is
builder.redirectErrorStream(true);
Process proc = builder.start();

Make 2D Array by Splitting a text with a delimiter C++

Make 2D Array by Splitting a text with a delimiter C++

Well I have that code:
#include <iostream>
#include <string>
using namespace std;
int main()
{
std::string s = "0,0,0,1,1,1,0,0,1";
std::string delimiter = ",";
int x = 0;
std::string mapa[9];
size_t pos = 0;
std::string token;
while ((pos = s.find(delimiter)) != std::string::npos) {
token = s.substr(0, pos);
std::cout << token << std::endl;
s.erase(0, pos + delimiter.length());
mapa[x] = token;
x++;
}
std::cout << s << std::endl;
cin.get();
}
Parse (split) a string in C++ using string delimiter (standard C++)
I have x array, but I need a second dimension the Y... I get the content
from a text file called map.txt:
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
And I need to split it by commas (for the x) and later by newlines (for y)...
But Idk how to do the Y array... What Can I do?
Thanks!

sql Find data that does NOT exist in a subquery

sql Find data that does NOT exist in a subquery

I'm trying to find all records that do not match my criteria.
I have a one-to-many table where for each key combo (wbs1, wbs2, wbs3)
there may be many records. I'm trying to query this table for each combo,
and return the combo (wbs1, wbs2, wbs3) only when the table has no records
that match my "in" criteria.
But at the moment, my query seems to be returning all or nothing.
select distinct wbs1, wbs2, wbs3
from dbo.Registry
where not exists ( select wbs1, wbs2, wbs3, InspType
from Registry
where ISNULL(InspType,'') IN ('Test 1','Test 2')
)
What I'd like in the return is a list of wbs1,wbs2,wbs3 where in the table
"Registry" there are no entries that match the Test (InspType) criteria.
Thanks!

How to access mailer log in godaddy using putty

How to access mailer log in godaddy using putty

I am able to connect to godaddy server using putty ssh being new to putty,
don't know much about it... and need to check my mailer logs .. what
command line should i use to access the error log file..
Loged in successfully -bash-3.2$

Hidden Information in .txt/.csv File

Hidden Information in .txt/.csv File

I have been given a .csv/.ssv/.txt file (a semi-colon delimited text
file). If I open this file with a text editor (Notepad++, Notepad,
010Editor et al.) I see data similar to the following subset:
IK; Aufnahmedatum;...;Entlassungsdatum
123456789;2.01201E+11;...;2.01201E+11
where the ellipsis indicates other data.
Now, the formatting is not important; what is important is the 2.01201E+11
scientific formatting. If I attempt to read this .csv file as text I get
2.01201E+11. However, if I first convert my .csv to .txt and then open it
with Excel and use the formatting wizard, I again get cell values with
2.01201E+11 here comes the wired part - if I now edit the cell value, I
see what I want; namely 201111010811. This is a data-time with formatting
'yyyymmddhhmm'.
How does Excel get this information when it does not appear to be in the
underlying .csv/.txt file? How can I get this information without first
converting the file via Excel?
Thanks for your time.

PHP not updating records in a row

PHP not updating records in a row

this program not able me to update record in a row, anyone can solve this
please, i need answers, i must understand...
this is the code: i'm using dreamweaver for this
PHP code: needs more answer
<?php require_once('Connections/tlsc_conn.php');
mysql_select_db($database_tlsc_conn, $tlsc_conn);
$query_Recordset1 = "SELECT * FROM tbl_name";
$Recordset1 = mysql_query($query_Recordset1, $tlsc_conn) or
die(mysql_error());
$totalRows_Recordset1 = mysql_num_rows($Recordset1);
if(isset($_POST['submit'])) {
// $count = count($_POST['id']);
// $count=mysql_num_rows($Recordset1);
$submit = $_GET['submit'];
$i = ($_POST['count']);
$name = ($_POST['name']);
$lastname = ($_POST['lastname']);
$email = ($_POST['email']);
$id = ($_POST['id']);
for($i=0;$i<$count;$i++){
$sql1="UPDATE $tbl_name SET name='$name[$i]',
lastname='$lastname[$i]', email='$email[$i]' WHERE id='$id[$i]'";
$row_Recordset1=mysql_query($sql1);
}
if($row_Recordset1){
header("location:lulu.php");
exit;
}
}
?>
HTML code: i don't think if it is fixed, but i think it is...
<!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>
</head>
<body>
<form name="form2" method="post" action="">
<table width="634" border="1">
<tr>
<td>id</td>
<td>name</td>
<td>lastname</td>
<td>email</td>
</tr>
<?php while($row_Recordset1 = mysql_fetch_assoc($Recordset1)){ ?>
<tr>
<td><?php $id[]=$row_Recordset1['id']; ?><?php echo
$row_Recordset1['id']; ?>
<input name="id[]" type="hidden" value="<?php echo
$row_Recordset1['id']; ?>" />
</td>
<td>
<input name="name[]" type="text" value="<?php echo
$row_Recordset1['name']; ?>">
</td>
<td>
<input name="lastname[]" type="text" value="<?php echo
$row_Recordset1['lastname']; ?>">
</td>
<td>
<input name="email[]" type="text" value="<?php echo
$row_Recordset1['email']; ?>"> </td>
</tr>
<?php } ?>
</table>
<p>
<input type="submit" name="submit" value="Submit" />
</p>
</form>
<p>
</body>
</html>