As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I was wondering what language people would suggest to use when attempting to create a program that can record the video feed for three different webcams and being able to splice out 5 or 10 seconds of the stream into a video file?
Thanks for any help!
This is less of a "language choice" problem than an "environment choice" problem - any language that can be used to develop long-running processes that can interact with whatever webcam/image acquisition API will be appropriate.
C#/VB.NET, Python, or C++ will be your best bets (in order of increasing difficulty).
The task would be impossible in PHP, EcmaScript, VBScript, and Brainfuck.
Java and Assembly are possibilities, but probably make things more difficult than they need to be.
We need more information about what kind of webcams they are (USB UVC class? Firewire DV or Firewire IIDC? Network webcams with their own Motion-JPEG servers built-in?) before we can offer specific advice.
I did a project fairly painlessly using Adobe Flex to capture client webcam video and stream it to a server. It's a good choice if you need to do this over the web. If your environment is more controlled, as in you're in control of all the hardware, I'd use Max/MSP/Jitter, which is easy to get wired up capturing video, and is designed to do realtime splicing and such.
And the benefit of either of these options is that you don't need to know ahead of time which hardware varieties are being employed, since either runtime has the handlers for any of these.
Related
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I'm learning Haskell for great good.
I'm pretty into OOP and the various type systems. I used Java to develop webapps (Java EE, spring, Hibernate, struts 1.x), now I'm using regularly Python (pylons, django, sqlalchemy, pymongo) and Javascript. I had a huge improvement in my personal productivity: the lightweight approach, duck typing, awesome iterators, functions as first class citizens, simple syntax and configuration, fast tools like pip and distribute (and much more) helped me a lot.
But the first reason of my productivity boost is the Python language itself.
What are the main benefits of using Haskell for web developing?
For example, how its type inference can really improve my web app? So far, I noticed that when you decorate your function with its type-signature you are adding a lot of semantics to your program. I expect all this effort to come back in some way, to save many lines of code and to make them sound. I really like the sharp distinction between types and data, I'm starting to understand how they works, but I want something back :P
Don't get me wrong, I've just started studying Haskell so Maybe I'm missing some awesomness but I really want to understand its paradigm and when it's worth using it.
Most web applications aim to be stateless and handle concurrency well. Its also rather important to scale (Google SEO reasons, and user experience).
Haskell handles these problems rather well (although IMHO in more academic and perhaps less "human" intuitive way).
That being said due to the sheer lack of people doing web app dev (compared to say node.js) and that traditional web app dev has been more focused in a OOP mind frame it might be rather difficult.
I had some issues trying to use it as you can see in my questions below:
How do I do automatic data serialization of data objects?
Handling incremental Data Modeling Changes in Functional Programming
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 11 years ago.
What is the best turnkey (ready to use, industrial-strength) relation detection library?
I have been playing around with NLTK and the results I get are not very satisfactory.
http://nltk.googlecode.com/svn/trunk/doc/book/ch07.html
http://nltk.googlecode.com/svn/trunk/doc/howto/relextract.html
Ideally, I would like a library that can take sentences like:
"Sarah killed a wolf that was eating a child"
and turn it into a data structure that means something like:
killed(Sarah, wolf) AND eating(wolf,child)
I know that this is the subject of a large body of research and that it is not an easy task. That said, is anyone aware of a reasonably robust ready-to-use library for detecting relations?
Update: Extractiv is no longer available.
Extractiv's On-Demand REST service:
http://rest.extractiv.com/extractiv/?url=https://stackoverflow.com/questions/4732686/best-turnkey-relation-detection-library&output_format=html_viewer will process this page, extract and display the two semantic triples you desire in the bottom left corner under "GENERIC". (It throws away some of the text from the page in the html viewer, but this text is not thrown away if you utilize json or rdf output).
This is assuming you're open to a commercial, industrial strength solution, though limited free usage is allowed. It's a web service but open source libraries can be used to access it or could be purchased from Language Computer Corporation.
These relations can be read fairly easily out of the output of dependency notations. For instance, put into the Stanford Parser online, you can see both of the two subject-verb-object triples in your example in the typed dependencies collapsed representation as:
nsubj(killed-2, Sarah-1)
dobj(killed-2, wolf-4)
nsubj(eating-7, wolf-4)
dobj(eating-7, child-9)
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
Does anyone have a standard project that they use when learning a new language. Kinda like a specification document of a project that includes all aspects of programming. Does anyone use some sort of beginning type project when learning a new language? I guess it also depends on the type of language and what's it's capable of.
Contributing something to an open source project seems to work for me. In addition to getting exposed to some coding habits in the language , you get to work on something useful.
Going through the first few problems of Project Euler is a very good way to get a handle on topics like I/O, recursion, iteration, and basic data structures. I'd highly recommend it.
A friend of mine had a coworker who coded a minesweeper every time when he wanted to learn a new language with GUI.
I like making simple websites for learning.
Pro: you can put it online and show it to people.
Con: the language has to be suitable for web development.
Writing a simple ray tracer:
math functions (pow, sqrt, your own intersection routines)
recursion (because it is a whitted style recursive one)
iteration (for all pixels)
how to write custom types (rays, possibly vectors)
pixel wise graphics
have something to play with compiler's (optimization-) flags
optional:
simple GUI
file reading writing
I've also done so with metatrace.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
My company needs 3D visualization for our commercial applications (CAD, mesh manipulation, computational geometry). We are tired of true vision 3D (tv3d), which we've been using for years (poor support, compatibility problems).
Our manager wants to use hoops 3d from tech soft 3D for software development. While I have no experience of it, my prejudices are:
Overpriced
Relatively few users - poor support
Old and outdated
Am I wrong about Hoops 3d?
What is your experience? Is Hoops useful?
Advantages?
Disadvantages?
Several years ago I was involved in a project that used HOOPs. The company didn't want to pay royalties any more and wasn't very convinced that HOOPs was the right product for them so I ported all the HOOPs functionality they used over to OpenGL. I have summarised my experience of this below but you will have to determine what is relevant for your projects.
Disadvantages/costs for that project:
Needed to write object picking (HOOPs supplied that)
Needed to write virtual trackball (HOOPs supplied that) [although sample code to do this is freely available]
Had to move some data storage from HOOPs over to our own data structures
Advantages for that project:
Able to use features of OpenGL such as transparency (although surely HOOPs has that by now?)
Lots of resources to find help with OpenGL
Better performance (for our case - I don't know if this is still true as it seems HOOPs uses OpenGL/DirectX underneath now)
Better support for consumer-priced graphics cards & laptops
More flexibility to go beyond what HOOPs thinks you should need to do
The big wins were the resources to find help and greater flexibility.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
Define everything to do when something happens,
I really appreciate that,
but never have tried that yet.
my Q is :
How to design a state machine based system?
Have you looked at the State Pattern? Also here. Apache Commons SCXML might also be useful to you.
'State-event' driven architecture is used in quite a few application domains. In fact, there is a tool called smc (State Machine Compiler) that takes a specification for a state machine (much like lex and yacc take scanner and parser definitions) and generates code in C or other languages to implement it.
The basis of a state machine, in my experience, is the switch statement.
Each case within that represents a state of your machine.
The switch statement needs to be called on a regular basis, this can be within a coded loop, or within an event handler. It really depends on what your state machine is doing, how you want your software to run or react.
You update the state variable from within a case statement in order to change state.
Tons and tons of the little buggers.
I suggest that you look up the theoretical basis of finite state machines first and understand for what kind of tasks they are suitable for.
http://en.wikipedia.org/wiki/Finite state machine is a good place to start.