<?xml version="1.0" encoding="ISO-8859-1"?>
<rss version="2.0">
    <channel>
        <title>JavaRanch: Programming Diversions</title>
        <link>http://saloon.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=forum&amp;f=71</link>
        <description>A Friendly Place for Java Greenhorns</description>
        <image>
            <url>http://saloon.javaranch.com/ubb/moosefly.gif</url>
            <title>JavaRanch Big Moose Saloon</title>
            <link>http://saloon.javaranch.com/</link>
        </image>
        <language>en-us</language>
        <generator>JavaRanch RSS</generator>
        <copyright>Copyright 2007 Paul Wheaton. All Rights Reserved.</copyright>
        <item uniqueID="71-000514">
            <title>Character Frequency Counter in C(?)</title>
            <link>http://saloon.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=get_topic&amp;f=71&amp;t=000514</link>
            <description>Hi.&lt;br /&gt; &lt;br /&gt;I'm currently teaching myself 'C' with 'Teach Yourself C in 21 Days' and I'm using an old edition I've had for years. In chapter 14, an exercise says: Using redirection, i.e., 'prog_name.c &amp;lt; input_file', write a character frequency counter. One hint is provided: Create an array of 26 integers and increment the appropriate array index.&lt;br /&gt; &lt;br /&gt;My code thus far is:&lt;br /&gt; &lt;br /&gt;&amp;lt;code&amp;gt;&lt;br /&gt;#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;#include &amp;lt;stdlib.h&amp;gt;&lt;br /&gt; &lt;br /&gt;int main( void ) {&lt;br /&gt; &lt;br /&gt; int ch, i;&lt;br /&gt; &lt;br /&gt; int letters[ 26 ] = { 97, 98, 99, 100, 101, 102,&lt;br /&gt; 103, 104, 105, 106, 107, 108,&lt;br /&gt; 109, 110, 111, 112, 113, 114,&lt;br /&gt; 115, 116, ...</description>
            <guid isPermaLink="true">http://saloon.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=get_topic&amp;f=71&amp;t=000514</guid>
            <comments>http://saloon.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=get_topic&amp;f=71&amp;t=000514Caitlin Gibson</comments>
            <author/>
            <pubDate>Mon, 30 Jun 2008 23:12:59 MDT</pubDate>
        </item>
        <item uniqueID="71-000513">
            <title>Calculating historical dates</title>
            <link>http://saloon.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=get_topic&amp;f=71&amp;t=000513</link>
            <description>Very briefly, are there any java classes which can calculate dates prior to 1 January 1970 and also 1752?&lt;br /&gt; &lt;br /&gt;The latter year was that in which the Julian calendar changed over to the Gregorian one (in most of Europe) - the length of the year was more closely defined to be 365 days, 5 hours, 48 minutes and 46 seconds. Before it was given as 365 days and 6 hours.&lt;br /&gt; &lt;br /&gt;Under the new definition the 'leap day' was lost on the centennial year (double leap year) unless that year was completely devisable by 400. If so then it kept its leap year status. This all meant that in October of 1752, 13 days were lost to account for the 14 double leap years that had elapsed since Christian calendars were first drawn up. This caused trade...</description>
            <guid isPermaLink="true">http://saloon.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=get_topic&amp;f=71&amp;t=000513</guid>
            <comments>http://saloon.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=get_topic&amp;f=71&amp;t=000513Stuart Lord</comments>
            <author/>
            <pubDate>Mon, 30 Jun 2008 16:54:58 MDT</pubDate>
        </item>
        <item uniqueID="71-000511">
            <title>Project Euler: Programming and math puzzles</title>
            <link>http://saloon.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=get_topic&amp;f=71&amp;t=000511</link>
            <description>I don't visit the Programming Diversions forum often, but here's something that really belongs here: Project Euler (http://projecteuler.net/).&lt;br /&gt; &lt;blockquote&gt;quote:&lt;hr&gt;&lt;strong&gt;What is Project Euler?&lt;/strong&gt;&lt;br /&gt; &lt;br /&gt;Project Euler is a series of challenging mathematical/computer programming problems that will require more than just mathematical insights to solve. Although mathematics will help you arrive at elegant and efficient methods, the use of a computer and programming skills will be required to solve most problems.&lt;br /&gt; &lt;br /&gt;The motivation for starting Project Euler, and its continuation, is to provide a platform for the inquiring mind to delve into unfamiliar areas and learn new concepts in a fun and recreational context.&lt;hr...</description>
            <guid isPermaLink="true">http://saloon.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=get_topic&amp;f=71&amp;t=000511</guid>
            <comments>http://saloon.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=get_topic&amp;f=71&amp;t=000511Jesper Young</comments>
            <author/>
            <pubDate>Fri, 27 Jun 2008 15:46:49 MDT</pubDate>
        </item>
        <item uniqueID="71-000510">
            <title>Surprisingly Complex Images Generated From Very Simple Code</title>
            <link>http://saloon.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=get_topic&amp;f=71&amp;t=000510</link>
            <description>I was doing the equivalent of a hello world graphics program in java and so I wrote a simple program that loops through all pixels in an image and uses some simple math to decide what color to display. I was very surprised to see the complexity of the images that were created and displayed to the screen. Give it a go. You simply need to compile the code below and run. Some sample calls follow:&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;java -classpath . Paints&lt;br /&gt;java -classpath . Paints 0 43&lt;br /&gt;java -classpath . Paints 0 58&lt;br /&gt;java -classpath . Paints 1&lt;br /&gt;java -classpath . Paints 1 23&lt;br /&gt; &lt;br /&gt;The code follows. It should work as is. I compiled in 1.5 though it may work in older versions too. It is worth the couple minutes it takes to run!...</description>
            <guid isPermaLink="true">http://saloon.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=get_topic&amp;f=71&amp;t=000510</guid>
            <comments>http://saloon.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=get_topic&amp;f=71&amp;t=000510steve souza</comments>
            <author/>
            <pubDate>Thu, 12 Jun 2008 12:42:03 MDT</pubDate>
        </item>
    </channel>
</rss>
