textfiles

How can I quickly determine the amount of rows in a text file?

I'm new to using C programming I was wondering if there is a function call that can be used to quickly determine the amount of rows in a text file. ...

Will a Flash .swf file execute a .exe file on Mac?

Hi there I am busy updating a Flash application from a previous developer, but it was written for Windows. I am busy developing on Mac and there is this segment of code: _global.localSO = SharedObject.getLocal("personalCookie", "/"); _global.localSO.data.name = textFileContent; _global.localSO.flush(); fscommand("exec", "fscommand/save...

In Powershell, what's the most efficient way to split a large text file by record type?

I am using Powershell for some ETL work, reading compressed text files in and splitting them out depending on the first three characters of each line. If I were just filtering the input file, I could pipe the filtered stream to Out-File and be done with it. But I need to redirect the output to more than one destination, and as far as I...

getchar() and counting sentences and words in C

I'm creating a program which follows certain rules to result in a count of the words, syllables, and sentences in a given text file. A sentence is a collection of words separated by whitespace that ends in a . or ! or ? However, this is also a sentence: Greetings, earthlings.. The way I've approached this program is to scan through t...

saving the contents of a listbox to a text file c#

How can I save the contents of my listbox to a text file using a save file dialog? I also want to add additional information to the text file and also add a message box saying saved when it's been successful. Thankyou in advance for any help ...

What is the fastest way to unzip textfiles in Matlab during a function?

Hello all, I would like to scan text of textfiles in Matlab with the textscan function. Before I can open the textfile with fid = fopen('C:\path'), I need to unzip the files first. The files have the extension: *.gz There are thousands of files which I need to analyze and high performance is important. I have two ideas: (1) Use an ex...

XML file and text files!

Hi, I want to know the advantages of using an XML file over a text file?please help me thanks! ...

Unable to open text file from WebBrowser control

I have a sample application, in which I am trying to load a text file in WebBrowser control. I have a html file through which I am calling Javascript function to open text file. But it is showing me error like; Cannot find 'file:///C:/temp/test%2520page.txt'. Make sure the path or Internet address is correct. File exist at this locatio...

Seek, move front back in a file cut and paste

I need to do the following things for a text file..and insert the seeked words to a excel please give me some tips: Seek the letter sequence anywhere in the file "stg-" take the first two characters from where it is searched ... eg if the sentence has abc-stg-c5-sfdsdf then it should take c5 and this c5 should insert in the first col...

Diff tool to align shuffled lines

Suppose I have two documents that are identical except the lines are shuffled. Is there a tool that can show me which lines in document A correspond to which lines on document B by drawing lines to connect them (kinda like Cairo does for machine translation word alignments)? What if the files have some level of differing lines (I don't ...

Create Text File Without BOM

Hi guys, I tried this aproach without any success the code I'm using: // File name String filename = String.Format("{0:ddMMyyHHmm}", dtFileCreated); String filePath = Path.Combine(Server.MapPath("App_Data"), filename + ".txt"); // Process myObject pbs = new myObject(); pbs.GenerateFile(); // pbs.GeneratedFile is a S...

How to overwrite only part of a file in c++

I want to make modifications to the middle of a text file using c++, without altering the rest of the file. How can I do that? ...

How to use Inno Setup scripting to edit a text file?

How can I append text to a file? ...

Export Core Data Entity as text files in Cocoa

Hello, I have an entity in core data that has 2 Attributes. One that is a string called "name", and another one that is a string called "message". I need a method to create text files for all the attributes that the user has added. I wan't the files names to be the name attribute and the contents to be the message attribute. If anyone ...

Creating text file from as2

I'm trying to find a way to write to a text file from as2. I don't want to use any php or asp because my app needs to run without an internet connection. As3 has FileReference.save() and judging by the amount of searching I've done, as2 doesn't have that simple of a solution. Does anyone have a way even if its hacky to write to a txt fil...

Reading text files line by line, with exact offset/position reporting

Hi. My simple requirement: Reading a huge (> a million) line test file (For this example assume it's a CSV of some sorts) and keeping a reference to the beginning of that line for faster lookup in the future (read a line, starting at X). I tried the naive and easy way first, using a StreamWriter and accessing the underlying BaseStream....

I Need a Human Readable, Yet Parse-able Document Format

I'm working on one of those projects where there are a million better ways to accomplish what I need but I have no choice and I have to do it this way. Here it is: There is a web form, when the user fills it out and hits a submit a human readable text file is created using the form data. It looks like this: field_1: value for field one...

Can I build a resulset from a file in Java?

I don't have much experience working with resultsets, but as ResultSet is an interface, I guess I could implement it to work with a file as a backend. Is this nonsense? Is there any solution already given for my problem? ...

Python: deleting rows in a text file

A sample of the following text file i have is: > 1 -4.6 -4.6 -7.6 > > 2 -1.7 -3.8 -3.1 > > 3 -1.6 -1.6 -3.1 the data is separated by tabs in the text file and the first column indicates the position. I need to iterate through every value in the text file apart from column 0 and find the lowest value. once the low...

how to validate usename and password from a text file form

I have a login form that has Username and password as inputs from user and I want to validate these login credentials from a text file. How can I do it? I know how to write data and read data..but how to read only specific data.or check whether username password combination exists or not. ...