Hello, I have one big XML file (600 MB - 850 MB) in format "**cells_yyyymmdd_hhmi.xml**" I would like to specify that everyday i will have new file with new date. So, *there should be general way to read it and cut it*. For exmaple, i have file of 7th January. Its, cells_20140107_154016 Goal is to split into small parts by shell script and do operation. It will be great if anyone can give input to check the filesize and if it is too big, make 4 parts instead of 3 parts. I did so far: head -1125000 cells_20140107_154016.xml > PART1.xml …

Member Avatar
Member Avatar
+0 forum 1

**Pls, somebody help me on writting a code to create word file from my c# form...**

Member Avatar
Member Avatar
-2 forum 5

How to read **550 MB** XML file in php? I couldn't put data in php file like: $xml =<<<EOT <?xml version="1.0" encoding="utf-8"?> <data> ..... ... </data> EOT; In addition, when i did from command line, it "**kill**" the process. *Any idea ?*

Member Avatar
Member Avatar
+0 forum 7

This code should read in some data from sector zero off of a USB flash drive, then print out some of the data. However when I run it there is nothing that was put in the buffer. int _tmain(int argc, _TCHAR* argv[]) { int ReadSect = 0; char diskname[60]; sprintf_s(diskname, "\\\\.\\K:", 'K'); HANDLE DiskHandle = CreateFile((LPCTSTR) diskname , GENERIC_READ,FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, NULL); // set up the offsets for the addresses passed to setFilePointer, and ReadFile long lo_offset, hi_offset; LPDWORD temp = 0; lo_offset = ReadSect << 9; hi_offset = ReadSect >> 23; (void) SetFilePointer( DiskHandle, 0, &hi_offset, FILE_BEGIN); char …

Member Avatar
Member Avatar
+0 forum 1

Dear all, I am trying to read a list of string from text file and put it into an array. Could anyone tell me, how to split that string to array. Here's my text file.... [I]text.txt[/I] a b 1 2 4 2 3 1 *3 1 3 *4 4 4 I want to show that looks like this, a b 1 2 4 2 3 1 *3 1 3 *4 4 4 My code: [CODE]#include <stdio.h> #include <stdlib.h> int main(void) { int i=0; char* string[100]; char line[100]; FILE *file; file = fopen("text.txt", "r"); while(fgets(line, sizeof line, file)!=NULL) printf("%s", line); string[i]=line; …

Member Avatar
Member Avatar
+0 forum 6

Hi, I've got a problem with my project. When I initialize an arraylist, the content is displayed and you can go through the arraylist by correctly answering the given word. But when I load a new arraylist from a file, the old arraylist is removed and the new one is filled in by the reader. But it isn't transfered to the setter of the other class. Neither is the size transfered to the setter of the other class. So when I run I sometimes have a NullPointer or I do not have a "repaint". I must say the code is …

Member Avatar
Member Avatar
+0 forum 2

Hello all, I want to write a qui program which opens and reads a text file when pressed Open File button. So far, when I click the button Open File Dialog works and I can choose the file to read but I do not know how to read it line by line. The code for click event is below. Can you please tell me what is the next step? [CODE]#pragma endregion private: System::Void open_file_button_Click(System::Object^ sender, System::EventArgs^ e) { //we use OpenFileDialog to show a file-open dialog box OpenFileDialog ^ openFileDialog1 = gcnew OpenFileDialog(); openFileDialog1->Filter = "Text Files|*.txt"; openFileDialog1->Title = "Select …

Member Avatar
Member Avatar
+0 forum 4

Hi, After uploading a pdf from a form, i am trying to read the file. It is saved in DB, and i try to get the chosen PDF via a link that holds a unique value from the DB, so the chosen PDF can be identified, and displayed. BUT, I only get the eror message from the bottom of the script, so something goes wrong, as I cant read the file, or something in my code is wrong, and doesnt get processed at all? [U]Does someone know how to do this? To read a PDF file, stored in the DB …

Member Avatar
+0 forum 0

I have a uload script that saves PDFs to the DB, and i have another page, where I want to read the PDF file, but the latter is not really happening.. AM I DEFINING MY PDF_DIR CORRECT: [CODE] define('PDFS_DIR', $_SERVER['DOCUMENT_ROOT'] .'includes/pdfs'); [/CODE] This is the read_pdf.php file: [CODE] <?php require_once("includes/config.php"); ?> <?php require(MYSQL); ?> <?php $valid =''; ?> <?php if(isset($_GET['id'])&&(strlen($_GET['id'])==40)&&(substr($_GET['id'],0,1)!='.')){ $file = 'PDFS_DIR'.$_GET['id']; //echo $file; // Does echo out the id of the file! if(file_exists($file)&&(is_file($file))){ $query = 'SELECT title, description, file_name, FROM pdfs WHERE tmp_name="'.mysqli_real_escape_string($connection, $_GET['id']).'"'; $result = mysqli_query($connection, $query); if($mysqli_num_rows($result) == 1){//OK! $row = mysqli_fetch_array($result, MYSQLI_ASSOC); $valid = true; …

Member Avatar
Member Avatar
+0 forum 4

Hi, I am making a simple application where it reads and loads words from a text file into a ListCtrl(lc_report) in wxPython. There are only two column. i am loading it like this : [CODE]f=open('Test.txt','r') all_words = map(lambda l: l.split(" "), f.readlines())[/CODE] And in Test.txt file, there are some words like this : Devid R 21 Floor John B 33 Floor Now as you can see what happens when it loads the words. I can only see Devid in first column and R in second column since there are only two columns. How do make it so that Devid R …

Member Avatar
Member Avatar
+0 forum 4

Hi everyone! I'm triyng to develop a program whith this functions: 1 - Read data from text file 2 - Put the data from file to a variable(ignoring comments in the file) 3 - Tokenize the data e transform the variable into another variable(like float) 4 - Make the calcs and put the data in another variable. 5 - Write the variable in another file I'm look in various treads,site,books but I don't find especific what i'm look for.I make some progress: [CODE]#include<stdio.h> #include<conio.h> #include<stdlib.h> #include<fstream.h> #include<iostream> using namespace std; int main () { char c, str[3]; ifstream is; cout …

Member Avatar
Member Avatar
+0 forum 14

Hey all. At the moment i'm struggling to read a file which contains 4 integers on each line separated by commas. I want to read each line then put them in a list like Text File will look like 1, 3, 7, 9 2, 5, 6, 8 I want it to be put in a list. Basically so that in the list it contains 1 3 7 and 9, the next part of the list contains 2 5 6 and 8 etc. The code i have for it is [CODE=C#] public class NewList { public int ID { get; set; …

Member Avatar
Member Avatar
+0 forum 9

What is the best way to terminate ReadFile once the data is done being read? I just sits there an hangs! I'm kinda new to Python so be easy on me! :) The other way i was able to read info from my pipe was blah = open(pipe) then blah.read() but i end up in the same situation. [CODE] pipeName = "\\\\.\\PIPE\\MYPIPE" try: pipeHandle = win32file.CreateFile(pipeName,win32file.GENERIC_READ,0,None,win32file.CREATE_NEW|win32file.OPEN_EXISTING,0,None) except: print "App Not running..." debugLog = '' while (1): try: hr, data = win32file.ReadFile(pipeHandle, 8192, None) if len(data) > 1: debugLog = debugLog + data if "Boot" in debugLog: print "Booted to DOS..." …

Member Avatar
+0 forum 0

Hi, I want to know to rows and columns of numbers from a text file. I do not want to read it as a string, but one number (including numbers with decimal) by itself. I tried using FileInputStream and DataInputStream, but I'm not really good at it. I don't know how to not read it as a double, and not a string.

Member Avatar
Member Avatar
+0 forum 2

Hi all, I'm having some problem with my codes. I have a output that is generated into a txt file. Now, I need to read the txt file and convert the output into something else. This is the output that is store in a txt file: VAL LEU SER PRO ALA ASP LYS THR ASN They are all amino acid 3-letter abbreviation. I need to convert them into 1-letter abbreviation. For example, Val should be 'V'. Leu should be 'L'. Ser should be 'S'. Pro should be 'P'. Ala should be 'A'. Asp should be 'D'. Lys should be 'K'. …

Member Avatar
Member Avatar
+0 forum 3

Hi. Can anyone help solve my problem. I'm stuck already and still can't find solutin although have search in google many times. I want develop a simple firefix addon. This is my first addon.. It was use javascript. I want to read a content from other web. In php, I know by using function file_get_content(), but in javascript how to solve it? Additional, I want assign the web content to a string variable. How to solve it? Any idea..

Member Avatar
+0 forum 0

I am trying to run one of the two files on my site using if file exist and readfile functions. When I give the file path in readfile() it runs properly. But when I use same file path into if file exist() it says "file does not exist". ================= It returns error "file does not exist" <?php $filename = '{SITE_URL}templates/{TPL_NAME}/sidebars/{NODE_ID}.html'; if (file_exists($filename)) { echo "The file $filename exists"; } else { echo "The file $filename does not exist"; } ?> ===================== It runs properly ..... <?php readfile("{SITE_URL}templates/{TPL_NAME}/sidebars/{NODE_ID}.html"); ?> ========================= It does not work at all ..... <?php IF(file_exists("{SITE_URL}templates/{TPL_NAME}/sidebars/{NODE_ID}" . ".html")) …

Member Avatar
Member Avatar
+0 forum 8

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

Hi! Could you tell me what did I do wrong in the code bellow? I try to read one line from a file, but it shows on the screen only unknown characters(different from the characters I have in the file). [Code] GetLine Proc Hand:HANDLE, pBuf:DWord Local Len:DWord Local rLen:DWord Local Chr:Byte Mov Len, 0 .Repeat Mov rLen, 0 Invoke ReadFile, Hand, Addr Chr, 1, Addr rLen, NULL Invoke StdOut, Addr Chr Mov Ebx, Len Mov Ah, Chr Mov Byte Ptr [pBuf+Ebx], Ah Inc Len .Until Chr == 10 || Chr == 0 Mov Byte Ptr[pBuf+Ebx], 0 Mov Eax, Len Ret …

Member Avatar
+0 forum 0

could i get help with the syntex on reading a file to an array in c++. all the examples i see are more

Member Avatar
Member Avatar
+0 forum 2

I need the coding for the following question in C: Read from a file (.txt file) and count the number of times the word "a", "is", "the", "and", "that", and "this" occurs.

Member Avatar
Member Avatar
-3 forum 3

I need the coding for the following question in C: Read and print all the consonants from a file (no duplicates). Assume the file is a .txt file. The consonants are then to be sorted in alphabetical order.

Member Avatar
Member Avatar
-6 forum 2

Hi, I realise this may be a simple problem but i've really been pulling my hair out at the moment. I've got a text file, which I need to read each of the 15 characters (numbers and letters) on each line in to a new record in an array (called defarray) - but I can't seem to do it. I've managed to work out the code to read the text file and output each line but not save it into an array. Text file (fp called = 'definitions') looks like; ABCDEF123AAABB ABCEEF123AADFB ABCDDF123ADSHB etc... currently I have the following; [Code] …

Member Avatar
Member Avatar
+0 forum 4

Hello, I am trying to read the contents of a text file from a website. I am running Visual Basic 6 (SP6). I need to add this code to an existing application written in VB6, so VB.NET is out. The file I want to read is on our website. It is a text file containing a filename. I need to get this file name so that I can download it. So help with both steps would be nice. Thanks for your time, Doug

Member Avatar
Member Avatar
+0 forum 3

The End.