|
If your only going to be using a single instance processor, why read ahead of it? You're not gaining any real performance benefit because of the single threaded nature of your design. One thread is constantly waiting for another to complete it's work. The FileStream classes already do read/write caching on their own, so why duplicate its effort?
If you could use a multiple instance processor, instead of a single, THEN you'd see the performance gain. Also, your reader object shouldn't be reading the files itself. Your design should have an engine that hunts down files, then passes the filename to a threaded instance of the processor. That way, the processor thread is doing the reading and processing of the file while your engine goes on it's merry way to launch another processor on the next file. The thread pool could be used for such a task. That way, you wouldn't have to include very much code to do thread management.
I only say this because I did something similar to this a few years ago. But in my case, the database made sure I wasn't duplicating data, not my processor objects.
RageInTheMachine9532
"...a pungent, gastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Thanks for your comments.
The majority of the time the app will be run on a single instance processor machine, but there may be a case where the volume of data is so large a multi machine could be used.
I wish the database would control data duplication, but the data is so poor and badly supplied that I have to do all the checking that I can. For example the data is in XML format and one 33mb file had over 10,000 violations against the schema, but it was well formed!
In the interests of simplicity I leave it as single threaded.
|
|
|
|
|
I need to use msdn not through VS IDE. like standalone help files.
is it possible ? if it is then which file i want to execute ?
Sreejith S S Nair
|
|
|
|
|
You should have a shortcut in your start menu somewhere ...
Q:What does the derived class in C# tell to it's parent?
A:All your base are belong to us!
|
|
|
|
|
Let me clarify the question once again.
i don't have any menu or link which will connect MSDN index page. I have only the installation folder.
if i want to open help index with using VS IDE, what i want to do ?
Sreejith S S Nair
|
|
|
|
|
Hi,
certainly possible...
Microsoft distributes MSDN seperately in the name of "MSDN Library Edition [month][year]" under the heading "Microsoft Development Network"... if I'm not wrong.
The full installation comes in 3 CDs. After installation you can find "Microsoft Development Network" in your "programs" menu. Thatz really the full and complete MSDN in real sense...
regards,
Aryadip.
Cheers !! and have a Funky day !!
|
|
|
|
|
Please first read the question and then answer.
I have MSDN installation in my machine. And i need to use that help file with out any other program( like if you press F1 in VS IDE you will get help).
otherwise tell me which file that VS IDE using to show the searched content when we press F1.
Sreejith S S Nair
|
|
|
|
|
I don't have VS.NET on any machine at work here, so I'm trying to do this from memory...
Goto the Help menu is VS.NET and pick Index, or Help Index, or something like that.
[EDIT]
If you have the MSDN installed with VS.NET, yes, you SHOULD have an incon for it under Start/Programs/Microsoft Developer Network.
RageInTheMachine9532
"...a pungent, gastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
The following is copied from the shortcut I use to launch MSDN. It's not as simple as double-clicking on a file.
Note that this is specifically for the April, 2004 installation of MSDN.
"C:\Program Files\Common Files\Microsoft Shared\Help\dexplore.exe" /helpcol ms-help://MS.MSDNQTR.2004APR.1033
Grim (aka Toby) MCDBA, MCSD, MCP+SB
|
|
|
|
|
There is a shortcut in the VS.NET product folder. If you want to execute this without the shortcut, you need to use the path to dexplore.exe (typically in C:\Program Files\Common Files\Microsoft Shared\Help, though you should use Environment.SpecialFolder.CommonProgramFiles pased to Environment.GetFolderPath to get the C:\Program Files\Common Files since it can be redirected or on a different drive than C:). Then pass a command-line param like so:
string dexplorePath = Environment.GetFolderPath(
Environment.SpecialFolder.CommonProgramFiles);
dexplorePath = Path.Combine(dexplorePath, "Microsoft Shared\Help\dexplore.exe");
Process.Start(dexplorePath, "/helpcol ms-help://ms.vscc");
Process.Start(dexplorePath, "/helpcol ms-help://ms.vscc.2003");
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
I have a very odd problem with J# and threads.
I have a client with a gui and a connection class that is in another thread. At first only parts of the GUI loads, most tabs are not added at this point. Then I connect and check for password, if that is correct I want to load the other tabs. Oddly it loads the first one and that one is empty.
The connection class in an observer that the GUI is listening at.
And when I debug I get this error message:
"An unhandlet exception of type 'System.ArgumentException' occured in system.windows.forms.dll
Additional information: Controls created on one thread cannot be parented to a control on a different thread"
Any idea what might be wrong?
|
|
|
|
|
First, this forum is for C#, not J#.
*** Note to Admins: We need to create a J# Forum! ***
Is your connection class creating the controls? From a design standpoint, it really shouldn't be doing this. It's a connection class, not a GUI class...
But if you must, you would have to supply a delegate function on your form for the connection class to call using wheteverFormName.Invoke(). This function would then have to create the new controls. The controls absolutely cannot be created directly by the connection class.
RageInTheMachine9532
"...a pungent, gastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I'm a new C# coder but is forced to work with J# on this single project, and I hate it .
Anyhow it did not create the controls, that is what was so strange. But we did use alot of Java code and not any delegates. That have been fixed now, but if you read my other post you see my new annoying error. One step forward two step backwards!
|
|
|
|
|
Ok, walking away from java threads and into delegates and threads. Anyhow would work better in theory I guess.
But even though I follow this: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dv_vjsharp/html/vjwlkwalkthroughauthoringsimplemultithreadedcomponentwithvisualj.asp guide more or less exact, I get errors.
VS.NET refuses to use System.Delegate.Combine(eventHandler, eventHandler):
public delegate void FactorialCompleteHandler(double Factorial, double TotalCalculations);<br />
<br />
public FactorialCompleteHandler FactorialComplete;<br />
<br />
public void add_FactorialComplete(FactorialCompleteHandler e)<br />
{<br />
FactorialComplete = (FactorialCompleteHandler) System.Delegate.Combine(this.FactorialComplete, e);<br />
}<br />
<br />
That is all of the relevant code from the walkthrough but for some reason it wont work. Gets a:
Cannot find method 'Combine(objectHandler, objectHandler)' in 'System.Delegate'
|
|
|
|
|
Funny... I don't see you defining a Combine method in any of your code there...
RageInTheMachine9532
"...a pungent, gastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
But that one already exists in System.Delegate right?
Atleast it shows up when I type the . after Delegate, and I follow the constructor(two of them and I use the one with two eventHandlers).
Oh well, hungover and forced to code due to deadline. Life sucks
|
|
|
|
|
Cenatar wrote:
Oh well, hungover and forced to code due to deadline. Life sucks
Whoa... Dude... A little 'Chaser' next time! Deadlines! Remember?!
I should have gone back and read the sample code with both eyes open! Hmmm...
OK. This may seem stupid, but did you put this at the top of the code?
import System.*
RageInTheMachine9532
"...a pungent, gastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Ok, yes I'm stupid and cannot read examples clearly
You need to have a /**@delegate*/ over the delegate deklaration. Odd in my opinion, oh well.
|
|
|
|
|
I already hate J# and I've never written anything in it...
RageInTheMachine9532
"...a pungent, gastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hello,
Is it possible to get attributes of a Xml-file and place it in a datagrid. The second column then should be a boolcolumn. Then when i press a button "save" i want the attribute with the true or false value saved in another Xml-file.
Is this possible or to difficult to do?
thx in advance.
for example: the first xml-file looks like this:
<tablegroups>
<tablegroup name="programs">
<description>program dictionary</description>
</tablegroup>
<tablegroup name="parameters">
<description>parameter system</description>
</tablegroup>
</tablegroups>
Then the result should be:
<tablegroups>
<tablegroup name="programs">true</tablegroup>
<tablegroup name="parameters">false</tablegroup>
</tablegroups>
|
|
|
|
|
When you read an XML file into a DataSet (to bind to a DataGrid or any other data-bindable control), attributes on "table" elements are treated as columns as well as the child elements.
If you want to save your DataSet in a different format, then you should either use an XslTransform to transform the data before saving to disk or just use the XML DOM classes (in System.Xml ) to do so manually. The nice thing about XML is that you can do just about anything you want with it if you know how. It's really not hard. I suggest reading the System.Xml namespace member documentation, as well as the many XML topics in the .NET Framework SDK.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
aferter using Bitmap.Save("bmpname.gif",ImageFormat.Gif) method,
i can get a bmpname.gif file.
why the file is filled with many white dots ?
|
|
|
|
|
sorry my mistake.
the bmpname.gif image is full of noise.
while using paint.exe to convert a bmp to a gif , the image looks smooth.
Why ?
|
|
|
|
|
Were there any "holes" in your Bitmap image before you saved it, like alpha channel data? Actual holes in the image?
Alpha would be my first guess...
The GIF format doesn't support alpha channels, so these would end up becoming holes in your image. GIF supports a transparency key where one color can be picked and, when rendered, that color doesn't get painted on the screen so the background behind the GIF image shows through.
RageInTheMachine9532
"...a pungent, gastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
emmm, maybe i got something from your speech.
here is my Saving progress:
Bitmap bmp = new Bitmap(@"D:\1\111.bmp"); // 111.bmp is a 24bits bmp saved by paint.exe
bmp.Save(@"d:\1\111.gif",ImageFormat.Gif);
only 2 lines codes above. maybe the 111.gif lose alpha info after convertion.
|
|
|
|