read

Read data from ATOM file with jquery.

Hi, i'm trying to read a xml/atom file, the code is: $.ajax({ type: 'GET', url: options.url, data: options.data, dataType: 'xml', async:options.async, success: function(xml) { var feed = new JFeed(xml); if(jQuery.isFunction(options.success)) options.success(feed); ...

What does -1 from DataInputStream's read() mean?

According to Java documentation, the read() method returns: -1 if there is no more data because the end the stream has been reached I don't quite understand what they mean by "end of stream". Currently I close/re-open the socket when this occurs (which I understood from much Googling to be an acceptable way to deal with this). Is -1...

How can I add and remove bytes on from the start of a file?

I'm trying to open an existent file save a bytes in the start of it to later read them. How can I do that? Because the "&" operand isn't working fo this type of data. I'm using Encoding.UTF8.GetBytes("text") to convert info to bytes and then add them. Help Please. ...

Ml file reading limits

I want to read from file but, when I use inputAll or inputLine, it read only 70 character from each line. how can I read from file without limitation ? ...

Fast data reading from CD-ROM

Hi, I have to read a large file containing many animation frames from CD/DVDrom and display it into screen as an animation. When reading from hard disk, the strategy of reading a frame into memory, processing, displaying and then reading next frame works good, but when I read from optical device, access time kills the animation. I use ...

How to check if a file is open

I need to check if any files in a folder is open by other applications or not. Unfortunately, if a file is open, the GetFileAttributesA() return wrong values. Is there a workaround for this or am I doing something wrong ? ...

Read() from file descriptor hangs

Hey, hopefully this should be my last PTY-related question and I can move onto more exciting issues. (c; Here's a set of small functions I have written for creating and reading/writing to a pty: http://pastebin.com/m4fcee34d The only problem is that they don't work! After I run the initializer and writeToPty( "ls -l" ) , 'output' from...

zend framework : set imap mail to read, or move it to a folder

Hi overflowers, After reading a message's state in Zend_Mail_Storage_Imap with $message->getHeaders(). How do I then set that mail as read? setHeaders(Zend_Mail_Storage::FLAG_SEEN); Thanks, Dan ...

C programming pointer arrays read file

The line *array[cnt] = thing causes a seg fault and I don't know why. Any ideas to fix this? long *Load_File(char *Filename, int *Size) { FILE *fp; if((fp = fopen(Filename,"r")) == NULL) { printf("Cannot open file.\n"); exit(-1); } fscanf(fp,"%d",Size); int cnt = 0; int items = *Size; l...

How to make Java read very big files using Scanner?

I'm using the following basic function which I copied from the net to read a text file public void read () { File file = new File("/Users/MAK/Desktop/data.txt"); System.out.println("Start"); try { // // Create a new Scanner object which will read the data from the // file passed in. To check i...

How to read a web page in PHP

I'm new to PHP and trying to save some web pages to text files using PHP scripts. Do you know any PHP script to load a web page into a file buffer and remove HTML tags? ...

Read xml file from client

I'm trying to read a xml file from client. After search for it. I have got to upload the file to the server with this code. var imagesFilter:FileFilter = new FileFilter("*.jpg,*.gif,*.png", "*.jpg;*.gif;*.png;*.jpeg"); fileRef.browse([imagesFilter]); But what I want to do is to read the file from client and parse it without uploading ...

Set Excel sheet as datasource to Gridview .

Hi, I have the excel sheet , I want to keep it as datasource to the gridview . gridview will be editable so whatever the data updated sholud be write to again in excel sheet with respected location in sheet. How can i do this ? Please help me . ...

Read Excel data in SharePoint 2007 using BDC

Hello Friends, I am trying to connect to read Excel file data using BDC in SharePoint 2007. I have used the Microsoft ApplicationDefinitionDesigner.exe and created the following Application Definition file. I can test the Method instances and can import this file as well. But when I use this in Business Data List webpart, I am getting a...

[C#] Read XML and add it to a listView with multi columns

hi all, how can i add subItems into my listView with 3 columns? it only adds items to the first column //Read XML private void button3_Click(object sender, EventArgs e) { System.Xml.XmlDocument loadDoc = new System.Xml.XmlDocument(); loadDoc.Load(Application.StartupPath + "\\Computers.xml"); foreach ...

Android SSL socket blocks on read while changing connection

I assume that when I do a read on the inputstream, it blocks until it gets more data to read. I also assume that when the connection is closed, the read throws an IOException. The problem is that sometimes when I change the connection from carrier to WiFi or from WiFi to carrier, the read just gets stuck and never throws the IOException...

Reading/Writing PDF Files in Visual C# Windows Forms

Hi All For a client, I need to be able to read and write PDF files. There are two downsides to this: I don't know how. I can't use any third-party copmonents/libraries. Can somebody please point me into the right direction where I might be able to learn how to begin reading and writing PDF files? I'm not asking for code or anything...

C++, read and write to a binary file at the same time

Hi I wanted to know if it's possible to read a byte from a binary file with "fstream" and then change that byte and write it back. I tried this code but it didn't work and nothing happens but I'm sure it reads correctly. file.open(path, ios::in|ios::out|ios::binary|ios::ate); file.seekg(0, ios::end); int size=file.tellg(); file.seekg(0,...

Socket programming: problem with recv/read

EDIT: the code below has been fixed to receive and send properly AND to account for the actual bytes of messages sent annd recieved (latter thanks to EJP) Hey guys, I'm programming in C, Unix. I have server and client that are supposed to exchange msgs. While client seems to send messages fine, server doesn't receive the messages the c...

Is Java ArrayList / String / atomic variable reading thread safe?

Hi all, I've been mulling this over & reading but can find an absolute authoritative answer. I have several deep data structures made up of objects containing ArrayLists, Strings & primitive values. I can guarantee that the data in these structures will not change (no thread will ever make structural changes to lists, change references...