You can't really blame this guy for not wanting to try anything out for himself, it's an extremely easy route to try in life. I blame it on the parents.
althamda
Posts
-
SqlCommand -
Is it possible to hide child replies until one clicks on the respectiveparent query?That's awesomely fantastic that is. Can anyone decipher this?
-
Error 550: FTPAmazingly enough I just googled ftp error codes and it gave me a list of all the ftp error codes. Maybe you should try.
-
Authenticate to a site -
Authenticate to a siteDepends on the kind of authentication the site requires, if the site uses cookies to set authentication, then use cookies in your code.
-
setting large amount of text in textboxIt's not introducing a bug, if you had read the original thread from a few days ago you'd realise that this is what the OP wanted - 'convert "aabb" to "aAbB" and set it to the textbox as quickly as possible'. Thanks.
-
FolderBrowserDialog.SelectedPathYou could store it in the registry. http://www.codeproject.com/cs/system/modifyregistry.asp[^]
-
setting large amount of text in textboxHere's my code. I'm using a standard textbox.
textBox2.Clear(); DateTime dt = DateTime.Now; StreamReader sr = new StreamReader(@"C:\test\test.txt"); char[] c = sr.ReadToEnd().ToCharArray(); progressBar1.Maximum = c.Length; for (int i = 0; i < c.Length; i += 2) { if ((int)c[i] >= 97 && (int)c[i] <= 122) c[i] = (char)((int)c[i] - 32); if (i % 10000 == 0) progressBar1.Value = i; } textBox2.AppendText(new string(c)); MessageBox.Show((DateTime.Now.Ticks - dt.Ticks).ToString());
Note that a textbox does only store 32k of text, but if your assignment says you just have to fill a textbox, then you are only doing what it says...
-
setting large amount of text in textboxI can process a 20 meg file and display it with appendtext in 4 seconds.
-
setting large amount of text in textboxInstead of using
txtbox_result.Text = new string(text);
Do thistxtbox_result.AppendText(new string(text));
-
setting large amount of text in textboxYou could even call your progress bar update fewer times than you are, with a 20 meg file you're currently calling the progress bar update more than 20,000 times. If this takes 10 secs to go through the for loop, that's 2000 progress bar updates per second, bit of overkill there.
-
setting large amount of text in textboxI'm not too sure about putting text into a textbox quicker, but if you definately know that every 2nd character is a letter, then using
text[i] = (char)((int)text[i] - 32);
is quicker than usingtext[i] = char.ToUpper(text[i]);
-
speed boostWouldn't using a char[] be faster than using a StringBuilder?
char[] c = sr.ReadToEnd().ToCharArray(); for (int i = 0; i < c.Length; i+=2) { c[i] = (char)((int)c[i] - 32); }
-
speed boostYou could go through the text as a char array and just subtract 32 from each other char to get uppercase. Might be a little faster.
-
Problem launching email clientThe reason it's not working is because the maximum length of a query string in IE is 2048 characters. Check System.Web.Mail for sending emails.
-
Problem while Drive ListingI'm not sure if this will help you.
string[] drives = Environment.GetLogicalDrives();
-
Forum programHave you googled for this? I just googled for "forum software c#" and got 4.5 million results, how about that!
-
Truncate decimal placeCan't you just do this?
double d = 128.158676; Convert.ToDouble(Convert.ToInt32(d * 10)) / 10;
-
Help regarding password char in textboxDo the following
textBox1.PasswordChar = '\0';
-
Using Regular ExpressionVery true, in that case - ]*src=[^>]*> That's even if he needs the src= bit in there, would probably work as ]*>