|
Thank you. I will look into the information you provided.
Blitz
|
|
|
|
|
Hi,
Why dont you try to build a windows Service?
And setup the next execution in the app.config file or maybe in a database.
|
|
|
|
|
Thank you.
I have one question. What is a windows service? Also, can you point me to an example of it.
Thank you.
Blitz
|
|
|
|
|
|
I have a new installation of VS2008 after a PC Rebuild and "Startup" does not appear under: Tools|Options|Environment. It was there before the rebuild.
Any ideas why it is missing and how to get it to appear? In particular I want to get VS to "Load last loaded solution" at startup.
|
|
|
|
|
Forget it, couldn't see the wood for the trees.
|
|
|
|
|
He he he.
My other signature is a Porche.
|
|
|
|
|
Naruki wrote: My other signature is a Porche.
You should reevaluate your sig as it is "Porsche", I should know.
|
|
|
|
|
I can't afford the 's'.
A man applied for a job to paint someone's porch for $100. The owner pointed him to several cans of white paint stacked on a weathered wood deck and told him to get started while he went in to eat lunch.
When the owner finished he went out to find the man snoozing on a rocking chair. Angrily he demanded to know why the man wasn't painting.
"I finished about twenty minutes ago. By the way, that's not a Porch, it's a BMW."
My other signature is a Porche.
|
|
|
|
|
Naruki wrote: A man applied for a job to paint someone's porch for $100.
On old one but .....
Here's $10 for the 's'.
|
|
|
|
|
Hi! I have to read a file and do some operations to it. The contents of the file are words - it is like a dictionary (over 10 000 words, later over 80 000). Each word must be read and compared to others. Which is the best way of accessing the data (and the fastest):
1) Read the whole file and add the lines to an ArrayList, after that the stream is disposed. Then do whatever I want to the lines.
OR
2) Open the stream and read each line and do whatever I want to it. During all the time the stream is opened!
Also I want to report progress.
1) With the the ArrayList:
int progress = 0;<br />
for (int i = 0; i < rawLines.Count; i++)<br />
{<br />
line = rawLines[i] as string;<br />
if ((i / rawLines.Count) * 100 > progress)<br />
{<br />
progress = (i / rawLines.Count) * 100;
Console.Title = progress.ToString() + "%";<br />
}<br />
}
2) With the stream:
int progress = 0;<br />
int rawProgress;<br />
while ((line = reader.ReadLine()) != null)<br />
{<br />
rawProgress = (int)((reader.BaseStream.Position / reader.BaseStream.Length) * 100);<br />
if (rawProgress > progress)<br />
{<br />
progress = rawProgress;
Console.Title = progress.ToString() + "%";<br />
}<br />
}
But! Both ways don't seem to work. With the stream, the value of reader.BaseStream.Position is always 1024. In the other case the value of i increases but the percentage in the console's title does not change?!
Still learning...
|
|
|
|
|
Use BackGroundWorker class
http://msdn.microsoft.com/en-us/library/system.componentmodel.backgroundworker.aspx
|
|
|
|
|
I had a variant of the program as windows form application done with threads. But the same problem, also there was a cross thread problem. This variant is a console project. I don't see why there should be another thread.
Still learning...
|
|
|
|
|
Hi,
as there is no need to read the entire file at once, don't do it. It increases your memory footprint and probably decreases performance. Use the stream instead.
((reader.BaseStream.Position / reader.BaseStream.Length) * 100) is wrong: since the division has two integer operands, with numerator <= denominator, it will equal zero until the end, where it becomes one. The right way to do this is first convert at least one number to float or double, then multiply by 100, then divide, then convert back to int.
if this is a console app, there is no need for extra threads, the console would be just waiting anyway.
|
|
|
|
|
That worked excellent. Thank you! But what will happen if the console is closed during the read?
Still learning...
|
|
|
|
|
if you force a thread to abort and it happens to be the last foreground thread in a process, the process stops, no matter what.
In the simplest case, having a console app without extra threads, closing the window stops all of it.
If you don't like it that way, I would suggest creating a Windows app instead, and using its FormClosing event, cancel the close if you don't want it to happen.
|
|
|
|
|
Hi guys,
I have a list view that i want to to clear so that i can import data from a serialized file in it.
i use the listview1.Clear() command that clears also the column headers, and the de-serialization doesn't work without the column headers.
I have tried before the Clear() method this code :
<br />
System.Windows.Forms.ListView.ColumnHeaderCollection coloane = listView1.Columns;<br />
foreach (ColumnHeader header in coloane)<br />
{<br />
listView1.Columns.Add(header.Text);<br />
<br />
}<br />
listView1.Clear();
and still it doesn't work.
Any suggestions on how to clear a ListView without the colum headers ?
Regards,
Alex
“Be the change you want to see in the world.”
|
|
|
|
|
try ListView.Items.Clear() to clear the content, not the view itself.
|
|
|
|
|
beat me to it
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn) Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia) Why are you using VB6? Do you hate yourself? (Christian Graus)
|
|
|
|
|
try listView1.Items.Clear();
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn) Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia) Why are you using VB6? Do you hate yourself? (Christian Graus)
|
|
|
|
|
|
i am new to c# i want to develop a social web site like twitter.com with all those features of twitter,orkut..etc where can i find tutorial like books,videos etc i am a student my pocket money is not enough to survive for even a week so please i cant pay for the tutorials help me out it's the first project of my life
|
|
|
|
|
Aren't you starting with your targets a little high?
I suggest you take a look at a few of the articles in the Web development section and get started there
|
|
|
|
|
can u tel me which article to look i am a bit confused and tensed.
|
|
|
|
|
Hello,
I need a way to embed an editable Excel worksheet in my C# application so my users can input data. One of the main reasons I would like to use the excel worksheet is to allow them to enter data into multiple columns with varied number of rows. I wish to then collect the data in the application and process it. I have created a new project and was able to use the control in my form however, I do not know how to extract any data from from it. Can anyone point me to some examples or documentation that will assist me. Any help would be most appreciated.
Thanks!
|
|
|
|