Is it possible to write a new SpreadsheetDocument to a write-only stream? - openxml

My understanding of the OpenXML SDK is that it offers both a DOM oriented mode and a high-performance streaming SAX mode.
My goal is to write a spreadsheet directly to a network stream. Such a stream is write-only. I didn't get far at all; it didn't work.
SpreadsheetDocument.Create throws an exception when the stream to be written to does not support reading, writing, and seeking, which rules out streaming over a network.
Are there any options in the SDK that I'm overlooking that will enable this?

Are there any options in the SDK that I'm overlooking that will enable this?
No.

Related

Flutter and IBM as400

a particular question: is there a direct way to make an AS400 connection or do you have to go through PHP? I don't have to read data on DB2, but do the various commands (wrkactjob, wrksyssts, etc.). Thank you.... sorry for the English.
what I thought (maybe it can't be done) is this: in the app screen there are buttons, each button executes a command (wrkactjob, clroutq, etc.) and the answer occurs in another screen ... I didn't want to write commands directly like on 5250 or telnet
From your referral to typical "health checking" programs, like wrkactjob, and wrksyssts I guess your primary goal is to have an application running on your Android based phone to quickly check the status of a machine from wherever you are. Correct?
Have you considered how to get access to the machine's IP address when you're on the road and not connected to the local WiFi?
You can access this "performance data" through SQL — as John Y pointed out — and display it in whatever for is convenient on your mobile device. But I highly doubt Android provides ODBC infrastructure, even though you might manage to get the correct binary blobs (CPU wise) of the ODBC drivers from IBM botched into Android.
Otherwise you want to create a mechanism to scrape the screen for whatever is displayed, and translate that textual representation into UI elements provided by Flutter, if you want UI elements instead of textual output.
If you already have your doubts that you can't do telnet with Flutter, I think you'll have to learn a lot about Flutter as an SDK before even thinking about how to start developing an application. TCP/IP networking services are a function of the underlying OS and you'll have to go through all the Flutter abstraction layers to eventually be able to build a TCP session. With some luck, there is already code available to handle the telnet protocol peculiarities for you. Perhaps not, then you need to provide telnet negotiation and protocol yourself. This is documented in numerous RFCs. Use Google yourself.
Next point is: You need to establish translation routines for conversion of EBCDIC charset data into ASCII. Because Android is Linux based, you need to learn how to call libc routines like iconv() through Flutter, providing a C interface for charset conversion, including EBCDIC flavors as source/target.
Final point: You need to learn how to interpret the 5250 data stream, and translate the terminal emulator instructions into dynamically place Flutter UI elements at appropriate positions on screen. And of course you need to understand what to send back to IBM i to make it understand your request. The tn5250 data stream is also documented in publicly available RFCs.
There once was a facility called Workstation Gateway in the OS, but as I've found out, it has been removed in V5R2. This might have provided an easier means, because the 5250 data stream was converted on the fly to plain HTML.
Now it's your turn to decide if your goal is worth the apparent effort you're required to go through.
I am not sure what you mean by "direct". Do you mean doing your own socket programming? You could, but there are easier ways to connect.
The most obvious and straightforward choices are probably ODBC, JDBC, HTTP, and SSH.
ODBC and JDBC of course provide an SQL-based interface, and you can use that to issue commands (via the QCMDEXC procedure or scalar function) or access an increasingly comprehensive array of IBM i services.
If what you need still isn't available via SQL, or you simply don't like working in SQL, you could make use of the XMLSERVICE library, which provides its own programming interface "on top of" any of the connection types mentioned above. Despite all the instructions for building from source, normally this should already be installed on your IBM i. There are higher-level wrappers for XMLSERVICE in several programming languages (.NET, Node.js, PHP, Python, Ruby, and Swift), but as of this writing, not Dart. I am not familiar with Flutter, but I imagine you could use the JavaScript interop package to work with the Node.js wrapper.

Finding Local Application Exploits? (Black-Box)

I am new to exploit development, and I am wondering how I could go about fuzzing a local application (e.g. Windows Media Player) using software if I did not have access to the source code. I have basic-intermediate knowledge of buffer overflow vulnerabilities, how they work, how to find them and how to write exploits for them. I just need the 2nd step - finding them in the first place...
Thanks!
Fuzzing is a useful tool but not necessarily easy. I'd suggest starting with listening to some talks online on fuzzing or doing some reading. The big picture is that you want to find a way to generate random/mutated input and then script your application to run with this random input. So for Windows Media Player, you might start by:
Figuring out how to run WMP in an automated/scripted way.
Looking for tools to generate fuzzed file input.

Is it possible to record video stream in Chrome Plugin using NaCL / PPAPI?

I am trying to record stream from html5 video tag and since I can not achieve 60FPS in JS with canvas I was wondering can I do it from chrome plugin?
Any ideas is it even possible and what are the places to start?
thanks
w
You can accomplish this by using the chrome.desktopCapture or navigator.getUserMedia and MediaStreamRecorder APIs. chrome.desktopCapture and navigator.getUserMedia are experimental and MediaStreamRecorder is still unimplemented in chrome.
Currently there is no way to accomplish 60FPS recording in chrome, but support is on the way!
There are .webm encoders with caveats. Try whammy.js
NaCl support for manipulating streams is on the bleeding edge and should allow you to record to a file. Bleeding to stable takes approximately 11 weeks.
(I have zero stackoverflow reputation, so I can't comment on answers, but I can submit answers???).
rwu's answer is going to be the best going forward. The new MediaStreamTrack Pepper interfaces should be working on dev channel and Canary Chrome, if you build with a very recent NaCl SDK (probably canary would be best).
The API is here for video:
https://code.google.com/p/chromium/codesearch#chromium/src/ppapi/cpp/media_stream_video_track.h&l=27
It's experimental, dev-channel, so it's subject to change, and it is not available to all users yet. But it's being worked on right now and should only get better & faster over time. We hope to support it as a stable API in a coming version of Chrome.
If you want to get the best performance, and you're willing to bear with some churn, and don't need something you can ship today, please start experimenting with that API and file bugs at new.crbug.com.
If what you want is to record a MediaStream, the MediaStreamRecorder probably the best option. However as caffinatedmonkey pointed out, it's not yet implemented in chrome. crbug.com/262211 tracks this work.
However there's another option with a new set of ppapi (added in chrome 34, currently under experiment) which allows the plugin to get audio/video data from a mediastreamtrack. I think that may fit your need. For detail, please take a look at the examples in below links:
http://src.chromium.org/viewvc/chrome/trunk/src/ppapi/examples/media_stream_audio/
http://src.chromium.org/viewvc/chrome/trunk/src/ppapi/examples/media_stream_video/

How can I reuse directshow components in Gstreamer (windows)

I am developing a new media playback application for Digital cinema.
While checking the multimedia framework options, I am pretty impressed with GStreamer and would like to use it.
BUT, we already have developed some directshow filters, which we do not intend to throw away or refactor for now. The directshow filters involve in-house developed(with source code) and also purchased(without source code).
Question:
How can I reuse these components even though I switch from Directshow to Gstreamer?
Ideas and pointers will be much appreciated.
You can develop your own plugin for GStreamer, which passes the control to your custom filters. Here is the Guide.
IMO and I stand open to correction that doesn't make any sense at all. A DirectShow filter has been designed to fit into the DirectShow framework (the interfaces are designed for this), gstreamer is a multimedia framework with it's own set of interfaces and requirements, etc. Even if you could wrap the filters in a custom gstreamer plug-in, you would need to implement everything the DS framework provides you with, which sounds very complicated and is likely to be more work than just refactoring your DS filter in the first place. The other option of creating a DS graph inside a plug-in doesn't sound like a good idea either.

Concurrent program languages for Chat and Twitter-like Apps

I need to create a simple Chat system like facebook chat and a twitter-like app.
What is the best concurrent program languages in this case ?
Erlang, Haskell, Scala or anything else ?
Thanks ^_^
Chat system like facebook chat
Facebook chat is written in Erlang, http://www.facebook.com/note.php?note_id=14218138919
and a twitter-like app
What aspect? Message delivery? The web frontend? It's all message routing ultimately. Haskell's been used recently for a couple of real time production trading systems, using heavy multicore concurrency. http://www.starling-software.com/misc/icfp-2009-cjs.pdf
More relevant: what's the scale: how many users do you expect to serve concurrently?
Erlang is my choice of drug for something like that. But I would also check out Node.js if you feel more comfortable in JavaScript.
Complete chat application source code using Scala/Lift.
8 minutes and 20 seconds real-time, unedited, webcast writing a chat app from scratch using Scala/Lift.
This is actually a relatively easy problem to solve that can be done by any language with decent threading support including (eg Java, C# and others). The model is fairly simple:
Each client connects to a Web server with an AJAX request that is configured on the server not to timeout;
If it does timeout for any reason the client is configured to issue another AJAX request;
The server endpoint for that AJSX call does a thread wait operation on some monitor waiting for updates;
When the user sends a chat it is sent to the server and any relevant monitors are signaled;
Any threads listening to that monitor are woken up, retrieve any messages waiting for them and return that as the AJAX result to the client;
The client renders those messages and then issues another AJAX request to listen to for messages.
This is the basic framework but isn't the end of the story. Any scalable chat system will support either internal or external federation (meaning the clients can connect to more than one server) but unless you're Google, Facebook or Twitter you're unlikely to have this problem.
If you do you need some kind of message queue/bus for inter-server communication.
This is something you need a heavy duty multithreaded language like Erlang for but it, Haskell and others are of course capable of doing it.
F# for future.
Client/Server chat F#
Concurrent Programming - A Primer
Also take a look at Twisted(Python).
I'd recommend taking a look at Akka (www.akkasource.org)
It's a Scala Actor framework with ALOT of plumbing for making scalable backend applications.
Out of the box it supports:
Actor Supervision
Remote actors
Cluster Membership
Comet over JAX-RS (Project Atmosphere)
HTTP Auth for your services
Distributed storage engine support (Cassandra, MongoDB)
+ a whole lot more
I would go for erlang, it's efficiency in comet-enabled apps is largely proven.
Go with a framework such as nitrogen, where you can start comet requests just as easily as Jquery does ajax.
If it's actually going to be a simple application (and not under very high load), then the answer is to use whichever language you already know that has decent threading. Erlang, Scala, Clojure, Haskell, F#, etc., all do a perfectly good job at things like this--but so do Java and C#. You'll be fine if you pick whichever of these you know and/or like.
If you're using this as an excuse to learn a new generally useful language, I'd pick Scala as a nice blend of highly performant (which Erlang is not in general, though it is fantastic with efficient concurrency), highly functional (which Java and C# are not), highly deployable (due to running on the JVM), and reasonably familiar (assuming you know C-ish languages).
If you're using this as an excuse to practice fault-tolerant concurrency, use Erlang. That's what it was designed for and it does it extremely well.