<?xml version="1.0" encoding="iso-8859-1" ?>
<rss version="0.92">
<channel>
	<docs>http://backend.userland.com/rss092</docs>
	<title>DevGuy</title>
	<link>http://devguy.com/bb/</link>
	<description>Free Resources for Programmers                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        #forumbbot {display:none;}italian charms</description>
	<managingEditor>noreply@devguy.com</managingEditor>
	<webMaster>noreply@devguy.com</webMaster>
	<lastBuildDate>Thu, 11 Mar 2010 21:41:52 GMT</lastBuildDate>
<item>
	<title>Perl :: Output redirection with indirect filehandles</title>
	<link>http://devguy.com/bb/viewtopic.php?p=3763#3763</link>
	<description>Author: &lt;a href=&quot;http://devguy.com/bb/profile.php?mode=viewprofile&amp;u=2&quot; target=&quot;_blank&quot;&gt;devguy&lt;/a&gt;&lt;br /&gt;
Subject: Output redirection with indirect filehandles&lt;br /&gt;
Posted: Wed Jan 13, 2010 3:26 am (GMT 0)&lt;br /&gt;
Topic Replies: 0&lt;br /&gt;&lt;br /&gt;
&lt;span class="postbody"&gt;This write the output of &amp;quot;dir&amp;quot; to out.txt
&lt;br /&gt;

&lt;br /&gt;
&lt;/span&gt;&lt;table width=&quot;90%&quot; cellspacing=&quot;1&quot; cellpadding=&quot;3&quot; border=&quot;0&quot; align=&quot;center&quot;&gt;&lt;tr&gt; 	  &lt;td&gt;&lt;span class=&quot;genmed&quot;&gt;&lt;b&gt;Code:&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;	&lt;/tr&gt;	&lt;tr&gt;	  &lt;td class=&quot;code&quot;&gt;use strict;
&lt;br /&gt;
use warnings;
&lt;br /&gt;
my $f;
&lt;br /&gt;
open&amp;#40;$f, &amp;quot;&amp;gt;&amp;amp;&amp;quot;, STDOUT&amp;#41;;
&lt;br /&gt;
close STDOUT;
&lt;br /&gt;
open&amp;#40;STDOUT, &amp;quot;&amp;gt;&amp;quot;, 'out.txt'&amp;#41;;
&lt;br /&gt;
system&amp;#40;'dir'&amp;#41;;
&lt;br /&gt;
close STDOUT;
&lt;br /&gt;
open&amp;#40;STDOUT, &amp;quot;&amp;gt;&amp;amp;&amp;quot;, $f&amp;#41;;
&lt;br /&gt;
print &amp;quot;Done&amp;quot;;&lt;/td&gt;	&lt;/tr&gt;&lt;/table&gt;&lt;span class=&quot;postbody&quot;&gt;
&lt;/span&gt;&lt;br /&gt;
</description>
</item>
<item>
	<title>Perl :: Install perl modules semi-automatically</title>
	<link>http://devguy.com/bb/viewtopic.php?p=3762#3762</link>
	<description>Author: &lt;a href=&quot;http://devguy.com/bb/profile.php?mode=viewprofile&amp;u=2&quot; target=&quot;_blank&quot;&gt;devguy&lt;/a&gt;&lt;br /&gt;
Subject: Install perl modules semi-automatically&lt;br /&gt;
Posted: Tue Jan 12, 2010 5:43 pm (GMT 0)&lt;br /&gt;
Topic Replies: 0&lt;br /&gt;&lt;br /&gt;
&lt;span class="postbody"&gt;Installing a large set of Perl modules via PPM and/or CPAN is painful. Here's a script that makes it easier.
&lt;br /&gt;

&lt;br /&gt;
In order for CPAN builds to work with ActivePerl on Windows, you need to get nmake.exe and nmake.err. Get them &lt;a href=&quot;http://download.microsoft.com/download/vc15/Patch/1.52/W95/EN-US/Nmake15.exe&quot; target=&quot;_blank&quot; class=&quot;postlink&quot;&gt;here&lt;/a&gt;. Put both in your PATH or in the same directory where this script resides.
&lt;br /&gt;

&lt;br /&gt;
&lt;/span&gt;&lt;table width=&quot;90%&quot; cellspacing=&quot;1&quot; cellpadding=&quot;3&quot; border=&quot;0&quot; align=&quot;center&quot;&gt;&lt;tr&gt; 	  &lt;td&gt;&lt;span class=&quot;genmed&quot;&gt;&lt;b&gt;Code:&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;	&lt;/tr&gt;	&lt;tr&gt;	  &lt;td class=&quot;code&quot;&gt;#! /usr/bin/perl
&lt;br /&gt;
use File&amp;#58;&amp;#58;Basename;
&lt;br /&gt;
use Carp;
&lt;br /&gt;
use Cwd;
&lt;br /&gt;
use Getopt&amp;#58;&amp;#58;Long;
&lt;br /&gt;
use strict;
&lt;br /&gt;
use warnings;
&lt;br /&gt;
use CPAN;
&lt;br /&gt;
use File&amp;#58;&amp;#58;Temp qw&amp;#40;tempfile&amp;#41;;
&lt;br /&gt;

&lt;br /&gt;
my $automated = 0;
&lt;br /&gt;
my $no_prompt = 0;
&lt;br /&gt;
my $exit_code = 0;
&lt;br /&gt;
my &amp;#40; $fh, $in_file &amp;#41;;
&lt;br /&gt;

&lt;br /&gt;
&amp;amp;Getopt&amp;#58;&amp;#58;Long&amp;#58;&amp;#58;GetOptions&amp;#40;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; 'noprompt|P'&amp;nbsp; &amp;nbsp;=&amp;gt; \$no_prompt,
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; 'automated|m!' =&amp;gt; \$automated,
&lt;br /&gt;
&amp;#41;;
&lt;br /&gt;

&lt;br /&gt;
print &amp;lt;&amp;lt;END
&lt;br /&gt;
When running this script for the first time, if
&lt;br /&gt;
the CPAN shell has not been configured, please
&lt;br /&gt;
perform the following. On Linux, you must use root
&lt;br /&gt;
or sudo.
&lt;br /&gt;

&lt;br /&gt;
perl -MCPAN -e shell
&lt;br /&gt;

&lt;br /&gt;
Answer the prompts and then type, followed by ENTER&amp;#58;
&lt;br /&gt;
o conf commit
&lt;br /&gt;
END
&lt;br /&gt;
&amp;nbsp; ;
&lt;br /&gt;

&lt;br /&gt;
# This causes CPAN to take all defaults without input
&lt;br /&gt;
$ENV&amp;#123;PERL_MM_USE_DEFAULT&amp;#125; = 1;
&lt;br /&gt;
CPAN&amp;#58;&amp;#58;Shell-&amp;gt;o&amp;#40; 'conf', 'init', 'auto_commit' &amp;#41;;
&lt;br /&gt;

&lt;br /&gt;
my $make = 'make';
&lt;br /&gt;

&lt;br /&gt;
if &amp;#40; $^O =~ /Win/ &amp;#41; &amp;#123;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; # Use 'nmake' which should be located in PATH or in the
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; # directory where this script resides
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; chdir dirname&amp;#40;$0&amp;#41; || croak&amp;#40;&amp;quot;chdir failed - $!&amp;quot;&amp;#41;;
&lt;br /&gt;

&lt;br /&gt;
&amp;nbsp; &amp;nbsp; $make = 'nmake';
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; my $sep = ';';
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; my $d&amp;nbsp; &amp;nbsp;= cwd;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; $d =~ s/\//\\/g;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; $ENV&amp;#123;PATH&amp;#125; .= &amp;quot;$&amp;#123;sep&amp;#125;$d&amp;quot;;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; CPAN&amp;#58;&amp;#58;Shell-&amp;gt;o&amp;#40; 'conf', 'shell', 'cmd' &amp;#41;;
&lt;br /&gt;
&amp;#125;
&lt;br /&gt;
else &amp;#123;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; CPAN&amp;#58;&amp;#58;Shell-&amp;gt;o&amp;#40; 'conf', 'shell', '/bin/bash' &amp;#41;;
&lt;br /&gt;
&amp;#125;
&lt;br /&gt;

&lt;br /&gt;
CPAN&amp;#58;&amp;#58;Shell-&amp;gt;o&amp;#40; 'conf', 'make_install_make_command', $make &amp;#41;;
&lt;br /&gt;

&lt;br /&gt;
if &amp;#40; $^O =~ /cgywin/ &amp;#41; &amp;#123;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; print &amp;lt;&amp;lt;END
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; 
&lt;br /&gt;
Make sure you have read/write permissions in all of your 
&lt;br /&gt;
.../perl/.../lib, .../perl/.../man, and .../perl/.../pod 
&lt;br /&gt;
directories before you attempt the install.
&lt;br /&gt;
END
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; ;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; CPAN&amp;#58;&amp;#58;Shell-&amp;gt;o&amp;#40; 'conf', 'build_dir',&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;'/cygdrive/c/CPANinst' &amp;#41;;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; CPAN&amp;#58;&amp;#58;Shell-&amp;gt;o&amp;#40; 'conf', 'cpan_home',&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;'/cygdrive/c/CPANinst' &amp;#41;;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; CPAN&amp;#58;&amp;#58;Shell-&amp;gt;o&amp;#40; 'conf', 'keep_source_where', '/cygdrive/c/CPANinst' &amp;#41;;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; CPAN&amp;#58;&amp;#58;Shell-&amp;gt;o&amp;#40; 'conf', 'prefs_dir',&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;'/cygdrive/c/CPANinst' &amp;#41;;
&lt;br /&gt;
&amp;#125;
&lt;br /&gt;

&lt;br /&gt;
CPAN&amp;#58;&amp;#58;Shell-&amp;gt;o&amp;#40; 'conf', 'commit' &amp;#41;;
&lt;br /&gt;

&lt;br /&gt;
my @bundles = &amp;#40;
&lt;br /&gt;

&lt;br /&gt;
&amp;nbsp; &amp;nbsp; # Specifying 'no_activeperl' and 'no_cpan' causes the entry to be ignored.
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; #
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; # ActivePerl implies Windows. ppm is the default installation on
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; # ActivePerl.
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; #
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; # There is currently no way to run ppm on cygwin or Linux.
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; #
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; # On ActivePerl, 'no_activeperl' causes the entry to be skipped.
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; # 'cpan' causes cpan to be used instead of ppm.
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; #
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; # On non-ActivePerl, specifying either 'activeperl_only' or
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; # 'no_cpan' cause the entry to be skipped.
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; #
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; # 'more' only applies to cpan. Its value contains text that will
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; # be printed prior to installing the module &amp;#40;e.g., &amp;quot;Press ENTER
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; # when you are asked for input&amp;quot;&amp;#41;.
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; #
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; # 'manual_only' only applies to cpan.
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; # It causes the item to be skipped when in automated mode.
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; #
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; # 'notest' only applies to cpan.
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; # It avoids running tests but it also installs prerequisites.
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; # It is the default.
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; #
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; # 'normal' only applies to cpan. It runs a normal CPAN install.
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; #
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; # 'manual' only applies to cpan.
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; # It invokes the shell and runs make etc..
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; # It avoids installing prerequisites but runs tests.
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; #
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; # 'force' only applies to cpan.
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; # It should be used when the installation fails
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; # due to failed tests or prerequisites.
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; # Unfortunately, it causes the module to be installed
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; # every time this script is run. Try 'notest' before 'force.'
&lt;br /&gt;

&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;quot;Bundle&amp;#58;&amp;#58;CPAN&amp;quot; =&amp;gt; &amp;#123;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 'comment'&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;=&amp;gt; 'Needed by DateTime',
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 'no_activeperl' =&amp;gt; 1,
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;#125;,
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;quot;Params&amp;#58;&amp;#58;Validate&amp;quot; =&amp;gt; &amp;#123; 'comment' =&amp;gt; 'Needed by DateTime' &amp;#125;,
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;quot;DateTime&amp;quot;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;=&amp;gt; &amp;#123;&amp;#125;,
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;quot;DateTime&amp;#58;&amp;#58;Format&amp;#58;&amp;#58;Duration&amp;quot;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; =&amp;gt; &amp;#123;&amp;#125;,
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;quot;S/SB/SBECK/Date-Manip-5.54.tar.gz&amp;quot; =&amp;gt; &amp;#123; 'no_activeperl' =&amp;gt; 1, &amp;#125;,
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;quot;J/JP/JPEACOCK/version-0.78.tar.gz&amp;quot; =&amp;gt; &amp;#123; 'no_activeperl' =&amp;gt; 1, &amp;#125;,
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;quot;version&amp;quot;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;=&amp;gt; &amp;#123; 'activeperl_only' =&amp;gt; 1 &amp;#125;,
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;quot;DateTime&amp;#58;&amp;#58;Format&amp;#58;&amp;#58;DateManip&amp;quot;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;=&amp;gt; &amp;#123; 'activeperl_only' =&amp;gt; 1 &amp;#125;,
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;quot;DateTime&amp;#58;&amp;#58;Format&amp;#58;&amp;#58;Builder&amp;quot;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;=&amp;gt; &amp;#123;&amp;#125;,
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;quot;DateTime&amp;#58;&amp;#58;Format&amp;#58;&amp;#58;ISO8601&amp;quot;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;=&amp;gt; &amp;#123;&amp;#125;,
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;quot;Test&amp;#58;&amp;#58;Unit&amp;quot;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; =&amp;gt; &amp;#123;&amp;#125;,
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;quot;DBI&amp;quot;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;=&amp;gt; &amp;#123;&amp;#125;,
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;quot;DBD&amp;#58;&amp;#58;ODBC&amp;quot;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;=&amp;gt; &amp;#123;&amp;#125;,
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;quot;Class&amp;#58;&amp;#58;Std&amp;#58;&amp;#58;Utils&amp;quot;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;=&amp;gt; &amp;#123;&amp;#125;,
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;quot;List&amp;#58;&amp;#58;MoreUtils&amp;quot;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;=&amp;gt; &amp;#123;&amp;#125;,
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;quot;Config&amp;#58;&amp;#58;Std&amp;quot;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;=&amp;gt; &amp;#123;&amp;#125;,
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;quot;Log&amp;#58;&amp;#58;Log4perl&amp;quot;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;=&amp;gt; &amp;#123;&amp;#125;,
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;quot;Log&amp;#58;&amp;#58;Dispatch&amp;#58;&amp;#58;FileRotate&amp;quot; =&amp;gt; &amp;#123;&amp;#125;,
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;quot;Devel&amp;#58;&amp;#58;Trace&amp;quot;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; =&amp;gt; &amp;#123;&amp;#125;,
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;quot;DateTime&amp;#58;&amp;#58;Cron&amp;#58;&amp;#58;Simple&amp;quot; =&amp;gt; &amp;#123;&amp;#125;,
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;quot;Smart&amp;#58;&amp;#58;Comments&amp;quot;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; =&amp;gt; &amp;#123;&amp;#125;,
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;quot;Class&amp;#58;&amp;#58;InsideOut&amp;quot;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;=&amp;gt; &amp;#123;&amp;#125;,
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;quot;Perl6&amp;#58;&amp;#58;Export&amp;#58;&amp;#58;Attrs&amp;quot;&amp;nbsp; &amp;nbsp;=&amp;gt; &amp;#123;&amp;#125;,
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;quot;Pod&amp;#58;&amp;#58;Checker&amp;quot;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;=&amp;gt; &amp;#123; 'no_activeperl' =&amp;gt; 1 &amp;#125;,
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;quot;YAML&amp;#58;&amp;#58;LibYAML&amp;quot;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; =&amp;gt; &amp;#123; 'activeperl_only' =&amp;gt; 1 &amp;#125;,
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;quot;YAML&amp;#58;&amp;#58;XS&amp;quot;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;=&amp;gt; &amp;#123; 'no_activeperl' =&amp;gt; 1 &amp;#125;,
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;quot;Class&amp;#58;&amp;#58;Inner&amp;quot;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; =&amp;gt; &amp;#123;&amp;#125;,
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;quot;Error&amp;quot;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;=&amp;gt; &amp;#123;&amp;#125;,
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;quot;Devel&amp;#58;&amp;#58;Symdump&amp;quot;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; =&amp;gt; &amp;#123;&amp;#125;,
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;quot;Pod&amp;#58;&amp;#58;Simple&amp;#58;&amp;#58;HTMLBatch&amp;quot;&amp;nbsp; =&amp;gt; &amp;#123; 'no_activeperl' =&amp;gt; 1 &amp;#125;,
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;quot;File&amp;#58;&amp;#58;Slurp&amp;quot;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;=&amp;gt; &amp;#123;&amp;#125;,
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;quot;Tree&amp;#58;&amp;#58;Simple&amp;quot;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; =&amp;gt; &amp;#123;&amp;#125;,
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;quot;File&amp;#58;&amp;#58;Path&amp;quot;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; =&amp;gt; &amp;#123;&amp;#125;,
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;quot;File&amp;#58;&amp;#58;Spec&amp;quot;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; =&amp;gt; &amp;#123; 'no_activeperl' =&amp;gt; 1 &amp;#125;,
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;quot;Net&amp;#58;&amp;#58;Ping&amp;quot;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;=&amp;gt; &amp;#123;&amp;#125;,
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;quot;Algorithm&amp;#58;&amp;#58;Diff&amp;quot;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;=&amp;gt; &amp;#123;&amp;#125;,
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;quot;Data&amp;#58;&amp;#58;GUID&amp;quot;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; =&amp;gt; &amp;#123;&amp;#125;,
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;quot;Readonly&amp;quot;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; =&amp;gt; &amp;#123;&amp;#125;,
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;quot;Perl&amp;#58;&amp;#58;Tidy&amp;quot;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; =&amp;gt; &amp;#123;&amp;#125;,
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;quot;Math&amp;#58;&amp;#58;BigInt&amp;quot;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; =&amp;gt; &amp;#123;&amp;#125;,
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;quot;POE&amp;quot;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;=&amp;gt; &amp;#123;&amp;#125;,
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;quot;POE&amp;#58;&amp;#58;Component&amp;#58;&amp;#58;EasyDBI&amp;quot; =&amp;gt; &amp;#123; 'cpan' =&amp;gt; 1, &amp;#125;,
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;quot;POE&amp;#58;&amp;#58;Component&amp;#58;&amp;#58;Child&amp;quot;&amp;nbsp; &amp;nbsp;=&amp;gt; &amp;#123;'cpan' =&amp;gt; 1,&amp;#125;,
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;quot;Net&amp;#58;&amp;#58;SNMP&amp;quot;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; =&amp;gt; &amp;#123;&amp;#125;,
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;quot;Contextual&amp;#58;&amp;#58;Return&amp;quot; =&amp;gt; &amp;#123;&amp;#125;,
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;quot;Template&amp;quot;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;=&amp;gt; &amp;#123; 'no_activeperl' =&amp;gt; 1 &amp;#125;,
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;quot;Template-Toolkit&amp;quot;&amp;nbsp; &amp;nbsp;=&amp;gt; &amp;#123; 'activeperl_only' =&amp;gt; 1 &amp;#125;,
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;quot;Sys&amp;#58;&amp;#58;Hostname&amp;quot;&amp;nbsp; &amp;nbsp; &amp;nbsp; =&amp;gt; &amp;#123; 'no_activeperl' =&amp;gt; 1 &amp;#125;,
&lt;br /&gt;
&amp;#41;;
&lt;br /&gt;

&lt;br /&gt;
my $i = 0;
&lt;br /&gt;
while &amp;#40; $i &amp;lt; $#bundles &amp;#41; &amp;#123;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; my &amp;#40; $bundle, $info &amp;#41; = @bundles&amp;#91; $i, $i + 1 &amp;#93;;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; $i += 2;
&lt;br /&gt;

&lt;br /&gt;
&amp;nbsp; &amp;nbsp; if &amp;#40; !$info-&amp;gt;&amp;#123;'cpan'&amp;#125; &amp;amp;&amp;amp; $^O =~ /Win/ &amp;#41; &amp;#123;&amp;nbsp; &amp;nbsp; # If Windows..
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; next if $info-&amp;gt;&amp;#123;'no_activeperl'&amp;#125;;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; my $bdl = $bundle;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $bdl =~ s/&amp;#58;&amp;#58;/-/g;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; print &amp;quot;\n*** $bundle ***\n&amp;quot;;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; system&amp;#40; 'ppm', 'install', $bdl &amp;#41;;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;#125;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; else &amp;#123;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; next if $info-&amp;gt;&amp;#123;'activeperl_only'&amp;#125;;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; next if $info-&amp;gt;&amp;#123;'no_cpan'&amp;#125;;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; next if $info-&amp;gt;&amp;#123;'manual_only'&amp;#125; &amp;amp;&amp;amp; $automated;
&lt;br /&gt;

&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; print &amp;quot;\n*** $bundle ***\n&amp;quot;;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; print &amp;quot;\n*** &amp;quot; . $info-&amp;gt;&amp;#123;'more'&amp;#125; . &amp;quot; ***\n&amp;quot; if $info-&amp;gt;&amp;#123;'more'&amp;#125;;
&lt;br /&gt;

&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if &amp;#40; !$info-&amp;gt;&amp;#123;'manual'&amp;#125; &amp;amp;&amp;amp; !$info-&amp;gt;&amp;#123;'force'&amp;#125; &amp;amp;&amp;amp; !$info-&amp;gt;&amp;#123;'normal'&amp;#125; &amp;#41; &amp;#123;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $info-&amp;gt;&amp;#123;'notest'&amp;#125; = 1;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;#125;
&lt;br /&gt;

&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if &amp;#40; $info-&amp;gt;&amp;#123;'force'&amp;#125; &amp;#41; &amp;#123;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; system&amp;#40;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;quot;perl&amp;quot;, '-MCPAN',
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; '-e',&amp;nbsp; &amp;nbsp;&amp;quot;CPAN&amp;#58;&amp;#58;Shell-&amp;gt;force&amp;#40;q&amp;#123;install&amp;#125;, q&amp;#123;$bundle&amp;#125;&amp;#41;&amp;quot;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;#41;;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;#125;
&lt;br /&gt;

&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if &amp;#40; $info-&amp;gt;&amp;#123;'manual'&amp;#125; &amp;#41; &amp;#123;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; unless &amp;#40;$in_file&amp;#41; &amp;#123;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;#40; $fh, $in_file &amp;#41; = tempfile&amp;#40;&amp;#41;;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; close $fh;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;#125;
&lt;br /&gt;

&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; open&amp;#40; $fh, &amp;quot;&amp;gt;&amp;quot;, $in_file &amp;#41; || croak &amp;quot;open $in_file failed - $!&amp;quot;;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; print $fh &amp;quot;perl Makefile.PL\n$make\n$make install\nexit\n&amp;quot;;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; close $fh;
&lt;br /&gt;

&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; no warnings;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; open&amp;#40; SAVEIN, &amp;quot;&amp;lt;&amp;amp;STDIN&amp;quot; &amp;#41;;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; close STDIN;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; open&amp;#40; STDIN, $in_file &amp;#41;;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; system&amp;#40; &amp;quot;perl&amp;quot;, '-MCPAN', '-e', &amp;quot;CPAN&amp;#58;&amp;#58;Shell-&amp;gt;look&amp;#40; q&amp;#123;$bundle&amp;#125; &amp;#41;&amp;quot; &amp;#41;;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; close STDIN;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; open&amp;#40; STDIN, &amp;quot;&amp;lt;&amp;amp;SAVEIN&amp;quot; &amp;#41;;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;#125;
&lt;br /&gt;

&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if &amp;#40; $info-&amp;gt;&amp;#123;'notest'&amp;#125; &amp;#41; &amp;#123;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; unless &amp;#40;$in_file&amp;#41; &amp;#123;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;#40; $fh, $in_file &amp;#41; = tempfile&amp;#40;&amp;#41;;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; close $fh;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;#125;
&lt;br /&gt;

&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; open&amp;#40; $fh, &amp;quot;&amp;gt;&amp;quot;, $in_file &amp;#41; || croak &amp;quot;open $in_file failed - $!&amp;quot;;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; print $fh &amp;quot;notest install $bundle\n&amp;quot;;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; close $fh;
&lt;br /&gt;

&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; no warnings;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; open&amp;#40; SAVEIN, &amp;quot;&amp;lt;&amp;amp;STDIN&amp;quot; &amp;#41;;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; close STDIN;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; open&amp;#40; STDIN, $in_file &amp;#41;;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; system&amp;#40; &amp;quot;perl&amp;quot;, &amp;quot;-MCPAN&amp;quot;, &amp;quot;-e&amp;quot;, &amp;quot;shell&amp;quot; &amp;#41;;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; close STDIN;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; open&amp;#40; STDIN, &amp;quot;&amp;lt;&amp;amp;SAVEIN&amp;quot; &amp;#41;;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;#125;
&lt;br /&gt;

&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if &amp;#40; $info-&amp;gt;&amp;#123;'normal'&amp;#125; &amp;#41; &amp;#123;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; system&amp;#40; &amp;quot;perl&amp;quot;, &amp;quot;-MCPAN&amp;quot;, &amp;quot;-e&amp;quot;, &amp;quot;install q&amp;#123;$bundle&amp;#125;&amp;quot; &amp;#41;;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;#125;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;#125;
&lt;br /&gt;

&lt;br /&gt;
&amp;nbsp; &amp;nbsp; if &amp;#40;$?&amp;#41; &amp;#123;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; carp &amp;quot;Error installing $bundle - $?&amp;quot;;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $exit_code = 1;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;#125;
&lt;br /&gt;
&amp;#125;
&lt;br /&gt;

&lt;br /&gt;
if &amp;#40;$in_file&amp;#41; &amp;#123;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; close $fh;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; unlink $in_file;
&lt;br /&gt;
&amp;#125;
&lt;br /&gt;

&lt;br /&gt;
unless &amp;#40; $automated || $no_prompt &amp;#41; &amp;#123;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; print &amp;quot;\nPress ENTER to continue...\n&amp;quot;;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;lt;STDIN&amp;gt;;
&lt;br /&gt;
&amp;#125;
&lt;br /&gt;

&lt;br /&gt;
exit $exit_code;
&lt;br /&gt;

&lt;br /&gt;
__END__
&lt;br /&gt;

&lt;br /&gt;
=pod&amp;nbsp; &amp;nbsp; 
&lt;br /&gt;

&lt;br /&gt;
=head1 NAME
&lt;br /&gt;

&lt;br /&gt;
install_perl_modules.pl
&lt;br /&gt;

&lt;br /&gt;
=head1 VERSION&amp;nbsp; &amp;nbsp; 
&lt;br /&gt;

&lt;br /&gt;
1.0.0
&lt;br /&gt;

&lt;br /&gt;
=head1 DESCRIPTION
&lt;br /&gt;

&lt;br /&gt;
Installs multiple Perl modules at once. Works with
&lt;br /&gt;
ActivePerl, cygwin, and Linux/UNIX.
&lt;br /&gt;

&lt;br /&gt;
=head1 SWITCHES
&lt;br /&gt;

&lt;br /&gt;
=over
&lt;br /&gt;

&lt;br /&gt;
=item B&amp;lt;--noprompt|-P&amp;gt; - Do not prompt for user input after completion
&lt;br /&gt;

&lt;br /&gt;
=item B&amp;lt;--automated|-m&amp;gt; - Running in automated mode.&amp;nbsp; Do not attempt to install any packages that require user input. 
&lt;br /&gt;

&lt;br /&gt;
=back
&lt;br /&gt;

&lt;br /&gt;
=head1 EXIT CODE
&lt;br /&gt;

&lt;br /&gt;
0 indicates success. Any other value indicates an error occurred.
&lt;br /&gt;

&lt;br /&gt;
=head1 BUGS
&lt;br /&gt;

&lt;br /&gt;
None yet
&lt;br /&gt;

&lt;br /&gt;
=head1 AUTHOR
&lt;br /&gt;

&lt;br /&gt;
DevGuy.com and Justin Lee. Free to use and distribute with no restrictions.
&lt;br /&gt;

&lt;br /&gt;
&lt;/td&gt;	&lt;/tr&gt;&lt;/table&gt;&lt;span class=&quot;postbody&quot;&gt;
&lt;/span&gt;&lt;br /&gt;
</description>
</item>
<item>
	<title>Perl :: Use IO::Select to implement nonblocking reads</title>
	<link>http://devguy.com/bb/viewtopic.php?p=3761#3761</link>
	<description>Author: &lt;a href=&quot;http://devguy.com/bb/profile.php?mode=viewprofile&amp;u=2&quot; target=&quot;_blank&quot;&gt;devguy&lt;/a&gt;&lt;br /&gt;
Subject: Use IO::Select to implement nonblocking reads&lt;br /&gt;
Posted: Tue Jan 12, 2010 7:41 am (GMT 0)&lt;br /&gt;
Topic Replies: 0&lt;br /&gt;&lt;br /&gt;
&lt;span class="postbody"&gt;&lt;a href=&quot;http://www.sdsc.edu/~moreland/courses/IntroPerl/docs/manual/lib/IO/Select.html&quot; target=&quot;_blank&quot;&gt;http://www.sdsc.edu/~moreland/courses/IntroPerl/docs/manual/lib/IO/Select.html&lt;/a&gt;
&lt;/span&gt;&lt;br /&gt;
</description>
</item>
<item>
	<title>Linux and BSD :: cifs mount and smbclient examples</title>
	<link>http://devguy.com/bb/viewtopic.php?p=3760#3760</link>
	<description>Author: &lt;a href=&quot;http://devguy.com/bb/profile.php?mode=viewprofile&amp;u=2&quot; target=&quot;_blank&quot;&gt;devguy&lt;/a&gt;&lt;br /&gt;
Subject: cifs mount and smbclient examples&lt;br /&gt;
Posted: Sat Jan 09, 2010 10:28 pm (GMT 0)&lt;br /&gt;
Topic Replies: 0&lt;br /&gt;&lt;br /&gt;
&lt;span class="postbody"&gt;mount -t cifs -o umask=000,mask=000,uid=60000,username=td/tl186004 //sdfs601/tl186004 /home/qa
&lt;br /&gt;

&lt;br /&gt;
smbclient is cool. It makes any Windows/Samba share look like an FTP server.
&lt;br /&gt;

&lt;br /&gt;
smbclient \\\\sdfs601\\tl186004 --user=td/tl186004
&lt;/span&gt;&lt;br /&gt;
</description>
</item>
<item>
	<title>Perl :: Unexpected yet correct behavior involving $@ and functions</title>
	<link>http://devguy.com/bb/viewtopic.php?p=3759#3759</link>
	<description>Author: &lt;a href=&quot;http://devguy.com/bb/profile.php?mode=viewprofile&amp;u=2&quot; target=&quot;_blank&quot;&gt;devguy&lt;/a&gt;&lt;br /&gt;
Subject: Unexpected yet correct behavior involving $@ and functions&lt;br /&gt;
Posted: Sat Jan 09, 2010 5:30 pm (GMT 0)&lt;br /&gt;
Topic Replies: 0&lt;br /&gt;&lt;br /&gt;
&lt;span class="postbody"&gt;This prints 10, 5, and 10:
&lt;br /&gt;

&lt;br /&gt;
&lt;/span&gt;&lt;table width=&quot;90%&quot; cellspacing=&quot;1&quot; cellpadding=&quot;3&quot; border=&quot;0&quot; align=&quot;center&quot;&gt;&lt;tr&gt; 	  &lt;td&gt;&lt;span class=&quot;genmed&quot;&gt;&lt;b&gt;Code:&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;	&lt;/tr&gt;	&lt;tr&gt;	  &lt;td class=&quot;code&quot;&gt;
&lt;br /&gt;
sub f &amp;#123;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; local $@;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; eval&amp;#123;print @_; die 5&amp;#125;;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; print $@;
&lt;br /&gt;
&amp;#125; 
&lt;br /&gt;

&lt;br /&gt;
$@='10';
&lt;br /&gt;
f&amp;#40;$@&amp;#41;;
&lt;br /&gt;
print $@;
&lt;br /&gt;
&lt;/td&gt;	&lt;/tr&gt;&lt;/table&gt;&lt;span class=&quot;postbody&quot;&gt;
&lt;br /&gt;

&lt;br /&gt;
But this prints 5 twice:
&lt;br /&gt;

&lt;br /&gt;
&lt;/span&gt;&lt;table width=&quot;90%&quot; cellspacing=&quot;1&quot; cellpadding=&quot;3&quot; border=&quot;0&quot; align=&quot;center&quot;&gt;&lt;tr&gt; 	  &lt;td&gt;&lt;span class=&quot;genmed&quot;&gt;&lt;b&gt;Code:&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;	&lt;/tr&gt;	&lt;tr&gt;	  &lt;td class=&quot;code&quot;&gt;
&lt;br /&gt;
sub f &amp;#123;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; eval&amp;#123;print @_; die 5&amp;#125;;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; print $@
&lt;br /&gt;
&amp;#125; 
&lt;br /&gt;

&lt;br /&gt;
$@='10';
&lt;br /&gt;
f&amp;#40;$@&amp;#41;;
&lt;br /&gt;
print $@;
&lt;br /&gt;
&lt;/td&gt;	&lt;/tr&gt;&lt;/table&gt;&lt;span class=&quot;postbody&quot;&gt;
&lt;br /&gt;

&lt;br /&gt;
Where did the 10 go?
&lt;br /&gt;

&lt;br /&gt;
(1) The eval statement clears $@
&lt;br /&gt;
(2) Argments are passed by reference
&lt;br /&gt;
(3) $_[0] passed to f() contains a reference to $@. By clearing $@, $_[0] also gets cleared
&lt;br /&gt;
(4) By using &amp;quot;local $@&amp;quot;, the eval clears the &amp;quot;localized version&amp;quot; of $@ instead of the caller's version.
&lt;br /&gt;

&lt;br /&gt;
&lt;/span&gt;&lt;table width=&quot;90%&quot; cellspacing=&quot;1&quot; cellpadding=&quot;3&quot; border=&quot;0&quot; align=&quot;center&quot;&gt;&lt;tr&gt; 	  &lt;td&gt;&lt;span class=&quot;genmed&quot;&gt;&lt;b&gt;Quote:&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;	&lt;/tr&gt;	&lt;tr&gt;	  &lt;td class=&quot;quote&quot;&gt;You're asking for trouble if you pass $@ to a function. $@ is a potential output for every subroutine, so don't make it an input because it's likely to be overwritten when you least expect.&lt;/td&gt;	&lt;/tr&gt;&lt;/table&gt;&lt;span class=&quot;postbody&quot;&gt;
&lt;br /&gt;

&lt;br /&gt;
Nevertheless, well-behaved functions must use &amp;quot;local $global&amp;quot; before they overwrite $global (think $_ with foreach).
&lt;br /&gt;

&lt;br /&gt;
For $@, this includes using &amp;quot;eval&amp;quot; either directly or indirectly. It also includes the creation of an Error object which sets $@ as a side effect. 
&lt;br /&gt;

&lt;br /&gt;
Using &amp;quot;local $@&amp;quot; before invoking eval {} makes things challenging if you want to be able to throw exceptions back to the caller while leaving $@ the way you found it in non-exceptional cases. Here's how to do it.
&lt;br /&gt;

&lt;br /&gt;
&lt;/span&gt;&lt;table width=&quot;90%&quot; cellspacing=&quot;1&quot; cellpadding=&quot;3&quot; border=&quot;0&quot; align=&quot;center&quot;&gt;&lt;tr&gt; 	  &lt;td&gt;&lt;span class=&quot;genmed&quot;&gt;&lt;b&gt;Code:&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;	&lt;/tr&gt;	&lt;tr&gt;	  &lt;td class=&quot;code&quot;&gt;sub foo &amp;#123;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; my $failed = 1;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; my $err;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; my $ret;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;#123;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; local $@;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; eval &amp;#123; $ret = sub_that_can_die&amp;#40;@_&amp;#41;; $failed = 0; &amp;#125;;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $err = $@;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;#125;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; die $err if $failed;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; $ret;
&lt;br /&gt;
&amp;#125;&lt;/td&gt;	&lt;/tr&gt;&lt;/table&gt;&lt;span class=&quot;postbody&quot;&gt;
&lt;/span&gt;&lt;br /&gt;
</description>
</item>
<item>
	<title>Perl :: Deduping Arrays</title>
	<link>http://devguy.com/bb/viewtopic.php?p=3758#3758</link>
	<description>Author: &lt;a href=&quot;http://devguy.com/bb/profile.php?mode=viewprofile&amp;u=2&quot; target=&quot;_blank&quot;&gt;devguy&lt;/a&gt;&lt;br /&gt;
Subject: Deduping Arrays&lt;br /&gt;
Posted: Thu Jan 07, 2010 7:21 pm (GMT 0)&lt;br /&gt;
Topic Replies: 0&lt;br /&gt;&lt;br /&gt;
&lt;span class="postbody"&gt;Let's remove duplicate entries from the array @files
&lt;br /&gt;

&lt;br /&gt;
&lt;/span&gt;&lt;table width=&quot;90%&quot; cellspacing=&quot;1&quot; cellpadding=&quot;3&quot; border=&quot;0&quot; align=&quot;center&quot;&gt;&lt;tr&gt; 	  &lt;td&gt;&lt;span class=&quot;genmed&quot;&gt;&lt;b&gt;Code:&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;	&lt;/tr&gt;	&lt;tr&gt;	  &lt;td class=&quot;code&quot;&gt;my %fn;
&lt;br /&gt;
map &amp;#123;$fn&amp;#123;$_&amp;#125; = 1&amp;#125; @files;
&lt;br /&gt;
@files = keys %fn;&lt;/td&gt;	&lt;/tr&gt;&lt;/table&gt;&lt;span class=&quot;postbody&quot;&gt;
&lt;/span&gt;&lt;br /&gt;
</description>
</item>
<item>
	<title>Perl :: Package-scoped variables and shutdown</title>
	<link>http://devguy.com/bb/viewtopic.php?p=3757#3757</link>
	<description>Author: &lt;a href=&quot;http://devguy.com/bb/profile.php?mode=viewprofile&amp;u=2&quot; target=&quot;_blank&quot;&gt;devguy&lt;/a&gt;&lt;br /&gt;
Subject: Package-scoped variables and shutdown&lt;br /&gt;
Posted: Mon Jan 04, 2010 10:49 am (GMT 0)&lt;br /&gt;
Topic Replies: 0&lt;br /&gt;&lt;br /&gt;
&lt;span class="postbody"&gt;Package-scoped variables are unstable as the process shuts down. Application developers have almost no control over the order in which package-scoped variables are garbage-collected.
&lt;br /&gt;

&lt;br /&gt;
Any destructor (as well as the functions called by it) which refers to a package-scoped variable is likely to fail. This unfortunately includes all of Log4Perl's loggers. Using a Log4Perl logger in a destructor is destined to fail if the object can live until the application is shut down. Use Smart::Comments to log object destruction.
&lt;/span&gt;&lt;br /&gt;
</description>
</item>
<item>
	<title>Perl :: Minimal POE alarm example</title>
	<link>http://devguy.com/bb/viewtopic.php?p=3756#3756</link>
	<description>Author: &lt;a href=&quot;http://devguy.com/bb/profile.php?mode=viewprofile&amp;u=2&quot; target=&quot;_blank&quot;&gt;devguy&lt;/a&gt;&lt;br /&gt;
Subject: Minimal POE alarm example&lt;br /&gt;
Posted: Mon Jan 04, 2010 9:04 am (GMT 0)&lt;br /&gt;
Topic Replies: 0&lt;br /&gt;&lt;br /&gt;
&lt;span class="postbody"&gt;&lt;/span&gt;&lt;table width=&quot;90%&quot; cellspacing=&quot;1&quot; cellpadding=&quot;3&quot; border=&quot;0&quot; align=&quot;center&quot;&gt;&lt;tr&gt; 	  &lt;td&gt;&lt;span class=&quot;genmed&quot;&gt;&lt;b&gt;Code:&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;	&lt;/tr&gt;	&lt;tr&gt;	  &lt;td class=&quot;code&quot;&gt;sub POE&amp;#58;&amp;#58;Kernel&amp;#58;&amp;#58;TRACE_REFCNT &amp;#40;&amp;#41; &amp;#123; 1 &amp;#125;
&lt;br /&gt;
use POE;
&lt;br /&gt;
use Smart&amp;#58;&amp;#58;Comments;
&lt;br /&gt;

&lt;br /&gt;
my $stopped;
&lt;br /&gt;

&lt;br /&gt;
sub start &amp;#123;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; my $self = shift;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; POE&amp;#58;&amp;#58;Session-&amp;gt;create&amp;#40;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; object_states =&amp;gt; &amp;#91;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $self =&amp;gt; &amp;#123; '_start'&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;=&amp;gt; &amp;quot;process_begin&amp;quot; &amp;#125;,
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $self =&amp;gt; &amp;#123; 'check_stop'&amp;nbsp; &amp;nbsp; &amp;nbsp;=&amp;gt; &amp;quot;process_check_stop&amp;quot; &amp;#125;,
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;#93;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;#41;;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; return;
&lt;br /&gt;
&amp;#125;
&lt;br /&gt;

&lt;br /&gt;
sub stop &amp;#123;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $stopped = 1;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; POE&amp;#58;&amp;#58;Kernel-&amp;gt;alarm&amp;#40; 'check_stop'&amp;nbsp; &amp;nbsp; &amp;nbsp;=&amp;gt; undef &amp;#41;;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;#125;
&lt;br /&gt;

&lt;br /&gt;
sub process_begin &amp;#123;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $_&amp;#91;KERNEL&amp;#93;-&amp;gt;yield&amp;#40;'check_stop'&amp;#41;;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;#125;
&lt;br /&gt;

&lt;br /&gt;
sub process_check_stop &amp;#123;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ### check_stop
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; unless &amp;#40; $stopped &amp;#41; &amp;#123;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $_&amp;#91;KERNEL&amp;#93;-&amp;gt;alarm&amp;#40; 'check_stop' =&amp;gt; time+5&amp;#41;;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;#125;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;#125;
&lt;br /&gt;

&lt;br /&gt;
my $obj = bless &amp;#123;&amp;#125;;
&lt;br /&gt;
$obj-&amp;gt;start&amp;#40;&amp;#41;;
&lt;br /&gt;

&lt;br /&gt;
POE&amp;#58;&amp;#58;Kernel-&amp;gt;run&amp;#40;&amp;#41;;
&lt;br /&gt;
&lt;/td&gt;	&lt;/tr&gt;&lt;/table&gt;&lt;span class=&quot;postbody&quot;&gt;
&lt;/span&gt;&lt;br /&gt;
</description>
</item>
<item>
	<title>Linux and BSD :: Virtual KVM with Synergy</title>
	<link>http://devguy.com/bb/viewtopic.php?p=3755#3755</link>
	<description>Author: &lt;a href=&quot;http://devguy.com/bb/profile.php?mode=viewprofile&amp;u=2&quot; target=&quot;_blank&quot;&gt;devguy&lt;/a&gt;&lt;br /&gt;
Subject: Virtual KVM with Synergy&lt;br /&gt;
Posted: Sun Jan 03, 2010 5:58 pm (GMT 0)&lt;br /&gt;
Topic Replies: 0&lt;br /&gt;&lt;br /&gt;
&lt;span class="postbody"&gt;If you have two computers with monitors side by side, you can control both with the same mouse &amp;amp; keyboard using synergy. It even works across Windows and Linux machines.
&lt;br /&gt;

&lt;br /&gt;
&lt;a href=&quot;http://synergy2.sourceforge.net/&quot; target=&quot;_blank&quot;&gt;http://synergy2.sourceforge.net/&lt;/a&gt;
&lt;/span&gt;&lt;br /&gt;
</description>
</item>
<item>
	<title>Perl :: Callbacks using closures</title>
	<link>http://devguy.com/bb/viewtopic.php?p=3754#3754</link>
	<description>Author: &lt;a href=&quot;http://devguy.com/bb/profile.php?mode=viewprofile&amp;u=2&quot; target=&quot;_blank&quot;&gt;devguy&lt;/a&gt;&lt;br /&gt;
Subject: Callbacks using closures&lt;br /&gt;
Posted: Sat Jan 02, 2010 12:44 am (GMT 0)&lt;br /&gt;
Topic Replies: 0&lt;br /&gt;&lt;br /&gt;
&lt;span class="postbody"&gt;Happy New Year!
&lt;br /&gt;

&lt;br /&gt;
Callback mechanisms should allow the user/caller to ...
&lt;br /&gt;

&lt;br /&gt;
(1) Implement callbacks as methods or as regular subroutines
&lt;br /&gt;

&lt;br /&gt;
(2) Specify their own function and method names that will be invoked by the callback
&lt;br /&gt;

&lt;br /&gt;
Closures in Perl are the best way to achieve this objective.
&lt;br /&gt;

&lt;br /&gt;
Let's look at a small example where the function foo() invokes a callback. The callback is the method 'bar' on a specific instance ($y). foo() is able to pass arguments to bar().
&lt;br /&gt;

&lt;br /&gt;
The following program outputs an array containing 1 and 2. 
&lt;br /&gt;

&lt;br /&gt;
The nonobvious detail here is that the user must provide a closure that passes @_ to bar(), which is not the @_ at the time of the closure creation but is instead the @_ at the time the closure is invoked.
&lt;br /&gt;

&lt;br /&gt;
&lt;/span&gt;&lt;table width=&quot;90%&quot; cellspacing=&quot;1&quot; cellpadding=&quot;3&quot; border=&quot;0&quot; align=&quot;center&quot;&gt;&lt;tr&gt; 	  &lt;td&gt;&lt;span class=&quot;genmed&quot;&gt;&lt;b&gt;Code:&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;	&lt;/tr&gt;	&lt;tr&gt;	  &lt;td class=&quot;code&quot;&gt;use Smart&amp;#58;&amp;#58;Comments;
&lt;br /&gt;

&lt;br /&gt;
sub bar &amp;#123;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; ### @_
&lt;br /&gt;
&amp;#125;
&lt;br /&gt;

&lt;br /&gt;
sub foo &amp;#123;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; my $cb = $_&amp;#91;0&amp;#93;;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;amp;$cb&amp;#40;1,2&amp;#41;;
&lt;br /&gt;
&amp;#125;
&lt;br /&gt;

&lt;br /&gt;
my $y = bless &amp;#123;&amp;#125;;
&lt;br /&gt;
foo&amp;#40; sub &amp;#123;$y-&amp;gt;bar&amp;#40;@_&amp;#41;&amp;#125; &amp;#41;;&lt;/td&gt;	&lt;/tr&gt;&lt;/table&gt;&lt;span class=&quot;postbody&quot;&gt;
&lt;/span&gt;&lt;br /&gt;
</description>
</item>
<item>
	<title>Perl :: Interesting use of Devel::Symdump</title>
	<link>http://devguy.com/bb/viewtopic.php?p=3753#3753</link>
	<description>Author: &lt;a href=&quot;http://devguy.com/bb/profile.php?mode=viewprofile&amp;u=2&quot; target=&quot;_blank&quot;&gt;devguy&lt;/a&gt;&lt;br /&gt;
Subject: Interesting use of Devel::Symdump&lt;br /&gt;
Posted: Tue Dec 29, 2009 3:12 am (GMT 0)&lt;br /&gt;
Topic Replies: 0&lt;br /&gt;&lt;br /&gt;
&lt;span class="postbody"&gt;&lt;a href=&quot;http://cpansearch.perl.org/src/MCAST/Test-Unit-0.25/lib/Test/Unit/Procedural.pm&quot; target=&quot;_blank&quot;&gt;http://cpansearch.perl.org/src/MCAST/Test-Unit-0.25/lib/Test/Unit/Procedural.pm&lt;/a&gt;
&lt;/span&gt;&lt;br /&gt;
</description>
</item>
<item>
	<title>Perl :: Send trap using Net::SNMP</title>
	<link>http://devguy.com/bb/viewtopic.php?p=3752#3752</link>
	<description>Author: &lt;a href=&quot;http://devguy.com/bb/profile.php?mode=viewprofile&amp;u=2&quot; target=&quot;_blank&quot;&gt;devguy&lt;/a&gt;&lt;br /&gt;
Subject: Send trap using Net::SNMP&lt;br /&gt;
Posted: Thu Dec 24, 2009 9:02 pm (GMT 0)&lt;br /&gt;
Topic Replies: 0&lt;br /&gt;&lt;br /&gt;
&lt;span class="postbody"&gt;(1)
&lt;br /&gt;

&lt;br /&gt;
/etc/snmp/snmptrapd.conf:
&lt;br /&gt;
&lt;/span&gt;&lt;table width=&quot;90%&quot; cellspacing=&quot;1&quot; cellpadding=&quot;3&quot; border=&quot;0&quot; align=&quot;center&quot;&gt;&lt;tr&gt; 	  &lt;td&gt;&lt;span class=&quot;genmed&quot;&gt;&lt;b&gt;Code:&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;	&lt;/tr&gt;	&lt;tr&gt;	  &lt;td class=&quot;code&quot;&gt;ignoreauthfailure&amp;nbsp; 1
&lt;br /&gt;
disableAuthorization yes
&lt;br /&gt;
logoption f /home/yourname/trap.log
&lt;br /&gt;
&lt;/td&gt;	&lt;/tr&gt;&lt;/table&gt;&lt;span class=&quot;postbody&quot;&gt;
&lt;br /&gt;

&lt;br /&gt;
As root, run: snmptrapd
&lt;br /&gt;

&lt;br /&gt;
Perl script&amp;#058;
&lt;br /&gt;
&lt;/span&gt;&lt;table width=&quot;90%&quot; cellspacing=&quot;1&quot; cellpadding=&quot;3&quot; border=&quot;0&quot; align=&quot;center&quot;&gt;&lt;tr&gt; 	  &lt;td&gt;&lt;span class=&quot;genmed&quot;&gt;&lt;b&gt;Code:&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;	&lt;/tr&gt;	&lt;tr&gt;	  &lt;td class=&quot;code&quot;&gt;use Net&amp;#58;&amp;#58;SNMP;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&lt;br /&gt;
$hostname = '127.0.0.1';
&lt;br /&gt;
$port = '162';&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; # default port for trapd
&lt;br /&gt;
$nonblocking = &amp;quot;0&amp;quot;;
&lt;br /&gt;
$version = '1';
&lt;br /&gt;
$seconds = &amp;quot;30&amp;quot;;
&lt;br /&gt;
$retries = &amp;quot;3&amp;quot;;
&lt;br /&gt;
$community = &amp;quot;fubar&amp;quot;;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&lt;br /&gt;
# $debug bitmask options
&lt;br /&gt;
# 0x02 - Message or PDU encoding and decoding
&lt;br /&gt;
# 0x04 - Transport Layer
&lt;br /&gt;
# 0x08 - Dispatcher
&lt;br /&gt;
# 0x10 - Message Processing
&lt;br /&gt;
# 0x20 - Security
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br /&gt;
#$debug = &amp;quot;0x00&amp;quot;;
&lt;br /&gt;
$debug = &amp;quot;0x3F&amp;quot;;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br /&gt;
&amp;#40;$session, $error&amp;#41; = Net&amp;#58;&amp;#58;SNMP-&amp;gt;session&amp;#40;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; -hostname&amp;nbsp; &amp;nbsp; &amp;nbsp; =&amp;gt; $hostname,
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; -port&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; =&amp;gt; $port,
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; -nonblocking&amp;nbsp; &amp;nbsp;=&amp;gt; $nonblocking,
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; -version&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;=&amp;gt; $version,
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; -timeout&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;=&amp;gt; $seconds,
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; -retries&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;=&amp;gt; $retries,
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; -debug&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;=&amp;gt; $debug,
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; -community&amp;nbsp; &amp;nbsp; &amp;nbsp;=&amp;gt; $community,
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;#41;;
&lt;br /&gt;
unless &amp;#40; $session &amp;#41; &amp;#123; print &amp;quot;Error&amp;#58; $error\n&amp;quot;; exit 1; &amp;#125;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br /&gt;
print &amp;quot;sending trap.....&amp;quot;;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br /&gt;
$oid = '1.3.6.1.6.3.1.1.4.1.0';
&lt;br /&gt;

&lt;br /&gt;
my @oid_value;
&lt;br /&gt;

&lt;br /&gt;
push @oid_value, &amp;#40; '1.3.6.1.2.1.1.1.0', OCTET_STRING, &amp;quot;Error occurred&amp;quot; &amp;#41;;&amp;nbsp; &amp;nbsp; # SNMPv2-MIB&amp;#58;&amp;#58;sysDescr.0
&lt;br /&gt;
push @oid_value, &amp;#40; '1.3.6.1.2.1.1.3.0', TIMETICKS, 10*100 &amp;#41;;&amp;nbsp; &amp;nbsp; # SNMPv2-MIB&amp;#58;&amp;#58;sysUpTime.0 
&lt;br /&gt;
push @oid_value, &amp;#40; '1.3.6.1.2.1.1.4.0',&amp;nbsp; OCTET_STRING, 'test@test.com'&amp;#41;; # SNMPv2-MIB&amp;#58;&amp;#58;sysContact.0
&lt;br /&gt;
push @oid_value, &amp;#40; '1.3.6.1.6.3.1.1.4.1.0', OBJECT_IDENTIFIER, $oid&amp;#41;; # SNMPv2-MIB&amp;#58;&amp;#58;snmpTrapOID.0
&lt;br /&gt;
# my enterprise specific oid
&lt;br /&gt;
push @oid_value, &amp;#40; '1.3.6.1.4.1.29484.1.2.1', INTEGER, 100&amp;#41;;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; # SNMPv2-SMI&amp;#58;&amp;#58;enterprises.28560.1.2.1
&lt;br /&gt;

&lt;br /&gt;
$result = $session-&amp;gt;trap&amp;#40;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;-enterprise&amp;nbsp; &amp;nbsp; &amp;nbsp; =&amp;gt; &amp;quot;1.3.6.1.4.1.29484&amp;quot;,
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;-agentaddr&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;=&amp;gt; &amp;quot;127.0.0.1&amp;quot;,
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;-generictrap&amp;nbsp; &amp;nbsp; &amp;nbsp;=&amp;gt; 6,
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;-specifictrap&amp;nbsp; &amp;nbsp; =&amp;gt; 0,
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;-timestamp&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;=&amp;gt; 5*100,
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;-varbindlist&amp;nbsp; &amp;nbsp; &amp;nbsp; =&amp;gt; \@oid_value&amp;#41;;
&lt;br /&gt;

&lt;br /&gt;
unless &amp;#40; $result &amp;#41; &amp;#123; print &amp;quot;error&amp;#58; $session-&amp;gt;error&amp;quot; &amp;#125;
&lt;br /&gt;
$session-&amp;gt;close;&lt;/td&gt;	&lt;/tr&gt;&lt;/table&gt;&lt;span class=&quot;postbody&quot;&gt;
&lt;br /&gt;

&lt;br /&gt;
cat /home/yourname/trap.log
&lt;br /&gt;

&lt;br /&gt;
&lt;/span&gt;&lt;table width=&quot;90%&quot; cellspacing=&quot;1&quot; cellpadding=&quot;3&quot; border=&quot;0&quot; align=&quot;center&quot;&gt;&lt;tr&gt; 	  &lt;td&gt;&lt;span class=&quot;genmed&quot;&gt;&lt;b&gt;Code:&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;	&lt;/tr&gt;	&lt;tr&gt;	  &lt;td class=&quot;code&quot;&gt;127.0.0.1&amp;#58; Enterprise Specific Trap &amp;#40;.0&amp;#41; Uptime&amp;#58; 0&amp;#58;00&amp;#58;05.00, SNMPv2-MIB&amp;#58;&amp;#58;sysDescr.0 = STRING&amp;#58; Error occurred, DISMAN-EVENT-MIB&amp;#58;&amp;#58;sysUpTimeInstance = Timeticks&amp;#58; &amp;#40;1000&amp;#41; 0&amp;#58;00&amp;#58;10.00, SNMPv2-MIB&amp;#58;&amp;#58;sysContact.0 = STRING&amp;#58; &lt;a href=&quot;mailto:test@test.com&quot;&gt;test@test.com&lt;/a&gt;, SNMPv2-MIB&amp;#58;&amp;#58;snmpTrapOID.0 = OID&amp;#58; SNMPv2-MIB&amp;#58;&amp;#58;snmpTrapOID.0, SNMPv2-SMI&amp;#58;&amp;#58;enterprises.29484.1.2.1 = INTEGER&amp;#58; 100&lt;/td&gt;	&lt;/tr&gt;&lt;/table&gt;&lt;span class=&quot;postbody&quot;&gt;
&lt;/span&gt;&lt;br /&gt;
</description>
</item>
<item>
	<title>Professional :: Trying viplugin for Eclipse</title>
	<link>http://devguy.com/bb/viewtopic.php?p=3751#3751</link>
	<description>Author: &lt;a href=&quot;http://devguy.com/bb/profile.php?mode=viewprofile&amp;u=2&quot; target=&quot;_blank&quot;&gt;devguy&lt;/a&gt;&lt;br /&gt;
Subject: Trying viplugin for Eclipse&lt;br /&gt;
Posted: Sun Dec 20, 2009 8:44 pm (GMT 0)&lt;br /&gt;
Topic Replies: 0&lt;br /&gt;&lt;br /&gt;
&lt;span class="postbody"&gt;Is viplugin for Eclipse better than the free gvim? I decided to try.
&lt;br /&gt;

&lt;br /&gt;
I enjoyed using viplugin but the following two problems are annoying. They are Eclipse shortcomings. gvim is still better.
&lt;br /&gt;

&lt;br /&gt;
1. Control-w isn't supported for split view. Eclipse has a work-around for split view - basically, there is no split view but you can open multiple windows and tab between them. This debate has been going since at least 2002. 
&lt;br /&gt;

&lt;br /&gt;
2. When the cursor is over a bracket or paren, there is no visual indication to quickly find its match.
&lt;/span&gt;&lt;br /&gt;
</description>
</item>
<item>
	<title>Perl :: Numbered and bulleted lists in POD</title>
	<link>http://devguy.com/bb/viewtopic.php?p=3750#3750</link>
	<description>Author: &lt;a href=&quot;http://devguy.com/bb/profile.php?mode=viewprofile&amp;u=2&quot; target=&quot;_blank&quot;&gt;devguy&lt;/a&gt;&lt;br /&gt;
Subject: Numbered and bulleted lists in POD&lt;br /&gt;
Posted: Wed Dec 09, 2009 4:05 pm (GMT 0)&lt;br /&gt;
Topic Replies: 0&lt;br /&gt;&lt;br /&gt;
&lt;span class="postbody"&gt;&lt;/span&gt;&lt;table width=&quot;90%&quot; cellspacing=&quot;1&quot; cellpadding=&quot;3&quot; border=&quot;0&quot; align=&quot;center&quot;&gt;&lt;tr&gt; 	  &lt;td&gt;&lt;span class=&quot;genmed&quot;&gt;&lt;b&gt;Code:&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;	&lt;/tr&gt;	&lt;tr&gt;	  &lt;td class=&quot;code&quot;&gt;=head1 Bulleted list
&lt;br /&gt;

&lt;br /&gt;
=over 4
&lt;br /&gt;

&lt;br /&gt;
=item * I&amp;lt;Development&amp;gt;
&lt;br /&gt;

&lt;br /&gt;
A new version of the harness is being developed and tested locally on a developer’s machine
&lt;br /&gt;

&lt;br /&gt;
=item * I&amp;lt;Staging&amp;gt;
&lt;br /&gt;

&lt;br /&gt;
A new version of the harness is being tested on an integration server
&lt;br /&gt;

&lt;br /&gt;
=item * I&amp;lt;Production&amp;gt;
&lt;br /&gt;

&lt;br /&gt;
The harness is running in production
&lt;br /&gt;

&lt;br /&gt;
=item *I&amp;lt;Local End-User&amp;gt;
&lt;br /&gt;

&lt;br /&gt;
The harness has been downloaded by, say, a database developer and everything is running on his or her laptop
&lt;br /&gt;

&lt;br /&gt;
=back
&lt;br /&gt;

&lt;br /&gt;
=head1 NUMBERED LIST
&lt;br /&gt;

&lt;br /&gt;
Note that the first =item has a number by itself and the others don't
&lt;br /&gt;

&lt;br /&gt;
=over 4
&lt;br /&gt;

&lt;br /&gt;
=item 1 
&lt;br /&gt;

&lt;br /&gt;
A base directory + filename is provided &amp;#40;e.g., config/harness.ini&amp;#41;
&lt;br /&gt;

&lt;br /&gt;
=item 2
&lt;br /&gt;

&lt;br /&gt;
The deployment type is inserted into the path e.g., config/production/harness.ini
&lt;br /&gt;

&lt;br /&gt;
=item 3
&lt;br /&gt;

&lt;br /&gt;
If P2 exists, it is used. Otherwise, P1 is used.
&lt;br /&gt;

&lt;br /&gt;
=back&lt;/td&gt;	&lt;/tr&gt;&lt;/table&gt;&lt;span class=&quot;postbody&quot;&gt;
&lt;/span&gt;&lt;br /&gt;
</description>
</item>
<item>
	<title>Windows :: Run shell in background on Windows gvim</title>
	<link>http://devguy.com/bb/viewtopic.php?p=3749#3749</link>
	<description>Author: &lt;a href=&quot;http://devguy.com/bb/profile.php?mode=viewprofile&amp;u=2&quot; target=&quot;_blank&quot;&gt;devguy&lt;/a&gt;&lt;br /&gt;
Subject: Run shell in background on Windows gvim&lt;br /&gt;
Posted: Wed Dec 09, 2009 3:51 pm (GMT 0)&lt;br /&gt;
Topic Replies: 0&lt;br /&gt;&lt;br /&gt;
&lt;span class="postbody"&gt;Create a batch file with the following contents. I name it scmd.bat. Put the file in your vim/vim72 dircectory.
&lt;br /&gt;

&lt;br /&gt;
&lt;/span&gt;&lt;table width=&quot;90%&quot; cellspacing=&quot;1&quot; cellpadding=&quot;3&quot; border=&quot;0&quot; align=&quot;center&quot;&gt;&lt;tr&gt; 	  &lt;td&gt;&lt;span class=&quot;genmed&quot;&gt;&lt;b&gt;Code:&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;	&lt;/tr&gt;	&lt;tr&gt;	  &lt;td class=&quot;code&quot;&gt;cmd /c &amp;quot;start cmd&amp;amp;taskkill /f /im vimrun.exe&amp;amp;exit&amp;quot;&lt;/td&gt;	&lt;/tr&gt;&lt;/table&gt;&lt;span class=&quot;postbody&quot;&gt;
&lt;br /&gt;

&lt;br /&gt;
Then run it with :!scmd
&lt;/span&gt;&lt;br /&gt;
</description>
</item>
<item>
	<title>Perl :: Caller - execution context</title>
	<link>http://devguy.com/bb/viewtopic.php?p=3748#3748</link>
	<description>Author: &lt;a href=&quot;http://devguy.com/bb/profile.php?mode=viewprofile&amp;u=2&quot; target=&quot;_blank&quot;&gt;devguy&lt;/a&gt;&lt;br /&gt;
Subject: Caller - execution context&lt;br /&gt;
Posted: Sat Dec 05, 2009 4:20 am (GMT 0)&lt;br /&gt;
Topic Replies: 0&lt;br /&gt;&lt;br /&gt;
&lt;span class="postbody"&gt;&lt;a href=&quot;http://perldoc.perl.org/functions/caller.html&quot; target=&quot;_blank&quot;&gt;http://perldoc.perl.org/functions/caller.html&lt;/a&gt;
&lt;/span&gt;&lt;br /&gt;
</description>
</item>
<item>
	<title>Teradata :: Using Teradata with DbVisualizer</title>
	<link>http://devguy.com/bb/viewtopic.php?p=3747#3747</link>
	<description>Author: &lt;a href=&quot;http://devguy.com/bb/profile.php?mode=viewprofile&amp;u=2&quot; target=&quot;_blank&quot;&gt;devguy&lt;/a&gt;&lt;br /&gt;
Subject: Using Teradata with DbVisualizer&lt;br /&gt;
Posted: Tue Nov 10, 2009 5:50 pm (GMT 0)&lt;br /&gt;
Topic Replies: 0&lt;br /&gt;&lt;br /&gt;
&lt;span class="postbody"&gt;1. Install DbVisualizer
&lt;br /&gt;

&lt;br /&gt;
&lt;a href=&quot;http://www.dbvis.com/products/dbvis/download/&quot; target=&quot;_blank&quot;&gt;http://www.dbvis.com/products/dbvis/download/&lt;/a&gt;
&lt;br /&gt;

&lt;br /&gt;
2. Download Terata JDBC Driver
&lt;br /&gt;

&lt;br /&gt;
&lt;a href=&quot;http://www.teradata.com/DownloadCenter/Group48.aspx&quot; target=&quot;_blank&quot;&gt;http://www.teradata.com/DownloadCenter/Group48.aspx&lt;/a&gt;
&lt;br /&gt;

&lt;br /&gt;
3. Run DbVisualizer
&lt;br /&gt;

&lt;br /&gt;
4. Tools / Driver Manager ...
&lt;br /&gt;

&lt;br /&gt;
5. Driver / Create Driver ...
&lt;br /&gt;

&lt;br /&gt;
6. Fill out the dialog similiar to the following
&lt;br /&gt;

&lt;br /&gt;
&lt;img src=&quot;http://farm3.static.flickr.com/2758/4093366430_87872b6ff7_o.png&quot; border=&quot;0&quot; /&gt;
&lt;br /&gt;

&lt;br /&gt;
7. Troubleshooting
&lt;br /&gt;

&lt;br /&gt;
1) Did you add both Jars?
&lt;br /&gt;
2) Is there a colon after teradata in the URL?
&lt;/span&gt;&lt;br /&gt;
</description>
</item>
<item>
	<title>Teradata :: Teradata JDBC Driver URL</title>
	<link>http://devguy.com/bb/viewtopic.php?p=3746#3746</link>
	<description>Author: &lt;a href=&quot;http://devguy.com/bb/profile.php?mode=viewprofile&amp;u=2&quot; target=&quot;_blank&quot;&gt;devguy&lt;/a&gt;&lt;br /&gt;
Subject: Teradata JDBC Driver URL&lt;br /&gt;
Posted: Mon Nov 09, 2009 12:03 am (GMT 0)&lt;br /&gt;
Topic Replies: 0&lt;br /&gt;&lt;br /&gt;
&lt;span class="postbody"&gt;For use with DBVisualizer..
&lt;br /&gt;

&lt;br /&gt;
jdbc:teradata://ipaddress_or_server_name
&lt;/span&gt;&lt;br /&gt;
</description>
</item>
<item>
	<title>Teradata :: Installing Perl::DBi Connectivity for Teradata</title>
	<link>http://devguy.com/bb/viewtopic.php?p=3745#3745</link>
	<description>Author: &lt;a href=&quot;http://devguy.com/bb/profile.php?mode=viewprofile&amp;u=2&quot; target=&quot;_blank&quot;&gt;devguy&lt;/a&gt;&lt;br /&gt;
Subject: Installing Perl::DBi Connectivity for Teradata&lt;br /&gt;
Posted: Fri Nov 06, 2009 8:16 pm (GMT 0)&lt;br /&gt;
Topic Replies: 0&lt;br /&gt;&lt;br /&gt;
&lt;span class="postbody"&gt;Initial Author: Dazhi Wang
&lt;br /&gt;

&lt;br /&gt;
See also: &lt;a href=&quot;http://www.presicient.com/tdatdbd/&quot; target=&quot;_blank&quot;&gt;http://www.presicient.com/tdatdbd/&lt;/a&gt;
&lt;br /&gt;

&lt;br /&gt;
1. &lt;a href=&quot;http://www.teradata.com/DownloadCenter/Forum103-1.aspx&quot; target=&quot;_blank&quot; class=&quot;postlink&quot;&gt;Install TTU CLI&lt;/a&gt;
&lt;br /&gt;
* Versions 7.x and prior require installation of the Teradata WinCLI Developer's Kit
&lt;br /&gt;
* Therefore, install version 12 or higher
&lt;br /&gt;

&lt;br /&gt;
2. Run: perl -MCPAN -e &amp;quot;install DBI&amp;quot;
&lt;br /&gt;

&lt;br /&gt;
3. If using Windows and Visual Studio is not installed, run the &lt;a href=&quot;http://download.microsoft.com/download/vc15/Patch/1.52/W95/EN-US/Nmake15.exe&quot; target=&quot;_blank&quot; class=&quot;postlink&quot;&gt;nmake minimal install&lt;/a&gt;
&lt;br /&gt;

&lt;br /&gt;
4. Download &lt;a href=&quot;http://search.cpan.org/~grommel/Teradata-SQL-0.08/SQL.pm&quot; target=&quot;_blank&quot; class=&quot;postlink&quot;&gt;Teradata::SQL&lt;/a&gt; and unzip the package
&lt;br /&gt;

&lt;br /&gt;
5. If using Windows:
&lt;br /&gt;
* Edit Makefile.PL
&lt;br /&gt;
* Change the file path of coptypes.h from '/usr/include/coptypes.h' to 'C:\Program Files\Teradata\Teradata Client\cli\inc\coptypes.h'
&lt;br /&gt;

&lt;br /&gt;
6. If using Windows, open the&amp;amp;nbsp;VS2005 command prompt
&lt;br /&gt;

&lt;br /&gt;
7. Run: perl Makefile.PL
&lt;br /&gt;

&lt;br /&gt;
8. Change the generated Makefile file by add following libs to LDLOADLIBS
&lt;br /&gt;

&lt;br /&gt;
Windows:
&lt;br /&gt;

&lt;br /&gt;
&amp;quot;C:\Program Files\Teradata\Teradata Client\cli\lib\wincli32.lib&amp;quot;
&lt;br /&gt;
&amp;quot;C:\Program Files\Teradata\Teradata Client\cli\lib\tdusr32.lib&amp;quot;
&lt;br /&gt;

&lt;br /&gt;
Linux:
&lt;br /&gt;

&lt;br /&gt;
TBD
&lt;br /&gt;

&lt;br /&gt;
9. Run: nmake
&lt;br /&gt;

&lt;br /&gt;
10. Run: nmake install
&lt;br /&gt;

&lt;br /&gt;
11. Run The following script to test the installation:
&lt;br /&gt;
&lt;/span&gt;&lt;table width=&quot;90%&quot; cellspacing=&quot;1&quot; cellpadding=&quot;3&quot; border=&quot;0&quot; align=&quot;center&quot;&gt;&lt;tr&gt; 	  &lt;td&gt;&lt;span class=&quot;genmed&quot;&gt;&lt;b&gt;Code:&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;	&lt;/tr&gt;	&lt;tr&gt;	  &lt;td class=&quot;code&quot;&gt;
&lt;br /&gt;
sub dbc_info_checker &amp;#123;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; my &amp;#40; $db_ip &amp;#41; = @_;
&lt;br /&gt;

&lt;br /&gt;
&amp;nbsp; &amp;nbsp; # Connect and get a database handle.
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; my $dbh = Teradata&amp;#58;&amp;#58;SQL&amp;#58;&amp;#58;connect&amp;#40;&amp;quot;$db_ip/dbc,dbc&amp;quot;&amp;#41;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; or die &amp;quot;Could not connect&amp;quot;;
&lt;br /&gt;

&lt;br /&gt;
&amp;nbsp; &amp;nbsp; # Prepare a request; read the results.
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; my $rh = $dbh-&amp;gt;open&amp;#40;&amp;quot;select * from dbcinfo;&amp;quot;&amp;#41;;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; my @dbcinfo_rows;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; while &amp;#40; my @current_row = $rh-&amp;gt;fetchrow_list &amp;#41; &amp;#123;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; push @dbcinfo_rows, @current_row;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;#125;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; $rh-&amp;gt;close;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; $dbh-&amp;gt;disconnect;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; print &amp;quot;dbcinfo data&amp;#58; &amp;quot;,Dumper&amp;#40;\@dbcinfo_rows&amp;#41;;
&lt;br /&gt;

&lt;br /&gt;
&amp;nbsp; &amp;nbsp; return 0;
&lt;br /&gt;

&lt;br /&gt;
&amp;#125;
&lt;br /&gt;

&lt;br /&gt;
dbc_info_checker&amp;#40;'substitute_teradata_database_server_name_or_ip_address_here'&amp;#41;;
&lt;br /&gt;
&lt;/td&gt;	&lt;/tr&gt;&lt;/table&gt;&lt;span class=&quot;postbody&quot;&gt;
&lt;/span&gt;&lt;br /&gt;
</description>
</item>
<item>
	<title>Windows :: Keeping Remote Desktop Sessions Alive</title>
	<link>http://devguy.com/bb/viewtopic.php?p=3744#3744</link>
	<description>Author: &lt;a href=&quot;http://devguy.com/bb/profile.php?mode=viewprofile&amp;u=2&quot; target=&quot;_blank&quot;&gt;devguy&lt;/a&gt;&lt;br /&gt;
Subject: Keeping Remote Desktop Sessions Alive&lt;br /&gt;
Posted: Thu Nov 05, 2009 6:28 pm (GMT 0)&lt;br /&gt;
Topic Replies: 0&lt;br /&gt;&lt;br /&gt;
&lt;span class="postbody"&gt;1. Install the &lt;a href=&quot;http://www.autoitscript.com&quot; target=&quot;_blank&quot; class=&quot;postlink&quot;&gt;AutoIt script engine&lt;/a&gt; 
&lt;br /&gt;
2. Save the script located &lt;a href=&quot;http://www.autoitscript.com/forum/index.php?showtopic=38976&amp;amp;st=0&amp;amp;p=653547&amp;amp;#entry653547&quot; target=&quot;_blank&quot; class=&quot;postlink&quot;&gt;here&lt;/a&gt;, giving it a &amp;quot;.au3&amp;quot; extension
&lt;br /&gt;
3. Connect to the remote server using Remote Desktop
&lt;br /&gt;
4. Execute the .au3 script from the command line with the server name or IP address as the first parameter
&lt;br /&gt;
5. A dialog box will appear. You may click OK to dismiss it.
&lt;br /&gt;
6. Pause/Resume/Exit the script via the AutoIt tray icon
&lt;br /&gt;
7. Don't minimize the remote desktop window. If you do, this script won't work.
&lt;/span&gt;&lt;br /&gt;
</description>
</item>
<item>
	<title>Perl :: JDBC and Perl</title>
	<link>http://devguy.com/bb/viewtopic.php?p=3743#3743</link>
	<description>Author: &lt;a href=&quot;http://devguy.com/bb/profile.php?mode=viewprofile&amp;u=2&quot; target=&quot;_blank&quot;&gt;devguy&lt;/a&gt;&lt;br /&gt;
Subject: JDBC and Perl&lt;br /&gt;
Posted: Thu Oct 22, 2009 7:14 pm (GMT 0)&lt;br /&gt;
Topic Replies: 0&lt;br /&gt;&lt;br /&gt;
&lt;span class="postbody"&gt;Install Perl and JRE (java runtime).
&lt;br /&gt;

&lt;br /&gt;
Linux:
&lt;br /&gt;
&lt;/span&gt;&lt;table width=&quot;90%&quot; cellspacing=&quot;1&quot; cellpadding=&quot;3&quot; border=&quot;0&quot; align=&quot;center&quot;&gt;&lt;tr&gt; 	  &lt;td&gt;&lt;span class=&quot;genmed&quot;&gt;&lt;b&gt;Code:&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;	&lt;/tr&gt;	&lt;tr&gt;	  &lt;td class=&quot;code&quot;&gt;
&lt;br /&gt;
perl -MCPAN -e 'install DBI'
&lt;br /&gt;
perl -MCPAN -e 'force install Bundle&amp;#58;&amp;#58;DBD&amp;#58;&amp;#58;JDBC'
&lt;br /&gt;
&lt;/td&gt;	&lt;/tr&gt;&lt;/table&gt;&lt;span class=&quot;postbody&quot;&gt;
&lt;br /&gt;
On Windows:
&lt;br /&gt;
&lt;/span&gt;&lt;table width=&quot;90%&quot; cellspacing=&quot;1&quot; cellpadding=&quot;3&quot; border=&quot;0&quot; align=&quot;center&quot;&gt;&lt;tr&gt; 	  &lt;td&gt;&lt;span class=&quot;genmed&quot;&gt;&lt;b&gt;Code:&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;	&lt;/tr&gt;	&lt;tr&gt;	  &lt;td class=&quot;code&quot;&gt;
&lt;br /&gt;
You must be using Perl 5.8. 5.10 will not work.
&lt;br /&gt;
ppm install http&amp;#58;//trouchelle.com/ppm/DBD-JDBC.ppd
&lt;br /&gt;
&lt;/td&gt;	&lt;/tr&gt;&lt;/table&gt;&lt;span class=&quot;postbody&quot;&gt;
&lt;br /&gt;
Start the server using &lt;a href=&quot;http://search.cpan.org/~vizdom/DBD-JDBC/JDBC.pod&quot; target=&quot;_blank&quot;&gt;http://search.cpan.org/~vizdom/DBD-JDBC/JDBC.pod&lt;/a&gt;
&lt;/span&gt;&lt;br /&gt;
</description>
</item>
<item>
	<title>Any DBMS :: Schema and Data Migration Done Right</title>
	<link>http://devguy.com/bb/viewtopic.php?p=3742#3742</link>
	<description>Author: &lt;a href=&quot;http://devguy.com/bb/profile.php?mode=viewprofile&amp;u=2&quot; target=&quot;_blank&quot;&gt;devguy&lt;/a&gt;&lt;br /&gt;
Subject: Schema and Data Migration Done Right&lt;br /&gt;
Posted: Wed Oct 07, 2009 4:36 pm (GMT 0)&lt;br /&gt;
Topic Replies: 0&lt;br /&gt;&lt;br /&gt;
&lt;span class="postbody"&gt;Although many libraries in Ruby, Python, Java, Scala, etc. provide feature-rich 'automatic' schema and data migrations, none of them provide 100% coverage, unfortunately.
&lt;br /&gt;

&lt;br /&gt;
Let's investigate the worst issues with out-of-the-box solutions:
&lt;br /&gt;

&lt;br /&gt;
(1) Support for multiple DBMS vendors. Generic libraries typically generate SQL statements using vendor-neutral descriptions of the schema. These types of packages can not support every vendor-specific feature, such as constraint and stored procedure dialects. They even frequently choose the wrong datatypes, for example, when a specific precision needs to be provided.
&lt;br /&gt;
&lt;/span&gt;&lt;table width=&quot;90%&quot; cellspacing=&quot;1&quot; cellpadding=&quot;3&quot; border=&quot;0&quot; align=&quot;center&quot;&gt;&lt;tr&gt; 	  &lt;td&gt;&lt;span class=&quot;genmed&quot;&gt;&lt;b&gt;Quote:&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;	&lt;/tr&gt;	&lt;tr&gt;	  &lt;td class=&quot;quote&quot;&gt;Point #1: Exact vendor-specific SQL statements must be executed in the correct order&lt;/td&gt;	&lt;/tr&gt;&lt;/table&gt;&lt;span class=&quot;postbody&quot;&gt;
&lt;br /&gt;
(2) A complex migration can involve hundreds of SQL statements. What happens if one fails?
&lt;br /&gt;
(3) If a migration is executed against the same database twice by accident, data and schema will likely be altered incorrectly. Do mechanisms exist to prevent this?
&lt;br /&gt;
(4) Processes that execute outside the database (for example, in Java) generally perform badly against large tables. The main contributors are the large number of transactions that each operate on a small number of rows. Stored procedures are usually the best way to perform medium to high complexity tasks.
&lt;br /&gt;
&lt;/span&gt;&lt;table width=&quot;90%&quot; cellspacing=&quot;1&quot; cellpadding=&quot;3&quot; border=&quot;0&quot; align=&quot;center&quot;&gt;&lt;tr&gt; 	  &lt;td&gt;&lt;span class=&quot;genmed&quot;&gt;&lt;b&gt;Quote:&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;	&lt;/tr&gt;	&lt;tr&gt;	  &lt;td class=&quot;quote&quot;&gt;Point #2: The best migration implementation uses plain old SQL statements combined with stored procedures and functions&lt;/td&gt;	&lt;/tr&gt;&lt;/table&gt;&lt;span class=&quot;postbody&quot;&gt;
&lt;br /&gt;
What constitutes a complex transformation worthy of a stored procedure? Although set operations generally perform better, sometimes a task is too complex to perform in a single SQL statement. Stored procedures typically use cursors. For example: For each row in A, create some number of rows in B depending on how A's rows relate to C's rows.
&lt;br /&gt;
(5) Migrations often involve integration with external data sources. Therefore, migration libraries only solve part of the problem. 
&lt;br /&gt;

&lt;br /&gt;
Most importantly, any application that depends on to-be-migrated data must be shut down before the migration process begins. This bit of trapeze artistry is rarely designed for, resulting in a lot of Nagios etc. alerts until the wee hours of the morning. And worse.
&lt;br /&gt;

&lt;br /&gt;
Care must be taken to avoid blowing out transaction logs during the migration process. It is often necessary to disable logging (as can be done with, for example, mysql), assuming a backup is performed beforehand. Disabling the transaction log, however, doesn't work with many forms of replication. 
&lt;br /&gt;

&lt;br /&gt;
Speaking of replication, some RDBMSs such as mysql don't correctly replicate &amp;quot;truncate table&amp;quot; statements, so your migration process might need to avoid using them.
&lt;br /&gt;

&lt;br /&gt;
The whole migration process involves:
&lt;br /&gt;
-- Stopping systems gracefully, including replicas
&lt;br /&gt;
-- Making backups
&lt;br /&gt;
-- Altering DBMS configuration (e.g., disable transactions)
&lt;br /&gt;
-- Transforming the existing schema and the data within it
&lt;br /&gt;
-- Loading data from external systems
&lt;br /&gt;
-- Bringing systems online, including replicas, with the correct configurations
&lt;br /&gt;

&lt;br /&gt;
With the following additional requirements:
&lt;br /&gt;
-- Do not allow the system to start before the migration is complete
&lt;br /&gt;
-- Avoid double-migrating the same database
&lt;br /&gt;
-- When a failure occurs, notify operators and wait
&lt;br /&gt;
-- Restart the process from the last point of failure
&lt;br /&gt;

&lt;br /&gt;
A robust schema and data migration implementation follows these guidelines:
&lt;br /&gt;

&lt;br /&gt;
(1) Use ALTER where possible to add and remove columns and constraints to/from existing tables
&lt;br /&gt;

&lt;br /&gt;
(2) Because many types of table alterations can not be performed using ALTER (this is vendor-specific), many table transformations require the following template:
&lt;br /&gt;
&lt;/span&gt;&lt;table width=&quot;90%&quot; cellspacing=&quot;1&quot; cellpadding=&quot;3&quot; border=&quot;0&quot; align=&quot;center&quot;&gt;&lt;tr&gt; 	  &lt;td&gt;&lt;span class=&quot;genmed&quot;&gt;&lt;b&gt;Code:&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;	&lt;/tr&gt;	&lt;tr&gt;	  &lt;td class=&quot;code&quot;&gt;create table foo_temp as select * from foo;
&lt;br /&gt;
drop table foo;
&lt;br /&gt;
-- This can be problematic per relational constraints. mysql for example allows constraint checking to be temporarily disabled
&lt;br /&gt;
create table foo ..;
&lt;br /&gt;
insert into foo &amp;#40;select * from foo_temp&amp;#41;;&lt;/td&gt;	&lt;/tr&gt;&lt;/table&gt;&lt;span class=&quot;postbody&quot;&gt;
&lt;br /&gt;
(3) Drop tables, views, stored procedures, etc. that are no longer needed
&lt;br /&gt;
(4) Create new tables, views, stored procedures, etc.
&lt;br /&gt;
(5) Execute migration-specific SQL statements, stored procedures, and functions
&lt;br /&gt;
(6) Remove migration-specific stored procedures and functions
&lt;/span&gt;&lt;br /&gt;
</description>
</item>
<item>
	<title>Any DBMS :: Modeling Enums</title>
	<link>http://devguy.com/bb/viewtopic.php?p=3741#3741</link>
	<description>Author: &lt;a href=&quot;http://devguy.com/bb/profile.php?mode=viewprofile&amp;u=2&quot; target=&quot;_blank&quot;&gt;devguy&lt;/a&gt;&lt;br /&gt;
Subject: Modeling Enums&lt;br /&gt;
Posted: Wed Oct 07, 2009 4:24 pm (GMT 0)&lt;br /&gt;
Topic Replies: 0&lt;br /&gt;&lt;br /&gt;
&lt;span class="postbody"&gt;An &amp;quot;enum&amp;quot; is a variable that can have at most one value from a list of values. Enums can be modeled in RDBMS in two main ways:
&lt;br /&gt;

&lt;br /&gt;
(1) A table of values 
&lt;br /&gt;
**Con: Join overhead (however, table would fit completely in cache)
&lt;br /&gt;
**Pro: Repetitive values compress to 4-byte integer
&lt;br /&gt;
**Pro: Easy to add values on the fly
&lt;br /&gt;
**Pro: Can associate other information with the value
&lt;br /&gt;
**Pro: Reusable across multiple tables
&lt;br /&gt;

&lt;br /&gt;
(2) A varchar with a value constraint plus ‘compression’ to avoid storing the same string over and over again
&lt;br /&gt;
**Can use UDT to reuse across tables ?
&lt;br /&gt;
**Pro: No join overhead
&lt;br /&gt;
**Con: Requires DDL modification to add a value
&lt;br /&gt;
**Con: Retrieving complete list of values requires parsing DDL (but I18N issues are problematic in either case)
&lt;br /&gt;
**Con: Database specific although most popular RDBMSs have value constraints
&lt;/span&gt;&lt;br /&gt;
</description>
</item>
<item>
	<title>Any DBMS :: Migrate your database schemas and data with Scala Migrations</title>
	<link>http://devguy.com/bb/viewtopic.php?p=3740#3740</link>
	<description>Author: &lt;a href=&quot;http://devguy.com/bb/profile.php?mode=viewprofile&amp;u=2&quot; target=&quot;_blank&quot;&gt;devguy&lt;/a&gt;&lt;br /&gt;
Subject: Migrate your database schemas and data with Scala Migrations&lt;br /&gt;
Posted: Tue Sep 08, 2009 4:59 pm (GMT 0)&lt;br /&gt;
Topic Replies: 0&lt;br /&gt;&lt;br /&gt;
&lt;span class="postbody"&gt;&lt;a href=&quot;http://code.google.com/p/scala-migrations/&quot; target=&quot;_blank&quot;&gt;http://code.google.com/p/scala-migrations/&lt;/a&gt;
&lt;br /&gt;

&lt;br /&gt;
Scala Migrations is a library to manage upgrades and rollbacks to database schemas
&lt;/span&gt;&lt;br /&gt;
</description>
</item>
<item>
	<title>VMWare :: RE: Extending a primary VMWARE partition in Windows</title>
	<link>http://devguy.com/bb/viewtopic.php?p=3739#3739</link>
	<description>Author: &lt;a href=&quot;http://devguy.com/bb/profile.php?mode=viewprofile&amp;u=2&quot; target=&quot;_blank&quot;&gt;devguy&lt;/a&gt;&lt;br /&gt;
Subject: A few notes on the subject..&lt;br /&gt;
Posted: Sat Aug 08, 2009 6:26 pm (GMT 0)&lt;br /&gt;
Topic Replies: 1&lt;br /&gt;&lt;br /&gt;
&lt;span class="postbody"&gt;1. If you already have another VMWare instance, you only need to copy the .vmdk file for your primary disk - not all the other files. If you're feeling lucky, you can modify the file in-place without copying it. Copying the file is peace of mind since it can serve as a backup if anything goes wrong.
&lt;br /&gt;

&lt;br /&gt;
2. If the .vmdk file to be extended resides on an external (e.g., USB) drive and you have problems extending it, copy it to your local disk. Sometimes the issues are related to file permissions and sometimes they are related to amount of free disk space.
&lt;br /&gt;

&lt;br /&gt;
3. Add the new disk to the &amp;quot;other&amp;quot; VMWare instance as an IDE disk - usually IDE1 to be exact. That is, unless it's really a SCSI disk, which is rare.
&lt;br /&gt;

&lt;br /&gt;
4. When extending the disk, the -x option should specify the final disk size, not the additional space to allocate. The &amp;quot;invalid parameter&amp;quot; error usually indicates that the -x parameter specified a size that is smaller than the disk.
&lt;br /&gt;

&lt;br /&gt;
5. After running diskpart and shutting down, remove the primary disk from the &amp;quot;other&amp;quot; VMWare instance. Back up the 'old&amp;quot; .vmdk fille. Finally, replace the &amp;quot;old&amp;quot; .vmdk file with the &amp;quot;new&amp;quot; one.
&lt;/span&gt;&lt;br /&gt;
</description>
</item>
<item>
	<title>MySQL :: Processing cursors correctly</title>
	<link>http://devguy.com/bb/viewtopic.php?p=3738#3738</link>
	<description>Author: &lt;a href=&quot;http://devguy.com/bb/profile.php?mode=viewprofile&amp;u=2&quot; target=&quot;_blank&quot;&gt;devguy&lt;/a&gt;&lt;br /&gt;
Subject: Processing cursors correctly&lt;br /&gt;
Posted: Mon Aug 03, 2009 9:34 pm (GMT 0)&lt;br /&gt;
Topic Replies: 0&lt;br /&gt;&lt;br /&gt;
&lt;span class="postbody"&gt;&lt;/span&gt;&lt;table width=&quot;90%&quot; cellspacing=&quot;1&quot; cellpadding=&quot;3&quot; border=&quot;0&quot; align=&quot;center&quot;&gt;&lt;tr&gt; 	  &lt;td&gt;&lt;span class=&quot;genmed&quot;&gt;&lt;b&gt;Code:&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;	&lt;/tr&gt;	&lt;tr&gt;	  &lt;td class=&quot;code&quot;&gt;
&lt;br /&gt;
drop PROCEDURE if exists foo_p;
&lt;br /&gt;

&lt;br /&gt;
delimiter //
&lt;br /&gt;
CREATE PROCEDURE foo_p&amp;#40;
&lt;br /&gt;
&amp;#41;
&lt;br /&gt;
BEGIN
&lt;br /&gt;

&lt;br /&gt;
&amp;nbsp; DECLARE done INT;
&lt;br /&gt;
&amp;nbsp; DECLARE v_foo varchar&amp;#40;128&amp;#41;;
&lt;br /&gt;

&lt;br /&gt;
&amp;nbsp; DECLARE cur1 CURSOR FOR 
&lt;br /&gt;

&lt;br /&gt;
&amp;nbsp; SELECT foo FROM bar;
&lt;br /&gt;

&lt;br /&gt;
&amp;nbsp; DECLARE CONTINUE HANDLER FOR NOT FOUND SET done = 1;
&lt;br /&gt;

&lt;br /&gt;
&amp;nbsp; OPEN cur1;
&lt;br /&gt;

&lt;br /&gt;
&amp;nbsp; main&amp;#58; LOOP
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; set done = 0;
&lt;br /&gt;

&lt;br /&gt;
&amp;nbsp; &amp;nbsp; FETCH cur1 INTO v_foo;
&lt;br /&gt;

&lt;br /&gt;
&amp;nbsp; &amp;nbsp; IF done THEN leave main; end if;
&lt;br /&gt;

&lt;br /&gt;
&amp;nbsp; &amp;nbsp; /* Do Stuff Here */
&lt;br /&gt;

&lt;br /&gt;
&amp;nbsp; END LOOP;
&lt;br /&gt;

&lt;br /&gt;
&amp;nbsp; CLOSE cur1;
&lt;br /&gt;
END
&lt;br /&gt;
//
&lt;br /&gt;
&lt;/td&gt;	&lt;/tr&gt;&lt;/table&gt;&lt;span class=&quot;postbody&quot;&gt;
&lt;/span&gt;&lt;br /&gt;
</description>
</item>
<item>
	<title>Java :: RE: Use Wagon to create a SVN-backed Maven repository</title>
	<link>http://devguy.com/bb/viewtopic.php?p=3737#3737</link>
	<description>Author: &lt;a href=&quot;http://devguy.com/bb/profile.php?mode=viewprofile&amp;u=2&quot; target=&quot;_blank&quot;&gt;devguy&lt;/a&gt;&lt;br /&gt;

Posted: Wed Jul 29, 2009 6:34 pm (GMT 0)&lt;br /&gt;
Topic Replies: 1&lt;br /&gt;&lt;br /&gt;
&lt;span class="postbody"&gt;From master Java craftsman &lt;a href=&quot;http://dev.bostone.us&quot; target=&quot;_blank&quot; class=&quot;postlink&quot;&gt;Bo Stone&lt;/a&gt;
&lt;br /&gt;

&lt;br /&gt;
All you do is create a top-level SVN project and add this to your pom.xml
&lt;br /&gt;

&lt;br /&gt;
&lt;/span&gt;&lt;table width=&quot;90%&quot; cellspacing=&quot;1&quot; cellpadding=&quot;3&quot; border=&quot;0&quot; align=&quot;center&quot;&gt;&lt;tr&gt; 	  &lt;td&gt;&lt;span class=&quot;genmed&quot;&gt;&lt;b&gt;Code:&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;	&lt;/tr&gt;	&lt;tr&gt;	  &lt;td class=&quot;code&quot;&gt;&amp;lt;build&amp;gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; ...
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;lt;extensions&amp;gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;extension&amp;gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;groupId&amp;gt;org.jvnet.wagon-svn&amp;lt;/groupId&amp;gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;artifactId&amp;gt;wagon-svn&amp;lt;/artifactId&amp;gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;version&amp;gt;1.8&amp;lt;/version&amp;gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/extension&amp;gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;lt;/extensions&amp;gt;
&lt;br /&gt;
&amp;nbsp; &amp;lt;/build&amp;gt;
&lt;br /&gt;

&lt;br /&gt;
&amp;nbsp; &amp;lt;repositories&amp;gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; ...
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;lt;repository&amp;gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;id&amp;gt;maven2-repository.dev.java.net&amp;lt;/id&amp;gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;name&amp;gt;Java.net Repository for Maven&amp;lt;/name&amp;gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;url&amp;gt;http&amp;#58;//download.java.net/maven/2/&amp;lt;/url&amp;gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;lt;/repository&amp;gt;
&lt;br /&gt;
&amp;nbsp; &amp;lt;/repositories&amp;gt;&lt;/td&gt;	&lt;/tr&gt;&lt;/table&gt;&lt;span class=&quot;postbody&quot;&gt;
&lt;/span&gt;&lt;br /&gt;
</description>
</item>
<item>
	<title>Java :: Use Wagon to create a SVN-backed Maven repository</title>
	<link>http://devguy.com/bb/viewtopic.php?p=3736#3736</link>
	<description>Author: &lt;a href=&quot;http://devguy.com/bb/profile.php?mode=viewprofile&amp;u=2&quot; target=&quot;_blank&quot;&gt;devguy&lt;/a&gt;&lt;br /&gt;
Subject: Use Wagon to create a SVN-backed Maven repository&lt;br /&gt;
Posted: Wed Jul 29, 2009 6:32 pm (GMT 0)&lt;br /&gt;
Topic Replies: 1&lt;br /&gt;&lt;br /&gt;
&lt;span class="postbody"&gt;&lt;a href=&quot;https://wagon-svn.dev.java.net/&quot; target=&quot;_blank&quot;&gt;https://wagon-svn.dev.java.net/&lt;/a&gt;
&lt;/span&gt;&lt;br /&gt;
</description>
</item>
<item>
	<title>Windows :: Pause for number of seconds at Windows command line</title>
	<link>http://devguy.com/bb/viewtopic.php?p=3735#3735</link>
	<description>Author: &lt;a href=&quot;http://devguy.com/bb/profile.php?mode=viewprofile&amp;u=2&quot; target=&quot;_blank&quot;&gt;devguy&lt;/a&gt;&lt;br /&gt;
Subject: Pause for number of seconds at Windows command line&lt;br /&gt;
Posted: Wed Jul 29, 2009 1:34 am (GMT 0)&lt;br /&gt;
Topic Replies: 0&lt;br /&gt;&lt;br /&gt;
&lt;span class="postbody"&gt;Wait 5 seconds..
&lt;br /&gt;

&lt;br /&gt;
choice /T:5 /D N /N &amp;gt; Nul
&lt;/span&gt;&lt;br /&gt;
</description>
</item>
<item>
	<title>Java :: Enterprise Java Manifesto Point #1 - Data Access Objects</title>
	<link>http://devguy.com/bb/viewtopic.php?p=3734#3734</link>
	<description>Author: &lt;a href=&quot;http://devguy.com/bb/profile.php?mode=viewprofile&amp;u=2&quot; target=&quot;_blank&quot;&gt;devguy&lt;/a&gt;&lt;br /&gt;
Subject: Enterprise Java Manifesto Point #1 - Data Access Objects&lt;br /&gt;
Posted: Thu Jul 23, 2009 4:39 pm (GMT 0)&lt;br /&gt;
Topic Replies: 0&lt;br /&gt;&lt;br /&gt;
&lt;span class="postbody"&gt;Following the MVC pattern does not guarantee a robust, scalable application. The M (model) is the most overlooked aspect of 3-tier enterprise application development.
&lt;br /&gt;
 
&lt;br /&gt;
When data is stored in an RDBMS, the model should be implemented as Data Access Objects (DAOs) with the following properties:
&lt;br /&gt;
 
&lt;br /&gt;
a. Defined as interfaces (in a JAR that is separate from its implementations) that have minimal dependencies on other jars. The interface approach makes it possible to:&lt;ul&gt;&lt;li&gt;add caching as needed
&lt;br /&gt;
&lt;li&gt;Implement 'dummy' objects in the early phase of development before the DAOs have been fully implemented&lt;/ul&gt;b. Interfaces are implemented as POJOs
&lt;br /&gt;
c. One RDBMS POJO implementation has the following properties:&lt;ul&gt;&lt;li&gt;Uses iBatis (or hibernate or jdbc) that invokes stored procedures. Stored procedures can be manipulated by less expensive database developers and don't require JAR rebuilding in order to roll out hot patches that affect only SQL. This however means that the build process needs to install stored procs before tests execute.
&lt;br /&gt;
&lt;li&gt;Logs begin/end of each stored proc call using for example JCL - this provides minimal performance analysis that will be useful later on
&lt;br /&gt;
&lt;li&gt;Leverages industry-grade connection pool that times-out unused connections
&lt;br /&gt;
&lt;li&gt;Intelligently retries database connections that fail because the server is momentarily unavailable. 
&lt;br /&gt;

&lt;br /&gt;
&amp;quot;Intelligently&amp;quot; means that this can not be done if transactions are controlled by the caller. If the caller decides to control transactions, it must also handle retry logic. This complexity is often undesirable.
&lt;br /&gt;
&lt;li&gt;Intelligently retries statements that fail due to deadlock
&lt;br /&gt;
&lt;li&gt;Ideally these classes should be OSGi packaged. However, OSGi complexity can be addressed at a later date.&lt;/ul&gt;&lt;span style=&quot;font-weight: bold&quot;&gt;Generating DAOs directly from RDBMS&lt;/span&gt;
&lt;br /&gt;
Reliance on RDBMS-to-Java code generation is a recipe for failure. The tables in an RDBMS represent but one implementation of a conceptual object model. This assertion is true regardless of whether views or tables are used.
&lt;br /&gt;

&lt;br /&gt;
Long-lived DAOs should be designed independently of the RDBMS implementation, so both can evolve independently while minimally impacting the other. These goals are facilitated by the use of stored procedures.
&lt;br /&gt;

&lt;br /&gt;
&lt;span style=&quot;font-weight: bold&quot;&gt;Referential integrity is good&lt;/span&gt;
&lt;br /&gt;
Referential integrity checks locate bugs early in the development cycle. They also prevent orphans from stealing your resources. Declarative cascading deletes can eliminate substantial amounts of hand-written code. Furthermore, RI is an invaluable documentation tool.
&lt;br /&gt;

&lt;br /&gt;
However, referential integrity must be addressed at schema development time. Cascading deletes - whether declarative or not - can cause a single delete operation to take multiple minutes (or worse), timing out the browser. Lazy delete must be designed in the schema and in the data access interfaces up front. Lazy delete can result in primary key violations.
&lt;br /&gt;

&lt;br /&gt;
&lt;span style=&quot;font-weight: bold&quot;&gt;Transactions are not for large amounts of data&lt;/span&gt;
&lt;br /&gt;
Many implementations fail because the right tool is not used for the job at hand. Insert statements are no match for vendor-specific bulk load tools. ELT is generally the best way to load data in bulk quickly. The downsides are:&lt;ul&gt;&lt;li&gt;Running ELT jobs simultaneously in parallel is often impossible, so how do you avoid it and how do you scale such a solution? First, you need a &amp;quot;critical section.&amp;quot; Secondly, the RDBMS and the ELT tool must team together to parallelize as much of the load as possible. This implies an MPP database (e.g., Greenplum, Teradata). Unfortunately the state of the art of ELT tools remains inadequate to automate parallel task execution intelligently because this requires understanding the semantics of your data model.
&lt;br /&gt;
&lt;li&gt;Additional complexity
&lt;br /&gt;
&lt;li&gt;If at all possible, use streaming to avoid landing data into a flat file before bulk loading
&lt;br /&gt;
&lt;li&gt;Controlling batch sizes can be tricky&lt;/ul&gt;
&lt;/span&gt;&lt;br /&gt;
</description>
</item>
<item>
	<title>VMWare :: VMWare Server 2.x Suspend Script Example [Windows]</title>
	<link>http://devguy.com/bb/viewtopic.php?p=3733#3733</link>
	<description>Author: &lt;a href=&quot;http://devguy.com/bb/profile.php?mode=viewprofile&amp;u=2&quot; target=&quot;_blank&quot;&gt;devguy&lt;/a&gt;&lt;br /&gt;
Subject: VMWare Server 2.x Suspend Script Example [Windows]&lt;br /&gt;
Posted: Tue Jun 23, 2009 9:35 pm (GMT 0)&lt;br /&gt;
Topic Replies: 0&lt;br /&gt;&lt;br /&gt;
&lt;span class="postbody"&gt;Here's an example of a script that suspends two VMs and then lists all running VMs. Wouldn't it be better to write a script that iterated over the list and suspended them all? But you'd probably use Perl for that, right?
&lt;br /&gt;

&lt;br /&gt;
Note the plus signs for spaces. The 'suspend' command requires them although they are not output by the 'list' command. (As an aside, the 'start' command doesn't need the plus signs.) Also, note that Windows batch scripts require doubling percent signs.
&lt;br /&gt;

&lt;br /&gt;
&lt;/span&gt;&lt;table width=&quot;90%&quot; cellspacing=&quot;1&quot; cellpadding=&quot;3&quot; border=&quot;0&quot; align=&quot;center&quot;&gt;&lt;tr&gt; 	  &lt;td&gt;&lt;span class=&quot;genmed&quot;&gt;&lt;b&gt;Code:&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;	&lt;/tr&gt;	&lt;tr&gt;	  &lt;td class=&quot;code&quot;&gt;
&lt;br /&gt;
pushd &amp;quot;C&amp;#58;\Program Files &amp;#40;x86&amp;#41;\VMware\VMware VIX&amp;quot;
&lt;br /&gt;

&lt;br /&gt;
vmrun -h https&amp;#58;//localhost&amp;#58;8333/sdk -u user -p %%perc suspend &amp;quot;&amp;#91;o&amp;#93; Windows+2003+Server+VS 2005/winNetStandard.vmx&amp;quot;
&lt;br /&gt;

&lt;br /&gt;
vmrun -h https&amp;#58;//localhost&amp;#58;8333/sdk -u user -p %%perc suspend &amp;quot;&amp;#91;o&amp;#93; mmdw2/winNetStandard.vmx&amp;quot;
&lt;br /&gt;

&lt;br /&gt;
vmrun -h https&amp;#58;//localhost&amp;#58;8333/sdk -u user -p %%perc list 
&lt;br /&gt;
&lt;/td&gt;	&lt;/tr&gt;&lt;/table&gt;&lt;span class=&quot;postbody&quot;&gt;
&lt;/span&gt;&lt;br /&gt;
</description>
</item>
<item>
	<title>Linux and BSD :: Use tar with Scp to transfer multiple files at once</title>
	<link>http://devguy.com/bb/viewtopic.php?p=3732#3732</link>
	<description>Author: &lt;a href=&quot;http://devguy.com/bb/profile.php?mode=viewprofile&amp;u=2&quot; target=&quot;_blank&quot;&gt;devguy&lt;/a&gt;&lt;br /&gt;
Subject: Use tar with Scp to transfer multiple files at once&lt;br /&gt;
Posted: Mon Jun 08, 2009 11:00 pm (GMT 0)&lt;br /&gt;
Topic Replies: 0&lt;br /&gt;&lt;br /&gt;
&lt;span class="postbody"&gt;&lt;a href=&quot;http://www.thingy-ma-jig.co.uk/blog/03-09-2008/using-tar-and-ssh-improve-scp-speeds&quot; target=&quot;_blank&quot;&gt;http://www.thingy-ma-jig.co.uk/blog/03-09-2008/using-tar-and-ssh-improve-scp-speeds&lt;/a&gt;
&lt;/span&gt;&lt;br /&gt;
</description>
</item>
<item>
	<title>Perl :: Current date/time in yyyy-mm-dd hh:mm:ss</title>
	<link>http://devguy.com/bb/viewtopic.php?p=3731#3731</link>
	<description>Author: &lt;a href=&quot;http://devguy.com/bb/profile.php?mode=viewprofile&amp;u=2&quot; target=&quot;_blank&quot;&gt;devguy&lt;/a&gt;&lt;br /&gt;
Subject: Current date/time in yyyy-mm-dd hh:mm:ss&lt;br /&gt;
Posted: Thu May 21, 2009 5:26 pm (GMT 0)&lt;br /&gt;
Topic Replies: 0&lt;br /&gt;&lt;br /&gt;
&lt;span class="postbody"&gt;&lt;/span&gt;&lt;table width=&quot;90%&quot; cellspacing=&quot;1&quot; cellpadding=&quot;3&quot; border=&quot;0&quot; align=&quot;center&quot;&gt;&lt;tr&gt; 	  &lt;td&gt;&lt;span class=&quot;genmed&quot;&gt;&lt;b&gt;Code:&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;	&lt;/tr&gt;	&lt;tr&gt;	  &lt;td class=&quot;code&quot;&gt;use DateTime;
&lt;br /&gt;

&lt;br /&gt;
$dt = DateTime-&amp;gt;now; # same as &amp;#40; epoch =&amp;gt; time&amp;#40;&amp;#41; &amp;#41;
&lt;br /&gt;

&lt;br /&gt;
print $dt-&amp;gt;year . '-' . sprintf&amp;#40;'%02d', $dt-&amp;gt;month&amp;#41; . '-' . sprintf&amp;#40;'%02d',$dt-&amp;gt;day&amp;#41; . ' ' .
&lt;br /&gt;
&amp;nbsp; sprintf&amp;#40;'%02d',$dt-&amp;gt;hour&amp;#41; . '&amp;#58;' . sprintf&amp;#40;'%02d',$dt-&amp;gt;minute&amp;#41; . '&amp;#58;' . sprintf&amp;#40;'%02d',$dt-&amp;gt;second&amp;#41;;&lt;/td&gt;	&lt;/tr&gt;&lt;/table&gt;&lt;span class=&quot;postbody&quot;&gt;
&lt;/span&gt;&lt;br /&gt;
</description>
</item>
<item>
	<title>SQL Server :: SQL Server, Hibernate, and Metadata Case Sensitivity</title>
	<link>http://devguy.com/bb/viewtopic.php?p=3730#3730</link>
	<description>Author: &lt;a href=&quot;http://devguy.com/bb/profile.php?mode=viewprofile&amp;u=2&quot; target=&quot;_blank&quot;&gt;devguy&lt;/a&gt;&lt;br /&gt;
Subject: SQL Server, Hibernate, and Metadata Case Sensitivity&lt;br /&gt;
Posted: Wed May 13, 2009 2:49 am (GMT 0)&lt;br /&gt;
Topic Replies: 0&lt;br /&gt;&lt;br /&gt;
&lt;span class="postbody"&gt;Context: Loading data from PostgreSQL into Microsoft SQL Server.
&lt;br /&gt;

&lt;br /&gt;
PostgreSQL uses case-insensitive string comparison with metadata (involving table, column, etc. names). However, data comparisons are case-sensitive. This affects unique indexes. Let's say there's a unique index on column A, a varchar. Two rows may be inserted such that column A are 'foo' and 'FoO' without violating the unique index.
&lt;br /&gt;

&lt;br /&gt;
Therefore, when inserting some data into SQL Server from PostgreSQL, unique indexes can be violated with strings that are identical except for case.
&lt;br /&gt;

&lt;br /&gt;
The way around the unique index issue is to change the particular SQL Server database's default collation to be case-sensitive. However, this also causes SQL Server's column and table names to be case-sensitive. SQL Server has only one default collation per database that applies to both metadata and to string columnar data. 
&lt;br /&gt;

&lt;br /&gt;
Unfortunately, this breaks Hibernate and possibly hand-written queries. Hibernate uppercases table and column names because SQL Server's JDBC driver returns true for
&lt;br /&gt;

&lt;br /&gt;
DatabaseMetaData.storesUpperCaseIdentifiers()
&lt;br /&gt;

&lt;br /&gt;
This is a bug in Microsoft's JDBC driver. There is apparently no way to tell Hibernate that the database is case sensitive.
&lt;/span&gt;&lt;br /&gt;
</description>
</item>
<item>
	<title>SQL Server :: Drop all tables in a database - even with FK constraints</title>
	<link>http://devguy.com/bb/viewtopic.php?p=3729#3729</link>
	<description>Author: &lt;a href=&quot;http://devguy.com/bb/profile.php?mode=viewprofile&amp;u=2&quot; target=&quot;_blank&quot;&gt;devguy&lt;/a&gt;&lt;br /&gt;
Subject: Drop all tables in a database - even with FK constraints&lt;br /&gt;
Posted: Mon May 11, 2009 10:02 pm (GMT 0)&lt;br /&gt;
Topic Replies: 0&lt;br /&gt;&lt;br /&gt;
&lt;span class="postbody"&gt;&lt;/span&gt;&lt;table width=&quot;90%&quot; cellspacing=&quot;1&quot; cellpadding=&quot;3&quot; border=&quot;0&quot; align=&quot;center&quot;&gt;&lt;tr&gt; 	  &lt;td&gt;&lt;span class=&quot;genmed&quot;&gt;&lt;b&gt;Code:&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;	&lt;/tr&gt;	&lt;tr&gt;	  &lt;td class=&quot;code&quot;&gt;
&lt;br /&gt;
Delete me to run me - this is for your safety
&lt;br /&gt;

&lt;br /&gt;
/**
&lt;br /&gt;
&amp;nbsp;* This SQL drops all tables. It loops 10000 times in order to
&lt;br /&gt;
&amp;nbsp;* deal with drop errors related to FK constraints.
&lt;br /&gt;
&amp;nbsp;*/
&lt;br /&gt;

&lt;br /&gt;
set xact_abort off
&lt;br /&gt;
declare @counter int
&lt;br /&gt;
set @counter = 0
&lt;br /&gt;
while @counter &amp;lt; 10000
&lt;br /&gt;
begin
&lt;br /&gt;
&amp;nbsp; set @counter = @counter + 1
&lt;br /&gt;
&amp;nbsp; exec sp_MSforeachtable 'set xact_abort off;drop table ?'
&lt;br /&gt;
end
&lt;br /&gt;
&lt;/td&gt;	&lt;/tr&gt;&lt;/table&gt;&lt;span class=&quot;postbody&quot;&gt;
&lt;/span&gt;&lt;br /&gt;
</description>
</item>
<item>
	<title>VMWare :: VMWare Server 2.x Stop and Start Scripts [Windows]</title>
	<link>http://devguy.com/bb/viewtopic.php?p=3728#3728</link>
	<description>Author: &lt;a href=&quot;http://devguy.com/bb/profile.php?mode=viewprofile&amp;u=2&quot; target=&quot;_blank&quot;&gt;devguy&lt;/a&gt;&lt;br /&gt;
Subject: VMWare Server 2.x Stop and Start Scripts [Windows]&lt;br /&gt;
Posted: Fri May 08, 2009 4:41 pm (GMT 0)&lt;br /&gt;
Topic Replies: 0&lt;br /&gt;&lt;br /&gt;
&lt;span class="postbody"&gt;I believe it was the second Buddha (depends on who's counting) who said that if you're using an external USB (or firewire, esata, etc..) disk to hold VMWare Server 2.x guests, you should stop VMWare before hibernating. First of course you must either shut down or suspend all guests that happen to be powered on.
&lt;br /&gt;

&lt;br /&gt;
Rebooting the host (e.g., Vista) without your external disk connected is also problematic resulting in all guests in the corresponding &amp;quot;data stores&amp;quot; becoming unsuable. You must refresh the data store, remove all guests from it, and then add the guests back - not dire but not fun either.
&lt;br /&gt;

&lt;br /&gt;
After rebooting, connect your external disk and start VMware Server 2.x manually.
&lt;br /&gt;

&lt;br /&gt;
The following scripts stop and start VMware Server 2.x.
&lt;br /&gt;

&lt;br /&gt;
Use at your own risk.
&lt;br /&gt;

&lt;br /&gt;
In order to defend yourself, first copy the directory C:\ProgramData\VMware somewhere safe (e.g., a USB drive). This directory contains VMWare Server 2.x configuration information such as your data sources, and whenever you change your VMWare Server 2.x configuration you should update your backup.
&lt;br /&gt;

&lt;br /&gt;
If you're unable to start the VMWare web application, it's probably because an XML file in C:\ProgramData\VMware &lt;a href=&quot;http://communities.vmware.com/message/1129634;jsessionid=1D8C957CACB86EF8C3E8AAEE384A2C70&quot; target=&quot;_blank&quot; class=&quot;postlink&quot;&gt;has become corrupted&lt;/a&gt;. Stop the VMWare Server 2.x services, overwrite the files in C:\ProgramData\VMware with those in your copied directory, and restart the services.
&lt;br /&gt;

&lt;br /&gt;
If that doesn't work, uninstall VMWare Server 2.x manually, delete C:\ProgramData\VMware, and install VMWare Server 2.x to a different location that your previous installation (e.g., c:\program files\vmware2).
&lt;br /&gt;

&lt;br /&gt;
Here's the script to make VMware Servers 2.x services start manually. Only run this script once. Two of the commands fail because &amp;quot;sc config&amp;quot; apparently fails on service names that contain spaces -- you must change their settings yourself via Control Panel -&amp;gt; Administrative Tools -&amp;gt; Services.
&lt;br /&gt;

&lt;br /&gt;
&lt;/span&gt;&lt;table width=&quot;90%&quot; cellspacing=&quot;1&quot; cellpadding=&quot;3&quot; border=&quot;0&quot; align=&quot;center&quot;&gt;&lt;tr&gt; 	  &lt;td&gt;&lt;span class=&quot;genmed&quot;&gt;&lt;b&gt;Code:&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;	&lt;/tr&gt;	&lt;tr&gt;	  &lt;td class=&quot;code&quot;&gt;rem VMWare Server 2.x services start manually
&lt;br /&gt;
sc config &amp;quot;VMware NAT Service&amp;quot; start= demand
&lt;br /&gt;
sc config &amp;quot;VMware Host Agent&amp;quot; start= demand
&lt;br /&gt;
sc config VMnetDHCP start= demand
&lt;br /&gt;
sc config VMAuthdService start= demand
&lt;br /&gt;
sc config VMnetBridge start= demand
&lt;br /&gt;
sc config VMnetuserif start= demand
&lt;br /&gt;
sc config vmx86 start= demand
&lt;br /&gt;
sc config &amp;quot;VMware Server Web Access&amp;quot; start= demand
&lt;br /&gt;
sc config &amp;quot;VMware Registration Service&amp;quot; start= demand&lt;/td&gt;	&lt;/tr&gt;&lt;/table&gt;&lt;span class=&quot;postbody&quot;&gt;
&lt;br /&gt;
Stop Script&amp;#058;
&lt;br /&gt;

&lt;br /&gt;
&lt;/span&gt;&lt;table width=&quot;90%&quot; cellspacing=&quot;1&quot; cellpadding=&quot;3&quot; border=&quot;0&quot; align=&quot;center&quot;&gt;&lt;tr&gt; 	  &lt;td&gt;&lt;span class=&quot;genmed&quot;&gt;&lt;b&gt;Code:&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;	&lt;/tr&gt;	&lt;tr&gt;	  &lt;td class=&quot;code&quot;&gt;rem stop all VMware Server 2.x services
&lt;br /&gt;
net stop &amp;quot;VMware Server Web Access&amp;quot;
&lt;br /&gt;
net stop &amp;quot;VMware NAT Service&amp;quot;
&lt;br /&gt;
net stop &amp;quot;VMware Host Agent&amp;quot;
&lt;br /&gt;
net stop VMnetDHCP
&lt;br /&gt;
net stop VMauthdService
&lt;br /&gt;
net stop VMnetBridge
&lt;br /&gt;
net stop VMnetuserif
&lt;br /&gt;
net stop vmx86
&lt;br /&gt;
rem net stop &amp;quot;VMware Registration Service&amp;quot;&lt;/td&gt;	&lt;/tr&gt;&lt;/table&gt;&lt;span class=&quot;postbody&quot;&gt;
&lt;br /&gt;
Start Script&amp;#058;
&lt;br /&gt;

&lt;br /&gt;
&lt;/span&gt;&lt;table width=&quot;90%&quot; cellspacing=&quot;1&quot; cellpadding=&quot;3&quot; border=&quot;0&quot; align=&quot;center&quot;&gt;&lt;tr&gt; 	  &lt;td&gt;&lt;span class=&quot;genmed&quot;&gt;&lt;b&gt;Code:&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;	&lt;/tr&gt;	&lt;tr&gt;	  &lt;td class=&quot;code&quot;&gt;rem start all VMware Server 2.x services
&lt;br /&gt;
net start vmx86
&lt;br /&gt;
net start VMnetuserif
&lt;br /&gt;
net start VMnetBridge
&lt;br /&gt;
net start VMauthdService
&lt;br /&gt;
net start VMnetDHCP
&lt;br /&gt;
net start &amp;quot;VMware NAT Service&amp;quot;
&lt;br /&gt;
net start &amp;quot;VMware Host Agent&amp;quot;
&lt;br /&gt;
net start &amp;quot;VMware Server Web Access&amp;quot;
&lt;br /&gt;
rem net start &amp;quot;VMware Registration Service&amp;quot;&lt;/td&gt;	&lt;/tr&gt;&lt;/table&gt;&lt;span class=&quot;postbody&quot;&gt;
&lt;/span&gt;&lt;br /&gt;
</description>
</item>
<item>
	<title>Perl :: Using Calendar::Simple</title>
	<link>http://devguy.com/bb/viewtopic.php?p=3727#3727</link>
	<description>Author: &lt;a href=&quot;http://devguy.com/bb/profile.php?mode=viewprofile&amp;u=2&quot; target=&quot;_blank&quot;&gt;devguy&lt;/a&gt;&lt;br /&gt;
Subject: Using Calendar::Simple&lt;br /&gt;
Posted: Wed May 06, 2009 10:22 pm (GMT 0)&lt;br /&gt;
Topic Replies: 0&lt;br /&gt;&lt;br /&gt;
&lt;span class="postbody"&gt;Output the starting and ending dates for each month, sort of..
&lt;br /&gt;

&lt;br /&gt;
&lt;/span&gt;&lt;table width=&quot;90%&quot; cellspacing=&quot;1&quot; cellpadding=&quot;3&quot; border=&quot;0&quot; align=&quot;center&quot;&gt;&lt;tr&gt; 	  &lt;td&gt;&lt;span class=&quot;genmed&quot;&gt;&lt;b&gt;Code:&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;	&lt;/tr&gt;	&lt;tr&gt;	  &lt;td class=&quot;code&quot;&gt;
&lt;br /&gt;
## Windows Installation&amp;#58;
&lt;br /&gt;
## 
&lt;br /&gt;
## ppm install Calendar-Simple
&lt;br /&gt;
use Calendar&amp;#58;&amp;#58;Simple;
&lt;br /&gt;

&lt;br /&gt;
&amp;nbsp; &amp;nbsp; my $year = 1995;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; my $month = 1;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; my $next;
&lt;br /&gt;

&lt;br /&gt;
&amp;nbsp; &amp;nbsp; while &amp;#40;$year &amp;lt;= 2200&amp;#41;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;#123;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; my @days = calendar&amp;#40;$month, $year&amp;#41;;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;my $mon = sprintf&amp;#40;&amp;quot;%02d&amp;quot;, $month&amp;#41;;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;print &amp;quot;$year-$&amp;#123;mon&amp;#125;,$year,$month,$&amp;#123;year&amp;#125;$&amp;#123;mon&amp;#125;01 00&amp;#58;00&amp;#58;00,$&amp;#123;year&amp;#125;$mon&amp;quot;;
&lt;br /&gt;

&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;my $last;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;foreach &amp;#40;@&amp;#123;$days&amp;#91;$#days&amp;#93;&amp;#125;&amp;#41;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;#123;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;$last = $_ if $_;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;#125;
&lt;br /&gt;

&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;print &amp;quot;$last 23&amp;#58;59&amp;#58;59.999\n&amp;quot;;
&lt;br /&gt;

&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $month++;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if &amp;#40;$month &amp;gt; 12&amp;#41;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;#123;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $year++;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $month = 1;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;#125;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;#125;
&lt;br /&gt;
&lt;/td&gt;	&lt;/tr&gt;&lt;/table&gt;&lt;span class=&quot;postbody&quot;&gt;
&lt;/span&gt;&lt;br /&gt;
</description>
</item>
<item>
	<title>SQL Server :: RE: SQL Server DBA Basic Questions</title>
	<link>http://devguy.com/bb/viewtopic.php?p=3726#3726</link>
	<description>Author: &lt;a href=&quot;http://devguy.com/bb/profile.php?mode=viewprofile&amp;u=2&quot; target=&quot;_blank&quot;&gt;devguy&lt;/a&gt;&lt;br /&gt;

Posted: Fri May 01, 2009 4:39 pm (GMT 0)&lt;br /&gt;
Topic Replies: 1&lt;br /&gt;&lt;br /&gt;
&lt;span class="postbody"&gt;Related post:
&lt;br /&gt;

&lt;br /&gt;
&lt;a href=&quot;http://sqlbatman.com/2009/04/junior-dba-questions/&quot; target=&quot;_blank&quot; class=&quot;postlink&quot;&gt;Junior DBA Questions&lt;/a&gt;
&lt;/span&gt;&lt;br /&gt;
</description>
</item>
<item>
	<title>PostgreSQL :: Out of memory error with PostgreSQL JDBC driver</title>
	<link>http://devguy.com/bb/viewtopic.php?p=3725#3725</link>
	<description>Author: &lt;a href=&quot;http://devguy.com/bb/profile.php?mode=viewprofile&amp;u=2&quot; target=&quot;_blank&quot;&gt;devguy&lt;/a&gt;&lt;br /&gt;
Subject: Out of memory error with PostgreSQL JDBC driver&lt;br /&gt;
Posted: Thu Apr 16, 2009 3:52 pm (GMT 0)&lt;br /&gt;
Topic Replies: 0&lt;br /&gt;&lt;br /&gt;
&lt;span class="postbody"&gt;PostgreSQL's JDBC driver will attempt to load every row in a result set into memory. This will result in out of memory errors for large select statements. Here's the fix.
&lt;br /&gt;

&lt;br /&gt;
&lt;a href=&quot;http://archives.postgresql.org//pgsql-jdbc/2008-10/msg00044.php&quot; target=&quot;_blank&quot; class=&quot;postlink&quot;&gt;Why disable autoCommit&lt;/a&gt;?
&lt;br /&gt;

&lt;br /&gt;
&lt;/span&gt;&lt;table width=&quot;90%&quot; cellspacing=&quot;1&quot; cellpadding=&quot;3&quot; border=&quot;0&quot; align=&quot;center&quot;&gt;&lt;tr&gt; 	  &lt;td&gt;&lt;span class=&quot;genmed&quot;&gt;&lt;b&gt;Code:&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;	&lt;/tr&gt;	&lt;tr&gt;	  &lt;td class=&quot;code&quot;&gt;Statement stmt = connection.createStatement&amp;#40;ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY&amp;#41;;
&lt;br /&gt;
connection.setAutoCommit&amp;#40;false&amp;#41;;
&lt;br /&gt;

&lt;br /&gt;
stmt.setFetchSize&amp;#40;500&amp;#41;;&lt;/td&gt;	&lt;/tr&gt;&lt;/table&gt;&lt;span class=&quot;postbody&quot;&gt;
&lt;/span&gt;&lt;br /&gt;
</description>
</item>
<item>
	<title>SQL Server :: RE: Do stuff to all tables in a database</title>
	<link>http://devguy.com/bb/viewtopic.php?p=3724#3724</link>
	<description>Author: &lt;a href=&quot;http://devguy.com/bb/profile.php?mode=viewprofile&amp;u=2&quot; target=&quot;_blank&quot;&gt;devguy&lt;/a&gt;&lt;br /&gt;

Posted: Wed Apr 15, 2009 7:47 pm (GMT 0)&lt;br /&gt;
Topic Replies: 1&lt;br /&gt;&lt;br /&gt;
&lt;span class="postbody"&gt;Here's a fun one.
&lt;br /&gt;

&lt;br /&gt;
&lt;/span&gt;&lt;table width=&quot;90%&quot; cellspacing=&quot;1&quot; cellpadding=&quot;3&quot; border=&quot;0&quot; align=&quot;center&quot;&gt;&lt;tr&gt; 	  &lt;td&gt;&lt;span class=&quot;genmed&quot;&gt;&lt;b&gt;Code:&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;	&lt;/tr&gt;	&lt;tr&gt;	  &lt;td class=&quot;code&quot;&gt;exec sp_MSforeachtable 'select ''?'', count&amp;#40;*&amp;#41; from ?' &lt;/td&gt;	&lt;/tr&gt;&lt;/table&gt;&lt;span class=&quot;postbody&quot;&gt;
&lt;/span&gt;&lt;br /&gt;
</description>
</item>
<item>
	<title>Linux and BSD :: awk example</title>
	<link>http://devguy.com/bb/viewtopic.php?p=3723#3723</link>
	<description>Author: &lt;a href=&quot;http://devguy.com/bb/profile.php?mode=viewprofile&amp;u=2&quot; target=&quot;_blank&quot;&gt;devguy&lt;/a&gt;&lt;br /&gt;
Subject: awk example&lt;br /&gt;
Posted: Wed Apr 15, 2009 5:54 pm (GMT 0)&lt;br /&gt;
Topic Replies: 0&lt;br /&gt;&lt;br /&gt;
&lt;span class="postbody"&gt;Column delimiter is tab. Ignore the first line. Output the 20th column.
&lt;br /&gt;

&lt;br /&gt;
&lt;/span&gt;&lt;table width=&quot;90%&quot; cellspacing=&quot;1&quot; cellpadding=&quot;3&quot; border=&quot;0&quot; align=&quot;center&quot;&gt;&lt;tr&gt; 	  &lt;td&gt;&lt;span class=&quot;genmed&quot;&gt;&lt;b&gt;Code:&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;	&lt;/tr&gt;	&lt;tr&gt;	  &lt;td class=&quot;code&quot;&gt;awk -F'\t' 'NR &amp;gt; 1 &amp;#123;print $20&amp;#125;'&lt;/td&gt;	&lt;/tr&gt;&lt;/table&gt;&lt;span class=&quot;postbody&quot;&gt;
&lt;br /&gt;
&amp;#8201;
&lt;/span&gt;&lt;br /&gt;
</description>
</item>
<item>
	<title>SQL Server :: SQL Server DBA Basic Questions</title>
	<link>http://devguy.com/bb/viewtopic.php?p=3722#3722</link>
	<description>Author: &lt;a href=&quot;http://devguy.com/bb/profile.php?mode=viewprofile&amp;u=2&quot; target=&quot;_blank&quot;&gt;devguy&lt;/a&gt;&lt;br /&gt;
Subject: SQL Server DBA Basic Questions&lt;br /&gt;
Posted: Tue Apr 14, 2009 3:54 pm (GMT 0)&lt;br /&gt;
Topic Replies: 1&lt;br /&gt;&lt;br /&gt;
&lt;span class="postbody"&gt;1. Which websites do you visit reguarly for SQL Server information?
&lt;br /&gt;
2. Explain how you approach optimizing a query
&lt;br /&gt;
3. How do you assign files to databases?
&lt;br /&gt;
4. Why would you assign multiple data files to a database? 
&lt;br /&gt;
5. What is the difference between the 'simple' and 'full' database recovery options?
&lt;br /&gt;
6. How do you perform count* on all user tables in a database in a single statement?
&lt;br /&gt;
7. What is &amp;quot;update statistics&amp;quot; for?
&lt;br /&gt;
8. Explain why you would rebuild an index
&lt;br /&gt;
9. What is the difference between a clusted index and a regular index?
&lt;br /&gt;
10. What is a materialized view?
&lt;br /&gt;
11. How do you fix corrupted database files?
&lt;br /&gt;
12. Explain how you would restore from a full backup with incremental backups
&lt;br /&gt;
13. What is the difference between 'where' and 'having' ?
&lt;/span&gt;&lt;br /&gt;
</description>
</item>
<item>
	<title>Java :: Maven and Jetty using cygwin SSH on Windows</title>
	<link>http://devguy.com/bb/viewtopic.php?p=3721#3721</link>
	<description>Author: &lt;a href=&quot;http://devguy.com/bb/profile.php?mode=viewprofile&amp;u=2&quot; target=&quot;_blank&quot;&gt;devguy&lt;/a&gt;&lt;br /&gt;
Subject: Maven and Jetty using cygwin SSH on Windows&lt;br /&gt;
Posted: Wed Apr 01, 2009 10:28 pm (GMT 0)&lt;br /&gt;
Topic Replies: 0&lt;br /&gt;&lt;br /&gt;
&lt;span class="postbody"&gt;cmd.exe sucks as a logging target. Words don't wrap making &amp;quot;copy&amp;quot; useless - they're cut in half via a newline character (\r\n no less).
&lt;br /&gt;

&lt;br /&gt;
What to do?
&lt;br /&gt;

&lt;br /&gt;
One way is to use a decent terminal such as Putty and run your java application over SSH using cygwin. But - confound it! - &amp;quot;mvn jetty:run&amp;quot; yields the following error:
&lt;br /&gt;

&lt;br /&gt;
BUILD ERROR - The plugin 'org.apache.maven.plugins:maven-jetty-plugin' does not exist or no valid version could be found
&lt;br /&gt;

&lt;br /&gt;
No problem! Create the file:
&lt;br /&gt;

&lt;br /&gt;
c:\documents and settings\userName\.m2\settings.xml
&lt;br /&gt;
&lt;/span&gt;&lt;table width=&quot;90%&quot; cellspacing=&quot;1&quot; cellpadding=&quot;3&quot; border=&quot;0&quot; align=&quot;center&quot;&gt;&lt;tr&gt; 	  &lt;td&gt;&lt;span class=&quot;genmed&quot;&gt;&lt;b&gt;Code:&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;	&lt;/tr&gt;	&lt;tr&gt;	  &lt;td class=&quot;code&quot;&gt;
&lt;br /&gt;
&amp;lt;settings&amp;gt;
&lt;br /&gt;
&amp;nbsp;&amp;lt;pluginGroups&amp;gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;lt;pluginGroup&amp;gt;org.mortbay.jetty&amp;lt;/pluginGroup&amp;gt;
&lt;br /&gt;
&amp;nbsp; &amp;lt;/pluginGroups&amp;gt;
&lt;br /&gt;
&amp;lt;/settings&amp;gt;
&lt;br /&gt;
&lt;/td&gt;	&lt;/tr&gt;&lt;/table&gt;&lt;span class=&quot;postbody&quot;&gt;
&lt;/span&gt;&lt;br /&gt;
</description>
</item>
<item>
	<title>MySQL :: View recently run queries</title>
	<link>http://devguy.com/bb/viewtopic.php?p=3720#3720</link>
	<description>Author: &lt;a href=&quot;http://devguy.com/bb/profile.php?mode=viewprofile&amp;u=2&quot; target=&quot;_blank&quot;&gt;devguy&lt;/a&gt;&lt;br /&gt;
Subject: View recently run queries&lt;br /&gt;
Posted: Tue Mar 31, 2009 4:31 pm (GMT 0)&lt;br /&gt;
Topic Replies: 0&lt;br /&gt;&lt;br /&gt;
&lt;span class="postbody"&gt;show engine innodb status
&lt;/span&gt;&lt;br /&gt;
</description>
</item>
<item>
	<title>SQL Server :: Files and file groups</title>
	<link>http://devguy.com/bb/viewtopic.php?p=3719#3719</link>
	<description>Author: &lt;a href=&quot;http://devguy.com/bb/profile.php?mode=viewprofile&amp;u=2&quot; target=&quot;_blank&quot;&gt;devguy&lt;/a&gt;&lt;br /&gt;
Subject: Files and file groups&lt;br /&gt;
Posted: Mon Mar 30, 2009 11:38 pm (GMT 0)&lt;br /&gt;
Topic Replies: 0&lt;br /&gt;&lt;br /&gt;
&lt;span class="postbody"&gt;&lt;a href=&quot;http://decipherinfosys.wordpress.com/2007/01/24/files-and-filegroups-implementation-in-sql-server/&quot; target=&quot;_blank&quot;&gt;http://decipherinfosys.wordpress.com/2007/01/24/files-and-filegroups-implementation-in-sql-server/&lt;/a&gt;
&lt;/span&gt;&lt;br /&gt;
</description>
</item>
<item>
	<title>SQL Server :: Planning disk usage in SQL Server 2005 and beyond</title>
	<link>http://devguy.com/bb/viewtopic.php?p=3718#3718</link>
	<description>Author: &lt;a href=&quot;http://devguy.com/bb/profile.php?mode=viewprofile&amp;u=2&quot; target=&quot;_blank&quot;&gt;devguy&lt;/a&gt;&lt;br /&gt;
Subject: Planning disk usage in SQL Server 2005 and beyond&lt;br /&gt;
Posted: Mon Mar 30, 2009 10:06 pm (GMT 0)&lt;br /&gt;
Topic Replies: 0&lt;br /&gt;&lt;br /&gt;
&lt;span class="postbody"&gt;&lt;a href=&quot;http://searchsqlserver.techtarget.com/tip/0,289483,sid87_gci1262122_mem1,00.html&quot; target=&quot;_blank&quot;&gt;http://searchsqlserver.techtarget.com/tip/0,289483,sid87_gci1262122_mem1,00.html&lt;/a&gt;
&lt;/span&gt;&lt;br /&gt;
</description>
</item>
<item>
	<title>SQL Server :: Do stuff to all tables in a database</title>
	<link>http://devguy.com/bb/viewtopic.php?p=3717#3717</link>
	<description>Author: &lt;a href=&quot;http://devguy.com/bb/profile.php?mode=viewprofile&amp;u=2&quot; target=&quot;_blank&quot;&gt;devguy&lt;/a&gt;&lt;br /&gt;
Subject: Do stuff to all tables in a database&lt;br /&gt;
Posted: Mon Mar 23, 2009 9:05 pm (GMT 0)&lt;br /&gt;
Topic Replies: 1&lt;br /&gt;&lt;br /&gt;
&lt;span class="postbody"&gt;Example:
&lt;br /&gt;

&lt;br /&gt;
&lt;/span&gt;&lt;table width=&quot;90%&quot; cellspacing=&quot;1&quot; cellpadding=&quot;3&quot; border=&quot;0&quot; align=&quot;center&quot;&gt;&lt;tr&gt; 	  &lt;td&gt;&lt;span class=&quot;genmed&quot;&gt;&lt;b&gt;Code:&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;	&lt;/tr&gt;	&lt;tr&gt;	  &lt;td class=&quot;code&quot;&gt;exec sp_MSforeachtable '&amp;amp;set xact_abort off;drop table ?'&lt;/td&gt;	&lt;/tr&gt;&lt;/table&gt;&lt;span class=&quot;postbody&quot;&gt;
&lt;br /&gt;

&lt;br /&gt;
I intentionally added a syntax error for obvious reasons. You will need to remove the &amp;amp; yourself.
&lt;br /&gt;

&lt;br /&gt;
The  purpose of set xact_abort off is to deal with errors related to foreign key constraints. Run this command multiple times until there are no more fk-related errors.
&lt;/span&gt;&lt;br /&gt;
</description>
</item>
<item>
	<title>Windows :: Towards Hibernate Bliss</title>
	<link>http://devguy.com/bb/viewtopic.php?p=3716#3716</link>
	<description>Author: &lt;a href=&quot;http://devguy.com/bb/profile.php?mode=viewprofile&amp;u=2&quot; target=&quot;_blank&quot;&gt;devguy&lt;/a&gt;&lt;br /&gt;
Subject: Towards Hibernate Bliss&lt;br /&gt;
Posted: Fri Mar 20, 2009 4:33 pm (GMT 0)&lt;br /&gt;
Topic Replies: 0&lt;br /&gt;&lt;br /&gt;
&lt;span class="postbody"&gt;If you follow these simple rules you can Hibernate Windows XP or Vista (even with VMWare instances running on an external USB disk!) to your heart's content. Just remember to connect your USB drives &lt;span style=&quot;font-weight: bold&quot;&gt;to the same USB ports&lt;/span&gt; prior to restart.
&lt;br /&gt;

&lt;br /&gt;
1. Disconnect all VPN connections
&lt;br /&gt;
2. Disconnect WAN (e.g., 3G) modem
&lt;br /&gt;
3. Turn off bluetooth antenna
&lt;/span&gt;&lt;br /&gt;
</description>
</item>
<item>
	<title>Data Warehousing :: Big Data on Not-So Big Budgets [Presentation]</title>
	<link>http://devguy.com/bb/viewtopic.php?p=3715#3715</link>
	<description>Author: &lt;a href=&quot;http://devguy.com/bb/profile.php?mode=viewprofile&amp;u=2&quot; target=&quot;_blank&quot;&gt;devguy&lt;/a&gt;&lt;br /&gt;
Subject: Big Data on Not-So Big Budgets [Presentation]&lt;br /&gt;
Posted: Thu Mar 19, 2009 7:38 pm (GMT 0)&lt;br /&gt;
Topic Replies: 0&lt;br /&gt;&lt;br /&gt;
&lt;span class="postbody"&gt;&lt;a href=&quot;http://docs.google.com/Present?docid=dhnx36jx_37gfts9chg&quot; target=&quot;_blank&quot;&gt;http://docs.google.com/Present?docid=dhnx36jx_37gfts9chg&lt;/a&gt;
&lt;/span&gt;&lt;br /&gt;
</description>
</item>
<item>
	<title>Data Warehousing :: One fact referencing multiple values from the same dimension</title>
	<link>http://devguy.com/bb/viewtopic.php?p=3714#3714</link>
	<description>Author: &lt;a href=&quot;http://devguy.com/bb/profile.php?mode=viewprofile&amp;u=2&quot; target=&quot;_blank&quot;&gt;devguy&lt;/a&gt;&lt;br /&gt;
Subject: One fact referencing multiple values from the same dimension&lt;br /&gt;
Posted: Thu Mar 19, 2009 7:14 pm (GMT 0)&lt;br /&gt;
Topic Replies: 0&lt;br /&gt;&lt;br /&gt;
&lt;span class="postbody"&gt;&lt;a href=&quot;http://www.dbmsmag.com/9808d05.html&quot; target=&quot;_blank&quot;&gt;http://www.dbmsmag.com/9808d05.html&lt;/a&gt;
&lt;br /&gt;

&lt;br /&gt;
&lt;a href=&quot;http://www.intelligententerprise.com/010810/412warehouse1_1.jhtml&quot; target=&quot;_blank&quot;&gt;http://www.intelligententerprise.com/010810/412warehouse1_1.jhtml&lt;/a&gt;
&lt;/span&gt;&lt;br /&gt;
</description>
</item>
</channel>
</rss>

