capture

Xvfb, Jenkins, Selenium tests - Capture Screenshots of all pages

社会主义新天地 提交于 2019-12-08 01:33:48
问题 I'm trying to find some clues on the following issues and not able to find good help online. I'm running Xvfb (X virtual frame buffer), firefox on a Linux machine in headless mode. Xvfb main service is up and running and DISPLAY variable is set. /usr/bin/Xvfb :99 -ac -screen 0 1600x1200x16 I have some automated selenium based tests which I'm running using Gradle ( gradle test ). They run successfully and in Jenkins I'm able to get this working using Xvfb plugin. JUnit post publish report

java system-wide keyboard and mouse state

允我心安 提交于 2019-12-07 21:49:03
问题 Is there a way to listen to the mouse and keyboard events system-wide without taking these out of system queue? E.g. is there a way to set a demon, let's say, which would listen and report each and every keyboard and mouse event? 回答1: It's not possible using pure Java. But you can use JNI (Java Native Interface), which is working on code written in C++ and natively compiled. So, this way you can write the Global KeyListener in C++ and let make Java use of it. There is an active project

Type mismatch when using Map.entrySet()

若如初见. 提交于 2019-12-07 16:29:12
问题 I have the following situation: In the code below, the method foo compiles while the method bar won't. At the method call entrySet (indicated in the code) the compiler says: Type mismatch: cannot convert from Set<Map.Entry<capture#1-of ? extends K,capture#2-of ? extends V>> to Set<Map.Entry<? extends K,? extends V>> Interestingly, the quickfix of Eclipse proposes to Change type of 's' to Set<Entry<? extends K, ? extends V>> which only changes the code because the quickfix is ignoring its own

Cannot turn off/on CameraCapture using Python/opencv: Device or resource busy

笑着哭i 提交于 2019-12-07 11:53:42
问题 When I try to re-open opencv's CameraCapture using Python I get: libv4l2: error setting pixformat: Device or resource busy HIGHGUI ERROR: libv4l unable to ioctl S_FMT libv4l2: error setting pixformat: Device or resource busy libv4l1: error setting pixformat: Device or resource busy HIGHGUI ERROR: libv4l unable to ioctl VIDIOCSPICT Although my application runs in a bigger context using PyQt and various other modules, I was able to isolate the problem. So when I hit "r" (reload) the capture

converting a c++ lambda to a c function

丶灬走出姿态 提交于 2019-12-07 10:14:16
问题 I'm writing some wrapping code, where an external library calls a c++ function (using variadic templates and such). The crucial point is that the external library requires a c-function, which would normally be fine, as this is legal: LibraryFuncType fn = [](params) { ... } While I can easily do this by hand, I would like to automate the wrapping with something like: function_(context, "name", myfunc); To do this, I would need a function similar to: template <ReturnType, ParamTypes...> static

Which Java library to use for record a video from a connected camera?

家住魔仙堡 提交于 2019-12-07 08:29:03
问题 You would have thought that tere is a simple solution to this but there isn't :( My application needs to capture a stream from a USB/firewire (or whatever is the connection) connected camera (result would be a file like output.flv ). I would prefer that I can detect all connected cameras and choose which one to use (one or more at the same time --> one or more output files). Application has to be cross platform. Found libraries: Xuggle - not very good camera support. Good for manipulating

Trying to understand “Capturing groups” in regex with Java

一个人想着一个人 提交于 2019-12-07 06:49:26
问题 I am studying for the java OCP and at the moment I am stuck at understanding the "Capturing groups" section. It is a way too abstract as a description. Could you please (if you have time) give me some real examples using "Capturing groups"? Is anybody able to provide me with a concrete example of the following statement? Capturing groups are a way to treat multiple characters as a single unit. They are created by placing the characters to be grouped inside a set of parentheses. For example,

Full screen capture of a DirectX program in java (Javacv ?)

假装没事ソ 提交于 2019-12-07 06:10:56
问题 [For Windows] I know it is possible to capture screen of a DirectX program running under C# language, but do you know some sample code for Java? I am actually facing this same problem than this Take screen shots inside of full screen applications with java?. Robot class didn't helped and neither worked. But yet I didn't found any sample of java code on the internet concerning this. Thanks for any help you could provide on this topic. 回答1: Since I worked on it more, see also: import java.awt.*

How to capture a Zend view output instead of actually outputting it

廉价感情. 提交于 2019-12-07 02:44:30
问题 Problem: sometimes in our zend controller we don't want the script to be output directly, but rather want the content of that script. One example: when we need the result html output of a view script be included in another structure like JSON or XML for processing in the client side. I found the result here at stack overflow, but not so quick since it was in a different context. I have been struggling with this for 2 days now. As it turned out it was very simple: // in our controllers' action

Is there any way to port ffmpeg command to Android without root the device?

孤街浪徒 提交于 2019-12-06 16:59:01
问题 This link http://www.roman10.net/how-to-port-ffmpeg-the-program-to-androidideas-and-thoughts/ talks about port ffmpeg command to Android. Can anyone describe more detail? My purpose is to record user's behavior on Android device and save as video file which contains user's sound. 回答1: Build FFMPEG for android as a shard library and using Android NDK use this in your android application, for this you don't need a root permission on device. It works like other buils library. Look at this SO