capture

How to keep a list of variables given some of them may not exist?

☆樱花仙子☆ 提交于 2019-12-23 15:27:25
问题 I have 100 dta files. I have a list of variables that I need to keep and save temporary copies on the fly. Some variables may or may not exist in a certain dta . I need Stata to keep all variables that exist in a dta and ignore those that do not exist. The following code has wrong syntax, but it could serve as a good pseudo code to give one a general idea of what should be done: forval j = 1/100 { use data`j' local myVarList ="" foreach i of varlist var1 var2 var3 var4 var5 var6 var7 var8 {

pyshark can not capture the packet on windows 7 (python)

时光怂恿深爱的人放手 提交于 2019-12-23 09:48:33
问题 I want to capture the packet using pyshark. but I could not capture the packet on windows 7. this is my python code import pyshark def NetCap(): print 'capturing...' livecapture = pyshark.LiveCapture(interface="eth0", output_file='./test.pcapng') livecapture.sniff(packet_count=10) print 'end of capture.' print livecapture if __name__ == "__main__": NetCap() this is result capturing... end of capture. <LiveCapture (0 packets)> Livecapture is 0 packets. I don't know what is the matter. please

Get screenshot of startmenu

假装没事ソ 提交于 2019-12-23 08:56:46
问题 I am using bitblt to to capture a window. If the aero theme is enabled, The background of the captured image is black. If I disable the DWM and capture the window then the captured image is very good. Here is part of my code. HDC hdcMemDC = GDI32.INSTANCE.CreateCompatibleDC(desktopDC); HDC windowDC = User32.INSTANCE.GetDC(window); HWND window= User32Extra.INSTANCE.FindWindow(null, "Start menu"); GDI32Extra.INSTANCE.BitBlt(hdcMemDC, 0, 0, width, height, desktopDC, 0, 0, WinGDIExtra.SRCCOPY );

Get screenshot of startmenu

扶醉桌前 提交于 2019-12-23 08:56:04
问题 I am using bitblt to to capture a window. If the aero theme is enabled, The background of the captured image is black. If I disable the DWM and capture the window then the captured image is very good. Here is part of my code. HDC hdcMemDC = GDI32.INSTANCE.CreateCompatibleDC(desktopDC); HDC windowDC = User32.INSTANCE.GetDC(window); HWND window= User32Extra.INSTANCE.FindWindow(null, "Start menu"); GDI32Extra.INSTANCE.BitBlt(hdcMemDC, 0, 0, width, height, desktopDC, 0, 0, WinGDIExtra.SRCCOPY );

Mouse Move not trigger outside WPF Main Window

最后都变了- 提交于 2019-12-23 08:03:16
问题 I want to get mouse position relative to screen coordinates. I am using the following code to do that. window.PointToScreen(Mouse.GetPosition(window)); It is working as expected. But my MouseMove event not firing outside the MainWindow. That is if I move my mouse over desktop with my window restored. Any ideas appreciated. 回答1: Use the CaptureMouse() method. For your example above, you could add: window.CaptureMouse(); in your code-behind inside the MouseDown event handler. You then need to

How do I Acquire Images at Timed Intervals using MATLAB?

夙愿已清 提交于 2019-12-22 09:49:37
问题 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. 回答1: 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

C# control to display camera video with DirectShow.Net

守給你的承諾、 提交于 2019-12-22 00:24:00
问题 I want to use DirectShow.Net to capture the stream from a webcam. What type of UI control can I use to display a the webcam video capture? I have seen an example that uses the whole window of a Form, but are there any other controls I can use: a Panel, PictureBox? 回答1: yes. you can use pictureboxes or forms or panels. You need to call and use IVideoWindow. you can cast the directshow.net graph that is streaming/capturing to the IVideoWindow and then you can set it to being owned by whatever

Web page Capture and save to image using phantomjs lib

夙愿已清 提交于 2019-12-21 06:41:08
问题 i was searching google to get any js lib which can capture the image of any website or url. i came to know that phantomjs library can do it. here i got a small code which capture and convert the github home page to png image if anyone familiar with phantomjs then please tell me what is the meaning of this line var page = require('webpage').create(); here i can give any name instead of webpage ? if i need to capture the portion of any webpage then how can i do it with the help of this library.

Web page Capture and save to image using phantomjs lib

有些话、适合烂在心里 提交于 2019-12-21 06:40:09
问题 i was searching google to get any js lib which can capture the image of any website or url. i came to know that phantomjs library can do it. here i got a small code which capture and convert the github home page to png image if anyone familiar with phantomjs then please tell me what is the meaning of this line var page = require('webpage').create(); here i can give any name instead of webpage ? if i need to capture the portion of any webpage then how can i do it with the help of this library.

Capture sound output on mac

戏子无情 提交于 2019-12-21 05:25:18
问题 I am trying to port my screensaver from windows to mac and one of its features was reacting on system sound output. On windows it was easy using Direct Sound, but I can't find any example of capturing sound output on mac. Is it possible even possible without writing something like kernel extension? Using flash it is also very easy — it even gives computeSpectrum method to get raw data or even fft transformed data. All programs that I have already found use Soundflower or their own kernel