file

Downloading the gzip file and Uncompressing to retrieve Content using IPHONE SDK on iphone and ipod touch devices.

Hi, I had the following questions related to downloading the file from the server. a) Is it possible to download directly the GZIP (Compressed)file to the iphone device using IPHONE SDK. b) If the compressed file can be downloaded , then how to uncompress it(using ZLIB or else...). Thank u. ...

Using subclassing to replace a Java class that doesn't implement an interface

For example, java.io.File is just a concrete class. My replacement for it supports resolving Windows shortcuts. I need to preprocess constructor parameters to resolve possible .lnk files because the FileSystem object that does normalizing/canonicalision/resolving on the abstract paths is not accessible. The need for preprocessing rules o...

how to read NASA .hgt binary files

I'm sure this is really simple if you know anything about binary files, but I'm a newbie on that score. How would I extract the data from NASA .hgt files? Here is a description from www2.jpl.nasa.gov/srtm/faq.html: The SRTM data files have names like "N34W119.hgt". What do the letters and numbers refer to, and what is ".hgt" for...

Function like SetFileLength() in C Library for Linux

Is there a function in the C Library under Linux which can set the length of a file? Under Windows I know there is a SetFileLength() function. If there is not, what is the best way of shortening a file without deleting and rewriting it? ...

xmodem for python

Hi All: I am wiriting a program that requires the use of XMODEM to transfer data from a sensor device. I'd like to avoid having to write my own XMODEM code, so I was wondering if anyone knew if there was a python XMODEM module available anywhere? Al ...

Config file in c#

I have a UserControl Library solution which has the following UserControl ---UserControl project ---UserControl Test Project IN my test project, I am able to add my usercontrol to the tool box. When i drag it and drop it in my forms, it fails. I put in logging and found out that my usercontrol reads a config file. The config...

SQLServer2005: Save complete results of query in a file for some long text data types

Lets say a have a table t (id int, someVeryLongText text) and want to store the result of a query: select someVeryLongText from t where id = 1 in the file. In Managemant Studio when I select Tools->Options->QueryResults and choose Results to File It seems that only the first 8192 characters are written to the file. Is there an op...

How do I get the time a file was last modified in Python?

Assuming the file exists (using os.path.exists(filename) to first make sure that it does), how do I display the time a file was last modified? This is on Linux if that makes any difference. ...

How do I save a NamedTemporaryFile into a model FileField in Django?

I created a NamedTemporaryFile, added some content in it and now I want to save it into a model FileField. The problem is that I get a SuspiciousOperation because the tmp directory is not within the FileSystemStorage directory. What's the proper way to do this? ...

Securly download file inside browser with correct filename

I am doing some work on a web site that has a secure area which is available to users only after they have logged in. In this area there is a page with links to pdf documents which can be downloaded. The physical documents are outside of the web site's root directory. The links to the pdf documents look something like this: index.php?pa...

How do I delete a file from a c++ app without console window in Windows?

I need do delete a temporary file from my c++ windows application (developed in Borland C++ Builder). Currently I use a simple: system("del tempfile.tmp"); This causes a console window to flash in front of my app and it doesn't look very professional. How do I do this without the console window? ...

How to download file using web service in C#?

Hi all: How to download a file via web service ? And how the client application accept this? I write down the code as below in the client app, it throws an exception "Access Denied" wsDownload.wsDownloadFile downFile = new wsDownload.wsDownloadFile(); byte[] file = downFile.DownloadFile(strFileName, "", "", ""); MemoryStream mStream...

Monitor a set of files for changes and execute a command on them when they do.

The (command line) interface I have in mind is like so: watching FILE+ do COMMAND [ARGS] (and COMMAND [ARGS])* Where any occurrence of "{}" in COMMAND is replaced with the name of the file that changed. And note that "do" and "and" are keywords. For example: > watching foo.txt bar.txt do scp {} somewhere.com:. and echo moved {} to ...

Problem with print out to text file

Hello, I am completely stumped. I have a program that pulls information stored in a database, assigns the database values to a corresponding class. The class has a print method that prints the values of it's fields. The users type in either an order id or order date range and then it finds those orders and prints them out to a text file...

How can I compare file creation time to the current time in Perl?

i want to compare the current time and file creation time in Perl but both are in different format. localtime is in this format: 22116291110813630 and file creation time is Today, December 29, 2008, 2:38:37 PM How do i compare which one is greater and their difference? ...

File.Exists returning false from a network share

I've been working on a ASP.NET project that is going to save uploaded files to a network share. I figured I could just use a virtual directory and be fine, but I have been struggling with permissions for Directory.CreateDirectory. I was able to upload files so I decided to change my code to place everything in a single directory, howev...

How do I get just the jar URL from a jar: URL containing a ! and a specific file in the jar?

Hi, I get a jar file url at runtime as: jar:file:/C:/proj/parser/jar/parser.jar!/test.xml How can this be converted to a valid path as: C:/proj/parser/jar/parser.jar. I have already tried using File(URI), getPath(), getFile() in vain... ...

How do I move file with Ruby

I want to move a file with ruby. How do I do that? ...

Export Crystal Report to Text File - No RTF File

I am using Crystal Report that comes with VS 2005. I need to Export the Crystal Report To Text File. What's the way to do it. ...

How can I add a prefix to all filenames under a directory?

I am trying to prefix a string (reference_) to the names of all the *.bmp files in all the directories as well sub-directories. The first time we run the silk script, it will create directories as well subdirectories, and under each subdirectory it will store each mobile application's sceenshot with .bmp extension. When I run the automa...