read

PowerShell: Read text, regex sort, write output to file and formatting

I am a Powershell novice and have run into a challenge in reading, sorting, and outputting a csv file. The input csv has no headers, the data is as follows: 05/25/2010,18:48:33,Stop,a1usak,10.128.212.212 05/25/2010,18:48:36,Start,q2uhal,10.136.198.231 05/25/2010,18:48:09,Stop,s0upxb,10.136.198.231 I use the following piping construct ...

Android: How to read a txt file which contains Chinese characters?

Hallo, i have a txt file which contains many chinese characters, and the txt file is in the directory res/raw/test.txt. I want to read the file but somehow i can't make the chinese characters display correctly. Here is my code: try { InputStream inputstream = getResources().openRawResource(R.raw.test); BufferedReader bReader = new B...

read from file as char array

I am reaing from a file, and when i read, it takes it line by line, and prints it what i want exactly is i want an array of char holding all the chars in the file and print it once, this is the code i have if(strcmp(str[0],"@")==0) { FILE *filecomand; //char fname[40]; char line[100]; ...

Django dislaying upload file content

hello, i have an application that loads different documents to the server, and allows users to read documents' content. i am uploading the documents to the server, and then i try to read the courses by id, like: def view_course(request,id): u = Courses.objects.get(pk=id) etc But i don't find anywhere : how can i actually read the ...

[iPhone] Error reading plist file for fill a table

Hi, I'm developing an app for iPhone but I've a problem... I've a view with some textField and the informations writed in them are saved in a plist file. With @class and #import declarations I import this view controller in another controller that manage a table view. The code I've just wrote appear to be right but my table is filled up ...

Read email from incoming mail server(POP)

Hi, I have used an open source code from codeproject to read email from incoming mail server(POP Server). The code can be found at following location: http://www.codeproject.com/KB/IP/Pop3MimeClient.aspx So far it works fine i can read emails. My objective of using this code was to retrieve emails from POP server and process them. M...

Blackberry Development, java.lang.outofmemoryerror

Hi Forum, I am new to Blackberry development (I am using Eclipse with Blackberry plug-in), I am trying to read a text file, which I placed in the "src" folder of my Blackberry project and this text file just contain a word "Test". when I run the program, I gets "UncaughtException: java.lang.outofmemoryerror". Here is the code I am usi...

Python: slow read & write for millions of small files

Conclusion: It seems that HDF5 is the way to go for my purposes. Basically "HDF5 is a data model, library, and file format for storing and managing data." and is designed to handle incredible amounts of data. It has a Python module called python-tables. (The link is in the answer below) HDF5 does the job done 1000% better in sa...

Using PHP to read a web page with fsockopen(), but fgets is not working

Im using this code here: http://www.digiways.com/articles/php/httpredirects/ public function ReadHttpFile($strUrl, $iHttpRedirectMaxRecursiveCalls = 5) { // parsing the url getting web server name/IP, path and port. $url = parse_url($strUrl); // setting path to '/' if not present in $strUrl if (is...

UnauthorizedAccessException app.config c#

First I create a setup from a project, and I install it. When the program reads and writes from app.config, I get an UnauthorizedAccessException. This works perfect in visual studio, but with creating a setup and installing it, it always crashes at this point. Someone who knows how to solve this? Thanks ...

Read specific line from text file, according to Checked Listbox selection number.

Heya, i want to create an application which will read a specific line from a text file and show it in a textbox. The line will be chosen according to the number of the listbox selection i will make. Here's the code: Public Class Form1 Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase...

image processing with hadoop

How to read video frames in hadoop? ...

What is the difference between connection and read timeout for sockets?

3 questions: 1) What is the difference between connection and read timeout for sockets? 2) What does connection timeout set to "infinity" mean? In what situation can it remain in an infinitive loop? and what can trigger that the infinity-loop dies? 3) What does read timeout set to "infinity" mean? In what situation can it remain in an...

What is PHP for C# ReadBytes(stream langth)?

What is PHP for C# (asuming we open some local (on server) file instead of OpenFileDialog private const int HEADER_LENGTH = 13; stream = File.OpenRead(openFileDialog.FileName); header = ReadBytes(stream, HEADER_LENGTH); And will we be able to do something like this in PHP as a next step private const byt...

Can read(2) return zero when not at EOF?

According to the man page for read(2), it only returns zero when EOF is reached. However, It appears this is incorrect and that it may sometimes return zero, perhaps because the file is not ready to be read yet? Should I call select() to see if it is ready before reading a file from disk? Note that nBytes is: 1,445,888 Some sample co...

Using haskell read and typeclasses - ambiguous type variable error

Hi all, I have an ambiguous type variable error on the definition of "trial" below, I am wondering if there is anything that can be done to make this situation work? I want to really just deal with instances and not explicit data types (such as the MO1, MO2 included below). module Tc102 where class (Show a, Read a) => MyObj a where ...

c++ qt read xml file

if i got an xml file like this: <?xml version="1.0" encoding="utf-8"?> <name> <id>1</id> </name> how can i read everything that i got string id = ... (1 in this case); ...

how to read rss feed to gae-database .

any gae-lib to do this i think maybe jquery can do this too , yes ? thanks ...

C++ ifstream::read() - corrupts ifstream get pointer?

Hi all, Does anyone here know of a way a C++ ifstream's get pointer might get corrupted after a read() call? I'm seeing some truly bizarre behaviour that I'm at a loss to explain. For example (illustrative code, rather than what I'm actually running): int main() { // datafile.bin is a 2MB binary file... std::ifstream ifs( "datafi...

Read MP3 Tag attribute in Silverlight

Hi. I know it works to read out the MP3 Tag attribute MP3V1 in silverlight. I know it works without any third party moduls. But when I use the MP3 workflow like Microsoft described I always get the count of zero attributes in my MP3 file. How to solve? Example project: Download MP3 demo file from here: http://www.file-upload.net/down...