file

reading FAT12 image file in C

I have a FAT12 image file and I have to open it and read it. I would like to view this image file(directories/files with in) so I can have an idea of what outcomes I should be getting. Anyone know of a good software that would let me view this FAT12 image file? Also can someone guide towards the right directions when trying to read the c...

How to Read Schema of Flat File using Reflection in C#

How to Read Schema of Flat File using Reflection in C# The brief overview that I have is- There's some server which is storing the data as flat files and I have to push data from SQL Server to these flat files. For that I need to know their schema. I have no idea about this, any help would be great. ...

How to associate a specified type of file with my program?

I have a self-developed program which I want to use as the default opening tool for .jpg and .bmp files. How can I achieve the goal progrmmatically? Some said that I have to add some registry entries. But I don't konw exactly what I should do. Can anyone tell me the method? Thank you! ...

What is the best tool to synchronise a workspace between two PC's?

what tool do you use if you want to synchronise a workspace between two PC's? For example you have a work PC and a laptop and would like to switch easily between working on one and the other at the end of the day. The Work PC has network (subversion) access, and the laptop does not so I am looking for some way to synchronise files betwe...

File structure for javascript-based web application

I'm planning to write a javascript-based web application. I'm wondering what the best way to implement it in terms of file stucture is. There is one main page (main.html) containing a menu and a main div section. The way it works is simple: When the user clicks on one of the links in the menu (for example 'Page 1'), the content of the d...

defining structures globally in c++

there was a somewhat detailed thread (228684) on how to globally (using extern struct) declare a structure that could be seen in more than 1 c++ file, but I can not figure out exactly how to do it (there was a lot of discussion about do this, do that, maybe do this, try this, etc...). couuld someone please post a very simple example of...

Releasing Windows file share locks

This problem crops up every now and then at work. Our build machine can have it's files accessed via a normal windows file share. If someone browses a folder remotely on the machine, and leaves the window open overnight, then the build fails (as it has done now). The explorer window left opened points at one of the sub folders in the sou...

C#-Cant Access File-because it is being used by another process exception

I have an ASPX program where i am downloading a file from the www using DownloadFile method of webClient Class and the do some modifications on it. then i am Saving it to another folder with a unique name.When I am getting this error The process cannot access the file 'D:\RD\dotnet\abc\abcimageupload\images\TempStorage\tempImage.jpg' be...

How to close a file descriptor from another process in unix systems

You can use command lsof to get file descriptors for all running processes, but what I would like to do is to close some of those descriptors without being inside that process. This can be done on Windows, so you can easily unblock some application. Is there any command or function for that? ...

ASP FileUpload file size issue

Hi, Im using a fileupload control for my asp application and it throws a HttpException when the file upload size is bigger than the max request length. As far i understand the fileupload will open a memory stream to a file once the file browse dialog is closed but there is no way of knowing when the dialog is closed so that I can make...

Source Control Layout

I develop a variety of applications and have 3-4 miscellaneous libraries that I reuse across these apps (one for math, one for database functions etc.). Currently I have one master source directory with each project as a top level directory (including my helper projects). And each project that needs a helper adds the entire project as a...

Current view file in Rails helper method

Is there some way to determine what file currently is being rendered by Rails (2.2) in a helper method. An example result would be "/sessions/new.html.erb" or something similar. I am trying to write a helper function that does something based on the file name that is being rendered, so I need a reliable way to obtain this information. I...

Why does calling this function change my array?

Perl seems to be killing my array whenever I read a file: my @files = ("foo", "bar", "baz"); print "Files: " . join(" ", @files) . "\n"; foreach(@files) { print "The file is $_\n"; func(); } sub func { open(READ, "< test.txt"); while(<READ>) { } close READ; } print "Files: " . join(" ", @files) . "\n"; produces: ...

Java File I/O Performance Decreases Over Time

I'm trying to perform a once-through read of a large file (~4GB) using Java 5.0 x64 (on Windows XP). Initially the file read rate is very fast, but gradually the throughput slows down substantially, and my machine seems very unresponsive as time goes on. I've used ProcessExplorer to monitor the File I/O statistics, and it looks like th...

Secured File download in Groovy

I need to get a file into memory in my app from a secured web location. I have the URL of the file to capture, but can't seem to get the security issue resolved. Here's the code from the Cookbook samples page: def download(address) { def file = new FileOutputStream(address.tokenize("/")[-1]) def out = new BufferedOutputStream(...

FIle format of eclipse workspace files

Is there a (good) documentation about the format of the eclipse workspace files (.location, x.tree, ...)? I need this to programatically create a workspace for automated builds. Unfortunately I have to do this job from a .NET program, so I can't use any Eclipse classes to do this! (We manage our Linux C++ projects using Eclipse + CDT). ...

XML or own-format file?

When is a good idea to save information in a XML file and when in a own-format file? For XML (or other standard) I see: (+) Standard format. (-) It's tedious to hand modify. For own-format files I see: (-) We need to build a own-parser (non-standard). (+) It can be easy to hand modify the files. ...

How do I make Flex file upload work on firefox and safari?

I have a flex app that uploads files to a server. The server requires authentication to be able to upload. In IE the upload works fine. However in FF and Safari, it does not upload. I have seen people all over with this same problem but no answers. Don't fail me now stackoverflowers. ...

Calculate checksum of audio files without considering the header

I want to programmatically create a SHA1 checksum of audio files (MP3, Ogg Vorbis, Flac). The requirement is that the checksum should be stable even if the header (eg. ID3) changes. Note: The audio files don't have CRCs This is what I tried by now: 1) Reading + Hashing all MPEG frames using Perl and MPEG::Audio::Frame my $sha1 = Diges...

Styling issues with a file input field in firefox

Mornin' all! Not entirely sure whats going on here, I am currently doing the front end for a site with looooads of forms, all styled up and looking pretty in IE, but I've just noticed that in firefox the file input fields aren't responding to any of my styles, all the other types of input fields are fine. I've checked it in Firebug and ...