<?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>Code With Design</title>
	<atom:link href="http://codewithdesign.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://codewithdesign.com</link>
	<description>Web development, code, design, css, all around programming blog</description>
	<lastBuildDate>Fri, 03 Sep 2010 20:38:13 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Internet Audio Database</title>
		<link>http://codewithdesign.com/2010/09/03/internet-audio-database/</link>
		<comments>http://codewithdesign.com/2010/09/03/internet-audio-database/#comments</comments>
		<pubDate>Fri, 03 Sep 2010 20:38:13 +0000</pubDate>
		<dc:creator>Caleb</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://codewithdesign.com/2010/09/03/internet-audio-database/</guid>
		<description><![CDATA[There is a new project that is currently being built. The idea behind the project is to log songs, artists, albums and the people behind them. So far the database is small but if you would like in please contact me through skorg.org. You can also visit the site and see how it is coming [...]


No related posts.]]></description>
			<content:encoded><![CDATA[<p>There is a new project that is currently being built. The idea behind the project is to log songs, artists, albums and the people behind them. So far the database is small but if you would like in please contact me through skorg.org. You can also visit the site and see how it is coming along through iadbs.com, internetaudiodatabase.com</p>


<!-- Begin SexyBookmarks Menu Code -->
<div class="sexy-bookmarks sexy-bookmarks-expand">
<ul class="socials">
		<li class="sexy-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://codewithdesign.com/2010/09/03/internet-audio-database/&amp;title=Internet+Audio+Database" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="sexy-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://codewithdesign.com/2010/09/03/internet-audio-database/&amp;t=Internet+Audio+Database" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="sexy-twitter">
			<a href="http://twitter.com/home?status=Internet+Audio+Database+-+http://bit.ly/9CuC6Y+(via+@calebjonasson)" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="sexy-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://codewithdesign.com/2010/09/03/internet-audio-database/&amp;title=Internet+Audio+Database" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="sexy-delicious">
			<a href="http://del.icio.us/post?url=http://codewithdesign.com/2010/09/03/internet-audio-database/&amp;title=Internet+Audio+Database" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="sexy-designbump">
			<a href="http://designbump.com/submit?url=http://codewithdesign.com/2010/09/03/internet-audio-database/&amp;title=Internet+Audio+Database&amp;body=There%20is%20a%20new%20project%20that%20is%20currently%20being%20built.%20The%20idea%20behind%20the%20project%20is%20to%20log%20songs%2C%20artists%2C%20albums%20and%20the%20people%20behind%20them.%20So%20far%20the%20database%20is%20small%20but%20if%20you%20would%20like%20in%20please%20contact%20me%20through%20skorg.org.%20You%20can%20also%20visit%20the%20site%20and%20see%20how%20it%20is%20coming%20along%20through" rel="nofollow" class="external" title="Bump this on DesignBump">Bump this on DesignBump</a>
		</li>
		<li class="sexy-comfeed">
			<a href="http://codewithdesign.com/2010/09/03/internet-audio-database/feed" rel="nofollow" class="external" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="sexy-reddit">
			<a href="http://reddit.com/submit?url=http://codewithdesign.com/2010/09/03/internet-audio-database/&amp;title=Internet+Audio+Database" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>
<!-- End SexyBookmarks Menu Code -->

<img src="http://codewithdesign.com/?ak_action=api_record_view&id=413&type=feed" alt="" />

<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://codewithdesign.com/2010/09/03/internet-audio-database/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SQL – An introduction to Keys</title>
		<link>http://codewithdesign.com/2010/05/23/sql-%e2%80%93-an-introduction-to-keys/</link>
		<comments>http://codewithdesign.com/2010/05/23/sql-%e2%80%93-an-introduction-to-keys/#comments</comments>
		<pubDate>Mon, 24 May 2010 01:23:02 +0000</pubDate>
		<dc:creator>Caleb</dc:creator>
				<category><![CDATA[SQL]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[db]]></category>
		<category><![CDATA[foreign key]]></category>
		<category><![CDATA[Primary key]]></category>
		<category><![CDATA[unique key]]></category>

		<guid isPermaLink="false">http://codewithdesign.com/?p=409</guid>
		<description><![CDATA[This is a tutorial on the basic uses of keys and how they work.


Related posts:<ol><li><a href='http://codewithdesign.com/2010/03/26/going-through-website-creation-part-2-backend/' rel='bookmark' title='Permanent Link: Going through website creation part 2: Backend'>Going through website creation part 2: Backend</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><strong>The Primary Key</strong></p>
<p>Cells inside of your database are all located through an X-axis and a Y-axis. The X-axis is a row and the Y-axis is the column. Because the information inside of a database is stored downward as you go through the table each added record needs a unique identifier to be found. This is where the primary key comes in.</p>
<p>For every table in your database a unique ID is required to find the records and because of this every table has exactly one Primary Key. Without a primary key there would be no way to reference the information stored inside of that row and data would become inaccessible very quickly. This is also the reason why the primary key cannot have the value of “null.”</p>
<p>In a table there can never two of the same key. Two keys would conflict with each other and return bad records, which is why it is impossible to have this. Generally when working on a database you never want to modify the key after it has been created. This would change how the data is accessed and would be a bad idea when it comes to referencing the information should anything go wrong. There are two different kinds of keys. The first kind is a simple key and which is made of one column. The second kind of key is a composite key, which is made of 2 or more columns.</p>
<p>In most cases the Primary key is an integer. This allows simple ordering and counting of records on system however there are cases where a hex number can be used or even a pattern of numbers and letters.</p>
<p>For example, say that we were creating a database for items in a store. Each item has a unique SKU but this is something can change over time so we would still need our primary key to be a number that is completely unique. The naming also will not work for a unique ID due to name changes or the same product name with a change in SKU, which happens over time with different versions and packaging.</p>
<p><strong>Foreign Keys</strong></p>
<p>Foreign keys are used to reference objects or rows from other tables. Theses keys generally reference parent tables from child tables and are used to cross data between tables. This means that the table with the foreign key is always going to be the child in the link.</p>
<p>Unlike the primary key, the foreign key can have a null value, which leads to no link being made between the two tables for that object. These keys also do not need to be unique; in fact they often never are unique do to the nature of how they are used.</p>
<p>An example of the foreign key, continuing from the example used in primary keys, will require us to add another column to the initial table so we will now have ID, SKU, and Vendor. The tables will look like this.</p>
<p><a href="http://codewithdesign.com/wp-content/uploads/2010/05/Screen-shot-2010-05-23-at-6.14.41-PM.png" rel="lightbox[409]"><img class="alignnone size-medium wp-image-410" title="Foreign and unique keys in sql" src="http://codewithdesign.com/wp-content/uploads/2010/05/Screen-shot-2010-05-23-at-6.14.41-PM-600x266.png" alt="" width="360" height="160" /></a></p>
<p>As you can see, in this example we have the foreign key doubling as a primary key in the lower table, which is used in as a vendor in the top table. This is a quick and simple way to store the values easily in the database and comes in handy when working with relationships.</p>


<!-- Begin SexyBookmarks Menu Code -->
<div class="sexy-bookmarks sexy-bookmarks-expand">
<ul class="socials">
		<li class="sexy-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://codewithdesign.com/2010/05/23/sql-%e2%80%93-an-introduction-to-keys/&amp;title=SQL+%E2%80%93+An+introduction+to+Keys" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="sexy-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://codewithdesign.com/2010/05/23/sql-%e2%80%93-an-introduction-to-keys/&amp;t=SQL+%E2%80%93+An+introduction+to+Keys" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="sexy-twitter">
			<a href="http://twitter.com/home?status=SQL+%E2%80%93+An+introduction+to+Keys+-+http://codewithdesign.com/2010/05/23/sql-%e2%80%93-an-introduction-to-keys/+(via+@calebjonasson)" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="sexy-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://codewithdesign.com/2010/05/23/sql-%e2%80%93-an-introduction-to-keys/&amp;title=SQL+%E2%80%93+An+introduction+to+Keys" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="sexy-delicious">
			<a href="http://del.icio.us/post?url=http://codewithdesign.com/2010/05/23/sql-%e2%80%93-an-introduction-to-keys/&amp;title=SQL+%E2%80%93+An+introduction+to+Keys" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="sexy-designbump">
			<a href="http://designbump.com/submit?url=http://codewithdesign.com/2010/05/23/sql-%e2%80%93-an-introduction-to-keys/&amp;title=SQL+%E2%80%93+An+introduction+to+Keys&amp;body=The%20Primary%20Key%0D%0A%0D%0ACells%20inside%20of%20your%20database%20are%20all%20located%20through%20an%20X-axis%20and%20a%20Y-axis.%20The%20X-axis%20is%20a%20row%20and%20the%20Y-axis%20is%20the%20column.%20Because%20the%20information%20inside%20of%20a%20database%20is%20stored%20downward%20as%20you%20go%20through%20the%20table%20each%20added%20record%20needs%20a%20unique%20identifier%20to%20be%20found.%20This" rel="nofollow" class="external" title="Bump this on DesignBump">Bump this on DesignBump</a>
		</li>
		<li class="sexy-comfeed">
			<a href="http://codewithdesign.com/2010/05/23/sql-–-an-introduction-to-keys/feed" rel="nofollow" class="external" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="sexy-reddit">
			<a href="http://reddit.com/submit?url=http://codewithdesign.com/2010/05/23/sql-%e2%80%93-an-introduction-to-keys/&amp;title=SQL+%E2%80%93+An+introduction+to+Keys" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>
<!-- End SexyBookmarks Menu Code -->

<img src="http://codewithdesign.com/?ak_action=api_record_view&id=409&type=feed" alt="" />

<p>Related posts:<ol><li><a href='http://codewithdesign.com/2010/03/26/going-through-website-creation-part-2-backend/' rel='bookmark' title='Permanent Link: Going through website creation part 2: Backend'>Going through website creation part 2: Backend</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://codewithdesign.com/2010/05/23/sql-%e2%80%93-an-introduction-to-keys/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Creating multiple sidebar menus in wordpress</title>
		<link>http://codewithdesign.com/2010/05/22/creating-multiple-sidebar-menus-in-wordpress/</link>
		<comments>http://codewithdesign.com/2010/05/22/creating-multiple-sidebar-menus-in-wordpress/#comments</comments>
		<pubDate>Sat, 22 May 2010 16:48:55 +0000</pubDate>
		<dc:creator>Caleb</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[dynamic menus]]></category>
		<category><![CDATA[footer menu]]></category>
		<category><![CDATA[menu]]></category>
		<category><![CDATA[sidebar]]></category>
		<category><![CDATA[template]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://codewithdesign.com/?p=403</guid>
		<description><![CDATA[Creating additional dynamic menus for a wordpress template.


Related posts:<ol><li><a href='http://codewithdesign.com/2010/03/26/going-through-website-creation-part-2-backend/' rel='bookmark' title='Permanent Link: Going through website creation part 2: Backend'>Going through website creation part 2: Backend</a></li>
<li><a href='http://codewithdesign.com/2010/01/15/creating-user-input-with-menus-in-java/' rel='bookmark' title='Permanent Link: Creating user input with menus in java'>Creating user input with menus in java</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>In this tutorial I won&#8217;t just be making a sidebar menu, but three additional menus that will be placed side by side in the footer. Unfortunately the code for this is not as easy as it may seem. The possibility of creating the sidebars through only your footer.php and sidebar.php is not going to happen. Fortunately the code is very simple and involves a lot of copy and pasting with a couple modifications.</p>
<p>For this tutorial I will be using wordpress 2.9.2 (currently the latest release)</p>
<p>When creating multiple &#8220;sidebars&#8221; You only need to do two things. The first thing is to edit the functions.php page, and the second is to edit the HTML where the sidebar/dynamic menu will be placed.</p>
<p>The first thing that we will be doing is opening our functions.php page. The code for one sidebar should look like this:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #990000;">function_exists</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'register_sidebar_widget'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
    register_sidebar<span style="color: #009900;">&#40;</span><span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
        <span style="color: #0000ff;">'name'</span><span style="color: #339933;">=&gt;</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Sidebar'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'cwj'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
        <span style="color: #0000ff;">'id'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'normal_sidebar'</span><span style="color: #339933;">,</span>
        <span style="color: #0000ff;">'before_widget'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'&lt;li id=&quot;%1$s&quot; class=&quot;widget %2$s&quot;&gt;'</span><span style="color: #339933;">,</span>
        <span style="color: #0000ff;">'after_widget'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'&lt;/li&gt;'</span><span style="color: #339933;">,</span>
        <span style="color: #0000ff;">'before_title'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'&lt;h2 class=&quot;widgettitle&quot;&gt;'</span><span style="color: #339933;">,</span>
        <span style="color: #0000ff;">'after_title'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'&lt;/h2&gt;'</span><span style="color: #339933;">,</span>
    <span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>The next thing we will need to do is modify this code so we can have four dynamic menus throughout our Wordpress theme. We will need to copy and paste the array and change out the name and the ID to something new and exciting. Because the menus will be placed in my footer I will be calling them &#8220;Footer1&#8243; etc for each menu. The ID can be anything as long as it is unique to that specific menu. If you have two menus with the same ID you will only be able to add widgets to the last referenced menu.﻿</p>
<p>The code should now look something like this:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #990000;">function_exists</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'register_sidebar_widget'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
    register_sidebar<span style="color: #009900;">&#40;</span><span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
        <span style="color: #0000ff;">'name'</span><span style="color: #339933;">=&gt;</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Sidebar'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'CJDesign-dark1'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
        <span style="color: #0000ff;">'id'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'normal_sidebar'</span><span style="color: #339933;">,</span>
        <span style="color: #0000ff;">'before_widget'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'&lt;li id=&quot;%1$s&quot; class=&quot;widget %2$s&quot;&gt;'</span><span style="color: #339933;">,</span>
        <span style="color: #0000ff;">'after_widget'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'&lt;/li&gt;'</span><span style="color: #339933;">,</span>
        <span style="color: #0000ff;">'before_title'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'&lt;h2 class=&quot;widgettitle&quot;&gt;'</span><span style="color: #339933;">,</span>
        <span style="color: #0000ff;">'after_title'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'&lt;/h2&gt;'</span><span style="color: #339933;">,</span>
    <span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    register_sidebar<span style="color: #009900;">&#40;</span><span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
        <span style="color: #0000ff;">'name'</span><span style="color: #339933;">=&gt;</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Footer1'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'CJDesign-dark1'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
        <span style="color: #0000ff;">'id'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'col_sidebar1'</span><span style="color: #339933;">,</span>
        <span style="color: #0000ff;">'before_widget'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'&lt;li id=&quot;%1$s&quot; class=&quot;widget %2$s&quot;&gt;'</span><span style="color: #339933;">,</span>
        <span style="color: #0000ff;">'after_widget'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'&lt;/li&gt;'</span><span style="color: #339933;">,</span>
        <span style="color: #0000ff;">'before_title'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'&lt;h2 class=&quot;widgettitle&quot;&gt;'</span><span style="color: #339933;">,</span>
        <span style="color: #0000ff;">'after_title'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'&lt;/h2&gt;'</span><span style="color: #339933;">,</span>
    <span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    register_sidebar<span style="color: #009900;">&#40;</span><span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
        <span style="color: #0000ff;">'name'</span><span style="color: #339933;">=&gt;</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Footer2'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'CJDesign-dark1'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
        <span style="color: #0000ff;">'id'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'col_sidebar2'</span><span style="color: #339933;">,</span>
        <span style="color: #0000ff;">'before_widget'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'&lt;li id=&quot;%1$s&quot; class=&quot;widget %2$s&quot;&gt;'</span><span style="color: #339933;">,</span>
        <span style="color: #0000ff;">'after_widget'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'&lt;/li&gt;'</span><span style="color: #339933;">,</span>
        <span style="color: #0000ff;">'before_title'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'&lt;h2 class=&quot;widgettitle&quot;&gt;'</span><span style="color: #339933;">,</span>
        <span style="color: #0000ff;">'after_title'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'&lt;/h2&gt;'</span><span style="color: #339933;">,</span>
    <span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    register_sidebar<span style="color: #009900;">&#40;</span><span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
        <span style="color: #0000ff;">'name'</span><span style="color: #339933;">=&gt;</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Footer3'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'CJDesign-dark1'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
        <span style="color: #0000ff;">'id'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'col_sidebar3'</span><span style="color: #339933;">,</span>
        <span style="color: #0000ff;">'before_widget'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'&lt;li id=&quot;%1$s&quot; class=&quot;widget %2$s&quot;&gt;'</span><span style="color: #339933;">,</span>
        <span style="color: #0000ff;">'after_widget'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'&lt;/li&gt;'</span><span style="color: #339933;">,</span>
        <span style="color: #0000ff;">'before_title'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'&lt;h2 class=&quot;widgettitle&quot;&gt;'</span><span style="color: #339933;">,</span>
        <span style="color: #0000ff;">'after_title'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'&lt;/h2&gt;'</span><span style="color: #339933;">,</span>
    <span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>The next stage in this tutorial is to quickly and easily insert the line of code to display your newly created dynamic menus. Just place this into the HTML where you would like it to be.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #339933;">!</span><span style="color: #990000;">function_exists</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'dynamic_sidebar'</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">||</span> <span style="color: #339933;">!</span>dynamic_sidebar<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Footer3'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">endif</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>

<p>You simply need to replace where I have Footer3 with the name of the sidebar that you previously created with the function.</p>
<p>The sidebar now looks as follows:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
</pre></td><td class="code"><pre class="php" style="font-family:monospace;">&lt;div class=&quot;footer-col&quot;&gt;
	&lt;ul&gt;
		<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #339933;">!</span><span style="color: #990000;">function_exists</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'dynamic_sidebar'</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">||</span> <span style="color: #339933;">!</span>dynamic_sidebar<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Footer1'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
  		<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">endif</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
    &lt;/ul&gt;
&lt;/div&gt;
&lt;div class=&quot;footer-col&quot;&gt;
	&lt;ul&gt;
		<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #339933;">!</span><span style="color: #990000;">function_exists</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'dynamic_sidebar'</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">||</span> <span style="color: #339933;">!</span>dynamic_sidebar<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Footer2'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
        <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">endif</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
    &lt;/ul&gt;
&lt;/div&gt;
&lt;div class=&quot;footer-col&quot;&gt;
	&lt;ul&gt;
		<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #339933;">!</span><span style="color: #990000;">function_exists</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'dynamic_sidebar'</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">||</span> <span style="color: #339933;">!</span>dynamic_sidebar<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Footer3'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
        <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">endif</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
    &lt;/ul&gt;
&lt;/div&gt;</pre></td></tr></table></div>

<p>And the widgets can be modified through the Wordpress widget page.</p>
<p><a href="http://codewithdesign.com/wp-content/uploads/2010/05/Screen-shot-2010-05-22-at-9.32.17-AM.png" rel="lightbox[403]"><img class="alignnone size-medium wp-image-405" title="Widget page showing 3 footer menus" src="http://codewithdesign.com/wp-content/uploads/2010/05/Screen-shot-2010-05-22-at-9.32.17-AM-600x378.png" alt="&lt;img&gt;" width="600" height="378" /></a></p>
<p>And the final product.</p>
<p><a href="http://codewithdesign.com/wp-content/uploads/2010/05/Screen-shot-2010-05-22-at-9.31.58-AM.png" rel="lightbox[403]"><img class="alignnone size-medium wp-image-404" title="Wordpress 3 sidebar footer" src="http://codewithdesign.com/wp-content/uploads/2010/05/Screen-shot-2010-05-22-at-9.31.58-AM-600x172.png" alt="&lt;img&gt;" width="600" height="172" /></a></p>


<!-- Begin SexyBookmarks Menu Code -->
<div class="sexy-bookmarks sexy-bookmarks-expand">
<ul class="socials">
		<li class="sexy-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://codewithdesign.com/2010/05/22/creating-multiple-sidebar-menus-in-wordpress/&amp;title=Creating+multiple+sidebar+menus+in+wordpress" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="sexy-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://codewithdesign.com/2010/05/22/creating-multiple-sidebar-menus-in-wordpress/&amp;t=Creating+multiple+sidebar+menus+in+wordpress" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="sexy-twitter">
			<a href="http://twitter.com/home?status=Creating+multiple+sidebar+menus+in+wordpress+-+http://bit.ly/caK5w1+(via+@calebjonasson)" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="sexy-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://codewithdesign.com/2010/05/22/creating-multiple-sidebar-menus-in-wordpress/&amp;title=Creating+multiple+sidebar+menus+in+wordpress" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="sexy-delicious">
			<a href="http://del.icio.us/post?url=http://codewithdesign.com/2010/05/22/creating-multiple-sidebar-menus-in-wordpress/&amp;title=Creating+multiple+sidebar+menus+in+wordpress" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="sexy-designbump">
			<a href="http://designbump.com/submit?url=http://codewithdesign.com/2010/05/22/creating-multiple-sidebar-menus-in-wordpress/&amp;title=Creating+multiple+sidebar+menus+in+wordpress&amp;body=In%20this%20tutorial%20I%20won%27t%20just%20be%20making%20a%20sidebar%20menu%2C%20but%20three%20additional%20menus%20that%20will%20be%20placed%20side%20by%20side%20in%20the%20footer.%20Unfortunately%20the%20code%20for%20this%20is%20not%20as%20easy%20as%20it%20may%20seem.%20The%20possibility%20of%20creating%20the%20sidebars%20through%20only%20your%20footer.php%20and%20sidebar.php%20is%20not%20going%20to%20happ" rel="nofollow" class="external" title="Bump this on DesignBump">Bump this on DesignBump</a>
		</li>
		<li class="sexy-comfeed">
			<a href="http://codewithdesign.com/2010/05/22/creating-multiple-sidebar-menus-in-wordpress/feed" rel="nofollow" class="external" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="sexy-reddit">
			<a href="http://reddit.com/submit?url=http://codewithdesign.com/2010/05/22/creating-multiple-sidebar-menus-in-wordpress/&amp;title=Creating+multiple+sidebar+menus+in+wordpress" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>
<!-- End SexyBookmarks Menu Code -->

<img src="http://codewithdesign.com/?ak_action=api_record_view&id=403&type=feed" alt="" />

<p>Related posts:<ol><li><a href='http://codewithdesign.com/2010/03/26/going-through-website-creation-part-2-backend/' rel='bookmark' title='Permanent Link: Going through website creation part 2: Backend'>Going through website creation part 2: Backend</a></li>
<li><a href='http://codewithdesign.com/2010/01/15/creating-user-input-with-menus-in-java/' rel='bookmark' title='Permanent Link: Creating user input with menus in java'>Creating user input with menus in java</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://codewithdesign.com/2010/05/22/creating-multiple-sidebar-menus-in-wordpress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Recycle pages by splitting your website into pieces with PHP</title>
		<link>http://codewithdesign.com/2010/05/18/recycle-pages-by-splitting-your-website-into-pieces-with-php/</link>
		<comments>http://codewithdesign.com/2010/05/18/recycle-pages-by-splitting-your-website-into-pieces-with-php/#comments</comments>
		<pubDate>Wed, 19 May 2010 00:02:41 +0000</pubDate>
		<dc:creator>Caleb</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[video]]></category>
		<category><![CDATA[include]]></category>
		<category><![CDATA[load site from different sources]]></category>
		<category><![CDATA[require]]></category>
		<category><![CDATA[split]]></category>
		<category><![CDATA[website]]></category>

		<guid isPermaLink="false">http://codewithdesign.com/?p=400</guid>
		<description><![CDATA[
Recycle pages by splitting your website into pieces with PHP from Calebj on Vimeo.





		
			Digg this!
		
		
			Share this on Facebook
		
		
			Tweet This!
		
		
			Stumble upon something good? Share it on StumbleUpon
		
		
			Share this on del.icio.us
		
		
			Bump this on DesignBump
		
		
			Subscribe to the comments for this post?
		
		
			Share this on Reddit
		







Related posts:Going Through Website Creation Part 1: Layout
Going through website creation part 2: Backend
Random Images [...]


Related posts:<ol><li><a href='http://codewithdesign.com/2009/11/13/going-through-website-creation-part-1-layout/' rel='bookmark' title='Permanent Link: Going Through Website Creation Part 1: Layout'>Going Through Website Creation Part 1: Layout</a></li>
<li><a href='http://codewithdesign.com/2010/03/26/going-through-website-creation-part-2-backend/' rel='bookmark' title='Permanent Link: Going through website creation part 2: Backend'>Going through website creation part 2: Backend</a></li>
<li><a href='http://codewithdesign.com/2009/12/20/random-images-using-a-php-function-cj_random_image/' rel='bookmark' title='Permanent Link: Random Images Using A PHP Function: cj_random_image'>Random Images Using A PHP Function: cj_random_image</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><object width="400" height="300"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=11853239&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=11853239&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="600" height="400"></embed></object>
<p><a href="http://vimeo.com/11853239">Recycle pages by splitting your website into pieces with PHP</a> from <a href="http://vimeo.com/calebj">Calebj</a> on <a href="http://vimeo.com">Vimeo</a>.</p>


<!-- Begin SexyBookmarks Menu Code -->
<div class="sexy-bookmarks sexy-bookmarks-expand">
<ul class="socials">
		<li class="sexy-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://codewithdesign.com/2010/05/18/recycle-pages-by-splitting-your-website-into-pieces-with-php/&amp;title=Recycle+pages+by+splitting+your+website+into+pieces+with+PHP" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="sexy-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://codewithdesign.com/2010/05/18/recycle-pages-by-splitting-your-website-into-pieces-with-php/&amp;t=Recycle+pages+by+splitting+your+website+into+pieces+with+PHP" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="sexy-twitter">
			<a href="http://twitter.com/home?status=Recycle+pages+by+splitting+your+website+into+pieces+with+PHP+-+http://bit.ly/a67f6Q+(via+@calebjonasson)" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="sexy-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://codewithdesign.com/2010/05/18/recycle-pages-by-splitting-your-website-into-pieces-with-php/&amp;title=Recycle+pages+by+splitting+your+website+into+pieces+with+PHP" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="sexy-delicious">
			<a href="http://del.icio.us/post?url=http://codewithdesign.com/2010/05/18/recycle-pages-by-splitting-your-website-into-pieces-with-php/&amp;title=Recycle+pages+by+splitting+your+website+into+pieces+with+PHP" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="sexy-designbump">
			<a href="http://designbump.com/submit?url=http://codewithdesign.com/2010/05/18/recycle-pages-by-splitting-your-website-into-pieces-with-php/&amp;title=Recycle+pages+by+splitting+your+website+into+pieces+with+PHP&amp;body=Recycle%20pages%20by%20splitting%20your%20website%20into%20pieces%20with%20PHP%20from%20Calebj%20on%20Vimeo." rel="nofollow" class="external" title="Bump this on DesignBump">Bump this on DesignBump</a>
		</li>
		<li class="sexy-comfeed">
			<a href="http://codewithdesign.com/2010/05/18/recycle-pages-by-splitting-your-website-into-pieces-with-php/feed" rel="nofollow" class="external" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="sexy-reddit">
			<a href="http://reddit.com/submit?url=http://codewithdesign.com/2010/05/18/recycle-pages-by-splitting-your-website-into-pieces-with-php/&amp;title=Recycle+pages+by+splitting+your+website+into+pieces+with+PHP" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>
<!-- End SexyBookmarks Menu Code -->

<img src="http://codewithdesign.com/?ak_action=api_record_view&id=400&type=feed" alt="" />

<p>Related posts:<ol><li><a href='http://codewithdesign.com/2009/11/13/going-through-website-creation-part-1-layout/' rel='bookmark' title='Permanent Link: Going Through Website Creation Part 1: Layout'>Going Through Website Creation Part 1: Layout</a></li>
<li><a href='http://codewithdesign.com/2010/03/26/going-through-website-creation-part-2-backend/' rel='bookmark' title='Permanent Link: Going through website creation part 2: Backend'>Going through website creation part 2: Backend</a></li>
<li><a href='http://codewithdesign.com/2009/12/20/random-images-using-a-php-function-cj_random_image/' rel='bookmark' title='Permanent Link: Random Images Using A PHP Function: cj_random_image'>Random Images Using A PHP Function: cj_random_image</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://codewithdesign.com/2010/05/18/recycle-pages-by-splitting-your-website-into-pieces-with-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Remove images and increase load times with CSS3</title>
		<link>http://codewithdesign.com/2010/05/05/remove-images-and-increase-load-times-with-css3/</link>
		<comments>http://codewithdesign.com/2010/05/05/remove-images-and-increase-load-times-with-css3/#comments</comments>
		<pubDate>Wed, 05 May 2010 16:30:49 +0000</pubDate>
		<dc:creator>Caleb</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[css3]]></category>
		<category><![CDATA[drop shadow]]></category>
		<category><![CDATA[opacity]]></category>
		<category><![CDATA[shadow]]></category>

		<guid isPermaLink="false">http://codewithdesign.com/?p=396</guid>
		<description><![CDATA[An article on how to create style techniques that are commonly created using images. This will help you replace images for drop shadows, and the opacity on certain elements using CSS3.


Related posts:<ol><li><a href='http://codewithdesign.com/2009/12/22/making-it-that-much-better-with-css3/' rel='bookmark' title='Permanent Link: Making it that much better with CSS3'>Making it that much better with CSS3</a></li>
<li><a href='http://codewithdesign.com/2009/12/16/css3-drop-shadow-on-text/' rel='bookmark' title='Permanent Link: CSS3 Drop shadow on text'>CSS3 Drop shadow on text</a></li>
<li><a href='http://codewithdesign.com/2009/10/04/creating-a-single-page-login-%e2%80%93-design-view/' rel='bookmark' title='Permanent Link: Creating a Single Page login – Design View'>Creating a Single Page login – Design View</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Recently when working on a clients site I found that there were a lot of images being used when a quick little CSS fix could have done the trick. The basic outline of the site involved a few transparencies and a lot of drop shadows. The drop shadows were placed on the container/wrap and the text had drop shadows that had been all done in Photoshop. (Some of the drop shadows were not consistent.)</p>
<p>After looking at the site I told the client that within three minutes I could remove all of the images being for text, drop shadows and opacity allowing his site to load faster.</p>
<p>The answer was what I had expected and the following code was quickly being thrown into the site.</p>
<p><strong>The Code</strong></p>
<p>For the drop shadows on divs:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
</pre></td><td class="code"><pre class="css" style="font-family:monospace;">.container<span style="color: #00AA00;">&#123;</span>
     <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">1080px</span><span style="color: #00AA00;">;</span>
     <span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">0</span> <span style="color: #993333;">auto</span><span style="color: #00AA00;">;</span>
     -moz-border-radius<span style="color: #00AA00;">:</span><span style="color: #933;">5px</span><span style="color: #00AA00;">;</span>
     -webkit-border-radius<span style="color: #00AA00;">:</span><span style="color: #933;">5px</span><span style="color: #00AA00;">;</span>
     -moz-box-shadow<span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span> <span style="color: #933;">2px</span> <span style="color: #933;">5px</span> <span style="color: #cc00cc;">#666</span><span style="color: #00AA00;">;</span>
     -webkit-box-shadow<span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span> <span style="color: #933;">2px</span> <span style="color: #933;">5px</span> <span style="color: #cc00cc;">#666</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></td></tr></table></div>

<p>For the drop shadows on text:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
</pre></td><td class="code"><pre class="css" style="font-family:monospace;">h3<span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">font-family</span><span style="color: #00AA00;">:</span> Times<span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">letter-spacing</span><span style="color: #00AA00;">:</span> <span style="color: #933;">1px</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">text-shadow</span><span style="color: #00AA00;">:</span> <span style="color: #933;">2px</span> <span style="color: #933;">2px</span> <span style="color: #933;">2px</span> <span style="color: #cc00cc;">#000</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></td></tr></table></div>

<p>For the opacity:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
</pre></td><td class="code"><pre class="css" style="font-family:monospace;"><span style="color: #6666ff;">.sidebar</span> ul<span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">list-style-type</span><span style="color: #00AA00;">:</span><span style="color: #993333;">none</span><span style="color: #00AA00;">;</span>
	opacity<span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0.9</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">180px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></td></tr></table></div>



<!-- Begin SexyBookmarks Menu Code -->
<div class="sexy-bookmarks sexy-bookmarks-expand">
<ul class="socials">
		<li class="sexy-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://codewithdesign.com/2010/05/05/remove-images-and-increase-load-times-with-css3/&amp;title=Remove+images+and+increase+load+times+with+CSS3" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="sexy-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://codewithdesign.com/2010/05/05/remove-images-and-increase-load-times-with-css3/&amp;t=Remove+images+and+increase+load+times+with+CSS3" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="sexy-twitter">
			<a href="http://twitter.com/home?status=Remove+images+and+increase+load+times+with+CSS3+-+http://bit.ly/8ZF0iv+(via+@calebjonasson)" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="sexy-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://codewithdesign.com/2010/05/05/remove-images-and-increase-load-times-with-css3/&amp;title=Remove+images+and+increase+load+times+with+CSS3" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="sexy-delicious">
			<a href="http://del.icio.us/post?url=http://codewithdesign.com/2010/05/05/remove-images-and-increase-load-times-with-css3/&amp;title=Remove+images+and+increase+load+times+with+CSS3" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="sexy-designbump">
			<a href="http://designbump.com/submit?url=http://codewithdesign.com/2010/05/05/remove-images-and-increase-load-times-with-css3/&amp;title=Remove+images+and+increase+load+times+with+CSS3&amp;body=Recently%20when%20working%20on%20a%20clients%20site%20I%20found%20that%20there%20were%20a%20lot%20of%20images%20being%20used%20when%20a%20quick%20little%20CSS%20fix%20could%20have%20done%20the%20trick.%20The%20basic%20outline%20of%20the%20site%20involved%20a%20few%20transparencies%20and%20a%20lot%20of%20drop%20shadows.%20The%20drop%20shadows%20were%20placed%20on%20the%20container%2Fwrap%20and%20the%20text%20had" rel="nofollow" class="external" title="Bump this on DesignBump">Bump this on DesignBump</a>
		</li>
		<li class="sexy-comfeed">
			<a href="http://codewithdesign.com/2010/05/05/remove-images-and-increase-load-times-with-css3/feed" rel="nofollow" class="external" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="sexy-reddit">
			<a href="http://reddit.com/submit?url=http://codewithdesign.com/2010/05/05/remove-images-and-increase-load-times-with-css3/&amp;title=Remove+images+and+increase+load+times+with+CSS3" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>
<!-- End SexyBookmarks Menu Code -->

<img src="http://codewithdesign.com/?ak_action=api_record_view&id=396&type=feed" alt="" />

<p>Related posts:<ol><li><a href='http://codewithdesign.com/2009/12/22/making-it-that-much-better-with-css3/' rel='bookmark' title='Permanent Link: Making it that much better with CSS3'>Making it that much better with CSS3</a></li>
<li><a href='http://codewithdesign.com/2009/12/16/css3-drop-shadow-on-text/' rel='bookmark' title='Permanent Link: CSS3 Drop shadow on text'>CSS3 Drop shadow on text</a></li>
<li><a href='http://codewithdesign.com/2009/10/04/creating-a-single-page-login-%e2%80%93-design-view/' rel='bookmark' title='Permanent Link: Creating a Single Page login – Design View'>Creating a Single Page login – Design View</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://codewithdesign.com/2010/05/05/remove-images-and-increase-load-times-with-css3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Writing and reading objects and arrays to a binary file with java</title>
		<link>http://codewithdesign.com/2010/04/07/writing-and-reading-objects-and-arrays-to-a-binary-file-with-java/</link>
		<comments>http://codewithdesign.com/2010/04/07/writing-and-reading-objects-and-arrays-to-a-binary-file-with-java/#comments</comments>
		<pubDate>Wed, 07 Apr 2010 14:59:31 +0000</pubDate>
		<dc:creator>Caleb</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[array]]></category>
		<category><![CDATA[binary]]></category>
		<category><![CDATA[object]]></category>
		<category><![CDATA[read]]></category>
		<category><![CDATA[write]]></category>

		<guid isPermaLink="false">http://codewithdesign.com/?p=393</guid>
		<description><![CDATA[This article requires that you have read the following java tutorials or you feel comfortable writing and reading variables to a binary file.
Advantage of writing files in binary with java
Reading information from a binary file with java
Writing information to a binary file with java
The first thing that is needed in this tutorial is an object [...]


Related posts:<ol><li><a href='http://codewithdesign.com/2010/03/31/reading-information-from-a-binary-file-with-java/' rel='bookmark' title='Permanent Link: Reading information from a binary file with java'>Reading information from a binary file with java</a></li>
<li><a href='http://codewithdesign.com/2010/03/30/writing-information-to-a-binary-file/' rel='bookmark' title='Permanent Link: Writing information to a binary file in java'>Writing information to a binary file in java</a></li>
<li><a href='http://codewithdesign.com/2010/03/31/advantages-to-writing-files-in-binary-with-java/' rel='bookmark' title='Permanent Link: Advantages to writing files in binary with java'>Advantages to writing files in binary with java</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>This article requires that you have read the following java tutorials or you feel comfortable writing and reading variables to a binary file.</p>
<p><a href="http://codewithdesign.com/2010/03/31/advantages-to-writing-files-in-binary-with-java/">Advantage of writing files in binary with java</a></p>
<p><a href="http://codewithdesign.com/2010/03/31/reading-information-from-a-binary-file-with-java/">Reading information from a binary file with java</a></p>
<p><a href="http://codewithdesign.com/2010/03/30/writing-information-to-a-binary-file/">Writing information to a binary file with java</a></p>
<p>The first thing that is needed in this tutorial is an object that we are going to save into binary. This object is going to be a simple object with one instance variable, two constructors, one of which is default and a get name method.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
</pre></td><td class="code"><pre class="java" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">java.io.Serializable</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">class</span> Person <span style="color: #000000; font-weight: bold;">implements</span> <span style="color: #003399;">Serializable</span><span style="color: #009900;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">private</span> <span style="color: #003399;">String</span> name<span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">public</span> Person<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
        name <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;no name&quot;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
    <span style="color: #000000; font-weight: bold;">public</span> Person<span style="color: #009900;">&#40;</span><span style="color: #003399;">String</span> x<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
        name <span style="color: #339933;">=</span> x<span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #003399;">String</span> getName<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
        <span style="color: #000000; font-weight: bold;">return</span> name<span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>You may notice that at the top of our new object we have a line that says “import java.io.Serializable” This line imports a class that we can use. It is required when we want to turn an object into binary and save it to a file. There is also a line that implements Serializable. This line is needed so the class can use the methods within the class Serializable.</p>
<p>The next piece of code will be added outside of the main method. It is added because we will need to use the file input and output streams along with the object input and output streams. We will also be using an IOException. If you would like to use other exception handling classes you can certainly feel free too. I would advise using the file not found and end of file exception.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
</pre></td><td class="code"><pre class="java" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">java.io.FileOutputStream</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">java.io.FileInputStream</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">java.io.IOException</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">java.io.ObjectOutputStream</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">java.io.ObjectInputStream</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>This next bit of code is going to save what we want for a filename inside of a string variable. After that we will be creating two person objects and two arrays, one being a string type and the other an integer type. The next line of code will create a null output stream then create the output stream while testing it for any errors.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
</pre></td><td class="code"><pre class="java" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">//the filename to create.</span>
        <span style="color: #003399;">String</span> fileName <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;file.dat&quot;</span><span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #666666; font-style: italic;">//Person Objects</span>
        Person p1 <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Person<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Bob&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        Person p2 <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Person<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Paul&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #666666; font-style: italic;">//Array to write</span>
        <span style="color: #003399;">String</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> helloThere <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #003399;">String</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#123;</span><span style="color: #0000ff;">&quot;dog&quot;</span>,<span style="color: #0000ff;">&quot;cat&quot;</span>,<span style="color: #0000ff;">&quot;hamburger&quot;</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
        <span style="color: #000066; font-weight: bold;">int</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> thereHello <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #000066; font-weight: bold;">int</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#123;</span><span style="color: #cc66cc;">1</span>,<span style="color: #cc66cc;">2</span>,<span style="color: #cc66cc;">3</span>,<span style="color: #cc66cc;">4</span>,<span style="color: #cc66cc;">5</span>,<span style="color: #cc66cc;">6</span>,<span style="color: #cc66cc;">7</span>,<span style="color: #cc66cc;">8</span>,<span style="color: #cc66cc;">9</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #666666; font-style: italic;">//creating the space in memory for the file</span>
        <span style="color: #003399;">ObjectOutputStream</span>  outputStream <span style="color: #339933;">=</span> <span style="color: #000066; font-weight: bold;">null</span><span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #000000; font-weight: bold;">try</span><span style="color: #009900;">&#123;</span>
            outputStream <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #003399;">ObjectOutputStream</span><span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> <span style="color: #003399;">FileOutputStream</span><span style="color: #009900;">&#40;</span>fileName<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span><span style="color: #000000; font-weight: bold;">catch</span><span style="color: #009900;">&#40;</span><span style="color: #003399;">IOException</span> e<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
            <span style="color: #003399;">System</span>.<span style="color: #006633;">out</span>.<span style="color: #006633;">println</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Could not open the file.&quot;</span> <span style="color: #339933;">+</span> e<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            <span style="color: #003399;">System</span>.<span style="color: #006633;">exit</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>Writing the objects to a binary file is done in a similar way to writing everything else. Since an array is actually an object it uses the same method as the object person. To write these two kinds of objects we will need to use the try catch in order to handle any errors then inside of that write objects using the outputstream.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
</pre></td><td class="code"><pre class="java" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">try</span><span style="color: #009900;">&#123;</span>
            outputStream.<span style="color: #006633;">writeObject</span><span style="color: #009900;">&#40;</span>p1<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            outputStream.<span style="color: #006633;">writeObject</span><span style="color: #009900;">&#40;</span>p2<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            outputStream.<span style="color: #006633;">writeObject</span><span style="color: #009900;">&#40;</span>helloThere<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            outputStream.<span style="color: #006633;">writeObject</span><span style="color: #009900;">&#40;</span>thereHello<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
            outputStream.<span style="color: #006633;">close</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #009900;">&#125;</span><span style="color: #000000; font-weight: bold;">catch</span><span style="color: #009900;">&#40;</span><span style="color: #003399;">IOException</span> e<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
            <span style="color: #003399;">System</span>.<span style="color: #006633;">out</span>.<span style="color: #006633;">println</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Writing error: &quot;</span> <span style="color: #339933;">+</span> e<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            <span style="color: #003399;">System</span>.<span style="color: #006633;">exit</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>Now that we are done writing the objects to the binary file we will need to read the information back into new objects.</p>
<p>We are going to create a new input stream in the same way that we made the output stream. It will first be of type null and then we will truly create it inside of the try catch blocks.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
</pre></td><td class="code"><pre class="java" style="font-family:monospace;"><span style="color: #003399;">ObjectInputStream</span> inputStream <span style="color: #339933;">=</span> <span style="color: #000066; font-weight: bold;">null</span><span style="color: #339933;">;</span>
        <span style="color: #000000; font-weight: bold;">try</span><span style="color: #009900;">&#123;</span>
            inputStream <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #003399;">ObjectInputStream</span><span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> <span style="color: #003399;">FileInputStream</span><span style="color: #009900;">&#40;</span>fileName<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span><span style="color: #000000; font-weight: bold;">catch</span><span style="color: #009900;">&#40;</span><span style="color: #003399;">IOException</span> e<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
            <span style="color: #003399;">System</span>.<span style="color: #006633;">out</span>.<span style="color: #006633;">println</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;There was a problem opening the file: &quot;</span> <span style="color: #339933;">+</span> e<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            <span style="color: #003399;">System</span>.<span style="color: #006633;">exit</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>Since we are going to pull the information out of the file and reload them as objects we will need to create new objects in memory to show that we have successfully read the file.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
</pre></td><td class="code"><pre class="java" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">//Create new blank objects to store the data in.</span>
        Person newp1 <span style="color: #339933;">=</span> <span style="color: #000066; font-weight: bold;">null</span><span style="color: #339933;">;</span>
        Person newp2 <span style="color: #339933;">=</span> <span style="color: #000066; font-weight: bold;">null</span><span style="color: #339933;">;</span>
        <span style="color: #003399;">String</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> test <span style="color: #339933;">=</span> <span style="color: #000066; font-weight: bold;">null</span><span style="color: #339933;">;</span>
        <span style="color: #000066; font-weight: bold;">int</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> test2 <span style="color: #339933;">=</span> <span style="color: #000066; font-weight: bold;">null</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>In order to read the information we will rely on our trusted try and catch blocks to let us test that everything is going as planned. Inside of the try catch blocks there is going to be the code required to load the objects read from memory into the new objects that we created in the code above.</p>
<p>You will also notice that when we saved the object information to a new object we specified what kind of object it was. This casts the information and sets it up as said object so it can once again use the methods that come along with that object type.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
</pre></td><td class="code"><pre class="java" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">try</span><span style="color: #009900;">&#123;</span>
            newp1 <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span>Person<span style="color: #009900;">&#41;</span>inputStream.<span style="color: #006633;">readObject</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            newp2 <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span>Person<span style="color: #009900;">&#41;</span>inputStream.<span style="color: #006633;">readObject</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            test <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span><span style="color: #003399;">String</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span>inputStream.<span style="color: #006633;">readObject</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            test2 <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">int</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span>inputStream.<span style="color: #006633;">readObject</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            inputStream.<span style="color: #006633;">close</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span><span style="color: #000000; font-weight: bold;">catch</span><span style="color: #009900;">&#40;</span><span style="color: #003399;">Exception</span> e<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
            <span style="color: #003399;">System</span>.<span style="color: #006633;">out</span>.<span style="color: #006633;">println</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;There was an issue reading from the file: &quot;</span> <span style="color: #339933;">+</span> e<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            <span style="color: #003399;">System</span>.<span style="color: #006633;">exit</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>The last thing required is for us to do is test a person and an array. We will do this as follows.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
</pre></td><td class="code"><pre class="java" style="font-family:monospace;"><span style="color: #003399;">System</span>.<span style="color: #006633;">out</span>.<span style="color: #006633;">println</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;newp1<span style="color: #000099; font-weight: bold;">\'</span>s name is &quot;</span> <span style="color: #339933;">+</span> newp1.<span style="color: #006633;">getName</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #003399;">System</span>.<span style="color: #006633;">out</span>.<span style="color: #006633;">println</span><span style="color: #009900;">&#40;</span>test2<span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>If everything goes according to plan then we will have no errors. If you do have an error then please refer to the last bit of code to see if you did anything wrong.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
</pre></td><td class="code"><pre class="java" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">/* Code with Design
 *
 * Created By: Caleb Jonasson
 *
 * Desc: This class file is used to create a binary file,
 * write values to the file and check for errors along the way.
 */</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">java.io.FileOutputStream</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">java.io.FileInputStream</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">java.io.IOException</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">java.io.ObjectOutputStream</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">java.io.ObjectInputStream</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">class</span> writebin <span style="color: #009900;">&#123;</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">static</span> <span style="color: #000066; font-weight: bold;">void</span> main<span style="color: #009900;">&#40;</span><span style="color: #003399;">String</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> args<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #666666; font-style: italic;">//the filename to create.</span>
        <span style="color: #003399;">String</span> fileName <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;file.dat&quot;</span><span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #666666; font-style: italic;">//Person Objects</span>
        Person p1 <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Person<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Bob&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        Person p2 <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Person<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Paul&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #666666; font-style: italic;">//Array to write</span>
        <span style="color: #003399;">String</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> helloThere <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #003399;">String</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#123;</span><span style="color: #0000ff;">&quot;dog&quot;</span>,<span style="color: #0000ff;">&quot;cat&quot;</span>,<span style="color: #0000ff;">&quot;hamburger&quot;</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
        <span style="color: #000066; font-weight: bold;">int</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> thereHello <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #000066; font-weight: bold;">int</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#123;</span><span style="color: #cc66cc;">1</span>,<span style="color: #cc66cc;">2</span>,<span style="color: #cc66cc;">3</span>,<span style="color: #cc66cc;">4</span>,<span style="color: #cc66cc;">5</span>,<span style="color: #cc66cc;">6</span>,<span style="color: #cc66cc;">7</span>,<span style="color: #cc66cc;">8</span>,<span style="color: #cc66cc;">9</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #666666; font-style: italic;">//creating the space in memory for the file</span>
        <span style="color: #003399;">ObjectOutputStream</span>  outputStream <span style="color: #339933;">=</span> <span style="color: #000066; font-weight: bold;">null</span><span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #000000; font-weight: bold;">try</span><span style="color: #009900;">&#123;</span>
            outputStream <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #003399;">ObjectOutputStream</span><span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> <span style="color: #003399;">FileOutputStream</span><span style="color: #009900;">&#40;</span>fileName<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span><span style="color: #000000; font-weight: bold;">catch</span><span style="color: #009900;">&#40;</span><span style="color: #003399;">IOException</span> e<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
            <span style="color: #003399;">System</span>.<span style="color: #006633;">out</span>.<span style="color: #006633;">println</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Could not open the file.&quot;</span> <span style="color: #339933;">+</span> e<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            <span style="color: #003399;">System</span>.<span style="color: #006633;">exit</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
&nbsp;
&nbsp;
&nbsp;
        <span style="color: #000000; font-weight: bold;">try</span><span style="color: #009900;">&#123;</span>
            outputStream.<span style="color: #006633;">writeObject</span><span style="color: #009900;">&#40;</span>p1<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            outputStream.<span style="color: #006633;">writeObject</span><span style="color: #009900;">&#40;</span>p2<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            outputStream.<span style="color: #006633;">writeObject</span><span style="color: #009900;">&#40;</span>helloThere<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            outputStream.<span style="color: #006633;">writeObject</span><span style="color: #009900;">&#40;</span>thereHello<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
            outputStream.<span style="color: #006633;">close</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #009900;">&#125;</span><span style="color: #000000; font-weight: bold;">catch</span><span style="color: #009900;">&#40;</span><span style="color: #003399;">IOException</span> e<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
            <span style="color: #003399;">System</span>.<span style="color: #006633;">out</span>.<span style="color: #006633;">println</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Writing error: &quot;</span> <span style="color: #339933;">+</span> e<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            <span style="color: #003399;">System</span>.<span style="color: #006633;">exit</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
        <span style="color: #003399;">System</span>.<span style="color: #006633;">out</span>.<span style="color: #006633;">println</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Records have been written to the file.&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
&nbsp;
        <span style="color: #666666; font-style: italic;">/*Reading the objects from memory.*/</span>
&nbsp;
        <span style="color: #003399;">ObjectInputStream</span> inputStream <span style="color: #339933;">=</span> <span style="color: #000066; font-weight: bold;">null</span><span style="color: #339933;">;</span>
        <span style="color: #000000; font-weight: bold;">try</span><span style="color: #009900;">&#123;</span>
            inputStream <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #003399;">ObjectInputStream</span><span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> <span style="color: #003399;">FileInputStream</span><span style="color: #009900;">&#40;</span>fileName<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span><span style="color: #000000; font-weight: bold;">catch</span><span style="color: #009900;">&#40;</span><span style="color: #003399;">IOException</span> e<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
            <span style="color: #003399;">System</span>.<span style="color: #006633;">out</span>.<span style="color: #006633;">println</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;There was a problem opening the file: &quot;</span> <span style="color: #339933;">+</span> e<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            <span style="color: #003399;">System</span>.<span style="color: #006633;">exit</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
&nbsp;
        <span style="color: #666666; font-style: italic;">//Create new blank objects to store the data in.</span>
        Person newp1 <span style="color: #339933;">=</span> <span style="color: #000066; font-weight: bold;">null</span><span style="color: #339933;">;</span>
        Person newp2 <span style="color: #339933;">=</span> <span style="color: #000066; font-weight: bold;">null</span><span style="color: #339933;">;</span>
        <span style="color: #003399;">String</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> test <span style="color: #339933;">=</span> <span style="color: #000066; font-weight: bold;">null</span><span style="color: #339933;">;</span>
        <span style="color: #000066; font-weight: bold;">int</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> test2 <span style="color: #339933;">=</span> <span style="color: #000066; font-weight: bold;">null</span><span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #000000; font-weight: bold;">try</span><span style="color: #009900;">&#123;</span>
            newp1 <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span>Person<span style="color: #009900;">&#41;</span>inputStream.<span style="color: #006633;">readObject</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            newp2 <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span>Person<span style="color: #009900;">&#41;</span>inputStream.<span style="color: #006633;">readObject</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            test <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span><span style="color: #003399;">String</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span>inputStream.<span style="color: #006633;">readObject</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            test2 <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">int</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span>inputStream.<span style="color: #006633;">readObject</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            inputStream.<span style="color: #006633;">close</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span><span style="color: #000000; font-weight: bold;">catch</span><span style="color: #009900;">&#40;</span><span style="color: #003399;">Exception</span> e<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
            <span style="color: #003399;">System</span>.<span style="color: #006633;">out</span>.<span style="color: #006633;">println</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;There was an issue reading from the file: &quot;</span> <span style="color: #339933;">+</span> e<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            <span style="color: #003399;">System</span>.<span style="color: #006633;">exit</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
        <span style="color: #003399;">System</span>.<span style="color: #006633;">out</span>.<span style="color: #006633;">println</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Reading of the file: &quot;</span> <span style="color: #339933;">+</span> fileName <span style="color: #339933;">+</span> <span style="color: #0000ff;">&quot; has been completed.&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #666666; font-style: italic;">//Now we test to make sure that it worked correctly.</span>
        <span style="color: #003399;">System</span>.<span style="color: #006633;">out</span>.<span style="color: #006633;">println</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;newp1<span style="color: #000099; font-weight: bold;">\'</span>s name is &quot;</span> <span style="color: #339933;">+</span> newp1.<span style="color: #006633;">getName</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #003399;">System</span>.<span style="color: #006633;">out</span>.<span style="color: #006633;">println</span><span style="color: #009900;">&#40;</span>test2<span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>



<!-- Begin SexyBookmarks Menu Code -->
<div class="sexy-bookmarks sexy-bookmarks-expand">
<ul class="socials">
		<li class="sexy-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://codewithdesign.com/2010/04/07/writing-and-reading-objects-and-arrays-to-a-binary-file-with-java/&amp;title=Writing+and+reading+objects+and+arrays+to+a+binary+file+with+java" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="sexy-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://codewithdesign.com/2010/04/07/writing-and-reading-objects-and-arrays-to-a-binary-file-with-java/&amp;t=Writing+and+reading+objects+and+arrays+to+a+binary+file+with+java" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="sexy-twitter">
			<a href="http://twitter.com/home?status=Writing+and+reading+objects+and+arrays+to+a+binary+file+with+java+-+http://bit.ly/cLIips+(via+@calebjonasson)" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="sexy-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://codewithdesign.com/2010/04/07/writing-and-reading-objects-and-arrays-to-a-binary-file-with-java/&amp;title=Writing+and+reading+objects+and+arrays+to+a+binary+file+with+java" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="sexy-delicious">
			<a href="http://del.icio.us/post?url=http://codewithdesign.com/2010/04/07/writing-and-reading-objects-and-arrays-to-a-binary-file-with-java/&amp;title=Writing+and+reading+objects+and+arrays+to+a+binary+file+with+java" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="sexy-designbump">
			<a href="http://designbump.com/submit?url=http://codewithdesign.com/2010/04/07/writing-and-reading-objects-and-arrays-to-a-binary-file-with-java/&amp;title=Writing+and+reading+objects+and+arrays+to+a+binary+file+with+java&amp;body=This%20article%20requires%20that%20you%20have%20read%20the%20following%20java%20tutorials%20or%20you%20feel%20comfortable%20writing%20and%20reading%20variables%20to%20a%20binary%20file.%0D%0A%0D%0AAdvantage%20of%20writing%20files%20in%20binary%20with%20java%0D%0A%0D%0AReading%20information%20from%20a%20binary%20file%20with%20java%0D%0A%0D%0AWriting%20information%20to%20a%20binary%20file%20with%20java%0D%0A%0D%0AThe" rel="nofollow" class="external" title="Bump this on DesignBump">Bump this on DesignBump</a>
		</li>
		<li class="sexy-comfeed">
			<a href="http://codewithdesign.com/2010/04/07/writing-and-reading-objects-and-arrays-to-a-binary-file-with-java/feed" rel="nofollow" class="external" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="sexy-reddit">
			<a href="http://reddit.com/submit?url=http://codewithdesign.com/2010/04/07/writing-and-reading-objects-and-arrays-to-a-binary-file-with-java/&amp;title=Writing+and+reading+objects+and+arrays+to+a+binary+file+with+java" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>
<!-- End SexyBookmarks Menu Code -->

<img src="http://codewithdesign.com/?ak_action=api_record_view&id=393&type=feed" alt="" />

<p>Related posts:<ol><li><a href='http://codewithdesign.com/2010/03/31/reading-information-from-a-binary-file-with-java/' rel='bookmark' title='Permanent Link: Reading information from a binary file with java'>Reading information from a binary file with java</a></li>
<li><a href='http://codewithdesign.com/2010/03/30/writing-information-to-a-binary-file/' rel='bookmark' title='Permanent Link: Writing information to a binary file in java'>Writing information to a binary file in java</a></li>
<li><a href='http://codewithdesign.com/2010/03/31/advantages-to-writing-files-in-binary-with-java/' rel='bookmark' title='Permanent Link: Advantages to writing files in binary with java'>Advantages to writing files in binary with java</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://codewithdesign.com/2010/04/07/writing-and-reading-objects-and-arrays-to-a-binary-file-with-java/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Objective-C creating objects, methods and variables</title>
		<link>http://codewithdesign.com/2010/04/05/objective-c-creating-objects-methods-and-variables/</link>
		<comments>http://codewithdesign.com/2010/04/05/objective-c-creating-objects-methods-and-variables/#comments</comments>
		<pubDate>Mon, 05 Apr 2010 19:17:32 +0000</pubDate>
		<dc:creator>Caleb</dc:creator>
				<category><![CDATA[objective-c]]></category>
		<category><![CDATA[accessor]]></category>
		<category><![CDATA[create objects]]></category>
		<category><![CDATA[method]]></category>
		<category><![CDATA[mutator]]></category>
		<category><![CDATA[object]]></category>
		<category><![CDATA[variable]]></category>
		<category><![CDATA[xcode]]></category>

		<guid isPermaLink="false">http://codewithdesign.com/?p=384</guid>
		<description><![CDATA[The first thing we need to do is create a no project with Xcode. I will be naming mine “test” but you really don’t need to follow along with that much detail since it is not needed at this stage with the level of coding we will be doing.

The next thing we will need to do is open up our “test.m” file through Xcode. This file contains the default main method but we are going to be creating objects and variables.


Related posts:<ol><li><a href='http://codewithdesign.com/2010/04/07/writing-and-reading-objects-and-arrays-to-a-binary-file-with-java/' rel='bookmark' title='Permanent Link: Writing and reading objects and arrays to a binary file with java'>Writing and reading objects and arrays to a binary file with java</a></li>
<li><a href='http://codewithdesign.com/2010/04/03/objective-c-garbage-collecting/' rel='bookmark' title='Permanent Link: Objective-C garbage collecting'>Objective-C garbage collecting</a></li>
<li><a href='http://codewithdesign.com/2010/01/17/create-a-press-enter-to-continue-with-java/' rel='bookmark' title='Permanent Link: Create a press enter to continue with java'>Create a press enter to continue with java</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>In this tutorial we will be creating a console application to try every part of our code out. Please make sure that the console is not set to its default language, which is C and is instead set to foundation.</p>
<p>The first thing we need to do is create a no project with Xcode. I will be naming mine “test” but you really don’t need to follow along with that much detail since it is not needed at this stage with the level of coding we will be doing.</p>
<p>The next thing we will need to do is open up our “test.m” file through Xcode. This file contains the default main method but we are going to be creating objects and variables.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
</pre></td><td class="code"><pre class="c" style="font-family:monospace;"><span style="color: #339933;">#import &lt;Foundation/Foundation.h&gt;</span>
&nbsp;
<span style="color: #993333;">int</span> main <span style="color: #009900;">&#40;</span><span style="color: #993333;">int</span> argc<span style="color: #339933;">,</span> <span style="color: #993333;">const</span> <span style="color: #993333;">char</span> <span style="color: #339933;">*</span> argv<span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    NSAutoreleasePool <span style="color: #339933;">*</span> pool <span style="color: #339933;">=</span> <span style="color: #009900;">&#91;</span><span style="color: #009900;">&#91;</span>NSAutoreleasePool alloc<span style="color: #009900;">&#93;</span> init<span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #666666; font-style: italic;">// insert code here...</span>
    NSLog<span style="color: #009900;">&#40;</span>@<span style="color: #ff0000;">&quot;Hello, World!&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#91;</span>pool drain<span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">return</span> <span style="color: #0000dd;">0</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>Now you are going to need to create an interface and an implementation of the class made in the interface. Luckily for us Xcode has an auto complete feature built in that look something like this.</p>
<p><a href="http://codewithdesign.com/wp-content/uploads/2010/04/Screen-shot-2010-04-05-at-9.23.01-AM.png" rel="lightbox[384]"><img class="alignnone size-full wp-image-385" title="Xcode autocomplete" src="http://codewithdesign.com/wp-content/uploads/2010/04/Screen-shot-2010-04-05-at-9.23.01-AM.png" alt="" width="295" height="151" /></a></p>
<p>Until we start modifying the information in the interface and implementation you can just leave it with its default values that are given when it auto completes.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
</pre></td><td class="code"><pre class="c" style="font-family:monospace;"><span style="color: #339933;">#import &lt;Foundation/Foundation.h&gt;</span>
&nbsp;
@interface <span style="color: #339933;">&lt;</span><span style="color: #339933;">#class#&gt; : &lt;#superclass#&gt;</span>
<span style="color: #009900;">&#123;</span>
	<span style="color: #339933;">&lt;</span><span style="color: #339933;">#ivars#&gt;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #339933;">&lt;</span><span style="color: #339933;">#methods#&gt;</span>
&nbsp;
@end
&nbsp;
@implementation <span style="color: #339933;">&lt;</span><span style="color: #339933;">#class#&gt;</span>
&nbsp;
<span style="color: #339933;">&lt;</span><span style="color: #339933;">#methods#&gt;</span>
&nbsp;
@end
&nbsp;
&nbsp;
&nbsp;
<span style="color: #993333;">int</span> main <span style="color: #009900;">&#40;</span><span style="color: #993333;">int</span> argc<span style="color: #339933;">,</span> <span style="color: #993333;">const</span> <span style="color: #993333;">char</span> <span style="color: #339933;">*</span> argv<span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    NSAutoreleasePool <span style="color: #339933;">*</span> pool <span style="color: #339933;">=</span> <span style="color: #009900;">&#91;</span><span style="color: #009900;">&#91;</span>NSAutoreleasePool alloc<span style="color: #009900;">&#93;</span> init<span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #666666; font-style: italic;">// insert code here...</span>
    NSLog<span style="color: #009900;">&#40;</span>@<span style="color: #ff0000;">&quot;Hello, World!&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#91;</span>pool drain<span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">return</span> <span style="color: #0000dd;">0</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>The next thing we will be doing is creating the actual object from our interface. This requires us to create an object name, which in this case will be a “Person”, and it also requires a super class, which we will send to “NSObject.”</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
</pre></td><td class="code"><pre class="c" style="font-family:monospace;">@interface Person <span style="color: #339933;">:</span> NSObject
<span style="color: #009900;">&#123;</span></pre></td></tr></table></div>

<p>Note: It is standard and common practice to associate objects as follows: “PersonObjectSomething.” You will notice that when naming all of the words are capitalized. This is common practice when naming classes. When naming methods it is standard to leave that first letter as a lower case like so “thisTestMethod.”</p>
<p>The next things that are required are instance variables. These are variables/information that is associated with the object. For example if we created an object that was a cup then we would have instance variables for weight, liquid capacity, circumference of base, etc.</p>
<p>For our person object we will be creating the instance variables for age and height. Normally I would like to do a name but I will be leaving the string library for another tutorial.</p>
<p>When declaring instance variables, or any variables, you will need to create the data type first then give the variable a name. A simple example of this would be an integer data type named x as you commonly see in math. You can also assign the variable a value when it is first declared.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
</pre></td><td class="code"><pre class="c" style="font-family:monospace;"><span style="color: #993333;">int</span> x<span style="color: #339933;">;</span>
<span style="color: #993333;">int</span> y <span style="color: #339933;">=</span> <span style="color: #0000dd;">32</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>Once we have declared our instance variables for person you should have something that looks like this.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
</pre></td><td class="code"><pre class="c" style="font-family:monospace;"><span style="color: #339933;">#import &lt;Foundation/Foundation.h&gt;</span>
&nbsp;
@interface Person <span style="color: #339933;">:</span> NSObject
<span style="color: #009900;">&#123;</span>
	<span style="color: #993333;">int</span> height<span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// in CM</span>
	<span style="color: #993333;">int</span> age<span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
@end</pre></td></tr></table></div>

<p>Now that we have created our Person interface’ variables we will need to create methods. If you have never worked with methods you may know them by another name, which is a function. If you still haven’t worked with them then you should know that a method is essentially a small sub program running in a larger one. Methods naturally return a value as well however, you can change the method type to void and not have to worry about returning a value.</p>
<p>There are two kinds of basic methods used in programming languages. The first one is called an accessor method and the second one is called a mutator method. The accessor method simply accesses a variable from the object it is derived from and returns said variable. And the mutator changes the value of the variable in some way. For this program we will be using these two types along with another void type that will print information on the screen.</p>
<p>In order to create a method, we must first link to it in the interface section of the code so our object can use it with the variables it contains. For this program we will need to set the height and age, access the height and age, and print the information on the screen. Add this section of code to your interface.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
</pre></td><td class="code"><pre class="c" style="font-family:monospace;"><span style="color: #339933;">-</span><span style="color: #009900;">&#40;</span><span style="color: #993333;">void</span><span style="color: #009900;">&#41;</span>setHeight<span style="color: #339933;">:</span> <span style="color: #009900;">&#40;</span><span style="color: #993333;">int</span><span style="color: #009900;">&#41;</span> x<span style="color: #339933;">;</span>
<span style="color: #339933;">-</span><span style="color: #009900;">&#40;</span><span style="color: #993333;">void</span><span style="color: #009900;">&#41;</span>setAge<span style="color: #339933;">:</span> <span style="color: #009900;">&#40;</span><span style="color: #993333;">int</span><span style="color: #009900;">&#41;</span> x<span style="color: #339933;">;</span>
&nbsp;
<span style="color: #339933;">-</span><span style="color: #009900;">&#40;</span><span style="color: #993333;">int</span><span style="color: #009900;">&#41;</span>getHeight<span style="color: #339933;">;</span>
<span style="color: #339933;">-</span><span style="color: #009900;">&#40;</span><span style="color: #993333;">int</span><span style="color: #009900;">&#41;</span>getAge<span style="color: #339933;">;</span>
&nbsp;
<span style="color: #339933;">-</span><span style="color: #009900;">&#40;</span><span style="color: #993333;">void</span><span style="color: #009900;">&#41;</span>printInfo<span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>You should now have an interface that looks like this.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
</pre></td><td class="code"><pre class="c" style="font-family:monospace;"><span style="color: #339933;">#import &lt;Foundation/Foundation.h&gt;</span>
&nbsp;
@interface Person <span style="color: #339933;">:</span> NSObject
<span style="color: #009900;">&#123;</span>
	<span style="color: #993333;">int</span> height<span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// in CM</span>
	<span style="color: #993333;">int</span> age<span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #339933;">-</span><span style="color: #009900;">&#40;</span><span style="color: #993333;">void</span><span style="color: #009900;">&#41;</span>setHeight<span style="color: #339933;">:</span> <span style="color: #009900;">&#40;</span><span style="color: #993333;">int</span><span style="color: #009900;">&#41;</span> x<span style="color: #339933;">;</span>
<span style="color: #339933;">-</span><span style="color: #009900;">&#40;</span><span style="color: #993333;">void</span><span style="color: #009900;">&#41;</span>setAge<span style="color: #339933;">:</span> <span style="color: #009900;">&#40;</span><span style="color: #993333;">int</span><span style="color: #009900;">&#41;</span> x<span style="color: #339933;">;</span>
&nbsp;
<span style="color: #339933;">-</span><span style="color: #009900;">&#40;</span><span style="color: #993333;">int</span><span style="color: #009900;">&#41;</span>getHeight<span style="color: #339933;">;</span>
<span style="color: #339933;">-</span><span style="color: #009900;">&#40;</span><span style="color: #993333;">int</span><span style="color: #009900;">&#41;</span>getAge<span style="color: #339933;">;</span>
&nbsp;
<span style="color: #339933;">-</span><span style="color: #009900;">&#40;</span><span style="color: #993333;">void</span><span style="color: #009900;">&#41;</span>printInfo<span style="color: #339933;">;</span>
@end</pre></td></tr></table></div>

<p>The next thing we will need to do is create the body of our object. We can do this by filling out the implementation section of our code. As you can see in your Xcode’ code view we have a place for the class to be written and a place for the methods. We are going to change the class to “Person” and start writing in our accessor and mutator methods. When done we will have the following code.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
</pre></td><td class="code"><pre class="c" style="font-family:monospace;">@implementation Person
&nbsp;
<span style="color: #339933;">-</span><span style="color: #009900;">&#40;</span><span style="color: #993333;">void</span><span style="color: #009900;">&#41;</span>setHeight<span style="color: #339933;">:</span> <span style="color: #009900;">&#40;</span><span style="color: #993333;">int</span><span style="color: #009900;">&#41;</span> x<span style="color: #009900;">&#123;</span>
	height <span style="color: #339933;">=</span> x<span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #339933;">-</span><span style="color: #009900;">&#40;</span><span style="color: #993333;">void</span><span style="color: #009900;">&#41;</span>setAge<span style="color: #339933;">:</span> <span style="color: #009900;">&#40;</span><span style="color: #993333;">int</span><span style="color: #009900;">&#41;</span> x<span style="color: #009900;">&#123;</span>
	age <span style="color: #339933;">=</span> x<span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #339933;">-</span><span style="color: #009900;">&#40;</span><span style="color: #993333;">int</span><span style="color: #009900;">&#41;</span>getHeight<span style="color: #009900;">&#123;</span>
	<span style="color: #b1b100;">return</span> height<span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #339933;">-</span><span style="color: #009900;">&#40;</span><span style="color: #993333;">int</span><span style="color: #009900;">&#41;</span>getAge<span style="color: #009900;">&#123;</span>
	<span style="color: #b1b100;">return</span> age<span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #339933;">-</span><span style="color: #009900;">&#40;</span><span style="color: #993333;">void</span><span style="color: #009900;">&#41;</span>printInfo<span style="color: #009900;">&#123;</span>
	NSLog<span style="color: #009900;">&#40;</span>@<span style="color: #ff0000;">&quot;height: %i age: %i&quot;</span><span style="color: #339933;">,</span>height<span style="color: #339933;">,</span> age<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
@end</pre></td></tr></table></div>

<p>Now that we have created our methods and instance variables we will go ahead and create this object and put it into memory. The following code is what we currently have for a main method.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
</pre></td><td class="code"><pre class="c" style="font-family:monospace;"><span style="color: #993333;">int</span> main <span style="color: #009900;">&#40;</span><span style="color: #993333;">int</span> argc<span style="color: #339933;">,</span> <span style="color: #993333;">const</span> <span style="color: #993333;">char</span> <span style="color: #339933;">*</span> argv<span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    NSAutoreleasePool <span style="color: #339933;">*</span> pool <span style="color: #339933;">=</span> <span style="color: #009900;">&#91;</span><span style="color: #009900;">&#91;</span>NSAutoreleasePool alloc<span style="color: #009900;">&#93;</span> init<span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
&nbsp;
    NSLog<span style="color: #009900;">&#40;</span>@<span style="color: #ff0000;">&quot;Hello, World!&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#91;</span>pool drain<span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">return</span> <span style="color: #0000dd;">0</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>When creating objects there are two main terms you will need to familiarize yourself with. The first term is “init” Which of course stands for initialize. This is when you tell the machine that you are ready to use the object. The next term you should be familiar with is “alloc,” it is short for allocate. This is the process of freeing up memory in your ram for the storage of the object.</p>
<p>The code to initialize and allocate an object is written as follows.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
</pre></td><td class="code"><pre class="c" style="font-family:monospace;">Person <span style="color: #339933;">*</span>p1<span style="color: #339933;">;</span>
p1 <span style="color: #339933;">=</span> <span style="color: #009900;">&#91;</span>Person alloc<span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
p1 <span style="color: #339933;">=</span> <span style="color: #009900;">&#91;</span>p1 init<span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>In this process we first named the object p1 and assigned it enough space to hold the object “Person” in memory. The next line of code simply initializes the object so it is ready for our use.</p>
<p>When you are done using your object and you would like to delete it you must include an object release.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="c" style="font-family:monospace;"><span style="color: #009900;">&#91;</span>p1 release<span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>In between creating the object in memory and removing it from memory we are going to add some code to set the variables, access the variables and display what the object holds on screen.</p>
<p>In order to display an object’s methods you will need to follow the form of writing the code as follows.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="c" style="font-family:monospace;"><span style="color: #009900;">&#91;</span>p1 setAge<span style="color: #339933;">:</span><span style="color: #0000dd;">18</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>You can see that the object is placed within square brackets and the first statement is the object name itself. The second statement accepts the method that you would like to call on then a colon and some parameters if you made a method that accepts arguments.</p>
<p>When using a method that returns a value it is possible to load the data type returned into another variable as long as it is of the same data type. We use an example of this with the following lines. You can also use a variable as an argument when setting an objects variable.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
</pre></td><td class="code"><pre class="c" style="font-family:monospace;"><span style="color: #993333;">int</span> g <span style="color: #339933;">=</span> <span style="color: #009900;">&#91;</span>p1 getHeight<span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#91;</span>p1 setAge<span style="color: #339933;">:</span> g<span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>The entire program looks as follows:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
</pre></td><td class="code"><pre class="c" style="font-family:monospace;"><span style="color: #339933;">#import &lt;Foundation/Foundation.h&gt;</span>
&nbsp;
@interface Person <span style="color: #339933;">:</span> NSObject
<span style="color: #009900;">&#123;</span>
	<span style="color: #993333;">int</span> height<span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// in CM</span>
	<span style="color: #993333;">int</span> age<span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #339933;">-</span><span style="color: #009900;">&#40;</span><span style="color: #993333;">void</span><span style="color: #009900;">&#41;</span>setHeight<span style="color: #339933;">:</span> <span style="color: #009900;">&#40;</span><span style="color: #993333;">int</span><span style="color: #009900;">&#41;</span> x<span style="color: #339933;">;</span>
<span style="color: #339933;">-</span><span style="color: #009900;">&#40;</span><span style="color: #993333;">void</span><span style="color: #009900;">&#41;</span>setAge<span style="color: #339933;">:</span> <span style="color: #009900;">&#40;</span><span style="color: #993333;">int</span><span style="color: #009900;">&#41;</span> x<span style="color: #339933;">;</span>
&nbsp;
<span style="color: #339933;">-</span><span style="color: #009900;">&#40;</span><span style="color: #993333;">int</span><span style="color: #009900;">&#41;</span>getHeight<span style="color: #339933;">;</span>
<span style="color: #339933;">-</span><span style="color: #009900;">&#40;</span><span style="color: #993333;">int</span><span style="color: #009900;">&#41;</span>getAge<span style="color: #339933;">;</span>
&nbsp;
<span style="color: #339933;">-</span><span style="color: #009900;">&#40;</span><span style="color: #993333;">void</span><span style="color: #009900;">&#41;</span>printInfo<span style="color: #339933;">;</span>
@end
&nbsp;
@implementation Person
&nbsp;
<span style="color: #339933;">-</span><span style="color: #009900;">&#40;</span><span style="color: #993333;">void</span><span style="color: #009900;">&#41;</span>setHeight<span style="color: #339933;">:</span> <span style="color: #009900;">&#40;</span><span style="color: #993333;">int</span><span style="color: #009900;">&#41;</span> x<span style="color: #009900;">&#123;</span>
	height <span style="color: #339933;">=</span> x<span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #339933;">-</span><span style="color: #009900;">&#40;</span><span style="color: #993333;">void</span><span style="color: #009900;">&#41;</span>setAge<span style="color: #339933;">:</span> <span style="color: #009900;">&#40;</span><span style="color: #993333;">int</span><span style="color: #009900;">&#41;</span> x<span style="color: #009900;">&#123;</span>
	age <span style="color: #339933;">=</span> x<span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #339933;">-</span><span style="color: #009900;">&#40;</span><span style="color: #993333;">int</span><span style="color: #009900;">&#41;</span>getHeight<span style="color: #009900;">&#123;</span>
	<span style="color: #b1b100;">return</span> height<span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #339933;">-</span><span style="color: #009900;">&#40;</span><span style="color: #993333;">int</span><span style="color: #009900;">&#41;</span>getAge<span style="color: #009900;">&#123;</span>
	<span style="color: #b1b100;">return</span> age<span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #339933;">-</span><span style="color: #009900;">&#40;</span><span style="color: #993333;">void</span><span style="color: #009900;">&#41;</span>printInfo<span style="color: #009900;">&#123;</span>
	NSLog<span style="color: #009900;">&#40;</span>@<span style="color: #ff0000;">&quot;height: %i age: %i&quot;</span><span style="color: #339933;">,</span>height<span style="color: #339933;">,</span> age<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
@end
&nbsp;
&nbsp;
&nbsp;
<span style="color: #993333;">int</span> main <span style="color: #009900;">&#40;</span><span style="color: #993333;">int</span> argc<span style="color: #339933;">,</span> <span style="color: #993333;">const</span> <span style="color: #993333;">char</span> <span style="color: #339933;">*</span> argv<span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    NSAutoreleasePool <span style="color: #339933;">*</span> pool <span style="color: #339933;">=</span> <span style="color: #009900;">&#91;</span><span style="color: #009900;">&#91;</span>NSAutoreleasePool alloc<span style="color: #009900;">&#93;</span> init<span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
	Person <span style="color: #339933;">*</span>p1<span style="color: #339933;">;</span>
&nbsp;
	p1 <span style="color: #339933;">=</span> <span style="color: #009900;">&#91;</span>Person alloc<span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
	p1 <span style="color: #339933;">=</span> <span style="color: #009900;">&#91;</span>p1 init<span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #009900;">&#91;</span>p1 setAge<span style="color: #339933;">:</span><span style="color: #0000dd;">18</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#91;</span>p1 setHeight<span style="color: #339933;">:</span><span style="color: #0000dd;">188</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#91;</span>p1 printInfo<span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
	<span style="color: #993333;">int</span> g <span style="color: #339933;">=</span> <span style="color: #009900;">&#91;</span>p1 getHeight<span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#91;</span>p1 setAge<span style="color: #339933;">:</span> g<span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#91;</span>p1 printInfo<span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #009900;">&#91;</span>p1 release<span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
    <span style="color: #666666; font-style: italic;">// insert code here...</span>
    NSLog<span style="color: #009900;">&#40;</span>@<span style="color: #ff0000;">&quot;Hello, World!&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#91;</span>pool drain<span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">return</span> <span style="color: #0000dd;">0</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>If you have any questions or concerns please feel free to comment below.</p>


<!-- Begin SexyBookmarks Menu Code -->
<div class="sexy-bookmarks sexy-bookmarks-expand">
<ul class="socials">
		<li class="sexy-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://codewithdesign.com/2010/04/05/objective-c-creating-objects-methods-and-variables/&amp;title=Objective-C+creating+objects%2C+methods+and+variables" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="sexy-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://codewithdesign.com/2010/04/05/objective-c-creating-objects-methods-and-variables/&amp;t=Objective-C+creating+objects%2C+methods+and+variables" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="sexy-twitter">
			<a href="http://twitter.com/home?status=Objective-C+creating+objects%2C+methods+and+variables+-+http://bit.ly/dt8dcw+(via+@calebjonasson)" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="sexy-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://codewithdesign.com/2010/04/05/objective-c-creating-objects-methods-and-variables/&amp;title=Objective-C+creating+objects%2C+methods+and+variables" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="sexy-delicious">
			<a href="http://del.icio.us/post?url=http://codewithdesign.com/2010/04/05/objective-c-creating-objects-methods-and-variables/&amp;title=Objective-C+creating+objects%2C+methods+and+variables" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="sexy-designbump">
			<a href="http://designbump.com/submit?url=http://codewithdesign.com/2010/04/05/objective-c-creating-objects-methods-and-variables/&amp;title=Objective-C+creating+objects%2C+methods+and+variables&amp;body=In%20this%20tutorial%20we%20will%20be%20creating%20a%20console%20application%20to%20try%20every%20part%20of%20our%20code%20out.%20Please%20make%20sure%20that%20the%20console%20is%20not%20set%20to%20its%20default%20language%2C%20which%20is%20C%20and%20is%20instead%20set%20to%20foundation.%0D%0A%0D%0AThe%20first%20thing%20we%20need%20to%20do%20is%20create%20a%20no%20project%20with%20Xcode.%20I%20will%20be%20naming%20mine%20%E2" rel="nofollow" class="external" title="Bump this on DesignBump">Bump this on DesignBump</a>
		</li>
		<li class="sexy-comfeed">
			<a href="http://codewithdesign.com/2010/04/05/objective-c-creating-objects-methods-and-variables/feed" rel="nofollow" class="external" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="sexy-reddit">
			<a href="http://reddit.com/submit?url=http://codewithdesign.com/2010/04/05/objective-c-creating-objects-methods-and-variables/&amp;title=Objective-C+creating+objects%2C+methods+and+variables" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>
<!-- End SexyBookmarks Menu Code -->

<img src="http://codewithdesign.com/?ak_action=api_record_view&id=384&type=feed" alt="" />

<p>Related posts:<ol><li><a href='http://codewithdesign.com/2010/04/07/writing-and-reading-objects-and-arrays-to-a-binary-file-with-java/' rel='bookmark' title='Permanent Link: Writing and reading objects and arrays to a binary file with java'>Writing and reading objects and arrays to a binary file with java</a></li>
<li><a href='http://codewithdesign.com/2010/04/03/objective-c-garbage-collecting/' rel='bookmark' title='Permanent Link: Objective-C garbage collecting'>Objective-C garbage collecting</a></li>
<li><a href='http://codewithdesign.com/2010/01/17/create-a-press-enter-to-continue-with-java/' rel='bookmark' title='Permanent Link: Create a press enter to continue with java'>Create a press enter to continue with java</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://codewithdesign.com/2010/04/05/objective-c-creating-objects-methods-and-variables/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Looking for Ideas</title>
		<link>http://codewithdesign.com/2010/04/04/looking-for-ideas/</link>
		<comments>http://codewithdesign.com/2010/04/04/looking-for-ideas/#comments</comments>
		<pubDate>Sun, 04 Apr 2010 18:12:01 +0000</pubDate>
		<dc:creator>Caleb</dc:creator>
				<category><![CDATA[Random Posting]]></category>

		<guid isPermaLink="false">http://codewithdesign.com/?p=380</guid>
		<description><![CDATA[Code With Design is looking for tutorial ideas. If you have anything you would like to know more about please go ahead and send me an email at: caleb [at] codewithdesign [dot] com. On a further note; if you are interested in writing coding tutorials for codewithdesign.com you can also send me an email.





		
			Digg this!
		
		
			Share [...]


No related posts.]]></description>
			<content:encoded><![CDATA[<p>Code With Design is looking for tutorial ideas. If you have anything you would like to know more about please go ahead and send me an email at: caleb [at] codewithdesign [dot] com. On a further note; if you are interested in writing coding tutorials for codewithdesign.com you can also send me an email.</p>


<!-- Begin SexyBookmarks Menu Code -->
<div class="sexy-bookmarks sexy-bookmarks-expand">
<ul class="socials">
		<li class="sexy-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://codewithdesign.com/2010/04/04/looking-for-ideas/&amp;title=Looking+for+Ideas" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="sexy-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://codewithdesign.com/2010/04/04/looking-for-ideas/&amp;t=Looking+for+Ideas" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="sexy-twitter">
			<a href="http://twitter.com/home?status=Looking+for+Ideas+-+http://bit.ly/9Ynqfn+(via+@calebjonasson)" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="sexy-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://codewithdesign.com/2010/04/04/looking-for-ideas/&amp;title=Looking+for+Ideas" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="sexy-delicious">
			<a href="http://del.icio.us/post?url=http://codewithdesign.com/2010/04/04/looking-for-ideas/&amp;title=Looking+for+Ideas" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="sexy-designbump">
			<a href="http://designbump.com/submit?url=http://codewithdesign.com/2010/04/04/looking-for-ideas/&amp;title=Looking+for+Ideas&amp;body=Code%20With%20Design%20is%20looking%20for%20tutorial%20ideas.%20If%20you%20have%20anything%20you%20would%20like%20to%20know%20more%20about%20please%20go%20ahead%20and%20send%20me%20an%20email%20at%3A%20caleb%20%5Bat%5D%20codewithdesign%20%5Bdot%5D%20com.%20On%20a%20further%20note%3B%20if%20you%20are%20interested%20in%20writing%20coding%20tutorials%20for%20codewithdesign.com%20you%20can%20also%20send%20me%20an%20ema" rel="nofollow" class="external" title="Bump this on DesignBump">Bump this on DesignBump</a>
		</li>
		<li class="sexy-comfeed">
			<a href="http://codewithdesign.com/2010/04/04/looking-for-ideas/feed" rel="nofollow" class="external" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="sexy-reddit">
			<a href="http://reddit.com/submit?url=http://codewithdesign.com/2010/04/04/looking-for-ideas/&amp;title=Looking+for+Ideas" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>
<!-- End SexyBookmarks Menu Code -->

<img src="http://codewithdesign.com/?ak_action=api_record_view&id=380&type=feed" alt="" />

<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://codewithdesign.com/2010/04/04/looking-for-ideas/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Objective-C garbage collecting</title>
		<link>http://codewithdesign.com/2010/04/03/objective-c-garbage-collecting/</link>
		<comments>http://codewithdesign.com/2010/04/03/objective-c-garbage-collecting/#comments</comments>
		<pubDate>Sat, 03 Apr 2010 15:50:39 +0000</pubDate>
		<dc:creator>Caleb</dc:creator>
				<category><![CDATA[objective-c]]></category>
		<category><![CDATA[garbage collector]]></category>
		<category><![CDATA[xcode]]></category>

		<guid isPermaLink="false">http://codewithdesign.com/?p=373</guid>
		<description><![CDATA[Garbage collecting is the process of freeing up system memory automatically so you, the programmer, don’t have to manually dump the memory from file. It can be turned on and is a great asset when programming with Objective-C.
Advantages of the garbage collector
The garbage collector, also known as “GC,” can actually increase the speed of programs [...]


Related posts:<ol><li><a href='http://codewithdesign.com/2010/04/05/objective-c-creating-objects-methods-and-variables/' rel='bookmark' title='Permanent Link: Objective-C creating objects, methods and variables'>Objective-C creating objects, methods and variables</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Garbage collecting is the process of freeing up system memory automatically so you, the programmer, don’t have to manually dump the memory from file. It can be turned on and is a great asset when programming with Objective-C.</p>
<h2>Advantages of the garbage collector</h2>
<p>The garbage collector, also known as “GC,” can actually increase the speed of programs as opposed to manually freeing up memory. This is because the garbage collector can take advantage of idle processors on your chip running in the background and not affecting your programs speed.</p>
<h2>Requirements</h2>
<p>Garbage Collector is only available on operating systems released after Snow Leopard 1.5, it is also not available when programming for the Ipod Touch or IPhone.</p>
<h2>Enabling the Garbage Collector</h2>
<p>In order to enable Garbage Collector you will need to open a new Xcode application if you have not done so already. Go to the top of the screen where you will see the menu item “Project,” now go down to “edit project settings.”</p>
<p><a href="http://codewithdesign.com/wp-content/uploads/2010/04/garbage-collector-1.png" rel="lightbox[373]"><img class="alignnone size-full wp-image-374" title="garbage-collector-1" src="http://codewithdesign.com/wp-content/uploads/2010/04/garbage-collector-1.png" alt="" width="200" height="287" /></a></p>
<p>Once the window pops up you are going to need to click the build tab at the top then scroll down the list until you reach a heading on the left side entitled “GCC 4.2 – Code Generation” on Snow Leopard or “GCC 4.0 Code Generation.” Go down the list in this section to where it says “Objective-C Garbage Collection.” To the right of that setting it should be defaulted at “Unsupported” change this to “[-fobjc-gc]”</p>
<p><a href="http://codewithdesign.com/wp-content/uploads/2010/04/garbage-collector-2.png" rel="lightbox[373]"><img class="alignnone size-medium wp-image-375" title="garbage-collector-2" src="http://codewithdesign.com/wp-content/uploads/2010/04/garbage-collector-2-465x600.png" alt="" width="279" height="360" /></a></p>
<p>Now you have successfully enabled garbage collecting. This should be used with the new Macs since they have multiple cores. If you would like to manage memory manually you can go ahead and skip this article.</p>


<!-- Begin SexyBookmarks Menu Code -->
<div class="sexy-bookmarks sexy-bookmarks-expand">
<ul class="socials">
		<li class="sexy-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://codewithdesign.com/2010/04/03/objective-c-garbage-collecting/&amp;title=Objective-C+garbage+collecting" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="sexy-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://codewithdesign.com/2010/04/03/objective-c-garbage-collecting/&amp;t=Objective-C+garbage+collecting" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="sexy-twitter">
			<a href="http://twitter.com/home?status=Objective-C+garbage+collecting+-+http://bit.ly/a2dBAn+(via+@calebjonasson)" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="sexy-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://codewithdesign.com/2010/04/03/objective-c-garbage-collecting/&amp;title=Objective-C+garbage+collecting" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="sexy-delicious">
			<a href="http://del.icio.us/post?url=http://codewithdesign.com/2010/04/03/objective-c-garbage-collecting/&amp;title=Objective-C+garbage+collecting" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="sexy-designbump">
			<a href="http://designbump.com/submit?url=http://codewithdesign.com/2010/04/03/objective-c-garbage-collecting/&amp;title=Objective-C+garbage+collecting&amp;body=Garbage%20collecting%20is%20the%20process%20of%20freeing%20up%20system%20memory%20automatically%20so%20you%2C%20the%20programmer%2C%20don%E2%80%99t%20have%20to%20manually%20dump%20the%20memory%20from%20file.%20It%20can%20be%20turned%20on%20and%20is%20a%20great%20asset%20when%20programming%20with%20Objective-C.%0D%0AAdvantages%20of%20the%20garbage%20collector%0D%0AThe%20garbage%20collector%2C%20also%20known%20" rel="nofollow" class="external" title="Bump this on DesignBump">Bump this on DesignBump</a>
		</li>
		<li class="sexy-comfeed">
			<a href="http://codewithdesign.com/2010/04/03/objective-c-garbage-collecting/feed" rel="nofollow" class="external" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="sexy-reddit">
			<a href="http://reddit.com/submit?url=http://codewithdesign.com/2010/04/03/objective-c-garbage-collecting/&amp;title=Objective-C+garbage+collecting" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>
<!-- End SexyBookmarks Menu Code -->

<img src="http://codewithdesign.com/?ak_action=api_record_view&id=373&type=feed" alt="" />

<p>Related posts:<ol><li><a href='http://codewithdesign.com/2010/04/05/objective-c-creating-objects-methods-and-variables/' rel='bookmark' title='Permanent Link: Objective-C creating objects, methods and variables'>Objective-C creating objects, methods and variables</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://codewithdesign.com/2010/04/03/objective-c-garbage-collecting/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Get, install, and use light box</title>
		<link>http://codewithdesign.com/2010/04/02/get-install-and-use-light-box/</link>
		<comments>http://codewithdesign.com/2010/04/02/get-install-and-use-light-box/#comments</comments>
		<pubDate>Sat, 03 Apr 2010 02:38:17 +0000</pubDate>
		<dc:creator>Caleb</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[light-box]]></category>
		<category><![CDATA[lightbox]]></category>

		<guid isPermaLink="false">http://codewithdesign.com/?p=369</guid>
		<description><![CDATA[First and foremost, if you do not know what light box is, then I can only assume that you have been living in the dark ages. A lot of sites incorporate this technique to view full sized photos inside of the browser.

Secondly I am going to have to add that this article is about implementing light box. Not creating a light box like plug in.

The first thing that is required for us is to get light box. Where do you get light box. Well the Internet probably has some light box.


Related posts:<ol><li><a href='http://codewithdesign.com/2009/10/08/javascript-hoirzontal-menu/' rel='bookmark' title='Permanent Link: Javascript Hoirzontal Menu'>Javascript Hoirzontal Menu</a></li>
<li><a href='http://codewithdesign.com/2009/09/30/intro-to-html-css-creating-a-style-sheet/' rel='bookmark' title='Permanent Link: Intro to HTML: CSS Creating a Style Sheet'>Intro to HTML: CSS Creating a Style Sheet</a></li>
<li><a href='http://codewithdesign.com/2009/11/20/creating-a-fixed-header-and-footer/' rel='bookmark' title='Permanent Link: Creating a fixed header and Footer'>Creating a fixed header and Footer</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>First and foremost, if you do not know what light box is, then I can only assume that you have been living in the dark ages. A lot of sites incorporate this technique to view full sized photos inside of the browser.</p>
<p>Secondly I am going to have to add that this article is about implementing light box. Not creating a light box like plug in.</p>
<p>The first thing that is required for us is to get light box. Where do you get light box. Well the Internet probably has some light box. <a href="http://www.huddletogether.com/projects/lightbox2/#download">lets go there</a>.</p>
<p>This is the site that has what we need. If you would like to click that link, upload to the server you will be working on we can get started.</p>
<p>When working with lightbox you will need to include four lines of code into your header. Once added, your header will look like this.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
</pre></td><td class="code"><pre class="html" style="font-family:monospace;">&lt;script src=&quot;prototype.js&quot; type=&quot;text/javascript&quot;&gt;&lt;!--mce:0--&gt;&lt;/script&gt;
&lt;script src=&quot;scriptaculous.js?load=effects,builder&quot; type=&quot;text/javascript&quot;&gt;&lt;!--mce:1--&gt;&lt;/script&gt;
&lt;script src=&quot;lightbox.js&quot; type=&quot;text/javascript&quot;&gt;&lt;!--mce:2--&gt;&lt;/script&gt;
&lt;link rel=&quot;stylesheet&quot; href=&quot;lightbox.css&quot; type=&quot;text/css&quot; media=&quot;screen&quot; /&gt;</pre></td></tr></table></div>

<p>The next part to using this script requires us to link to an image using it. This can be done by using a rel path.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="html" style="font-family:monospace;">&lt;a title=&quot;Title&quot; rel=&quot;lightbox&quot; href=&quot;demo-image.jpg&quot;&gt;First Image&lt;/a&gt;</pre></td></tr></table></div>

<p><strong>Note:</strong> There are some things that can go wrong when working with lightbox. The first thing that you need to check is that everything is being properly linked to. There are files from the css that can cause lightbox to not function properly.</p>
<p>Also, if you do not see an image or lightbox appear then you may have to check the JavaScript within the body tag. You may have to modify the on load.</p>


<!-- Begin SexyBookmarks Menu Code -->
<div class="sexy-bookmarks sexy-bookmarks-expand">
<ul class="socials">
		<li class="sexy-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://codewithdesign.com/2010/04/02/get-install-and-use-light-box/&amp;title=Get%2C+install%2C+and+use+light+box" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="sexy-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://codewithdesign.com/2010/04/02/get-install-and-use-light-box/&amp;t=Get%2C+install%2C+and+use+light+box" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="sexy-twitter">
			<a href="http://twitter.com/home?status=Get%2C+install%2C+and+use+light+box+-+http://bit.ly/9DnuWd+(via+@calebjonasson)" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="sexy-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://codewithdesign.com/2010/04/02/get-install-and-use-light-box/&amp;title=Get%2C+install%2C+and+use+light+box" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="sexy-delicious">
			<a href="http://del.icio.us/post?url=http://codewithdesign.com/2010/04/02/get-install-and-use-light-box/&amp;title=Get%2C+install%2C+and+use+light+box" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="sexy-designbump">
			<a href="http://designbump.com/submit?url=http://codewithdesign.com/2010/04/02/get-install-and-use-light-box/&amp;title=Get%2C+install%2C+and+use+light+box&amp;body=First%20and%20foremost%2C%20if%20you%20do%20not%20know%20what%20light%20box%20is%2C%20then%20I%20can%20only%20assume%20that%20you%20have%20been%20living%20in%20the%20dark%20ages.%20A%20lot%20of%20sites%20incorporate%20this%20technique%20to%20view%20full%20sized%20photos%20inside%20of%20the%20browser.%0D%0A%0D%0ASecondly%20I%20am%20going%20to%20have%20to%20add%20that%20this%20article%20is%20about%20implementing%20light%20" rel="nofollow" class="external" title="Bump this on DesignBump">Bump this on DesignBump</a>
		</li>
		<li class="sexy-comfeed">
			<a href="http://codewithdesign.com/2010/04/02/get-install-and-use-light-box/feed" rel="nofollow" class="external" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="sexy-reddit">
			<a href="http://reddit.com/submit?url=http://codewithdesign.com/2010/04/02/get-install-and-use-light-box/&amp;title=Get%2C+install%2C+and+use+light+box" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>
<!-- End SexyBookmarks Menu Code -->

<img src="http://codewithdesign.com/?ak_action=api_record_view&id=369&type=feed" alt="" />

<p>Related posts:<ol><li><a href='http://codewithdesign.com/2009/10/08/javascript-hoirzontal-menu/' rel='bookmark' title='Permanent Link: Javascript Hoirzontal Menu'>Javascript Hoirzontal Menu</a></li>
<li><a href='http://codewithdesign.com/2009/09/30/intro-to-html-css-creating-a-style-sheet/' rel='bookmark' title='Permanent Link: Intro to HTML: CSS Creating a Style Sheet'>Intro to HTML: CSS Creating a Style Sheet</a></li>
<li><a href='http://codewithdesign.com/2009/11/20/creating-a-fixed-header-and-footer/' rel='bookmark' title='Permanent Link: Creating a fixed header and Footer'>Creating a fixed header and Footer</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://codewithdesign.com/2010/04/02/get-install-and-use-light-box/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
