<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
        <title>CorneringEki</title>
        <description>CorneringEki - </description>
        <link></link>
        <atom:link href="" rel="self" type="application/rss+xml" />
        <lastBuildDate>Thu, 24 Sep 2026 04:31:26 +0000</lastBuildDate>
        <pubDate>Thu, 24 Sep 2026 04:31:26 +0000</pubDate>
        <ttl>60</ttl>


        <item>
                <title>Easy Xamarin.Forms Container To Support Pinch To Zoom in Content in iOS using Custom Renderers</title>
                <description>
&lt;p&gt;Very recently I started working with Xamarin.Forms and I am enjoying hacking my way through the intricacies of the framework.
I have been creating a lot of custom controls for things such as Horizontal ListView, Tabbed Views for iOS, and other complex controls. So while developing one of these controls, I wanted them to have support for Pinch To Zoom gesture. Currently, as of this post, Xamarin.Forms has support for only one gesture - “Tap”. This left me with two choices: Re-Invent the wheel and write the Gesture Recognizer on my own (or find somebody’s implementation of the same) or use the native Gesture Recognizer.&lt;/p&gt;

&lt;p&gt;I chose the second one. From my experience with Windows Store App development, I know that the ScrollView inherenetly supports pinch to zoom capability. I checked out iOS’ UIScrollView for the same and it seems like if I wrap my view around a UIScrollView in iOS/ScrollView in WinRT, I should be able to achieve the desired functionality without having to write a lot of code.&lt;/p&gt;

&lt;p&gt;So I wrote an empty container to Wrap around my view that is rendered using Native controls that support pinch to zoom capability out of the box.
This is what my implementation looks like:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-csharp&quot; data-lang=&quot;csharp&quot;&gt;&lt;span class=&quot;k&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;PinchToZoomContainer&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;View&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;View&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Content&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;get&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;set&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;As simple as it gets. We could have directly used a ContentView here, without the need for a Content property in view. &lt;em&gt;Makes Sense&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;But the thing is, I will render the view myself, so I don’t want the content to be rendered by Xamarin. Otherwise, I end up with two views, one rendered by xamarin, the other by myself. Looks crappy, trust me.&lt;/p&gt;

&lt;p&gt;Coming to the iOS implementation:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-csharp&quot; data-lang=&quot;csharp&quot;&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;assembly&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;ExportRenderer&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;typeof&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;PinchToZoomContainer&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;typeof&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;PinchToZoomRenderer&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))]&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;namespace&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;TestPinchToZoom.iOS&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;PinchToZoomRenderer&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;ViewRenderer&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;PinchToZoomContainer&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;UIScrollView&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;private&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;View&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Content&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;private&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;bool&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;childrenCreated&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;false&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;

        &lt;span class=&quot;k&quot;&gt;protected&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;override&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;OnElementChanged&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;ElementChangedEventArgs&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;PinchToZoomContainer&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
        &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
            &lt;span class=&quot;k&quot;&gt;base&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;OnElementChanged&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
            
            &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;NewElement&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;null&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
                &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
            &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
            
            &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Control&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;null&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
                &lt;span class=&quot;nf&quot;&gt;SetNativeControl&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;UIScrollView&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;());&lt;/span&gt;
            &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
            
            &lt;span class=&quot;c1&quot;&gt;// Allow the Control to support pinch to zoom&lt;/span&gt;
            &lt;span class=&quot;n&quot;&gt;Control&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;MaximumZoomScale&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;3f&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
            &lt;span class=&quot;n&quot;&gt;Control&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;MinimumZoomScale&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;0.1f&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
            &lt;span class=&quot;n&quot;&gt;Control&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;ViewForZoomingInScrollView&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;+=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;GetViewForZoomingInScrollView&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
            &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Content&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;NewElement&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Content&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

        &lt;span class=&quot;k&quot;&gt;private&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;UIView&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;GetViewForZoomingInScrollView&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;UIScrollView&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;scrollView&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
        &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
            &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;scrollView&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Subviews&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;FirstOrDefault&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;
        &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
        
        &lt;span class=&quot;k&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;override&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;LayoutSubviews&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
        &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
            &lt;span class=&quot;k&quot;&gt;base&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;LayoutSubviews&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;
            &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Control&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;null&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;||&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Control&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Subviews&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;null&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; 
            &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
                &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
            &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
        
            &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(!&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;childrenCreated&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; 
            &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
                &lt;span class=&quot;c1&quot;&gt;// render the child Content of the view&lt;/span&gt;
                &lt;span class=&quot;kt&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;childRenderer&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;RendererFactory&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;GetRenderer&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Content&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
                &lt;span class=&quot;c1&quot;&gt;// This is important. The renderer requires the size of the element to render.&lt;/span&gt;
                &lt;span class=&quot;n&quot;&gt;childRenderer&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;SetElementSize&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;Size&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Control&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Frame&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Width&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Control&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Frame&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Height&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;));&lt;/span&gt;
                &lt;span class=&quot;kt&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;nativeChildView&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;childRenderer&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;NativeView&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
                &lt;span class=&quot;c1&quot;&gt;// Again, we need to provide a frame, since we are laying out the view&lt;/span&gt;
                &lt;span class=&quot;n&quot;&gt;nativeChildView&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Frame&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Control&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Frame&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
                &lt;span class=&quot;n&quot;&gt;Control&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;AddSubview&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;nativeChildView&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
                &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;childrenCreated&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
            &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
        
        &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;This code is pretty much self explanatory. The whole idea is to render the content while laying out the subview. At this point our parent view is already rendered and we just create a new native view from the Xamarin.Forms view and add it as a “Subview”, i.e. child to the parent pinch to zoom container.&lt;/p&gt;
</description>
                <link>/xamarin.forms/2015/10/11/easy-xamarinforms-container-to-support-pinch-to-zoom-in-content-in-ios-using-custom-renderers/</link>
                <guid>/xamarin.forms/2015/10/11/easy-xamarinforms-container-to-support-pinch-to-zoom-in-content-in-ios-using-custom-renderers</guid>
                <pubDate>Sun, 11 Oct 2015 00:00:00 +0000</pubDate>
        </item>

        <item>
                <title>Git: How do I apply a patch when I get &quot;Git:patch does not apply&quot;?</title>
                <description>&lt;p&gt;Hey Everyone, it&apos;s been a long long time since I posted, however I am back, posting about a recent problem I encountered. I have been working on &lt;a href=&quot;http://bugzil.la/927124&quot;&gt;&lt;strong&gt;Reader Mode for Metro Firefox&lt;/strong&gt;&lt;/a&gt; for a while now, and I am familiar with their easy to use MQ (Mercurial Queues) system.&lt;/p&gt;
&lt;p&gt;However, I started experimenting with their Github repository, gecko-dev and tried to apply my patch on the forked repository (&lt;em&gt;I hoped, sincerely hoped, but yeah you know how this story goes, don&apos;t you?&lt;/em&gt;).&lt;/p&gt;
&lt;p&gt;Anyway, coming straight to the point, I was welcomed to git by a sweet message:&lt;/p&gt;
&lt;p style=&quot;text-align:center;&quot;&gt;&lt;strong&gt;&lt;em&gt;&quot;git:Patch does not apply&quot;&lt;br /&gt;
&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p style=&quot;text-align:left;&quot;&gt;I looked around, and found a simple fix for this:&lt;/p&gt;
&lt;p style=&quot;text-align:center;&quot;&gt;&lt;strong&gt;$git apply --reject ThePatchThatFailed.patch&lt;/strong&gt;&lt;/p&gt;
&lt;p style=&quot;text-align:left;&quot;&gt;Let me explain what this does. It will apply the parts of the patch that succeed to the local repository, and whatever is not applied is saved to a &lt;strong&gt;*.rej&lt;/strong&gt; file.&lt;/p&gt;
&lt;p style=&quot;text-align:left;&quot;&gt;Now you can manually fix the hunks (or in normal language, specific parts that start with @@ -1251,6 +1251,23 @@...).&lt;/p&gt;
&lt;p style=&quot;text-align:left;&quot;&gt;Using the *.rej files to manually make changes to the local repostory is straightforward, open the rej file and the corresponding file with the same name without the .rej extension and manually add your changes to the file. Once done, you can just delete the rej file and repeat for all other rej files.&lt;/p&gt;
&lt;p style=&quot;text-align:left;&quot;&gt;Once you finish, you can just &lt;strong&gt;git commit&lt;/strong&gt; your repository and you&apos;re done! Sounds easy, right? Is there an easy way around this? Please feel free to share your opinions :)&lt;/p&gt;
</description>
                <link>/problem/solution/2014/03/22/git-how-do-i-apply-a-patch-when-i-get-gitpatch-does-not-apply/</link>
                <guid>/problem/solution/2014/03/22/git-how-do-i-apply-a-patch-when-i-get-gitpatch-does-not-apply</guid>
                <pubDate>Sat, 22 Mar 2014 16:26:37 +0000</pubDate>
        </item>

        <item>
                <title>Developing Windows 8 Apps with HTML5/js : Data Binding in WinJS</title>
                <description>&lt;h2&gt;&lt;strong&gt;What is data-binding?&lt;/strong&gt;&lt;/h2&gt;
&lt;p&gt;So, we have been hearing lots about data-binding, especially if you have ever tried WPF, ASP.net, WinJS, etc. But what is it exactly?&lt;br /&gt;
It&apos;s exactly what you might think it is, &lt;em&gt;a way to bind the data, with…. What?&lt;/em&gt;&lt;br /&gt;
Formally, &lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;Data binding is a way of creating a connection, which binds together the Application UI with the Business Logic. &lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;Okay, here’s a simple way to explain it:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;You have a textbox. And then you have a property that it represents.&lt;/li&gt;
&lt;li&gt;Your textbox is the View and the property, say name, is the model.&lt;/li&gt;
&lt;li&gt;You want that everytime the user changes his name in the Textbox (view), the model reflects it automatically.&lt;/li&gt;
&lt;li&gt;Similarly, when the property ‘name’ changes in the code behind, the UI reflects the updated values automatically.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This is data binding. Simple.&lt;/p&gt;
&lt;h2&gt;&lt;strong&gt;What are the different types of data binding?&lt;/strong&gt;&lt;/h2&gt;
&lt;h3&gt;&lt;strong&gt;One Time Binding&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;	One time data-binding is, as the name suggests, a one time only binding. The View is bound to the model only once. So once the bound data is loaded, any changes in the model is not reflected by the view/ui.&lt;/p&gt;
&lt;p&gt;So here&apos;s a simple view that I am using to explain what it is:&lt;br /&gt;
[caption id=&quot;attachment_154&quot; align=&quot;aligncenter&quot; width=&quot;645&quot;]&lt;a href=&quot;http://corneringeki.azurewebsites.net/wp-content/uploads/2013/03/winjs-one-time-binding-demo.jpg&quot;&gt;&lt;img src=&quot;/assets/winjs-one-time-binding-demo.jpg?w=645&quot; alt=&quot;One Time Data Binding Demo&quot; width=&quot;645&quot; height=&quot;410&quot; class=&quot;size-large wp-image-154&quot; /&gt;&lt;/a&gt; One Time Data Binding Demo[/caption]&lt;/p&gt;
&lt;p&gt;Here&apos;s how the code-behind looks like:&lt;/p&gt;
&lt;pre&gt;
(function () {
    &quot;use strict&quot;;
    var _model = {
        name: &quot;Eklavya Mirani&quot;,
        blog: &quot;http://corneringeki.wordpress.com&quot;
    };

    var _viewModel = {
        model: _model
    };



WinJS.UI.Pages.define(&quot;/pages/One Time/One Time.html&quot;, {
     ready: function (element, options) {
         // TODO: Initialize the page here.
         init();
         //defining the namespace for the new view model.
         WinJS.Namespace.define(&quot;Application.Pages.ViewModel&quot;,
                                _viewModel);
         WinJS.Binding.processAll(null, Application.Pages.ViewModel);
        },

        unload: function () {
            // TODO: Respond to navigations away from this page.
        },

        updateLayout: function (element, viewState, lastViewState) {
            // TODO: Respond to changes in viewState.
        }
    });
})();&lt;/pre&gt;
&lt;p&gt;Let us look at the code part by part.&lt;/p&gt;
&lt;pre&gt;
var _model = {
        name: &quot;Eklavya Mirani&quot;,
        blog: &quot;http://corneringeki.wordpress.com&quot;
    };

    var _viewModel = {
        model: _model
    };
&lt;/pre&gt;
&lt;p&gt;So now we define a model, with the properties name and blog. Also we define the View Model that will act as the data source for data-binding.&lt;/p&gt;
&lt;p&gt;If you&apos;re wondering why do I have a &apos;_&apos; before the names of these objects, it is because in javascript, an &apos;_&apos; prefix signifies that it is a private property. Even the intellisense will not show you properties and objects prefixed with an &apos;_&apos;&lt;/p&gt;
&lt;p&gt;Since we have made our view model a private property, we need a way to access it publicly, and we do this by assigning it a namespace.&lt;/p&gt;
&lt;pre&gt;
//defining the namespace for the new view model.
WinJS.Namespace.define(&quot;Application.Pages.ViewModel&quot;, _viewModel);
&lt;/pre&gt;
&lt;p&gt;Application.Pages.ViewModel is the win-data-bindsource that we will use as the binding source.&lt;/p&gt;
&lt;p&gt;One last thing to do before we complete our data-binding.&lt;/p&gt;
&lt;pre&gt;
WinJS.Binding.processAll(null, Application.Pages.ViewModel);&lt;/pre&gt;
&lt;p&gt;WinJS.Binding.processAll() is used to process all the data sources to their respective UI elements.&lt;br /&gt;
We can process all data-bound elements in a given parent element by passing the parent element instead of null, or null to process all data-bound elements in the entire page.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&lt;/p&gt;
&lt;pre&gt;
&amp;lt;section&amp;gt;
&amp;lt;h2 id=&quot;boundHeader&quot;&amp;gt;&amp;lt;/h2&amp;gt;&amp;lt;br /&amp;gt;
        
&amp;lt;input id=&quot;txtInput&quot; type=&quot;text&quot; placeholder=&quot;Enter the value here&quot;
  data-win-bind=&quot;value : model.name&quot;/&amp;gt; &amp;lt;br/&amp;gt;

&amp;lt;input id=&quot;buttonChange&quot; type=&quot;button&quot; value=&quot;Change values&quot; /&amp;gt;&amp;lt;br /&amp;gt;  

&amp;lt;/section&amp;gt;&lt;/pre&gt;
&lt;p&gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;The above code is pretty much self explanatory, I am creating a section and adding elements to demonstrate data binding.&lt;/p&gt;
&lt;p&gt;Before HTML5, adding custom attributes to your elements was not allowed, but now it can be done by using data-* attribute.&lt;br /&gt;
You can add any custom attribute with the data- prefix and save any metadata to it.&lt;br /&gt;
Okay, as I mentioned, data-win-bindsource refers to the namespace &quot;Application.Pages.ViewModel&quot; which contains the View Model that we created.&lt;/p&gt;
&lt;p&gt;To actually bind an attribute of the element to our model, we use:&lt;/p&gt;
&lt;pre&gt;data-win-bind=&quot;value : model.name&quot;&lt;/pre&gt;
&lt;p&gt;This binds our element&apos;s &apos;value&apos; attribute to the model.name property.&lt;/p&gt;
&lt;p&gt;The button is used to change the Application.Pages.ViewModel.model.name to the value in textbox.&lt;/p&gt;
&lt;p&gt;In one time binding, the change in the values of the model is not reflected by the view after it is modified, hence the name &quot;One Time&quot; binding.&lt;/p&gt;
&lt;p&gt;And that, is what is one time data-binding.! (The full code is attached at the end.)&lt;/p&gt;
&lt;h3&gt;&lt;strong&gt;One Way Binding&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;	One way data binding, is like a pipe one end of which is screwed into the tap and the other is used to spray water (data in our case) in the garden (View). You can get water from the tap, but you can’t send it back in (if you have ever done that, I’d love to hear why :) ).&lt;br /&gt;
So for a to the point answer, one way binding is the type of binding where the model is bound to the view in such a way that any changes in the model will be reflected by the view but the changes in the view WILL NOT be reflected by the model.&lt;/p&gt;
&lt;p&gt;One Way binding is implemented almost entirely as one time binding, but for one small change:&lt;/p&gt;
&lt;pre&gt;    var _viewModel = {
        model: WinJS.Binding.as(_model)
    };&lt;/pre&gt;
&lt;p&gt;If you remember from above, instead of directly assigning _model to model, we now formally specify that _model is to be used for data binding by making a call to WinJS.Binding.as() which returns an observable object.&lt;/p&gt;
&lt;p&gt;Now if you check, all changes to the model are reflected back by the View.&lt;/p&gt;
&lt;h3&gt;&lt;strong&gt;Two Way Binding&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;	Two way data binding is pretty simple if you understood one way binding. This type of binding works both ways. You make changes to the View, it gets reflected in the model and if you make changes in model, the view reflects those changes.&lt;br /&gt;
Now, how do you trigger the changes from the View to the model is a different story. It may happen that you want the values to get updated as soon as you  “key up”, or “on blur” or any other event that the bound element supports. Its more of a preference actually. &lt;/p&gt;
&lt;pre&gt;
var _model = {
    name: &quot;Eklavya Mirani&quot;,
    blog: &quot;http://corneringeki.wordpress.com&quot;
    };

var _viewModel = {
    model: WinJS.Binding.as(_model),
    //Requires to be marked by
    //WinJS.Utilities.markSupportedForProcessing
    setValue: function (args) {
    Application.Pages.ViewModel.model.name = args.srcElement.value;
    }
};
&lt;/pre&gt;
&lt;p&gt;Two way data binding is slightly different from One Way Binding. Here we specify a setter function to change the value of the Application.Pages.ViewModel.model.name to an element&apos;s value attribute passed as an argument.&lt;/p&gt;
&lt;p&gt;What I am actually doing here is, setting up an event handler inside of the Model, so that it can be bound to the a specific event of the target attribute.&lt;/p&gt;
&lt;p&gt;Say, for example, I set the onblur event to setValue, every time the onblur is fired, setValue is executed and the model.name also gets modified. And this is why we use &lt;/p&gt;
&lt;pre&gt;Application.Pages.ViewModel.model.name = args.srcElement.value;&lt;/pre&gt;
&lt;p&gt;instead of &lt;/p&gt;
&lt;pre&gt;this.model.name = args.srcElement.value;&lt;/pre&gt;
&lt;p&gt;So when you test this, you will notice an exception, breaking on the debugger.&lt;/p&gt;
&lt;p&gt;So whats actually happening here?&lt;br /&gt;
By default, WinJS doesn’t allow functions to be executed in data binding unless they are explicitly flagged to support data binding.&lt;br /&gt;
What you need to do is to call the WinJS.Utilities.markSupportedForProcessing(function func) to allow WinJS to support the execution of this function.&lt;/p&gt;
&lt;p&gt;So the whole code looks like this:&lt;/p&gt;
&lt;pre&gt;
(function () {
    &quot;use strict&quot;;
var _model = {
    name: &quot;Eklavya Mirani&quot;,
    blog: &quot;http://corneringeki.wordpress.com&quot;
    };

var _viewModel = {
    model: WinJS.Binding.as(_model),
    //Requires to be marked by
    //WinJS.Utilities.markSupportedForProcessing
    setValue: function (args) {
    Application.Pages.ViewModel.model.name = args.srcElement.value;
    }
};

WinJS.UI.Pages.define(&quot;/pages/Two Way/Two Way.html&quot;, {
    ready: function (element, options) {
   // TODO: Initialize the page here.
            
   //defining the namespace for the new view model.
   WinJS.Namespace.define(&quot;Application.Pages.ViewModel&quot;, _viewModel);

   //Marking the setValue function
   WinJS.Utilities.markSupportedForProcessing(
                        Application.Pages.ViewModel.setValue);

   WinJS.Binding.processAll(null, Application.Pages.ViewModel);
   },

    unload: function () {
    // TODO: Respond to navigations away from this page.
    },

    updateLayout: function (element, viewState, lastViewState) {
    // TODO: Respond to changes in viewState.
        }
    });
})();&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Here is a link to the VS project:&lt;br /&gt;
&lt;a href=&quot;http://www.mediafire.com/download.php?3sulf8xn7cxcc6c&quot; title=&quot;Data Binding in WinJS Demo&quot;&gt;Data Binding in WinJS Demo&lt;/a&gt;&lt;/p&gt;
</description>
                <link>/html5/javascript/tutorial/windows%208%20apps/winjs/2013/03/10/data-binding-in-winjs/</link>
                <guid>/html5/javascript/tutorial/windows%208%20apps/winjs/2013/03/10/data-binding-in-winjs</guid>
                <pubDate>Sun, 10 Mar 2013 14:57:11 +0000</pubDate>
        </item>

        <item>
                <title>My Research for effective communication: The Idea</title>
                <description>&lt;p&gt;&lt;strong&gt;Objective: To develop a system that recognizes the gestures made in front of a camera and transform them into human readable form as images.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Background: Hand as a tool in communication.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Hand gestures are an important part of communication amongst people. Often we find ourselves talking to one another, using our hands to explain our point in a better way.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Imagine the following scenarios:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;em&gt;You come around a thought and use your hands to make mental notes of the idea. You think logically, your hands work as if writing something in air.&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;em&gt;A kid drawing or writing something on a moisturized part of a glass, or a dust laden glass.&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;em&gt;You are trying to convey a message to a person standing on the other corner of a crowded room where he cannot listen to your voice. You communicate with the help of gestures,and make it as understandable as possible.&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;em&gt;You are playing a game of “Dumb Charades,” you are given a movie to describe to your team, you use your hands to make it as understandable as possible.&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;All these scenarios explain how hands form an essential tool for communication. Hand gestures form an essential part of communication and provide semantic meaning to what the speaker has to say.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;How this system would be beneficial to its users?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Using the gesture recognition system, one would have the ability to actually draw in air, and convert the drawing into a human readable image, which can be recorded for later reference, and shared with others.&lt;/p&gt;
&lt;p&gt;This system could be a vital to bridge the language barrier amongst people of different ethnicities that don’t share a common language.  &lt;/p&gt;
&lt;p&gt;This system could also be used for making notes and reminders quickly while reducing the use of papers, and keeping them organized.&lt;/p&gt;
&lt;p&gt;It will also pave the path for making digital communication simpler, and user friendly, and easier to adapt by people that are accustomed to the conventional form of written communication.&lt;/p&gt;
</description>
                <link>/accessibility/communication/experience/research/solution/2012/09/06/my-research-for-effective-communication-the-idea/</link>
                <guid>/accessibility/communication/experience/research/solution/2012/09/06/my-research-for-effective-communication-the-idea</guid>
                <pubDate>Thu, 06 Sep 2012 22:46:04 +0000</pubDate>
        </item>

        <item>
                <title>Opera Extension : LinkMoi reaches 102 downloads. Sweet, eh?</title>
                <description>&lt;p&gt;In two of my previous articles I described my experience developing my first Opera Extension LinkMoi, and I am now proud to say, LinkMoi has reached its first landmark, 100+downloads.&lt;/p&gt;
&lt;p&gt;I do admit there were a few bugs in the initial result, but it was all Javascript&apos;s fault, I swear I had nothing to do with it. ;)&lt;/p&gt;
&lt;p&gt;The first released version, broke the javascript on a few pages such as http://play.google.com (You know you need my extension if you are too lazy to copy paste this link ;) ).&lt;/p&gt;
&lt;p&gt;So after trying to fix the bug after 6 hours of hit and trial debugging, I finally released a stable version which has been accepted by Opera and is now listed on http://addons.opera.com.&lt;/p&gt;
&lt;p&gt;You can download my extension here:&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://addons.opera.com/en-gb/extensions/details/linkmoi/?display=en&quot;&gt;https://addons.opera.com/en-gb/extensions/details/linkmoi/?display=en&lt;/a&gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;This is just a stable initial release, and there is a lot more to come, such as support for other protocols, link preferences, link preview, etc.&lt;/p&gt;
&lt;p&gt;So hold your breath (not literally ofc), because the next version will be a major upgrade.&lt;/p&gt;
</description>
                <link>/2012/08/27/opera-extension-linkmoi-reaches-102-downloads-sweet-eh/</link>
                <guid>/2012/08/27/opera-extension-linkmoi-reaches-102-downloads-sweet-eh</guid>
                <pubDate>Mon, 27 Aug 2012 18:56:27 +0000</pubDate>
        </item>

        <item>
                <title>Encountered Another Exception : &quot;Value does not fall within the expected range.&quot;</title>
                <description>&lt;p&gt;Today while debugging my new Windows Phone 7 Application, I encountered an exception I had never seen before:&lt;br /&gt;
&lt;em&gt;&lt;strong&gt;&quot;Value does not fall within the expected range.&quot;&lt;/strong&gt;&lt;/em&gt;&lt;br /&gt;
To be precise, I encountered it here:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;SomeRandomDictionary[&quot;TheMightyKey&quot;]=&quot;WeirdValue&quot;;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;I scratched my head, puzzled, cuz I knew this statement had executed before successfully. And then after some googling, I came to know this happens if you assign a Key value pair for some key that already exists in the dictionary.&lt;/p&gt;
&lt;p&gt;You must be wondering why I am telling you this story, and why the heck am I not posting the solution, the answer is simple:&lt;/p&gt;
&lt;p&gt;It makes me feel like The Wise One. AND its my blog, I can do whatever I want ;)&lt;/p&gt;
&lt;p&gt;Anyway, coming to the solution, you can simply resolve this by checking if a key already exists and removing it if it does before assigning a new KeyValuePair.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;if(SomeRandomDictionary.Contains(&quot;TheMightyKey&quot;))&lt;/p&gt;
&lt;p&gt;SomeRandomDictionary.Remove(&quot;TheMightyKey&quot;);&lt;/p&gt;
&lt;p&gt;SomerandomDictionary[&quot;TheMightyKey&quot;]=&quot;Weird Value&quot;;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;There you go, now you probably wont ever see this exception again.&lt;/p&gt;
&lt;p&gt;Happy Coding.&lt;/p&gt;
&lt;pre&gt;&lt;/pre&gt;
</description>
                <link>/c%23/exception/experience/problem/solution/windows%20phone%207/2012/08/27/encountered-another-exception-value-does-not-fall-within-the-expected-range/</link>
                <guid>/c%23/exception/experience/problem/solution/windows%20phone%207/2012/08/27/encountered-another-exception-value-does-not-fall-within-the-expected-range</guid>
                <pubDate>Mon, 27 Aug 2012 18:45:41 +0000</pubDate>
        </item>

        <item>
                <title>How to solve &quot;The calling thread cannot access this object because a different thread owns it.&quot; exception in WPF</title>
                <description>&lt;p&gt;So, today I was working on a WPF project where I had a background working thread, and I had to update the progress value of the progressbar according to the progress of the work being done in the thread.&lt;/p&gt;
&lt;p&gt;Now, when we created a background worker thread in Windows Forms, we needed to invoke the UI thread to update it:&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;strong&gt;//Updating a label&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;strong&gt;private delegate void UpdateUI(string Text)&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;strong&gt;protected void UpdateLabel(string text)&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;strong&gt;{&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;strong&gt;if(this.InvokeRequired)&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;strong&gt;{&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;strong&gt;UpdateUI UpdateLabel = new UpdateUI(this.UpdateLabel);&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;strong&gt;object[] Args=new object[1](&quot;UpdatedText&quot;);&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;strong&gt;this.Invoke(UpdateLabel , Args);&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;strong&gt;}&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;strong&gt;else&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;strong&gt;this.Label.Text=text;&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;strong&gt;}&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;But I couldn&apos;t find how to implement this in WPF as this wont work in WPF.&lt;/p&gt;
&lt;p&gt;After looking at a few pages here and there, i finally found a workaround:&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;strong&gt;this.Dispatcher.Invoke((Action)(() =&amp;gt;{&lt;/strong&gt;&lt;/em&gt;&lt;br /&gt;
&lt;em&gt;&lt;strong&gt; Label1.Text = &quot;Updated Text&quot;;&lt;/strong&gt;&lt;/em&gt;&lt;br /&gt;
&lt;em&gt;&lt;strong&gt; }));&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Just call&lt;em&gt;&lt;strong&gt; Dispatcher.Invoke(delegate Method,params object[] args)&lt;/strong&gt;&lt;/em&gt;, and pass a delegate (or a lambda expression casted to type &apos;action&apos; ), and update the UI element inside.&lt;/p&gt;
&lt;p&gt;Happy Coding.&lt;/p&gt;
</description>
                <link>/c%23/exception/solution/wpf/2012/08/10/how-to-solve-the-calling-thread-cannot-access-this-object-because-a-different-thread-owns-it-exception-in-wpf-12-2/</link>
                <guid>/c%23/exception/solution/wpf/2012/08/10/how-to-solve-the-calling-thread-cannot-access-this-object-because-a-different-thread-owns-it-exception-in-wpf-12-2</guid>
                <pubDate>Fri, 10 Aug 2012 14:46:45 +0000</pubDate>
        </item>

        <item>
                <title>Developing Opera Extensions: My first problem</title>
                <description>&lt;p&gt;Last night I wrote a post about my experience developing my first extension for Opera, and everything went pretty smooth.&lt;/p&gt;
&lt;p&gt;Today, I faced a new problem, I changed my code because it was breaking down the internal working of the websites (e.g. the mighty Youtube, and MSDN login.)&lt;/p&gt;
&lt;p&gt;The bugs seem to be:&lt;/p&gt;
&lt;p&gt;&quot;A package with this name already exists. Please change the name or upgrade the existing package.&quot;&lt;/p&gt;
&lt;p&gt;Apparently, there seems to be a bug that doesn&apos;t delete files from the server, yet shows me that I successfully deleted the extension.&lt;/p&gt;
&lt;p&gt;I posted a new topic on dev.opera.com forums, and hopefully this will be fixed soon.&lt;/p&gt;
</description>
                <link>/experience/opera%20extension/problem/2012/08/05/developing-opera-extensions-my-first-problem-3/</link>
                <guid>/experience/opera%20extension/problem/2012/08/05/developing-opera-extensions-my-first-problem-3</guid>
                <pubDate>Sun, 05 Aug 2012 08:03:05 +0000</pubDate>
        </item>

        <item>
                <title>Developing Opera Extensions: My first experience</title>
                <description>&lt;p&gt;Everytime I see a link someone posts without the anchor tag, I, being the lazy one, always wonder if it is possible to make that link clickable. Obviously, if a link is posted, it ought to be clicked. Does the author assume we, &quot;The lazy ones&quot; would actually copy paste the entire thing, open a new tab, paste the link and hit enter and get back to the old page the link was opened from and complete reading it?&lt;/p&gt;
&lt;p&gt;If the answer is yes, that link must be pointing to one heck of a page that moves my world, or else it might subtly, very subtly, enter my list of, what I call, &quot;Links I can do without.&quot;&lt;/p&gt;
&lt;p&gt;Lemme show you what I mean.&lt;/p&gt;
&lt;p&gt;http://www.google.com&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://www.google.com&quot;&gt;http://www.google.com&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Which one is better? I prefer the one that is clickable, I&apos;d middle click on it and send it to a background tab in my Opera.&lt;/p&gt;
&lt;p&gt;So, today I finally completed the first version of my Opera Extension, LinkMoi. What does it do? It makes the non-clickable links/Uri clickable. And if you visit phpBB forums, this might be your lucky day. Most of them have a common rule, &quot;all links must be coded.&quot; Well, these links aren&apos;t clickable-just coded, so if you want to open it select it (or click &apos;select all&apos;) and add it to the address bar.&lt;/p&gt;
&lt;p&gt;With LinkMoi, the link becomes clickable, just click and open. Simple.&lt;br /&gt;
(I know Linkify was developed for this, and it has been there for a while...My intention was to implement one myself.)&lt;/p&gt;
&lt;p&gt;I wrote a simple javascript to convert all the urls to clickable links, this wasn&apos;t hard. I created a button, whose onclick event calls the function that does this job.&lt;/p&gt;
&lt;p&gt;Click, and BINGO! Click again and.&lt;br /&gt;
.&lt;br /&gt;
.&lt;br /&gt;
.&lt;br /&gt;
WTF!&lt;br /&gt;
http://www.google.com becomes http://www.google.com&quot;&amp;gt;http://www.google.com.&lt;/p&gt;
&lt;p&gt;and I click again.. WTF!x2&lt;br /&gt;
http://www.google.com&quot;&amp;gt;http://www.google.com becomes http://www.google.com&quot;&amp;gt;http://www.google.com&quot;&amp;gt;http://www.google.com.&lt;/p&gt;
&lt;p&gt;As you might have guessed, href=&quot;http://www.google.com&quot; also gets converted. I will not go into my trials and errors, certainly, &lt;em&gt;I don&apos;t really enjoy talking about my mistakes :)&lt;/em&gt; What I did was to skip those links that followed &apos;&amp;gt;&apos; symbol. Genius, eh? (Hang on, read the next few lines before answering that.)&lt;/p&gt;
&lt;p&gt;Once I fixed it, I copied the source of a website I use often and used it in my test page.&lt;em&gt; Didn&apos;t work.&lt;/em&gt; Check the source and found, the link was wrapped around the &apos;span&apos; tag.&lt;/p&gt;
&lt;p&gt;So much for a genius thought!&lt;/p&gt;
&lt;p&gt;I tried catching the &apos;&quot;&apos; along with the link (using [&quot;]? regex) and skip the link which was contained in &apos;&quot;&apos; as they are the ones causing troubles. So, I had to skip a few links in the regex search, as every href=&quot;http://...&quot;&amp;gt; lead to 3 false results:&lt;/p&gt;
&lt;p&gt;href=&lt;strong&gt;&quot;http://...&lt;/strong&gt;&quot;&amp;gt;http://&lt;br /&gt;
href=&quot;&lt;strong&gt;http://...&lt;/strong&gt;&quot;&amp;gt;http://&lt;br /&gt;
href=&quot;http://...&quot;&amp;gt;&lt;strong&gt;http://&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;So, I skipped 3 links. Worked.&lt;em&gt; Excellent job, I said to myself.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;So I made the extension, zipped and renamed it to LinkMoi.oex and began testing. I found out that some links were being skipped, and the header of a page showed a &apos;url&apos; it wasn&apos;t supposed to.&lt;/p&gt;
&lt;p&gt;I digged a little deeper, looked at the source. What I found did another damage to my &quot;Geniusness.&quot; Links were also present as part of the images and in that case I recieved only 2 false positives:&lt;/p&gt;
&lt;p&gt;src=&lt;strong&gt;&quot;http://&lt;/strong&gt;&quot;&amp;gt;&lt;br /&gt;
src=&quot;&lt;strong&gt;http://&lt;/strong&gt;&quot;&amp;gt;&lt;/p&gt;
&lt;p&gt;So skipping 3 meant I certainly was missing a few links.&lt;br /&gt;
&lt;em&gt;Darn!&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;To fix it, I took a piece of paper and pen, and actually wrote down the possible ways in which links could be posted in a website, between &lt;em&gt;&apos;span&apos;, in &apos;src&apos;, in &apos;href&apos;, as &apos;url&apos;, &apos;action&apos;,&lt;/em&gt; etc. So I checked the 9 character substring preceding the link and checked for these keywords, if found skip the links accordingly. And as a default check anything which has &apos;=&apos; in the last two characters is skipped.&lt;/p&gt;
&lt;p&gt;Bingo! Works. Checked on a few phpBB forums, MSDN, wordpress and everything works just fine.&lt;/p&gt;
&lt;p&gt;So here it is, my first experience developing an Opera Extension. Here&apos;s the link to the extension: &lt;a href=&quot;https://addons.opera.com/en/extensions/details/linkmoi/?display=en&quot;&gt;https://addons.opera.com/en/extensions/details/linkmoi/?display=en&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;If you want to develop your own extension: &lt;a href=&quot;http://dev.opera.com/articles/view/hands-on-building-an-opera-extension/&quot;&gt;http://dev.opera.com/articles/view/hands-on-building-an-opera-extension/&lt;/a&gt;&lt;/p&gt;
</description>
                <link>/experience/javascript/linkstatic/opera%20extension/2012/08/04/developing-opera-extensions-my-first-experience/</link>
                <guid>/experience/javascript/linkstatic/opera%20extension/2012/08/04/developing-opera-extensions-my-first-experience</guid>
                <pubDate>Sat, 04 Aug 2012 12:47:55 +0000</pubDate>
        </item>

        <item>
                <title>The GlitterText class</title>
                <description>&lt;p&gt;In my earlier post, I created a simple app where one can create a form with the desired string glittering in different colours.&lt;br /&gt;
&lt;a href=&quot;http://corneringeki.wordpress.com/2012/02/25/writing-a-simple-text-that-glitters/&quot; title=&quot;Writing a Simple Text that glitters&quot;&gt;Writing a Simple Text that glitters&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Now I have created a class to make this a little more flexible, i.e. this class can now be used to add glittering text to any control that inherits from System.Windows.Forms.Control.&lt;/p&gt;
&lt;p&gt;&lt;font size=&quot;3&quot;&gt;&lt;/p&gt;
&lt;p&gt;using System;&lt;br /&gt;
using System.Drawing;&lt;/p&gt;
&lt;p&gt;public class GlitterText&lt;br /&gt;
{&lt;br /&gt;
    private string strGlitterText;&lt;br /&gt;
    private System.Windows.Forms.Control GlitterControl;&lt;br /&gt;
    private System.Timers.Timer GlitterTime;&lt;br /&gt;
    private int X, Y,GlitterInterval;&lt;br /&gt;
    public GlitterText(String _text,System.Windows.Forms.Control _GlitterControl,int _X=0,int _Y=0,int _GlitterInterval=100)&lt;br /&gt;
	{&lt;br /&gt;
        this.strGlitterText = _text;&lt;br /&gt;
        this.GlitterControl = _GlitterControl;&lt;br /&gt;
        this.X = _X;&lt;br /&gt;
        this.Y = _Y;&lt;br /&gt;
        this.GlitterInterval = _GlitterInterval;&lt;br /&gt;
        InitialiseGlitterTimer();&lt;br /&gt;
	}&lt;br /&gt;
    private void InitialiseGlitterTimer()&lt;br /&gt;
    {&lt;br /&gt;
        this.GlitterTime = new System.Timers.Timer(this.GlitterInterval);&lt;br /&gt;
        this.GlitterTime.AutoReset = true;&lt;br /&gt;
        this.GlitterTime.Elapsed += new System.Timers.ElapsedEventHandler(GlitterControl_Paint);&lt;br /&gt;
        this.GlitterTime.Start();&lt;br /&gt;
    }&lt;br /&gt;
    private void GlitterControl_Paint(object sender,EventArgs ea)&lt;br /&gt;
    {&lt;/p&gt;
&lt;p&gt;        try&lt;br /&gt;
        {&lt;br /&gt;
            Random r = new Random(DateTime.Now.Millisecond);&lt;br /&gt;
            Brush mybrush = new SolidBrush(Color.FromArgb(r.Next(255), r.Next(255), r.Next(255)));&lt;br /&gt;
            Graphics g = this.GlitterControl.CreateGraphics();&lt;br /&gt;
            g.DrawString(this.strGlitterText, new Font(&quot;Times New Roman&quot;, 14F), mybrush, new Point(this.X, this.Y));&lt;br /&gt;
        }&lt;br /&gt;
        catch { }&lt;/p&gt;
&lt;p&gt;    }&lt;br /&gt;
}&lt;/p&gt;
&lt;p&gt;&lt;/font&gt;&lt;/p&gt;
</description>
                <link>/c%23/tutorial/2012/02/21/the-glittertext-class/</link>
                <guid>/c%23/tutorial/2012/02/21/the-glittertext-class</guid>
                <pubDate>Tue, 21 Feb 2012 01:06:08 +0000</pubDate>
        </item>

        <item>
                <title>Writing a Simple Text that glitters</title>
                <description>&lt;p&gt;A few days ago I was trying to create a text with different colours, and suddenly I had an idea; Why not create a text that changes colours randomly to produce a glittering effect...&lt;/p&gt;
&lt;p&gt;All I needed was:&lt;br /&gt;
1. A timer,&lt;br /&gt;
2. A Random number to fill the rgb,&lt;br /&gt;
3. An event handler that would paint the form everytime the timer ticked.&lt;/p&gt;
&lt;p&gt;This is a simple program, and does not require any explanations, whatsoever.&lt;br /&gt;
&lt;code&gt;&lt;br /&gt;
&lt;font size=&quot;3&quot;&gt;&lt;br /&gt;
public partial class Form1 : Form&lt;br /&gt;
    {&lt;br /&gt;
        public Form1()&lt;br /&gt;
        {&lt;/p&gt;
&lt;p&gt;            InitializeComponent();&lt;/p&gt;
&lt;p&gt;        }&lt;/p&gt;
&lt;p&gt;        private string strGlitterText;       &lt;/p&gt;
&lt;p&gt;        private void Form1_Paint(object sender,EventArgs e)&lt;br /&gt;
        {&lt;/p&gt;
&lt;p&gt;                Random r = new Random(DateTime.Now.Millisecond);&lt;br /&gt;
                Brush mybrush = new SolidBrush(Color.FromArgb(r.Next(255), r.Next(255), r.Next(255)));&lt;br /&gt;
                try&lt;br /&gt;
                {&lt;br /&gt;
                    this.strGlitterText = &quot;Glitter&quot;;&lt;br /&gt;
                    Graphics g = this.CreateGraphics();&lt;br /&gt;
                    g.DrawString(this.strGlitterText, new Font(&quot;Times New Roman&quot;, 14F), mybrush, new Point(30, 30));&lt;br /&gt;
                }&lt;br /&gt;
                catch (Exception f)&lt;br /&gt;
                { }&lt;/p&gt;
&lt;p&gt;        }&lt;/p&gt;
&lt;p&gt;    }&lt;/p&gt;
&lt;p&gt;namespace GlitterText&lt;br /&gt;
{&lt;br /&gt;
    partial class Form1&lt;br /&gt;
    {&lt;br /&gt;
        ///&lt;br /&gt;
&lt;summary&gt;
        /// Required designer variable.&lt;br /&gt;
        /// &lt;/summary&gt;
&lt;p&gt;        private System.ComponentModel.IContainer components = null;&lt;/p&gt;
&lt;p&gt;        ///&lt;br /&gt;
&lt;summary&gt;
        /// Clean up any resources being used.&lt;br /&gt;
        /// &lt;/summary&gt;
&lt;p&gt;        /// true if managed resources should be disposed; otherwise, false.&lt;br /&gt;
        protected override void Dispose(bool disposing)&lt;br /&gt;
        {&lt;br /&gt;
            if (disposing &amp;amp;&amp;amp; (components != null))&lt;br /&gt;
            {&lt;br /&gt;
                components.Dispose();&lt;br /&gt;
            }&lt;br /&gt;
            base.Dispose(disposing);&lt;br /&gt;
        }&lt;/p&gt;
&lt;p&gt;        #region Windows Form Designer generated code&lt;/p&gt;
&lt;p&gt;        ///&lt;br /&gt;
&lt;summary&gt;
        /// Required method for Designer support - do not modify&lt;br /&gt;
        /// the contents of this method with the code editor.&lt;br /&gt;
        /// &lt;/summary&gt;
&lt;p&gt;        private void InitializeComponent()&lt;br /&gt;
        {&lt;br /&gt;
            this.components = new System.ComponentModel.Container();&lt;br /&gt;
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;&lt;/p&gt;
&lt;p&gt;            //Timer to change the colour of the text&lt;br /&gt;
            this.GlitterTime = new System.Timers.Timer(10);&lt;br /&gt;
            //Repaint the form window when the timer ticks&lt;br /&gt;
            this.GlitterTime.Elapsed += new System.Timers.ElapsedEventHandler(Form1_Paint);&lt;br /&gt;
            this.GlitterTime.AutoReset = true;&lt;br /&gt;
            this.GlitterTime.Start();&lt;/p&gt;
&lt;p&gt;            this.Text = &quot;Glitter&quot;;&lt;/p&gt;
&lt;p&gt;            this.ClientSize = new System.Drawing.Size(1280, 1024);&lt;br /&gt;
            //Whenever repainting is required, the same event is called.&lt;br /&gt;
            this.Paint+=new System.Windows.Forms.PaintEventHandler(Form1_Paint);&lt;br /&gt;
        }&lt;/p&gt;
&lt;p&gt;        #endregion&lt;br /&gt;
        private System.Timers.Timer GlitterTime;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;/p&gt;
&lt;p&gt;&lt;/font&gt;&lt;br /&gt;
&lt;/code&gt;&lt;br /&gt;
[caption id=&quot;attachment_25&quot; align=&quot;aligncenter&quot; width=&quot;300&quot; caption=&quot;Purple Colour&quot;]&lt;a href=&quot;http://corneringeki.azurewebsites.net/wp-content/uploads/2012/03/glitter1.jpg&quot;&gt;&lt;img src=&quot;/assets/glitter1.jpg?w=300&quot; alt=&quot;Glittering text&quot; title=&quot;Glitter1&quot; width=&quot;300&quot; height=&quot;168&quot; class=&quot;size-medium wp-image-25&quot; /&gt;&lt;/a&gt;[/caption][caption id=&quot;attachment_26&quot; align=&quot;aligncenter&quot; width=&quot;300&quot; caption=&quot;Green Colour&quot;]&lt;a href=&quot;http://corneringeki.azurewebsites.net/wp-content/uploads/2012/03/glitter2.jpg&quot;&gt;&lt;img src=&quot;/assets/glitter2.jpg?w=300&quot; alt=&quot;Glittering text&quot; title=&quot;Glitter screenshot&quot; width=&quot;300&quot; height=&quot;168&quot; class=&quot;size-medium wp-image-26&quot; /&gt;&lt;/a&gt;[/caption]&lt;/p&gt;
&lt;p&gt;I have created a library to add this text to any UI control, and providing the position of the text or to center it by default.&lt;/p&gt;
&lt;p&gt;Happy Coding,&lt;br /&gt;
Eklavya Mirani&lt;/p&gt;
</description>
                <link>/c%23/tutorial/2012/01/27/writing-a-simple-text-that-glitters/</link>
                <guid>/c%23/tutorial/2012/01/27/writing-a-simple-text-that-glitters</guid>
                <pubDate>Fri, 27 Jan 2012 23:06:10 +0000</pubDate>
        </item>

        <item>
                <title>Writing you first &quot;Hello World&quot; application using C#</title>
                <description>&lt;p&gt;Hey,&lt;/p&gt;
&lt;p&gt;This post will give you a simple tutorial on how to write a simple &quot;Hello World&quot; application using C#.&lt;/p&gt;
&lt;p&gt;To start programming with C#, you need a compiler that can compile the code into the machine language that the computer can understand.&lt;/p&gt;
&lt;p&gt;Anyway, getting to the point, in this article I will explain how to write your simple hello world console application using C#.&lt;/p&gt;
&lt;p&gt;Here&apos;s what you need:&lt;br /&gt;
Visual Studio 2008/2010 Express(freely available) or higher&lt;br /&gt;
or MonoDevelop&lt;br /&gt;
or #Develop (SharpDevelop)&lt;/p&gt;
&lt;p&gt;All of the above three tools are freely available on the internet and in case you have trouble looking for it, try asking your friend Google for help.&lt;/p&gt;
&lt;p&gt;Now that we have the tool to get started, lets start:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;using System;&lt;/p&gt;
&lt;p&gt;namespace MyFirstCSProgram&lt;/p&gt;
&lt;p&gt;{&lt;/p&gt;
&lt;p&gt;class MyFirstCSProgram&lt;/p&gt;
&lt;p&gt;{&lt;/p&gt;
&lt;p&gt;static void Main(string[] args)&lt;/p&gt;
&lt;p&gt;{&lt;/p&gt;
&lt;p&gt;//Prints whatever is passed to it on the console.&lt;/p&gt;
&lt;p&gt;Console.WriteLine(&quot;Hello World, This is Eklavya!&quot;);&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;There you go, a very simple &quot;Hello World&quot; console app is ready!&lt;/p&gt;&lt;/blockquote&gt;
</description>
                <link>/c%23/tutorial/2012/01/18/writing-you-first-hello-world-application-using-c/</link>
                <guid>/c%23/tutorial/2012/01/18/writing-you-first-hello-world-application-using-c</guid>
                <pubDate>Wed, 18 Jan 2012 04:42:28 +0000</pubDate>
        </item>


</channel>
</rss>
