stream

How to play video stream from WebCamera using Microsoft.DirectX.AudioVideoPlayback?

How to play video stream from WebCamera using Microsoft.DirectX.AudioVideoPlayback? in C++ or C# ...

How can you tell the source of the data when using the Stream.BeginRead Method?

When using the Stream.BeginRead Method, and you are reading from a stream into a memory, how is it determined where you are reading the data from? See: http://msdn.microsoft.com/en-us/library/system.io.stream.beginread.aspx In the list of parameters, I do not see one that tells where the data is being read from: Parameters buffer Ty...

.NET: Problems creating email attachment from MemoryStream.

Hi all I'm using the following method to create an attachment from a MemoryStream: public void AddAttachment(Stream stream, string filename, string mimeType) { byte[] buffer = ((MemoryStream) stream).GetBuffer(); Attachment attachment = new Attachment(stream, filename, mimeType); _mail.Attachments.Add(attachment); } Note that t...

how to use time out in mplayer?

I am trying to save audio using mplayer from a live http stream. saving audio is successful. If there is no live stream playing it does not exit automatically. Is there any way to set timeout if there is no live stream? code : mplayer -i url -t 00:00:10 -acodec libmp3lame -ab 24 -ar 8000 audio.mp3 Thanks in advance. ...

What is the name of the standard error stream (Apache+php)

I want to put some text into the Apache error log (listens on the stderror error stream) from PHP using file_put_contents. I am missing the name of this stream, and whether I have to put :// or something similar before it. Thanks ...

Populating PDF fields in .NET without a API, such as iTextSharp

class mineTest { string pdfTemplate = @"c:\us.pdf"; public mineTest(Customer c, string output) { StreamReader sr = new StreamReader(pdfTemplate); StreamWriter sw = new StreamWriter(output); string content = sr.ReadToEnd(); content.Replace("(Customer name)/DA(/Ve...

How do I convert a System::IO::Stream^ to an LPCSTR for PlaySound?

I'm trying to embed and then play back a .wav file in a C++/CLI app but all the examples I've seen which use PlaySound are in VB. I can't see how to get froma Stream^ to the LPCSTR which PlaySound requires: System::IO::Stream^ s = Assembly::GetExecutingAssembly()->GetManifestResourceStream ("Ping.wav"); LPCSTR buf = s->????; PlaySound...

Library for Dataflow in C

How can I do dataflow (pipes and filters, stream processing, flow based) in C? And not with UNIX pipes. I recently came across stream.py. Streams are iterables with a pipelining mechanism to enable data-flow programming and easy parallelization. The idea is to take the output of a function that turns an iterable into another it...

Problems with Facebook API - Getting all content from table Stream

I am trying to get all stream data from a group (I have wall entries, discussions, events and photos). For now, Access on this group is Open. $result = $_fb->api_client->fql_query("SELECT actor_id, message FROM stream WHERE source_id=$gid LIMIT 50"); Only some of the records come back (5 out of 10) (only wall entries and a photo). Ju...

Are there free realtime financial data feeds since the demise of OpenQuant?

Now that the oligopole of market data providers successfully killed OpenQuant, does any alternative to proprietary and expensive subscriptions for realtime market data subsist? Ideally I would like to be able to monitor tick by tick securities from the NYSE, NASDAQ and AMEX (about 6000 symbols). Most vendors put a limit of 500 symbols...

FileUpload to FileStream

Hello, I am in process of sending the file along with HttpWebRequest. My file will be from FileUpload UI. Here i need to convert the File Upload to filestream to send the stream along with HttpWebRequest. How do i convert the FileUpload to a filestream? ...

Best way to convert Stream (of unknown length) to byte array, in .NET?

Hello, I have the following code to read data from a Stream (in this case, from a named pipe) and into a byte array: // NPSS is an instance of NamedPipeServerStream int BytesRead; byte[] StreamBuffer = new byte[BUFFER_SIZE]; // size defined elsewhere (less than total possible message size, though) MemoryStream MessageStream = new Memor...

Zip Stream in PHP

Hi, I have a PHP script that creates a zip file on the fly and forces the browser to download the zip file. The question is: could I directly write the zip file to an output stream which is connected to the user's browser rather than save it as a real file on the server first and then send the file? Thanks in advance. ...

I Have a problem with 2 FIFO for read and write in each

The attached code should allow the communication between 2 terminals. The communication is made through 2 FIFO, which are created in the current directory. The program has to open the 2 fifos and the son reads from STDIN and puts on the fifo1 and the father reads from the other fifo and prints on terminal. In this way the communication t...

How to get a Stream from in-memory Image?

I have an in-memory Image, I need to get a Stream from it to write into an OpenXML document. Can someone please point me to the correct method. ...

Finite State Machine parser

I would like to parse a self-designed file format with a FSM-like parser in C++ (this is a teach-myself-c++-the-hard-way-by-doing-something-big-and-difficult kind of project :)). I have a tokenized string with newlines signifying the end of a euh... line. See here for an input example. All the comments will and junk is filtered out, so I...

looking for a MemoryStream in C++

In the wonderful world of C# i can create a memory stream without specifying its size, write into it and then just take the underlying buffer. How can i do the same in c++? basicly i need to do: memory_stream ms(GROW_AS_MUCH_AS_YOU_LIKE); ms << someLargeObjects << someSmallObjects << someObjectsWhosSizeIDontKnow; unsigned char* buff...

How to read Powershell's debug stream from Powershell ?

Hi everyone, I am using Powershell 2.0 to write data to the Powershell's debug stream via Write-Debug function. Now I want to read that stream from the same powershell script. I tried to redirect the debug stream with "2>&1" but this works only for the error stream. Is there a way to read the Powershell debug stream from a powershell s...

Does PHP SoapServer class allow to stream large amount of data?

is it possible, using PHP SoapServer class, to stream data back to the client along the computation? i know this is possible using ASP.NET http://msdn.microsoft.com/en-us/library/aa528818.aspx if not, is it possible to implement it? as far as i understand the php soap facilities, they only allow my functions to return a big chunk of d...

Convert to Stream from a Url

I was trying to convert an Url to Stream but I am not sure whether I am right or wrong. protected Stream GetStream(String gazouUrl) { Stream rtn = null; HttpWebRequest aRequest = (HttpWebRequest)WebRequest.Create(gazouUrl); HttpWebResponse aResponse = (HttpWebResponse)aRequest.GetResponse(); using (StreamReader sReader ...