<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>The Cramer Family&#187; Articles</title>
	<atom:link href="http://thecramerfamily.org/blog/tag/articles/feed/" rel="self" type="application/rss+xml" />
	<link>http://thecramerfamily.org/blog</link>
	<description>4 Boys, 3 Pets, 2 Crazy Parents, 1 Blog and 0 Boring Days</description>
	<lastBuildDate>Sun, 15 Aug 2010 18:04:49 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Fraud Advise</title>
		<link>http://thecramerfamily.org/blog/fraud-advise/</link>
		<comments>http://thecramerfamily.org/blog/fraud-advise/#comments</comments>
		<pubDate>Wed, 09 Mar 2005 00:39:00 +0000</pubDate>
		<dc:creator>Dan</dc:creator>
				<category><![CDATA[Articles]]></category>

		<guid isPermaLink="false">http://www.thecramerfamily.org/blog/?p=237</guid>
		<description><![CDATA[In the interest of Service and good will, but really just to provide my own online copy here&#8217;s an email that I got from my dad to day. Some good advice to follow ATTORNEY&#8217;S ADVICE &#8212; NO CHARGE Read this and make a copy for your files in case you need to refer to it [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://photos5.flickr.com/8127926_4b39e16863_s.jpg" alt="money"/>In the interest of Service and good will, but really just to provide my own online copy here&#8217;s an email that I got from my dad to day. Some good advice to follow</p>
<p>ATTORNEY&#8217;S ADVICE &#8212; NO CHARGE Read  this and make a copy for your files in case you need to refer to it someday. Maybe we should all take some of his advice!</p>
<p>A corporate attorney sent the following out to the employees in his company.</p>
<p>1.  The next time you order checks have only your initials (instead of first name) and last name put on them. If someone takes your checkbook, they will not know if you sign our checks with just your initials or your first name, but your bank will know how you sign your checks.</p>
<p>2.  Do not sign the back of your credit cards.  Instead, put &#8220;PHOTO ID REQUIRED&#8221;.</p>
<p><em><strong>Note from me: </strong>Your mileage may vary on this one, my signature is completely smeared off and I am hardly ever asked for photo id</em></p>
<p>3. When you are writing checks to  pay on your credit card accounts, DO NOT put the complete account number on  the &#8220;For&#8221; line. Instead, just put the last four numbers. The credit card  company knows the rest of the number, and anyone who might be handling your check as it passes through all the check processing channels won&#8217;t have access to it.</p>
<p>4. Put your work phone # on your checks instead of your  home phone.If you have a PO Box use that instead of your home address. If you do not have a PO Box, use your work address. Never have your SS#  printed on your checks.(DUH!) You can add it if it is necessary. But if you have it printed, anyone can get it.</p>
<p>5. Place the contents of your wallet on a photocopy machine. Do both sides of each license, credit card, etc. You will know what you had in your wallet and all of the account numbers and phone numbers to call and cancel. Keep the photocopy in a safe place. I also carry a photocopy of my passport when travel either here or abroad. We&#8217;ve all heard horror stories about fraud that&#8217;s committed on us in stealing a name, address, Social Security number, credit cards.</p>
<p>Unfortunately, I, an attorney, have  firsthand knowledge because my wallet was stolen last month. Within a  week, the thieve(s) ordered an expensive monthly cell phone package,  applied for a VISA credit card, had a credit line approved to buy a Gateway computer, received a PIN number from DMV to change my driving record information online, and more. But here&#8217;s some critical  information to limit the damage in case this happens to you or someone you know:</p>
<p>1. We have been told we should cancel our credit cards  immediately. But the key is having the toll free numbers and your card  numbers handy so you know whom to call.  Keep those where you can find them.</p>
<p>2. File a police report immediately in the jurisdiction where  your credit cards, etc., were stolen. This proves to credit providers you were diligent, and this is a first step toward an investigation (if  there ever is one).</p>
<p>But here&#8217;s what is perhaps most important of all: (I never even thought to do this.)</p>
<p>3. Call the 3 national credit reporting organizations immediately to place a fraud alert on your name and Social Security number. I had never heard of doing that until advised by a bank that called to tell me an application for credit was made over the Internet in my name. The alert means any company that checks your credit knows your information was stolen, and they have to  contact you by phone to authorize new credit.</p>
<p>By the time I was advised to do this, almost two weeks after the theft, all the damage had been done. There are records of all the credit checks initiated by the thieves&#8217; purchases, none of which I knew about before  placing the alert.  Since then, no additional damage has been done, and  the thieves threw my wallet away. This weekend (someone turned it in).  It  seems to have stopped them dead in their tracks.</p>
<p> Now, here are the numbers you always need to contact about your wallet,  etc., has been stolen:</p>
<p> 1.) Equifax:  1-800-525-6285<br />
 2.) Experian (formerly TRW): 1-888-397-3742<br />
 3.) Trans  Union: 1-800-680-7289<br />
 4.) Social Security Administration (fraud line):  1-800-269-0271</p>
<p>So there you go, good advice and a few things I had never thought about. This is a scary problem that won&#8217;t go away by not thinking about it. Which seems to be the current method of fighting it.</p>
<script src="http://feeds.feedburner.com/~s/djcramer?i=http://thecramerfamily.org/blog/fraud-advise/" type="text/javascript" charset="utf-8"></script>]]></content:encoded>
			<wfw:commentRss>http://thecramerfamily.org/blog/fraud-advise/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Java regex</title>
		<link>http://thecramerfamily.org/blog/java-regex/</link>
		<comments>http://thecramerfamily.org/blog/java-regex/#comments</comments>
		<pubDate>Thu, 03 Feb 2005 15:41:38 +0000</pubDate>
		<dc:creator>Dan</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[Other]]></category>

		<guid isPermaLink="false">http://www.thecramerfamily.org/blog/?p=216</guid>
		<description><![CDATA[After pulling my hair out trying to use the String.matches() function I stumbled upon this entry that helped me realize that I wasn&#8217;t going crazy, but that there actually was something wrong (unexpected) happening. The entire string needed to match not just a part as I was thinking. I&#8217;m glad I&#8217;m not nuts! And now [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://photos2.flickr.com/3550588_a16c9cefb9_t.jpg" alt="Java" />After pulling my hair out trying to use the String.matches() function I stumbled upon <a href="http://www.blueskyonmars.com/archives/2003/10/31/14_stringmatches_is_dumb.html">this</a> entry that helped me realize that I wasn&#8217;t going crazy, but that there actually was something wrong (unexpected) happening. The entire string needed to match not just a part as I was thinking. I&#8217;m glad I&#8217;m not nuts!</p>
<p>And now I&#8217;ve found <a href="http://www.regular-expressions.info/javaexample.html">this tool</a> that should show what will be matched given a java reg expression. Where have you been all my life (ie since Friday)</p>
<script src="http://feeds.feedburner.com/~s/djcramer?i=http://thecramerfamily.org/blog/java-regex/" type="text/javascript" charset="utf-8"></script>]]></content:encoded>
			<wfw:commentRss>http://thecramerfamily.org/blog/java-regex/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="http://photos2.flickr.com/3550588_a16c9cefb9_t.jpg" length="2381" type="image/jpeg" />
		</item>
		<item>
		<title>Auto Updating Photo Album</title>
		<link>http://thecramerfamily.org/blog/auto-updating-photo-album/</link>
		<comments>http://thecramerfamily.org/blog/auto-updating-photo-album/#comments</comments>
		<pubDate>Tue, 17 Aug 2004 22:47:59 +0000</pubDate>
		<dc:creator>Dan</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://www.thecramerfamily.org/blog/?p=123</guid>
		<description><![CDATA[Digital cameras are becoming more and more common. But creating new pages for every single picture that you take can be time consuming to say the least. Here&#8217;s how you can make a simple photo album that automatically scans and displays all of the pictures in a specified folder. Note: The idea for this came [...]]]></description>
			<content:encoded><![CDATA[<p><img src="images/blog/csharp.jpg" alt="csharp tutorial"/>Digital cameras are becoming more and more common. But creating new pages for every single picture that you take can be time consuming to say the least. Here&#8217;s how you can make a simple photo album that automatically scans and displays all of the pictures in a specified folder.</p>
<p>Note: The idea for this came from <a href="//www.aspalliance.com/chrisg/default.asp?article=130aspalliance.com"  onmouseover="link(this)">aspalliance.com</a>. I&#8217;ve converted the code to C# and added features,comments and instructions.</p>
<p><span id="more-125"></span></p>
<p>First we need to import the System.IO namespace. Do so by adding this line to the top of your page.</p>
<pre lang="csharp"><script language="C#" runat="server">
string filePath = "relative-path-to-your-images/";
/*

The Hastable is part of the System.Collections class.
It stores information using key-value pairs.
This isn't the only way to implement this but it is nice
because we need the two values to open the
large version of our picture

*/

Hashtable pictures = new Hashtable();

void Page_Load(){
FileInfo file;
string fileName = "";

string[] files;
/*
This creates an array of files containing the
filenames of all the files in your picture directory
*/

files = Directory.GetFiles >>
   (Server.MapPath(filePath),"*.*");

//We want to loop through this array and
//add only picture files to our Hashtable

for(int i=0;i<files .Length;i++){
file = new FileInfo(files[i]);
fileName = file.Name.ToLower();
/*
To add to the Hashtable we use its
Add method. Add takes a key
followed by a value.Both the
key and value are objects,
so you can put anything you
want in
*/
if(fileName.EndsWith(".jpg")||
fileName.EndsWith(".gif")){
pictures.Add(filePath+file.Name, >>
"genThumb.aspx?src=" >>
+filePath+file.Name);
}
}
}
</script>
</pre>
<p>Now we need to build the unordered list that will display the pictures</p>
<pre lang="csharp">
<ul>
    < %
    /*
    The Enumerator allows you to loop through the collection
 object without complicated code
    */
    IDictionaryEnumerator myEnum= pictures.GetEnumerator();
    //We'll use this int to control the number of columns
    int i=1;
    while(myEnum.MoveNext()){
        /*
        Each picture is given a link that is contained
in the Key. This will allow you to click on a pic
and get the full size version. The value is a link
 to our thumbnail generating page which
shrinks the image for a thumbnail
        */
        Response.Write("
<li><a href="+myEnum.Key +  >>
" target=_new>");
        Response.Write("<img border=0 src="+ >>
myEnumValue+"/>");
        Response.Write("</a></li>

");
        i++;
    }
    %>
</ul>
</pre>
<p>We now need a page that shrinks our images. All we do is create a page that returns an actual image, we can then reference this page within image tags!</p>
<pre lang="csharp">
<%@ Page Language="C#" Debug="true" %>
<%@ Import Namespace="System.IO"%>
<%@ Import Namespace="System.Drawing"%>
<%@ Import Namespace="System.Drawing.Imaging"%>
<script language="C#" runat="server">
//The largest size(height or width) for thumbnail
double IMGCON = 120;
/*
This function takes the width and height of the picture,
determines which is bigger and generates a
scale factor
*/

Size newThumbSize(int curWidth,int curHeight){
    double tMult;
    if(curHeight>curWidth){
        tMult = IMGCON / curHeight;
    }
    else{
        tMult = doubleIMGCON/curWidth;
    }
    int nW,nH;
    nW = (int)(curWidth*tMult);
    nH = (int)(curHeight*tMult);

    //The Size object helps create our new image object

    Size newSize = new Size((int)(curWidth*tMult), >>
(int)(curHeight*tMult));
    return newSize;
}
void Page_Load(){
    string src = Request.QueryString["src"];
    if(src !=null){
        //get the original pictures
        Image img = >>
Image.FromFile(Server.MapPath(src));

        //set the format to be the same as original
        ImageFormat  thisForm = >>
 img.RawFormat;

        //get the a new size
        Size thumbSize = >>
newThumbSize(img.Width,img.Height);

        //Our new, smaller image
        Bitmap imgOut = >>
new Bitmap((Image)img,thumbSize);

        if(thisForm.Equals(ImageFormat.Gif)){
            Response.ContentType="image/gif";
        }
        else{
            Response.ContentType="image/jpeg";
        }
        /*

        Writes the image to the Response stream,
drawing it on the page
        */

        imgOut.Save(Response.OutputStream,thisForm);

        Response.Flush();
        //Clean Up
        img.Dispose();
        imgOut.Dispose();
    }
}
</script>
</pre>
<p>This page serves as the source for the images on our photo album page. It takes the path of the big picture and writes the smaller image to the Response<br />
Output stream. Save this file as getThumb.aspx and place it in the same directory<br />
as your photo album page.</p>
<p>There you have it. No longer do you need to painstakingly add each picture manually to your webpage to amaze your friends. Instead, justdrag and drop the picture into the designated folder and your off. Modifications to allow you to change directories or to recurse through the<br />
given directories will be left for your own imagination.<br />
You could also modify this code to display other file types, the choices are endless!</p>
<p>Enjoy!</p>
<script src="http://feeds.feedburner.com/~s/djcramer?i=http://thecramerfamily.org/blog/auto-updating-photo-album/" type="text/javascript" charset="utf-8"></script>]]></content:encoded>
			<wfw:commentRss>http://thecramerfamily.org/blog/auto-updating-photo-album/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
