Hey all,
So ive got a need to play music files from a server on the network, in a java client app.
I was thinking Sockets - have the server open a music file as a stream, and have the client connect to that and read & play it as an InputStream. Which would work - except AFAICS users wont be able to seek into the file(which they can curr...
Hi -
I'm building an application that needs to use a web server like a file system. Specifically, the ideal solution would be:
A server side component that would allow, via HTTP, opening (locking), reading, writing, seeking and truncating one file. I need to be able to lock multiple files simultaneously. I need this to run on any o...
I'm looking for a database that supports the following functionality:
1) Records in the database are like Python dictionaries or Perl hashes. For example, a "purchase" record might look like this:
<purchase 5436> = { product: "BMX Bike", price: 99.50, city: "Springfield" }
2) The records are stored in arrays of variable length. The d...
I have a program that imports a text file that has many entrys:
###
Starttime: 06.03.2008
Data: SOME RECORDS HERE
###
Starttime: 21.03.2008
Data SOME RECORDS HERE
...
and so on
Not I want to have an end time after "Data:" that is the next starttime -1 so i have
###
Starttime: 06.03.2008
Data: SOME RECORDS HERE
EndTime: 20.03.2008
...
Does anybody know a seekable alternative to .NET's CryptoStream?
It is OK if the alternative supports Seek only in "read" mode or if it is limited to e.g. AES256.
...
If I want to implement seek() to complete the SeekableIterator interface, should I internally revert to the old position if the seeked position is invalid? Like this:
public function seek( $position )
{
$oldPosition = $this->_position;
$this->_position = $position;
if( !$this->valid() )
{
$this->_position = $oldP...
I am using MFC CFile Seek function.
I have a problem about Seek out of file length.
CFile cfile;
BOOL bResult = cfile.Open(
L"C:\\2.TXT",
CFile::modeReadWrite |
CFile::modeCreate |
CFile::modeNoTruncate |
CFile::typeBinary |
CFile::shareDenyNone);
cfile.Seek(10000, CFile::End);
cfile.Close();
MSDN:
Remarks
The Seek function ...
I have an application that generates some large log files > 500MB.
I have written some utilities in Python that allows me to quickly browse the log file and find data of interest. But I now get some datasets where the file is too big to load it all into memory.
I thus want to scan the document once, build an index and then only load th...
I have a file opened in 'ab+' mode.
What I need to do is replacing some bytes in the file with another string's bytes such that:
FILE:
thisissomethingasperfectlygood.
string:
01234
So, for example, I seek for the position (4, 0) and I want to write 01234 in the place of "issom" in the file. Last appearance would be:
this01234eth...
My previous Question is about raw data reading and writing, but a new problem arised, it seems there is no ending....
The question is: the parameters of the functions like lseek() or fseek() are all 4 bytes. If i want to move a span over 4G, that is imposible. I know in Win32, there is a function SetPointer(...,Hign, Low,....), this po...
Hello,
I have some difficulties with stream. I am using FileStream and BinaryReader and I got some seird behaviours. First of all (and this was on another question, when used StreamReader I got weird behaviour that when I did Peek the psoition was changed, so I used BinaryReader which was fine) NOW I have a problem that sometimes when I...
Suppose you open a file, and do an seek() somewhere in the file, how do you know the current file line ?
(I personally solved with an ad-hoc file class that maps the seek position to the line after scanning the file, but I wanted to see other hints and to add this question to stackoverflow, as I was not able to find the problem anywhere...
When I issue a Perl script some standard input, e.g.
$ awk '{print $1"\t"$2}' foo.txt | myScript.pl
I have a script which contains a bug. It reads the first line of standard input, gets something from that first line, and then only parses lines 2 through n of standard input on subsequent read:
open (FH, "< $input") or die $?;
my $fir...
How do I seek to a particular position on a remote file so I can download only that part?
Lets say the bytes on a remote file were: 1234567890
I wanna seek to 4 and download 3 bytes from there so I would have: 456
and also, how do I check if a remote file exists?
I tried, os.path.isfile() but it returns False when I'm passing a remote...
I'm looking for a general compression library that supports random access during decompression. I want to compress wikipedia into a single compressed format and at the same time I want to decompress/extract individual articles from it.
Of course, I can compress each articles individually, but this won't give much compression ratio. I've...
I'm building a video player here: http://leongaban.com/stackoverflow/RTMP/
It's streaming RTMP, and I'm trying to get my video to seek correctly if the user clicks on the groove bar (gray bar under the green progress bar) Currently it does not seek and gives me a NaN on my duration variable and an error on my progress bar width variable...
Hello,
I am writing a destop script on windows 2003 and I need to open a file and seek to the end of it and read the last line.
I looked for a "seek" but couldn't find. I saw the openTextFile for option but didn't have.
I implement it by openning the file with the red flag and then reading line after line.
With big file it takes a ti...
I have a UISlider acting as the scrubber. As the thumb is dragged I execute the following:
- (void) _seekTo:(double)playbackTime {
mPlayer.currentPlaybackTime = playbackTime;
}
That works fine, music seeks forward. Upon releasing the thumb, I restart the NSTimer to send time updates to keep the UISlider in synch. Problem is, u...
I have a text file containing a number of records. Each record is stored on a single line that is 100 characters long.
Let's say I want to directly access the nth record. I could do it using a for loop, reading in n lines until I get to the record.
But how could I access it directly?
...
My application uses lseek() to seek the desired position to write data.
The file is successfully opened using open() and my application was able to use lseek() and write() lots of times.
At a given time, for some users and not easily reproducable, lseek() returns -1 with an errno of 9. File is not closed before this and the filehandle (...