<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress.com" -->
<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>google-apis &amp;laquo; WordPress.com Tag Feed</title>
	<link>http://en.wordpress.com/tag/google-apis/</link>
	<description>Feed of posts on WordPress.com tagged "google-apis"</description>
	<pubDate>Tue, 08 Dec 2009 06:57:25 +0000</pubDate>

	<generator>http://en.wordpress.com/tags/</generator>
	<language>en</language>

<item>
<title><![CDATA[Enumeration class for string parameter]]></title>
<link>http://iron9light.wordpress.com/2009/09/04/enumeration-class-for-string-parameter/</link>
<pubDate>Fri, 04 Sep 2009 08:52:01 +0000</pubDate>
<dc:creator>iron9light</dc:creator>
<guid>http://iron9light.wordpress.com/2009/09/04/enumeration-class-for-string-parameter/</guid>
<description><![CDATA[When I write the Google API for .NET, there are a lot of string parameters, like imageColor and safe]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>When I write the <a href="http://code.google.com/p/google-api-for-dotnet/" target="_blank">Google API for .NET</a>, there are a lot of string parameters, like imageColor and safeLevel etc.</p>
<p>So I create an enum for every kind of parameter.</p>
<pre class="brush: csharp;">
public enum SafeLevel
{
    off,
    moderate = 0,
    active,
}
</pre>
<p>I even set the moderate of SafeLevel as default value. And I can use the ToString method to get the string value most of the time.</p>
<p>Not every string parameter are so readable. They use &#8220;r&#8221; for relevance and &#8220;d&#8221; for date for instance.</p>
<p>At this time, I use extension method + switch.</p>
<pre class="brush: csharp;">
public string GetString(this SortType value)
{
    switch (value)
    {
        case SortType.relevance:
            return &quot;r&quot;;
        case SortType.date:
            return &quot;d&quot;;
        default:
            return null;
    }
}
</pre>
<p>Or I use some helper class like LanguageUtility.</p>
<p>Everything is OK until Google add more choices of parameters.</p>
<p>Someone complained Google now can translate XXX language. Then I have to release a new version to follow the pace of Google!</p>
<p>The bad day has gone. Now I use string parameter directly. One can translate any language Google supported without complain and waiting.</p>
<p>But without enum and the helper class, API user need to check every parameter code from Google (like me).</p>
<p>For keeping life easy for all of you, I create the simple Enumeration class</p>
<pre class="brush: csharp;">
public enum SafeLevel
    /// &lt;summary&gt;
    /// The enumeration. For parameters of Google APIs.
    /// &lt;/summary&gt;
    public abstract class Enumeration
    {
        private readonly string name;

        private readonly string value;

        private readonly bool isDefault;

        /// &lt;summary&gt;
        /// Initializes a new instance of the &lt;see cref=&quot;Enumeration&quot;/&gt; class.
        /// &lt;/summary&gt;
        /// &lt;param name=&quot;value&quot;&gt;The value.&lt;/param&gt;
        protected Enumeration(string value)
            : this(value, value)
        {
        }

        /// &lt;summary&gt;
        /// Initializes a new instance of the &lt;see cref=&quot;Enumeration&quot;/&gt; class.
        /// &lt;/summary&gt;
        /// &lt;param name=&quot;name&quot;&gt;The name.&lt;/param&gt;
        /// &lt;param name=&quot;value&quot;&gt;The value.&lt;/param&gt;
        protected Enumeration(string name, string value)
            : this(name, value, false)
        {
        }

        /// &lt;summary&gt;
        /// Initializes a new instance of the &lt;see cref=&quot;Enumeration&quot;/&gt; class.
        /// &lt;/summary&gt;
        /// &lt;param name=&quot;name&quot;&gt;The name.&lt;/param&gt;
        /// &lt;param name=&quot;value&quot;&gt;The value.&lt;/param&gt;
        /// &lt;param name=&quot;isDefault&quot;&gt;if set to &lt;c&gt;true&lt;/c&gt; it is default value.&lt;/param&gt;
        protected Enumeration(string name, string value, bool isDefault)
        {
            this.name = name;
            this.isDefault = isDefault;
            this.value = value;
        }

        /// &lt;summary&gt;
        /// Gets a value indicating whether this instance is default.
        /// &lt;/summary&gt;
        /// &lt;value&gt;
        ///     &lt;c&gt;true&lt;/c&gt; if this instance is default; otherwise, &lt;c&gt;false&lt;/c&gt;.
        /// &lt;/value&gt;
        public bool IsDefault
        {
            get
            {
                return this.isDefault;
            }
        }

        /// &lt;summary&gt;
        /// Gets the value.
        /// &lt;/summary&gt;
        /// &lt;value&gt;The value.&lt;/value&gt;
        public string Value
        {
            get
            {
                return this.value;
            }
        }

        /// &lt;summary&gt;
        /// Gets the name.
        /// &lt;/summary&gt;
        /// &lt;value&gt;The name.&lt;/value&gt;
        public string Name
        {
            get
            {
                return this.name;
            }
        }

        /// &lt;summary&gt;
        /// Performs an implicit conversion from &lt;see cref=&quot;Google.API.Enumeration&quot;/&gt; to &lt;see cref=&quot;System.String&quot;/&gt;.
        /// &lt;/summary&gt;
        /// &lt;param name=&quot;enumeration&quot;&gt;The enumeration.&lt;/param&gt;
        /// &lt;returns&gt;The result of the conversion.&lt;/returns&gt;
        public static implicit operator string(Enumeration enumeration)
        {
            if (enumeration.IsDefault)
            {
                return null;
            }

            return enumeration.Value;
        }

        /// &lt;summary&gt;
        /// Returns a &lt;see cref=&quot;System.String&quot;/&gt; that represents this instance.
        /// &lt;/summary&gt;
        /// &lt;returns&gt;
        /// A &lt;see cref=&quot;System.String&quot;/&gt; that represents this instance.
        /// &lt;/returns&gt;
        public override string ToString()
        {
            return this.Name;
        }

        /// &lt;summary&gt;
        /// Determines whether the specified &lt;see cref=&quot;System.Object&quot;/&gt; is equal to this instance.
        /// &lt;/summary&gt;
        /// &lt;param name=&quot;obj&quot;&gt;The &lt;see cref=&quot;System.Object&quot;/&gt; to compare with this instance.&lt;/param&gt;
        /// &lt;returns&gt;
        ///     &lt;c&gt;true&lt;/c&gt; if the specified &lt;see cref=&quot;System.Object&quot;/&gt; is equal to this instance; otherwise, &lt;c&gt;false&lt;/c&gt;.
        /// &lt;/returns&gt;
        /// &lt;exception cref=&quot;T:System.NullReferenceException&quot;&gt;
        /// The &lt;paramref name=&quot;obj&quot;/&gt; parameter is null.
        /// &lt;/exception&gt;
        public override bool Equals(object obj)
        {
            if (ReferenceEquals(this, obj))
            {
                return true;
            }

            if (obj == null)
            {
                return false;
            }

            if (!this.GetType().IsInstanceOfType(obj))
            {
                return false;
            }

            return this.Value == ((Enumeration)obj).Value;
        }

        /// &lt;summary&gt;
        /// Returns a hash code for this instance.
        /// &lt;/summary&gt;
        /// &lt;returns&gt;
        /// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.
        /// &lt;/returns&gt;
        public override int GetHashCode()
        {
            Debug.Assert(this.Value != null, &quot;Value cannot be null.&quot;);

            return this.Value.GetHashCode();
        }
    }
}
</pre>
<p>It has three readonly properties: Name, Value and IsDefault.</p>
<p>It can also convert to string implicitly. Then you can use it as string. Or you can make it looks like the type of parameter is Enumeration but not string.</p>
<pre class="brush: csharp;">
TranslateClient client = new TranslateClient();
string translated = client.Translate(text, Language.ChineseSimplified, Language.English);
</pre>
<p>It looks the same of the old enum parameter version. But the Language is not a enum but a subclass of Enumeration and the English is a public static readonly field.</p>
<pre class="brush: csharp;">
public static readonly Language English = new Language(&quot;English&quot;, &quot;en&quot;);
</pre>
<p>Here I want add two more static method and a implicit convert method.</p>
<pre class="brush: csharp;">
public static Language GetDefault();

public static ICollection&lt;Language&gt; GetEnums();

public static implicit operator Language(string value)
</pre>
<p>It&#8217;s not hard using reflection. But I need repeat them in every subclasses of Enumeration.</p>
<p>Although code template tool can help me a lot, but I do not think it&#8217;s a good I idea. Don&#8217;t repeat yourself!</p>
<p>So I create a generic Enumeration class:</p>
<pre class="brush: csharp;">
public abstract class Enumeration&lt;T&gt; : Enumeration, IEquatable&lt;T&gt; where T : Enumeration&lt;T&gt;
</pre>
<p>This class has a very interesting constrain. We can only create a subclass like this:</p>
<pre class="brush: csharp;">
public sealed class SortType : Enumeration&lt;SortType&gt;
</pre>
<p>The subclass must pass itself as the generic parameter. (Tell me if I&#8217;m wrong.) In other words, the T in Enumeration is must be the type of subclass.</p>
<p>Here I marked SortType as sealed, because the Enumeration can only know it subclass but not sub-subclass.</p>
<p>Here is the whole code of Enumeration:</p>
<pre class="brush: csharp;">
    /// &lt;summary&gt;
    /// The enumeration. Provide more static methods and properties for every concrete enumeration.
    /// &lt;/summary&gt;
    /// &lt;typeparam name=&quot;T&quot;&gt;The type of concrete enumeration.&lt;/typeparam&gt;
    public abstract class Enumeration&lt;T&gt; : Enumeration, IEquatable&lt;T&gt;
        where T : Enumeration&lt;T&gt;
    {
        private static T @default;

        private static IDictionary&lt;string, T&gt; dictionary;

        /// &lt;summary&gt;
        /// Initializes a new instance of the &lt;see cref=&quot;Enumeration&amp;#60;T&amp;#62;&quot;/&gt; class.
        /// &lt;/summary&gt;
        /// &lt;param name=&quot;value&quot;&gt;The value.&lt;/param&gt;
        protected Enumeration(string value)
            : base(value)
        {
        }

        /// &lt;summary&gt;
        /// Initializes a new instance of the &lt;see cref=&quot;Enumeration&amp;#60;T&amp;#62;&quot;/&gt; class.
        /// &lt;/summary&gt;
        /// &lt;param name=&quot;name&quot;&gt;The name.&lt;/param&gt;
        /// &lt;param name=&quot;value&quot;&gt;The value.&lt;/param&gt;
        protected Enumeration(string name, string value)
            : base(name, value)
        {
        }

        /// &lt;summary&gt;
        /// Initializes a new instance of the &lt;see cref=&quot;Enumeration&amp;#60;T&amp;#62;&quot;/&gt; class.
        /// &lt;/summary&gt;
        /// &lt;param name=&quot;name&quot;&gt;The name.&lt;/param&gt;
        /// &lt;param name=&quot;value&quot;&gt;The value.&lt;/param&gt;
        /// &lt;param name=&quot;isDefault&quot;&gt;if set to &lt;c&gt;true&lt;/c&gt; it is default value.&lt;/param&gt;
        protected Enumeration(string name, string value, bool isDefault)
            : base(name, value, isDefault)
        {
        }

        /// &lt;summary&gt;
        /// Gets the dictionary of value and enumeration.
        /// &lt;/summary&gt;
        /// &lt;value&gt;The dictionary.&lt;/value&gt;
        protected static IDictionary&lt;string, T&gt; Dictionary
        {
            get
            {
                Initialize();
                return dictionary;
            }
        }

        /// &lt;summary&gt;
        /// Gets the default enumeration.
        /// &lt;/summary&gt;
        /// &lt;returns&gt;The default enumeration&lt;/returns&gt;
        public static T GetDefault()
        {
            Initialize();
            return @default;
        }

        /// &lt;summary&gt;
        /// Gets all enumerations.
        /// &lt;/summary&gt;
        /// &lt;returns&gt;All enumerations&lt;/returns&gt;
        public static ICollection&lt;T&gt; GetEnums()
        {
            return Dictionary.Values;
        }

        /// &lt;summary&gt;
        /// Indicates whether the current object is equal to another object of the same type.
        /// &lt;/summary&gt;
        /// &lt;param name=&quot;other&quot;&gt;An object to compare with this object.&lt;/param&gt;
        /// &lt;returns&gt;
        /// true if the current object is equal to the &lt;paramref name=&quot;other&quot;/&gt; parameter; otherwise, false.
        /// &lt;/returns&gt;
        public bool Equals(T other)
        {
            if (other == null)
            {
                return false;
            }

            return this.Value == other.Value;
        }

        /// &lt;summary&gt;
        /// Initializes this instance.
        /// &lt;/summary&gt;
        protected static void Initialize()
        {
            if (dictionary == null)
            {
                dictionary = new Dictionary&lt;string, T&gt;();

                var type = typeof(T);

                ////var enums =
                ////    from propertyInfo in
                ////        type.GetProperties(
                ////        BindingFlags.Static &amp;#124; BindingFlags.Public &amp;#124; BindingFlags.DeclaredOnly &amp;#124; BindingFlags.GetProperty)
                ////    where
                ////        propertyInfo.PropertyType.IsAssignableFrom(typeof(T)) &amp;&amp;
                ////        propertyInfo.GetIndexParameters().Length == 0
                ////    select propertyInfo.GetValue(null, null) as T;

                var enums =
                    from fieldInfo in
                        type.GetFields(
                        BindingFlags.Static &amp;#124; BindingFlags.Public &amp;#124; BindingFlags.DeclaredOnly &amp;#124; BindingFlags.GetField)
                    where fieldInfo.FieldType.IsAssignableFrom(type)
                    select fieldInfo.GetValue(null) as T;

                foreach (var @enum in enums)
                {
                    Debug.Assert(@enum != null, &quot;enum cannot be null.&quot;);

                    dictionary[@enum.Value] = @enum;

                    if (@default == null &amp;&amp; @enum.IsDefault)
                    {
                        @default = @enum;
                    }
                }
            }
        }

        /// &lt;summary&gt;
        /// Converts the specified value to this enumeration.
        /// &lt;/summary&gt;
        /// &lt;param name=&quot;value&quot;&gt;The value.&lt;/param&gt;
        /// &lt;param name=&quot;construct&quot;&gt;The constructor function.&lt;/param&gt;
        /// &lt;returns&gt;The enumeration.&lt;/returns&gt;
        protected static T Convert(string value, Func&lt;string, T&gt; construct)
        {
            if (value == null)
            {
                return GetDefault();
            }

            T @enum;

            if (!Dictionary.TryGetValue(value, out @enum))
            {
                @enum = construct(value);
            }

            return @enum;
        }
    }
</pre>
<p>Here I use the lazy load trick but not initialize in the static constructor, because the static constructor will run before than the static fields in subclass have been assigned.</p>
<p>And the implement convert operation can only defined in the subclass. So I put most of the logic into the Convert method.</p>
<p>Here is what a subclass looks like:</p>
<pre class="brush: csharp;">
    /// &lt;summary&gt;
    /// The search safety level.
    /// &lt;/summary&gt;
    public sealed class SafeLevel : Enumeration&lt;SafeLevel&gt;
    {
        /// &lt;summary&gt;
        /// Disables safe search filtering.
        /// &lt;/summary&gt;
        public static readonly SafeLevel Off = new SafeLevel(&quot;Off&quot;, &quot;off&quot;);

        /// &lt;summary&gt;
        /// Enables moderate safe search filtering. Default value.
        /// &lt;/summary&gt;
        public static readonly SafeLevel Moderate = new SafeLevel(&quot;Moderate&quot;, &quot;moderate&quot;, true);

        /// &lt;summary&gt;
        /// Enables the highest level of safe search filtering.
        /// &lt;/summary&gt;
        public static readonly SafeLevel Active = new SafeLevel(&quot;Active&quot;, &quot;active&quot;);

        private SafeLevel(string value)
            : base(value)
        {
        }

        private SafeLevel(string name, string value)
            : base(name, value)
        {
        }

        private SafeLevel(string name, string value, bool isDefault)
            : base(name, value, isDefault)
        {
        }

        /// &lt;summary&gt;
        /// Performs an implicit conversion from &lt;see cref=&quot;System.String&quot;/&gt; to &lt;see cref=&quot;SafeLevel&quot;/&gt;.
        /// &lt;/summary&gt;
        /// &lt;param name=&quot;value&quot;&gt;The value.&lt;/param&gt;
        /// &lt;returns&gt;The result of the conversion.&lt;/returns&gt;
        public static implicit operator SafeLevel(string value)
        {
            return Convert(value, s =&gt; new SafeLevel(s));
        }
    }
</pre>
<p>Although the solution has some smell, like visit static method in superclass and <a href="http://blogs.msdn.com/brada/archive/2004/09/09/227332.aspx">static protected method</a>.</p>
<p>I hope it can solve my problem well.</p>
<p>Thanks for reading.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Retrieve driving directions from google maps with server-side HTTP calls and show results with static maps for WAP]]></title>
<link>http://mufumbo.wordpress.com/2009/07/23/server-side-driving-direction-with-google-maps-api-with-php-for-wap-and-web/</link>
<pubDate>Thu, 23 Jul 2009 08:32:34 +0000</pubDate>
<dc:creator>mufumbo</dc:creator>
<guid>http://mufumbo.wordpress.com/2009/07/23/server-side-driving-direction-with-google-maps-api-with-php-for-wap-and-web/</guid>
<description><![CDATA[Mobile phones are not famous for supporting javascript. A problem arises when you need to use google]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Mobile phones are not famous for supporting javascript. A problem arises when you need to use google API to retrieve the driver directions for a mobile site, or when you just don&#8217;t want your site to be overloaded with the complete maps toolkit to show a simple map.</p>
<p>Google provides a good <a href="http://gmaps-samples.googlecode.com/svn/trunk/gdirections/directions-static.html">directions-static demo</a> but, unfortunately, it&#8217;s javascript-only. They don&#8217;t have any example or documentation about how to generate the directions through server side HTTP call.</p>
<p>The driving direction API doesn&#8217;t seem to be 100%. I wasn&#8217;t able to find examples of how to use the directions API with google maps API-V3 javascript, it seems that <em>it&#8217;s not ready yet</em>. I&#8217;ve founded <a href="http://code.google.com/p/gmaps-api-issues/issues/detail?id=235">this issue tracking</a> in <a style="text-decoration:none;color:#000000;" href="http://code.google.com/p/gmaps-api-issues/">gmaps-api-issues</a> (by the way, the most voted issue) that <em>says that there isn&#8217;t support for google maps directions through server side http calls</em>.</p>
<p><em>Putting all together</em>: I have decided to check what HTTP calls the directions API of google maps API-V2 does and to use it in the server side. I don&#8217;t know if it&#8217;s forbidden in the terms of service, <strong>but</strong> <strong>it works</strong>!</p>
<p>Basically, my PHP server-side is doing the exact same thing that the google <a href="http://gmaps-samples.googlecode.com/svn/trunk/gdirections/directions-static.html">directions-static demo</a> is doing in javascript (checkout the source code of the page). It retrieves the answer from the server and write the coordinates information in the  static maps URL.</p>
<p>Note that HttpHelper::doGET downloads the string, you can substitute that part with CURL or fopen. Here is the code to make the HTTP calls to get the driving directions and to create the static map image link:</p>
<pre>class GoogleGeo {
    public static function buildStaticMap($center, $markers=array(), $width=400, $height=400, $zoom=12, $directions=null) {
        $strMarkers = "";
        foreach($markers as $marker) {
            if (!empty($strMarkers)) $strMarkers .= '&#124;';
            $strMarkers .= urlencode($marker);
        }
        if ($width &#62; 640) $width = 640;
        if (!empty($center)) {
            $center = "&#38;center=".$center;
        }
        if (!empty($strMarkers)) {
            $strMarkers = "&#38;markers=".$strMarkers;
        }
        if ($zoom &#62; 0) {
            $zoom = "&#38;zoom=$zoom";
        }

        $steps = "";
        if (!empty($directions)) {
            foreach($directions['Directions']['Routes'][0]['Steps'] as $step) {
                $lat = $step['Point']['coordinates'][1];
                $lon = $step['Point']['coordinates'][0];
                if (!empty($steps)) $steps .= "&#124;";
                $steps .= $lat.",".$lon;
            }
            if (!empty($steps)) {
                $steps .= "&#124;".$directions['Directions']['Routes'][0]['End']['coordinates'][1].",".$directions['Directions']['Routes'][0]['End']['coordinates'][0];
                $steps = "&#38;path=rgb:0x0000ff,weight:5&#124;".$steps;
            }
        }

        $staticMap = "http://maps.google.com/staticmap?maptype=mobile&#38;size=".$width."x$height&#38;maptype=roadmap&#38;key=".GOOGLE_MAPS_KEY."&#38;sensor=false$strMarkers$center$zoom$steps";
        return $staticMap;
    }

    public static function retrieveDirections ($from, $to) {
        $params = array('key' =&#62; GOOGLE_MAPS_KEY, 'output' =&#62; 'json', 'q' =&#62; "from: $from to: $to");
        $url = "http://maps.google.com/maps/nav";
        $result = HttpHelper::doGET($url, $params);
        $result = json_decode($result, true);
        return $result;
    }
}</pre>
<p>A <strong>example</strong> how to use this code is:</p>
<pre>...
    /* FROM and TO coordinates */
    $markers = array("37.262568,-121.962232,redr", "37.229898,-121.971853,blueg");
    /* Get the driving directions from google api */
    $directions = GoogleGeo::retrieveDirections("485 Alberto Way, Suite 210. Los Gatos, CA 95032", "14109 Winchester Bl, Los Gatos, CA");
    /* Create the map image url with the directions coordinates */
    $staticMap = GoogleGeo::buildStaticMap(null, $markers, 640, 240, null, $directions);
....</pre>
<p>In this way you will have <strong>$staticMap</strong> with a value similar to the image urls in the <a href="http://gmaps-samples.googlecode.com/svn/trunk/gdirections/directions-static.html">directions-static demo</a>. In this case it will be:</p>
<p>http://maps.google.com/staticmap?maptype=mobile&#38;size=640&#215;240&#38;maptype=roadmap&#38;key=YOUR_GOOGLE_KEY&#38;sensor=false&#38;markers=37.262568%2C-121.962232%2Credr&#124;37.229898%2C-121.971853%2Cblueg&#38;path=rgb:0&#215;0000ff,weight:5&#124;37.22898,-121.97104&#124;37.22818,-121.97112&#124;37.22597,-121.97231&#124;37.22892,-121.98063&#124;37.23713,-121.97714&#124;37.26301,-121.96088&#124;37.262282,-121.961628</p>
<p>The variable <strong>$directions</strong> will contain a array with the complete direction steps, so you can easily loop through it and print it out on your WAP application. For example:</p>
<pre>Array
(
    [name] =&#62; from: 485 Alberto way, Los Gatos, CA to: 14109 Winchester Bl, Los Gatos, CA
    [Status] =&#62; Array
        (
             =&#62; 200
            [request] =&#62; directions
        )

    [Placemark] =&#62; Array
        (
            [0] =&#62; Array
                (
                    [id] =&#62;
                    [address] =&#62; 485 Alberto Way, Los Gatos, CA 95032
                    [AddressDetails] =&#62; Array
                        (
                            [Country] =&#62; Array
                                (
                                    [CountryNameCode] =&#62; US
                                    [AdministrativeArea] =&#62; Array
                                        (
                                            [AdministrativeAreaName] =&#62; CA
                                            [Locality] =&#62; Array
                                                (
                                                    [LocalityName] =&#62; Los Gatos
                                                    [Thoroughfare] =&#62; Array
                                                        (
                                                            [ThoroughfareName] =&#62; 485 Alberto Way
                                                        )

                                                    [PostalCode] =&#62; Array
                                                        (
                                                            [PostalCodeNumber] =&#62; 95032
                                                        )

                                                )

                                        )

                                )

                            [Accuracy] =&#62; 8
                        )

                    [Point] =&#62; Array
                        (
                            [coordinates] =&#62; Array
                                (
                                    [0] =&#62; -121.971853
                                    [1] =&#62; 37.229898
                                    [2] =&#62; 0
                                )

                        )

                )

            [1] =&#62; Array
                (
                    [id] =&#62;
                    [address] =&#62; 14109 Winchester Blvd, Los Gatos, CA 95032
                    [AddressDetails] =&#62; Array
                        (
                            [Country] =&#62; Array
                                (
                                    [CountryNameCode] =&#62; US
                                    [AdministrativeArea] =&#62; Array
                                        (
                                            [AdministrativeAreaName] =&#62; CA
                                            [Locality] =&#62; Array
                                                (
                                                    [LocalityName] =&#62; Los Gatos
                                                    [Thoroughfare] =&#62; Array
                                                        (
                                                            [ThoroughfareName] =&#62; 14109 Winchester Blvd
                                                        )

                                                    [PostalCode] =&#62; Array
                                                        (
                                                            [PostalCodeNumber] =&#62; 95032
                                                        )

                                                )

                                        )

                                )

                            [Accuracy] =&#62; 8
                        )

                    [Point] =&#62; Array
                        (
                            [coordinates] =&#62; Array
                                (
                                    [0] =&#62; -121.962232
                                    [1] =&#62; 37.262568
                                    [2] =&#62; 0
                                )

                        )

                )

        )

    [Directions] =&#62; Array
        (
            [copyrightsHtml] =&#62; Map data ©2009 Tele Atlas
            [summaryHtml] =&#62; 3.5 mi (about 9 mins)
            [Distance] =&#62; Array
                (
                    [meters] =&#62; 5608
                    [html] =&#62; 3.5 mi
                )

            [Duration] =&#62; Array
                (
                    [seconds] =&#62; 592
                    [html] =&#62; 9 mins
                )

            [Routes] =&#62; Array
                (
                    [0] =&#62; Array
                        (
                            [Distance] =&#62; Array
                                (
                                    [meters] =&#62; 5608
                                    [html] =&#62; 3.5 mi
                                )

                            [Duration] =&#62; Array
                                (
                                    [seconds] =&#62; 592
                                    [html] =&#62; 9 mins
                                )

                            [summaryHtml] =&#62; 3.5 mi (about 9 mins)
                            [Steps] =&#62; Array
                                (
                                    [0] =&#62; Array
                                        (
                                            [descriptionHtml] =&#62; Head <strong>south</strong> on <strong>Alberto Way</strong> toward <strong>Cuesta de Los Gatos Way</strong>
                                            [Distance] =&#62; Array
                                                (
                                                    [meters] =&#62; 95
                                                    [html] =&#62; 312 ft
                                                )

                                            [Duration] =&#62; Array
                                                (
                                                    [seconds] =&#62; 9
                                                    [html] =&#62; 9 secs
                                                )

                                            [Point] =&#62; Array
                                                (
                                                    [coordinates] =&#62; Array
                                                        (
                                                            [0] =&#62; -121.97104
                                                            [1] =&#62; 37.22898
                                                            [2] =&#62; 0
                                                        )

                                                )

                                        )

                                    [1] =&#62; Array
                                        (
                                            [descriptionHtml] =&#62; Turn <strong>right</strong> to stay on <strong>Alberto Way</strong>

                                            [Distance] =&#62; Array
                                                (
                                                    [meters] =&#62; 332
                                                    [html] =&#62; 0.2 mi
                                                )

                                            [Duration] =&#62; Array
                                                (
                                                    [seconds] =&#62; 35
                                                    [html] =&#62; 35 secs
                                                )

                                            [Point] =&#62; Array
                                                (
                                                    [coordinates] =&#62; Array
                                                        (
                                                            [0] =&#62; -121.97112
                                                            [1] =&#62; 37.22818
                                                            [2] =&#62; 0
                                                        )

                                                )

                                        )

                                    [2] =&#62; Array
                                        (
                                            [descriptionHtml] =&#62; Turn <strong>right</strong> at <strong>Los Gatos Saratoga Rd</strong>
                                            [Distance] =&#62; Array
                                                (
                                                    [meters] =&#62; 814
                                                    [html] =&#62; 0.5 mi
                                                )

                                            [Duration] =&#62; Array
                                                (
                                                    [seconds] =&#62; 83
                                                    [html] =&#62; 1 min
                                                )

                                            [Point] =&#62; Array
                                                (
                                                    [coordinates] =&#62; Array
                                                        (
                                                            [0] =&#62; -121.97231
                                                            [1] =&#62; 37.22597
                                                            [2] =&#62; 0
                                                        )

                                                )

                                        )

                                    [3] =&#62; Array
                                        (
                                            [descriptionHtml] =&#62; Turn <strong>right</strong> at <strong>N Santa Cruz Ave</strong>

                                            [Distance] =&#62; Array
                                                (
                                                    [meters] =&#62; 978
                                                    [html] =&#62; 0.6 mi
                                                )

                                            [Duration] =&#62; Array
                                                (
                                                    [seconds] =&#62; 101
                                                    [html] =&#62; 1 min
                                                )

                                            [Point] =&#62; Array
                                                (
                                                    [coordinates] =&#62; Array
                                                        (
                                                            [0] =&#62; -121.98063
                                                            [1] =&#62; 37.22892
                                                            [2] =&#62; 0
                                                        )

                                                )

                                        )

                                    [4] =&#62; Array
                                        (
                                            [descriptionHtml] =&#62; Continue on <strong>Winchester Blvd</strong>
                                            [Distance] =&#62; Array
                                                (
                                                    [meters] =&#62; 3273
                                                    [html] =&#62; 2.0 mi
                                                )

                                            [Duration] =&#62; Array
                                                (
                                                    [seconds] =&#62; 311
                                                    [html] =&#62; 5 mins
                                                )

                                            [Point] =&#62; Array
                                                (
                                                    [coordinates] =&#62; Array
                                                        (
                                                            [0] =&#62; -121.97714
                                                            [1] =&#62; 37.23713
                                                            [2] =&#62; 0
                                                        )

                                                )

                                        )

                                    [5] =&#62; Array
                                        (
                                            [descriptionHtml] =&#62; Make a <strong>U-turn</strong> at <strong>Division St</strong>
                                            [Distance] =&#62; Array
                                                (
                                                    [meters] =&#62; 116
                                                    [html] =&#62; 381 ft
                                                )

                                            [Duration] =&#62; Array
                                                (
                                                    [seconds] =&#62; 53
                                                    [html] =&#62; 53 secs
                                                )

                                            [Point] =&#62; Array
                                                (
                                                    [coordinates] =&#62; Array
                                                        (
                                                            [0] =&#62; -121.96088
                                                            [1] =&#62; 37.26301
                                                            [2] =&#62; 0
                                                        )

                                                )

                                        )

                                )

                            [End] =&#62; Array
                                (
                                    [coordinates] =&#62; Array
                                        (
                                            [0] =&#62; -121.961628
                                            [1] =&#62; 37.262282
                                            [2] =&#62; 0
                                        )
                                )
                        )
                )
        )
)</pre>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Embed Google Search in Your Custom Applications]]></title>
<link>http://vinayhatwal.wordpress.com/2009/07/03/embed-google-search-in-your-custom-applications/</link>
<pubDate>Fri, 03 Jul 2009 05:36:05 +0000</pubDate>
<dc:creator>vinayhatwal</dc:creator>
<guid>http://vinayhatwal.wordpress.com/2009/07/03/embed-google-search-in-your-custom-applications/</guid>
<description><![CDATA[Embed Google Search in Your Custom Applications Written by – Vinay Hatwal Dt. 03-Jul-2009   Dear all]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p align="center"><strong>Embed Google Search in Your Custom Applications</strong></p>
<p align="center">Written by – Vinay Hatwal</p>
<p align="center">Dt. 03-Jul-2009</p>
<p align="center"> </p>
<p>Dear all,</p>
<p>This time I came with the topic “Embed Google Search in Your Custom Applications”. With this we can embed Google search in our application. First of all I will discuss the tools which you need to install on your PC to use the Google Search</p>
<p> </p>
<ul>
<li>.Net Framework 3.5</li>
<li>Google Search API for .NET 0.2  (<a href="http://google-api-for-dotnet.googlecode.com/files/GoogleSearchAPI_0.2.zip">GoogleSearchAPI_0.2.zip</a>)</li>
<li>GoogleSearchAPI_0.2.zip</li>
<li>GoogleSearchAPI.dll</li>
</ul>
<p> </p>
<p> </p>
<p><strong><span style="text-decoration:underline;">Steps to do</span></strong></p>
<p> </p>
<p><strong>1)      Create a new project with vb.Net 2.0 or 3.5.(Windows Application)</strong></p>
<p><strong>2)      Add Reference of GoogleSearchAPI.dll</strong></p>
<p><strong>3)      Add following controls</strong></p>
<ol>
<li>RichTextBox  &#8211; RichTextBox1</li>
<li>Label- Label1</li>
<li>TextBox- TextBox1         </li>
<li>Button- Button1</li>
</ol>
<p><strong>4)      Your Interface will look like</strong></p>
<p><img class="aligncenter size-full wp-image-154" title="inter1" src="http://vinayhatwal.wordpress.com/files/2009/07/inter1.jpg" alt="inter1" width="490" height="261" /></p>
<p> </p>
<p><strong>5)      Add the following coding in your Form1.cs file</strong></p>
<p> </p>
<p> </p>
<p> </p>
<p>Public Class Form1</p>
<p>    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click</p>
<p>        &#8216;Declaring Generic IList for IWebResult Interface</p>
<p>        &#8216;You can use -</p>
<p>        &#8216;1) IWebResult</p>
<p>        &#8216;2) IVideoResult</p>
<p>        &#8216;3) INewsResult</p>
<p>        &#8216;4) INewsResult</p>
<p>        &#8216;5) IImageResult</p>
<p>        &#8216; AND MORE</p>
<p>        Dim results As IList(Of Google.API.Search.IWebResult)</p>
<p> </p>
<p>        &#8216;Taking result</p>
<p>        &#8216;calling of Google.API.Search.GwebSearcher.Search(search text, Number of search result would be returned at a time)</p>
<p>        results = Google.API.Search.GwebSearcher.Search(TextBox1.Text, 10)</p>
<p>        Dim str As String = &#8220;&#8221;</p>
<p>        RichTextBox1.Text = &#8220;&#8221;</p>
<p>        For Each r As Google.API.Search.IWebResult In results</p>
<p>            &#8216;Fetching Title</p>
<p>            str = str &#38; &#8220;Title :&#8221; &#38; r.Title &#38; vbCrLf</p>
<p>            &#8216;Fetching URL</p>
<p>            str = str &#38; &#8220;URL :&#8221; &#38; r.Url &#38; vbCrLf</p>
<p>            &#8216;Fetching VisibleUrl</p>
<p>            str = str &#38; &#8220;VisibleUrl :&#8221; &#38; r.VisibleUrl &#38; vbCrLf</p>
<p>            &#8216;Fetching Content</p>
<p>            str = str &#38; &#8220;Content :&#8221; &#38; r.Content &#38; vbCrLf</p>
<p>            str = str &#38; &#8220;=========================================================================================&#8221; &#38; vbCrLf</p>
<p>        Next</p>
<p>        RichTextBox1.Text = str</p>
<p>    End Sub</p>
<p>End Class</p>
<p> </p>
<p> </p>
<p><strong>6)      Now Enter the text to search on text box and click on Go. The result will look like –</strong></p>
<p><img class="aligncenter size-full wp-image-155" title="Search Result" src="http://vinayhatwal.wordpress.com/files/2009/07/inter2.jpg" alt="Search Result" width="854" height="438" /></p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Google SpreadSheet、お世話になりました。]]></title>
<link>http://miwazatechs.wordpress.com/2009/04/01/google-spreadsheet%e3%80%81%e3%81%8a%e4%b8%96%e8%a9%b1%e3%81%ab%e3%81%aa%e3%82%8a%e3%81%be%e3%81%97%e3%81%9f%e3%80%82/</link>
<pubDate>Wed, 01 Apr 2009 02:05:10 +0000</pubDate>
<dc:creator>miwaza</dc:creator>
<guid>http://miwazatechs.wordpress.com/2009/04/01/google-spreadsheet%e3%80%81%e3%81%8a%e4%b8%96%e8%a9%b1%e3%81%ab%e3%81%aa%e3%82%8a%e3%81%be%e3%81%97%e3%81%9f%e3%80%82/</guid>
<description><![CDATA[最近4ヶ月ほどやっていたビッグプロジェクトでGoogle SpreadSheetとFormには、受注管理、決算、お問い合わせフォームとかのために、とにかくお世話になりまくっていたのもあって、Googl]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>最近4ヶ月ほどやっていたビッグプロジェクトでGoogle SpreadSheetとFormには、受注管理、決算、お問い合わせフォームとかのために、とにかくお世話になりまくっていたのもあって、Google SpreadSheet APIに興味がある（受注管理スプレッドシートと納品書出力のためのスプレッドシートを連動させたかったな－…）。</p>
<p>Google Formは知っている限りは自分でスタイルシートとかテンプレートを作る、ということができないので、APIを使って自分のFormを作れば、スタイルシートでもなんでも書けるのかなー、という事もあるしね。どうなのかな？調べてみようか。取り組んでみようか。</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Gtalk Bot]]></title>
<link>http://himanshugarg.wordpress.com/2009/01/23/gtalk-bot/</link>
<pubDate>Fri, 23 Jan 2009 17:15:20 +0000</pubDate>
<dc:creator>coolgarg</dc:creator>
<guid>http://himanshugarg.wordpress.com/2009/01/23/gtalk-bot/</guid>
<description><![CDATA[You can create a gtalk bot, add it to anyone gtalk id, then he can take services from his chat box b]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>You can create a gtalk bot, add it to anyone gtalk id, then he can take services from his chat box by simply cahting with the bot.<strong><br />
</strong></p>
<p><strong>apis</strong></p>
<p>in java :</p>
<p>smack.jar<br />
<a href="http://www.igniterealtime.org/projects/smack/" target="_blank">http://www.igniterealtime.org/projects/smack/</a></p>
<p>in C/C++</p>
<p>libjingle</p>
<p>http://code.google.com/apis/talk/index.html</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[RSS, Really Simple Syndication]]></title>
<link>http://himanshugarg.wordpress.com/2009/01/22/rss-really-simple-syndication/</link>
<pubDate>Thu, 22 Jan 2009 09:53:00 +0000</pubDate>
<dc:creator>coolgarg</dc:creator>
<guid>http://himanshugarg.wordpress.com/2009/01/22/rss-really-simple-syndication/</guid>
<description><![CDATA[For Monitoring Site that do not publish RSS Feed, http://page2rss.com/ FeedBurner]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>For Monitoring Site that do not publish RSS Feed,</p>
<p>http://page2rss.com/</p>
<p>FeedBurner</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Google talk transliteration ]]></title>
<link>http://himanshugarg.wordpress.com/2009/01/21/google-talk-transliteration/</link>
<pubDate>Wed, 21 Jan 2009 17:31:51 +0000</pubDate>
<dc:creator>coolgarg</dc:creator>
<guid>http://himanshugarg.wordpress.com/2009/01/21/google-talk-transliteration/</guid>
<description><![CDATA[Add en2hi.translit@bot.talk.google.com to  your friend list in google talk. Now invite your friend f]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Add en2hi.translit@bot.talk.google.com to  your friend list in google talk. Now invite your friend for chat, add this id to group chat, and see the magic.</p>
<p>for other languages</p>
<p>Kannada (en2kn.translit), Malayalam (en2ml.translit), Tamil (en2ta.translit) and Telugu (en2te.translit).</p>
<p>wow.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Google Search API for .NET 0.2 beta and Google Translate API for .NET 0.2 beta released]]></title>
<link>http://iron9light.wordpress.com/2008/10/08/google-search-api-for-net-02-beta-and-google-translate-api-for-net-02-beta-released/</link>
<pubDate>Wed, 08 Oct 2008 10:23:10 +0000</pubDate>
<dc:creator>iron9light</dc:creator>
<guid>http://iron9light.wordpress.com/2008/10/08/google-search-api-for-net-02-beta-and-google-translate-api-for-net-02-beta-released/</guid>
<description><![CDATA[Update4 No more default http referrer. User must set it as a parameter of constructor. Delete old Tr]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p><strong>Update4</strong></p>
<p>No more default http referrer. User must set it as a parameter of constructor.</p>
<p>Delete old Translator and Searcher classes.</p>
<p>Updated comments for better document.</p>
<p><strong>Update3</strong></p>
<p>Change all API Using string parameter instead of enum parameter.</p>
<p>Add new Enumeration class and enumerations for API parameters.</p>
<p><span style="color:#ff0000;"><strong>The API changed a lot this time. Please let me know whether you like these changes or not.</strong></span></p>
<p><strong>Update2</strong></p>
<p>All codes are refacted (StyleCop format).</p>
<p>Update the APIs to support latest Google APIs.</p>
<p>Now can customize referrer, accept language, API key and timeout times.</p>
<p><strong>Update1</strong></p>
<p>Update the supported language list for Google translate api.</p>
<p>Set &#8220;http://code.google.com/p/google-api-for-dotnet/&#8221; as the default http referrer. (Now you cannot set your own http referrer)</p>
<p>No more v0.2, new features will come with v0.3.</p>
<p><a href="http://code.google.com/p/google-api-for-dotnet/">Google APIs for .NET</a></p>
<p>Provides simple, unofficial, .NET Framework APIs for using Google Ajax RestFULL APIs (Search API, Language API etc.)</p>
<p>How LAZY I am. I should release nearly a month ago.</p>
<p>Indeed, 99+% of source have been finished when I release the <a href="http://iron9light.wordpress.com/2008/09/17/google-search-api-for-net-01-released/" target="_blank">Google Search API for .NET 0.1</a> and <a href="http://iron9light.wordpress.com/2008/06/03/google-translate-api-for-net-01-release/" target="_blank">Google Translate API for .NET 0.1.1</a>.</p>
<p>I just wait some bugs from the last versioin, so I can do some change.</p>
<p>I do fixed one bug, only one.</p>
<p>Ok, see what&#8217;s new.</p>
<p>The new versions are nearly no different for using, but the foundation is changed.</p>
<p>Replace Json.NET 2.0 by Microsoft official WCF.</p>
<p>And implement the HttpUtility, so not need the System.Web any more.</p>
<p>It now support .NET 3.5 sp1 Client Profile.</p>
<p>You can download here:</p>
<p><a href="http://google-api-for-dotnet.googlecode.com/files/GoogleSearchAPI_0.3.zip">GoogleSearchAPI_0.3.zip</a></p>
<p><a href="http://google-api-for-dotnet.googlecode.com/files/GoogleTranslateAPI_0.3.zip">GoogleTranslateAPI_0.3.zip</a></p>
<p>More in formations, please visit the project&#8217;s site:</p>
<p><a href="http://code.google.com/p/google-api-for-dotnet/" target="_blank">http://code.google.com/p/google-api-for-dotnet/</a></p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[iContact - Free Fridays #16]]></title>
<link>http://blueclock.wordpress.com/2008/07/11/icontact-free-fridays-16/</link>
<pubDate>Fri, 11 Jul 2008 04:01:25 +0000</pubDate>
<dc:creator>Gilbert</dc:creator>
<guid>http://blueclock.wordpress.com/2008/07/11/icontact-free-fridays-16/</guid>
<description><![CDATA[iContact is more of a &#8220;one to watch&#8221; than a fully fledged application at the moment. It]]></description>
<content:encoded><![CDATA[iContact is more of a &#8220;one to watch&#8221; than a fully fledged application at the moment. It]]></content:encoded>
</item>
<item>
<title><![CDATA[Google Search API for .NET 0.1 alpha 5]]></title>
<link>http://iron9light.wordpress.com/2008/06/13/google-search-api-for-net-01-alpha/</link>
<pubDate>Fri, 13 Jun 2008 06:40:12 +0000</pubDate>
<dc:creator>iron9light</dc:creator>
<guid>http://iron9light.wordpress.com/2008/06/13/google-search-api-for-net-01-alpha/</guid>
<description><![CDATA[Google Search API for .NET is a part of Google APIs for .NET. This project will provides simple, uno]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Google Search API for .NET is a part of <a href="http://code.google.com/p/google-api-for-dotnet/" target="_blank">Google APIs for .NET</a>.</p>
<p>This project will provides simple, unofficial, .NET Framework APIs for using Google Ajax RestFULL APIs (Search API, Language API etc.)</p>
<p>The Google Translate API for .NET will also be a part of it (Indeed I have just released a <a href="http://iron9light.wordpress.com/2008/06/03/google-translate-api-for-net-01-release/" target="_blank">new version</a> there).</p>
<p>Now it support the Google Web Search API ,Google News Search API, Google Blog Search API and Google Video Search API.</p>
<p>I&#8217;ll add the support of all Google Search APIs(GwebSearch, GlocalSearch, GvideoSearch, GblogSearch, GnewsSearch, GbookSearch, GimageSearch, GpatentSearch) in the future.</p>
<p><strong>Google Search API for .NET 0.1 alpha 5</strong></p>
<p><strong>Description: </strong></p>
<p>Provides a simple, unofficial, .NET Framework API for using Google Ajax Search API service.</p>
<p><strong>Feature:</strong></p>
<ul>
<li>Now support the Google Web Search API ,Google News Search API, Google Blog Search API, Google Video Search API and Google Book Search API.</li>
<li>CLS compatible. It can be used by any .NET languages (VB.NET, C++/CLI etc.)</li>
</ul>
<p><strong>Required:</strong></p>
<ul>
<li>.NET Framework 2.0 or newer version.</li>
</ul>
<p><strong>Example:</strong></p>
<p>Google Web Search:</p>
<pre class="brush: csharp;">
class Example
{
    public static void Main()
    {
        // Search 32 results of keyword : &quot;Google APIs for .NET&quot;
        IList&lt;IWebResult&gt; results = GwebSearcher.Search(&quot;Google API for .NET&quot;, 32);
        foreach(IWebResult result in results)
        {
            Console.WriteLine(&quot;[{0}] {1} =&gt; {2}&quot;, result.Title, result.Content, result.Url);
        }
    }
}
</pre>
<p>Google News Search:</p>
<pre class="brush: csharp;">
class Example
{
    public static void Main()
    {
        // Search 16 results of keyword : &quot;Olympic&quot;, local : &quot;Beijing&quot;
        IList&lt;INewsResult&gt; results = GnewsSearcher.Search(&quot;Olympic&quot;, 16, &quot;Beijing&quot;);
        foreach(INewsResult result in results)
        {
            Console.WriteLine(&quot;[{0}, {1} - {2:d}]{3} =&gt; {4}&quot;, result.Publisher, result.Location, result.PublishedDate, result.Title, result.Url);
        }
    }
}
</pre>
<p>Google Blog Search:</p>
<pre class="brush: csharp;">
class Example
{
    public static void Main()
    {
        // Search 32 results of keyword : &quot;Coldplay&quot;
        IList&lt;IBlogResult&gt; results = GblogSearcher.Search(&quot;Coldplay&quot;, 32);
        foreach(IBlogResult result in results)
        {
            Console.WriteLine(&quot;[{0} - {1:d} by {2}] {3} =&gt; {4}&quot;, result.Title, result.PublishedDate, result.Author, result.Content, result.BlogUrl);
        }
    }
}
</pre>
<p>Google Video Search:</p>
<pre class="brush: csharp;">
class Example
{
    public static void Main()
    {
        // Search 32 results of keyword : &quot;South&quot;
        IList&lt;IVideoResult&gt; results = GVideoSearcher.Search(&quot;South Park&quot;, 32);
        foreach(IVideoResult result in results)
        {
            Console.WriteLine(&quot;[{0} - {1} seconds by {2}] {3} =&gt; {4}&quot;, result.Title, result.Duration, result.Publisher, result.Content, result.Url);
        }
    }
}
</pre>
<p>Google Book Search:</p>
<pre class="brush: csharp;">
class Example
{
    public static void Main()
    {
        // Search 10 result of keyword : &quot;Grimm's Fairy Tales&quot;
        IList&lt;IBookResult&gt; results = GbookSearcher.Search(&quot;Grimm's Fairy Tales&quot;, 10);
        foreach(IBookResult result in results)
        {
            Console.WriteLine(&quot;{0} [by {1} - {2} - {3} pages] {4}&quot;, result.Title, result.Authors, result.PublishedYear, result.PageCount, result.BookId);
        }
    }
}
</pre>
<p>You can download here:</p>
<p><a href="http://google-api-for-dotnet.googlecode.com/files/GoogleSearchAPI_0.1_alpha_5.zip">GoogleSearchAPI_0.1_alpha_5.zip</a></p>
<p>Visite the <a href="http://code.google.com/p/google-api-for-dotnet/" target="_blank">Google APIs for .NET</a> project for more information.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Το Google Earth συναντά τους browsers]]></title>
<link>http://altervedo.wordpress.com/2008/05/30/%cf%84%ce%bf-google-earth-%cf%83%cf%85%ce%bd%ce%b1%ce%bd%cf%84%ce%ac-%cf%84%ce%bf%cf%85%cf%82-browsers/</link>
<pubDate>Fri, 30 May 2008 07:59:57 +0000</pubDate>
<dc:creator>altervedo</dc:creator>
<guid>http://altervedo.wordpress.com/2008/05/30/%cf%84%ce%bf-google-earth-%cf%83%cf%85%ce%bd%ce%b1%ce%bd%cf%84%ce%ac-%cf%84%ce%bf%cf%85%cf%82-browsers/</guid>
<description><![CDATA[Με ένα νέο plugin για Internet Explorer και Firefox, οι άνθρωποι του Google μας δίνουν την δυνατότητ]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Με ένα νέο plugin για Internet Explorer και Firefox, οι άνθρωποι του Google μας δίνουν την δυνατότητα να απολαύσουμε κάποια από τα βασικά χαρακτηριστικά του δημοφιλούς software Google Earth, μέσα στον browser μας. Βασική διαφορά&#8230;από αυτό που είχαμε ως τώρα, δηλαδή το Google Maps; Η δυνατότητα εμφάνισης στο παράθυρό του browser μας ενός πραγματικού 3D μοντέλου της Γης.</p>
<p>Στην ουσία δεν πρόκειται για ένα software που σας δίνει δυνατότητα οποιαδήποτε στιγμή να δείτε τρισδιάστατη τη γη. Για αυτή τη δουλειά υπάρχει το Google Earth. Πρόκειται απλά για ένα plugin που δίνει δυνατότητες στον browser σας να εμφανίσει 3d χάρτες όταν αυτοί περιέχονται σε κάποια σελίδα.</p>
<p>Ταυτόχρονα παρέχεται σε developers και ιδιοκτήτες σελίδων η δυνατότητα να εισάγουν τους τρισδιάστατους χάρτες στις σελίδες τους εύκολα και απλά, με την χρήση της <a title="Google Earth API" href="http://code.google.com/apis/earth/" target="_blank">Google Earth API</a>. Αν έχετε δημιουργήσει ένα Maps API key για το url της σελίδας σας, μπορείτε όχι μόνο να εισάγετε σε σελίδες σας 3d χάρτες, αλλά και να ζωγραφήσετε γραμμές, να τοποθετήσετε markers, να εισάγετε 3d μοντέλα ή και να φορτώσετε KML δεδομένα για την δημιουργία ενός &#8220;πλούσιου&#8221; τρισδιάστατου χάρτη-εφαρμογή.</p>
<p>Η επιτυχία των τρισδιάστατων χαρτών στο web θα κριθεί από το πόσο θα διαδοθεί το σχετικό plugin.</p>
<p>Μπορείτε να εγκαταστήσετε το plugin διαμέσω της ιστοσελίδας: <a title="Google Earth API" href="http://code.google.com/apis/earth/" target="_blank">http://code.google.com/apis/earth/<br />
</a> και να διαβάσετε περισσότερα στην σελίδα <a title="Google Earth, meet the browser" href="http://google-latlong.blogspot.com/2008/05/google-earth-meet-browser.html" target="_blank">Google Earth, meet the browser</a>.</p>
<p>Προβλήματα:</p>
<ol>
<li>Η εγκατάσταση δεν είναι πάντα με την πρώτη επιτυχημένη.</li>
<li>Δεν σου δίνεται η δυνατότητα να επιλέξεις για ποιόν browser θες να εγκαταστήσεις το plugin. Μόλις προχωρήσετε στην εγκατάσταση, το plugin γίνεται διαθέσιμο σε όλους τους browsers που υπάρχουν εγκατεστημένοι στο σύστημά σας. Για μένα πραγματικά ενοχλητικό γεγονός και σημείο στο οποίο κατάλαβα ότι πρέπει να ψιλοκαίγονται στην Google για την διάδοση του plugin τους.</li>
</ol>
<p>Τέλος,</p>
<p>παραδείγματα χρήσης του νέου Google Earth API: <a title="Google Earth API Examples" href="http://code.google.com/apis/earth/documentation/examples.html" target="_blank">Google Earth API Examples</a></p>
<p><a title="Google Earth API Examples" href="http://code.google.com/apis/earth/documentation/examples.html" target="_blank"></a>και ένα σχετικό βίντεο:<br />
<span style="display:block;width:425px;margin:0 auto;"> <embed src='http://widgets.vodpod.com/w/video_embed/ExternalVideo.577583' type='application/x-shockwave-flash' AllowScriptAccess='always' pluginspage='http://www.macromedia.com/go/getflashplayer' wmode='transparent' flashvars='' /></span></p>
<div style="font-size:10px;">more about &#8220;<a href="http://vodpod.com/watch/766903-google-earth-api">Google Earth API</a>&#8220;, posted with <a href="http://vodpod.com/wordpress">vodpod</a></div>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Google I/O 2008, San Francisco]]></title>
<link>http://thomasgallagher.wordpress.com/2008/05/28/google-io-2008-san-francisco-day-1/</link>
<pubDate>Wed, 28 May 2008 21:28:42 +0000</pubDate>
<dc:creator>thomasgallagher</dc:creator>
<guid>http://thomasgallagher.wordpress.com/2008/05/28/google-io-2008-san-francisco-day-1/</guid>
<description><![CDATA[Morning Keynote &#8211; &#8220;Surf Report: Surf&#8217;s Up on the Open Web!&#8221; The first keynot]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p><strong>Morning Keynote &#8211; &#8220;Surf Report: Surf&#8217;s Up on the Open Web!&#8221;</strong><br />
<img style="width:200px;height:150px;float:left;margin:0 5px 5px 0;" src="http://photos-c.ak.facebook.com/photos-ak-sf2p/v250/229/41/509132340/n509132340_910226_9456.jpg" alt="Google IO, San Francisco" /><span>The first keynote of the day was focused on the latest Google technologies that are driving forward development of the &#8216;Open Web&#8217; concept. Primary topics included leveraging the Google Cloud deployment platform through  <a title="Google App Engine" href="http://code.google.com/appengine/" target="_blank">Google App Engine</a> (now available to all), and making use of the <a title="Google Web Toolkit" href="http://code.google.com/webtoolkit/" target="_blank">Google Web Toolkit</a> (a suite of tools, primarily focused around a Java cross-compiler) to provide desktop-style rich functionality on the web browser.</span></p>
<p>There was also a &#8216;Celebrity Fan Site&#8217; demo that showed just how easy it is to add multilingual search, news, videos, images and maps to a static website using the Google Web APIs and Javascript.</p>
<p><strong>Google OpenSocial Campfire Chat<br />
</strong><img style="width:200px;height:150px;float:left;margin:0 5px 5px 0;" src="http://photos-f.ak.facebook.com/photos-ak-sf2p/v288/218/105/750310633/n750310633_3131853_7988.jpg" alt="Google OpenSocial Campfire" />I found this campfire interesting as it focused on the development of the platform as much as the actual implementation of the technology. Emphasis was also placed on the importance of remembering that as we are dealing with an open standard, we as developers and consumers can contribute to the <a title="Google OpenSocial 0.8 Specification" href="http://code.google.com/apis/opensocial/docs/0.8/spec.html" target="_blank">Google OpenSocial Specification</a> and shape its future development.</p>
<p>Many of the floor questions seemed a little misguided as they were rather specific to an individual&#8217;s company or website. In reaction to this, panelist Dan Pieterson (Google, seventh from the left in the photograph) raised a very valid point that &#8220;OpenSocial provides common APIs, not common policies&#8221;. On a personal level I thought this was particularly valid as I have sometimes found that people have a tendency to seek reassurance for their business decisions from service providers when it is not really within their remit to comment.</p>
<p>Other topics of note included:</p>
<ul>
<li><a title="Project VRM (Vendor Relationship Management)" href="http://cyber.law.harvard.edu/projectvrm/Main_Page" target="_blank">Harvard Law&#8217;s Project VRM (Vendor Relationship Management)</a> &#8211; From what I gathered from a high level, this is the ethical notion that networks and containers simply borrow data that is owned by a user in order to fulfill a value proposition.</li>
<li><a title="Google Friend Connect" href="http://www.google.com/friendconnect/" target="_blank">Google Friend Connect</a> &#8211; Why go to your friends when they can come to you?</li>
<li><a title="Hi5" href="http://hi5.com/" target="_blank">Hi5</a> supports &#8220;Friend Circles&#8221; which allow developers to distinguish between relationship types (friend, colleague, acquaintance, lover?! etc.)</li>
<li>Jeremiah from <a title="Slide" href="http://www.slide.com/" target="_blank">Slide</a> mentioned that *some* networks are talking to application developers in order expand their marketing offering to larger brands.</li>
<li><a title="Apache Shindig" href="http://incubator.apache.org/shindig/" target="_blank">Apache Shindig</a> &#8211; Because anybody can be an OpenSocial container..</li>
</ul>
<p><strong>Stands</strong><br />
<img style="width:200px;height:150px;float:left;margin:0 5px 5px 0;" src="http://photos-b.ak.facebook.com/photos-ak-sf2p/v288/218/105/750310633/n750310633_3131849_6833.jpg" alt="Google IO Floor" />I visited all of the stands at the event to find out what was going on, although I will admit that I was slightly biased towards OpenSocial and Android (what is it about shiny new technologies?!).</p>
<p>At the OpenSocial stand I was introduced to the surprisingly addictive real-time TypeRacer game on <a title="Orkut" href="http://www.orkut.com" target="_blank">Orkut</a>. Players are displayed as cars and the idea is that you type out a paragraph word for word, the higher your word per minute count, the faster your car goes&#8230;</p>
<p><img style="width:200px;height:150px;float:left;margin:0 5px 5px 0;" src="http://photos-d.ak.facebook.com/photos-ak-sf2p/v288/218/105/750310633/n750310633_3131851_7406.jpg" alt="Google Android" /><a title="Google Android" href="http://code.google.com/android/" target="_blank">Google Android</a> seemed like a far less complete offering which is not surprising as it is a rather large proposition and the hardware isn&#8217;t due to be released until late this year. Still, after installing the <a title="Google Android SDK" href="http://code.google.com/android/download_list.html" target="_blank">Android SDK</a>, the <a title="Eclipse" href="http://www.eclipse.org/downloads/" target="_blank">Eclipse IDE</a> (complete with Android plugin) and sample Java code &#8211; I had a basic version of &#8220;snake&#8221; running on the emulator in next to no time. From a business perspective, I think that it will be interesting to see what kind of rich UI functionality the OpenGL support will make possible. Personally I would like to see an <a title="Amazon Ec2" href="http://www.amazon.com/EC2-AWS-Service-Pricing/b/ref=sc_fe_l_2?ie=UTF8&#38;node=201590011&#38;no=3435361&#38;me=A36L942TSJ2AJA" target="_blank">Amazon Ec2</a> instance monitor that would give you real time application statistics and alerts on your mobile device &#8211; a future project for <a title="RightScale" href="http://www.rightscale.com/m/" target="_blank">RightScale</a> perhaps?</p>
<p><strong>Summary<br />
</strong><img style="width:200px;height:150px;float:left;margin:0 5px 5px 0;" src="http://photos-g.ak.facebook.com/photos-ak-sf2p/v288/218/105/750310633/n750310633_3131854_8276.jpg" alt="Flight of the Conchords" />Although it may seem that there is a lot of experimentation in the online sector at the moment; talking to various people has reinforced my assumption that developers (and savvy businessmen alike) are unified in their understanding of what &#8216;the open web&#8217; is rapidly becoming. It is time to &#8220;think outside of the container&#8221; and bring the simplistic power of relevant social tools into our own websites and applications.</p>
<p><em>Picture: Flight of the Conchords</em></p>
</div>]]></content:encoded>
</item>

</channel>
</rss>
