file

What is the simplest way to write 4 arrays into a file in a multiplatform way?

Say we have a struct of an int array, a float array etc. and we need to write them into a binary format file for fast reloading. Can this be done in a simple way? Should the files be several for each of the array? ...

How can I copy files with special characters in their names with Perl's File::Copy?

I am trying to copy all files in one location to a different location and am using the File::Copy module and copy command from that, but now the issue I am facing is that I have file whose name has special character whose ascii value is &#253 but in unix file system it is stored as ? and so my question is that will copy or move command c...

Access filesystem using js within grails project

Hi For learning purposes I created a toy project using grails. In this project I would like to play an mp3 file in one of my views. I found an html5/flash mp3 player. But when the music is supposed to play, I have a question. The HTML 5 player is in the project/web-app/js folder. Everything else is in its normal place. When I try to acc...

C++: Read from files?

Possible Duplicate: Reading through file using ifstream Hello. I'm a bit of a newbie to C++ so please be specific. I'm trying to find a way to read something from a file, put it into a string and then output it onto the screen. If you know how to do this can you give an example? Thanks. ...

Simple question on file seeking in C.

Say I write in a file Mesh: 1 Vertices: 345 Indices: 123 V: 1,3,4 1,4,5 .. Mesh: 2 Vertices: 456 Indices: 42 etc. How do I go about seeking at any position? E.g. I want to go to Vertices: of Mesh 2 or V: of Mesh 3 etc. What's the proper way to go about these things? ...

Multiple file uploader with jQuery in ASP.NET

Hi, I am looking for a multiple file uploader by which I can select(CTRL+mouse click in File browse window) and upload multiple files without postback. I don't want to use any flash component(like SWF uploader) for it. I came to know that with normal Ajax request we can't upload files and we have to fake it through an iframe. Could you ...

Java FileReader error

Hi I'm a beginner of Java lauguage. It seems like my computer does not recognize FileReader at all.(Random class does not work either.) I typed the exact same code in a different computer and it worked. I uninstalled JDK and reinstalled it, but still doesn't work. I don't know what to do. My environment Samsung Netbook N150 plus. /// ...

File explorer for android devices

Does the android platform provide the ability to get a list of all files and their sizes stored on an android device? What I need is to find or write an explorer type of application. ...

Opening an existing file from netbeans

I've created an application in Netbeans 6.9 where my ultimate aim is to create a .tcl file(or text file will do). When i run my application once I create the .tcl file and save it at a location. When I run the 2nd time and if I open that file in my application, then I am not able to get that file.I mean the data is not appending to the f...

Aborting a change to a node from a module

I'm building a module for Drupal 6 (what it does isn't wildly important; I've spent a long time looking for other solutions to this problem and rolling my own is definitely the simplest), and I've run into something of a conceptual road-block. Much like the uploadpath module, I'm creating a directory based on (via a replacement pattern)...

Saving Source of Self (PHP)

Okay, so I have this strange problem. And ah, no solution. Can somebody please help me or send me off in the right direction? I have a simple HTML page, and I need to be able to have a 'Save' button on the page that the user will click. And upon clicking that save button, PHP will then save a copy of the current page the user is on to t...

Does file extension case matter on assembly source files with .asm extensions?

My goal is to have a rule that file.asm should be built exactly the same as file.ASM (or similar variations e.g. file.[aA][sS][mM]). I would like to avoid stepping on a convention that I'm unaware of. Case-sensitive File Extension Convention Examples: Assembly Files with .S and .s extensions are treated differently under GNU Assembler...

Restricting access to files within a folder to webservice IIS6/7

I am looking for a way to restrict direct access to a certain folder or folders on our website which is hosted in IIS7 in our second dev environment, IIS6 in our first dev environment and IIS6 on production. Basically we should be able to link to these files from our website i.e.: http://www.domain.com/stuff/survey.pdf But if someone t...

using local variable in another button

There's an error: "The type being set is not compatible with the value representation of the tag." string fi = null; public void reading(object sender, EventArgs e) { read_from_folder = folderBrowserDialog1.ShowDialog(); if (read_from_folder == DialogResult.OK) { files_in_folder = Di...

Why do du and Perl's -s give different values for the file size?

Updated According to comments: I have outlog.txt file which contains multiple filenames, e.g: 2345_535_Dell&HP_3PAR_DEAL.txt, similarly there are many filename but not the actual folder where the files are located and so in code am appending filenames to folderpath to get actual file location. Now,I want to get disk usage of all the fil...

Is there a simplistic library available (for multiple platforms) that makes it easy to write array data onto files?

e.g. one has a couple of arrays of ints or floats and a few integers to store. Is there a simplistic way to save them for later reloading without having to write a data format from scratch etc.? ...

What is the fastest way of getting a file length in .net?

What is the fastest way of getting a file length in .net? Note: I am accessing files via a network share. So far I have 1.5ms FileInfo.Length .5ms FileStream().Length ...

Save current page as HTML to server

What approach could someone suggest to save the current page as an HTML file to the server? In this case, also note that security is not an issue. I have spent endless hours searching around for this, and have not found a single thing. Your help is much appreciated, thank you! Edit Thank you all for your help, it was very much apprec...

Get files from directory with pattern.

Hello, Does it possible to get for ex. .c and .hfiles from directory. Usage of Directory.GetFiles("C:\", ".c;.h"); does not work. It's too bad to invoke Directory.GetFiles(...); twice.. :( Thanks. ...

C# FileSystemWatcher Serious Problem?

I have implemented a FileSystemWatcher for a folder which resides on a NetworkStorage Device (having no O.S.). The scenario is, we have two machine says machine A and machine B. my application is having two buttons on my form Button1 and Button2. I have written code for renaming the Test.txt file. Button1: renaming the file Test.txt...