|
|
Cheers, that fixed it.
Regards,
Gareth.
|
|
|
|
|
I want to write a little program that would convert any specific string into a mysql hash password. I can do this thru mysql itself, however I want to implimenent with C#. it Mysql I would just do Password('string') and that would give me 5569C9CAE94A5E43CD192F9F6AD2A1C171D5465F, How can I do this with C#?
|
|
|
|
|
What hashing algorithm does the MySQL function use?
The System.Security.Cryptography namespace contains providers for calculating MD5, MD160, SHA1, SHA256, SHA384 and SHA512 hash codes.
---
single minded; short sighted; long gone;
|
|
|
|
|
I'm not sure how to use this md5 hash. Can you give me a sample code to hash a basic string "string"?
|
|
|
|
|
|
im working on a editor that uses RichTextBox, and as a added feature, im using a syntax highliter from here -> http://www.codeproject.com/cs/miscctrl/SyntaxHighlighting.asp?df=100&forumid=185470[^]
I downloaded the source and editted the form1.cs with like this:
shtb.FilterAutoComplete = true;
and i compiled the source and when i tested my App, the autocomplete feature isnt working...
I even tried to download his demo project and tried to use autocomplete and it didnt work. Where im i going wrong... can someone help me please ~
|
|
|
|
|
Use the forum at the bottom of the article to ask for help with article thingys
led mike
|
|
|
|
|
It's as if he given up support on the project, i went thuru all of the coments first, someone actually reported this problem and no one (including the author) replied, so i thought i'd ask at the main board where the smart people hang out >_>;
Anyone actually has a useful answer? this is one last feature i need implementing in my editor, any help would be much appreciated...
|
|
|
|
|
Check the function CompleteWord() in the file SyntaxHighlightingTextBox.cs - you need to press CTRL and SPACE whilst typing a word,
it works me - if does not work for you put a breakpoint on the WndProc(ref Message m) function
for the case Win32.WM_KEYDOWN: and see why it's not being shown
Note: I did convert this into a Visual Studio 2005 solution but I presume that this should still work in 2003?
Mark.
|
|
|
|
|
Beautiful stuff mate, i honestly didnt know abt Ctrl + Space to bring up the autocomplete box.
This works so well, im glad i posted this question here. Thanks allot again ^_^;
|
|
|
|
|
I am designing a Windows Application. In the Settings class of this Application the user has to set a Directory Path to a Software program. I created a browsing button With the "FolderBrowserDialog" and with "FolderBrowserDialog.SelectedPath" I show this selected path in a textbox.
Now this works, but the "FolderBrowserDialog.SelectedPath" is not remembered by the application when I restart it.
How can can I store this SelectedPath? ( I also need this path as a string variable in other Classes)
|
|
|
|
|
|
Sorry but your link gave me an internal blackout... I just started programming in Visual C# using the Visual Studio manual. Sofar everything was clear, but I got stucked in how to handle my application settings. In the manual I found in the ApplicationSettingsBase this example for saving settings:
<br />
private void Form1_FormClosing(object sender, FormClosingEventArgs e)<br />
{<br />
frmSettings1.FormText = this.Text + '.';<br />
frmSettings1.Save();<br />
so my questions are:
1. Are the ApplicationSettingsBase commands the way to store and reload application settings?
2. If yes: is this applicable to the problem/question in my first message?
3. where should i put this code?
|
|
|
|
|
Make sure you use the same instance of FolderBrowserDialog in order the remember the settings. (A member variable or something like that)
|
|
|
|
|
hi,..
im doing some task that convert vb.net code into c#.net code...so there having some method..like...
Public Function GetCallbackResult() As String Implements _
System.Web.UI.ICallbackEventHandler.GetCallbackResult
// code running..
........
End Function
..........................................................
Partial Class <myclass>
Inherits System.Web.UI.Page
Implements System.Web.UI.ICallbackEventHandler
..............................................................
Public Shared Function GetInfoByDate(ByVal Id As Integer,
ByVal ToDate As Date,
Optional ByVal MaxRows As Integer=0)As SqlDataReader
// code running..
........
End Function
are their any c# code definitions or any sample plz supply me.
thanks in advance....
|
|
|
|
|
ASysSolvers wrote: Public Function GetCallbackResult() As String Implements _
System.Web.UI.ICallbackEventHandler.GetCallbackResult
// code running..
........
End Function
In C#:
public GetCallbackResult()
{
}
Remember that the interface is defined at the top of the class
public class MyClass : System.Web.UI.ICallbackEventHandler
{
}
ASysSolvers wrote: Partial Class
Inherits System.Web.UI.Page
Implements System.Web.UI.ICallbackEventHandler
partial class MyClassName : System.Web.UI.Page, System.Web.UI.ICallbackEventHandler
{
}
ASysSolvers wrote: Public Shared Function GetInfoByDate(ByVal Id As Integer,
ByVal ToDate As Date,
Optional ByVal MaxRows As Integer=0)As SqlDataReader
// code running..
........
End Function
C# doesn't support optional parameters like VB does. You have to create overloaded methods like this:
public static SqlDataReader GetInfoByDate(int Id, DateTime ToDate)
{
GetInfoByDate(Id, ToDate, 0);
}
public static SqlDataReader (int Id, DateTime Date, int MaxRows)
{
}
Does this help?
|
|
|
|
|
Beat me by 5 minutes!
-----------------------------
In just two days, tomorrow will be yesterday.
|
|
|
|
|
Scott Dorman wrote: Beat me by 5 minutes!
Well, it did take a while to put the post together.
|
|
|
|
|
hi,..Colin..
thank u very much! it's really usefull.
mmm..thnks for the lingedIn site anyway )...
|
|
|
|
|
I'm not 100% sure of this one, but I think it should be:
Public Function GetCallbackResult() As String Implements _
System.Web.UI.ICallbackEventHandler.GetCallbackResult
End Function
public override string GetCallbackResult() This is inheritance of both a base class and an interface, which uses the same syntax.
Partial Class
Inherits System.Web.UI.Page
Implements System.Web.UI.ICallbackEventHandler
partial class : System.Web.UI.Page, System.Web.UI.ICallbackEventHandler C# doesn't allow optional parameters. You achieve this by creating overloads on the function. In this case, the "shorter" function just calls the "longer" one and passes the parameters along with the default value for MaxRows.
Public Shared Function GetInfoByDate(ByVal Id As Integer,
ByVal ToDate As Date,
Optional ByVal MaxRows As Integer=0)As SqlDataReader
End Function
public static SqlDataReader GetInfoByDate(int id, Date toDate)
{
return GetInfoByDate(Id, ToDate, 0);
}
public static SqlDataReader GetInfoByDate(int id, Date toDate, int maxRows) Also, note the syntax difference. C# is a case-sensitive language, unlike VB.NET.
-----------------------------
In just two days, tomorrow will be yesterday.
|
|
|
|
|
hi.Scott..,
thank u very much for help...it was great...
---------------------------------
In just second,it will be past also..
|
|
|
|
|
***********************************************
good artical regarding this....
http://msdn2.microsoft.com/en-us/library/ms178208.aspx
|
|
|
|
|
I have a scrollable pane with images in it.
I would like to move the contents of the pane from a function.
The only thing I have found so far is to call performScrollHorizontal several times.
Ideally I would like to call scrollable.panel.hPos = 4711 or somthing like that.
I tried using SetScrollPos but that only moved the scrollbar not the content.
Any tips to where I should start looking next?
|
|
|
|
|
Guys,
A few days ago I asked about an assignment we had to do here at work. convert "aabb" to "aAbB" and set it to the textbox as quickly as possible. I think the conversion itself is very quick, reading in and converting in 1 or 2 seconds, but setting the entire thing in the texbox takes me another 10 seconds! (20 MB file)
I've read about the AppendText property and tried to set my characterarray to the box inside my loop, but so far the fastest results I got where form txtbox_result.Text = new string(text); where text = char [].
Any ideas on how to speed this up? (Suspend/resumelayout don't help either)
thanks !
PS: here's tho code I got so far:
starttime = DateTime.Now;
reader = new System.IO.StreamReader(openfiledlg.FileName);
char [] text = reader.ReadToEnd().ToCharArray();
reader.Close();
difference = DateTime.Now - starttime;
lbl_result.Text = "File read: " + difference.TotalMilliseconds + " milliseconds.";
lbl_result.Refresh();
pb_conversion.Maximum = text.Length;
int i2 = 0;
for(int i = 1; i < text.Length; i+=2){
text[i] = char.ToUpper(text[i]);
if(++i2 == 1000){
i2 = 0;
pb_conversion.Value = i;
}
}
difference = DateTime.Now - starttime;
lbl_result.Text = "conversion: " + difference.TotalMilliseconds + " milliseconds.";
lbl_result.Refresh();
pb_conversion.Value = pb_conversion.Maximum;
txtbox_result.SuspendLayout();
txtbox_result.Text = new string(text);
txtbox_result.ResumeLayout();
difference = DateTime.Now - starttime;
lbl_result.Text = "Done in: " + difference.TotalMilliseconds + " milliseconds.";
V.
I found a living worth working for, but haven't found work worth living for.
|
|
|
|