Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
A

althamda

@althamda
About
Posts
53
Topics
1
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • SqlCommand
    A althamda

    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.

    C# database question

  • Is it possible to hide child replies until one clicks on the respectiveparent query?
    A althamda

    That's awesomely fantastic that is. Can anyone decipher this?

    C# database data-structures question

  • Error 550: FTP
    A althamda

    Amazingly enough I just googled ftp error codes and it gave me a list of all the ftp error codes. Maybe you should try.

    C# help

  • Authenticate to a site
    A althamda

    http://www.google.co.uk/search?hl=en&q=http+authentication+with+c%23&meta=[^]

    C# question com security xml help

  • Authenticate to a site
    A althamda

    Depends on the kind of authentication the site requires, if the site uses cookies to set authentication, then use cookies in your code.

    C# question com security xml help

  • setting large amount of text in textbox
    A althamda

    It'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.

    C# css performance help tutorial question

  • FolderBrowserDialog.SelectedPath
    A althamda

    You could store it in the registry. http://www.codeproject.com/cs/system/modifyregistry.asp[^]

    C# question

  • setting large amount of text in textbox
    A althamda

    Here'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...

    C# css performance help tutorial question

  • setting large amount of text in textbox
    A althamda

    I can process a 20 meg file and display it with appendtext in 4 seconds.

    C# css performance help tutorial question

  • setting large amount of text in textbox
    A althamda

    Instead of using txtbox_result.Text = new string(text); Do this txtbox_result.AppendText(new string(text));

    C# css performance help tutorial question

  • setting large amount of text in textbox
    A althamda

    You 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.

    C# css performance help tutorial question

  • setting large amount of text in textbox
    A althamda

    I'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 using text[i] = char.ToUpper(text[i]);

    C# css performance help tutorial question

  • speed boost
    A althamda

    Wouldn'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); }

    C# css performance question

  • speed boost
    A althamda

    You 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.

    C# css performance question

  • Problem launching email client
    A althamda

    The 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.

    C# question help

  • Problem while Drive Listing
    A althamda

    I'm not sure if this will help you. string[] drives = Environment.GetLogicalDrives();

    C# help question

  • Forum program
    A althamda

    Have you googled for this? I just googled for "forum software c#" and got 4.5 million results, how about that!

    C# csharp

  • Truncate decimal place
    A althamda

    Can't you just do this? double d = 128.158676; Convert.ToDouble(Convert.ToInt32(d * 10)) / 10;

    C# tutorial question

  • Help regarding password char in textbox
    A althamda

    Do the following textBox1.PasswordChar = '\0';

    C# question help

  • Using Regular Expression
    A althamda

    Very true, in that case - ]*src=[^>]*> That's even if he needs the src= bit in there, would probably work as ]*>

    C# regex html testing beta-testing help
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups