SRSetRestorePoint API creates a restore point bu not when system
protection is disabled
I am working on a POC where in I need to develop an application on Win7
and Win8, pure C++ win32 application, that modifies (like installs or
un-installs) the system. Before that the application has to create a
system restore point. I cannot use .net or C++/CLI.
I googled and found the below link
http://msdn.microsoft.com/en-us/library/windows/desktop/aa378987(v=vs.85).aspx
With this (SRSetRestorePoint API) I am able to create the system restore
point (application gets the required admin privilege). But I am facing the
following issues
1) If system restore or protection is disabled or turned off, then the API
fails and will not create restore point. Is there any such APIs (no .net
method, only C++) using which I can enable system protection if turned off
or disabled?
2) Though the restore point is getting created, it is not appearing in the
"Recommended restore:" dialog in Computer->Properties->System Protection->
System Restore. This is where a newly and recently created restore point
appears. But with this API it is not. However, if we select, "Choose a
different restore point" option, then the created restore point appears in
that list.
Is there a way or what needs to be done to make the created restore point
(created using SRSetRestorePoint API) appear in "Recommended restore:"?
Code snippet:
RESTOREPOINTINFO RstPt;
STATEMGRSTATUS MgrStat;
DWORD dwErr = ERROR_SUCCESS;
RstPt.dwRestorePtType = APPLICATION_UNINSTALL;
RstPt.dwEventType = BEGIN_SYSTEM_CHANGE;
_tcscpy(RstPt.szDescription, _T("Demo Restore Point"));
if (!SRSetRestorePoint(&RstPt, &MgrStat))
{
dwErr = MgrStat.nStatus;
if(dwErr == ERROR_SERVICE_DISABLED)
{
//What to do in this case?
}
return FALSE;
}
RstPt.dwEventType = END_SYSTEM_CHANGE;
RstPt.llSequenceNumber = MgrStat.llSequenceNumber;
if (!SRSetRestorePoint(&RstPt, &MgrStat))
{
return FALSE;
}
Any help or pointers will be appreciated.
Thanks in advance. .
Brutlag
Sunday, 1 September 2013
View network activity for browser child window
View network activity for browser child window
I need to reverse-engineer some javascript application which does
authorization using facebook auth.
Facebook auth window pops up, asks for my permissions, and gets closed
instantly, so I am unable to grasp anything from the performed action, as
it's too fast.
The problem is that neither Chrome DevTools, nor Firefox Firebug does
display network activity for child windows like OAuth permission.
Is there a way to enable FULL network log? An extension, whatever? (It
better be free and easy to use)
I need to reverse-engineer some javascript application which does
authorization using facebook auth.
Facebook auth window pops up, asks for my permissions, and gets closed
instantly, so I am unable to grasp anything from the performed action, as
it's too fast.
The problem is that neither Chrome DevTools, nor Firefox Firebug does
display network activity for child windows like OAuth permission.
Is there a way to enable FULL network log? An extension, whatever? (It
better be free and easy to use)
Detect first row of data when inserting data but not the other row
Detect first row of data when inserting data but not the other row
I'm trying to do a email smtp function where a user insert a data, the
other party will be notify of the changes. Below is the code where i'm
only able to send email to just 1 person from the database ( this person's
data is the first row of the database )
protected void btnAssign_Click1(object sender, EventArgs e)
{
using (var connAdd = new
SqlConnection(ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString))
{
String assign = ddlpid1.SelectedValue;
connAdd.Open();
var sql = "Update MemberReport Set assignto ='" +
assign + "', caseprogress = 'ongoing' where
memberreportID='" + lbmemberreportid.Text + "'";
using (var cmdAdd = new SqlCommand(sql, connAdd))
{
cmdAdd.ExecuteNonQuery();
}
sql = "Insert into PoliceReport(memberreportid)
values('" + lbmemberreportid.Text + "')";
// sql = "Update PoliceAccount Set handle ='" + assign
+ "' where policeid ='" + ddlpid1.SelectedValue + "'
OR '" + ddlpid2.SelectedValue + "'";
using (var cmdAdd = new SqlCommand(sql, connAdd))
{
cmdAdd.ExecuteNonQuery();
}
sql = "Update PoliceAccount Set handle ='" +
lbmemberreportid.Text + "' where policeid ='" +
ddlpid1.SelectedValue + "'";
// sql = "Update PoliceAccount Set handle ='" + assign
+ "' where policeid ='" + ddlpid1.SelectedValue + "'
OR '" + ddlpid2.SelectedValue + "'";
using (var cmdAdd = new SqlCommand(sql, connAdd))
{
cmdAdd.ExecuteNonQuery();
}
SqlCommand cmd = new SqlCommand();
SqlDataReader dr;
//SqlConnection con = new
SqlConnection(ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString);
//con.Open();
// get the records matching the supplied username or
email id.
cmd = new SqlCommand("select * from PoliceAccount
where handle='" + lbmemberreportid.Text + "'",
connAdd);
dr = cmd.ExecuteReader();
cmd.Dispose();
if (dr.HasRows)
{
dr.Read();
StringBuilder strBody = new StringBuilder();
//Passing emailid,username and generated unique
code via querystring. For testing pass your
localhost number and while making online pass your
domain name instead of localhost path.
strBody.Append("<a>Please be notified that you've
been assigned a case to handle. Please proceed to
the scene with immediate effect.</a>");
// sbody.Append("&uCode=" + uniqueCode + "&uName="
+ txtUserName.Text + ">Click here to change your
password</a>");
System.Net.Mail.MailMessage mail = new
System.Net.Mail.MailMessage("apr13mpsip@gmail.com",
dr["email"].ToString(), "Case Pending",
strBody.ToString());
//pasing the Gmail credentials to send the email
System.Net.NetworkCredential mailAuthenticaion =
new
System.Net.NetworkCredential("apr13mpsip@gmail.com",
"Temasekpoly13");
System.Net.Mail.SmtpClient mailclient = new
System.Net.Mail.SmtpClient("smtp.gmail.com", 587);
mailclient.EnableSsl = true;
mailclient.Credentials = mailAuthenticaion;
mail.IsBodyHtml = true;
mailclient.Send(mail);
dr.Close();
dr.Dispose();
cmd.ExecuteReader();
cmd.Dispose();
//con.Close();
connAdd.Close();
//lblStatus.ForeColor = System.Drawing.Color.Green;
//lblStatus.Text = "Reset password link has been
sent to your email address";
//txtEmailId.Text = string.Empty;
// txtnric.Text = string.Empty;
// revEmailId.Text = "";
// revNricId.Text = "";
}
lbmemberreportid.Text = "";
ddllocation.SelectedIndex = 0;
ddlnumber.SelectedIndex = 0;
ddlpid1.SelectedIndex = 0;
tbdetails.Text = "";
tbproperty.Text = "";
tbsuspect.Text = "";
ddlpid1.Visible = false;
LoadGrid();
lblmsg.ForeColor = System.Drawing.Color.Green;
lblmsg.Text = "MemberReportID" +
Session["memberreportid"] + "has been successfully
assigned";
}
}
It is working fine for just 1 but not for more than 1 like the code below
if (ddlnumber.SelectedItem.Text.Equals("4"))
{
if (ddlpid4.SelectedItem.Text.Equals("Police ID") ||
ddlpid3.SelectedItem.Text.Equals("Police ID") ||
ddlpid1.SelectedItem.Text.Equals("Police ID") ||
ddlpid2.SelectedItem.Text.Equals("Police ID"))
{
lblmsg.ForeColor = System.Drawing.Color.Red;
lblmsg.Text = "Please ensure the policeID has been
selected";
}
else
{
using (var connAdd = new
SqlConnection(ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString))
{
String assign = ddlpid1.SelectedValue + ", " +
ddlpid2.SelectedValue + ", " +
ddlpid3.SelectedValue + ", " +
ddlpid4.SelectedValue;
connAdd.Open();
var sql = "Update MemberReport Set assignto ='" +
assign + "', caseprogress = 'ongoing' where
memberreportID='" + lbmemberreportid.Text + "'";
using (var cmdAdd = new SqlCommand(sql, connAdd))
{
cmdAdd.ExecuteNonQuery();
}
sql = "Insert into PoliceReport(memberreportid)
values('" + lbmemberreportid.Text + "')";
// sql = "Update PoliceAccount Set handle ='" +
assign + "' where policeid ='" +
ddlpid1.SelectedValue + "' OR '" +
ddlpid2.SelectedValue + "'";
using (var cmdAdd = new SqlCommand(sql, connAdd))
{
cmdAdd.ExecuteNonQuery();
}
sql = "Update PoliceAccount Set handle ='" +
lbmemberreportid.Text + "'where policeid ='" +
ddlpid1.SelectedValue + "' OR policeid = '" +
ddlpid2.SelectedValue + "' OR policeid = '" +
ddlpid3.SelectedValue + "' OR policeid = '" +
ddlpid4.SelectedValue + "'";
// sql = "Update PoliceAccount Set handle ='" +
assign + "' where policeid ='" +
ddlpid1.SelectedValue + "' OR '" +
ddlpid2.SelectedValue + "'";
using (var cmdAdd = new SqlCommand(sql, connAdd))
{
cmdAdd.ExecuteNonQuery();
}
SqlCommand cmd = new SqlCommand();
SqlDataReader dr;
//SqlConnection con = new
SqlConnection(ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString);
//con.Open();
// get the records matching the supplied username
or email id.
cmd = new SqlCommand("select * from PoliceAccount
where handle='" + lbmemberreportid.Text + "'",
connAdd);
dr = cmd.ExecuteReader();
cmd.Dispose();
while (dr.HasRows)
{
dr.Read();
StringBuilder strBody = new StringBuilder();
//Passing emailid,username and generated
unique code via querystring. For testing pass
your localhost number and while making online
pass your domain name instead of localhost
path.
strBody.Append("<a>Please be notified that
you've been assigned a case to handle. Please
proceed to the scene with immediate
effect.</a>");
// sbody.Append("&uCode=" + uniqueCode +
"&uName=" + txtUserName.Text + ">Click here to
change your password</a>");
System.Net.Mail.MailMessage mail = new
System.Net.Mail.MailMessage("apr13mpsip@gmail.com",
dr["email"].ToString(), "Case Pending",
strBody.ToString());
//pasing the Gmail credentials to send the email
System.Net.NetworkCredential mailAuthenticaion
= new
System.Net.NetworkCredential("apr13mpsip@gmail.com",
"Temasekpoly13");
System.Net.Mail.SmtpClient mailclient = new
System.Net.Mail.SmtpClient("smtp.gmail.com",
587);
mailclient.EnableSsl = true;
mailclient.Credentials = mailAuthenticaion;
mail.IsBodyHtml = true;
mailclient.Send(mail);
dr.Close();
dr.Dispose();
cmd.ExecuteReader();
cmd.Dispose();
//con.Close();
connAdd.Close();
//lblStatus.ForeColor =
System.Drawing.Color.Green;
//lblStatus.Text = "Reset password link has
been sent to your email address";
//txtEmailId.Text = string.Empty;
// txtnric.Text = string.Empty;
// revEmailId.Text = "";
// revNricId.Text = "";
}
lbmemberreportid.Text = "";
ddllocation.SelectedIndex = 0;
ddlnumber.SelectedIndex = 0;
ddlpid1.SelectedIndex = 0;
tbdetails.Text = "";
tbproperty.Text = "";
tbsuspect.Text = "";
ddlpid1.Visible = false;
LoadGrid();
lblmsg.ForeColor = System.Drawing.Color.Green;
lblmsg.Text = "MemberReportID" +
Session["memberreportid"] + "has been successfully
assigned";
}
}
Therefore i tried changing this line of code
if(dr.HasRows)
TO
while(dr.HasRow)
to ignite the while loop function but it still doesn't work. How do i loop
and select a specific data from a specific row based on the SQL condition
above
Regards.
I'm trying to do a email smtp function where a user insert a data, the
other party will be notify of the changes. Below is the code where i'm
only able to send email to just 1 person from the database ( this person's
data is the first row of the database )
protected void btnAssign_Click1(object sender, EventArgs e)
{
using (var connAdd = new
SqlConnection(ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString))
{
String assign = ddlpid1.SelectedValue;
connAdd.Open();
var sql = "Update MemberReport Set assignto ='" +
assign + "', caseprogress = 'ongoing' where
memberreportID='" + lbmemberreportid.Text + "'";
using (var cmdAdd = new SqlCommand(sql, connAdd))
{
cmdAdd.ExecuteNonQuery();
}
sql = "Insert into PoliceReport(memberreportid)
values('" + lbmemberreportid.Text + "')";
// sql = "Update PoliceAccount Set handle ='" + assign
+ "' where policeid ='" + ddlpid1.SelectedValue + "'
OR '" + ddlpid2.SelectedValue + "'";
using (var cmdAdd = new SqlCommand(sql, connAdd))
{
cmdAdd.ExecuteNonQuery();
}
sql = "Update PoliceAccount Set handle ='" +
lbmemberreportid.Text + "' where policeid ='" +
ddlpid1.SelectedValue + "'";
// sql = "Update PoliceAccount Set handle ='" + assign
+ "' where policeid ='" + ddlpid1.SelectedValue + "'
OR '" + ddlpid2.SelectedValue + "'";
using (var cmdAdd = new SqlCommand(sql, connAdd))
{
cmdAdd.ExecuteNonQuery();
}
SqlCommand cmd = new SqlCommand();
SqlDataReader dr;
//SqlConnection con = new
SqlConnection(ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString);
//con.Open();
// get the records matching the supplied username or
email id.
cmd = new SqlCommand("select * from PoliceAccount
where handle='" + lbmemberreportid.Text + "'",
connAdd);
dr = cmd.ExecuteReader();
cmd.Dispose();
if (dr.HasRows)
{
dr.Read();
StringBuilder strBody = new StringBuilder();
//Passing emailid,username and generated unique
code via querystring. For testing pass your
localhost number and while making online pass your
domain name instead of localhost path.
strBody.Append("<a>Please be notified that you've
been assigned a case to handle. Please proceed to
the scene with immediate effect.</a>");
// sbody.Append("&uCode=" + uniqueCode + "&uName="
+ txtUserName.Text + ">Click here to change your
password</a>");
System.Net.Mail.MailMessage mail = new
System.Net.Mail.MailMessage("apr13mpsip@gmail.com",
dr["email"].ToString(), "Case Pending",
strBody.ToString());
//pasing the Gmail credentials to send the email
System.Net.NetworkCredential mailAuthenticaion =
new
System.Net.NetworkCredential("apr13mpsip@gmail.com",
"Temasekpoly13");
System.Net.Mail.SmtpClient mailclient = new
System.Net.Mail.SmtpClient("smtp.gmail.com", 587);
mailclient.EnableSsl = true;
mailclient.Credentials = mailAuthenticaion;
mail.IsBodyHtml = true;
mailclient.Send(mail);
dr.Close();
dr.Dispose();
cmd.ExecuteReader();
cmd.Dispose();
//con.Close();
connAdd.Close();
//lblStatus.ForeColor = System.Drawing.Color.Green;
//lblStatus.Text = "Reset password link has been
sent to your email address";
//txtEmailId.Text = string.Empty;
// txtnric.Text = string.Empty;
// revEmailId.Text = "";
// revNricId.Text = "";
}
lbmemberreportid.Text = "";
ddllocation.SelectedIndex = 0;
ddlnumber.SelectedIndex = 0;
ddlpid1.SelectedIndex = 0;
tbdetails.Text = "";
tbproperty.Text = "";
tbsuspect.Text = "";
ddlpid1.Visible = false;
LoadGrid();
lblmsg.ForeColor = System.Drawing.Color.Green;
lblmsg.Text = "MemberReportID" +
Session["memberreportid"] + "has been successfully
assigned";
}
}
It is working fine for just 1 but not for more than 1 like the code below
if (ddlnumber.SelectedItem.Text.Equals("4"))
{
if (ddlpid4.SelectedItem.Text.Equals("Police ID") ||
ddlpid3.SelectedItem.Text.Equals("Police ID") ||
ddlpid1.SelectedItem.Text.Equals("Police ID") ||
ddlpid2.SelectedItem.Text.Equals("Police ID"))
{
lblmsg.ForeColor = System.Drawing.Color.Red;
lblmsg.Text = "Please ensure the policeID has been
selected";
}
else
{
using (var connAdd = new
SqlConnection(ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString))
{
String assign = ddlpid1.SelectedValue + ", " +
ddlpid2.SelectedValue + ", " +
ddlpid3.SelectedValue + ", " +
ddlpid4.SelectedValue;
connAdd.Open();
var sql = "Update MemberReport Set assignto ='" +
assign + "', caseprogress = 'ongoing' where
memberreportID='" + lbmemberreportid.Text + "'";
using (var cmdAdd = new SqlCommand(sql, connAdd))
{
cmdAdd.ExecuteNonQuery();
}
sql = "Insert into PoliceReport(memberreportid)
values('" + lbmemberreportid.Text + "')";
// sql = "Update PoliceAccount Set handle ='" +
assign + "' where policeid ='" +
ddlpid1.SelectedValue + "' OR '" +
ddlpid2.SelectedValue + "'";
using (var cmdAdd = new SqlCommand(sql, connAdd))
{
cmdAdd.ExecuteNonQuery();
}
sql = "Update PoliceAccount Set handle ='" +
lbmemberreportid.Text + "'where policeid ='" +
ddlpid1.SelectedValue + "' OR policeid = '" +
ddlpid2.SelectedValue + "' OR policeid = '" +
ddlpid3.SelectedValue + "' OR policeid = '" +
ddlpid4.SelectedValue + "'";
// sql = "Update PoliceAccount Set handle ='" +
assign + "' where policeid ='" +
ddlpid1.SelectedValue + "' OR '" +
ddlpid2.SelectedValue + "'";
using (var cmdAdd = new SqlCommand(sql, connAdd))
{
cmdAdd.ExecuteNonQuery();
}
SqlCommand cmd = new SqlCommand();
SqlDataReader dr;
//SqlConnection con = new
SqlConnection(ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString);
//con.Open();
// get the records matching the supplied username
or email id.
cmd = new SqlCommand("select * from PoliceAccount
where handle='" + lbmemberreportid.Text + "'",
connAdd);
dr = cmd.ExecuteReader();
cmd.Dispose();
while (dr.HasRows)
{
dr.Read();
StringBuilder strBody = new StringBuilder();
//Passing emailid,username and generated
unique code via querystring. For testing pass
your localhost number and while making online
pass your domain name instead of localhost
path.
strBody.Append("<a>Please be notified that
you've been assigned a case to handle. Please
proceed to the scene with immediate
effect.</a>");
// sbody.Append("&uCode=" + uniqueCode +
"&uName=" + txtUserName.Text + ">Click here to
change your password</a>");
System.Net.Mail.MailMessage mail = new
System.Net.Mail.MailMessage("apr13mpsip@gmail.com",
dr["email"].ToString(), "Case Pending",
strBody.ToString());
//pasing the Gmail credentials to send the email
System.Net.NetworkCredential mailAuthenticaion
= new
System.Net.NetworkCredential("apr13mpsip@gmail.com",
"Temasekpoly13");
System.Net.Mail.SmtpClient mailclient = new
System.Net.Mail.SmtpClient("smtp.gmail.com",
587);
mailclient.EnableSsl = true;
mailclient.Credentials = mailAuthenticaion;
mail.IsBodyHtml = true;
mailclient.Send(mail);
dr.Close();
dr.Dispose();
cmd.ExecuteReader();
cmd.Dispose();
//con.Close();
connAdd.Close();
//lblStatus.ForeColor =
System.Drawing.Color.Green;
//lblStatus.Text = "Reset password link has
been sent to your email address";
//txtEmailId.Text = string.Empty;
// txtnric.Text = string.Empty;
// revEmailId.Text = "";
// revNricId.Text = "";
}
lbmemberreportid.Text = "";
ddllocation.SelectedIndex = 0;
ddlnumber.SelectedIndex = 0;
ddlpid1.SelectedIndex = 0;
tbdetails.Text = "";
tbproperty.Text = "";
tbsuspect.Text = "";
ddlpid1.Visible = false;
LoadGrid();
lblmsg.ForeColor = System.Drawing.Color.Green;
lblmsg.Text = "MemberReportID" +
Session["memberreportid"] + "has been successfully
assigned";
}
}
Therefore i tried changing this line of code
if(dr.HasRows)
TO
while(dr.HasRow)
to ignite the while loop function but it still doesn't work. How do i loop
and select a specific data from a specific row based on the SQL condition
above
Regards.
Saturday, 31 August 2013
QtCreator GUI open text file
QtCreator GUI open text file
I made a push button that will browse and get a textfile. But I need to
open it in a new window to check if the content of the textfile is
correct. How do I do this?
Also, I would like to have a line edit right next to the button that shows
which file I'm looking at. In other words, the directory of the file that
is opened through the button.
Currently, this is what I have:
void MainWindow::on_fileButton_clicked()
{
QString fileName1 = QFileDialog::getOpenFileName(this,tr("Open Text
File"), "", tr("Text Files (*.txt)"));
QFile file1(fileName1);
if(!file1.open(QIODevice::ReadOnly | QIODevice::Text))
return;
QTextStream in(&file1);
while(!in.atEnd()){
QString line = in.readLine();
}
}
I made a push button that will browse and get a textfile. But I need to
open it in a new window to check if the content of the textfile is
correct. How do I do this?
Also, I would like to have a line edit right next to the button that shows
which file I'm looking at. In other words, the directory of the file that
is opened through the button.
Currently, this is what I have:
void MainWindow::on_fileButton_clicked()
{
QString fileName1 = QFileDialog::getOpenFileName(this,tr("Open Text
File"), "", tr("Text Files (*.txt)"));
QFile file1(fileName1);
if(!file1.open(QIODevice::ReadOnly | QIODevice::Text))
return;
QTextStream in(&file1);
while(!in.atEnd()){
QString line = in.readLine();
}
}
How to get my ruby script to accept file or stdin as input?
How to get my ruby script to accept file or stdin as input?
I have a simple ruby script that will "capitalize" titles in a text file
for me. Here's the script:
$ cat capitalize.rb
#!/usr/bin/ruby -w
file = File.new( ARGV[0] , "r")
while (line = file.gets)
#line.capitalize!
ine = line.split(" ").map {|word| word.capitalize}.join(" ")
puts "\t\t,\t\"#{ine}\""
end
file.close
It works fine if I pass it the name of a file:
$ cat lowercase
come back with me (Ep. 0301)
murder will out (Ep. 0302)
snake in the grass (Ep. 0308)
goodbye carl erich (Ep. 0309)
nightmares nest (Ep. 0310)
$ capitalize.rb lowercase
, "Come Back With Me (ep. 0301)"
, "Murder Will Out (ep. 0302)"
, "Snake In The Grass (ep. 0308)"
, "Goodbye Carl Erich (ep. 0309)"
, "Nightmares Nest (ep. 0310)"
But I would like to be able to run the script like this also ...
$ cat lowercase | capitalize.rb
... or even this would be fine ...
$ cat lowercase | capitalize.rb -
... but I get these error messages:
$ cat lowercase | capitalize.rb
/home/red/scripts/capitalize.rb:5:in `initialize': can't convert nil into
String (TypeError)
from /home/red/scripts/capitalize.rb:5:in `new'
from /home/red/scripts/capitalize.rb:5
$ cat lowercase | capitalize.rb -
/home/red/scripts/capitalize.rb:5:in `initialize': No such file or
directory - - (Errno::ENOENT)
from /home/red/scripts/capitalize.rb:5:in `new'
from /home/red/scripts/capitalize.rb:5
... what do I need to change in my capitalize.rb script?
Thanks!
I have a simple ruby script that will "capitalize" titles in a text file
for me. Here's the script:
$ cat capitalize.rb
#!/usr/bin/ruby -w
file = File.new( ARGV[0] , "r")
while (line = file.gets)
#line.capitalize!
ine = line.split(" ").map {|word| word.capitalize}.join(" ")
puts "\t\t,\t\"#{ine}\""
end
file.close
It works fine if I pass it the name of a file:
$ cat lowercase
come back with me (Ep. 0301)
murder will out (Ep. 0302)
snake in the grass (Ep. 0308)
goodbye carl erich (Ep. 0309)
nightmares nest (Ep. 0310)
$ capitalize.rb lowercase
, "Come Back With Me (ep. 0301)"
, "Murder Will Out (ep. 0302)"
, "Snake In The Grass (ep. 0308)"
, "Goodbye Carl Erich (ep. 0309)"
, "Nightmares Nest (ep. 0310)"
But I would like to be able to run the script like this also ...
$ cat lowercase | capitalize.rb
... or even this would be fine ...
$ cat lowercase | capitalize.rb -
... but I get these error messages:
$ cat lowercase | capitalize.rb
/home/red/scripts/capitalize.rb:5:in `initialize': can't convert nil into
String (TypeError)
from /home/red/scripts/capitalize.rb:5:in `new'
from /home/red/scripts/capitalize.rb:5
$ cat lowercase | capitalize.rb -
/home/red/scripts/capitalize.rb:5:in `initialize': No such file or
directory - - (Errno::ENOENT)
from /home/red/scripts/capitalize.rb:5:in `new'
from /home/red/scripts/capitalize.rb:5
... what do I need to change in my capitalize.rb script?
Thanks!
Put on screen controller(Up,Down,Left,Right) Actions
Put on screen controller(Up,Down,Left,Right) Actions
TouchCollection touchCollection = TouchPanel.GetState();
foreach (TouchLocation tl in touchCollection)
{
if (tl.State == TouchLocationState.Pressed)
{
position.Y = position.Y - speed;
}
if (tl.State == TouchLocationState.Released)
{
position.Y = position.Y + speed;
}
}
Can you help me guys, I can`t create a touch event of my game. Thank in
Advance :)
TouchCollection touchCollection = TouchPanel.GetState();
foreach (TouchLocation tl in touchCollection)
{
if (tl.State == TouchLocationState.Pressed)
{
position.Y = position.Y - speed;
}
if (tl.State == TouchLocationState.Released)
{
position.Y = position.Y + speed;
}
}
Can you help me guys, I can`t create a touch event of my game. Thank in
Advance :)
Meaning of Log f0 delta
Meaning of Log f0 delta
I am just walking through a really long section of code that I need to
rework for a company. I have to re-write it in a different language.
This code deals with calculating "log f0 delta". This has something to do
with audio and a pitch curve.
My question would be: Does anybody know from just hearing this topic what
is done there? The code is REALLY huge, and I would really like to
understand what exactely is calculated there before I re-write it. That
would make it easier for me.
Thank you very much for the help!
I am just walking through a really long section of code that I need to
rework for a company. I have to re-write it in a different language.
This code deals with calculating "log f0 delta". This has something to do
with audio and a pitch curve.
My question would be: Does anybody know from just hearing this topic what
is done there? The code is REALLY huge, and I would really like to
understand what exactely is calculated there before I re-write it. That
would make it easier for me.
Thank you very much for the help!
Subscribe to:
Posts (Atom)