read

Android shoutcast stream read slow?

Hy! I read shoutcast stream in android, the probeleme is the following: in VLC i get 200 kb/s inner byte speed in android i get 50 kb/s is it normal? i get always the VLC kb/4 in my android phone. i am using WIFI why? ...

Write/Read plist file iPhone

Hi I have plist in my iphone app and I want to read and write an integer from my single to and form it. I have this to read it: scoreData *score = [scoreData sharedData]; filePath = @"stats.plist"; NSMutableDictionary* plistDict = [[NSMutableDictionary alloc] initWithContentsOfFile:filePath]; score.highScore = [plistDict object...

C program: How to read from one file and write into another? Indexing

I am trying to write a program that will read the existing records of a file and then index them in another file. The records are stored in the file named "players.bin" which is CSV format each record contains (username,lastname,firstname,numwins,numlosses,numties and i want to index them in a new file named "players.idx". However the ...

How to read data from SQLite database?

Hi, I'm trying to make my first simple program that uses databases. I decided to use SQLite as it allows to store database into a single file. I think I have managed to do a database with SQLite Database Browser, but I have no idea how I could read that data in a C/C++ program. So can someone help me to get started or point me some tuto...

Where to put a file when reading from SD Card (Android Development)

If I am going to be reading files from the SD Card, where do I put them during development? Also, when I install the app, will it include these files and put them to the SD Card? ...

PThread RWLock Deadlocking with Recursive Locks

I've been working on a small sand-boxed example to help me figure out how to use rwlocks. Everything seems fairly straightforward, however I'm getting deadlocks in my example every once and a while and don't understand why it's happening. I've put the code example on pastebin because it's more than a few lines of code: http://pastebin.o...

Pthread RWLock on MAC Deadlocking but not on Linux?

I've been experimenting with rwlock's on Mac and am experiencing something that seems to me shouldn't be happening. There's some weird combination of using read/write locks with recursive read locks that is deadlocking, but shouldn't be. I posted the code on pastebin because it's more than just a snippet. The way this code is written s...

Best way to parse a file in Objective-c

Hello everyone. I am trying to parse out an apache-like config file using Objective-c. Where is the best place to start? I haven't done a lot of file read/write on this platform. Thanks! ...

Read multiline text with values separated by whitespaces

I have a following test file : Jon Smith 1980-01-01 Matt Walker 1990-05-12 What is the best way to parse through each line of this file, creating object with (name, surname, birthdate) ? Of course this is just a sample, the real file has many records. ...

java socket writeUTF() and readUTF()

I've been reading some Java socket code snippet and fonund out a fact that in socket communication, to send messages in sequence, you don't have to seperate them by hand, the writer/reader stream do the things automatically for you. Here is an example: writer.java writeUTF("Hello"); writeUTF("World"); reader.java String a=readUTF(); /...

HTTP protocol: end of a message body

Hi, I built a program that parses the header and I would like to read the message body in case I receive a POST. For headers, I have been able to look for to determine when the header ends. I am having more issues for the message body. Am I supposed to look at "Content-Length" field to know when to stop reading input? In my current co...

How can I read a string with spaces in it in C?

scanf("%s",str) won't do it. It will stop reading at the first space. gets(str) doesn't work either when the string is large. Any ideas? ...