files

Django Apache static files

I have a couple of conceptual questions: regarding serving static files (media) in Django in production. I understand that Django serves static files in development different than in production: read this: http://docs.djangoproject.com/en/dev/howto/deployment/modpython/#serving-media-files http://docs.djangoproject.com/en/dev/howt...

Parsing files from a different server - using threads

I have this scenario. OS is UNIX. There are a bunch of files on Server A. The need is to FTP these files(they are in XML format) to server B, parse them and store the values retrieved from specific tags to a DB. Current implementation of the parser in perl is such that the files are processed sequentially. Can a multi-threading concept i...

Choosing a random file from a directory (with a large number of files) in Python

I have a directory with a large number of files (~1mil). I need to choose a random file from this directory. Since there are so many files, os.listdir naturally takes an eternity to finish. Is there a way I can circumvent this problem? Maybe somehow get to know the number of files in the directory (without listing it) and choose the 'n'...

Convert a lot of excel files

How can i convert a lot of '97 excel file to '95. I look for other solution as File - Save As. ...

How to get files in a relative path in C#

If I have an executable called app.exe which is what I am coding in C#, how would I get files from a folder loaded in the same directory as the app.exe, using relative paths? This throws an illegal characters in path exception. string [ ] files = Directory.GetFiles ( "\Archive\*.zip" ); How would one do this in C#? ...

How to run a SyncBack profile with custom source and destination folders?

I am using SyncBackSE to synchronize folders between two locations. Since the full sync takes too long, I want to run the sync profile only for the specified source and destination folders via the command line. Any ideas how to do that? ...

Reading an uploaded file into a File object in a controller method-"can't convert Tempfile into String"

So Im trying to implement a file upload functionality where when a user uploads a file, I can read that into a File object and process it accordingly: def create name = params[:upload]['datafile'].original_filename directory = "public/data" # create the file path path = File.join(directory, name) # read the file Fil...

Fast way to find the number of files in one directory on Linux

I am looking for a fast way to find the number of files in a directory on Linux. Any solution that takes linear time in the number of files in the directory is NOT acceptable (e.g. "ls | wc -l" and similar things) because it would take a prohibitively long amount of time (there are tens or maybe hundreds of millions of files in the dire...

display the output from mat file

Hi Please, any one help me: how can I display the output (image file name, mean color image, color histogarm) to see it, which I saved it in sruct of array in mat file ...

Network tab in Firebug doesn't show any files.

I'm creating a html-layout based on an existing layout. I want to extract all the files, that are currently actually being used, from the old layout, since there is a lot of crap in the directories that's been there from the ancient times or something. So I tried to open the existing layout in Firefox and use Firebug to see which files ...

Android Local Storage files getting erased on reboot

I have an android app that stores data to the local storage. This is done just like in the tutorial on Google's site: String FILENAME = "data.xml"; String string = "some content"; FileOutputStream fos = openFileOutput(FILENAME, Context.MODE_PRIVATE); fos.write(string.getBytes()); fos.close(); However, whenever the device is powered ...

How to reference files in a Java Pacakage

I have MyClassin package X, Also in package X there are packages Y and Z like this: X - MyClass X - Y - Some Files X - Z - Some Files How do I get a list of all the files in packages Y and Z from MyClass? ...

How to get file list using system variable %LOCALAPPDATA%?

Hi, I want to read the content of the folder located at %LOCALAPPDATA%. But it fails when I tried Directory.GetDirectories("%LOCALAPPDATA%"); I get "The name 'Directory' does not exist in the current context" Please help. ...

Autogenerated files and VC++ 2008 projects

Hello, all. I was wondering if there's a way to add Autogenerated files to a VC++ 2008 build. It seems like it's a fairly trivial thing to do if you write your own makefile, but I'd prefer to let visual studio construct a makefile from the project (like it does normally), but also tell it to say "include all .cpp's and .h's that are in ...

Recover postgreSQL databases from raw physical files

Hello all, I have the following problem and I need to know if there´s a way to fix it. I have a client who was cheap enough to decline buying a backup plan for his postgreSQL databases on the main system that runs his company and as I thought it would happen some day, some OS files crashed during a blackout and the OS needs to be reins...

Uploading Audio Files with ASIHTTPRequest

Can anyone please give me a tutorial on how to upload Audio Files onto a server using ASIHTTPRequest? I'll need to build a JSON and get the audio data into the JSON then send it to the server. If this is too vague please don't hesitate to ask for more info. let's say i use AVAudioRecorder class. What would i use to send that audio file...

Can Netbean edit remote files

If yes, how to do it? ...

Create a link to a local file, but open the browsed folder not the actual file

Hello, I am trying to export a List of items from a web page to the local machine. Upon successfully exporting the list (which it is successful, since the file is there and file.PathExists returns true), I want a link to pop up to the file. Now I want this link to actually open a system browsing window to the location of the file, I do ...

Getting absolute path to the file inside the public folder in Rails

What is the best way to get absolute path to the file inside the public folder in controller? Is there a predefined Rails variable that holds absolute path to the public folder? Currently I'm using File.expand_path('../../../public', __FILE__), but I'm sure there's a nicer way of doing this. ...

cocoa open multiple files with associated app

Hello, I have an array of filenames that i would like to pass to an external application for opening. I'd like to do one of the following: a) Somehow instruct OSX to open all these files with an associated application, but it must invoke the target app's openFiles NSApplication delegate method b) Specify the application to open these f...