|
shabanab wrote: can u please provide code
Normally, you can not get the answer if the question looks like this.
I Love KongFu~
|
|
|
|
|
you know, the .dat format. Any clue how to do it?? Is there some sort of stream we can use or a library??
Please advise.
All generalizations are wrong, including this one!
(\ /)
(O.o)
(><)
|
|
|
|
|
Check out the BinaryReader[^]
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)
|
|
|
|
|
Muammar© wrote: you know, the .dat format. Any clue how to do it??
.dat is typically a generic file extension used to denote that it is an internal format for some application. We cannot know the format unless we know the application to which it belongs.
Muammar© wrote: Is there some sort of stream we can use or a library??
You can open the file using a FileStream and a BinaryReader , but you'll need to know how it is formatted internally to be able to interpret what you get back.
|
|
|
|
|
True.. I managed to get the format from the database designer.
Thanks Colin! And congrat's on being an MVP again!
All generalizations are wrong, including this one!
(\ /)
(O.o)
(><)
|
|
|
|
|
I had very little experience with creating setup projects. If i remember well, the Publish tool from VS creates a MSI file, that installs the application, but does not allow the user to specify an installation path or other options. This is called Click Once deployment, right?
What I need is an installer which will allow the user to specify an installation path. What do you recommend? (preferably free). Thanks.
|
|
|
|
|
blackjack2150 wrote: What I need is an installer which will allow the user to specify an installation path. What do you recommend? (preferably free). Thanks.
What about the Setup Project already in Visual Studio?
|
|
|
|
|
Hmmm, if that does what I need I should start learning how to use it. I somehow had the impression that Setup Project was doing the same thing as the Publish Tool. Thanks.
Insert funny quote here.
|
|
|
|
|
Scroll down on this page[^] and you'll find some useful stuff from MS.
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)
|
|
|
|
|
As Colin said, use the one built into Visual Studio. If you're using an express edition which doesn't have this, there's always Inno Setup[^].
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)
|
|
|
|
|
I use the NSIS install system. NSIS Sourceforge Page.[^] It's fairly easy to script a decent setup. And FREE.
Scott P.
"Simplicity carried to the extreme becomes elegance."
-Jon Franklin
|
|
|
|
|
Hi Guys,
I'm redirecting the output of an external process to a function which writes the data to a log file using StreamWriter.Write() method.
Is there a smart way of limiting that file size?
Thanks!
Eyal.
|
|
|
|
|
Try log4net. It can automatically create new log file when an old one exceeds the size you specify.
|
|
|
|
|
I'm assuming that the OP wants a log file that will never get larger than size N, and that older entries are deleted as necessary. Creating a new file seems to me to be a sloppy workaround.
I can't think of any way to do this other than to load the entire file into memory, delete what makes it too large, and then save it again.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
I second. Look for RollingFileAppender class and the RollingStyle property.
My suggestion is to create separate logs for each day/week/hour/whatever and to delete the logs older than the x-th version.
modified on Wednesday, January 7, 2009 11:37 AM
|
|
|
|
|
We can get the size of file through FileInfo. Hence, we can decide whether to create a new log if the size is out of limitation. Such as
FileInfo fileInfo = new FileInfo("1.rar");
if(fileInfo.Length > 100*1024)
{
//create a new log file
}
Tan Li
I Love KongFu~
|
|
|
|
|
Dragonfly_Lee wrote: to create a new log if the size is out of limitation
Instead of deleting the old log, start overwriting; you'll loose information if you just wipe the logfile. Alternatively, you could delete the oldest entry every time you add a new one.
Whether this is feasible depends on the maximum size of the logfile.
I are troll
|
|
|
|
|
Eddy Vluggen wrote: Instead of deleting the old log, start overwriting
I did not mean to delete the log file. We can create a new log file, such as:
1.log
2.log
...
So we will not lose any information. However, if the log file size is too huge, we also need to consider the disk space.
I Love KongFu~
|
|
|
|
|
Hi ALL,
retrieving a string from database like this
1. MAKARAMPURAM, MAKARAMPURAM, 2. SALINA PUTTUGA, SALINA PUTTUGA, 3. MAKARAMPURAM, MAKARAMPURAM, 4. MAKARAMPURAM, JANNI PUTTUGA, 5. MAKARAMPURAM, MAKARAMPURAM, 6. KORIKANA PUTTUGA, KORIKANA PUTTUGA, 7. MAKARAMPURAM, MAKARAMPURAM
Now i have to display this entire string to label,in the form of 3 or 4 lines is it possible? could anyone help me how to split this string
Thanks
Nath
|
|
|
|
|
Nath wrote: Now i have to display this entire string to label,in the form of 3 or 4 lines is it possible? could anyone help me how to split this string
If you really mean splitting, have a look at String.Split method. if you just want to show that on several lines and control the line breaks you could add new lines before the ordinal numbers.
|
|
|
|
|
Will the length and pattern of the string remain same? If not, then you cannot assure that the string can be shown in 3-4 lines.
If it remains same, you can get three equal length substrings from the string. (There is a lot of chance that the substring will be illogically formed.)
Or, split the string over numbers(provided pattern remains same) and join the consecutive parts till the total length becomes about 1/4th of the original string.
The word "politics" describes the process so well: "Poli" in Latin meaning "many" and "tics" meaning "bloodsucking creatures."
|
|
|
|
|
I'm writing application with CsGL library.
So I use this class to render all graphic:
CsGL.OpenGL.OpenGLControl
The problem is that sometimes rendering area is out of this control. What can I do to solve this problem?
|
|
|
|
|
hi all
i have a windows application using c# code....
i wanted to create a messagebox in a button click...
i have added
[DllImport("User32.dll")]
public static extern int MessageBox(int h, string m, string c, int type);
but am getting an error like " The method or operation is not implemented." here in
private void MessageBox(string p)
{
throw new NotImplementedException();
}
thanks in advance
|
|
|
|
|
Why aren't you using the messagebox that comes with the framework.
There is one in the system.windows.forms namespace.
System.Windows.Forms.MessageBox.Show("test");
|
|
|
|
|
thanks 4 your reply....
its working fine...
|
|
|
|