Event environment: pycharm has compiled the do () function and saved it in make. py. how can I call the do function in another file? Steps:
1. PyCharm, IDE has a Project setting icon, which configures the run icon and sets the run file to myfile. py.2.
The code is as follows:
#--------------------------------------#! /Usr/bin/python# File: myfile. py# Author: Michael Fan
From make. py import do
Def main ():Do ()
If _ name _ = '_ main __':Main ()#--------------------------------------
; if (Is_file ($_path)) unlink ($_path); /* Update Condition */ if (Is_dir ($_path)) Array_push ($stack, $dir. $item. '/'); } } Return! (File_exists ($path));}
View Execution Time
This is a function that looks at the execution time (in milliseconds) of the code, executes the target code (or function) through a callback, and finally calculates the execution time (in milliseconds). With this tool you can compare the performance gap between functions, a very simple and practical
Print a list of supported devices for DirectShow
-list_devices true -f dshow -i dummy
Turn on the camera, save the video in Out.mp4.
ffmpeg -f dshow -i video="Lenovo EasyCamera" out.mp4
Turn on the microphone and save the recording in Out.mp3
ffmpeg -f dshow -i audio="@device_cm_{33D9A762-90C8-11D0-BD43-00A0C911CE86}\wave_{7DB78E33-271D-431B-9E43-F4A54BD675BD}" out.mp4
1
Turn on the camera, turn on the
For details about how to configure virtualenvwrapper of python3 in linux,Python version management virtualenv Management
Virtualenvwrapper is an extension package used to manage virtualenv, which is easy to use.
Note that in python3, pip installation: sudo apt install python3-pip
Python2: sudo apt install python2-pip
1. virtualenvwrapper installation:
# Install virtualenv (sudo) pip install virtualenv # install virtualenvwrapper (sudo) pip install virtualenvwrapper
2. Configuration:
Modify ~
Android Potential Development headphone plug connection to audio channel switch exampleBecause you are using headphones with a separate headset, you have to escalate the event separately. The detection of headphone jacks on the Android system layer is inferred based on The value of the/sys/class/switch/h2w/state (in 4.4.4_r2 for the sample is located in Wiredaccessorymanager.java).Just implement a switch class -based h2w switches in the kernel that is "either true or false ." the Android syste
onboard USB3503, leading to high performance Hsic, 3 USB host output Angle expansion pin up to 320 Meet the user's various expansion requirements Temperature range-20 ℃ to 70 ℃ operating voltage 2.65v--5.5v (recommended 4.0V) System support Android 4.0.3/android 4.4/linux + qt/ubuntu12.04 Backplane Parameters Switch power switch Power DC power input connector, 5V/2A power input Usb_host interface 2 way usb_host output USB OTG Interface 1 Way USB OTG 2.0 JTAG interface Standard JTAG in
If the Jetson TK1 audio is not available, you can enter the following command at the terminal and test again, you can use it. (Note: On the Jetson TK1 hardware, on the audio, above is the microphone, below is the handset).Amixer cset name= "Stereo ADC MIXL ADC2 Switch" 0amixer cset name= "Stereo ADC mixr ADC2 Switch" 0amixer cset name= "Int Mic Switch "0amixer cset name=" ADC Capture Switch "1amixer cset name=" RECMIXL BST1 Switch "0amixer cset name="
There may be some strange errors when SSH is parsed here:1. SSH does not allow root loginThe following error is reported when SSH is connected:[Email protected] ~]# ssh-p 10022 [email protected][email protected] ' s password:Permission denied, please try again.[email protected] ' s password:Permission denied, please try again.[email protected] ' s password:Permission denied (Publickey,gssapi-keyex,gssapi-with-mic,password).The password entered is corr
, all pins can be based on the schematic diagram toSee how you connect. the JTAG Interface is located on the board backplane. Figure 2-7 JTAG Physical Map2.2.4 Audio InterfaceFigure 2-8Sound card ChipThe OK6410 Development Board audio feature uses the AC97 bus of the s3c6410 processor. External WM9714 Audio CoreIntegrated audio output, line in input, and Mic input functions. Audio output and MIC input as we
If someone else writes a function in the thinkphp project, I wonder why this function serves.
function is_mobile() { $user_agent = $_SERVER['HTTP_USER_AGENT']; $mobile_agents = Array("240x320","acer","acoon","acs-","abacho","ahong","airness","alcatel","amoi","android","applewebkit/525","applewebkit/532","asus","audio","au-mic","avantogo","becker","benq","bilbo","bird","blackberry","blazer","bleu","cdm-","compal","coolpad","danger","dbt
); s(1); Mi(1); //MS Mic(1); //μs Nanoseconds na (1); Nanosecond requires system support T3(date(2013,4,20)); T4(date(2013,4,20), dur); T5(date(2013,4,20), mic); cout The operation of time, similar to the date, is very simple. cout }Ten, the format of timeMainly used for two classes, input: Date_input_facet, Output: Date_facetThe time format class is: Time_in
Microsoft released Silverlight 4 Beta on pdc2009. Microsoft processed requests from about 8000 Silverlight end users in Silverlight 4 and added a series of exciting new features from other developers, the most prominent aspects are as follows:
Development Tool enhancement: Visual Studio 2010 has a visual design tool. When creating a project, you can choose whether the runtime version is 3.0 or 4.0. blend4 is added to the XAML and C #CodeAll-round smart sensing functions, and more easy-to-use X
Often through SSH or SCP to connect a bunch of remote host, also is the Linux host, some of them create SSH connection speed is very slow, the connection after the establishment of the operation speed is very normal, it seems that should not be a network cause. The workaround is to view the debug information by using the-v parameter of SSH:Use Ssh-v to see the details of the connection establishment process, immediately with a very slow to establish a host to try, in a large pile of output infor
= camera. Get ();Video_r.attachvideo (my_cam );// Obtain the image head and load the video obtained by the camera to video_r.
My_cam.setquality (1024, 90 );// Set the bandwidth and quality;
VaR my_mic: microphone = microphone. Get ();// Obtain the mic;
My_ns.attachvideo (my_cam );My_ns.attachaudio (my_mic );// Load the camera image and MIC sound to the stream.
Video_p. _ visible = false;// Sets the
Microsoft released Silverlight 4 Beta on pdc2009. Microsoft processed requests from about 8000 Silverlight end users in Silverlight 4 and added a series of exciting new features from other developers, the most prominent aspects are as follows:
Development Tool enhancement: Visual Studio 2010 has a visual design tool. When creating a project, you can choose whether the runtime version is 3.0 or 4.0, blend4 is added to the XAML and C # code comprehensive smart sensing functions, and the style appl
I have been studying the implementation of voice calls recently. Now I have recorded my Implementation ideas here. However, this is a simple idea and a learning conclusion after Google and Baidu because of the first access to voice calls.
I think a voice call system has at least four modules. These are PCM (Pulse Code Modulation) Speech collection, encoding/decoding, network transmission, and audio playback. If UI interaction is counted, five modules are involved.
The overall process is probably
The source code of video recording seems to be quite a lot on the Internet. Here I declare that I copied the source code from others and modified it to optimize it. I am a little tired. I will not talk about it anymore. paste the source code directly:
VaR server_uri: String = "rtmp: // 215.102.25.xx/gdrc/video ";// The FMS address, which is the same as that set for the player.
VaR videoname: String = "record"; // specifies the recording file name, which can be passed through parameters.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.