read

How to read from console in MATLAB?

How do I read a string or character from MATLAB console (command window)? ...

read file in java

Hi guys I have got a file contain large amount of numbers I have tried to use the following code to read it from the file, but it is super slow anyone can help to reduce the time? Thanks. following is my code to read it in a very slow way import java.io.BufferedInputStream; import java.io.DataInputStream; import java.io.File; import ...

python, subprocess: reading output from subprocess

I have following script: #!/usr/bin/python while True: x = raw_input() print x[::-1] I am calling it from ipython: In [5]: p = Popen('./script.py', stdin=PIPE) In [6]: p.stdin.write('abc\n') cba and it works fine. However, when I do this: In [7]: p = Popen('./script.py', stdin=PIPE, stdout=PIPE) In [8]: p.stdin.write('...

Read data into Matlab using URL

I want to read weather data from Weather Unground into Matlab directly. For a given site you can select to output the data in comma delimited format. How can I write a Matlab function that will read in the information into Matlab? I don't want to download the file but rather read it in from the URL. For example, here is a URL of some d...

Write/Save file to iPhone

Hello all, I am currently saving images to the iphone's local space whenever I finish loading them. I was wondering if I need a separate thread to do that. I.e The iphone can be requesting multiple images at the same time and when they are loaded, I call the save to HD method. Since there are a lot of save to HD method being called a...

How can I read the contents of a file into a list in Lisp?

I want to read in the contents of a file into a list. Some of my attempts so far have been - (defun get-file (filename) (let ((x (open filename))) (when x (loop for line = (read-line x nil) while line do (list line))) (close x))) (defun get-file (filename) (let ((x (open filename :if-does-not-exist nil)) (content...

opening file stored on internet via c++.

need a small program to learn basics on how to open a file stored on net for reading via c++. ...

Locations of CSV files in Android

I'm having trouble reading in from a .CSV file in an android app. Mainly a "FileNotFound" error. Where would be the easiest place to put the file, and what would be the address to it. I have been messing around with a few different places but have had no luck. Can anyone point me in the right direction? ...

Getting the IO count

Hi, I am using xen hypervisor. I am trying to get the IO count of the VMs running on top of the xen hypervisor. Can someone suggest me some way or tool to get the IO count ? I tried using xenmon and virt-top. Virt-top doesnt give any value and xenmon always shows 0. Any suggestions to get the number of read or write calls made by a VM ...

Reading Excel in C#

I have code in C# like this. xlWorkBook = xlApp.Workbooks.Open("data.xls", 0, true, 5, "", "", true, Microsoft.Office.Interop.Excel.XlPlatform.xlWindows, "\t", false, false, 0, true, 1, 0); I have data.xls file where .exe are located. When I compile and then run .exe, I'm receiving error that data.xls could not be found. What I do w...

PHP file permissions

How can I set permissions of a file to let a PHP program read and write but not be read by the public. When I set read permissions it denies PHP to the files. ...

Inserting a block of data into a huge file with fortran

Hi All, I have some massive (4.6 million lines) data files that I'm trying to edit with fortran. Basically, throughout the files is a series of headers followed by a table of numbers. Something like this: p he4 blah 99 ggg 1.0e+01 2.0e+01 2.0e+01 2.0e+01 5.0e+01 2.0e+01 . . 3.2e+-1 2.0e+01 1.0e+00 ...

how quick read 25k small txt file content with python

i download many html store in os,now get their content ,and extract data what i need to persistence to mysql, i use the traditional load file one by one ,it's not efficant cost nealy 8 mins. any advice is welcome g_fields=[ 'name', 'price', 'productid', 'site', 'link', 'smallImage', 'bigImage', 'description', 'createdOn', 'mo...

reading two integers in one line using C#

i know how to make a console read two integers but each integer by it self like this int a = int.Parse(Console.ReadLine()); int b = int.Parse(Console.ReadLine()); if i entered two numbers, i.e (1 2), the value (1 2), cant be parse to integers what i want is if i entered 1 2 then it will take it as two integers ...

How to programatticaly open/read digitally signed email with read receipt turned on in .NET / C# ?

Hi, I created "email management" tool that does bulk email management(standalone exe C# .NET4 application that "connects" to Oulook 2007 and via Microsoft.Office.Interop.Outlook "monitors" all user emails; not Outlook Add-in but standalone exe app + there are reasons why it's not addin architecture). Now, during testing phase I realise...

read more problem

Hello. I did read more function but it's not working correctly. I mean I can split my test post and I can cut my string with substring function. And I did this using < !--kamore--> keyword. But after I cut this with substring and do innerhtml and if there is some html tag before the index the css is going crazy. (< p>< !--kamore-->) I ...

Help reading every five lines from text file c++

As part of a larger assignment I have to create a method in a class that can read five lines of data then put that data into a dynamically created object. I am not sure how to go about getting the five lines of data separately into the object. The code should help to explain better but it does not work as desired. If someone can spot my ...

I get CL_SUCCESS for all my OpenCL error codes, but all my clEnqueueReadBuffer calls crash the program

I am badly stuck on why my OpenCL program crashes after clEnqueueReadBuffer calls. Is it a okay if I post all 300 lines of boilerplate/kernel code? Otherwise any suggestions on how to debug OpenCL code besides eyeballing and error code printing would be appreciated. UPDATE Wow, so I merely messed up my paramter to host memory on my clEn...

Boost.Asio: Operation Cancelled on async_read

Another one in the continuing saga of myself vs. Boost.Asio... I have a simple asynchronous client and server that utilise async_write and async_read to communicate. The client can successfully write bytes to the socket, but the server never sees them; my read handler on the server fails with "Operation cancelled". I'm inclined to beli...

Permission to write on SD card android

EDIT: Problem solved, FileOutputStream defined uncorrectly, change to: fos = new FileOutputStream( root + "/" + saveFileName ); Hello, I have a problem writing to the SD card, here is the code: (Sorry about the layout of the code, just copy pased it ) public class SaveAndReadManager { private String result; private String saveFileN...