textfile

Delphi Standard Input Output Code page

Delphi 2010 When reading from file using readLn procedure, by default i get unicode string converted from code page 1251 (code page of windows). How can i change this and read from file in other code page, in 1252 or UTF16 ? ...

How to parse a text file and write the result to an xls file?

Hi all i am a junior level SQL developer. I have a situation where I have a text file with 1100 lines of a search result with each line containing a file path and a stored procedure associated with that file. Each line has a structure like the one below: abc\def\ghi\***.cs(40): jkl=******.*****.******, "proc_pqrst", parms); Where abc\...

List - Strings - Textfiles

I've got a few questions concerning text files,list and strings. I wonder if it is possible to put in a code which reads the text in a textfile,and then using "string line;" or something else to define each new row of the text and turn all of them into one list. So I can sort the rows, remove a row or two or even all of them or search t...

Additional spaces in String having read text file to String using FileInputStream

Hi, I'm trying to read in a text file to a String variable. The text file has multiple lines. Having printed the String to test the "read-in" code, there is an additional space between every character. As I am using the String to generate character bigrams, the spaces are making the sample text useless. The code is try{ FileInputSt...

How to add custom line endings in text file (e.g. I want to add a line ending after all periods)

I have a bunch of text files where I want to add a line ending after each period. I'm wondering if there is a way to do this by doing replacing all periods with a \n\n, assuming I have the right encoding (unix). Anyone know how I would do this? Replace .'s with .\n\n and then save as a different file? Thanks! ...

How to make simple dicitonary J2ME

Hi, I am beginner in JavaME. I'd like to make simple dicitionary. The source data is placed on "data.txt" file in "res" directory. The structure is like this: #apple=kind of fruit; #spinach=kind of vegetable; The flow is so simple. User enters word that he want to search in a text field, e.g "apple", system take the user input, read ...

problems parsing textfile in Matlab, is there a way to allow fields to have multiple lines?

I have a textfile that I am I want to make into a list. I have asked two questions recently about this topic. The problem I keep coming across is that the I want to parse the textfile but the sections are of different length. So I cannot use textscan(fid,'%s %s %s') because the length of each gene varies. I have also had trouble using...

load database from text file

say I have a table named XY_values with columns X_values and Y_values. now, I have a text file xy.txt which contains those x values and y values, with x values in the 1st column and y values in the second column. is there any SQL command to load those x and y values from the text file into the XY_values table in the database? thanks. ...

How to convert Matlab variables to .dat (text) file with headers

EDITED QUESTION: I have 2500 rows x 100 columns seismic data in variable named avg_seismic_data_models. I also have 2500 rows x 100 columns variable 'X' and similar size matrix variable 'Y', both containing the co-ordinates. I want to save the values of this variable in a text (.dat) file which must have 302 header lines in the followi...

How do I populate jcombobox from a textfile?

I would like to be able to populate a jcombobox from a textfile. I am using NetBeans 6.9. Any suggestions would be appreciated. Thanks. ...

Visual C# - Write contents of a textbox to a .txt file.

I'm trying to save the contents of a textbox to a text file using Visual C#. I use the following code: private void savelog_Click(object sender, EventArgs e) { if (folderBrowserDialog3save.ShowDialog() == DialogResult.OK) { // create a writer and open the file TextWriter tw = new StreamWriter(...

File Handling using PHP

Can anyone tell the method to modify/delete the contents of a text file using PHP ...

how to insert a specific data in text file(with .log extension) into database table?

I have managed to insert the whole text-file data in SQL-SERVER database table with this statement BULK INSERT [dbo].[tablename] FROM 'c:\weblog.log' WITH ( FIELDTERMINATOR = ' ', ROWTERMINATOR = '\n' ) But my text-file is not organized in any format and it contains some data i want to omit from the insertion process. So i am looking ...

Textfiles problem

I've been trying to call my textfile and use my data to plot a curve for analysis and the code i use is [NP,Fluenz,ODRescan1,ODRescan5,ODRescan9,ODRescan15,StdDevRe1,StdDevRe5,StdDevRe9,StdDevRe15] = textread(x,'%f %f %f %f %f %f %f %f %f %f','headerlines',4) and each time i ran this ,an error appear.How can i do this ,pls any help.Thank...

Problem extracting text from text file perfectly in VB6

Hi everyone, I am working on a VB6 project and I need to extract plain text from a text file. Here is code of the function I used to do that: Private Function FileGetText(TextFile As String) As String Dim FileContent As String Dim TextLine As String Dim n As Integer n = FreeFile Open TextFile For Input As #n 'Open given Text File Do Un...

How do I programatically capture the output of a command on Windows

What the question says. Ultimately what I want is to execute gcc and capture the output if there's an error. The problem is errors are written to stderr instead of stdout. On Linux I can do gcc foo.c 2>&1 How can I accomplish this on Windows? ...

Javascript & PHP :: What to do ??

I have a string, get by Javascript (the content of a div!); I want to write this string to PHP, because i want a text file with this content! How is the best way to do this? Edit[1]: Method Post doesn't works, because i have '<' chars and it erase them (i don't know why)... Example: I have #include <stdio.h> and when i call echo $_REQ...

In C, how should I read a text file and print all strings

I have a text file named test.txt I want to write a C program that can read this file and print the content to the console (assume the file contains only ASCII text). I don't know how to get the size of my string variable. Like this: char str[999]; FILE * file; file = fopen( "test.txt" , "r"); if (file) { while (fscanf(file, "%s",...

Create text file and make it hidden and readOnly c#

How to Create text file and make it's Properties Hidden and Archive and ReadOnly using C#? ...

How to read data in chunks from notepad file in Matlab?

My data is in following format: TABLE NUMBER 1 FILE: ReservoirModel_CMGBuilder.irf WELL: Well-1 TIME Oil Rate SC - Yearly day bbl/day -0.01 0 364.99 35368.4 729.99 29307 1094.99 27309.5 1460.99 26058.8 1825.99...