file

How to create files hierarchy in Anroids '/data/data/pkg/files' directory?

I try to create 'foo/bar.txt' in Android's /data/data/pkg/files directory. It seems to be a contradiction in docs: To write to a file, call Context.openFileOutput() with the name and path. http://developer.android.com/guide/topics/data/data-storage.html#files The name of the file to open; can not contain path separators. ht...

How to load text file into sort of table-like variable in Lua?

Hi, I need to load file to Lua's variables. Let's say I got name address email There is space between each. I need the text file that has x-many of such lines in it to be loaded into some kind of object - or at least the one line shall be cut to array of strings divided by spaces. Is this kind of job possible in Lua and how should...

Multiple File I/O

Hi All, Sorry about the lame title. I have a project I'm working on and I would appreciate any suggestions as to how I should go about doing the IO stuff. Ok, I have 3 text files. One file contains many many lines of text. This is the same for the other 2 files. Let's call them File1, File2 and File3. I need to create a text file, fo...

PHP Remote file streaming with Resume Support

Firstly, I am aware of similar question being asked before. The subject pretty much explains the question but still, the file is hosted on another server, the user will download file via my script, streamed to him... But the problem is user can't resume it once paused...any solutions? ...

How to open a file and search for a word [Ruby]?

How can I open a file and search for a word inside it using Ruby? ...

VB.NET Read Certain text in a text file

Hey everyone, I want my program to read certain text in a text file. For example if I have a text file that contains the following info.. acc=blah pass=hello I want my vb.net application to get that the account variable is equal to blah, and the password variable is equal to hello. Can anyone tell me how to do this? Thanks ...

converting file from .ods to xls file

I have a file in .ods format, How to access that file in vb.net?,which connection string i have to use? and how to convert that .ods file to .xls file? i used file.copy function,the extension of filename is changed to .xls,but the Save as type of filename won't change,any solution is there programatically. which converter format,i h...

Importing text files with comments in MATLAB

Is there any character or character combination that MATLAB interprets as comments, when importing data from text files? Being that when it detects it at the beginning of a line, will know all the line is to ignore? I have a set of points in a file that look like this: And as you can see he doesn't seem to understand them very well. Is...

How can I create my ASP.NET MVC controller actions so they accept Files?

I've been working all weekend on a Messaging system for my website so users can send and receive messages on my site internally. I have my table schemas worked out, and right now I can send basic messages to different users. Now, I'm working on the attachments portion. How can I create my action methods so that they accept Files? Ide...

Php upload file

The code looks like this: html <form action="contact.php" method="post" enctype="multipart/form-data" onsubmit="return Validare();"> <input type="text" name="nume" value="Nume" class="contact" id="Nume" onclick="if(this.value=='Nume')this.value='';" onblur="if(this.value.replace(/^\s+|\s+$/g,'')=='')this.value='Nume'" /><font colo...

How do I submit a "file" input without submit button with JavaScript?

There is a way to automatically submit a form without clicking to a "submit" button? I have a form with one "file" input. I would submit the form after the user have selected one file. ...

Python: Checking Header Format

I'm new to python and need help with a problem. Basically I need to open a file and read it which I can do no problem. The problem arises at line 0, where I need to check the header format. The header needs to be in the format: p wncf nvar nclauses hard where 'nvar' 'nclauses' and 'hard' are all positive integers. For example: p wncf ...

Python: Selecting to read the first line only

After reading in a file how would tell python to read the first line only? ...

Ajax file upload

Hi, I have a form that upload a file, I would process the file inline with ajax but I don't know how I can get the data with ajax. In my script I use this method: $.ajax( { type: "POST", url: "upload.php", data: ({ file : '???' }), success: function(...

File structure explorer (sth like Wireshark, but for files)

Hi I am looking for a software which is able to decompose and analyze files. Do you know any? What I mean is something that, given a file, would tell me for example: here is the magic number telling that it is a PNG, and here starts a colors definition, here goes the compression flag, and then there are the picture data, and so on......

Python: Import a file and convert to a list

I need help with importing a file and converting each line into a list. An example of the file would look like: p wfgh 1111 11111 111111 287 48 0 65626 -1818 0 4654 21512 02020 0 The first line beginning with p is a header and the rest are clauses. Each clause line must begin with a series of at least two integers and finish with a z...

Documenting Java resource files

I have a multi-module Maven project with resource files (java properties files and spring xml config files, etc.) all over the place. I'd like to create some system documentation to help new developers understand these. However, I am loath to just create static content in a web page or word document. Currently I just place comments at...

c reading a text file into array line by line and print them

hi, i have the following c# code snippet string[] lines = File.ReadAllLines(@"C:\test.txt"); for(int i=0; i<lines.Length; i++) Console.WriteLine(lines[i]); Can you help me to convert it to C. Thanks! ...

c retrieving total line numbers in a file

hi can anyone show me how to get the total number of lines in a text file with programming language C? thanks! ...

C# - I cannot reference HttpPostedFileBase

I am using MVC .NET in a distributed environment with CSLA and I can reference HttpPostedFileBase from one of my web layers (eg Website.MVC), but I cannot reference HttpPostedFileBase from a separate layer (lets call it OtherLayer.Web). Any idea on what I need to do to be able to call HttpPostedFileBase ? I am able to use HttpPostedFi...