<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="wordpress/1.5.1.3" -->
<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/"
>

<channel>
	<title>D'ArcyGregoire.com</title>
	<link>http://www.darcygregoire.com</link>
	<description></description>
	<pubDate>Wed, 12 Nov 2008 05:19:52 +0000</pubDate>
	<generator>http://wordpress.org/?v=1.5.1.3</generator>
	<language>en</language>

		<item>
		<title>Another Mental Math Technique</title>
		<link>http://www.darcygregoire.com/2008/05/05/another-mental-math-technique/</link>
		<comments>http://www.darcygregoire.com/2008/05/05/another-mental-math-technique/#comments</comments>
		<pubDate>Tue, 06 May 2008 05:20:21 +0000</pubDate>
		<dc:creator>D'Arcy Gregoire</dc:creator>
		
	<category>Math</category>
		<guid>http://www.darcygregoire.com/2008/05/05/another-mental-math-technique/</guid>
		<description><![CDATA[	This is just something that occured to me today; I haven&#8217;t yet had the time to really explore it. Once I do, I&#8217;m fairly certain that it&#8217;s range of use will expand however, for the time being, please note the limitation listed below.
	Technique for performing mental multiplication for larger numbers.
	This applies to any natural number [...]]]></description>
			<content:encoded><![CDATA[	<blockquote><p>This is just something that occured to me today; I haven&#8217;t yet had the time to really explore it. Once I do, I&#8217;m fairly certain that it&#8217;s range of use will expand however, for the time being, please note the limitation listed below.</p></blockquote>
	<p><strong>Technique for performing mental multiplication for larger numbers.</strong></p>
	<p>This applies to any natural number that falls within 10 less than the next multiple of 50. For example, it will work with 248 but not 234; 495 but not 476, etc. There are definite patterns that emerge once you apply the technique to numbers outisde of this restriction, so I&#8217;m quite sure that I will be able to modify it to work with all natural numbers once I have a moment to look at it again&#8230; but for now, it&#8217;s a good quick trick for those ranges to which it applies.</p>
	<p>Take your two numbers, I&#8217;ll use <strong>497 </strong>and <strong>343 </strong>as an example. For the purpose of clarity, let us refer to the first value; <strong>497</strong>, as <strong>a</strong> and the second; <strong>343</strong>, as <strong>b</strong>.</p>
	<p>Round a and b to the nearest multiple of 50 and find their product:<br />
<strong>500 x 350 = 175000</strong></p>
	<p>Next, take the difference of the rounded a minus a and multiply it by the rounded b:<br />
<strong>500 - 497 = 3<br />
3 x 350 = 1050</strong><br />
<em>Let&#8217;s call that product <strong>x</strong>.</em></p>
	<p>Now, do the same, but reverse a and b; rounded b minus b multiplied by a:<br />
<strong>350 - 343 = 7<br />
7 x 500 = 3500</strong><br />
<em>Let&#8217;s call that product <strong>y</strong>.</em></p>
	<p>Now, add <strong>x</strong> and <strong>y</strong> together and subtract the sum from your initial product of the rounded values:<br />
<strong>1050 + 3500 = 4550<br />
175000 - 4550 = 170450</strong></p>
	<p>We&#8217;re almost there. The last step is to find the product of the difference of the ones from 10 in the first values&#8230;so:<br />
<strong>497</strong>, the value of ones is <strong>7</strong>, so:<br />
<strong>10 - 7 = 3</strong><br />
<strong>343</strong>, the value of ones is <strong>3</strong>, so:<br />
<strong>10 - 3 = 7</strong><br />
Now, find the product of those differences:<br />
<strong>3 x 7 = 21</strong></p>
	<p>Add this to the large product above and you have your answer:<br />
<strong>170450 + 21 = 170471</strong></p>
	<p>I&#8217;ll leave it to you to explore this technique on larger numbers with more digits. </p>
	<p>It may look tiedious when written out in this manner, but it&#8217;s quite quick and easy to follow when running through the steps in your head.</p>
	<p>Hope that helps!</p>
	<p>
<!-- Begin Google Adsense code -->

<script type="text/javascript"><!--
google_ad_client = "pub-3629199404914237";
/* DG.com - inline 468x60 */
google_ad_slot = "8824447038";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
<!-- End Google Adsense code -->
</p>
]]></content:encoded>
			<wfw:commentRSS>http://www.darcygregoire.com/2008/05/05/another-mental-math-technique/feed/</wfw:commentRSS>
	</item>
		<item>
		<title>Quick multiplication trick</title>
		<link>http://www.darcygregoire.com/2008/04/26/quick-multiplication-trick/</link>
		<comments>http://www.darcygregoire.com/2008/04/26/quick-multiplication-trick/#comments</comments>
		<pubDate>Sat, 26 Apr 2008 07:10:27 +0000</pubDate>
		<dc:creator>D'Arcy Gregoire</dc:creator>
		
	<category>Math</category>
		<guid>http://www.darcygregoire.com/2008/04/26/quick-multiplication-trick/</guid>
		<description><![CDATA[	Here&#8217;s a quick trick for mentally multiplying two numbers which are greater than or equal to 10 but less than 20.
	Let&#8217;s use 18 and 19 as an example.
	Add the second digit in one of the numbers to the other number.
18 + 9 = 27
Now, add a zero (mulitply by 10)
27 x 10 = 270
Multiply the [...]]]></description>
			<content:encoded><![CDATA[	<p>Here&#8217;s a quick trick for mentally multiplying two numbers which are greater than or equal to 10 but less than 20.</p>
	<p>Let&#8217;s use 18 and 19 as an example.</p>
	<p>Add the second digit in one of the numbers to the other number.<br />
18 + 9 = 27<br />
Now, add a zero (mulitply by 10)<br />
27 x 10 = 270<br />
Multiply the last digit of each number<br />
8 x 9 = 72<br />
Add the two values together<br />
270 + 72 = 342</p>
	<p>18 x 19 = 342</p>
	<p>
<!-- Begin Google Adsense code -->

<script type="text/javascript"><!--
google_ad_client = "pub-3629199404914237";
/* DG.com - inline 468x60 */
google_ad_slot = "8824447038";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
<!-- End Google Adsense code -->

</p>
]]></content:encoded>
			<wfw:commentRSS>http://www.darcygregoire.com/2008/04/26/quick-multiplication-trick/feed/</wfw:commentRSS>
	</item>
		<item>
		<title>Convert time in seconds to time format</title>
		<link>http://www.darcygregoire.com/2007/10/24/convert-time-in-seocnds-ti-time-format/</link>
		<comments>http://www.darcygregoire.com/2007/10/24/convert-time-in-seocnds-ti-time-format/#comments</comments>
		<pubDate>Thu, 25 Oct 2007 00:41:21 +0000</pubDate>
		<dc:creator>D'Arcy Gregoire</dc:creator>
		
	<category>Excel Solutions</category>
		<guid>http://www.darcygregoire.com/2007/10/24/convert-time-in-seocnds-ti-time-format/</guid>
		<description><![CDATA[	I have a spreadsheet that I&#8217;m working on with thousands and thousands of time values listed strictly in seconds that I need to have converted into an hh:mm:ss format. Now, if we were just working in Excel, that&#8217;s as easy as saying =A1 / (1440*60) where A1 holds the value in seconds, then applying the [...]]]></description>
			<content:encoded><![CDATA[	<p>I have a spreadsheet that I&#8217;m working on with thousands and thousands of time values listed strictly in seconds that I need to have converted into an hh:mm:ss format. Now, if we were just working in Excel, that&#8217;s as easy as saying =A1 / (1440*60) where A1 holds the value in seconds, then applying the time/37:30:55 format; a format that ensures that the value doesn&#8217;t roll over after 24 hours.  The problem I had was that it all needed to be done in VBA which, apparently, doesn&#8217;t have any means of formatting a value in such a way&#8230; atleast none that I could fine in a day or so of searching&#8230;</p>
	<p>So, just in case any one else out there is having the same issue, I thought I&#8217;d share the function that I ended up writing. It does the job quite nicely.</p>
	<p><code></p>
	<p></code><code><br />
Function convertTime(i As String)<br />
' D'Arcy Gregoire<br />
' October 24, 2007<br />
'<br />
Dim hVal As Double<br />
Dim hInt As Double<br />
Dim hDec As Double<br />
Dim hFin As String<br />
Dim mVal As Double<br />
Dim mInt As Integer<br />
Dim mDec As Double<br />
Dim mFin As String<br />
Dim sVal As Double<br />
Dim sInt As Integer<br />
Dim sFin As String</p>
	<p>' Hours<br />
If i < 3600 Then<br />
        hFin = "00"<br />
        mVal = Evaluate(i / 60)<br />
    Else<br />
        hVal = Evaluate(Round(i, 0) / 3600)<br />
        hInt = InStrRev(hVal, ".")<br />
        If hInt = 0 Then<br />
            hFin = "0" &#038; Trim(Str(hVal))<br />
        Else<br />
            hInt = Evaluate(Left(hVal, hInt - 1))<br />
            If hInt <= 9 Then<br />
                hFin = "0" &#038; Trim(Str(hInt))<br />
            Else<br />
                hFin = Trim(Str(hInt))<br />
            End If<br />
        End If<br />
        hDec = InStrRev(hVal, ".")<br />
        If hDec = 0 Then<br />
            hDec = 0<br />
        Else<br />
            hDec = Evaluate(Mid(hVal, hDec, 99))<br />
        End If<br />
        mVal = Evaluate(60 * hDec)<br />
    End If</p>
	<p>' Minutes<br />
    If i < 60 Then<br />
        mFin = "00"<br />
        sVal = i<br />
    Else<br />
        mInt = InStrRev(mVal, ".")<br />
        If mInt = 0 Then<br />
            mFin = "0" &#038; Trim(Str(mVal))<br />
        Else<br />
            mInt = Evaluate(Left(mVal, mInt - 1))<br />
            If mInt <= 9 Then<br />
                mFin = "0" &#038; Trim(Str(mInt))<br />
            Else<br />
                mFin = Trim(Str(mInt))<br />
            End If<br />
        End If<br />
        mDec = InStrRev(mVal, ".")<br />
        If mDec = 0 Then<br />
            mDec = 0<br />
        Else<br />
            mDec = Evaluate(Mid(mVal, mDec, 99))<br />
        End If<br />
        sVal = Evaluate(60 * mDec)<br />
    End If</p>
	<p>' Seconds<br />
    If sVal <= 9 Then<br />
        sFin = "0" &#038; Trim(Str(Evaluate(Round(sVal, 0))))<br />
    Else<br />
        sFin = Trim(Str(Evaluate(Round(sVal, 0))))<br />
    End If</p>
	<p>    ' Display result<br />
    convertTime = hFin &#038; ":" &#038; mFin &#038; ":" &#038; sFin</p>
	<p>End Function<br />
</code></code></p>
	<p>
<!-- Begin Google Adsense code -->

<script type="text/javascript"><!--
google_ad_client = "pub-3629199404914237";
/* DG.com - inline 468x60 */
google_ad_slot = "8824447038";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
<!-- End Google Adsense code -->

</p>
]]></content:encoded>
			<wfw:commentRSS>http://www.darcygregoire.com/2007/10/24/convert-time-in-seocnds-ti-time-format/feed/</wfw:commentRSS>
	</item>
		<item>
		<title>Block Hotlinking with .htaccess</title>
		<link>http://www.darcygregoire.com/2005/12/18/block-hotlinking-with-htaccess/</link>
		<comments>http://www.darcygregoire.com/2005/12/18/block-hotlinking-with-htaccess/#comments</comments>
		<pubDate>Mon, 19 Dec 2005 10:26:12 +0000</pubDate>
		<dc:creator>D'Arcy Gregoire</dc:creator>
		
	<category>Web Site Stuff</category>
		<guid>http://www.darcygregoire.com/2005/12/18/block-hotlinking-with-htaccess/</guid>
		<description><![CDATA[	Here&#8217;s something that I&#8217;ve just added to one of my sites, www.gogosuperfun.com, that some folks may find useful. It&#8217;s intended to stop people from hotlinking images and thus stealing your bandwidth.
Basically, it just blocks any domain, other than your own, from accessing filetypes that you specify. 
	
mod_rewrite code:
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?yourdomain.com(/)?.*$   [...]]]></description>
			<content:encoded><![CDATA[	<p>Here&#8217;s something that I&#8217;ve just added to one of my sites, <a href="http://www.gogosuperfun.com">www.gogosuperfun.com</a>, that some folks may find useful. It&#8217;s intended to stop people from hotlinking images and thus stealing your bandwidth.<br />
Basically, it just blocks any domain, other than your own, from accessing filetypes that you specify. </p>
	<p align="left">
<strong>mod_rewrite code:</strong><br />
<font color="#808080"><code>RewriteEngine on<br />
RewriteCond %{HTTP_REFERER} !^$<br />
RewriteCond %{HTTP_REFERER} !^http://(www\.)?yourdomain.com(/)?.*$     [NC]<br />
RewriteRule .*\.(gif|jpg|jpeg|bmp)$ http://yourdomain.com/default_image.jpe [R,NC]</code></font>
</p>
	<p>If that doesn&#8217;t work quite like you would have expected, try removing the line that says <code><font color="#808080">RewriteEngine on</font></code> and adding <code><font color="#808080">Options +FollowSymlinks</font></code> in it&#8217;s place. If that doesn&#8217;t work, take them both out and try that. If it still won&#8217;t work, try just putting both of those lines back in together. One of those combinations will work.</p>
	<p>Just paste one of these into your .htaccess file. Most FTP applications can&#8217;t see the .htaccess file, so don&#8217;t worry&#8230; just name it htaccess.txt on your computer, upload it, and then rename it to <strong>.htaccess</strong> and it will work. Of course, you&#8217;ll need to put your domain name where it says <em>yourdomain.com</em> and the default image that you want to have displayed where it says <em>http://yourdomain.com/default_image.jpe</em><br />
Notice that I&#8217;ve made the default image a .jpe file, since we haven&#8217;t restricted this file type. If you we&#8217;re to make the default image one of the restricted file types <em>(.gif, .jpg, .jpeg, or .bmp in the example above)</em>, it would just throw it into a loop since it wouldn&#8217;t be allowed to show the default image, so it would try to show the default image, but it wouldn&#8217;t be allowed&#8230; and so on&#8230;<br />
Good luck, hope this helps someone out.</p>
	<p>
<!-- Begin Google Adsense code -->

<script type="text/javascript"><!--
google_ad_client = "pub-3629199404914237";
/* DG.com - inline 468x60 */
google_ad_slot = "8824447038";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
<!-- End Google Adsense code -->
</p>
]]></content:encoded>
			<wfw:commentRSS>http://www.darcygregoire.com/2005/12/18/block-hotlinking-with-htaccess/feed/</wfw:commentRSS>
	</item>
	</channel>
</rss>
