file

Android: can not write to a txt file.

Hello! My program contains a file with the name "size.txt", which contains just a word "15". If a user choose a value from a spinner,say 17, then the chosen value should be stored in the file and replace "15". I have added the permission to the program <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"></uses-pe...

How to Read whole file in ruby?

Is there any pre build function by which we can read the whole file without using any loop? So far i have only come across the ones which output line one by one or character one by one. ...

How to write file in audio data callback function of AudioFileStream?

I read Audio File Stream Service Reference. It says that when it gets some data it will invoke the callback function. The callback function can play the data, WRITE it to a file... I would like to know that how can I write the file in the callback function. Thanks ...

How can I make a library that writes to FILE * write the data to memory instead? (C programming)

I am facing a problem where the C library exposes only an interface that writes the data to a C FILE structure. This means all the data get saved to disk. I want this library to save the data to memory instead. Is there a way to emulate FILE structure in my code and make it save the data in memory instead? I imagine FILE has various poi...

How do I prepend file to begining??

In PHP if you write to a file it will write end of that existing file. but how do we prepend a file to write in the beginning of that file?? I have tried rewind($handle) function but seems over writing if current content is larger than existing... Any Ideas?? ...

xsl:for-each file in directory(common solution)

Hello, I found solution for subj related to the Visual Studio XSLT processor: public class XsltListFilesExtension { public XPathNodeIterator ListFiles(string directoryPath) { XmlDocument doc = new XmlDocument(); doc.AppendChild(doc.CreateElement("files")); DirectoryInfo di = ne...

Set of reference media files

I'm working on testing a software which transcodes different media files. Therefore i need a set of sample media files (Audio/Video) with various combinations for different codecs. Did someone create such a package allready or do i need to create all combinations from scratch? ...

Good Way to Handle Many Different Files?

I'm building a specialized pipeline, and basically, every step in the pipeline involves taking one file as input and creating a different file as output. Not all files are in the same directory, all output files are of a different format, and because I'm using several different programs, different actions have to be taken to appease the ...

How to know what function called another

Hi, I wanna know if there is any way to know where the function currently in execution was called, this is, in what file and line. I'm using C language, and I'm looking for something similar to _FUNCTION_, _LINE_ or _FILE_ macros. Best regards, Sérgio ...

How do I recursively delete a directory and its entire contents (files+sub dirs) in PHP?

How do I delete a directory and its entire contents (files+sub dirs) in PHP? ...

Randomly Thrown IO Exceptions in C#

Hey, I have been working on a program to archive old client data for the company I work for. The program copies the data from the work server to the local machine, creates a .zip file of all the data, then copies it to the archive server. After it does all that, it deletes the original files and the local copies. Every now and then, th...

how do I extract Name and Value from a line of text while reading from a file using Java?

A file name will be passed in from standard in. I want to open it, read it, and create some information based off the text in the file. For example, if this is a line in the file: Hristo 3 ... then I want to create a Member() named Hristo with a value of 3. So I want to pull out a String for the name and an int for the value. The na...

Line matches not showing during File Search in Eclipse 3.5 / Zend 7.2

Somehow my Eclipse (Zend 7.2) doesn't show the line matches in the treeview when doing a File Search. It shows the files that match, but I can't unfold it to see what lines the matches are on. On my other computer at work (same software) it does work like it should. Is there any way to reinstall the Search-module or does anybody know w...

Add File Summary tab data in runtime in NTFS in WinXP SP3

Hello, stackoverflowers :) I have given up tryng to figure out the reason of this issue, but here is the story and hope you could give a tip... As I develop unique app ( http://code.google.com/p/sedev ) and therefore I need to polish it. I have to add File Summary ( very useful info in my opinion ) to any created files by the app, so I...

Error using osql.exe (Sql Server 2005)

I use sql server 2005 enterprise, windows server 2003. I try execute osql.exe command, for execute sql file in my server DESSQL: osql.exe -E -n-1 -i"CarpetaUno\TextFile1.sql" I get this error: Msg 102, Level 15, State 1, Server DESSQL, Line 1 Incorrect syntax near 'n' UPDATE: I try this too, osql.exe -E -i"CarpetaUno\TextFile1.s...

Any shared file system solution under Windows?

Several Windows OSes need to access a shared FS. Notice it that it may be write-intensive on the FS and the FS should look like a local one(ie. C:\SharedFolder). Any idea? Thanks! ...

Editing a java source code file

I am trying to edit a class by parsing it, adding some information to it and then writing it back. I was wondering if there is a tool (similar to something like Doclet (well that uses that same API as it seems to have what I am looking for)) that could accomplish this task? By this I mean that I would like to take a java source file, lo...

most efficient way to get first and last line of file python

I have a text file which contains a time stamp on each line. My goal is to find the time range. All the times are in order so the first line will be the earliest time and the last line will be the latest time. I only need the very first and very last line. What would be the most efficient way to get these lines in python. Note: These f...

C# text file to store data

I want to persist some data into a text file in my c# application. I added the text file to the root of my project. How do i access it now? Will this file be embedded with my exe or what? ...

How to read and write a HashMap to a file ?

I have the following HashMap: HashMap<String,Object> fileObj = new HashMap<String,Object>(); ArrayList<String> cols = new ArrayList<String>(); cols.add("a"); cols.add("b"); cols.add("c"); fileObj.put("mylist",cols); I write it to a file as follows: File file = new File("temp"); FileOutputStream f = new FileOutputSt...