capture

结合Dynamic .NET TWAIN和Jetty,实现基于网页的TWAIN文件扫描

馋奶兔 提交于 2019-12-06 16:34:34
网页TWAIN扫描是通过多种技术结合实现的,看下流程图: 参考原文: Web-based Document Imaging Capture with .Net TWAIN and Jetty 准备工作 阅读: 如何通过jni4net,在Java应用中调用C#接口 使用Jetty搭建Java Websocket Server,实现图像传输 如何运行 在Eclipse中运行Java Application,选择UIMain 当这个窗口启动的时候,Websocket Server已经初始化完成。 Load:加载本地图片 Send:把图片推送到网页客户端 Scan:通过扫描仪扫描文件,把图像自动发送到网页客户端 在Chrome中选择一个扫描仪源 显示TWAIN扫描文件图像 TWAIN网页扫描流程解析 首先把所有相关的库(DLL & Jar)导入到Eclipse工程中: 结合准备工作中两篇文章的代码, 创建一个类 SourceManager : package com.data; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.io.File; import java.util.ArrayList; import javatwain.DotNetScanner;

OrCAD Capture仿真步骤

瘦欲@ 提交于 2019-12-06 16:28:32
OrCAD Capture仿真步骤 自带库中没有器件模型的仿真步骤 1、新建工程 2、添加原理图到工程 3、从TI、AD等公司下载芯片的CIR文件 4、利用model editor模型编辑器,先将cir文件转为lib文件,再将lib文件转为olb文件;OLB文件即为可使用的器件模型 5、添加OLB文件所在路径到libraries器件库里面;或者将OLB文件添加到自带库的路径下(不要出现中文字符路径) 6、添加器件到原理图,开始画电路图 7、创建New Simulation,并命名。设置仿真相关参数。仿真模式,仿真时间,步长等 8、在仿真设置里将芯片的lib文件路径添加到Configurat Files下的Library中 8、开始仿真Run。 来源: https://www.cnblogs.com/igalaxy/p/11994459.html

java system-wide keyboard and mouse state

…衆ロ難τιáo~ 提交于 2019-12-06 09:04:11
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? 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 implementing this for Linux, OS X and Windows: http://code.google.com/p/jnativehook/ 来源: https://stackoverflow.com

Capture the output of DOS (command prompt) and display in a JAVA Frame

会有一股神秘感。 提交于 2019-12-06 07:06:53
问题 When I run a python script, the output appears on the DOS ( command prompt in Windows ). I want the output be displayed on a JAVA Application, i.e. on a window which contians JTextArea. The output should be same as that on the DOS. So, How do I capture the output from the DOS and insert it into JAVA Application ?? (I tried storing output of the python script in a text file and then reading it using JAVA. But, in that case, the JAVA application waits for the script to finish running first and

Can't change video capture resolution using c#

血红的双手。 提交于 2019-12-06 06:46:34
问题 I am trying to change the default webcam resolution using DirectShowNet in C#, from what I gather I need to change it from calling the built in VideoInfoHeader class in windows win32 api dll for avi capture. I have the following code from DirectShowNet: hr = capGraph.SetFiltergraph( graphBuilder ); if( hr < 0 ) Marshal.ThrowExceptionForHR( hr ); AMMediaType media = new AMMediaType(); media.majorType = MediaType.Video; media.subType = MediaSubType.RGB24; media.formatType = FormatType.VideoInfo

Why does capturing named groups in Ruby result in “undefined local variable or method” errors?

人盡茶涼 提交于 2019-12-06 04:21:41
问题 I am having trouble with named captures in regular expressions in Ruby 2.0. I have a string variable and an interpolated regular expression: str = "hello world" re = /\w+/ /(?<greeting>#{re})/ =~ str greeting It raises the following exception: prova.rb:4:in <main>': undefined local variable or method greeting' for main:Object (NameError) shell returned 1 However, the interpolated expression works without named captures. For example: /(#{re})/ =~ str $1 # => "hello" 回答1: Named Captures Must

Capture entire content of EditText into a picture

空扰寡人 提交于 2019-12-06 04:19:10
I have to print the entire text of a text field into a picture. The reason is: I have to exchange messages with unsupported UTF-8 characters between Android and other web clients. By unsupported UTF-8 characters I mean missing fonts in Android (see this topic here ). I tried to use the direct way Bitmap b; EditText editText = (EditText) findViewById(R.id.editText); editText.buildDrawingCache(); b = editText.getDrawingCache(); editText.destroyDrawingCache(); which works like a charm until I have multiple lines: The solution captures only the text which is visible to the user instead of the

Screen capture ignores some windows

回眸只為那壹抹淺笑 提交于 2019-12-06 03:51:24
问题 I am working in MFC and I am trying to capture a bmp of the desktop. I am using GetDC(NULL) to do this but it seems it ignores special skinned windows. It seems to ignore windows drawn with UpdateLayeredWindow. This behaviour seems to be happening only on Vista x64 and XP. I have also tried GetWindowDC with the desktop HWND but the result is the same. NOTES: 1) Print Screen works. 2) On Vista if I enable Aero the screen captures are ok, "special" windows appear. So on Vista it only happens

How do I Acquire Images at Timed Intervals using MATLAB?

ε祈祈猫儿з 提交于 2019-12-06 01:59:57
I'm a MATLAB beginner and I would like to know how I can acquire and save 20 images at 5 second intervals from my camera. Thank you very much. To acquire the image, does the camera comes with some documented way to control it from a computer? MATLAB supports linking to outside libraries . Or you can buy the appropriate MATLAB toolbox as suggested by MatlabDoug. To save the image, IMWRITE is probably the easiest option. To repeat the action, a simple FOR loop with a PAUSE will give you roughly what you want with very little work: for ctr = 1:20 img = AcquireImage(); % your function goes here

How to capture desktop screen of computer host where it's running on using node.js

旧时模样 提交于 2019-12-05 21:44:35
问题 Is there such a way to capture desktop with node.js not a browser tab? I have searched a lot but I didn't find any. What I want is to use node.js to build desktop application. 回答1: You can use http://nodejs.org/api/child_process.html#child_process_child_process_exec_command_options_callback and https://en.wikipedia.org/wiki/Scrot to make screenshot of screen of current user running nodejs application. Something like this (it is complete expressJS example): var express = require('express'),