<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0" xml:base="http://kahthong.com/blog" content="http://purl.org/rss/1.0/modules/content/" dc="http://purl.org/dc/terms/" foaf="http://xmlns.com/foaf/0.1/" og="http://ogp.me/ns#" rdfs="http://www.w3.org/2000/01/rdf-schema#" sioc="http://rdfs.org/sioc/ns#" sioct="http://rdfs.org/sioc/types#" skos="http://www.w3.org/2004/02/skos/core#" xsd="http://www.w3.org/2001/XMLSchema#">
  <channel>
    <title>KahThong.com</title>
    <link>http://kahthong.com/blog</link>
    <description />
    <language>en</language>
          <atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/kahthong" /><feedburner:info uri="kahthong" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
    <title>Embed Drupal node form anywhere</title>
    <link>http://feedproxy.google.com/~r/kahthong/~3/IzwLPFU1uyU/embed-drupal-node-form-anywhere</link>
    <description>&lt;div class="field field-name-body field-type-text-with-summary field-label-hidden"&gt;&lt;div class="field-items"&gt;&lt;div class="field-item even" property="content:encoded"&gt;&lt;p&gt;Simple 1 line of code to embed a Drupal node form &lt;em&gt;anywhere&lt;/em&gt; in your site although I would recommend doing it the Drupal way which is creating a custom module for this.&lt;/p&gt;
&lt;pre class="brush:php;"&gt;
print drupal_render(node_add('NODE_TYPE'));
&lt;/pre&gt;&lt;p&gt;
Where NODE_TYPE is your content type (machine name).&lt;/p&gt;
&lt;p&gt;If the code above returns an error that says the function &lt;code&gt;node_add()&lt;/code&gt; is undefined, add the following code before it.&lt;/p&gt;
&lt;pre class="brush:php;"&gt;
if (!function_exists('node_add')) {
  module_load_include('inc', 'node', 'node.pages');
}
&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="field field-name-field-tags field-type-taxonomy-term-reference field-label-above clearfix"&gt;&lt;h3 class="field-label"&gt;Tags: &lt;/h3&gt;&lt;ul class="links"&gt;&lt;li class="taxonomy-term-reference-0"&gt;&lt;a href="/tags/php" typeof="skos:Concept" property="rdfs:label skos:prefLabel"&gt;php&lt;/a&gt;&lt;/li&gt;&lt;li class="taxonomy-term-reference-1"&gt;&lt;a href="/tags/drupal" typeof="skos:Concept" property="rdfs:label skos:prefLabel"&gt;drupal&lt;/a&gt;&lt;/li&gt;&lt;li class="taxonomy-term-reference-2"&gt;&lt;a href="/tags/drupal-7" typeof="skos:Concept" property="rdfs:label skos:prefLabel"&gt;drupal 7&lt;/a&gt;&lt;/li&gt;&lt;li class="taxonomy-term-reference-3"&gt;&lt;a href="/tags/embed" typeof="skos:Concept" property="rdfs:label skos:prefLabel"&gt;embed&lt;/a&gt;&lt;/li&gt;&lt;li class="taxonomy-term-reference-4"&gt;&lt;a href="/tags/form" typeof="skos:Concept" property="rdfs:label skos:prefLabel"&gt;form&lt;/a&gt;&lt;/li&gt;&lt;li class="taxonomy-term-reference-5"&gt;&lt;a href="/tags/block" typeof="skos:Concept" property="rdfs:label skos:prefLabel"&gt;block&lt;/a&gt;&lt;/li&gt;&lt;li class="taxonomy-term-reference-6"&gt;&lt;a href="/tags/node" typeof="skos:Concept" property="rdfs:label skos:prefLabel"&gt;node&lt;/a&gt;&lt;/li&gt;&lt;li class="taxonomy-term-reference-7"&gt;&lt;a href="/tags/anywhere" typeof="skos:Concept" property="rdfs:label skos:prefLabel"&gt;anywhere&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/kahthong/~4/IzwLPFU1uyU" height="1" width="1"/&gt;</description>
     <pubDate>Tue, 10 Jan 2012 05:24:39 +0000</pubDate>
 <dc:creator>admin</dc:creator>
 <guid isPermaLink="false">126 at http://kahthong.com</guid>
  <feedburner:origLink>http://kahthong.com/2012/01/embed-drupal-node-form-anywhere</feedburner:origLink></item>
  <item>
    <title>Display Drupal menu local task tab according to node content type</title>
    <link>http://feedproxy.google.com/~r/kahthong/~3/5-lOrMOBvi8/display-drupal-menu-local-task-tab-according-node-content-type</link>
    <description>&lt;div class="field field-name-body field-type-text-with-summary field-label-hidden"&gt;&lt;div class="field-items"&gt;&lt;div class="field-item even" property="content:encoded"&gt;&lt;p&gt;By default every node should have the menu tab (MENU LOCAL TASK) of View and Edit.&lt;/p&gt;
&lt;p&gt;If your module wants to add its own tab but only restricted to content type of "foo", then use the following code snippet.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;XYZ&lt;/code&gt; below is your page callback for the new custom tab. Basically it calls another function to validate user's permission but we manipulate it to check the node type (via &lt;code&gt;access callback&lt;/code&gt;).&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="field field-name-field-tags field-type-taxonomy-term-reference field-label-above clearfix"&gt;&lt;h3 class="field-label"&gt;Tags: &lt;/h3&gt;&lt;ul class="links"&gt;&lt;li class="taxonomy-term-reference-0"&gt;&lt;a href="/tags/drupal" typeof="skos:Concept" property="rdfs:label skos:prefLabel"&gt;drupal&lt;/a&gt;&lt;/li&gt;&lt;li class="taxonomy-term-reference-1"&gt;&lt;a href="/tags/drupal-7" typeof="skos:Concept" property="rdfs:label skos:prefLabel"&gt;drupal 7&lt;/a&gt;&lt;/li&gt;&lt;li class="taxonomy-term-reference-2"&gt;&lt;a href="/tags/php" typeof="skos:Concept" property="rdfs:label skos:prefLabel"&gt;php&lt;/a&gt;&lt;/li&gt;&lt;li class="taxonomy-term-reference-3"&gt;&lt;a href="/taxonomy/term/196" typeof="skos:Concept" property="rdfs:label skos:prefLabel"&gt;access callback&lt;/a&gt;&lt;/li&gt;&lt;li class="taxonomy-term-reference-4"&gt;&lt;a href="/taxonomy/term/197" typeof="skos:Concept" property="rdfs:label skos:prefLabel"&gt;access argument&lt;/a&gt;&lt;/li&gt;&lt;li class="taxonomy-term-reference-5"&gt;&lt;a href="/taxonomy/term/198" typeof="skos:Concept" property="rdfs:label skos:prefLabel"&gt;hook menu&lt;/a&gt;&lt;/li&gt;&lt;li class="taxonomy-term-reference-6"&gt;&lt;a href="/taxonomy/term/199" typeof="skos:Concept" property="rdfs:label skos:prefLabel"&gt;hook_menu&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/kahthong/~4/5-lOrMOBvi8" height="1" width="1"/&gt;</description>
     <pubDate>Sun, 08 Jan 2012 08:38:37 +0000</pubDate>
 <dc:creator>admin</dc:creator>
 <guid isPermaLink="false">125 at http://kahthong.com</guid>
  <feedburner:origLink>http://kahthong.com/2012/01/display-drupal-menu-local-task-tab-according-node-content-type</feedburner:origLink></item>
  <item>
    <title>Themer-friendly menu link CSS classes for Drupal theme</title>
    <link>http://feedproxy.google.com/~r/kahthong/~3/d3m03RhE9zg/themer-friendly-menu-link-css-classes-drupal-theme</link>
    <description>&lt;div class="field field-name-body field-type-text-with-summary field-label-hidden"&gt;&lt;div class="field-items"&gt;&lt;div class="field-item even" property="content:encoded"&gt;&lt;p&gt;What this code does is to give themers an easier way to style individual menu items in Drupal. For example, if you have a menu item title "Company Profile" and you want this link to be red colour, the following code (to be placed inside &lt;code&gt;template.php&lt;/code&gt; file of your theme) will provide menu CSS class of &lt;code&gt;&amp;lt;li class="... menu-company-profile"&amp;gt;&lt;/code&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="field field-name-field-tags field-type-taxonomy-term-reference field-label-above clearfix"&gt;&lt;h3 class="field-label"&gt;Tags: &lt;/h3&gt;&lt;ul class="links"&gt;&lt;li class="taxonomy-term-reference-0"&gt;&lt;a href="/tags/drupal" typeof="skos:Concept" property="rdfs:label skos:prefLabel"&gt;drupal&lt;/a&gt;&lt;/li&gt;&lt;li class="taxonomy-term-reference-1"&gt;&lt;a href="/tags/drupal-7" typeof="skos:Concept" property="rdfs:label skos:prefLabel"&gt;drupal 7&lt;/a&gt;&lt;/li&gt;&lt;li class="taxonomy-term-reference-2"&gt;&lt;a href="/tags/php" typeof="skos:Concept" property="rdfs:label skos:prefLabel"&gt;php&lt;/a&gt;&lt;/li&gt;&lt;li class="taxonomy-term-reference-3"&gt;&lt;a href="/tags/css" typeof="skos:Concept" property="rdfs:label skos:prefLabel"&gt;css&lt;/a&gt;&lt;/li&gt;&lt;li class="taxonomy-term-reference-4"&gt;&lt;a href="/tags/themer" typeof="skos:Concept" property="rdfs:label skos:prefLabel"&gt;themer&lt;/a&gt;&lt;/li&gt;&lt;li class="taxonomy-term-reference-5"&gt;&lt;a href="/tags/theming" typeof="skos:Concept" property="rdfs:label skos:prefLabel"&gt;theming&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/kahthong/~4/d3m03RhE9zg" height="1" width="1"/&gt;</description>
     <pubDate>Thu, 29 Dec 2011 02:23:43 +0000</pubDate>
 <dc:creator>admin</dc:creator>
 <guid isPermaLink="false">123 at http://kahthong.com</guid>
  <feedburner:origLink>http://kahthong.com/2011/12/themer-friendly-menu-link-css-classes-drupal-theme</feedburner:origLink></item>
  <item>
    <title>Style your Drupal theme according to day or night time</title>
    <link>http://feedproxy.google.com/~r/kahthong/~3/nKsps1qbJMQ/style-your-drupal-theme-according-day-or-night-time</link>
    <description>&lt;div class="field field-name-body field-type-text-with-summary field-label-hidden"&gt;&lt;div class="field-items"&gt;&lt;div class="field-item even" property="content:encoded"&gt;&lt;p&gt;Here's a simple snippet to allow you to style your theme differently for day or night time. Place the following code into your theme's &lt;code&gt;template.php&lt;/code&gt; file.&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="field field-name-field-tags field-type-taxonomy-term-reference field-label-above clearfix"&gt;&lt;h3 class="field-label"&gt;Tags: &lt;/h3&gt;&lt;ul class="links"&gt;&lt;li class="taxonomy-term-reference-0"&gt;&lt;a href="/tags/drupal" typeof="skos:Concept" property="rdfs:label skos:prefLabel"&gt;drupal&lt;/a&gt;&lt;/li&gt;&lt;li class="taxonomy-term-reference-1"&gt;&lt;a href="/tags/drupal-7" typeof="skos:Concept" property="rdfs:label skos:prefLabel"&gt;drupal 7&lt;/a&gt;&lt;/li&gt;&lt;li class="taxonomy-term-reference-2"&gt;&lt;a href="/tags/php" typeof="skos:Concept" property="rdfs:label skos:prefLabel"&gt;php&lt;/a&gt;&lt;/li&gt;&lt;li class="taxonomy-term-reference-3"&gt;&lt;a href="/tags/day" typeof="skos:Concept" property="rdfs:label skos:prefLabel"&gt;day&lt;/a&gt;&lt;/li&gt;&lt;li class="taxonomy-term-reference-4"&gt;&lt;a href="/tags/night" typeof="skos:Concept" property="rdfs:label skos:prefLabel"&gt;night&lt;/a&gt;&lt;/li&gt;&lt;li class="taxonomy-term-reference-5"&gt;&lt;a href="/tags/theme" typeof="skos:Concept" property="rdfs:label skos:prefLabel"&gt;theme&lt;/a&gt;&lt;/li&gt;&lt;li class="taxonomy-term-reference-6"&gt;&lt;a href="/tags/theming" typeof="skos:Concept" property="rdfs:label skos:prefLabel"&gt;theming&lt;/a&gt;&lt;/li&gt;&lt;li class="taxonomy-term-reference-7"&gt;&lt;a href="/tags/template" typeof="skos:Concept" property="rdfs:label skos:prefLabel"&gt;template&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/kahthong/~4/nKsps1qbJMQ" height="1" width="1"/&gt;</description>
     <pubDate>Thu, 29 Dec 2011 02:19:03 +0000</pubDate>
 <dc:creator>admin</dc:creator>
 <guid isPermaLink="false">122 at http://kahthong.com</guid>
  <feedburner:origLink>http://kahthong.com/2011/12/style-your-drupal-theme-according-day-or-night-time</feedburner:origLink></item>
  <item>
    <title>Malaysia's URL shortener service RD.MY powered by Drupal</title>
    <link>http://feedproxy.google.com/~r/kahthong/~3/MlcqDP2x6II/malaysias-url-shortener-service-rdmy-powered-drupal</link>
    <description>&lt;div class="field field-name-field-image field-type-image field-label-hidden"&gt;&lt;div class="field-items"&gt;&lt;div class="field-item even" rel="og:image rdfs:seeAlso" resource="http://kahthong.com/sites/default/files/styles/medium/public/field/image/rdmy.png"&gt;&lt;a href="/2011/12/malaysias-url-shortener-service-rdmy-powered-drupal"&gt;&lt;img typeof="foaf:Image" src="http://kahthong.com/sites/default/files/styles/medium/public/field/image/rdmy.png" width="220" height="165" alt="Homepage of RD.MY" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="field field-name-body field-type-text-with-summary field-label-hidden"&gt;&lt;div class="field-items"&gt;&lt;div class="field-item even" property="content:encoded"&gt;&lt;p&gt;After securing my Malaysia country-level domain name &lt;a href="http://kt.my"&gt;KT.MY&lt;/a&gt;, I felt that it would also be fun to create my very own URL shortener service since its relatively easy to do especially with &lt;a href="http://drupal.org"&gt;Drupal&lt;/a&gt;.&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="field field-name-field-tags field-type-taxonomy-term-reference field-label-above clearfix"&gt;&lt;h3 class="field-label"&gt;Tags: &lt;/h3&gt;&lt;ul class="links"&gt;&lt;li class="taxonomy-term-reference-0" rel="dc:subject"&gt;&lt;a href="/tags/drupal" typeof="skos:Concept" property="rdfs:label skos:prefLabel"&gt;drupal&lt;/a&gt;&lt;/li&gt;&lt;li class="taxonomy-term-reference-1" rel="dc:subject"&gt;&lt;a href="/tags/drupal-7" typeof="skos:Concept" property="rdfs:label skos:prefLabel"&gt;drupal 7&lt;/a&gt;&lt;/li&gt;&lt;li class="taxonomy-term-reference-2" rel="dc:subject"&gt;&lt;a href="/tags/malaysia" typeof="skos:Concept" property="rdfs:label skos:prefLabel"&gt;malaysia&lt;/a&gt;&lt;/li&gt;&lt;li class="taxonomy-term-reference-3" rel="dc:subject"&gt;&lt;a href="/tags/url" typeof="skos:Concept" property="rdfs:label skos:prefLabel"&gt;url&lt;/a&gt;&lt;/li&gt;&lt;li class="taxonomy-term-reference-4" rel="dc:subject"&gt;&lt;a href="/tags/shortener" typeof="skos:Concept" property="rdfs:label skos:prefLabel"&gt;shortener&lt;/a&gt;&lt;/li&gt;&lt;li class="taxonomy-term-reference-5" rel="dc:subject"&gt;&lt;a href="/tags/service" typeof="skos:Concept" property="rdfs:label skos:prefLabel"&gt;service&lt;/a&gt;&lt;/li&gt;&lt;li class="taxonomy-term-reference-6" rel="dc:subject"&gt;&lt;a href="/tags/api" typeof="skos:Concept" property="rdfs:label skos:prefLabel"&gt;api&lt;/a&gt;&lt;/li&gt;&lt;li class="taxonomy-term-reference-7" rel="dc:subject"&gt;&lt;a href="/tags/wurfl" typeof="skos:Concept" property="rdfs:label skos:prefLabel"&gt;wurfl&lt;/a&gt;&lt;/li&gt;&lt;li class="taxonomy-term-reference-8" rel="dc:subject"&gt;&lt;a href="/tags/surbl" typeof="skos:Concept" property="rdfs:label skos:prefLabel"&gt;surbl&lt;/a&gt;&lt;/li&gt;&lt;li class="taxonomy-term-reference-9" rel="dc:subject"&gt;&lt;a href="/tags/maxmind" typeof="skos:Concept" property="rdfs:label skos:prefLabel"&gt;maxmind&lt;/a&gt;&lt;/li&gt;&lt;li class="taxonomy-term-reference-10" rel="dc:subject"&gt;&lt;a href="/tags/geolocation" typeof="skos:Concept" property="rdfs:label skos:prefLabel"&gt;geolocation&lt;/a&gt;&lt;/li&gt;&lt;li class="taxonomy-term-reference-11" rel="dc:subject"&gt;&lt;a href="/tags/report" typeof="skos:Concept" property="rdfs:label skos:prefLabel"&gt;report&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/kahthong/~4/MlcqDP2x6II" height="1" width="1"/&gt;</description>
     <pubDate>Thu, 22 Dec 2011 15:16:15 +0000</pubDate>
 <dc:creator>admin</dc:creator>
 <guid isPermaLink="false">121 at http://kahthong.com</guid>
  <feedburner:origLink>http://kahthong.com/2011/12/malaysias-url-shortener-service-rdmy-powered-drupal</feedburner:origLink></item>
  <item>
    <title>Project Euler - Problem 11</title>
    <link>http://feedproxy.google.com/~r/kahthong/~3/o5hu-ymiMM0/project-euler-problem-11</link>
    <description>&lt;div class="field field-name-body field-type-text-with-summary field-label-hidden"&gt;&lt;div class="field-items"&gt;&lt;div class="field-item even" property="content:encoded"&gt;&lt;h3&gt;Question&lt;/h3&gt;
&lt;p&gt;In the 20 x 20 grid below, four numbers along a diagonal line have been marked in red (bold).&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="field field-name-field-tags field-type-taxonomy-term-reference field-label-above clearfix"&gt;&lt;h3 class="field-label"&gt;Tags: &lt;/h3&gt;&lt;ul class="links"&gt;&lt;li class="taxonomy-term-reference-0"&gt;&lt;a href="/tags/euler" typeof="skos:Concept" property="rdfs:label skos:prefLabel"&gt;euler&lt;/a&gt;&lt;/li&gt;&lt;li class="taxonomy-term-reference-1"&gt;&lt;a href="/tags/php" typeof="skos:Concept" property="rdfs:label skos:prefLabel"&gt;php&lt;/a&gt;&lt;/li&gt;&lt;li class="taxonomy-term-reference-2"&gt;&lt;a href="/tags/grid" typeof="skos:Concept" property="rdfs:label skos:prefLabel"&gt;grid&lt;/a&gt;&lt;/li&gt;&lt;li class="taxonomy-term-reference-3"&gt;&lt;a href="/tags/greatest" typeof="skos:Concept" property="rdfs:label skos:prefLabel"&gt;greatest&lt;/a&gt;&lt;/li&gt;&lt;li class="taxonomy-term-reference-4"&gt;&lt;a href="/tags/product" typeof="skos:Concept" property="rdfs:label skos:prefLabel"&gt;product&lt;/a&gt;&lt;/li&gt;&lt;li class="taxonomy-term-reference-5"&gt;&lt;a href="/tags/adjacent" typeof="skos:Concept" property="rdfs:label skos:prefLabel"&gt;adjacent&lt;/a&gt;&lt;/li&gt;&lt;li class="taxonomy-term-reference-6"&gt;&lt;a href="/tags/diagonal" typeof="skos:Concept" property="rdfs:label skos:prefLabel"&gt;diagonal&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/kahthong/~4/o5hu-ymiMM0" height="1" width="1"/&gt;</description>
     <pubDate>Wed, 21 Dec 2011 02:21:18 +0000</pubDate>
 <dc:creator>admin</dc:creator>
 <guid isPermaLink="false">118 at http://kahthong.com</guid>
  <feedburner:origLink>http://kahthong.com/2011/12/project-euler-problem-11</feedburner:origLink></item>
  <item>
    <title>Project Euler - Problem 10</title>
    <link>http://feedproxy.google.com/~r/kahthong/~3/qBVs5UbKDfM/project-euler-problem-10</link>
    <description>&lt;div class="field field-name-body field-type-text-with-summary field-label-hidden"&gt;&lt;div class="field-items"&gt;&lt;div class="field-item even" property="content:encoded"&gt;&lt;h3&gt;Question&lt;/h3&gt;
&lt;p&gt;The sum of the primes below 10 is 2 + 3 + 5 + 7 = 17.&lt;/p&gt;
&lt;p&gt;Find the sum of all the primes below two million.&lt;/p&gt;
&lt;h3&gt;Solution&lt;/h3&gt;
&lt;pre class="brush:php;"&gt;
$sum = 2;
for ($i = 2; $i &amp;lt; 2000000; $i++) {
  if ($i % 2 != 1) {
    continue;
  }
  $d = 3;
  $x = sqrt($i);
  while (($i % $d != 0) &amp;amp;&amp;amp; $d &amp;lt; $x) {
    $d += 2;
  }
  if ((($i % $d == 0 &amp;amp;&amp;amp; $i != $d) * 1) == 0) {
    $sum += $i;
  }
}
echo $sum;
&lt;/pre&gt;&lt;p&gt;
Time taken to execute: 30.5757 second.&lt;/p&gt;
&lt;h3&gt;Answer&lt;/h3&gt;
&lt;p&gt;142913828922&lt;/p&gt;
&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="field field-name-field-tags field-type-taxonomy-term-reference field-label-above clearfix"&gt;&lt;h3 class="field-label"&gt;Tags: &lt;/h3&gt;&lt;ul class="links"&gt;&lt;li class="taxonomy-term-reference-0"&gt;&lt;a href="/tags/euler" typeof="skos:Concept" property="rdfs:label skos:prefLabel"&gt;euler&lt;/a&gt;&lt;/li&gt;&lt;li class="taxonomy-term-reference-1"&gt;&lt;a href="/tags/php" typeof="skos:Concept" property="rdfs:label skos:prefLabel"&gt;php&lt;/a&gt;&lt;/li&gt;&lt;li class="taxonomy-term-reference-2"&gt;&lt;a href="/tags/prime" typeof="skos:Concept" property="rdfs:label skos:prefLabel"&gt;prime&lt;/a&gt;&lt;/li&gt;&lt;li class="taxonomy-term-reference-3"&gt;&lt;a href="/tags/largest" typeof="skos:Concept" property="rdfs:label skos:prefLabel"&gt;largest&lt;/a&gt;&lt;/li&gt;&lt;li class="taxonomy-term-reference-4"&gt;&lt;a href="/tags/sum" typeof="skos:Concept" property="rdfs:label skos:prefLabel"&gt;sum&lt;/a&gt;&lt;/li&gt;&lt;li class="taxonomy-term-reference-5"&gt;&lt;a href="/tags/million" typeof="skos:Concept" property="rdfs:label skos:prefLabel"&gt;million&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/kahthong/~4/qBVs5UbKDfM" height="1" width="1"/&gt;</description>
     <pubDate>Tue, 20 Dec 2011 07:26:42 +0000</pubDate>
 <dc:creator>admin</dc:creator>
 <guid isPermaLink="false">117 at http://kahthong.com</guid>
  <feedburner:origLink>http://kahthong.com/2011/12/project-euler-problem-10</feedburner:origLink></item>
  <item>
    <title>Project Euler - Problem 9</title>
    <link>http://feedproxy.google.com/~r/kahthong/~3/_D4VrjJwiNc/project-euler-problem-9</link>
    <description>&lt;div class="field field-name-body field-type-text-with-summary field-label-hidden"&gt;&lt;div class="field-items"&gt;&lt;div class="field-item even" property="content:encoded"&gt;&lt;h3&gt;Question&lt;/h3&gt;
&lt;p&gt;A Pythagorean triplet is a set of three natural numbers, a 
a² + b² = c²&lt;/p&gt;
&lt;p&gt;For example, 3² + 4² = 9 + 16 = 25 = 5².&lt;/p&gt;
&lt;p&gt;There exists exactly one Pythagorean triplet for which a + b + c = 1000.&lt;br /&gt;
Find the product abc.&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="field field-name-field-tags field-type-taxonomy-term-reference field-label-above clearfix"&gt;&lt;h3 class="field-label"&gt;Tags: &lt;/h3&gt;&lt;ul class="links"&gt;&lt;li class="taxonomy-term-reference-0"&gt;&lt;a href="/tags/euler" typeof="skos:Concept" property="rdfs:label skos:prefLabel"&gt;euler&lt;/a&gt;&lt;/li&gt;&lt;li class="taxonomy-term-reference-1"&gt;&lt;a href="/tags/php" typeof="skos:Concept" property="rdfs:label skos:prefLabel"&gt;php&lt;/a&gt;&lt;/li&gt;&lt;li class="taxonomy-term-reference-2"&gt;&lt;a href="/tags/pythagorean" typeof="skos:Concept" property="rdfs:label skos:prefLabel"&gt;pythagorean&lt;/a&gt;&lt;/li&gt;&lt;li class="taxonomy-term-reference-3"&gt;&lt;a href="/tags/triple" typeof="skos:Concept" property="rdfs:label skos:prefLabel"&gt;triple&lt;/a&gt;&lt;/li&gt;&lt;li class="taxonomy-term-reference-4"&gt;&lt;a href="/tags/triplet" typeof="skos:Concept" property="rdfs:label skos:prefLabel"&gt;triplet&lt;/a&gt;&lt;/li&gt;&lt;li class="taxonomy-term-reference-5"&gt;&lt;a href="/tags/product" typeof="skos:Concept" property="rdfs:label skos:prefLabel"&gt;product&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/kahthong/~4/_D4VrjJwiNc" height="1" width="1"/&gt;</description>
     <pubDate>Tue, 20 Dec 2011 07:17:31 +0000</pubDate>
 <dc:creator>admin</dc:creator>
 <guid isPermaLink="false">116 at http://kahthong.com</guid>
  <feedburner:origLink>http://kahthong.com/2011/12/project-euler-problem-9</feedburner:origLink></item>
  <item>
    <title>Project Euler - Problem 8</title>
    <link>http://feedproxy.google.com/~r/kahthong/~3/61eCIEjLE28/project-euler-problem-8</link>
    <description>&lt;div class="field field-name-body field-type-text-with-summary field-label-hidden"&gt;&lt;div class="field-items"&gt;&lt;div class="field-item even" property="content:encoded"&gt;&lt;h3&gt;Question&lt;/h3&gt;
&lt;p&gt;Find the greatest product of five consecutive digits in the 1000-digit number.&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="field field-name-field-tags field-type-taxonomy-term-reference field-label-above clearfix"&gt;&lt;h3 class="field-label"&gt;Tags: &lt;/h3&gt;&lt;ul class="links"&gt;&lt;li class="taxonomy-term-reference-0"&gt;&lt;a href="/tags/euler" typeof="skos:Concept" property="rdfs:label skos:prefLabel"&gt;euler&lt;/a&gt;&lt;/li&gt;&lt;li class="taxonomy-term-reference-1"&gt;&lt;a href="/tags/php" typeof="skos:Concept" property="rdfs:label skos:prefLabel"&gt;php&lt;/a&gt;&lt;/li&gt;&lt;li class="taxonomy-term-reference-2"&gt;&lt;a href="/tags/product" typeof="skos:Concept" property="rdfs:label skos:prefLabel"&gt;product&lt;/a&gt;&lt;/li&gt;&lt;li class="taxonomy-term-reference-3"&gt;&lt;a href="/tags/greatest" typeof="skos:Concept" property="rdfs:label skos:prefLabel"&gt;greatest&lt;/a&gt;&lt;/li&gt;&lt;li class="taxonomy-term-reference-4"&gt;&lt;a href="/tags/number" typeof="skos:Concept" property="rdfs:label skos:prefLabel"&gt;number&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/kahthong/~4/61eCIEjLE28" height="1" width="1"/&gt;</description>
     <pubDate>Tue, 20 Dec 2011 06:06:27 +0000</pubDate>
 <dc:creator>admin</dc:creator>
 <guid isPermaLink="false">115 at http://kahthong.com</guid>
  <feedburner:origLink>http://kahthong.com/2011/12/project-euler-problem-8</feedburner:origLink></item>
  <item>
    <title>Project Euler - Problem 7</title>
    <link>http://feedproxy.google.com/~r/kahthong/~3/aZFbKw7ApsQ/project-euler-problem-7</link>
    <description>&lt;div class="field field-name-body field-type-text-with-summary field-label-hidden"&gt;&lt;div class="field-items"&gt;&lt;div class="field-item even" property="content:encoded"&gt;&lt;h3&gt;Question&lt;/h3&gt;
&lt;p&gt;By listing the first six prime numbers: 2, 3, 5, 7, 11, and 13, we can see that the 6th prime is 13.&lt;/p&gt;
&lt;p&gt;What is the 10001st prime number?&lt;/p&gt;
&lt;h3&gt;Solution&lt;/h3&gt;
&lt;pre class="brush:php;"&gt;
$last = 0;
$count = 0;
$max = 10001;
for ($i = 3; $count &amp;lt; $max - 1; $i++) {
  if ($i % 2 != 1) {
    continue;
  }
  $d = 3;
  $x = sqrt($i);
  while (($i % $d != 0) &amp;amp;&amp;amp; $d &amp;lt; $x) {
    $d += 2;
  }
  if ((($i % $d == 0 &amp;amp;&amp;amp; $i != $d) * 1) == 0) {
    $last = $i;
    $count++;
  }
}
echo $last;
&lt;/pre&gt;&lt;p&gt;
Time taken to execute: 0.5800 second.&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="field field-name-field-tags field-type-taxonomy-term-reference field-label-above clearfix"&gt;&lt;h3 class="field-label"&gt;Tags: &lt;/h3&gt;&lt;ul class="links"&gt;&lt;li class="taxonomy-term-reference-0"&gt;&lt;a href="/tags/euler" typeof="skos:Concept" property="rdfs:label skos:prefLabel"&gt;euler&lt;/a&gt;&lt;/li&gt;&lt;li class="taxonomy-term-reference-1"&gt;&lt;a href="/tags/prime" typeof="skos:Concept" property="rdfs:label skos:prefLabel"&gt;prime&lt;/a&gt;&lt;/li&gt;&lt;li class="taxonomy-term-reference-2"&gt;&lt;a href="/tags/php" typeof="skos:Concept" property="rdfs:label skos:prefLabel"&gt;php&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/kahthong/~4/aZFbKw7ApsQ" height="1" width="1"/&gt;</description>
     <pubDate>Tue, 20 Dec 2011 05:44:26 +0000</pubDate>
 <dc:creator>admin</dc:creator>
 <guid isPermaLink="false">114 at http://kahthong.com</guid>
  <feedburner:origLink>http://kahthong.com/2011/12/project-euler-problem-7</feedburner:origLink></item>
  </channel>
</rss>

