Hi, I'm new to C++.
A tutorial is talking about cin and cout:
"Syntactically these streams are not used as functions: instead, data are written to streams or read from them using the operators <<, called the insertion operator and >>, called the extraction operator."
What is a 'stream'?
...
I'm adding functions to my (simple) log class to make it usable like a stream.
Currently, after some modifications, I got this (in my cpp):
// blah blah blah...
// note: here String is a defined as: typedef std::string String;
void Log::logMessage( const String& message )
{
logText(); // to be sure we flush the current text if...
Hi
looking at embedding a flv player into a page but wish to read the flv file from a non www accessible location. I tried to write a controller action which takes a encrypted querystring, decrypt it, then output the contents to the page using readfile() but nothing seems to happen.
I'm not sure if its becuase i'm sending the wrong con...
Hello,
I have a stream loaded with HTML that I got from an export. I can take this html from the stream in a byte[] (is there any other way?), and I want to write this byte[] to a html mail body.
The reason to do this is that I want to export a report to html, and use this data in the body of the mail, instead of exporting it to pdf an...
Hello, I wanted to ask if it is possible to redirect writes to a specific file, to a memory stream in my application so I can immediately read it.
If it is possible please explain how to do so.
Thanks.
...
I'm trying to interact with an application over the network which uses a simple protocol. I have to send a header that looks like this:
2 bytes = Data Length (including Request Type)
1 byte = Request Type
I'm taking both parameters as integers:
private static void WriteHeader(Stream buf, int length, int requestType) {
buf.Write(Bi...
Hi all,
If I'm only WRITING to a socket on an output stream, will it ever block? Only reads can block, right? I am asking because someone told me writes can block but I only see a timeout feature for the read method of a socket - socket.setSOTimeout(). It doesn't make sense to me that a write could block but I'd like to hear for sure...
I know there is a StringIO stream in Python, but is there such a thing as a file stream in Python? Also is there a better way for me to look up these things? Documentation, etc...
I am trying to pass a "stream" to a "writer" object I made. I was hoping that I could pass a file handle/stream to this writer object.
...
I can read unmanaged memory in C# using UnmanagedMemoryStream, but how can I do the reverse?
I want to read from a managed stream directly into unmanaged memory, instead of first reading into a byte[] and then copying. I'm doing async stream reading on a large number of requests, so the added memory is significant (not to mention the a...
I'm creating an applet that send pictures to a servlet.
The applet first action is to resize and compress the picture.
I'm using ImageIO to load the picture into a BufferedImage. Next I resize the picture and then use ImageWriter to compress it in jpeg. That's work fine.
The problem is when the user send a very big pic(up to 70MP). Th...
Hello guys, I'm new with Red5. I would like to know how can I take a stream from a port (something like this rr.tt.yy.uu:1234) and publish it using Red5. I was looking the oflaDema and the Simple Broadcaster, but this only takes the camera and I need to take the stream. Can you help me please?, may be with an example or a guideline.
Th...
What is the best way to tokenize a text file in Java, if
I want to work with a java.io.Reader, not a String
Delimiters should be returned?
I have evaluated the following classes:
java.util.StringTokenizer fulfills [2.], but not [1.]
java.util.Scanner fulfills [1.], but not [2.]
java.io.StreamTokenizer seems quite complicated.
I d...
I think I'm using InputStream incorrectly with a Blackberry 9000 simulator:
I found some sample code,
http://www.blackberry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800332/1089414/How%5FTo%5F-%5FPlay%5Fvideo%5Fwithin%5Fa%5FBlackBerry%5Fsmartphone%5Fapplication.html?nodeid=1383173&vernum=0
that lets you play video ...
How can a WriteableBitmap from Silverlight be Saved onto the File System, I am unsure what to do with the FileStream to make this work, it can be in Bitmap, PNG, Jpeg format etc, as long as a commercial library is not required.
Is it possible to do this?
Here is my call to SaveDialog, below:
Dim SaveDialog As New SaveFileDialog
...
Let's say I want to be able to validate that a 50GB+ XML file conforms to a given XSD. I could use
DOMDocument::load & DOMDocument::schemaValidate
but that will take all of time on loading and will generally exhaust all available memory for me. Is there any way to feed an XSD to a SAX or any other type of stream processor and have it...
Are they any classes or libraries to read a gzipped stream from a server? For example, Java has the GZIPInputStream and GZIPOutputStream classes to read from a gzipped stream. Does iPhone SDK have such libraries or are there any external libraries that we can use?
...
Six Apart has this neat service that streams out LiveJournal, Vox, etc. updates:
http://www.sixapart.com/labs/update/developers/
It also has the interesting ability to know if the client has missed parts of the feed. I've tinkered with writing a similar service for myself, and while I've gotten it to stream okay, I'm ashamed to admit ...
Hi all,
I am using a tv tuner (hauppage 1600) that is shows up as a character device (/dev/video0). I normally open this device using VLC and it displays cable TV.
1st problem) I would like to have an application access this device, read the stream, and distribute it to multiple clients.
I have tried to use a java filereader to re...
Hi,
I'm trying to write a client-server application in Java with an XML-based protocol.
But I have a great problem!
See this part of client code:
InputStream incoming = skt.getInputStream(); //I get Stream from Socket.
OutputStream out = skt.getOutputStream();
[...]
XMLSerializer serializer = new XMLSerializer();
//This create an XML...
Hi,
I'm making a program which downloads files over http.
I've got it downloading, however I want to be able to pause the downloads, close the program and resume them again at a later date.
I know the location i'm downloading them from supports this.
I'm downloading the file through HttpWebResponse and reading the response into a Str...