<?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>Private: Code &#38; Script Snippet</title>
	<atom:link href="http://dev.kratik.net/index.php/feed/" rel="self" type="application/rss+xml" />
	<link>http://dev.kratik.net</link>
	<description>Every thing you imagin, study it - know it - use it</description>
	<lastBuildDate>Thu, 24 Jun 2010 08:30:01 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Solve using multiple iFrames with Firefox</title>
		<link>http://dev.kratik.net/index.php/2010/06/24/solve-using-multiple-iframes-with-firefox/</link>
		<comments>http://dev.kratik.net/index.php/2010/06/24/solve-using-multiple-iframes-with-firefox/#comments</comments>
		<pubDate>Thu, 24 Jun 2010 08:28:48 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[HTML]]></category>

		<guid isPermaLink="false">http://dev.kratik.net/?p=894</guid>
		<description><![CDATA[<p>change closing tag from</p>
<p>&#60;iframe &#8230;&#8230; /&#62;</p>
<p>to</p>
<p>&#60;iframe &#8230;&#8230;&#62;&#60;/iframe&#62;</p>
<p>It might be that firefox assumes an iframe has content, and therefore  doesn&#8217;t consider the tag closed.</p>
]]></description>
			<content:encoded><![CDATA[<p>change closing tag from</p>
<p>&lt;iframe &#8230;&#8230; /&gt;</p>
<p>to</p>
<p><span style="color: #ff0000;">&lt;iframe &#8230;&#8230;&gt;&lt;/iframe&gt;</span></p>
<p>It might be that firefox assumes an iframe has content, and therefore  doesn&#8217;t consider the tag closed.</p>
]]></content:encoded>
			<wfw:commentRss>http://dev.kratik.net/index.php/2010/06/24/solve-using-multiple-iframes-with-firefox/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Automatic Property is the default snippet VS2008</title>
		<link>http://dev.kratik.net/index.php/2010/05/05/automatic-property-is-the-default-snippet-vs2008/</link>
		<comments>http://dev.kratik.net/index.php/2010/05/05/automatic-property-is-the-default-snippet-vs2008/#comments</comments>
		<pubDate>Wed, 05 May 2010 16:26:16 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Visual studio 2008]]></category>

		<guid isPermaLink="false">http://dev.kratik.net/?p=890</guid>
		<description><![CDATA[<p>Type prop and hit &#8220;tab&#8221; twice, this will bring the automatic property
</p>
]]></description>
			<content:encoded><![CDATA[<p><span style="font-family: Verdana; font-size: x-small;">Type prop and hit &#8220;tab&#8221; twice, this will bring the automatic property<br />
</span></p>
]]></content:encoded>
			<wfw:commentRss>http://dev.kratik.net/index.php/2010/05/05/automatic-property-is-the-default-snippet-vs2008/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Change GMap2 cursor after initialization</title>
		<link>http://dev.kratik.net/index.php/2010/05/04/change-gmap2-cursor-after-initialization/</link>
		<comments>http://dev.kratik.net/index.php/2010/05/04/change-gmap2-cursor-after-initialization/#comments</comments>
		<pubDate>Tue, 04 May 2010 03:28:02 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Google map]]></category>

		<guid isPermaLink="false">http://dev.kratik.net/?p=888</guid>
		<description><![CDATA[<p>On GMap2 seem map.getDragObject().setDraggableCursor(&#8221;crosshair&#8221;);  not work on firefox</p>
<p>solution is here:</p>
<p>http://www.teohuiming.name/toydimap/sandbox/change-map-cursor.html</p>
]]></description>
			<content:encoded><![CDATA[<p>On GMap2 seem map.getDragObject().setDraggableCursor(&#8221;crosshair&#8221;);  not work on firefox</p>
<p>solution is here:</p>
<p>http://www.teohuiming.name/toydimap/sandbox/change-map-cursor.html</p>
]]></content:encoded>
			<wfw:commentRss>http://dev.kratik.net/index.php/2010/05/04/change-gmap2-cursor-after-initialization/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Add .flv file type in IIS</title>
		<link>http://dev.kratik.net/index.php/2010/05/03/add-flv-file-type-in-iis/</link>
		<comments>http://dev.kratik.net/index.php/2010/05/03/add-flv-file-type-in-iis/#comments</comments>
		<pubDate>Mon, 03 May 2010 13:08:05 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[OTHER]]></category>

		<guid isPermaLink="false">http://dev.kratik.net/?p=886</guid>
		<description><![CDATA[<p>Because by default, IIS does not support FLV or Flash video files.</p>
<p>fix by:</p>
<p>1) Select the site to configure in IIS, right click and select &#8220;Properties&#8221;
2) Under HTTP Headers Tab, select &#8220;File Types&#8221; under the MIME Map section and select &#8220;New Type&#8221;
3) Type &#8220;.flv&#8221; as the associated extension and &#8220;video/x-flv&#8221; as the content type.
4) Select &#8220;OK&#8221;</p>
]]></description>
			<content:encoded><![CDATA[<p>Because by default, IIS does not support FLV or Flash video files.</p>
<p>fix by:</p>
<p>1) Select the site to configure in IIS, right click and select &#8220;Properties&#8221;<br />
2) Under HTTP Headers Tab, select &#8220;File Types&#8221; under the MIME Map section and select &#8220;New Type&#8221;<br />
3) Type &#8220;.flv&#8221; as the associated extension and &#8220;video/x-flv&#8221; as the content type.<br />
4) Select &#8220;OK&#8221;</p>
]]></content:encoded>
			<wfw:commentRss>http://dev.kratik.net/index.php/2010/05/03/add-flv-file-type-in-iis/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Change mouse type in Google map api</title>
		<link>http://dev.kratik.net/index.php/2010/04/30/change-mouse-type-in-google-map-api/</link>
		<comments>http://dev.kratik.net/index.php/2010/04/30/change-mouse-type-in-google-map-api/#comments</comments>
		<pubDate>Fri, 30 Apr 2010 10:05:54 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[ASP.NET 3.5]]></category>

		<guid isPermaLink="false">http://dev.kratik.net/?p=881</guid>
		<description><![CDATA[<p>// GMap2</p>
<p>function changeMouse()
{
map.getDragObject().setDraggableCursor(&#8221;crosshair&#8221;);</p>
<p>}</p>
<p>function resetMouse()
{
map.getDragObject().setDraggableCursor(&#8221;");
}</p>
<p>ref: http://econym.org.uk/gmap/cursors.htm</p>
<p>// old version</p>
<p>function changeMouse()
{
map.setOptions({ draggableCursor: &#8216;crosshair&#8217; });
}</p>
<p>function resetMouse()
{
map.setOptions({ draggableCursor: &#8221; });
}</p>
<p>ref: http://stackoverflow.com/questions/2557679/how-do-i-change-the-mouse-cursor-when-i-mouseover-on-a-particular-area-in-google</p>
]]></description>
			<content:encoded><![CDATA[<p>// GMap2</p>
<p>function changeMouse()<br />
{<br />
map.getDragObject().setDraggableCursor(&#8221;crosshair&#8221;);</p>
<p>}</p>
<p>function resetMouse()<br />
{<br />
map.getDragObject().setDraggableCursor(&#8221;");<br />
}</p>
<p>ref: http://econym.org.uk/gmap/cursors.htm</p>
<p>// old version</p>
<p>function changeMouse()<br />
{<br />
map.setOptions({ draggableCursor: &#8216;crosshair&#8217; });<br />
}</p>
<p>function resetMouse()<br />
{<br />
map.setOptions({ draggableCursor: &#8221; });<br />
}</p>
<p>ref: http://stackoverflow.com/questions/2557679/how-do-i-change-the-mouse-cursor-when-i-mouseover-on-a-particular-area-in-google</p>
]]></content:encoded>
			<wfw:commentRss>http://dev.kratik.net/index.php/2010/04/30/change-mouse-type-in-google-map-api/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Remove array from index (javascript)</title>
		<link>http://dev.kratik.net/index.php/2010/04/30/remove-array-from-index-javascript/</link>
		<comments>http://dev.kratik.net/index.php/2010/04/30/remove-array-from-index-javascript/#comments</comments>
		<pubDate>Fri, 30 Apr 2010 10:05:05 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[ASP.NET 3.5]]></category>

		<guid isPermaLink="false">http://dev.kratik.net/?p=879</guid>
		<description><![CDATA[<p>for (var i = overlayPlacemarkTemp.length-1;  i &#62;= 0; i&#8211;)
{
if (overlayPlacemarkTemp[i].getIcon().image.indexOf(pt) != -1)
{
// map === remove overlay
myGMap.removeOverlay(overlayPlacemarkTemp[i]);
// remove []
overlayPlacemark.remove(i);
//overlayPlacemarkTemp.length = overlayPlacemarkTemp.length &#8211; 1;
}
}</p>
]]></description>
			<content:encoded><![CDATA[<p>for (var i = overlayPlacemarkTemp.length-1;  i &gt;= 0; i&#8211;)<br />
{<br />
if (overlayPlacemarkTemp[i].getIcon().image.indexOf(pt) != -1)<br />
{<br />
// map === remove overlay<br />
myGMap.removeOverlay(overlayPlacemarkTemp[i]);<br />
// remove []<br />
overlayPlacemark.remove(i);<br />
//overlayPlacemarkTemp.length = overlayPlacemarkTemp.length &#8211; 1;<br />
}<br />
}</p>
]]></content:encoded>
			<wfw:commentRss>http://dev.kratik.net/index.php/2010/04/30/remove-array-from-index-javascript/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Add, remove elements from javascript array</title>
		<link>http://dev.kratik.net/index.php/2010/04/24/add-remove-elements-from-javascript-array/</link>
		<comments>http://dev.kratik.net/index.php/2010/04/24/add-remove-elements-from-javascript-array/#comments</comments>
		<pubDate>Sat, 24 Apr 2010 09:57:07 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[JAVASCRIPT]]></category>

		<guid isPermaLink="false">http://dev.kratik.net/?p=877</guid>
		<description><![CDATA[<p>var arr = [1,2,3];</p>
<p>arr.push(4); //Adds new elements to the end of an array, and returns the new length, result arr = [1,2,3,4];
arr.pop(); //Removes the last element of an array, and returns that element, result arr = [1,2];
arr.length = 0; // remove all element</p>
]]></description>
			<content:encoded><![CDATA[<p>var arr = [1,2,3];</p>
<p>arr.push(4); //Adds new elements to the end of an array, and returns the new length, result arr = [1,2,3,4];<br />
arr.pop(); //Removes the last element of an array, and returns that element, result arr = [1,2];<br />
arr.length = 0; // <strong><span style="color: #ff0000;">remove all element</span></strong></p>
]]></content:encoded>
			<wfw:commentRss>http://dev.kratik.net/index.php/2010/04/24/add-remove-elements-from-javascript-array/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Set dropdownlist</title>
		<link>http://dev.kratik.net/index.php/2010/03/15/set-dropdownlist/</link>
		<comments>http://dev.kratik.net/index.php/2010/03/15/set-dropdownlist/#comments</comments>
		<pubDate>Mon, 15 Mar 2010 10:56:31 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[JAVASCRIPT]]></category>

		<guid isPermaLink="false">http://dev.kratik.net/?p=874</guid>
		<description><![CDATA[<p>function setDropDownList(elementRef, valueToSetTo)
{
    var isFound = false;</p>
<p>    for (var i = 0; i < elementRef.options.length; i++)
    {
        if (elementRef.options[i].value == valueToSetTo)
        {
           [...]]]></description>
			<content:encoded><![CDATA[<p>function setDropDownList(elementRef, valueToSetTo)<br />
{<br />
    var isFound = false;</p>
<p>    for (var i = 0; i < elementRef.options.length; i++)<br />
    {<br />
        if (elementRef.options[i].value == valueToSetTo)<br />
        {<br />
            elementRef.options[i].selected = true;<br />
            isFound = true;<br />
        }<br />
    }</p>
<p>    if (isFound == false)<br />
        elementRef.options[0].selected = true;</p>
<p>}</p>
]]></content:encoded>
			<wfw:commentRss>http://dev.kratik.net/index.php/2010/03/15/set-dropdownlist/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Add, remove event in Google map</title>
		<link>http://dev.kratik.net/index.php/2010/03/15/add-remove-event-in-google-map/</link>
		<comments>http://dev.kratik.net/index.php/2010/03/15/add-remove-event-in-google-map/#comments</comments>
		<pubDate>Mon, 15 Mar 2010 10:54:46 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Google map]]></category>

		<guid isPermaLink="false">http://dev.kratik.net/?p=871</guid>
		<description><![CDATA[<p>// add </p>
<p>var map = new GMap2(document.getElementById(&#8221;map&#8221;));
map.setCenter(new GLatLng(37.4419, -122.1419), 13);
GEvent.addListener(map, &#8220;click&#8221;, function() {
  alert(&#8221;You clicked the map.&#8221;);
});</p>
<p>// remove</p>
<p>function MyApplication() {
  this.counter = 0;
  this.map = new GMap2(document.getElementById(&#8221;map&#8221;));
  this.map.setCenter(new GLatLng(37.4419, -122.1419), 13);
  var myEventListener = GEvent.bind(this.map, &#8220;click&#8221;, this, function(overlay, latlng) {
    if (this.counter == 0) {
   [...]]]></description>
			<content:encoded><![CDATA[<p>// add </p>
<p>var map = new GMap2(document.getElementById(&#8221;map&#8221;));<br />
map.setCenter(new GLatLng(37.4419, -122.1419), 13);<br />
GEvent.addListener(map, &#8220;click&#8221;, function() {<br />
  alert(&#8221;You clicked the map.&#8221;);<br />
});</p>
<p>// remove</p>
<p>function MyApplication() {<br />
  this.counter = 0;<br />
  this.map = new GMap2(document.getElementById(&#8221;map&#8221;));<br />
  this.map.setCenter(new GLatLng(37.4419, -122.1419), 13);<br />
  var myEventListener = GEvent.bind(this.map, &#8220;click&#8221;, this, function(overlay, latlng) {<br />
    if (this.counter == 0) {<br />
      if (latlng) {<br />
        this.map.addOverlay(new GMarker(latlng))<br />
        this.counter++;<br />
      } else if (overlay instanceof GMarker) {<br />
        this.removeOverlay(marker)<br />
      }<br />
    } else {<br />
      GEvent.removeListener(myEventListener);<br />
    }<br />
  });<br />
}</p>
<p>ref: http://code.google.com/intl/th-TH/apis/maps/documentation/events.html</p>
]]></content:encoded>
			<wfw:commentRss>http://dev.kratik.net/index.php/2010/03/15/add-remove-event-in-google-map/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>String.Format() In JavaScript like C#</title>
		<link>http://dev.kratik.net/index.php/2010/03/15/string-format-in-javascript-like-c/</link>
		<comments>http://dev.kratik.net/index.php/2010/03/15/string-format-in-javascript-like-c/#comments</comments>
		<pubDate>Mon, 15 Mar 2010 10:47:50 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[JAVASCRIPT]]></category>

		<guid isPermaLink="false">http://dev.kratik.net/?p=868</guid>
		<description><![CDATA[<p>function StringFormat(str)
{</p>
<p>    for (i = 1; i < arguments.length; i++)
    {
        str = str.replace(&#8217;{&#8217; + (i &#8211; 1) + &#8216;}&#8217;, arguments[i]);
    }
    return str;
}</p>
<p>example using:
var greeting = format(‘Hello {0} &#038; {1} ‘, ‘John’, ‘Jane’);</p>
<p>ref: http://xneuron.wordpress.com/2006/09/29/stringformat-in-javascript-as-in-c/</p>
]]></description>
			<content:encoded><![CDATA[<p>function StringFormat(str)<br />
{</p>
<p>    for (i = 1; i < arguments.length; i++)<br />
    {<br />
        str = str.replace(&#8217;{&#8217; + (i &#8211; 1) + &#8216;}&#8217;, arguments[i]);<br />
    }<br />
    return str;<br />
}</p>
<p>example using:<br />
var greeting = format(‘Hello {0} &#038; {1} ‘, ‘John’, ‘Jane’);</p>
<p>ref: http://xneuron.wordpress.com/2006/09/29/stringformat-in-javascript-as-in-c/</p>
]]></content:encoded>
			<wfw:commentRss>http://dev.kratik.net/index.php/2010/03/15/string-format-in-javascript-like-c/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
