Hi all, I need to read a text file (I've attached it, you can take a look), and then store all the numbers in it into a 2D array. After which, I need to parse it. I need urgent help here! ):

Member Avatar
Member Avatar
-2 forum 49

what i wanted to do was to read multiple .doc(files) and apply an algo on it, now .doc files can be read with stream reader the problem here is how to read multiple files in a folder and the names of the files are also not known please help

Member Avatar
Member Avatar
+0 forum 2

Hi, I have a bulk of pdf documents. I want to read that using php script. I searched a lot, but everyone is about creating pdf files. Here I dont want to create pdf file but I want to read it. Is there any way to read it php? -Arun

Member Avatar
Member Avatar
+0 forum 1

When my code (below) is executed, a error message is triggered which says "The operation completed successfully." To give this some context, hFileMap is valid; I have checked this with my debugger, and other operations can easily be performed correctly on this handle that yield correct results. The only weird thing is that MapViewOfFile returns a null pointer. Since I use this memory mapped file as a way of communicating between two applications, this function is critical. Please note that I am no beginner to coding, and this same program successfully implements multi-threading as well as on-the-fly (dynamic) function creation …

Member Avatar
Member Avatar
+0 forum 2

Hey everyone, I have been searching and searching and cannot find out how to do what I'm looking to do, that is the only reason I would post a new thread. So basically, I am wanting to read a file that looks similar to this: [CODE] DATA START NOTES FILE NOTE NameId="Name1" ColourId="13" Text="Test7" / NOTE NameId="Name2" ColourId="6" Text="Test6" / NOTE NameId="Name3" ColourId="10" Text="Test5" / NOTE NameId="Name4" ColourId="7" Text="Test4" / NOTE NameId="Name5" ColourId="8" Text="Test3" / NOTE NameId="Name6" ColourId="3" Text="Test2" / NOTE NameId="Name7" ColourId="1" Text="Teat1" / NOTE NameId="Name8" ColourId="7" Text="test" / DATA END [/CODE] After reading the file, I want to …

Member Avatar
Member Avatar
+0 forum 1

Hi, I have this program that part of it is hard coded. Instead of hard coding it, I need to do a file read instead. Meaning, the hard coded part must be changed to reading the info I need from a txt file. May I know how to do that? [CODE]// Compile with: // javac Match2.java // Run with: // java Match2 HEAGAWGHEE PAWHEAE // Class hierarchies // ----------------- // Align general pairwise alignment // AlignSimple alignment with simple gap costs // NW global alignment with simple gap costs // SW local alignment with simple gap costs // Traceback traceback …

Member Avatar
Member Avatar
+0 forum 12

Hello everybody! I have to go through each subfolder and extract matching strings from each of the files (File_1, File_2, File_3, File_4, etc.). Unfortunately, I don't know how to do that under Linux. I have the following structure: MainFolder: ---Subfolder A ------File_1 ------File_2 ------File_3 ---Subfolder B ------File_4 ------File_5 ------File_6 ---Etc. My original code only goes through all the files in the first subfolder (Subfolder A). [CODE] import os, glob import sys path = sys.argv[1] for file in glob.glob(os.path.join(path,'*.*')): print "Current file: ", file f = open(file, 'rU') split line do smth [/CODE] How do I go through the rest of …

Member Avatar
Member Avatar
+0 forum 1

Ok, I'm having the hardest time writing this code for work. Any suggestions on how to get me going in the right direction on this code would be great!!! Project: I need to make uninstalled fonts available for viewing for my co-workers. Therefore, I'm to write a code that can do this from the intranet site. First, I compiled a list of fonts on excel, csv, and text (tab delimited). Then I started to write the code in an applet that can ask the user to type in a font. Then the program is to spit out font(s) that are …

Member Avatar
Member Avatar
+0 forum 4

Hi, I am beginner in PHP and MYSQL ... Before using mysql i have created database in text files.. Now I have to convert it into the table of mysql database.. The things i want to do is .. first open the specific folder and into that open the sub folder and in each sub folder there are text files.. Than open the text files, read the data and add into the sql table and add the folder name to the another field.. Can any one help me how to code it?? Please.. And explain if you want how u …

Member Avatar
Member Avatar
+0 forum 1

Hey guys, I'm writting a program that reads a list of names from a file called name.txt and instert these names directly into a linked list in alphabetical order of [B]last[/B] names. For example, if the text file has these names: Henry Johns III, Albert Einstein, Henry Johns II, Mary D Goly, Bob Apple Jr. , Bob Apple Sr. then the linked list will be in this order: Bob Apple Jr. , Bob Apple Sr., Alber Einstein, Mary D Goly, Henry Johns II, Henry Johns III. Someone suggested me to use CompareTo to compare the last names, but I'm still …

Member Avatar
Member Avatar
+0 forum 4

Hi, i am trying to read the contents of a text file containing a single line into a string. i'm doing this in a while loop. the text file gets updated in each run of the loop and therefore the string should contain a new value in each run. but the string is not getting updated. the file is getting updated but the value in the string remains that of the first run. here is the relevant code: sending side: [code] #include <stdio.h> #include <sys/types.h> #include <sys/socket.h> #include <netinet/in.h> #include <netdb.h> void error(char *msg) { perror(msg); exit(0); } int main(int …

Member Avatar
Member Avatar
+0 forum 10

i have a very simple program which takes in file name as argument and print the content of the file , but for some reason it isnt working here is the code [code] import sys ,os def Cat(filename): f = open(filename) text = f.read() print '----', filename print text def main(): args = sys.argv[1:] for arg in args: Cat(arg) [/code] i would be glad , if u could help me out .....

Member Avatar
Member Avatar
+0 forum 7

I want to write a Code in C which can create copy any given file (txt, bmp, jpg, pdf etc) what i've written so far is: int main(){ FILE *fp; char ch; FILE *fpW; if((fpW = fopen("file2.bmp","w"))==NULL) { printf("Cannot open Destination file.\n"); exit(1); } if((fp = fopen("file.bmp","r"))==NULL) { printf("Cannot open Source file.\n"); exit(1); } while((ch = fgetc( fp )) != EOF) { fputc(ch, fpW); } fclose(fp); fclose(fpW); //printf("\n %s \n",ret); return 0; } it works fine with txt file but doesn't work with pdf and image files .... please Help ..!!

Member Avatar
Member Avatar
+0 forum 6

The End.