of Daniel Brockman

v 20120122

Bookmark and Share Creative Commons License
These works by Daniel Brockman are licensed under a
Creative Commons Attribution 3.0 Unported License.
Use with attribution to Daniel Brockman.


White Papers, Articles and Presentations

Indexer - Construction and Application

   Summary Review of Computation

Explanation of Binomial Distribution

Explanation of Logistic Regression

Distance Metric
(page one)

Internet Social Media Consultation

Marketing Case Studies

Smucker's Fruit Spread
Peet's Coffee & Tea
Kingsford Charcoal
Ema Handbags
Dawn Hand Renewal with Olay Beauty
Applied Polymer Science


Convert PowerPoint Images from Color to Black and White

Unix Shell Scripts: A short course
  Source code of program displaying this primer.

Construct a Wordpress Widget

SAS Examples

Flow Charts

Logistic Regression

Utility Macros
%delds() - Delete a dataset.
%divz() - Avoid division by zero errors.
%genyyyymm() - Iterate through a sequence of months.
%getdsn() - Get new dataset name.
%inn() - Macro version of in() operator.
%isdsn() - Test whether dataset exists.
%listovars() - Make a list of the names of the variables in a dataset, and put the list in a macro variable.
%missaz() - Proc sql case statement sets missing to zero.
%rhisto() - Make a histogram.

Currency Volatilities and Correlations Project: Click here.

Blood Pressure Project: Click here.

Air Transport Costs Project: I collaborated with Christine Iodice and Saranne Warner on this project. Click here.

Data Mining Project: Click here.

Currency Volatility Project: I collaborated with Kevin Cheung on this project. Click here.

Merge example: From Wells Fargo Bank (circa 2010, redacted for confidentiality). Click here.

Unix Shell and DOS BAT examples

a Unix shell script that runs on Unix or on Windows (with Cygwin installed)...
  the script:
  dirtgz -- compressed timestamped copy of current directory
  the invoking bat file for Windows use:

a Unix shell script to show you how much disk space is consumed by the contents of a directory. Improves on du because ds

  • shows the sizes of subdirectories including all their contents
  • shows files and subdirectories in descending order by size
  • shows the top ten, because if you don't fix them, then you still have a problem

Get ds: click here.

Perl and CGI Examples

Perl CGI: PhoCho, The Photo Chooser

A little more CGI: The Flapper: random color generator

Source code of program displaying the
Shell Scripting primer

    ShSc.cgi -- The main cgi script.
    Gallery.pm -- Gallery.pm library.
    Simp.pm -- Simp.pm library, derived from XML::Simple.

Perl programs
Assorted Perl programs follow, some of which are known to have worked on some Windows 98, NT, 2000, XP and Vista systems. Some have worked on Unix systems. Each one worked somewhere. I believe all are highly portable. Test a program on your system before you rely on it. For usage instructions, see commentary within each program file.


datlib.pm -- utility date and time routines
k2l.pl -- macro substutions into SQL code.
dblspc.pl -- doublespaces a single-spaced text file
despc.pl -- removes excess blank lines from a text file
forx.pl -- spawns an independent process
HowToCreate.pl -- Instructive example of object creation
Tpkg.pm -- for use with HowToCreate.pl
pinger.pl -- ping with specified interval for Windows
prio.pl -- prioritizes a list
sglspc.pl -- singlespaces a double-spaced text file
tgz.pl -- utility for data compression and decompression
timestamp -- writes date and time on stdout as yyyymmdd-hhmmss
unwrap.pl -- inverse of wrap.pl (may contain bug)
wfrq.pl -- counts the frequency of words in a text file
  Wds.pm -- package of subroutines called from wfrq.pl
wrap.pl -- wraps text lines (may contain bug)

Excel and VBA Examples

Macros for charting and general purposes, and examples of charts (with titles removed). Click here.

Examples demonstrating sensitivity analyses, data presentation, statistical computations, pivot tables, financial mathematics and miscellaneous Excel techniques. Click here.

SQL Example

A redacted excerpt. Click here.

Javascript example

Square Root Calculator

Technical Notes

Running Unix commands in a Windows DOS box
If you want Unix commands, including Perl and Ruby, to use on your Windows system, I suggest you use Cygwin...
Cygwin incorporates ActiveState Perl. Make sure the Cygwin subdirectory "bin" appears on your Windows PATH. By default, this is the Windows folder "C:\Cygwin\bin".

The best vi editor.
My favorite _vimrc file settings. Use vim to edit your "C:\Program Files\Vim\_vimrc".

For Perl for Windows, without Cygwin, I had good results with ActiveState...
In my experience, programs written with ActivePerl port very easily between Unix and Windows.

Attribution or Citation

You may be constrained by your circumstances in what you can do, however, you should find a way to mention the name of the author and either the date of the work or the date that you acquired it.

Use the name of the author: "Daniel Brockman" or "D. Brockman" or similar.
Use the date of the work or the date that you acquired it.
If feasible, use the name of the work.
If feasible, feel free to use a hyperlink to the work or to this website.
Mr. Brockman will be glad to advise you on special situations.

Example 1. Unix Shell Scripts: a Short Course, by Daniel Brockman (2001).
Example 2. ... primer on shell scripts (Daniel Brockman, 2001), which is what you need when ...
Example 3. We learned that "With shell scripts, you can automate repetitive tasks on your Unix system" (D. Brockman, 2001).
Example 4. ... we used a primer by Daniel Brockman (2001) on shell scripts as our study guide.
Example 5. (Daniel Brockman, Unix Shell Scripts: a Short Course, 2001).
Example 6 (with hyperlink). (Daniel Brockman, Unix Shell Scripts: a Short Course, 2001).
Example 7. According to Mr. Brockman (Unix Shell Scripts, 2001), with shell scripts, you can automate repetitive tasks on your Unix system.

Home | Up | Daniel Brockman | spicetrader.net | Privacy Policy | Contact