<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>.NET Tips and Tricks &#187; google</title>
	<atom:link href="http://kossovsky.net/index.php/tag/google/feed/" rel="self" type="application/rss+xml" />
	<link>http://kossovsky.net</link>
	<description>C# Code Snippets, ASP.NET Code Samples, .NET Tips and Tricks</description>
	<lastBuildDate>Sat, 25 Dec 2010 08:32:05 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1</generator>
		<item>
		<title>Programming humor</title>
		<link>http://kossovsky.net/index.php/2010/04/computer-programming-humor-jokes/</link>
		<comments>http://kossovsky.net/index.php/2010/04/computer-programming-humor-jokes/#comments</comments>
		<pubDate>Fri, 02 Apr 2010 15:57:50 +0000</pubDate>
		<dc:creator>Xander</dc:creator>
				<category><![CDATA[Humor]]></category>
		<category><![CDATA[code software]]></category>
		<category><![CDATA[comments]]></category>
		<category><![CDATA[dec 25]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[http www google com]]></category>
		<category><![CDATA[jit]]></category>
		<category><![CDATA[jokes]]></category>
		<category><![CDATA[kilobyte]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[programming humor]]></category>
		<category><![CDATA[rest of your life]]></category>
		<category><![CDATA[software developers]]></category>
		<category><![CDATA[world administrator]]></category>

		<guid isPermaLink="false">http://kossovsky.net/?p=819</guid>
		<description><![CDATA[Programming is like sex. One mistake and you have to support it for the rest of your life Why do programmers always mix up Halloween and Christmas? Because Oct 31 equals Dec 25. Deliver yesterday, code today, think tomorrow. Debugging is twice as hard as writing the code in the first place. Therefore, if you [...]<br /><div><img src="http://kossovsky.net/wp-content/plugins/gd-star-rating/gfx.php?value=5.0" /></div><div>Rating: 5.0/<strong>5</strong> (7 votes cast)</div><br /><a target="_blank" href="http://www.gdstarrating.com/"><img src="http://kossovsky.net/wp-content/plugins/gd-star-rating/gfx/powered.png" border="0" width="80" height="15" /></a><br />]]></description>
			<content:encoded><![CDATA[<p>Programming is like sex. One mistake and you have to support it for the rest of your life</p>
<p><span id="more-819"></span></p>
<hr />
Why do programmers always mix up Halloween and Christmas?<br />
Because Oct 31 equals Dec 25. </p>
<hr/>
Deliver yesterday, code today, think tomorrow.</p>
<hr/>
Debugging is twice as hard as writing the code in the first place.  Therefore, if you write the code as cleverly as possible, you are–by definition–not smart enough to debug it.</p>
<hr/>
Any code of your own that you haven’t looked at for six or more months might as well have been written by someone else</p>
<hr/>
Software is like sex: It’s better when it’s free.</p>
<hr/>
The trouble with programmers is that you can never tell what a programmer is doing until it’s too late</p>
<hr/>
Q: Whats the object-oriented way to become wealthy?<br />
A: Inheritance</p>
<hr/>
Unix is user friendly. It&#8217;s just very particular about who its friends are</p>
<hr/>
Did you mean: recursion<br />
<a href="http://www.google.com/search?hl=en&#038;q=recursion" target="_blank">http://www.google.com/search?hl=en&#038;q=recursion</a></p>
<hr/>
Q: What is the difference between a programmer and a non-programmer ?<br />
A: The non-programmer thinks a kilobyte is 1000 bytes while a programmer is convinced that a kilometer is 1024 meters </p>
<hr/>
I&#8217;d like to make the world a better place, but they won&#8217;t give me the source code.</p>
<hr/>
Software developers like to solve problems. If there are no problems handily available, they will create their own problems.</p>
<hr/>
There&#8217;s no place like 127.0.0.1</p>
<hr/>
Q: Why did the programmer quit his job?<br />
A: Because he didn&#8217;t get arrays.</p>
<hr/>
A good programmer is someone who looks both ways before crossing a one-way street</p>
<hr/>
Q: What&#8217;s the difference between Software Development and Sex?<br />
A: In sex, you don&#8217;t get a bonus for releasing early.</p>
<hr/>
Documentation is like sex. When it&#8217;s good, it&#8217;s very good. When it&#8217;s bad, it&#8217;s better than nothing.</p>
<hr/>
The shortest programmer joke: I&#8217;m nearly done</p>
<hr/>
JIT Happens! </p>
<hr/>
There are two types of people in this world those who understand recursion and those who don&#8217;t understand that there are two types of people in this world..</p>
<hr/>
Administrator = Admin is traitor</p>
<hr/>
Programmer&#8217;s son asks his father: Dad, why do the sun rise on the east and set on the west?<br />
Father: It works? don&#8217;t touch it.</p>
<hr/>
Q: Why don&#8217;t programmers pray?<br />
A: They don&#8217;t like throwing null pointer exceptions!</p>
<hr/>
In C++, your friends can see your privates</p>
<p><strong>Funniest source code comments</strong> :</p>
<pre class="c-sharp" name="code">
// Dear maintainer:
// Once you are done trying to 'optimize' this routine,
// and have realized what a terrible mistake that was,
// please increment the following counter as a warning
// to the next guy:
// total_hours_wasted_here = 13
</pre>
<pre class="c-sharp" name="code">
// When I wrote this, only God and I understood what I was doing
// Now, God only knows
</pre>
<pre class="c-sharp" name="code">
// I'm sorry.
</pre>
<pre class="c-sharp" name="code">
// Always returns true.
public boolean isAvailable() {
    return false;
}
</pre>
<pre class="c-sharp" name="code">
// You are not meant to understand this
</pre>
<pre class="c-sharp" name="code">
// I am not sure if we need this, but too scared to delete.
</pre>
<pre class="c-sharp" name="code">
// Dear future me. Please forgive me.
// I can't even begin to express how sorry I am.
</pre>
<pre class="c-sharp" name="code">
double penetration; // ouch
</pre>
<pre class="c-sharp" name="code">
// Mr. Compiler, please do not read this.
</pre>
<pre class="c-sharp" name="code">
// Hard to explain
</pre>
<pre class="c-sharp" name="code">
// Empty constructor to satisfy the stupid compiler
</pre>
<pre class="c-sharp" name="code">
public GetRandomNumber()
{
    // Chosen by a fairly rolen dice
    // guaranteed to be random
    return 3;
}
</pre>
<pre class="c-sharp" name="code">
// DON'T SCREW WITH THIS CODE UNLESS YOU REALLY UNDERSTAND IT!
</pre>
<br /><div><img src="http://kossovsky.net/wp-content/plugins/gd-star-rating/gfx.php?value=5.0" /></div><div>Rating: 5.0/<strong>5</strong> (7 votes cast)</div><br /><a target="_blank" href="http://www.gdstarrating.com/"><img src="http://kossovsky.net/wp-content/plugins/gd-star-rating/gfx/powered.png" border="0" width="80" height="15" /></a><br />
<p class="FacebookLikeButton"><fb:like href="http%3A%2F%2Fkossovsky.net%2Findex.php%2F2010%2F04%2Fcomputer-programming-humor-jokes%2F" layout="standard" show_faces="false" width="450" action="like" colorscheme="light"></fb:like></p>
]]></content:encoded>
			<wfw:commentRss>http://kossovsky.net/index.php/2010/04/computer-programming-humor-jokes/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Google in your house</title>
		<link>http://kossovsky.net/index.php/2009/07/google-in-your-house/</link>
		<comments>http://kossovsky.net/index.php/2009/07/google-in-your-house/#comments</comments>
		<pubDate>Mon, 13 Jul 2009 11:36:31 +0000</pubDate>
		<dc:creator>Xander</dc:creator>
				<category><![CDATA[Humor]]></category>
		<category><![CDATA[episode 1]]></category>
		<category><![CDATA[episode 2]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[hilarious]]></category>
		<category><![CDATA[house style]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[roommates]]></category>
		<category><![CDATA[video]]></category>
		<category><![CDATA[youtube]]></category>

		<guid isPermaLink="false">http://kossovsky.net/?p=622</guid>
		<description><![CDATA[I just can't help it and must post this one... It's hilarious !!!<br /><div><img src="http://kossovsky.net/wp-content/plugins/gd-star-rating/gfx.php?value=4.7" /></div><div>Rating: 4.7/<strong>5</strong> (25 votes cast)</div><br /><a target="_blank" href="http://www.gdstarrating.com/"><img src="http://kossovsky.net/wp-content/plugins/gd-star-rating/gfx/powered.png" border="0" width="80" height="15" /></a><br />]]></description>
			<content:encoded><![CDATA[<p>I just can&#8217;t help it and must post this one&#8230; It&#8217;s hilarious !!! </p>
<p>Episode 1 :<br />
<object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/9RDe2Ia6YlM&#038;color1=0xb1b1b1&#038;color2=0xcfcfcf&#038;feature=player_embedded&#038;fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowScriptAccess" value="always"></param><embed src="http://www.youtube.com/v/9RDe2Ia6YlM&#038;color1=0xb1b1b1&#038;color2=0xcfcfcf&#038;feature=player_embedded&#038;fs=1" type="application/x-shockwave-flash" allowfullscreen="true" allowScriptAccess="always" width="425" height="344"></embed></object></p>
<p>Two more episodes.. <span id="more-622"></span></p>
<p><script type="text/javascript"><!--
google_ad_client = "pub-8641104387522529";
/* 468x60 Google in your house */
google_ad_slot = "3721054778";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
<p>Episode 2 :<br />
<object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/Bvcoy5SHU84&#038;color1=0xb1b1b1&#038;color2=0xcfcfcf&#038;feature=player_embedded&#038;fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowScriptAccess" value="always"></param><embed src="http://www.youtube.com/v/Bvcoy5SHU84&#038;color1=0xb1b1b1&#038;color2=0xcfcfcf&#038;feature=player_embedded&#038;fs=1" type="application/x-shockwave-flash" allowfullscreen="true" allowScriptAccess="always" width="425" height="344"></embed></object></p>
<p>Episode 3 :<br />
<object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/F8xZEBudhhs&#038;color1=0xb1b1b1&#038;color2=0xcfcfcf&#038;feature=player_embedded&#038;fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowScriptAccess" value="always"></param><embed src="http://www.youtube.com/v/F8xZEBudhhs&#038;color1=0xb1b1b1&#038;color2=0xcfcfcf&#038;feature=player_embedded&#038;fs=1" type="application/x-shockwave-flash" allowfullscreen="true" allowScriptAccess="always" width="425" height="344"></embed></object></p>
<div>
<script type="text/javascript">
var dzone_url = 'http://kossovsky.net/index.php/2009/07/google-in-your-house/';
var dzone_style = '1';
</script><br />
<script language="javascript" src="http://widgets.dzone.com/links/widgets/zoneit.js"></script>
</div>
<br /><div><img src="http://kossovsky.net/wp-content/plugins/gd-star-rating/gfx.php?value=4.7" /></div><div>Rating: 4.7/<strong>5</strong> (25 votes cast)</div><br /><a target="_blank" href="http://www.gdstarrating.com/"><img src="http://kossovsky.net/wp-content/plugins/gd-star-rating/gfx/powered.png" border="0" width="80" height="15" /></a><br />
<p class="FacebookLikeButton"><fb:like href="http%3A%2F%2Fkossovsky.net%2Findex.php%2F2009%2F07%2Fgoogle-in-your-house%2F" layout="standard" show_faces="false" width="450" action="like" colorscheme="light"></fb:like></p>
]]></content:encoded>
			<wfw:commentRss>http://kossovsky.net/index.php/2009/07/google-in-your-house/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>IE Memory Leak &#8211; jQuery Fix</title>
		<link>http://kossovsky.net/index.php/2009/07/ie-memory-leak-jquery-garbage-collector/</link>
		<comments>http://kossovsky.net/index.php/2009/07/ie-memory-leak-jquery-garbage-collector/#comments</comments>
		<pubDate>Sat, 11 Jul 2009 08:37:12 +0000</pubDate>
		<dc:creator>Xander</dc:creator>
				<category><![CDATA[HTML]]></category>
		<category><![CDATA[Internet Explorer]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[UI]]></category>
		<category><![CDATA[filter selector]]></category>
		<category><![CDATA[garbage collector]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[html contents]]></category>
		<category><![CDATA[html elements]]></category>
		<category><![CDATA[IE6]]></category>
		<category><![CDATA[IE7]]></category>
		<category><![CDATA[IE8]]></category>
		<category><![CDATA[javascript functions]]></category>
		<category><![CDATA[jQuery Plugin]]></category>
		<category><![CDATA[JS]]></category>
		<category><![CDATA[memory]]></category>
		<category><![CDATA[memory leak]]></category>
		<category><![CDATA[memory leaks]]></category>
		<category><![CDATA[nyromodal]]></category>
		<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[virtual memory]]></category>

		<guid isPermaLink="false">http://kossovsky.net/?p=489</guid>
		<description><![CDATA[I suppose all of you have suffered all those terrible memory leaks in Internet Explorer. Sometimes it&#8217;s bearable, but most of the time it&#8217;s not. I say enough is enough ! A couple of days ago, I had to create some web application with a very rich client side UI. It worked like a charm [...]<br /><div><img src="http://kossovsky.net/wp-content/plugins/gd-star-rating/gfx.php?value=4.3" /></div><div>Rating: 4.3/<strong>5</strong> (16 votes cast)</div><br /><a target="_blank" href="http://www.gdstarrating.com/"><img src="http://kossovsky.net/wp-content/plugins/gd-star-rating/gfx/powered.png" border="0" width="80" height="15" /></a><br />]]></description>
			<content:encoded><![CDATA[<p>I suppose all of you have suffered all those terrible memory leaks in Internet Explorer.<br />
Sometimes it&#8217;s bearable, but most of the time it&#8217;s not. I say enough is enough !</p>
<p><span id="more-489"></span></p>
<p>A couple of days ago, I had to create some web application with a very rich client side UI.<br />
It worked like a charm in Google Chrome, Firefox&#8230; but IE7, after few dozens of nyroModal popups it just went dead. </p>
<p>Most of the styles are gone, JavaScript functions began to throw exceptions till it just stoped working, decided it can&#8217;t tolerate this kind of abuse any more and closed it self without any warning.</p>
<p>The first thing i did is to open Performance Monitor and what I see&#8230; every nyroModal popup i open cost me about 5Mb, so after a few clicks my IE7 virtual memory was about 789Mb. Terrifying, isn&#8217;t it ?</p>
<p><img src="http://kossovsky.net/wp-content/uploads/2009/07/IE7MemoryLeak.gif" alt="IE7 Memory Leak" title="IE7 Memory Leak" width="426" height="130" class="size-full wp-image-490" /></p>
<p>I&#8217;ve searched a bit and found the source of this problem was in one (of many) memory leaks IE7 proudly has &#8211; cleaning memory for removed HTML elements.</p>
<p>And now the fix.</p>
<p>1). Open your jQuery.js and find the next lines of code</p>
<pre class="javascript" name="code">
    jQuery.extend({
        cache: {},
</pre>
<p>and add new function &#8220;discardElement&#8221;</p>
<pre class="javascript" name="code">
    jQuery.extend({
        cache: {},

        discardElement: function(element) {
            var jqGCID = 'jqGarbageCollector';
            var jqGC = document.getElementById(jqGCID);
            if (!jqGC) {
                jqGC = document.createElement('div');
                jqGC.id = jqGCID;
                jqGC.style.display = 'none';
                document.body.appendChild(jqGC);
            }

            // place the element to the Garbage Collector
            // and clear it's HTML contents
            jqGC.appendChild(element);
            jqGC.innerHTML = '';
        },
</pre>
<p>2). Find the next lines of code in the opened jquery.js </p>
<pre class="javascript" name="code">
	remove: function( selector ) {
		if ( !selector || jQuery.filter( selector, [ this ] ).length ) {
			// Prevent memory leaks
			jQuery( "*", this ).add([this]).each(function(){
				jQuery.event.remove(this);
				jQuery.removeData(this);
			});
			if (this.parentNode)
				this.parentNode.removeChild( this );
		}
	},
</pre>
<p>and replace &#8220;this.parentNode.removeChild( this );&#8221;<br />
with &#8220;jQuery.discardElement(this);&#8221;</p>
<pre class="javascript" name="code">
	remove: function( selector ) {
		if ( !selector || jQuery.filter( selector, [ this ] ).length ) {
			// Prevent memory leaks
			jQuery( "*", this ).add([this]).each(function(){
				jQuery.event.remove(this);
				jQuery.removeData(this);
			});
			if (this.parentNode)
				// this.parentNode.removeChild( this );
				jQuery.discardElement(this);
		}
	},
</pre>
<p>That&#8217;s it, now you (and every plugin) can do $(&#8216;element&#8217;).remove() without being worry IE will eat all of your memory.</p>
<br /><div><img src="http://kossovsky.net/wp-content/plugins/gd-star-rating/gfx.php?value=4.3" /></div><div>Rating: 4.3/<strong>5</strong> (16 votes cast)</div><br /><a target="_blank" href="http://www.gdstarrating.com/"><img src="http://kossovsky.net/wp-content/plugins/gd-star-rating/gfx/powered.png" border="0" width="80" height="15" /></a><br />
<p class="FacebookLikeButton"><fb:like href="http%3A%2F%2Fkossovsky.net%2Findex.php%2F2009%2F07%2Fie-memory-leak-jquery-garbage-collector%2F" layout="standard" show_faces="false" width="450" action="like" colorscheme="light"></fb:like></p>
]]></content:encoded>
			<wfw:commentRss>http://kossovsky.net/index.php/2009/07/ie-memory-leak-jquery-garbage-collector/feed/</wfw:commentRss>
		<slash:comments>51</slash:comments>
		</item>
	</channel>
</rss>

