<?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>Drawyan&#039;s Blog</title>
	<atom:link href="http://blog.drawyan.com/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://blog.drawyan.com</link>
	<description></description>
	<lastBuildDate>Thu, 12 Apr 2012 18:09:53 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Good javascript tools</title>
		<link>http://blog.drawyan.com/?p=133</link>
		<comments>http://blog.drawyan.com/?p=133#comments</comments>
		<pubDate>Thu, 12 Apr 2012 18:09:53 +0000</pubDate>
		<dc:creator>Drawyan</dc:creator>
				<category><![CDATA[Misc]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://blog.drawyan.com/?p=133</guid>
		<description><![CDATA[<p>ppk cookie plugin, http://www.quirksmode.org/js/cookies.html<br /> jQuery BBQ, back button &#038; query, http://benalman.com/news/2010/04/cooking-bbq-the-original-recipe/<br /> jQuery urlInternal plugin, http://benalman.com/projects/jquery-urlinternal-plugin/</p>]]></description>
			<content:encoded><![CDATA[<p>ppk cookie plugin, http://www.quirksmode.org/js/cookies.html<br />
jQuery BBQ, back button &#038; query, http://benalman.com/news/2010/04/cooking-bbq-the-original-recipe/<br />
jQuery urlInternal plugin, http://benalman.com/projects/jquery-urlinternal-plugin/</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.drawyan.com/?feed=rss2&#038;p=133</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Good stuff for conducting a phone screen</title>
		<link>http://blog.drawyan.com/?p=128</link>
		<comments>http://blog.drawyan.com/?p=128#comments</comments>
		<pubDate>Wed, 14 Mar 2012 22:15:09 +0000</pubDate>
		<dc:creator>Drawyan</dc:creator>
				<category><![CDATA[Misc]]></category>
		<category><![CDATA[java]]></category>

		<guid isPermaLink="false">http://blog.drawyan.com/?p=128</guid>
		<description><![CDATA[<p>https://sites.google.com/site/steveyegge2/five-essential-phone-screen-questions</p> <p>Good stuff for conducting a phone screen</p>]]></description>
			<content:encoded><![CDATA[<p>https://sites.google.com/site/steveyegge2/five-essential-phone-screen-questions</p>
<p>Good stuff for conducting a phone screen</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.drawyan.com/?feed=rss2&#038;p=128</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Awesome Browser and OS detection in javascript</title>
		<link>http://blog.drawyan.com/?p=126</link>
		<comments>http://blog.drawyan.com/?p=126#comments</comments>
		<pubDate>Tue, 28 Feb 2012 23:26:37 +0000</pubDate>
		<dc:creator>Drawyan</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[browser]]></category>
		<category><![CDATA[detection]]></category>
		<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://blog.drawyan.com/?p=126</guid>
		<description><![CDATA[<p>Awesome Browser and OS detection in javascript.</p> <p>var BrowserDetect = {<br /> init: function () {<br /> this.browser = this.searchString(this.dataBrowser) &#124;&#124; "An unknown browser";<br /> this.version = this.searchVersion(navigator.userAgent)<br /> &#124;&#124; this.searchVersion(navigator.appVersion)<br /> &#124;&#124; "an unknown version";<br /> this.OS = this.searchString(this.dataOS) &#124;&#124; "an unknown OS";<br /> },<br /> searchString: function (data) {<br /> for (var i=0;i]]></description>
			<content:encoded><![CDATA[<p>Awesome Browser and OS detection in javascript.</p>
<p><code>var BrowserDetect = {<br />
	init: function () {<br />
		this.browser = this.searchString(this.dataBrowser) || "An unknown browser";<br />
		this.version = this.searchVersion(navigator.userAgent)<br />
			|| this.searchVersion(navigator.appVersion)<br />
			|| "an unknown version";<br />
		this.OS = this.searchString(this.dataOS) || "an unknown OS";<br />
	},<br />
	searchString: function (data) {<br />
		for (var i=0;i<data .length;i++)	{<br />
			var dataString = data[i].string;<br />
			var dataProp = data[i].prop;<br />
			this.versionSearchString = data[i].versionSearch || data[i].identity;<br />
			if (dataString) {<br />
				if (dataString.indexOf(data[i].subString) != -1)<br />
					return data[i].identity;<br />
			}<br />
			else if (dataProp)<br />
				return data[i].identity;<br />
		}<br />
	},<br />
	searchVersion: function (dataString) {<br />
		var index = dataString.indexOf(this.versionSearchString);<br />
		if (index == -1) return;<br />
		return parseFloat(dataString.substring(index+this.versionSearchString.length+1));<br />
	},<br />
	dataBrowser: [<br />
		{<br />
			string: navigator.userAgent,<br />
			subString: "Chrome",<br />
			identity: "Chrome"<br />
		},<br />
		{ 	string: navigator.userAgent,<br />
			subString: "OmniWeb",<br />
			versionSearch: "OmniWeb/",<br />
			identity: "OmniWeb"<br />
		},<br />
		{<br />
			string: navigator.vendor,<br />
			subString: "Apple",<br />
			identity: "Safari",<br />
			versionSearch: "Version"<br />
		},<br />
		{<br />
			prop: window.opera,<br />
			identity: "Opera",<br />
			versionSearch: "Version"<br />
		},<br />
		{<br />
			string: navigator.vendor,<br />
			subString: "iCab",<br />
			identity: "iCab"<br />
		},<br />
		{<br />
			string: navigator.vendor,<br />
			subString: "KDE",<br />
			identity: "Konqueror"<br />
		},<br />
		{<br />
			string: navigator.userAgent,<br />
			subString: "Firefox",<br />
			identity: "Firefox"<br />
		},<br />
		{<br />
			string: navigator.vendor,<br />
			subString: "Camino",<br />
			identity: "Camino"<br />
		},<br />
		{		// for newer Netscapes (6+)<br />
			string: navigator.userAgent,<br />
			subString: "Netscape",<br />
			identity: "Netscape"<br />
		},<br />
		{<br />
			string: navigator.userAgent,<br />
			subString: "MSIE",<br />
			identity: "Explorer",<br />
			versionSearch: "MSIE"<br />
		},<br />
		{<br />
			string: navigator.userAgent,<br />
			subString: "Gecko",<br />
			identity: "Mozilla",<br />
			versionSearch: "rv"<br />
		},<br />
		{ 		// for older Netscapes (4-)<br />
			string: navigator.userAgent,<br />
			subString: "Mozilla",<br />
			identity: "Netscape",<br />
			versionSearch: "Mozilla"<br />
		}<br />
	],<br />
	dataOS : [<br />
		{<br />
			string: navigator.platform,<br />
			subString: "Win",<br />
			identity: "Windows"<br />
		},<br />
		{<br />
			string: navigator.platform,<br />
			subString: "Mac",<br />
			identity: "Mac"<br />
		},<br />
		{<br />
			   string: navigator.userAgent,<br />
			   subString: "iPhone",<br />
			   identity: "iPhone/iPod"<br />
	    },<br />
		{<br />
			string: navigator.platform,<br />
			subString: "Linux",<br />
			identity: "Linux"<br />
		}<br />
	]</p>
<p>};<br />
BrowserDetect.init();</code></data></code></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.drawyan.com/?feed=rss2&#038;p=126</wfw:commentRss>
		<slash:comments>40</slash:comments>
		</item>
		<item>
		<title>Some good lib for java</title>
		<link>http://blog.drawyan.com/?p=123</link>
		<comments>http://blog.drawyan.com/?p=123#comments</comments>
		<pubDate>Mon, 09 Jan 2012 18:56:22 +0000</pubDate>
		<dc:creator>Drawyan</dc:creator>
				<category><![CDATA[Misc]]></category>
		<category><![CDATA[java]]></category>

		<guid isPermaLink="false">http://blog.drawyan.com/?p=123</guid>
		<description><![CDATA[<p>cglib: Auto Code Generation tool<br /> Objenesis: Instantiate a new object of a particular class, even without public constructor.<br /> EasyMock: Great tool for unit test, just specify the output yourself.</p>]]></description>
			<content:encoded><![CDATA[<p>cglib: Auto Code Generation tool<br />
Objenesis: Instantiate a new object of a particular class, even without public constructor.<br />
EasyMock: Great tool for unit test, just specify the output yourself.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.drawyan.com/?feed=rss2&#038;p=123</wfw:commentRss>
		<slash:comments>40</slash:comments>
		</item>
		<item>
		<title>JUnit Test Using Reflection</title>
		<link>http://blog.drawyan.com/?p=121</link>
		<comments>http://blog.drawyan.com/?p=121#comments</comments>
		<pubDate>Thu, 29 Dec 2011 01:09:54 +0000</pubDate>
		<dc:creator>Drawyan</dc:creator>
				<category><![CDATA[Misc]]></category>
		<category><![CDATA[java unit test]]></category>

		<guid isPermaLink="false">http://blog.drawyan.com/?p=121</guid>
		<description><![CDATA[<p>For those private fields and methods, it&#8217;s a common practice, and seems only way to test using reflection.</p> <p>Here&#8217;s a good reference: http://en.wikibooks.org/wiki/Java_Programming/Reflection/Accessing_Private_Features_with_Reflection</p>]]></description>
			<content:encoded><![CDATA[<p>For those private fields and methods, it&#8217;s a common practice, and seems only way to test using reflection.</p>
<p>Here&#8217;s a good reference: http://en.wikibooks.org/wiki/Java_Programming/Reflection/Accessing_Private_Features_with_Reflection</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.drawyan.com/?feed=rss2&#038;p=121</wfw:commentRss>
		<slash:comments>51</slash:comments>
		</item>
		<item>
		<title>Unit Testing Mock Object</title>
		<link>http://blog.drawyan.com/?p=119</link>
		<comments>http://blog.drawyan.com/?p=119#comments</comments>
		<pubDate>Thu, 15 Dec 2011 00:00:08 +0000</pubDate>
		<dc:creator>Drawyan</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[Mock]]></category>
		<category><![CDATA[Unit test]]></category>

		<guid isPermaLink="false">http://blog.drawyan.com/?p=119</guid>
		<description><![CDATA[<p>EasyMock is a good resource for mocking up objects in unit testing.</p>]]></description>
			<content:encoded><![CDATA[<p>EasyMock is a good resource for mocking up objects in unit testing.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.drawyan.com/?feed=rss2&#038;p=119</wfw:commentRss>
		<slash:comments>41</slash:comments>
		</item>
		<item>
		<title>Checking bytes transferred in http client</title>
		<link>http://blog.drawyan.com/?p=117</link>
		<comments>http://blog.drawyan.com/?p=117#comments</comments>
		<pubDate>Wed, 14 Dec 2011 23:58:28 +0000</pubDate>
		<dc:creator>Drawyan</dc:creator>
				<category><![CDATA[Coding]]></category>

		<guid isPermaLink="false">http://blog.drawyan.com/?p=117</guid>
		<description><![CDATA[<p>Checking the progress of the http client transferring bytes, we could override the write/writeTo method in the Entity Class, which basic do the real reading and writing bytes. </p> <p><br /> import java.io.FilterOutputStream;<br /> import java.io.IOException;<br /> import java.io.OutputStream;<br /> import org.apache.commons.httpclient.methods.RequestEntity;</p> <p>public class CountingMultipartRequestEntity implements RequestEntity {<br /> private final RequestEntity delegate;</p> <p> private [...]]]></description>
			<content:encoded><![CDATA[<p>Checking the progress of the http client transferring bytes, we could override the write/writeTo method in the Entity Class, which basic do the real reading and writing bytes. </p>
<p><code><br />
import java.io.FilterOutputStream;<br />
import java.io.IOException;<br />
import java.io.OutputStream;<br />
import org.apache.commons.httpclient.methods.RequestEntity;</p>
<p>public class CountingMultipartRequestEntity implements RequestEntity {<br />
    private final RequestEntity delegate;</p>
<p>    private final ProgressListener listener;</p>
<p>    public CountingMultipartRequestEntity(final RequestEntity entity,<br />
            final ProgressListener listener) {<br />
        super();<br />
        this.delegate = entity;<br />
        this.listener = listener;<br />
    }</p>
<p>    public long getContentLength() {<br />
        return this.delegate.getContentLength();<br />
    }</p>
<p>    public String getContentType() {<br />
        return this.delegate.getContentType();<br />
    }</p>
<p>    public boolean isRepeatable() {<br />
        return this.delegate.isRepeatable();<br />
    }</p>
<p>    public void writeRequest(final OutputStream out) throws IOException {<br />
        this.delegate.writeRequest(new CountingOutputStream(out, this.listener));<br />
    }</p>
<p>    public static interface ProgressListener {<br />
        void transferred(long num);<br />
    }</p>
<p>    public static class CountingOutputStream extends FilterOutputStream {</p>
<p>        private final ProgressListener listener;</p>
<p>        private long transferred;</p>
<p>        public CountingOutputStream(final OutputStream out,<br />
                final ProgressListener listener) {<br />
            super(out);<br />
            this.listener = listener;<br />
            this.transferred = 0;<br />
        }</p>
<p>        public void write(byte[] b, int off, int len) throws IOException {<br />
            out.write(b, off, len);<br />
            this.transferred += len;<br />
            this.listener.transferred(this.transferred);<br />
        }</p>
<p>        public void write(int b) throws IOException {<br />
            out.write(b);<br />
            this.transferred++;<br />
            this.listener.transferred(this.transferred);<br />
        }<br />
    }<br />
}<br />
</code></p>
<p>Reference: http://stackoverflow.com/questions/254719/file-upload-with-java-with-progress-bar</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.drawyan.com/?feed=rss2&#038;p=117</wfw:commentRss>
		<slash:comments>46</slash:comments>
		</item>
		<item>
		<title>Good Posts for WiX (Windows Installer XML)</title>
		<link>http://blog.drawyan.com/?p=114</link>
		<comments>http://blog.drawyan.com/?p=114#comments</comments>
		<pubDate>Fri, 30 Sep 2011 00:40:41 +0000</pubDate>
		<dc:creator>Drawyan</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Installer]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[WiX]]></category>
		<category><![CDATA[XML]]></category>

		<guid isPermaLink="false">http://blog.drawyan.com/?p=114</guid>
		<description><![CDATA[<p>http://blogs.technet.com/b/alexshev/archive/2008/02/10/from-msi-to-wix.aspx</p>]]></description>
			<content:encoded><![CDATA[<p>http://blogs.technet.com/b/alexshev/archive/2008/02/10/from-msi-to-wix.aspx</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.drawyan.com/?feed=rss2&#038;p=114</wfw:commentRss>
		<slash:comments>37</slash:comments>
		</item>
		<item>
		<title>jQuery Cheat Sheet</title>
		<link>http://blog.drawyan.com/?p=112</link>
		<comments>http://blog.drawyan.com/?p=112#comments</comments>
		<pubDate>Tue, 23 Aug 2011 22:21:24 +0000</pubDate>
		<dc:creator>Drawyan</dc:creator>
				<category><![CDATA[Misc]]></category>
		<category><![CDATA[Cheat Sheet]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://blog.drawyan.com/?p=112</guid>
		<description><![CDATA[<p>http://www.javascripttoolbox.com/jquery/cheatsheet/</p>]]></description>
			<content:encoded><![CDATA[<p>http://www.javascripttoolbox.com/jquery/cheatsheet/</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.drawyan.com/?feed=rss2&#038;p=112</wfw:commentRss>
		<slash:comments>44</slash:comments>
		</item>
		<item>
		<title>Flash Of Content with jQuery slideUp/slideDown</title>
		<link>http://blog.drawyan.com/?p=108</link>
		<comments>http://blog.drawyan.com/?p=108#comments</comments>
		<pubDate>Tue, 23 Aug 2011 22:18:18 +0000</pubDate>
		<dc:creator>Drawyan</dc:creator>
				<category><![CDATA[Misc]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[slide]]></category>

		<guid isPermaLink="false">http://blog.drawyan.com/?p=108</guid>
		<description><![CDATA[<p>From Original Post: </p> <p>http://mattkruse.com/2009/06/11/flash-of-content-with-jquery-slideupslidedown/</p> <p>This is an old issue, but I never looked into it in enough detail to solve it until now.<br /> When using slideUp() and slideDown() in jQuery (and any other animations that animate height) there is often a “flash of content” when the animation starts or stops in IE.<br /> [...]]]></description>
			<content:encoded><![CDATA[<p>From Original Post: </p>
<p>http://mattkruse.com/2009/06/11/flash-of-content-with-jquery-slideupslidedown/</p>
<p>This is an old issue, but I never looked into it in enough detail to solve it until now.<br />
When using slideUp() and slideDown() in jQuery (and any other animations that animate height) there is often a “flash of content” when the animation starts or stops in IE.<br />
Here are the details you might want to know:<br />
IE 6/7 mishandles a style like “overflow:hidden;height:0px;” (which should show nothing) and instead show the entire contents of the object. But ONLY in quirks mode. This is a bug.<br />
When doing a hide animation, jQuery animates to 0, and when doing show, it starts at 0<br />
So when the value of 0 is set inside the animation, the entire content is flashed visibly on the screen, this causing annoyance and potential epileptic seizures.<br />
A ticket was filed with jQuery 2 years ago about this issue: http://dev.jquery.com/ticket/1726<br />
Unfortunately, they changed it to “wontfix” and instead declared that FX animations are not supported in IE6/7 in quirksmode. I consider this to be pretty lazy on the part of the developers, and I’ve seen this attitude several times with regards to problems that are not so obviously solved or outlying cases. It’s disappointing.<br />
I started a thread in the jQuery Dev group about this, so we’ll see if anything comes of it.<br />
Meanwhile, inserting this fix into the page solves the problem:<br />
jQuery.fx.prototype.originalCustom = jQuery.fx.prototype.custom;<br />
jQuery.fx.prototype.custom = function(from,to,unit) {<br />
        if (this.prop==’height’) {<br />
                to = to || 1;<br />
                from = from || 1;<br />
        }<br />
        this.originalCustom(from,to,unit);<br />
}<br />
It’s simple – when the to or from value in the animation is 0, and we’re animating ‘height’, then just go to/from 1 instead. Problem solved.<br />
Hope that helps out at some point in the future when your content is flashing and you can’t figure out why…</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.drawyan.com/?feed=rss2&#038;p=108</wfw:commentRss>
		<slash:comments>48</slash:comments>
		</item>
	</channel>
</rss>

