|
Is there anything in the Dot Net framework 2 that would allow me to use a Queue Collection but where the data is read from and written to disk rather than kept in memory.
I want to be able to add a large amount of items to the queue (100,000+) and for the data in the queue to be stored on disk so that the data can be kept whwn when the application is off. I suppose it would be like a very small database.
Any idead would be greatly appreciated.
Many thanks,
Bara
|
|
|
|
|
Hi
Not sure I have enough information from you as this seems like quite a simple solution.
Can you not just use a streamwriter to write to a text file then regenerate the queue according to the order the info was written to the file
Hope this helps
Dan.
|
|
|
|
|
The simple answer is "No". At the very least an object that does this sort of thing may be available, but I have not heard of it yet.
However, if you look back to the old days of dBase and other simple data base programs, you could use the ideas from that era. Those ideas are that the records are stored to the HD and the location in the file is kept in another "index" file. This index file could be kept in memory easily and would provide a quick reference as to where the data is stored in the file.
As always, there are alternatives to this which others may well enlighten you about.
Phil
|
|
|
|
|
I am opening a word doc (in C#) and doing a find and replace after which i am using the .printout (below) - which is printing to a local pdf port. However, i get a popup to asking to click Save or Cancel. How do I bypass that?
object Background = true;
object Append = false;
object Range = Word.WdPrintOutRange.wdPrintCurrentPage;
object Items = Word.WdPrintOutItem.wdPrintDocumentContent;
object Copies = "1";
object Pages = "1";
object PageType = Word.WdPrintOutPages.wdPrintAllPages;
object PrintToFile = false;
object Collate = true;
object ManualDuplexPrint = false;
object NullObj = System.Reflection.Missing.Value;
oApp.Visible = true;
oApp.ActivePrinter = "Adobe PDF";
oDoc.ActiveWindow.PrintOut(ref Background, ref Append, ref Range, ref OutputFileName, ref NullObj, ref NullObj, ref Items, ref Copies, ref Pages, ref PageType, ref PrintToFile, ref Collate, ref NullObj, ref ManualDuplexPrint, ref NullObj, ref NullObj, ref NullObj, ref NullObj);
|
|
|
|
|
Doesnt Word do the same thing (show the save/cancel dialog) when you manually open
and print a document ? if that is still true, I dont expect there is a way around that.
|
|
|
|
|
I've always been lead to believe that if a file is opened the O/S will prevent other processes that try to open the same file.
However in .Net you can open a file and specify non-blocking access so that the file can be opened... how does this work? Is it some magic in .Net, or have I been misled about the role of operating systems.
|
|
|
|
|
Windows offers that protection as an option.
When opening a file you specify what operations you want to perform (mode=read, readwrite),
and what operations you allow others to perform in the mean time (share=none, read, readwrite).
This is available when using a .NET language such as C#, and also when using older
languages (fopen in C) and even with plain old Win32 functions such as OpenFile.
Now by default share=none, so open files behave as you are accustomed to.
But you can choose it differently.
|
|
|
|
|
Ah, thanks Luc.
Looks like I've been living a lie. Again.
|
|
|
|
|
How can I make a multiple row selection in a dataGrid, without using rowheaders?
I'm using visual studio.net 2003..
tnx in advance..
|
|
|
|
|
|
Hi,
I need to develop a website, but it needs to be in different labguages. I don't even know how it works? Where do I start coding, what do I look at, can some please help with some advice?
I will be using ASP.NET and C# 2.0, and hopefully 3.0.
Regards
ma se
|
|
|
|
|
Better Buy a Book related to Asp.Net 2.0 using C# and start learn and then Practice the Code as your Requirement.
Regards,
Satips.
|
|
|
|
|
Multi lingual websites can be done in a couple of different ways. One way is to store all text in database tables. So each page must query the database to figure out what text to display. I am not a big fan of that one, but it is one way of doing it. The other way is using resource files. You can seach for info on resource files. These files are using to store the different languages, then based off users broswer settings you can setup the site to use different resources.
Hope that helps.
Ben
|
|
|
|
|
Yah, I agree too. But if you have lot of statics pages with large text then you must create different pages for different languages.
|
|
|
|
|
Which part needs to be in different languages? Is the site going to be static content or more CMS style dynamic content? You need to provide more information.
|
|
|
|
|
Just make a website in your native language..
then add resource files to each web page
and on load.. check the current culture of the client and load the appropriate language related page
|
|
|
|
|
check www.asp.net and look around for Starter Kits
which help you to start....
Nav.
|
|
|
|
|
Hello,
Nowadays, i am constructing an aplication in C#. And i have to obtain information about:
- opended and closed ports
- privileges of groups of users
- updates
i have tried it using WMI but i wasn't be able to reach any important thing.
I would thank you a lot if you can help me.
|
|
|
|
|
and which CodeProject articles on this topic did you read ?
|
|
|
|
|
i would like that if someone of you could help me to obtain this information with any API or another way, because i don't know how i could do it. I don't know if you understand me that i want. Excuse me.
|
|
|
|
|
that is exactly how CodeProject works: you read some articles, study MSDN documentation,
google around, and try to implement what it is you need;
and then, only then, when you have a small problem we will be glad to help you.
|
|
|
|
|
i am according to you, but i have already tried it a lot of times, i have visited a lot of pages,and i have searched in a lot of places, but nothing. I have to send my work next week and i don't have a lot of time if i continue in this way, i don't know if you understand me. i have decidied to ask you because i see that i am not going to be able to finish and send my work if i don't do anything quickly.
but i understand you if you can't help me
|
|
|
|
|
OK, search for WMI on CodeProject, and read the first article you find. That will get
you started.
|
|
|
|
|
I have already used WMI and i obtained a lot of useful information, but i don't know, i don't find which is the table in which i can obtain these specific information which i have asked you.
|
|
|
|
|
My experience with WMI is limited, but:
This article[^] discusses many things, including user privileges.
There must be a way to list all available tables in WMI.
There recently have been articles on CodeProject about user privileges, TCP/IP ports,
.NET versions, and much more. Dont recall which of those were using WMI tho.
If you need specific help, you need to ask specific questions. From your initial post
it is unclear which you mean:
ports = serial ports ? USB ports ? TCP/IP ports ? what ?
updates = of what ? Windows ? .NET FrameWork ? Visual Studio ? Office ? Drivers ?
And whatever the assignment is, judging how extensive it is, and starting on time
are part of it.
Good luck.
|
|
|
|