<?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>... coding (the life) &#187; google</title>
	<atom:link href="http://www.marvinmarcelo.com/tag/google/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.marvinmarcelo.com</link>
	<description>Anything about programming, and a little about me.</description>
	<lastBuildDate>Wed, 11 Aug 2010 04:57:29 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>How to change Google custom search watermark</title>
		<link>http://www.marvinmarcelo.com/how-to-change-google-custom-search-watermark/</link>
		<comments>http://www.marvinmarcelo.com/how-to-change-google-custom-search-watermark/#comments</comments>
		<pubDate>Mon, 08 Dec 2008 15:27:19 +0000</pubDate>
		<dc:creator>Marvin</dc:creator>
				<category><![CDATA[work related]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://www.marvinmarcelo.com/?p=608</guid>
		<description><![CDATA[Google custom search has been around for some time now, but its only now that I look and use it. However, I wanted it to fit on the top search box on my current WP theme. The query box has this background, so I looked at the CSS of the entire page. But nothing defines [...]]]></description>
			<content:encoded><![CDATA[<p>Google custom search has been around for some time now, but its only now that I look and use it.</p>
<p>However, I wanted it to fit on the top search box on my current <abbr title="WordPress">WP</abbr> theme. The query box has this <a href="http://www.marvinmarcelo.com/wp-content/themes/firebug/images/sbox-copy.png">background</a>, so I looked at the CSS of the entire page. But nothing defines that google logo anywhere. Then, I found this code above embeded using javascript information on Web Developer toolbar. What I did is copy and modified the location of background image I want to use (<code>q.style.background = 'url(your_new_path_to/watermark.gif)';</code>) then, paste in the footer of my current theme. Barabimbaraboom! It executes last with a different background image location or new color background, that&#8217;s it.</p>
<p>But I reverted everything back to default! LOL, as I might violate Google T&amp;C. Or if I found time to read the entire Google&#8217;s T&amp;C on Custom Search, I will update this post, wether or not its ok to remove or change that watermark. <img src='http://www.marvinmarcelo.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
    <span style="color: #003366; font-weight: bold;">var</span> f <span style="color: #339933;">=</span> document.<span style="color: #660066;">getElementById</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'cse-search-box'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span>f<span style="color: #009900;">&#41;</span>
    <span style="color: #009900;">&#123;</span>
      f <span style="color: #339933;">=</span> document.<span style="color: #660066;">getElementById</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'searchbox_demo'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
    <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>f <span style="color: #339933;">&amp;&amp;</span> f.<span style="color: #660066;">q</span><span style="color: #009900;">&#41;</span>
    <span style="color: #009900;">&#123;</span>
      <span style="color: #003366; font-weight: bold;">var</span> q <span style="color: #339933;">=</span> f.<span style="color: #660066;">q</span><span style="color: #339933;">;</span>
      <span style="color: #003366; font-weight: bold;">var</span> n <span style="color: #339933;">=</span> navigator<span style="color: #339933;">;</span>
      <span style="color: #003366; font-weight: bold;">var</span> l <span style="color: #339933;">=</span> location<span style="color: #339933;">;</span>
      <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>n.<span style="color: #660066;">platform</span> <span style="color: #339933;">==</span> <span style="color: #3366CC;">'Win32'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        q.<span style="color: #660066;">style</span>.<span style="color: #660066;">cssText</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">'border: 1px solid #7e9db9; padding: 2px;'</span><span style="color: #339933;">;</span>
      <span style="color: #009900;">&#125;</span>
      <span style="color: #003366; font-weight: bold;">var</span> b <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
      <span style="color: #009900;">&#123;</span>
        <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>q.<span style="color: #660066;">value</span> <span style="color: #339933;">==</span> <span style="color: #3366CC;">''</span><span style="color: #009900;">&#41;</span>
        <span style="color: #009900;">&#123;</span>
          <span style="color: #006600; font-style: italic;">/*
            change the path to your intended background image or color.
           */</span>
          q.<span style="color: #660066;">style</span>.<span style="color: #660066;">background</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">'url(your_new_path_to/watermark.gif)'</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
      <span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
      <span style="color: #003366; font-weight: bold;">var</span> f <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #006600; font-style: italic;">/*
           This part is when query box is in focus
         */</span>
        q.<span style="color: #660066;">style</span>.<span style="color: #660066;">background</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">'#ffffff'</span><span style="color: #339933;">;</span>
      <span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
      q.<span style="color: #000066;">onfocus</span> <span style="color: #339933;">=</span> f<span style="color: #339933;">;</span>
      q.<span style="color: #000066;">onblur</span> <span style="color: #339933;">=</span> b<span style="color: #339933;">;</span>
      <span style="color: #009966; font-style: italic;">/* JS regex that calls blur function when query is not submitted */</span>
      <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!/</span><span style="color: #009900;">&#91;</span><span style="color: #339933;">&amp;?</span><span style="color: #009900;">&#93;</span>q<span style="color: #339933;">=</span><span style="color: #009900;">&#91;</span><span style="color: #339933;">^&amp;</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">/</span>.<span style="color: #660066;">test</span><span style="color: #009900;">&#40;</span>l.<span style="color: #660066;">search</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
      <span style="color: #009900;">&#123;</span>
        b<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
      <span style="color: #009900;">&#125;</span>
    <span style="color: #009900;">&#125;</span>
  <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.marvinmarcelo.com/how-to-change-google-custom-search-watermark/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Google math</title>
		<link>http://www.marvinmarcelo.com/google-math/</link>
		<comments>http://www.marvinmarcelo.com/google-math/#comments</comments>
		<pubDate>Thu, 16 Oct 2008 02:08:57 +0000</pubDate>
		<dc:creator>Marvin</dc:creator>
				<category><![CDATA[not about code]]></category>
		<category><![CDATA[work related]]></category>
		<category><![CDATA[conversion]]></category>
		<category><![CDATA[google]]></category>

		<guid isPermaLink="false">http://www.marvinmarcelo.com/?p=489</guid>
		<description><![CDATA[I&#8217;ve seen quite a few that types into Google search box the exact question instead of keywords. Well I also do that in desperate times LOL, but its better to know just the right keywords, the right terms to get the answer you&#8217;re looking for. This post is all about Google giving what the users [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve seen quite a few that types into Google search box the exact question instead of keywords. Well I also do that in desperate times LOL, but its better to know just the right keywords, the right terms to get the answer you&#8217;re looking for. This post is all about Google giving what the users want &#8211; &#8220;I want an answer to my question&#8221;. Here&#8217;s a few sample questions where you get the exact answers (its quite contained in known constants, but pretty handy).</p>
<p><img class="alignnone size-full wp-image-490" title="inch-to-centimeter" src="http://www.marvinmarcelo.com/wp-content/uploads/2008/10/inch-to-centimeter.jpg" alt="" width="500" height="320" /></p>
<p><img class="alignnone size-full wp-image-491" title="liter-to-gallon" src="http://www.marvinmarcelo.com/wp-content/uploads/2008/10/liter-to-gallon.jpg" alt="" width="500" height="320" /></p>
<p><img class="alignnone size-full wp-image-492" title="mph-to-kph" src="http://www.marvinmarcelo.com/wp-content/uploads/2008/10/mph-to-kph.jpg" alt="" width="500" height="320" /></p>
<p><img class="alignnone size-full wp-image-493" title="sqm-to-sqy" src="http://www.marvinmarcelo.com/wp-content/uploads/2008/10/sqm-to-sqy.jpg" alt="" width="500" height="320" /></p>
<p></p>
<p>They also have quick currency conversion, but notice the disclaimer link &#8211; it implies that data maybe inaccurate.</p>
<p><img class="alignnone size-full wp-image-494" title="usd-to-php" src="http://www.marvinmarcelo.com/wp-content/uploads/2008/10/usd-to-php.jpg" alt="" width="500" height="320" /></p>
<p>You can test and see for yourself the results, really handy at times. But still, you cannot compare this to a work well researched and backed up with proofs and explanations (i.e. why 1cc is equal to 1ml and show some calculations). Just reminded me of my Physics class <img src='http://www.marvinmarcelo.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.marvinmarcelo.com/google-math/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
