Click here to Skip to main content
15,886,873 members
Home / Discussions / C#
   

C#

 
GeneralRe: Adapt forms to screen resolution Pin
Heath Stewart8-Feb-04 18:07
protectorHeath Stewart8-Feb-04 18:07 
Questionminimize to tray? Pin
visiontec8-Feb-04 7:43
visiontec8-Feb-04 7:43 
AnswerRe: minimize to tray? Pin
OmegaSupreme8-Feb-04 10:18
OmegaSupreme8-Feb-04 10:18 
GeneralRe: minimize to tray? Pin
visiontec9-Feb-04 11:34
visiontec9-Feb-04 11:34 
GeneralRe: minimize to tray? Pin
OmegaSupreme9-Feb-04 15:25
OmegaSupreme9-Feb-04 15:25 
GeneralAdding parameters to a table Pin
Andrlage8-Feb-04 5:30
Andrlage8-Feb-04 5:30 
GeneralRe: Adding parameters to a table Pin
Nick Parker8-Feb-04 6:02
protectorNick Parker8-Feb-04 6:02 
QuestionMost efficient way of doing this? Pin
Alex Korchemniy7-Feb-04 22:31
Alex Korchemniy7-Feb-04 22:31 
I'm doing some statistical analysis work. I have a binary file that contains around 10 million integers. This is my test method:

<br />
Hashtable myNumber = new Hashtable();<br />
			Random r = new Random(13214);<br />
			for(int j = 0; j < 10000; j++)<br />
			{<br />
				int c = r.Next(9999999);<br />
				if(!myNumber.ContainsKey(c))<br />
					myNumber.Add(c, null);<br />
			}<br />
<br />
			int p = 0;<br />
			FileStream fs = new FileStream(Directory.GetCurrentDirectory() + "\\test.txt", FileMode.Open, FileAccess.Read);<br />
			BinaryReader bw = new BinaryReader(fs);<br />
			Hashtable h = new Hashtable();<br />
			DateTime s = DateTime.Now;<br />
			int foundnumbers = 0;<br />
			for(int i = 0; i < 10000000; i++)<br />
			{<br />
				int current = bw.ReadInt32();<br />
				if (myNumber.ContainsKey(current))<br />
					foundnumbers++;<br />
			}<br />
			bw.Close();<br />


Is there anyway to improve the performance? What I need is to see if a set of numbers is contained in the file.
GeneralZooming approach Pin
Meysam Mahfouzi7-Feb-04 18:08
Meysam Mahfouzi7-Feb-04 18:08 
GeneralRe: Zooming approach Pin
Heath Stewart7-Feb-04 19:00
protectorHeath Stewart7-Feb-04 19:00 
GeneralCombo Box problem... Pin
je_gonzalez7-Feb-04 17:27
je_gonzalez7-Feb-04 17:27 
GeneralDatabase Pin
ASGill7-Feb-04 17:16
ASGill7-Feb-04 17:16 
GeneralRe: Database Pin
Heath Stewart7-Feb-04 18:50
protectorHeath Stewart7-Feb-04 18:50 
GeneralMore Thread Troubles; not sure if it's deadlock Pin
Peter Mills7-Feb-04 14:41
Peter Mills7-Feb-04 14:41 
GeneralRe: More Thread Troubles; not sure if it's deadlock Pin
Heath Stewart7-Feb-04 18:58
protectorHeath Stewart7-Feb-04 18:58 
GeneralWell it's got me stumped Pin
Rob Manderson7-Feb-04 14:08
protectorRob Manderson7-Feb-04 14:08 
GeneralRe: Well it's got me stumped Pin
Rob Manderson7-Feb-04 16:25
protectorRob Manderson7-Feb-04 16:25 
GeneralRe: Well it's got me stumped Pin
Heath Stewart7-Feb-04 19:08
protectorHeath Stewart7-Feb-04 19:08 
GeneralRe: Well it's got me stumped Pin
Rob Manderson7-Feb-04 22:25
protectorRob Manderson7-Feb-04 22:25 
GeneralRe: Well it's got me stumped Pin
Heath Stewart8-Feb-04 5:40
protectorHeath Stewart8-Feb-04 5:40 
QuestionHow to make panel scroll when scrollbar is moved? Pin
rul3037-Feb-04 13:45
rul3037-Feb-04 13:45 
AnswerRe: How to make panel scroll when scrollbar is moved? Pin
Heath Stewart7-Feb-04 19:12
protectorHeath Stewart7-Feb-04 19:12 
GeneralRe: How to make panel scroll when scrollbar is moved? Pin
rul3038-Feb-04 7:02
rul3038-Feb-04 7:02 
GeneralRe: How to make panel scroll when scrollbar is moved? Pin
Heath Stewart8-Feb-04 7:07
protectorHeath Stewart8-Feb-04 7:07 
GeneralGUID Conversion Pin
Tristan Rhodes7-Feb-04 8:34
Tristan Rhodes7-Feb-04 8:34 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.