Before enabling hibernation, please try to test whether it works correctly by running pm-hibernatein a terminal. The system will try to hibernate. If you are able to start the system again then you are more or less safe to add an override.
Want to communicate with serial port using Java? You may want to try RxTx library. It's easy to use.
To install follow the instruction below:
The official RxTx binary pack is available here. The provided link will download the distro with some standard binaries (for linux 32bit, 64 bit, etc). If binaries for your specific operating system are not included, you may consider recompiling RxTx yourselves.
For a custom Win64 RxTx distro, have a look at the CloudHopper's web site.
To install it, unzip the distribution file in a temporary place and do the following copies:
File RXTXcomm.jar should go under JDKDIR/jre/lib/ext/
The necessary library( .so for linux, .dll for windows) should go under JDKDIR/jre/bin/
Online Python Tutor : It is a free educational tool that helps students overcome a fundamental barrier to learning programming: understanding what happens as the computer executes each line of a program's source code. Using this tool, a teacher or student can write a Python program directly in the web browser and visualize what the computer is doing step-by-step as it executes the program.
life is short - you need Python!: A blog on Python with tutorials, code, programs, tips and tricks, how-to, book-list, crawler / spider help, data structure and algorithm implementation and many more ... maintained by Tamim Shahriar Subeen, one of the best IT professional in Bangladesh.
Python for fun - advanced python codes: This collection is a presentation of several small Python programs. They are aimed at intermediate programmers; people who have studied Python and are fairly comfortable with basic recursion and object oriented techniques. Each program is very short, never more than a couple of pages and accompanied with a write-up.
site aims to be both a library of educational materials using Python to teach computer programming, and a virtual meeting place for teachers and students engaged in learning and teaching using Python. Happy computing!
import turtle # allows us to use the turtles library
wn = turtle.Screen() # creates a graphics window
alex = turtle.Turtle() # create a turtle named alex
alex.forward(150) # tell alex to move forward by 150 units
alex.left(90) # turn by 90 degrees
alex.forward(75) # complete the second side of a rectangle
wn.exitonclick()
Instructions:
Click on orbs arranged in a grid to make them all glow. Clicking on an orb
changes its state from unlit to lit or lit to unlit along with the
neighboring orbs. Turn on all the orbs to pass a level with as few moves
as you can. There are 9 levels, each with more orbs than the previous one.
Two difficulty modes. In the easy mode, all orbs are unlit in the beginning
and in the hard mode, some orbs are already lit to make things difficult
for the player.
Author:MUKTO SOFTWARE LTD.
Unzip the distribution archive, i.e. apache-maven-3.0.4-bin.zip to the directory you wish to install Maven 3.0.4. These instructions assume you chose C:\Program Files\Apache Software Foundation. The subdirectory apache-maven-3.0.4 will be created from the archive.
Add the M2_HOME environment variable. [almost similar as this]: adding the M2_HOME variable in the system variables with the value C:\Program Files\Apache Software Foundation\apache-maven-3.0.4. Be sure to omit any quotation marks around the path even if it contains spaces.
In the same dialog, add the M2 environment variable in the system variables with the value %M2_HOME%\bin.
In the same dialog, update/create the Path environment variable in the system variables and prepend the value %M2% to add Maven available in the command line.
In the same dialog, make sure that JAVA_HOME exists in your system variables and it is set to the location of your JDK, e.g.C:\Program Files\Java\jdk1.5.0_02 and that %JAVA_HOME%\bin is in your Path environment variable.
Open a new command prompt and run mvn --version to verify that it is correctly installed.
Linux based/Ubuntu Operating Systems:
Extract the distribution archive, to the directory you wish to install Maven 3.0.4. These instructions assume you chose /home/username/java/tools/maven.
Open terminal and type: gedit ~/.bashrc
Set environment variable by adding the following lines at the bottom of .bashrc :
export M2_HOME=/home/username/java/tools/maven
export M2=$M2_HOME/bin
export PATH=$M2:$PATH
export JAVA_HOME=/usr/lib/jvm/jdk-default #if JAVA_HOME not exist.
Run mvn --version to verify that it is correctly installed.
Often people want to be able to shut their computers down without requiring a password to do so. This is particularly useful in media PCs where you want to be able to use the shutdown command in the media centre to shutdown the whole computer.
To do this you need to add some cmnd aliases as follows:
You also need to add a user specification (at the end of the file after the "%admin ALL = (ALL) ALL" line so it takes effect - see above for details):
ALL=(ALL) NOPASSWD: SHUTDOWN_CMDS
Obviously you need to replace "" with the username of the user who needs to be able to shutdown the pc without a password. You can use a user alias here as normal.
FFmpeg from the repository is not compiled to support restricted formats such as mp3. You can use a third-party repository such as Medibuntu, compile ffmpeg yourself, or use another library, such as: libavcodec-extra-53.
The basic command:
Code:
ffmpeg -i inpuvvideofile.flv outputaudiofile.mp3
By default this will create a 64 kb/s file. You can declare the audio bitrate with -ab:
If the flv already has mp3 audio, then there is no need to re-encode. You can just copy the audio stream. This will preserve the audio quality and will be much quicker since there is no re-encoding: