<?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; Tutorials</title>
	<atom:link href="http://thecramerfamily.org/blog/tag/tutorials/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>Speeding up Firefox</title>
		<link>http://thecramerfamily.org/blog/speeding-up-firefox/</link>
		<comments>http://thecramerfamily.org/blog/speeding-up-firefox/#comments</comments>
		<pubDate>Thu, 07 Apr 2005 16:48:42 +0000</pubDate>
		<dc:creator>Dan</dc:creator>
				<category><![CDATA[Other]]></category>
		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://www.thecramerfamily.org/blog/?p=248</guid>
		<description><![CDATA[Firefox is my browser of choice. I really love the tabbed features, extensions and correct rendering of css. There are times though when it feels sooooo slow. It is mainly when starting up the program and occasionaly when opening links in new popup windows. So whenever I can find some tips to speed it up, [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://photos6.flickr.com/7961327_4179f4fe8b_o.gif" alt="firefox" /><a href="http://mozilla.org/firefox">Firefox</a> is my browser of choice. I really love the tabbed features, extensions and correct rendering of css. There are times though when it feels <strong>sooooo</strong> slow. It is mainly when starting up the program and occasionaly when opening links in new popup windows. So whenever I can find some tips to speed it up, I am very excited. As long as they don&#8217;t cause it to freeze and crash more often.</p>
<p>As much as people talk about what a great product Firefox is, I still have it crash on me several times a day. Fortunately it&#8217;s usually not a big deal, and <em>yes</em> I understand that it could be caused by the extensions I have. <strong>BUT STILL</strong> crashing shouldn&#8217;t be the norm. I think that I have been too conditioned to think it&#8217;s ok for a program to crash as long as I like everything else.</p>
<p>Anyway, tips to speed up Firefox:</p>
<ul>
<li> Enter about:config in the Firefox address bar to edit your browser configuration.</li>
<li>   Set network.http.pipelining to true. (You can toggle it by double clicking on it.</li>
<li>Set network.http.proxy.pipelining to true.</li>
<li>  Set network.http.pipelining.maxrequests to something bigger than 4. I set it to 10.</li>
<li>  Create a new setting called nglayout.initialpaint.delay and set it to 0. To create a new setting, right click on the page, select New and then select Integer (since this setting is a number).</li>
</ul>
<script src="http://feeds.feedburner.com/~s/djcramer?i=http://thecramerfamily.org/blog/speeding-up-firefox/" type="text/javascript" charset="utf-8"></script>]]></content:encoded>
			<wfw:commentRss>http://thecramerfamily.org/blog/speeding-up-firefox/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tables</title>
		<link>http://thecramerfamily.org/blog/tables/</link>
		<comments>http://thecramerfamily.org/blog/tables/#comments</comments>
		<pubDate>Thu, 17 Feb 2005 18:33:24 +0000</pubDate>
		<dc:creator>Dan</dc:creator>
				<category><![CDATA[Links]]></category>
		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://www.thecramerfamily.org/blog/?p=229</guid>
		<description><![CDATA[With the standards revolution in full swing, it seems that a lot of sites look at tables as pure evil. But you are actually supposed to use tables for tabular data. I know it sounds crazy, but information that is supposed to be in a table, actually looks good in a table. Enter Setting the [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://photos3.flickr.com/4962149_1cc246e886.jpg" alt="Table" /></p>
<p>With the standards revolution in full swing, it seems that a lot of sites look at tables as pure evil. But you are actually supposed to use tables for <strong><em>tabular data</em></strong>. I know it sounds crazy, but information that is supposed to be in a table, actually looks good in a table.</p>
<p>Enter <a href="http://www.blakems.com/archives/000095.html">Setting the Table</a>. A very well written and comprehensive look at tables and some of the things you can do to style them. One thing in particular was the <code>col</code> element that lets you style an entire column. Very cool, although I thought I read somewhere the IE doesn&#8217;t support this attribute (big surprise). I&#8217;ll have to check on that</p>
<script src="http://feeds.feedburner.com/~s/djcramer?i=http://thecramerfamily.org/blog/tables/" type="text/javascript" charset="utf-8"></script>]]></content:encoded>
			<wfw:commentRss>http://thecramerfamily.org/blog/tables/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Microsoft Searching</title>
		<link>http://thecramerfamily.org/blog/microsoft-searching/</link>
		<comments>http://thecramerfamily.org/blog/microsoft-searching/#comments</comments>
		<pubDate>Thu, 27 Jan 2005 15:21:35 +0000</pubDate>
		<dc:creator>Dan</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Website]]></category>

		<guid isPermaLink="false">http://www.thecramerfamily.org/blog/?p=210</guid>
		<description><![CDATA[With all the hoopla about the Desktop Search guides, it is very intersting to note that Windows XP already has a very fast search tool built in. It&#8217;s the mysterious Indexer, that through an error in programming, never got hooked to the Search dialog. All you need to do to enable this feature is add [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://photos3.flickr.com/3870615_b78f439d9f_s.jpg" alt="Search" />With all the hoopla about the Desktop Search guides, it is very intersting to note that Windows XP already has a very fast search tool built in. It&#8217;s the mysterious Indexer, that through an error in programming, never got hooked to the Search dialog. All you need to do to enable this feature is add a &#8220;!&#8221; before your search term. The speed is amazing! Everything that a desktop search should be.</p>
<p><a href="http://www.theinquirer.net/?article=20214">Read the Article</a></p>
<script src="http://feeds.feedburner.com/~s/djcramer?i=http://thecramerfamily.org/blog/microsoft-searching/" type="text/javascript" charset="utf-8"></script>]]></content:encoded>
			<wfw:commentRss>http://thecramerfamily.org/blog/microsoft-searching/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="http://photos3.flickr.com/3870615_b78f439d9f_t.jpg" length="2723" type="image/jpeg" />
<enclosure url="http://photos3.flickr.com/3870615_b78f439d9f_s.jpg" length="2156" type="image/jpeg" />
		</item>
		<item>
		<title>Using JUnit and Eclipse</title>
		<link>http://thecramerfamily.org/blog/using-junit-and-eclips/</link>
		<comments>http://thecramerfamily.org/blog/using-junit-and-eclips/#comments</comments>
		<pubDate>Thu, 07 Oct 2004 19:07:52 +0000</pubDate>
		<dc:creator>Dan</dc:creator>
				<category><![CDATA[Links]]></category>
		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://www.thecramerfamily.org/blog/?p=135</guid>
		<description><![CDATA[Using JUnit With Eclipse IDE by Alexander Prohorenko and Olexiy Prohorenko &#8212; Test-driven development principles call for writing the tests before writing any code. Alexander and Olexiy Prohorenko demonstrate how this approach can be used with the JUnit testing tool and the Eclipse IDE. This is a great article about how you can get JUnit [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.onjava.com/pub/a/onjava/2004/02/04/juie.html" onmouseover="link(this)">Using JUnit With Eclipse IDE</a> by Alexander Prohorenko and Olexiy Prohorenko &#8212; Test-driven development principles call for writing the tests before writing any code. Alexander and Olexiy Prohorenko demonstrate how this approach can be used with the JUnit testing tool and the Eclipse IDE.</p>
<p>This is a great article about how you can get <a href="//junit.org" onmouseover="link(this)">JUnit</a> up and running with the <a href="//eclipse.org" onmouseover="link(this)">Eclipse IDE</a>. I am using Eclipse at work and the more and more that I use it the more impressed I am with its power and usability. And use cases are the best for taking some of the guesswork out of coding.</p>
<script src="http://feeds.feedburner.com/~s/djcramer?i=http://thecramerfamily.org/blog/using-junit-and-eclips/" type="text/javascript" charset="utf-8"></script>]]></content:encoded>
			<wfw:commentRss>http://thecramerfamily.org/blog/using-junit-and-eclips/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</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>
