|
Do a search on CodeProject for keyboard hooks and hopefully that'll explain things.
I doubt it. If it isn't intuitive then we need to fix it. - Chris Maunder
|
|
|
|
|
sakshismriti wrote: sunning in sidebar
Sounds like a cool thing to do on a Saturday afternoon
Dave
|
|
|
|
|
Hi
I am working on a Semantic Web project that the Ontology's defined in Protege. Jena is required in order to make an GUI; but the problem is that Jena is Java based framework! I have installed IKVM to convert the Java library to be alble to be applied in .NET framework; Now I need to apply a piece of code to be able to connect the Protege(database) to run the query.
Thanks
|
|
|
|
|
I am working with DataGridView which has a ComboBox with associated datasource.
i would like to have this ComboBox editable that users can also add their values to comboBox.
plz let me have which property i can use to make editable.
Thanks in Advance.
Abdul Rahaman Hamidy
Senior Student Student in Computer Science
Kabul, Afghanistan
Software Developer
|
|
|
|
|
Good Day,
In the past, when I want to compute for the hash of a certain file, what I do is I open it first then compute for the HASH like so:
byte[] myfile = File.ReadAllBytes(path);
SHA1CryptoServiceProvider SHA1 = new SHA1CryptoServiceProvider();
Console.WriteLine(Convert.ToBase64String(SHA1.ComputeHash(myfile)));
In that code, you can see the presence of the File.ReadAllBytes reads the entire file.
Is there any other way to compute for the SHA-1 Hash of the file without actually opening it?
Thanks.
It is said that the most complex structures built by mankind are software systems. This is not generally appreciated because most people cannot see them. Maybe that's a good thing because if we saw them as buildings, we'd deem many of them unsafe.
|
|
|
|
|
No, since the hash is merely an operation on a collection of data, which in this case happens to be the contents of the file.
/ravi
|
|
|
|
|
Have you tried using the overload method
public byte[] ComputeHash(
Stream inputStream
)
If it takes a stream, then it maybe calculates the hash by not reading all bytes at once, but sequentially.
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
Hi all
I need to get list of files in the remote directory in C#.NET, its a windows based application.
eg: http://192.168.1.65/project1/directory/
URL = http://192.168.1.65/project1/directory
I tried in System.IO.Directory.GetFiles(URL), but it throws an error "URI format is not supported"
please tell me if anybody knows
Thanks & Regards
Kumaran
|
|
|
|
|
AFAIK, Directory.GetFiles() only supports the file:// protocol.
/ravi
|
|
|
|
|
System.IO is managing local resources. Check out the System.Web or System.Net namespaces.
|
|
|
|
|
Hi all,
Please help to solve the below problem.
I am having a string as below. From that how to replace the line break to HTML break tag
<body>
This is line one
This is line two after the line break
</body>
In the above i have to replace the space between the two lines using HTML break tag <br/>
Thanks in advance
Know is Drop, Unknown is Ocean
|
|
|
|
|
You could use regular expressions for that.
Something like that:
Regex regex = new Regex(@"^\r\n", RegexOptions.Multiline);
html = regex.Replace(html, @"<br/>");
replaces all the carriage return and newline groups with <br/> from the beginning of a line.
|
|
|
|
|
While the string is in memory it'll likely contain only the '\n', not the '\r'.
|
|
|
|
|
Nope, it contains the carriage return and the newline also.
|
|
|
|
|
Thankyou very much
it's working good
Know is Drop, Unknown is Ocean
|
|
|
|
|
I wonder if Filesystemwatcher class can handle deletion of more than 3 file objectcs at once (e.g. multiple selection in windows explorer)
|
|
|
|
|
Why don't you try it yourself?
Giorgi Dalakishvili
#region signature
my articles
#endregion
|
|
|
|
|
So did I I've tried msdn sample-based code and have been loosing updates when creating or deleting more than two files at once
Internalbuffersize property had been set to 32 or 64K
handling code was reduced to incremental(nadd++, ndel++) operatation never the less the variable value was not equal to number of files processed.
|
|
|
|
|
when i run my windows application project using visual studio, everything looks fine. However when i execute the file in my release folder, everything thing looks like in the classic theme instead of the Window XP theme
Can anyone help?
|
|
|
|
|
nevermind, found the cause of the problem
|
|
|
|
|
i just want to make a web application that make mobile skin
like ((www.ownskin.com))
and iwant any one to help me o how can i make it or if there are any i can get help?
|
|
|
|
|
hi.. why when i drag out a listview in vs 2005.
i cant get teh function of listview.selectedindex ?
only selecteditem ..
i want to get the id of the data selected ..
|
|
|
|
|
You have SelectedItems and SelectedIndices - check the Count property of either one of these to make sure there is at least one item selected and if you're just wanting the first item selected then something like this:
int firstSelectedIndex1 = listView1.SelectedItems[0].Index;
int firstSelectedIndex2 = listView1.SelectedIndices[0];
Dave
|
|
|
|
|
hi.. sorry.. i think i would like to use up the DataGridView called dvCustomer
under
private void dvCustomer_SelectionChanged(object sender, EventArgs e)
{
}
when i click on the datagridview row... i would like to get the user ID from database. so that i can do the update as below ..
private void cust_update_Click(object sender, EventArgs e)
{
bool success;
success = dataAccess.AddCustomer(<big>Datagridview ID</big>, cust_name.Text, cust_add.Text, cust_account.Text, cust_phone.Text...);
if (success)
{
MessageBox.Show("Data updated!");
}
else
{
MessageBox.Show("Update FAIL!!!");
}
}
in my dataAccess class
public bool AddCustomer(string function, string custName, string custAdd, string custAcc, string custPhone.....)
{
bool success = false;
string query = string.Empty;
try
{
SqlCommand cmd = new SqlCommand();
cmd.Parameters.Add(new SqlParameter("@companyName", custName));
cmd.Parameters.Add(new SqlParameter("@customerAdd", custAdd));
cmd.Parameters.Add(new SqlParameter("@attName", custAdd));
cmd.Parameters.Add(new SqlParameter("@customerAcc", custAcc));
cmd.Parameters.Add(new SqlParameter("@customerPhone", custPhone));
query += "UPDATE CUSTOMER set company_name= @companyName, company_add= @customerAdd, att_name= @attName, account_num= @customerAcc, phone= @customerPhone...........";
query += " where cust_id = <big>??????????</big> ";
cmd.CommandText = query;
if (cn.State == ConnectionState.Closed) cn.Open();
cmd.Connection = cn;
if (cmd.ExecuteNonQuery() > 0)
{
success = true;
return success;
}
|
|
|
|
|
may i know how do i get the ID from the datagridview ?
|
|
|
|