Technology related solutions, tips, tricks, and other interesting topics
Google Code University offers free training for computer programming. The training consists of a website which contains training materials such as slide shows, videos, and problem solving sets. Here is an excerpt from the Google training website which describes the training offered:
This website provides tutorials and sample course content so CS students and educators can [...]
In: General IT Info
6 Mar 2008Here is a snippet of PERL code which you can use to send emails from your PERL scripts:
open (MAIL, “|/usr/sbin/sendmail -t “);
print MAIL “From: someFromAddress\@someFromDomain\n”;
print MAIL “To: someToAddress\@someToDomain\n”;
print MAIL “Content-Type: text/plain\n”;
print MAIL “Subject: Very simple email test\n\n”;
print MAIL “Body of the message”;
close (MAIL);
Replace “someFromAddress\@someFromDomain” with an email address to be displayed in the “from” field [...]
Here is some sample code for determining what the file path is to the PERL script containing the code:
use Cwd qw(realpath);
my $fullpath = realpath($0);
If you just do $0 alone in the second line, that only gives you the filename that was executed. For example, if you include the first line of code above in a [...]
In: Web Development
10 Jan 2008Sometimes while debugging a PHP application it is handy to display request and post variables. Here is the code that will do that:
foreach($_POST as $var=>$val)
{
echo “$var=$val”;
}
Replace POST with SESSION and it’ll work for the session variables. You can do the same with GET, but probably don’t need it.
This blog is about technology related topics. It will primarily contain problems and solutions to IT problems that I encounter on a day-to-day basis. In addition interesting things I come across either on or off the internet will be posted here as well. I will also include step-by-step tutorials to common tasks people may need to do with their computers.