<?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>Goodies4uAll</title>
	<atom:link href="http://www.goodies4uall.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.goodies4uall.com</link>
	<description>Goodies for everyone!</description>
	<lastBuildDate>Mon, 08 Mar 2010 13:04:47 +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>Extended Euclidean Algorithm in C++</title>
		<link>http://www.goodies4uall.com/extended-euclidean-algorithm-in-c/cprogramming/</link>
		<comments>http://www.goodies4uall.com/extended-euclidean-algorithm-in-c/cprogramming/#comments</comments>
		<pubDate>Mon, 08 Mar 2010 02:34:44 +0000</pubDate>
		<dc:creator>Don</dc:creator>
				<category><![CDATA[C++ Programming]]></category>

		<guid isPermaLink="false">http://www.goodies4uall.com/?p=254</guid>
		<description><![CDATA[An Extended Euclidean Calculator Program that calculates the inverse of a modulus. Starting with an algorithm and working through step by step the extended euclidean can make writing this program much easier. ]]></description>
			<content:encoded><![CDATA[<p>Writing an Extended Euclidean Calculator that calculates the inverse of a modulus can get pretty difficult. However writing a good algorithm and going through step by step can make the process so much easier.  So we want to find a’ or inverse of a so that a * a’ [=] 1 (mod b). In other words we are trying to find an integer (a’) when multiplied by     a    and then divided by   b   gives you a remainder of   1. In order to find this number(a’), we have to work the Euclidean Algorithm backwards which is referred to as the Extended Euclidean Algorithm.</p>
<p><span id="more-254"></span></p>
<p>So let’s begin with writing out an example in order to explore and discover a working algorithm. This probably could be done recursively but for better understanding we will work sequentially. Lets say we want to find the inverse of:  120 (mod 23)  &#8212;&#8212;&#8211;&gt;  120 * a’ [=] 1 (mod 23) .</p>
<p><span style="text-decoration: underline;">Euclidean Algorithm</span></p>
<table border="1" cellspacing="0" cellpadding="0" align="left">
<tbody>
<tr>
<td width="160" valign="top">gcd(a,b)</td>
<td width="160" valign="top"></td>
<td width="160" valign="top">x[0] = 0</td>
<td width="160" valign="top">y[0] = 1</td>
</tr>
<tr>
<td width="160" valign="top">gcd(120, 23)</td>
<td width="160" valign="top">120 =  5 * 23 + 5</td>
<td width="160" valign="top">x[1] = 1</td>
<td width="160" valign="top">y[1] = -5</td>
</tr>
<tr>
<td width="160" valign="top">gcd(23, 5)</td>
<td width="160" valign="top">23   =  4   * 5   + 3</td>
<td width="160" valign="top">x[2] = -4</td>
<td width="160" valign="top">y[2] = 21</td>
</tr>
<tr>
<td width="160" valign="top">gcd(5, 3)</td>
<td width="160" valign="top">5     =  1 * 3     + 2</td>
<td width="160" valign="top">x[3] = 5</td>
<td width="160" valign="top">y[3] = -26</td>
</tr>
<tr>
<td width="160" valign="top">gcd(3, 2)</td>
<td width="160" valign="top">3     =  1 * 2     + 1</td>
<td width="160" valign="top">x[4] = -9</td>
<td width="160" valign="top">y[4] = 47</td>
</tr>
<tr>
<td width="160" valign="top">gcd(2, 1)</td>
<td width="160" valign="top">2     =    2 * 1   + 0</td>
<td width="160" valign="top"></td>
<td width="160" valign="top"></td>
</tr>
</tbody>
</table>
<p><span style="text-decoration: underline;">Extended Euclidean Algorithm</span></p>
<p>5  =   1(120)   -5(23)</p>
<p>3  =  [-4(5)  +   1(23)]     -&gt;     -4(120)   +21(23)</p>
<p>2  =  [-1(3)  +   1(5)]       -&gt;      5(120)    -26(23)</p>
<p>1  =  [-1(2)  +   1(3)]       -&gt;     -9(120)   +47(23)</p>
<p>So the inverse of 120 (mod 23) is -9. Likewise The inverse of 23 (mod 120) is 47.</p>
<p>Quotient = a / b</p>
<p>Notice that when (i &gt; 1),   x[i]  is  (quotient   *   -1   *   x[i -1])   +   x[i -2]</p>
<p>So x[2]  is  (    4            *   -1   *       1    )   +   0        =    -4</p>
<p>Likewise for y,                     y[i]  is  (quotient   *   -1   *   y[i -1])   +   y[i -2]</p>
<p>So y[2]  is  (    4            *   -1   *       -5    )   +   1       =    21</p>
<p>Continue until the remainder is zero.</p>
<p>x[i -1] is inverse of a     and      y[i – 1] is inverse of b</p>
<div class="codecolorer-container cpp geshi" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;height:500px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br />20<br />21<br />22<br />23<br />24<br />25<br />26<br />27<br />28<br />29<br />30<br />31<br />32<br /></div></td><td><div class="cpp codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #ff0000; font-style: italic;">/*****************************************************************************<br />
* Finds an integer i such that ai [=] 1 (mod b)<br />
* Since we know a and b it uses Euclidean Algorithm to find the inverse of a<br />
* Note ai + bj = 1 Considering i is inverse of a and j is inverse of b<br />
*******************************************************************************/</span><br />
<span style="color: #0000ff;">int</span> findInverse<span style="color: #008000;">&#40;</span><span style="color: #0000ff;">int</span> a, <span style="color: #0000ff;">int</span> b<span style="color: #008000;">&#41;</span><br />
<span style="color: #008000;">&#123;</span><br />
<span style="color: #0000ff;">int</span> x<span style="color: #008000;">&#91;</span>100<span style="color: #008000;">&#93;</span><span style="color: #008080;">;</span><br />
<span style="color: #0000ff;">int</span> y<span style="color: #008000;">&#91;</span>100<span style="color: #008000;">&#93;</span><span style="color: #008080;">;</span><br />
<span style="color: #0000ff;">int</span> quotient  <span style="color: #000080;">=</span> a <span style="color: #000040;">/</span> b<span style="color: #008080;">;</span><br />
<span style="color: #0000ff;">int</span> remainder <span style="color: #000080;">=</span> a <span style="color: #000040;">%</span> b<span style="color: #008080;">;</span><br />
<br />
x<span style="color: #008000;">&#91;</span>0<span style="color: #008000;">&#93;</span> <span style="color: #000080;">=</span> <span style="color: #0000dd;">0</span><span style="color: #008080;">;</span><br />
y<span style="color: #008000;">&#91;</span>0<span style="color: #008000;">&#93;</span> <span style="color: #000080;">=</span> <span style="color: #0000dd;">1</span><span style="color: #008080;">;</span><br />
x<span style="color: #008000;">&#91;</span>1<span style="color: #008000;">&#93;</span> <span style="color: #000080;">=</span> <span style="color: #0000dd;">1</span><span style="color: #008080;">;</span><br />
y<span style="color: #008000;">&#91;</span>1<span style="color: #008000;">&#93;</span> <span style="color: #000080;">=</span> quotient <span style="color: #000040;">*</span> <span style="color: #000040;">-</span><span style="color: #0000dd;">1</span><span style="color: #008080;">;</span><br />
<br />
<span style="color: #0000ff;">int</span> i <span style="color: #000080;">=</span> <span style="color: #0000dd;">2</span><span style="color: #008080;">;</span><br />
<span style="color: #0000ff;">for</span> <span style="color: #008000;">&#40;</span><span style="color: #008080;">;</span> <span style="color: #008000;">&#40;</span>b <span style="color: #000040;">%</span> <span style="color: #008000;">&#40;</span>a<span style="color: #000040;">%</span>b<span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span> <span style="color: #000040;">!</span><span style="color: #000080;">=</span> <span style="color: #0000dd;">0</span><span style="color: #008080;">;</span> i<span style="color: #000040;">++</span><span style="color: #008000;">&#41;</span><br />
<span style="color: #008000;">&#123;</span><br />
a <span style="color: #000080;">=</span> b<span style="color: #008080;">;</span><br />
b <span style="color: #000080;">=</span> remainder<span style="color: #008080;">;</span><br />
quotient <span style="color: #000080;">=</span> a <span style="color: #000040;">/</span> b<span style="color: #008080;">;</span><br />
remainder <span style="color: #000080;">=</span> a <span style="color: #000040;">%</span> b<span style="color: #008080;">;</span><br />
x<span style="color: #008000;">&#91;</span>i<span style="color: #008000;">&#93;</span> <span style="color: #000080;">=</span> <span style="color: #008000;">&#40;</span>quotient <span style="color: #000040;">*</span> <span style="color: #000040;">-</span>1 <span style="color: #000040;">*</span> x<span style="color: #008000;">&#91;</span>i <span style="color: #000040;">-</span> 1<span style="color: #008000;">&#93;</span><span style="color: #008000;">&#41;</span> <span style="color: #000040;">+</span> x<span style="color: #008000;">&#91;</span>i <span style="color: #000040;">-</span> 2<span style="color: #008000;">&#93;</span><span style="color: #008080;">;</span><br />
y<span style="color: #008000;">&#91;</span>i<span style="color: #008000;">&#93;</span> <span style="color: #000080;">=</span> <span style="color: #008000;">&#40;</span>quotient <span style="color: #000040;">*</span> <span style="color: #000040;">-</span>1 <span style="color: #000040;">*</span> y<span style="color: #008000;">&#91;</span>i <span style="color: #000040;">-</span> 1<span style="color: #008000;">&#93;</span><span style="color: #008000;">&#41;</span> <span style="color: #000040;">+</span> y<span style="color: #008000;">&#91;</span>i <span style="color: #000040;">-</span> 2<span style="color: #008000;">&#93;</span><span style="color: #008080;">;</span><br />
<span style="color: #008000;">&#125;</span><br />
<br />
<span style="color: #666666;">//x[i - 1] is inverse of a</span><br />
<span style="color: #666666;">//y[i - 1] is inverse of b</span><br />
<span style="color: #0000ff;">return</span> x<span style="color: #008000;">&#91;</span>i <span style="color: #000040;">-</span> 1<span style="color: #008000;">&#93;</span><span style="color: #008080;">;</span><br />
<span style="color: #008000;">&#125;</span></div></td></tr></tbody></table></div>
]]></content:encoded>
			<wfw:commentRss>http://www.goodies4uall.com/extended-euclidean-algorithm-in-c/cprogramming/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Modular Exponentiation in C++</title>
		<link>http://www.goodies4uall.com/rex/cprogramming/</link>
		<comments>http://www.goodies4uall.com/rex/cprogramming/#comments</comments>
		<pubDate>Sun, 07 Mar 2010 03:49:33 +0000</pubDate>
		<dc:creator>Don</dc:creator>
				<category><![CDATA[C++ Programming]]></category>

		<guid isPermaLink="false">http://www.goodies4uall.com/?p=230</guid>
		<description><![CDATA[Understanding Fast modular exponentiation and how it works is key to understanding RSA encryption/decryption. I show the algorithm I used step by step and include a program for review.]]></description>
			<content:encoded><![CDATA[<p>Modular Exponentiation is way of calculating the remainder when dividing an integer b (Base) by another integer m (Modulus) raised to the power e(Exponent). Fast modular exponentiation of large numbers is used all the time in RSA to encrypt/decrypt private information over the internet. Whenever you go to a secure site you are using RSA which deals with modular exponentiation.So lets understand modular exponentiation with c++!</p>
<p><span id="more-230"></span></p>
<p>b^e (mod m)</p>
<p>b = 32</p>
<p>e = 2</p>
<p>m = 5</p>
<p>32^2 = 1024 / 5 has a remainder of 4</p>
<p>But what if we are dealing with very large numbers? Calculating the b^e then (mod m) can be very expensive operations. That&#8217;s why modular exponentiation is so wonderful. Take the following problem</p>
<p>b = 1819</p>
<p>e = 13</p>
<p>m = 2537</p>
<p>1819^13 (mod 2537). First step we will convert the exponent 13 into binary: 2^0 + 2^2 + 2^3 = 1101    Starting with the least significant bit we will do the following: If the bit is 1  then x = x * b (mod m). At each step b (base) changes regardless if the exponent bit is 0 or 1.  b = b^2 (mod m).  Continue this while there are still bits left. Then x is your answer.</p>
<p><span style="text-decoration: underline;">Exp</span>&#8212;&#8212;&#8212;&#8211;<span style="text-decoration: underline;">x</span>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;- <span style="text-decoration: underline;">Base Computation</span></p>
<p>1          x = 1819          1819^2 (mod 2537) = 513</p>
<p>0          x = 1819          513^2    (mod 2537) = 1858</p>
<p>1          x = 418            1858^2 (mod 2537) = 1844</p>
<p>1          x = 2081</p>
<p>As you can see using this method uses extremely less computation. If you can understand this than you are one step closer to understanding RSA! With the algorithm above it shouldn&#8217;t be difficult to write a program that will compute modular exponentiation with very large integers. I have included my program and like always am up for your suggestions!</p>
<div class="codecolorer-container cpp geshi" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br /></div></td><td><div class="cpp codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #ff0000; font-style: italic;">/*****************************************************************************<br />
* Finds m^e mod n using modular exponenation<br />
*******************************************************************************/</span><br />
<span style="color: #0000ff;">int</span> modExp<span style="color: #008000;">&#40;</span><span style="color: #0000ff;">int</span> b, <span style="color: #0000ff;">int</span> e, <span style="color: #0000ff;">int</span> m<span style="color: #008000;">&#41;</span><br />
<span style="color: #008000;">&#123;</span><br />
<span style="color: #0000ff;">int</span> remainder<span style="color: #008080;">;</span><br />
<span style="color: #0000ff;">int</span> x <span style="color: #000080;">=</span> <span style="color: #0000dd;">1</span><span style="color: #008080;">;</span><br />
<br />
<span style="color: #0000ff;">while</span> <span style="color: #008000;">&#40;</span>e <span style="color: #000040;">!</span><span style="color: #000080;">=</span> 0<span style="color: #008000;">&#41;</span><br />
<span style="color: #008000;">&#123;</span><br />
remainder <span style="color: #000080;">=</span> e <span style="color: #000040;">%</span> <span style="color: #0000dd;">2</span><span style="color: #008080;">;</span><br />
e<span style="color: #000080;">=</span> e<span style="color: #000040;">/</span><span style="color: #0000dd;">2</span><span style="color: #008080;">;</span><br />
<br />
<span style="color: #0000ff;">if</span> <span style="color: #008000;">&#40;</span>remainder <span style="color: #000080;">==</span> 1<span style="color: #008000;">&#41;</span><br />
x <span style="color: #000080;">=</span> <span style="color: #008000;">&#40;</span>x <span style="color: #000040;">*</span> b<span style="color: #008000;">&#41;</span> <span style="color: #000040;">%</span> m<span style="color: #008080;">;</span><br />
b<span style="color: #000080;">=</span> <span style="color: #008000;">&#40;</span>b <span style="color: #000040;">*</span> b<span style="color: #008000;">&#41;</span> <span style="color: #000040;">%</span> m<span style="color: #008080;">;</span> <span style="color: #666666;">// New base equal b^2 % m</span><br />
<span style="color: #008000;">&#125;</span><br />
<span style="color: #0000ff;">return</span> x<span style="color: #008080;">;</span><br />
<span style="color: #008000;">&#125;</span></div></td></tr></tbody></table></div>
]]></content:encoded>
			<wfw:commentRss>http://www.goodies4uall.com/rex/cprogramming/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fibonacci Calculator C++</title>
		<link>http://www.goodies4uall.com/fibonacci-calculator/cprogramming/</link>
		<comments>http://www.goodies4uall.com/fibonacci-calculator/cprogramming/#comments</comments>
		<pubDate>Sat, 06 Mar 2010 19:28:52 +0000</pubDate>
		<dc:creator>Don</dc:creator>
				<category><![CDATA[C++ Programming]]></category>

		<guid isPermaLink="false">http://www.goodies4uall.com/?p=214</guid>
		<description><![CDATA[Learn how a doubly linked list can be used to calculate the Fibonacci sequence at a certain term. This could be done in many different and more efficient ways, but this project could help you understand how doubly linked lists work. This Fibonacci Program was written in c++.]]></description>
			<content:encoded><![CDATA[<p>The fibonacci sequence is as follows :</p>
<dl>
<dd><img src="http://upload.wikimedia.org/math/1/5/f/15f5a24853b24b1b7854216393dff446.png" alt="0,\;1,\;1,\;2,\;3,\;5,\;8,\;13,\;21,\;34,\;55,\;89,\;144,\;  \ldots." title="Fibonacci Calculator C++" /></dd>
</dl>
<p>Each  successive number is equal to the sum of the two preceding numbers. If you wanted to find the 5th number of the sequence it would be 5.</p>
<table>
<tbody>
<tr>
<td><em>F</em><sub>0</sub></td>
<td><em>F</em><sub>1</sub></td>
<td><em>F</em><sub>2</sub></td>
<td><em>F</em><sub>3</sub></td>
<td><em>F</em><sub>4</sub></td>
<td><em>F</em><sub>5</sub></td>
<td><em>F</em><sub>6</sub></td>
<td><em>F</em><sub>7</sub></td>
<td><em>F</em><sub>8</sub></td>
<td><em>F</em><sub>9</sub></td>
<td><em>F</em><sub>10</sub></td>
<td><em>F</em><sub>11</sub></td>
<td><em>F</em><sub>12</sub></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td>0</td>
<td>1</td>
<td>1</td>
<td>2</td>
<td>3</td>
<td>5</td>
<td>8</td>
<td>13</td>
<td>21</td>
<td>34</td>
<td>55</td>
<td>89</td>
<td>144</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
</tbody>
</table>
<p>This program is implemented with a double linked list. Each Fibonacci number stored as a sequence of integers inside of a list. For example to calculate the 6th number of the Fibonacci sequence it would start out with f1 and f2 lists that have a single node with 1 inside.</p>
<p><span id="more-214"></span></p>
<p>Starting at i = 2(first 2 numbers already calculated),</p>
<p>While i &lt; 6<br />
F1 = F1 + F2<br />
i++</p>
<p>If i != 6<br />
F2 = F2 + F1<br />
i++</p>
<p>If i &#8211; 1 is even then output F1<br />
If i &#8211; 1 is odd then output F2</p>
<p><a href="http://www.goodies4uall.com/wp-content/uploads/2010/03/linked_list_fibonacci.jpg"><img class="aligncenter size-medium wp-image-215" title="linked_list_fibonacci" src="http://www.goodies4uall.com/wp-content/uploads/2010/03/linked_list_fibonacci-297x300.jpg" alt="Fibonacci sequence using Linked Lists" width="297" height="300" /></a></p>
<p>Essentially this continues until the number gets greater than 999,999,999(Because list stores integers). Once the number reaches higher than this it will carry one to next node in list:  total = F1 + F2 + carry</p>
<p>F1 = total mod 1,000,000,000</p>
<p>carry = total / 1,000,000,000</p>
<p>It will then carry over to next node in list. If you have a carry on last node, it might be wise to put carry on end node and create an empty node on other list to keep both lists equal size. All of this is implemented in your add function that adds both the lists and stores in the calling object. I have included my add function so it might be understood a little better.</p>
<div class="codecolorer-container cpp geshi" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;height:500px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br />20<br />21<br />22<br />23<br />24<br />25<br />26<br />27<br />28<br />29<br />30<br /></div></td><td><div class="cpp codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #ff0000; font-style: italic;">/****************************************************************<br />
* List addition operator - Adds each item in each node for 2 lists<br />
* Stores values in calling object.<br />
****************************************************************/</span><br />
<span style="color: #0000ff;">void</span> List<span style="color: #008080;">::</span><span style="color: #007788;">add</span><span style="color: #008000;">&#40;</span>List <span style="color: #000040;">&amp;</span>right<span style="color: #008000;">&#41;</span><br />
<span style="color: #008000;">&#123;</span><br />
<span style="color: #0000ff;">int</span> count <span style="color: #000080;">=</span> numItems<span style="color: #008080;">;</span><br />
<br />
<span style="color: #0000ff;">int</span> total<span style="color: #008080;">;</span><br />
<span style="color: #0000ff;">int</span> carry <span style="color: #000080;">=</span> <span style="color: #0000dd;">0</span><span style="color: #008080;">;</span><br />
<span style="color: #0000ff;">for</span> <span style="color: #008000;">&#40;</span><span style="color: #0000ff;">int</span> i <span style="color: #000080;">=</span> <span style="color: #0000dd;">0</span><span style="color: #008080;">;</span> i <span style="color: #000080;">&lt;</span> count<span style="color: #008080;">;</span> i<span style="color: #000040;">++</span><span style="color: #008000;">&#41;</span><br />
<span style="color: #008000;">&#123;</span><br />
<span style="color: #666666;">//Perform addition and carry</span><br />
total <span style="color: #000080;">=</span> this<span style="color: #000040;">-</span><span style="color: #000080;">&gt;</span>getData<span style="color: #008000;">&#40;</span>i<span style="color: #008000;">&#41;</span> <span style="color: #000040;">+</span> right.<span style="color: #007788;">getData</span><span style="color: #008000;">&#40;</span>i<span style="color: #008000;">&#41;</span> <span style="color: #000040;">+</span> carry<span style="color: #008080;">;</span><br />
carry <span style="color: #000080;">=</span> total <span style="color: #000040;">/</span> <span style="color: #0000dd;">1000000000</span><span style="color: #008080;">;</span><br />
<br />
<span style="color: #666666;">//Result is stored and node that was in it's place is removed</span><br />
this<span style="color: #000040;">-</span><span style="color: #000080;">&gt;</span>insert<span style="color: #008000;">&#40;</span>total <span style="color: #000040;">%</span> 1000000000, i<span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span><br />
this<span style="color: #000040;">-</span><span style="color: #000080;">&gt;</span><span style="color: #0000dd;">remove</span><span style="color: #008000;">&#40;</span>i <span style="color: #000040;">+</span> 1<span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span><br />
<br />
<span style="color: #666666;">//If carry on Last node add new Node to calling object with carry</span><br />
<span style="color: #0000ff;">if</span> <span style="color: #008000;">&#40;</span>carry <span style="color: #000080;">==</span> 1  <span style="color: #000040;">&amp;&amp;</span> i <span style="color: #000080;">==</span> count <span style="color: #000040;">-</span> 1<span style="color: #008000;">&#41;</span><br />
<span style="color: #008000;">&#123;</span><br />
this<span style="color: #000040;">-</span><span style="color: #000080;">&gt;</span>insert<span style="color: #008000;">&#40;</span>carry, i <span style="color: #000040;">+</span> 1<span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span><br />
<span style="color: #666666;">// Add node with zero to maintain equal list size</span><br />
right.<span style="color: #007788;">insert</span><span style="color: #008000;">&#40;</span>0, i <span style="color: #000040;">+</span> 1<span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span><br />
<span style="color: #008000;">&#125;</span><br />
<span style="color: #008000;">&#125;</span><br />
<span style="color: #0000ff;">return</span><span style="color: #008080;">;</span><br />
<span style="color: #008000;">&#125;</span></div></td></tr></tbody></table></div>
<p>Took about 5 seconds to calculate a 12,345. This can be modified to calculate larger fibonacci numbers by using even larger digits with a library like the NTL or GMP.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.goodies4uall.com/fibonacci-calculator/cprogramming/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Make Money from Home</title>
		<link>http://www.goodies4uall.com/make-money-from-home/goodies/</link>
		<comments>http://www.goodies4uall.com/make-money-from-home/goodies/#comments</comments>
		<pubDate>Thu, 12 Nov 2009 01:12:33 +0000</pubDate>
		<dc:creator>Don</dc:creator>
				<category><![CDATA[Goodies]]></category>

		<guid isPermaLink="false">http://www.goodies4uall.com/?p=155</guid>
		<description><![CDATA[Making money from home is something I have always been skeptical about. Believe it or not there are sites out there that are legit and can make you some extra cash. Some sites compensate you for your time and attention with prizes.(swagbucks.com)Most get rich quick ideas are scams and should be avoided. But there really are sites that you can trust. I will give you the sites I have personally used and know to be legit. I will also show you how use their affiliate programs to really get you going on making that extra cash.]]></description>
			<content:encoded><![CDATA[<p>Making money from home is something I have always been skeptical about. Believe it or not there are sites out there that are legit and can make you some extra cash. Some sites compensate you for your time and attention with prizes.(<a href="http://www.goodies4uall.com/free-stuff-with-swagbucks/goodies" target="_blank">swagbucks.com</a>)Most get rich quick ideas are scams and should be avoided. But there really are sites that you can trust. I will give you the sites I have personally used and know to be legit. I will also show you how use their affiliate programs to really get you going on making that extra cash.</p>
<h3><span id="more-155"></span><strong><a href="http://www.clixsense.com/?2994912" target="_blank">ClickSense.com</a></strong></h3>
<p>ClickSense.com will pay you to just click on ads. However this will only get you pocket change. They pay only $0.01 &#8211; $0.10 cents per click. The referral program will pay you $0.01 for each referral and will pay you $2.00 if their direct referral upgrades to a Premium account. You will also receive 10% of revenues generated from your referrals&#8217; ad purchases. This site will be the key to making money off of your affiliates and I will show you how. This will mean alot more cash for you.</p>
<h3><a href="http://www.fusioncash.net/?ref=goodies4_u  " target="_blank">Fushioncash.net</a></h3>
<p>Fushioncash.net is a really neat site that pays you big for completing offers. Most of these offers you don&#8217;t need a credit card or are free trials. For example one of the offers I completed was to sign up with mysurvey.com and take your first survey. After less than an hour&#8217;s work I earned $15. They pay you with paypal, by mail, or even direct deposit. What is really nice about this site is they pay $1 for a referral that just signs up and confirms his/her email address. After they complete the first offer you get $2 and when they cash out you get $5.</p>
<h3><a href="http://hits4pay.com/members/index.cgi?goodies4_u" target="_blank">Hits4pay.com</a></h3>
<p>This site will pay you to read emails. First create an email account different than the one you use. It is much easier when you have an email account just dedicated to these sites that way you don&#8217;t mix it up with your personal accounts. If you sign up with my referral link they will start you off with $10. You can then start reading and referring more of your friends to make even more money. They cash out every end of the month so get started now!</p>
<h3><span style="text-decoration: underline;">How to find affiliates for free</span></h3>
<p>What you really want to do is take your referral link from fushioncash.net, hits4pay.com, or any other site that has a referral system and use clicksense.com to get your referrals.  Just log in to clicksense.com and go to manage ads. You can use the cash you&#8217;ve already earned clicking on ads to put up your own ad with referral link. It is an easy way to get people besides your friends to sign up and it doesn&#8217;t cost you anything .</p>
]]></content:encoded>
			<wfw:commentRss>http://www.goodies4uall.com/make-money-from-home/goodies/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Free Stuff With Swagbucks</title>
		<link>http://www.goodies4uall.com/free-stuff-with-swagbucks/goodies/</link>
		<comments>http://www.goodies4uall.com/free-stuff-with-swagbucks/goodies/#comments</comments>
		<pubDate>Wed, 11 Nov 2009 16:44:11 +0000</pubDate>
		<dc:creator>Don</dc:creator>
				<category><![CDATA[Goodies]]></category>

		<guid isPermaLink="false">http://www.goodies4uall.com/?p=145</guid>
		<description><![CDATA[Get free stuff for searching the internet! Swagbucks.com is a site designed to compensate people for using their site to do their day to day searching with swagbucks. You can use these so called swagbucks for gift cards, prizes, or even trade in for cash. Some examples of what you can redeem your swagbucks for are:]]></description>
			<content:encoded><![CDATA[<p>Get free stuff for searching the internet! <a href="http://swagbucks.com/refer/goodies4uall" target="_blank">Swagbucks.com</a> is a site designed to compensate people for using their site to do their day to day searching with swagbucks. You can use these so called swagbucks for gift cards, prizes, or even trade in for cash. Some examples of what you can redeem your swagbucks for are:</p>
<ul>
<li>70SB &#8211; $5 cash in Paypal</li>
<li>60SB &#8211; The Office Season 5</li>
<li>Many other prizes</li>
</ul>
<p><span style="text-decoration: underline;"><strong>TIPS</strong></span> &amp; <strong><span style="text-decoration: underline;">HINTS</span></strong></p>
<ul>
<li>Use the search engine for all your searches</li>
<li>Use the widget that will notify you 95% of the time when swagcodes are available</li>
<li>Refer friends to help you out. Sign them up through your referral link. You will get each point your friend gets from the searches.</li>
</ul>
<p><strong><span style="text-decoration: underline;">Instructions</span></strong></p>
<p>1. Go <a href="http://swagbucks.com/refer/goodies4uall" target="_blank">here</a> and sign up. You will get 3 free swagbucks complimentary of goodies4uall.com</p>
<p>2. Start searching. (After about 3 valid searches you will get another swagbuck. Do not search randomly as it can decrease your chances of winning)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.goodies4uall.com/free-stuff-with-swagbucks/goodies/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Monopoly City Streets Hack</title>
		<link>http://www.goodies4uall.com/monopoly-city-streets-hack/goodies/</link>
		<comments>http://www.goodies4uall.com/monopoly-city-streets-hack/goodies/#comments</comments>
		<pubDate>Mon, 28 Sep 2009 19:43:08 +0000</pubDate>
		<dc:creator>Don</dc:creator>
				<category><![CDATA[Goodies]]></category>

		<guid isPermaLink="false">http://www.goodies4uall.com/?p=125</guid>
		<description><![CDATA[This article is intended to inform those how easy it is to hack monopoly city streets. It was also written with the intent on how to prevent yourself from being hacked in the game. If you have not played the game yet, I recommend to give it a try. Just head on over to www.monopolycitystreets.com. This method is not detected yet or prevented in any way. There is no article online yet with a monopoly city streets hack except for certain scams that want your money. Feel free to donate if this article helped you out!
]]></description>
			<content:encoded><![CDATA[<p><span style="text-decoration: underline;">Monopoly City Streets Vulnerability</span></p>
<p>The first thing I noticed with this online game is how easy it is to hack other accounts. Normally when you forget your password it is a matter of answering a secret question and the password is emailed to the email on the account. However since monopoly city streets does not require an email address to sign up, it is just a matter of guessing the answer to your secret question. What makes it even easier is there is only one secret question! What is your pet&#8217;s name? With just a few common pet names, it doesn&#8217;t take long for one to answer that question and be able to change the person&#8217;s password.</p>
<p><span id="more-125"></span></p>
<p><a href="http://www.goodies4uall.com/wp-content/uploads/2009/09/forgotpassword_monopoly1.jpg"><img class="size-full wp-image-126 alignnone" title="forgotpassword_monopoly" src="http://www.goodies4uall.com/wp-content/uploads/2009/09/forgotpassword_monopoly1.jpg" alt="forgotpassword monopoly1 Monopoly City Streets Hack" width="324" height="174" /></a></p>
<p><span style="text-decoration: underline;">Is There An Easier Way to Type In These Names?</span></p>
<p>Soon after typing these pet names in one by one I thought to myself there has to be an easier way. And yes there is! Firefox has this add on called <a href="http://http://www.iopus.com/imacros/firefox/?ref=fxhome" target="_blank">imacros</a>. This allows you to automate certain things like filling out forms which is exactly what we are doing! The problem was writing the code for imacros took some time as the pet names are case sensitive. Here is the example code of just using 3 pet names:</p>
<p>VERSION BUILD=6240709 RECORDER=FX<br />
TAB T=1<br />
URL GOTO=http://www.monopolycitystreets.com/game.html#en<br />
TAG POS=4 TYPE=INPUT:TEXT FORM=NAME:NoFormName ATTR=* CONTENT=Abby<br />
TAG POS=1 TYPE=INPUT:SUBMIT FORM=NAME:NoFormName ATTR=VALUE:SET&lt;SP&gt;PASSWORD<br />
TAG POS=4 TYPE=INPUT:TEXT FORM=NAME:NoFormName ATTR=* CONTENT=abby<br />
TAG POS=1 TYPE=INPUT:SUBMIT FORM=NAME:NoFormName ATTR=VALUE:SET&lt;SP&gt;PASSWORD<br />
TAG POS=4 TYPE=INPUT:TEXT FORM=NAME:NoFormName ATTR=* CONTENT=Angel<br />
TAG POS=1 TYPE=INPUT:SUBMIT FORM=NAME:NoFormName ATTR=VALUE:SET&lt;SP&gt;PASSWORD<br />
TAG POS=4 TYPE=INPUT:TEXT FORM=NAME:NoFormName ATTR=* CONTENT=angel</p>
<p>After playing that macro you will notice it will enter in two names both uppercase and lowercase and click set password. NOTE: You will have to manually enter in the password you would like to change it to first. Then click Play on the imacros add on.</p>
<p><a href="http://www.goodies4uall.com/wp-content/uploads/2009/09/petnames_changepassword.jpg"><img class="aligncenter size-medium wp-image-130" title="petnames_changepassword" src="http://www.goodies4uall.com/wp-content/uploads/2009/09/petnames_changepassword-300x296.jpg" alt="petnames changepassword 300x296 Monopoly City Streets Hack" width="300" height="296" /></a></p>
<p>The only problem here is it takes a long time to build up the code to try many pet names.</p>
<p><span style="text-decoration: underline;">Need A List of Common Pet Names?</span></p>
<p>After searching online for a long list of pet names I began to notice there were many short ones but no long list. So I needed an easy way to combine these lists into one that would not include the duplicates and alphabetically sort them. That&#8217;s when I realized the need to write my own program to do this for me.</p>
<p><span style="text-decoration: underline;">Program CombinedLists and Other Goodies</span></p>
<p>The program performs the following:</p>
<ul>
<li>Combines 2 lists excluding duplicate names</li>
<li>Sorts the combined list alphabetically</li>
<li>Asks a filename to save to</li>
<li>Saves a .txt file and a .iim file for imacros to use. (Conveniently makes the code for the imacros program all you need to do is copy and paste)</li>
<li>Tells you how many names you have.</li>
</ul>
<p>The Program requires the following:</p>
<ul>
<li>Each list must be saved as a .txt file with ONE name per line</li>
<li>When loading both files include : .txt extension</li>
<li>When saving combined list do not include .txt extension</li>
<li>Maximum of 10,000 names in 1st list</li>
<li>Maximum of 1,000 names in 2nd list</li>
<li>Maximum of 11,000 names in combined list</li>
<li>Easiest to load lists from the folder the program is ran from.</li>
</ul>
<p><strong>I wrote the program in c++. I have included the program, a large list of pet names (2303 names), and the code of that list for imacros.</strong></p>
<p><a href="http://www.goodies4uall.com/wp-content/uploads/2009/09/CombineLists.exe" target="_blank">CombineLists.exe</a></p>
<p><a href="http://www.goodies4uall.com/wp-content/uploads/2009/09/list.txt" target="_blank">list.txt</a></p>
<p><a href="http://www.goodies4uall.com/wp-content/uploads/2009/09/list.txt.iim" target="_blank">list(imacros).iim</a></p>
<p><span style="text-decoration: underline;">Prevention</span></p>
<p>The only sure way to prevent your account from being hacked is to make a password for your pet name. Just don&#8217;t forget your password!</p>
<p>UPDATE:</p>
<p>Although you can still guess people&#8217;s pet names manually, this hack has been prevented with captcha.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.goodies4uall.com/monopoly-city-streets-hack/goodies/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Top Web Hosting Sites</title>
		<link>http://www.goodies4uall.com/top-web-hosting-sites/goodies/</link>
		<comments>http://www.goodies4uall.com/top-web-hosting-sites/goodies/#comments</comments>
		<pubDate>Tue, 14 Jul 2009 01:07:43 +0000</pubDate>
		<dc:creator>Don</dc:creator>
				<category><![CDATA[Goodies]]></category>

		<guid isPermaLink="false">http://www.goodies4uall.com/?p=112</guid>
		<description><![CDATA[The top web hosting site depends on price, customer support, dependability, and ease of use; in that specific order. I will review Hostmonster, Bluehost,  and ThinkHost so you can decide for yourself who to host your new blog or website. 
1.  Hostmonster.com -
Price: $5.95 a month will buy you unlimited everything. Unlimited hosting space, unlimited [...]]]></description>
			<content:encoded><![CDATA[<p>The top web hosting site depends on price, customer support, dependability, and ease of use; in that specific order. I will review Hostmonster, Bluehost,  and ThinkHost so you can decide for yourself who to host your new blog or website. <span id="more-112"></span></p>
<p>1.  <a title="Hostmonster.com" href="http://www.HostMonster.Com/track/goodies4_u/blog" target="_blank"><strong>Hostmonster.com</strong></a> -</p>
<p>Price: $5.95 a month will buy you unlimited everything. Unlimited hosting space, unlimited bandwidth, and unlimited domains to name a few. It will also get you $50 free google credits and $25 free yahoo credits.</p>
<p>Customer Support: This company along with Bluehost support is a definite plus. They have chat, phone, and ticket support available 24/7. It is nice to have Americans that actually know the problem you are experiencing. The average wait time on the phone is less than a minute.</p>
<p>Dependability: I monitored Hostmonster with a 3rd party monitoring service provider. After 4 months there was not a single month below 99% uptime.</p>
<p>Ease of Use: If you are familiar with cpanel than you shouldn&#8217;t have any problems. However it is so easy to learn even my grandma could use it. You might be disapointed however if you are looking for a lot of templates to just fill in. They do offer SiteBuilder but it is very limited on what you can do with little to no templates to choose from. If you have your site, are building your site in 3rd party software(Dreamweaver, Kompozer) or are looking to use Wordpress or Joomla, then this is not a problem.</p>
<p>2.  <a title="Bluehost.com" href=" http://www.bluehost.Com/track/goodies4_u/blog" target="_blank"><strong>Bluehost.com</strong></a> -</p>
<p>Price: $6.95 a month will also buy you unlimited everything. Unlimited hosting space, unlimited bandwidth, and unlimited domains to name a few. It will also get you $50 free google credits and $25 free yahoo credits. It has been around longer than bluehost but they are owned by the same company.</p>
<p>Customer Support: This company&#8217; customer support is excellent. They have chat, phone, and ticket support available 24/7.</p>
<p>Dependability: I monitored Bluehost with a 3rd party monitoring service provider for six months. Overall there was about 97% uptime. Not as great as Hostmonster but still excellent with the price you are paying.</p>
<p>Ease of Use: Bluehost and Hostmonster use the same cpanel. If you are looking for something with a lot of templates to choose from you might want to try something else.</p>
<p>2. <a title="ThinkHost.com" href="http://www.thinkhost.com/?p=goodies4uall" target="_blank"><strong>ThinkHost.com</strong></a> -</p>
<p>Price: $7.95 a month will also buy you unlimited everything. However this web hosting is a little different since it is powered by renewable wind and solar energy. Why not support a more green earth and host your web site in one shot. You can get a free setup and 3 months free with this special coupon code:<br />
THD99999TREEM3A</p>
<p>Customer Support: They provide 24/7 customer support over the phone and also have a ticket system.</p>
<p>Dependability: Based on webhostingstuff.com this host had 99.4% uptime. They monitored it over a 1400 day period.</p>
<p>Ease of Use: Also very ease to use. They offer many add-ons to their plans.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.goodies4uall.com/top-web-hosting-sites/goodies/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How do I search for a filename in c++</title>
		<link>http://www.goodies4uall.com/how-do-i-search-for-a-filename-in-c/cprogramming/</link>
		<comments>http://www.goodies4uall.com/how-do-i-search-for-a-filename-in-c/cprogramming/#comments</comments>
		<pubDate>Fri, 10 Jul 2009 22:52:25 +0000</pubDate>
		<dc:creator>Don</dc:creator>
				<category><![CDATA[C++ Programming]]></category>

		<guid isPermaLink="false">http://www.goodies4uall.com/?p=84</guid>
		<description><![CDATA[Are you writing a program and need to know how to search for a specific file name? After searching around at msdn.microsoft.com and some trial and error I can show you how.  I will be using FindFirstFile and FindNextFile to do my search.First of all you need to include the following libraries in your code:
#include [...]]]></description>
			<content:encoded><![CDATA[<p>Are you writing a program and need to know how to search for a specific file name? After searching around at msdn.microsoft.com and some trial and error I can show you how.  I will be using FindFirstFile and FindNextFile to do my search.<span id="more-84"></span>First of all you need to include the following libraries in your code:</p>
<h5><span style="color: #333333;">#include &lt;windows.h&gt;<br />
#include &lt;tchar.h&gt;<br />
#include &lt;stdio.h&gt;</span></h5>
<p>Next you will need to create a handle and a pointer to the WIN32_FIND_DATA  structure that holds any information about the found file or directory.</p>
<div class="codecolorer-container c geshi" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br /></div></td><td><div class="c codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">WIN32_FIND_DATA FindFileData<span style="color: #339933;">;</span><br />
HANDLE hFind<span style="color: #339933;">;</span></div></td></tr></tbody></table></div>
<p>Then when you are ready to do your search you will need to use FindFirstFile and FindNextFile. They both work hand in hand and are similar to eachother. The handle is returned so that you can keep track of where you have searched. This handle is needed when we use FindNextFile. Also &#8216;targetFile&#8217; needs to be a cstring.The syntax is as follows:</p>
<div class="codecolorer-container c geshi" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="c codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">hFind <span style="color: #339933;">=</span> FindFirstFile<span style="color: #009900;">&#40;</span>targetFile<span style="color: #339933;">,</span> <span style="color: #339933;">&amp;</span>FindFileData<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></td></tr></tbody></table></div>
<p>If your targetFile is a type string class then you will need to convert it using the dot operator .c_str():</p>
<div class="codecolorer-container c geshi" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="c codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">hFind <span style="color: #339933;">=</span> FindFirstFile<span style="color: #009900;">&#40;</span>targetFile.<span style="color: #202020;">c_str</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #339933;">&amp;</span>FindFileData<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></td></tr></tbody></table></div>
<p>In order to keep searching you must next use FindNextFile. This is a little different in that it returns a boolean value. You also need to pass in hFind. The syntax is as follows:</p>
<div class="codecolorer-container c geshi" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="c codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">FindNextFile<span style="color: #009900;">&#40;</span>hFind<span style="color: #339933;">,</span> <span style="color: #339933;">&amp;</span>FindFileData<span style="color: #009900;">&#41;</span></div></td></tr></tbody></table></div>
<p>Here is an example code that prompts the user for a file or folder to search for. I have it looping on FindNextFile. This will print out the first 30 folders/files if the user puts in a wildcard(Example: C:\Windows\*).  This is just to show the basic concept. You can however, do whatever you would like!</p>
<div class="codecolorer-container c geshi" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;height:500px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br />20<br />21<br />22<br />23<br />24<br />25<br />26<br />27<br />28<br />29<br />30<br />31<br />32<br /></div></td><td><div class="c codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #993333;">int</span> main<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><br />
<span style="color: #009900;">&#123;</span><br />
WIN32_FIND_DATA FindFileData<span style="color: #339933;">;</span><br />
HANDLE hFind<span style="color: #339933;">;</span><br />
<span style="color: #993333;">string</span> targetFile<span style="color: #339933;">;</span><br />
<br />
<a href="http://www.opengroup.org/onlinepubs/009695399/functions/cout.html"><span style="color: #000066;">cout</span></a> <span style="color: #339933;">&lt;&lt;</span> <span style="color: #ff0000;">&quot;What is the file to be found: &quot;</span><span style="color: #339933;">;</span><br />
getline<span style="color: #009900;">&#40;</span>cin<span style="color: #339933;">,</span> targetFile<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
hFind <span style="color: #339933;">=</span> FindFirstFile<span style="color: #009900;">&#40;</span>targetFile.<span style="color: #202020;">c_str</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #339933;">&amp;</span>FindFileData<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span>hFind <span style="color: #339933;">==</span> INVALID_HANDLE_VALUE<span style="color: #009900;">&#41;</span><br />
<a href="http://www.opengroup.org/onlinepubs/009695399/functions/cout.html"><span style="color: #000066;">cout</span></a> <span style="color: #339933;">&lt;&lt;</span> targetFile <span style="color: #339933;">&lt;&lt;</span> <span style="color: #ff0000;">&quot; was not found. Error &quot;</span> <span style="color: #339933;">&lt;&lt;</span> GetLastError<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&lt;&lt;</span> endl<span style="color: #339933;">;</span><br />
<span style="color: #b1b100;">else</span><br />
<span style="color: #009900;">&#123;</span><br />
<a href="http://www.opengroup.org/onlinepubs/009695399/functions/cout.html"><span style="color: #000066;">cout</span></a> <span style="color: #339933;">&lt;&lt;</span> <span style="color: #ff0000;">&quot;The first file found is &quot;</span> <span style="color: #339933;">&lt;&lt;</span> FindFileData.<span style="color: #202020;">cFileName</span> <span style="color: #339933;">&lt;&lt;</span> endl<span style="color: #339933;">;</span><br />
<span style="color: #666666; font-style: italic;">//FindClose(hFind);</span><br />
<span style="color: #009900;">&#125;</span><br />
<br />
<span style="color: #b1b100;">for</span> <span style="color: #009900;">&#40;</span><span style="color: #993333;">int</span> i <span style="color: #339933;">=</span> <span style="color: #0000dd;">0</span><span style="color: #339933;">;</span> i <span style="color: #339933;">&lt;</span> <span style="color: #0000dd;">30</span><span style="color: #339933;">;</span> i<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span><br />
<span style="color: #009900;">&#123;</span><br />
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span>FindNextFile<span style="color: #009900;">&#40;</span>hFind<span style="color: #339933;">,</span> <span style="color: #339933;">&amp;</span>FindFileData<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><br />
<span style="color: #009900;">&#123;</span><br />
<a href="http://www.opengroup.org/onlinepubs/009695399/functions/cout.html"><span style="color: #000066;">cout</span></a> <span style="color: #339933;">&lt;&lt;</span> <span style="color: #ff0000;">&quot;The first file found is &quot;</span> <span style="color: #339933;">&lt;&lt;</span> FindFileData.<span style="color: #202020;">cFileName</span> <span style="color: #339933;">&lt;&lt;</span> endl<span style="color: #339933;">;</span><br />
<span style="color: #666666; font-style: italic;">//FindClose(hFind);</span><br />
<span style="color: #009900;">&#125;</span><br />
<span style="color: #b1b100;">else</span><br />
<a href="http://www.opengroup.org/onlinepubs/009695399/functions/cout.html"><span style="color: #000066;">cout</span></a> <span style="color: #339933;">&lt;&lt;</span> targetFile <span style="color: #339933;">&lt;&lt;</span> <span style="color: #ff0000;">&quot; was not found. Error &quot;</span> <span style="color: #339933;">&lt;&lt;</span> GetLastError<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&lt;&lt;</span> endl<span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span><br />
<br />
system<span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;PAUSE&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #b1b100;">return</span> <span style="color: #0000dd;">1</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span></div></td></tr></tbody></table></div>
]]></content:encoded>
			<wfw:commentRss>http://www.goodies4uall.com/how-do-i-search-for-a-filename-in-c/cprogramming/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What Xbox 360 DVD Drive do I have?</title>
		<link>http://www.goodies4uall.com/what-xbox-360-dvd-drive-do-i-have/xbox360/</link>
		<comments>http://www.goodies4uall.com/what-xbox-360-dvd-drive-do-i-have/xbox360/#comments</comments>
		<pubDate>Sat, 27 Jun 2009 20:40:39 +0000</pubDate>
		<dc:creator>Don</dc:creator>
				<category><![CDATA[Xbox 360]]></category>

		<guid isPermaLink="false">http://www.goodies4uall.com/?p=73</guid>
		<description><![CDATA[So your ready to mod your xbox 360. Of course there are lots of guides out there but you don't know what kind of dvd drive you have. This guide will help even the noobs find out. I show you detailed instructions without voiding your warranty. Definitely very useful when flashing your xbox 360 dvd drive.]]></description>
			<content:encoded><![CDATA[<p>Why would you want to find out what model you have? Well if you wanted to flash your xbox you need to know.  The good news is you can find out the model of your xbox 360 dvd drive without voiding your warranty. There are three different models. First you need to look at the tray.<span id="more-73"></span></p>
<p style="text-align: center;"><strong><span style="text-decoration: underline;">Toshiba-Samsung</span></strong></p>
<p style="text-align: center;"><a href="http://www.goodies4uall.com/wp-content/uploads/2009/06/Toshiba-Samsung.jpg"><img class="size-full wp-image-74 aligncenter" title="Toshiba-Samsung" src="http://www.goodies4uall.com/wp-content/uploads/2009/06/Toshiba-Samsung.jpg" alt="Toshiba Samsung What Xbox 360 DVD Drive do I have?" width="162" height="180" /></a></p>
<p style="text-align: center;"><strong><span style="text-decoration: underline;">Hitachi-LG</span></strong></p>
<p style="text-align: center;"><a href="http://www.goodies4uall.com/wp-content/uploads/2009/06/Hitachi-LG.jpg"><img class="size-full wp-image-75 aligncenter" title="Hitachi-LG" src="http://www.goodies4uall.com/wp-content/uploads/2009/06/Hitachi-LG.jpg" alt="Hitachi LG What Xbox 360 DVD Drive do I have?" width="162" height="180" /></a></p>
<p style="text-align: center;"><strong><span style="text-decoration: underline;">Benq OR Lite-On</span></strong></p>
<p style="text-align: center;"><a href="http://www.goodies4uall.com/wp-content/uploads/2009/06/dvd-benq-liteon.jpg"><img class="size-full wp-image-76 aligncenter" title="dvd-benq-or-liteon" src="http://www.goodies4uall.com/wp-content/uploads/2009/06/dvd-benq-liteon.jpg" alt="dvd-benq-or-liteon" width="162" height="180" /></a></p>
<p style="text-align: left;">If your drive looks like the last one it can either be a Benq or a Lite-On. This means you need to take off the face plate to find out (This does not void warranty). After removing the face plate look at the color of wires in the picture below (You will need a bright flashlight for this).</p>
<p><a href="http://www.goodies4uall.com/wp-content/uploads/2009/06/Benq-or-Lite-On.gif"><img class="aligncenter size-full wp-image-77" title="Benq or Lite-On" src="http://www.goodies4uall.com/wp-content/uploads/2009/06/Benq-or-Lite-On.gif" alt="Benq or Lite-On" width="504" height="166" /></a></p>
<p style="text-align: left;">That is it! After knowing what type of drive you have you will be able to follow the right guide in modding your xbox 360. Happy modding!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.goodies4uall.com/what-xbox-360-dvd-drive-do-i-have/xbox360/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Looks to Die For</title>
		<link>http://www.goodies4uall.com/looks-to-die-for/goodies/</link>
		<comments>http://www.goodies4uall.com/looks-to-die-for/goodies/#comments</comments>
		<pubDate>Thu, 25 Jun 2009 18:17:31 +0000</pubDate>
		<dc:creator>Don</dc:creator>
				<category><![CDATA[Goodies]]></category>

		<guid isPermaLink="false">http://www.goodies4uall.com/?p=58</guid>
		<description><![CDATA[Should I go tanning? What are the benefits of tanning? Is it really safe? I will show you what are the benefits and cons of tanning so you can decide for yourself.]]></description>
			<content:encoded><![CDATA[<p align="center">Looks to Die For</p>
<p>Indoor tanning is a refreshing and relaxing experience. Americans alone spend $5 billion annually at roughly 40,000 locations (Bizzozero).  The tanning bed has made the dream of a healthier and sexier body realistic. However these rewards come at a price. Tanning is directly linked to skin cancer. It has also been known to be addictive; not a very cheap addiction either. Those that tan often find a dent in their checking account. Although tanning beds can be a pleasant experience, overall it is dangerous to your body and shouldn’t be something in your daily schedule.<span id="more-58"></span></p>
<p>One of the major reasons people go to the tanning bed is because it&#8217;s refreshing. An article in <em>Psychology Today</em> quotes a dermatologist on the subject: &#8220;People get a sense of relaxation after they tan . . .&#8221; (Yatar 24). Because of this soothing experience, the tanning industry thrives. According to questionnaires, words most frequently associated with tanning salon use include: &#8220;relaxation&#8221;, &#8220;easy&#8221;, &#8220;nice&#8221;, and &#8220;friendly&#8221; (Hawkins 370). Any profitable tanning salon is designed in a way to settle down their customers. Not only does their equipment need to be top quality, but the overall environment needs to be enticing. Salon waiting rooms are designed to create a calming mood for their clients. Soft lamps, appeasing smells, and a clean environment are all factors. Some businesses even serve alcoholic beverages to promote social interaction. Even this social interaction can contribute to the ‘refreshing’ experience.</p>
<p>On the other hand, you can get the same invigorating experience from taking a fifteen minute nap. There is ample data confirming that naps are very refreshing. Dr. Gregg D. Jacobs  suggests that an afternoon nap as short as ten minutes can enhance alertness, mood, and mental performance (Jacobs).  Can it be a coincidence one has the same feelings after leaving a tanning salon? Lying down for 15 minutes in a tanning bed can provide our bodies a much needed break. This break could be taken advantage outside of a salon. Indeed rest may even be a more compelling reason to tan than the desire to acquire a darker skin tone.</p>
<p>As a matter of fact, tanning can be compelling enough to the point of addiction. Recent published research suggests that UV exposure can be addictive: “Endorphins are produced during exposure to UV light . . . Frequent users of tanning beds may become addicted to them.  Moreover, blocking the effects of those endorphins could lead to withdrawal symptoms“ (Burton). This explains why people are in a positive mood, more relaxed, and even appear to be hooked after a trip to the local tanning salon. That incentive could be a habit, desire, or even addiction. One could infer that it is the feelings, not the tan, that motivates them to return to the tanning bed. Even if an addiction is not present, the impulse to tan could be a craving to experience those endorphins. Nevertheless, the assumption that infrequent tanning is not addictive and harmless could be compared to the statement that occasional smoking is risk free. The facts support that tanning is addictive.</p>
<p>Tanning beds can, however, provide an essential vitamin that our bodies need. Human bodies need UV light to produce Vitamin D. According to the American Society of Nutrition, 90–95% of most<sup> </sup>people’s Vitamin D requirement comes from casual sun exposure (Holick). Several studies show that people with higher Vitamin D levels have lower rates of cancer. Lab and animal studies show that Vitamin D stops abnormal cell growth, helps cells die when they are supposed to, and stops the formation of blood vessels that feed  tumors (Tanning News). A deficiency in Vitamin D can lead to a weakened bones disease known as rickets (Holick). Oddly enough, one of the first tanning devices ever made was produced with the purpose to cure rickets. It wasn’t until later that the device’s main purpose was to tan athletes (Easy Tanning). Though tanning can be a good source of Vitamin D, it might not be the greatest.</p>
<p>One could get Vitamin D in other ways. Drinking lots of milk can be an alternative source to Vitamin D. Just one cup of milk supplies about one-fourth of the daily need for this vitamin in adults. Vitamin D is also found in other foods like fish and eggs (Holick). One could also drink a cup of milk in less time than an average tanning session. Not only is it more effective to get your Vitamin D elsewhere but also safer.</p>
<p>Frequent tanning is directly correlated to skin cancer and dangerous to the body. In a recent article it warns that tanning beds should be avoided:</p>
<p>Most cases of non melanoma skin cancer are caused by damage to DNA resulting from exposure to ultraviolet radiation of the sun. Skin cancer can be prevented by avoiding risk factors, particularly exposure to ultraviolet radiation from the sun. Sunlamps and tanning beds should be avoided, and the skin should be protected with sunscreen or clothing when outdoors. (Encyclopedia Britannica)</p>
<p>Going to the tanning bed damages your DNA which can result in skin cancer. The destructive process starts with UV rays removing electrons from water molecules. Without the electrons, hydroxyl radical is produced. Hydroxyl radicals attack the body&#8217;s proteins and DNA.  The body&#8217;s natural defense mechanism produces melanin to absorb the UV light. Melanin is what gives you the pigment of your skin (Lemon). The tan is a product of your body defending itself from harm. It is ironic to think your body&#8217;s defense to destructive rays is an attractive fad. Despite the direct link between tanning and cancer, a good-looking body might be a strong incentive for some.</p>
<p>Sexier looks appears to be the main motivation to tan. Eight out of ten students from Brigham Young University Idaho, when asked why they go tanning, gave responses in relation to looks. To some it is considered neither socially acceptable nor attractive to have pale white skin.  The tanning bed allows for the perfect amount of sun resulting in an even tan. Outdoor tanning or other alternatives result in burns and are not as attractive. Regardless of weather conditions and time of day it is possible for you to achieve that polished bronze look in time for that special event. The tanning bed can help provide ‘good looks’ but at what cost?</p>
<p>A common advertising method is to hide dangerous side effects with attractiveness. Many smoking ads portray the idea that smoking is attractive. Despite the side effects the smoking ads still manage to convince many. Tanning ads are no different. They lure customers despite the fact that tanning is dangerous and addictive.  Many are influenced to persue what is considered a nice-looking body. This advertisement technique makes a profit for the company, which directly effects the consumer.</p>
<p>Tanning, like other luxuries, is expensive. Average prices at local tanning salons usually are one of the following: 20 dollars/ 10 tans, 35 dollars/ 20 tans, or 35 dollars/ unlimited tans for one month. On the monthly plan, it could bring a total to 420 dollars after one year. For some, this is pocket change. For a married college student, this is not an affordable price at all. To sum up, tanning can be expensive which is unattractive.</p>
<p>The decision to go to a tanning bed is a question that faces all individuals at least once in their lives. During an interview with Brian Lemon, a professor of science at Brigham Young University Idaho, promptly answered this question by saying, “Never, no, never, never, nope” (Lemon). According to this source, tanning beds are not worth the risk. Tanning can be refreshing, somewhat healthy, and attractive. But they can also be addictive, destructive, and even expensive. In conclusion, tanning is not worth the cost. Sexier looks and a more relaxed body does not outweigh the consequences of a flat, broke individual with cancer.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.goodies4uall.com/looks-to-die-for/goodies/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
