|
What library are you using to create your archives?
Technically, it's possible to copy a file from one archive (e.g. a .zip file) to another archive without decompressing it first. But this really depends on the archive's format. For example, I think you can do it with .zip files, but other formats I'm not sure. In reality, I'm not sure if archive libraries have this type of feature.
Take care,
Tom
-----------------------------------------------
Check out my blog at http://tjoe.wordpress.com
|
|
|
|
|
I have been working mostly with #ZipLib which does use the .zip files. Any thoughts on where I can look for how to do the copy compressed?
Jim
this thing looks like it was written by an epileptic ferret
Dave Kreskowiak
|
|
|
|
|
I haven't tested this, but it looks liks you can get the ZipEntry from the first archive and add it to the second archive. You may need to Clone the ZipEntry.
Let me know if this doesn't work.
Take care,
Tom
-----------------------------------------------
Check out my blog at http://tjoe.wordpress.com
|
|
|
|
|
That does the trick, thanks
Jim
this thing looks like it was written by an epileptic ferret
Dave Kreskowiak
|
|
|
|
|
jimwawar wrote: Does anyone know if it is possible to copy compressed files compressed?
I would guess that the methods for copying just any file would work fine.
Nathan
|
|
|
|
|
What I have been able to find and play around with, as soon as the compressed file is put on a stream for copying it is uncompressed. To put it into another archive requires re compression. As the file sizes are gig this is a heavy time/cpu crunch. If the copying could be done compressed the time/cpu would be saved.
Jim
this thing looks like it was written by an epileptic ferret
Dave Kreskowiak
|
|
|
|
|
double zip the files?
ie zip each file separately at your chosen level of compression, and then use a 0% compression outer zip as a container. Inserting/extracting from the outer zip should be no more expensive than any other file copy operation.
--
If you view money as inherently evil, I view it as my duty to assist in making you more virtuous.
|
|
|
|
|
you can copy an compressed bytestream just as easily as an uncompressed one. The copy will also be compressed. If you want an normal copy you'll need to decompress it first.
--
If you view money as inherently evil, I view it as my duty to assist in making you more virtuous.
|
|
|
|
|
Lithium actually.
Does anyone know how to enable auto-scroll in the Lithium control of the Netron project?
Thanks.
"There are II kinds of people in the world, those who understand binary and those who understand Roman numerals." - Bassam Abdul-Baki
Web - Blog - RSS - Math - LinkedIn - BM
|
|
|
|
|
Select the lithium control and set the AutoScrol property to True. Sorry if the answer sounds fascetious, but that's what I did when I used it.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Thanks, but I actually went through all the properties and saw that one. Didn't do squat. I also tried setting it programmatically using, but to no avail.
lithiumControl.AutoScroll = true;
lithiumControl.HorizontalScroll.Enabled = true;
lithiumControl.VerticalScroll.Enabled = true;
lithiumControl.HorizontalScroll.Visible = true;
lithiumControl.VerticalScroll.Visible = true;
The version I'm using is v3.3.2831.18624 from SourceForge[^].
Any other suggestions? The example it came with also does not scroll.
|
|
|
|
|
Do you still have your last working example or do you have any graph suggestions?
"Oh, what a tangled web we weave, when first we practice to deceive." - Sir Walter Scott
Web - Blog - RSS - Math - LinkedIn - BM
|
|
|
|
|
I am trying to calculate time differences in C#, I get the start time in a Lable1 and end time in Lable2, and The start time can start at 23:30 and end time at 0:30hrs, I am only looking for difference in time. Please advice.
Naveen
-- modified at 14:51 Tuesday 2nd October, 2007
It will help a lot if i can get the Code..
Naveen
|
|
|
|
|
You may subtract one time from other if you store data in two variables of DateTime type.
Such as-
DateTime i,j;
j.Subtract(i);
I hope this helps .
-Dave.
Dave Traister,
ComponentOne LLC.
www.componentone.com
|
|
|
|
|
Dave already gave you the answer, is it really that hard to understand what he explained?
DateTime startDate = DateTime.Parse(Label1.Text);
DateTime endDate = DateTime.Parse(Label2.Text);
TimeSpan span = endDate - startDate;
|
|
|
|
|
Thanks Chris
You'r code helped me a lot...
Appreciate your help...
|
|
|
|
|
Both Dave and Chris explain how to calculate the difference, but you really need the date part also. In your example, the time rolls over to the next day. So you really need the difference from (I just made up a date) "10/2/2007 23:30" to "10/3/2007 00:30" (a difference of 1 hour). If you just take the time, then the date part will most likely be the same and then the difference is 23 hours.
Take care,
Tom
-----------------------------------------------
Check out my blog at http://tjoe.wordpress.com
|
|
|
|
|
Hi Guys,
Application is almost done and now I'm trying to write the installer. Problem is I'm using an XML file for some of the configuration and I can't find how to create one using the installer.
Is there something built into visual studio that can do this or will I have to write create some sort of post-install script?
|
|
|
|
|
If you include the xml file in your Application project (e.g. the C# exe project), then set it's Build Action to Content (select the file in the Solution explorer and then look at the Properties window). Then in your installer you can include the "Content Files" from your project. The files will then be copied to the install directory.
Take care,
Tom
-----------------------------------------------
Check out my blog at http://tjoe.wordpress.com
|
|
|
|
|
Thanks Tom,
but how do I modify the file during the install process? It's going to include some database strings, and other application/user specific settings. We normally have a wizard that runs on the first instance of the website that takes care of this. For security we have removed this and want it done during the install.
(The old method wasn't perfect, but as a web developer, it worked for me)
Regards.
Joe
|
|
|
|
|
If you want to create a config file during the install process, then I would use a Custom Action[^]. Here's an example[^] that creates a database.
This blog entry[^] may help if you are deploying a web project. This blog entry[^] may help you if you need to troubleshoot an issue with your Custom Action.
Take care,
Tom
-----------------------------------------------
Check out my blog at http://tjoe.wordpress.com
|
|
|
|
|
I'm trying to get the usernames of all the admins on the local machine. This is what I have:
<br />
DirectoryEntry admGroup = localMachine.Children.Find("administrators", "group");<br />
object members = admGroup.Invoke("members",null);<br />
<br />
foreach (object member in (IEnumerable) members)<br />
{<br />
DirectoryEntry admin = (DirectoryEntry)member;<br />
Console.WriteLine(admin.Name);<br />
}<br />
The problem I'm having is with generics. The compiler is requiring a type argument for IEnumerable, but I've tried object and System.__ComObject neither of which will work. I know in .NET 1.1 that should of worked, but I'm at a loss of how to fix it now.
|
|
|
|
|
Make sure you are "using System.Collections;". The generic version of IEnumerable is defined in System.Collection.Generic (which is included in new C# files created by Visual Studio by default). But System.Collections is not included by default.
Take care,
Tom
-----------------------------------------------
Check out my blog at http://tjoe.wordpress.com
|
|
|
|
|
That worked perfectly. Thank you for your help.
|
|
|
|
|
Hi everyone,
I have a question here: I have a big project made in C# with lots of userforms and a huge code behind it. I want to convert the whole project to VB.NET 2005 project .Online convertors converts only few code not the whole userforms ..
Any ideas? :->
Thanks,
Dan
|
|
|
|