Guides

by

The HTML and javascript code below demonstrates how to use a value entered into an HTML form to perform a calculation and return the result. This example simply squares the input value. Some simple checking is performed to ensure that the input value is a number. The following form demonstrates the code in action.  

by

The Arduino Uno (ATmega328) has a single hardware serial connection. If more serial connections are needed, you must implement these in software. Luckily, there is a very easy to use library to implement software serial connections. It is called SoftwareSerial.h and is included with the latest Arduino IDE. The following code demonstrates how to use

by

The following Perl script uses regular expressions to parse a text file called myFile.txt and replace any occurrence of the character sequence REPLACE with the string (or number) stored in $NEWTEXT. The modified text file is saved as myNewFile.txt. #!/usr/bin/perl $NEWTEXT = “New Stuff”; # could also be a number open(INPUT, “< myFile.txt") or die

by

Use a terminal command like the following to runs a MATLAB script in the background under Linux, Mac OS X, etcetera. nohup matlab -nodisplay < runProgram.m > outputFile & The nuhup command tells the OS to ignore hangups so the user who enters this command can log out and the program will still be running

by

Most motherboards have a feature that I have been aware of for some time but have not tried until recently. It is called wake-on-LAN (WOL) and gives you the ability to wake a computer simply by sending it a “magic packet” from any other machine on the local area network (LAN). A magic packet is