October 26, 2012
This Must be an Impeachable Offense
August 10, 2012
Public Debt - Where are We Going?
Public Debt Outstanding
| President | Slope |
|---|---|
| Clinton | $539,396,929.90 / Day approximately $2.01 per person per day |
| Bush | $1,568,359,722.35 / Day approximately $5.31 per person per day |
| Obama | $4,045,430,463.22 / Day approximately $13.10 per person per day |
Clinton's second term is interesting, public debt seemed to be plateauing. The best fit for this is a second order polynomial, but I just can't imagine that the slope would have gone negative if he had stayed in office. I suspect having a combative Congress contributed to that trend.
Bush and Obama's curves are both pretty much exponential. If this is the case we should expect Obama's second term (if he has one) to close with the total public debt near $27 Trillion, or roughly $81,800 per person.
With this small sample size it seems that the rate of increase of the public debt increases three-fold when a new President is elected. However since the sample size is so small this cannot be reliably predicted.
Senate
After adding in the party control of the Senate there is an interesting trend.While few Republican controlled Senates have much success in reducing the rate of the debt increase, the rate of the debt increase has increased only under a Democrat controlled Senate.
Raw Data
May 1, 2012
PDFCAT
So I created a simple script that probably makes some poor PDFs but it works.
#!/bin/sh
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <=http://www.gnu.org/licenses/>.
OUTPUT=-
VERBOSE=false
PDFTOPS=/usr/bin/pdftops
PS2PDF=/usr/bin/ps2pdf
usage() {
echo Usage: `basename $0` [-v] [-o output file] files
echo pdfcat concatenats PDF files in argument order into a
echo single PDF file or to stdout. Beware when specifying
echo wildcard arguments as the pages will come in the order
echo your shell picks them up.
echo
echo Arguments:
echo " -h Show this help screen"
echo " -l Show the GPL license"
echo " -v Use verbose mode...not very verbose"
echo " -o OUTPUT Send the output PDF to the specified"
echo " file. If missing output is generated"
echo " to stdout"
}
license() {
echo "This program is free software: you can redistribute it and/or modify"
echo "it under the terms of the GNU General Public License as published by"
echo "the Free Software Foundation, either version 2 of the License, or"
echo "(at your option) any later version."
echo
echo "This program is distributed in the hope that it will be useful,"
echo "but WITHOUT ANY WARRANTY; without even the implied warranty of"
echo "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the"
echo "GNU General Public License for more details."
echo
echo "You should have received a copy of the GNU General Public License"
echo "along with this program. If not, see <=http://www.gnu.org/licenses/>."
}
while getopts "vhlo:" OPTION
do
case $OPTION in
h)
usage
exit 1
;;
l)
license
exit 1
;;
v)
VERBOSE=true
;;
o)
OUTPUT=$OPTARG
;;
?)
usage
exit1
;;
esac
done
shift $(( OPTIND-1 ))
(
for pdf in $*
do
if $VERBOSE
then
echo -n Processing `basename $pdf` >&2
fi
$PDFTOPS $pdf -
if $VERBOSE
then
echo " DONE" >&2
fi
done
) | $PS2PDF - $OUTPUT
July 8, 2010
Constructor Parameters in C#
public class Server
{
private int m_port;
private IPAddress m_address;
public Server()
{
Init(IPAddress.Any, 8181);
}
public Server(int port)
{
Init(IPAddress.Any, port);
}
public Server(IPAddress address, int port)
{
Init(address, port);
}
private void Init(IPAddress address, int port)
{
m_port = port;
m_address = address;
}
}
public class Server
{
private int m_port;
private IPAddress m_address;
public Server()
: this(8181) { }
public Server(int port)
: this(IPAddress.Any, port) { }
public Server(IPAddress address, int port)
{
m_port = port;
m_address = address;
}
}
August 5, 2009
Extensions Methods with .NET 2.0
[AttributeUsage(AttributeTargets.Method, AllowMultiple = false,Inherited = false)]
public class ExtensionAttribute : Attribute{}
July 29, 2009
How to Get a Parent Form from a Component
I found much of this at Code Project, but I think my implementation is cleaner.
Since a component doesn’t have a Parent property like a control does it is often difficult to Invoke in a component which is a pity since a component is more likely to need it. This solution creates an abstract class that adds the Parent property to the component class. If you merely derive your class from the AdvancedComponent class instead of from the Component class you will get the Parent property as well as the FindForm() method.
/// Overrides the ISite property
/// so that it is set when the
/// component is placed on a form.
/// </summary>
/// Creates a Parent property
/// that can be used to find the
/// parent form.
/// </summary>
/// Implements a FindForm method
/// similar to Control.FindForm
/// </summary>
/// <returns>The contents of the Parent property</returns>
July 28, 2009
Overriding the Text Property of a WinForms UserControl
From Rockford Lhotka:
“Every time I go to override the Text property in a Windows Forms UserControl I have to go find this one little attribute that I can never remember...
It is easy enough to remember to make the property Browsable(true), but it is that other attribute that's hard to remember: DesignerSerializationVisibility(DesignerSerializationVisibility.Visible).
This web page not only answers the question, but includes a nice summary of all the System.ComponentModel attributes.
At least next time I know I can search my own blog to find the answer :)”


