<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:thr="http://purl.org/syndication/thread/1.0" xml:lang="en" xml:base="http://anandnalya.com/wp-atom.php">
	<title type="text">Anand Nalya</title>
	<subtitle type="text">blog</subtitle>

	<updated>2010-08-23T11:48:16Z</updated>

	<link rel="alternate" type="text/html" href="http://anandnalya.com" />
	<id>http://anandnalya.com/feed/atom/</id>
	

	<generator uri="http://wordpress.org/" version="3.0.1">WordPress</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/AnandNalya" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="anandnalya" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><entry>
		<author>
			<name>anand</name>
						<uri>http://</uri>
					</author>
		<title type="html"><![CDATA[My first Scheme program]]></title>
		<link rel="alternate" type="text/html" href="http://anandnalya.com/2010/08/23/my-first-scheme-program/" />
		<id>http://anandnalya.com/?p=116</id>
		<updated>2010-08-23T11:48:16Z</updated>
		<published>2010-08-23T11:45:58Z</published>
		<category scheme="http://anandnalya.com" term="Codeprix" /><category scheme="http://anandnalya.com" term="programming" /><category scheme="http://anandnalya.com" term="scheme" /><category scheme="http://anandnalya.com" term="sicp" />		<summary type="html"><![CDATA[I&#8217;ve just started experimenting with Scheme, specifically to follow Structure and Interpretation of Computer Programs. Here is a Scheme procedure that returns the sum of squares of two larger numbers out of the given three. 1 2 3 4 5 &#40;define &#40;sumLargeSquare a b c&#41; &#40;cond &#40;&#40;and &#40;&#60; a b&#41; &#40;&#60; a c&#41;&#41; &#40;+ &#40;* [...]]]></summary>
		<content type="html" xml:base="http://anandnalya.com/2010/08/23/my-first-scheme-program/">&lt;p&gt;I&amp;#8217;ve just started experimenting with Scheme, specifically to follow &lt;a href="http://mitpress.mit.edu/sicp/full-text/book/book.html"&gt;Structure and Interpretation of Computer Programs&lt;/a&gt;. Here is a Scheme procedure that returns the sum of squares of two larger numbers out of the given three.&lt;/p&gt;

&lt;div class="wp_syntax"&gt;&lt;table&gt;&lt;tr&gt;&lt;td class="line_numbers"&gt;&lt;pre&gt;1
2
3
4
5
&lt;/pre&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;pre class="scheme" style="font-family:monospace;"&gt;&lt;span style="color: #66cc66;"&gt;&amp;#40;&lt;/span&gt;&lt;span style="color: #b1b100;"&gt;define&lt;/span&gt; &lt;span style="color: #66cc66;"&gt;&amp;#40;&lt;/span&gt;sumLargeSquare a b c&lt;span style="color: #66cc66;"&gt;&amp;#41;&lt;/span&gt;
  &lt;span style="color: #66cc66;"&gt;&amp;#40;&lt;/span&gt;&lt;span style="color: #b1b100;"&gt;cond&lt;/span&gt; &lt;span style="color: #66cc66;"&gt;&amp;#40;&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;&amp;#40;&lt;/span&gt;&lt;span style="color: #b1b100;"&gt;and&lt;/span&gt; &lt;span style="color: #66cc66;"&gt;&amp;#40;&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;&amp;lt;&lt;/span&gt; a b&lt;span style="color: #66cc66;"&gt;&amp;#41;&lt;/span&gt; &lt;span style="color: #66cc66;"&gt;&amp;#40;&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;&amp;lt;&lt;/span&gt; a c&lt;span style="color: #66cc66;"&gt;&amp;#41;&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;&amp;#41;&lt;/span&gt; &lt;span style="color: #66cc66;"&gt;&amp;#40;&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;+&lt;/span&gt; &lt;span style="color: #66cc66;"&gt;&amp;#40;&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;*&lt;/span&gt; b b&lt;span style="color: #66cc66;"&gt;&amp;#41;&lt;/span&gt; &lt;span style="color: #66cc66;"&gt;&amp;#40;&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;*&lt;/span&gt; c c&lt;span style="color: #66cc66;"&gt;&amp;#41;&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;&amp;#41;&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;&amp;#41;&lt;/span&gt;
        &lt;span style="color: #66cc66;"&gt;&amp;#40;&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;&amp;#40;&lt;/span&gt;&lt;span style="color: #b1b100;"&gt;and&lt;/span&gt; &lt;span style="color: #66cc66;"&gt;&amp;#40;&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;&amp;lt;&lt;/span&gt; b a&lt;span style="color: #66cc66;"&gt;&amp;#41;&lt;/span&gt; &lt;span style="color: #66cc66;"&gt;&amp;#40;&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;&amp;lt;&lt;/span&gt; b c&lt;span style="color: #66cc66;"&gt;&amp;#41;&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;&amp;#41;&lt;/span&gt; &lt;span style="color: #66cc66;"&gt;&amp;#40;&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;+&lt;/span&gt; &lt;span style="color: #66cc66;"&gt;&amp;#40;&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;*&lt;/span&gt; a a&lt;span style="color: #66cc66;"&gt;&amp;#41;&lt;/span&gt; &lt;span style="color: #66cc66;"&gt;&amp;#40;&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;*&lt;/span&gt; c c&lt;span style="color: #66cc66;"&gt;&amp;#41;&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;&amp;#41;&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;&amp;#41;&lt;/span&gt;
        &lt;span style="color: #66cc66;"&gt;&amp;#40;&lt;/span&gt;&lt;span style="color: #b1b100;"&gt;else&lt;/span&gt; &lt;span style="color: #66cc66;"&gt;&amp;#40;&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;+&lt;/span&gt; &lt;span style="color: #66cc66;"&gt;&amp;#40;&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;*&lt;/span&gt; a a&lt;span style="color: #66cc66;"&gt;&amp;#41;&lt;/span&gt; &lt;span style="color: #66cc66;"&gt;&amp;#40;&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;*&lt;/span&gt; b b&lt;span style="color: #66cc66;"&gt;&amp;#41;&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;&amp;#41;&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;&amp;#41;&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;&amp;#41;&lt;/span&gt;
&lt;span style="color: #66cc66;"&gt;&amp;#41;&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;

&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/AnandNalya?a=zerGgDlymMI:s1IKmB-JAog:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/AnandNalya?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/AnandNalya?a=zerGgDlymMI:s1IKmB-JAog:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/AnandNalya?i=zerGgDlymMI:s1IKmB-JAog:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/AnandNalya?a=zerGgDlymMI:s1IKmB-JAog:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/AnandNalya?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</content>
		<link rel="replies" type="text/html" href="http://anandnalya.com/2010/08/23/my-first-scheme-program/#comments" thr:count="0" />
		<link rel="replies" type="application/atom+xml" href="http://anandnalya.com/2010/08/23/my-first-scheme-program/feed/atom/" thr:count="0" />
		<thr:total>0</thr:total>
	</entry>
		<entry>
		<author>
			<name>anand</name>
						<uri>http://</uri>
					</author>
		<title type="html"><![CDATA[&#8216;protected&#8217; implementation in Actionscript 3 is BROKEN]]></title>
		<link rel="alternate" type="text/html" href="http://anandnalya.com/2010/06/25/protected-implementation-in-actionscript-in-broken/" />
		<id>http://anandnalya.com/?p=111</id>
		<updated>2010-06-25T14:50:10Z</updated>
		<published>2010-06-25T14:39:07Z</published>
		<category scheme="http://anandnalya.com" term="Codeprix" /><category scheme="http://anandnalya.com" term="actionscript" />		<summary type="html"><![CDATA[Consider following code: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 public class BaseClass&#123; public function modifyProperty&#40;property:String, value:Object&#41;:void&#123; this&#91;property&#93; = value; &#125; &#125; &#160; public class SubClass extends SubClass&#123; protected var count:int; &#125; &#160; public function test&#40;&#41;:void&#123; var testObj:BaseClass = new SubClass&#40;&#41;; testObj.modifyProperty&#40;'count', 3&#41;; &#125; Theoretically, the call at [...]]]></summary>
		<content type="html" xml:base="http://anandnalya.com/2010/06/25/protected-implementation-in-actionscript-in-broken/">&lt;p&gt;Consider following code:&lt;/p&gt;

&lt;div class="wp_syntax"&gt;&lt;table&gt;&lt;tr&gt;&lt;td class="line_numbers"&gt;&lt;pre&gt;1
2
3
4
5
6
7
8
9
10
11
12
13
14
&lt;/pre&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;pre class="actionscript" style="font-family:monospace;"&gt;&lt;span style="color: #0066CC;"&gt;public&lt;/span&gt; &lt;span style="color: #000000; font-weight: bold;"&gt;class&lt;/span&gt; BaseClass&lt;span style="color: #66cc66;"&gt;&amp;#123;&lt;/span&gt;
	&lt;span style="color: #0066CC;"&gt;public&lt;/span&gt; &lt;span style="color: #000000; font-weight: bold;"&gt;function&lt;/span&gt; modifyProperty&lt;span style="color: #66cc66;"&gt;&amp;#40;&lt;/span&gt;property:&lt;span style="color: #0066CC;"&gt;String&lt;/span&gt;, value:&lt;span style="color: #0066CC;"&gt;Object&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;&amp;#41;&lt;/span&gt;:&lt;span style="color: #0066CC;"&gt;void&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;&amp;#123;&lt;/span&gt;
		&lt;span style="color: #0066CC;"&gt;this&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;&amp;#91;&lt;/span&gt;property&lt;span style="color: #66cc66;"&gt;&amp;#93;&lt;/span&gt; = value;
	&lt;span style="color: #66cc66;"&gt;&amp;#125;&lt;/span&gt;
&lt;span style="color: #66cc66;"&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span style="color: #0066CC;"&gt;public&lt;/span&gt; &lt;span style="color: #000000; font-weight: bold;"&gt;class&lt;/span&gt; SubClass &lt;span style="color: #0066CC;"&gt;extends&lt;/span&gt; SubClass&lt;span style="color: #66cc66;"&gt;&amp;#123;&lt;/span&gt;
	protected &lt;span style="color: #000000; font-weight: bold;"&gt;var&lt;/span&gt; count:&lt;span style="color: #0066CC;"&gt;int&lt;/span&gt;;
&lt;span style="color: #66cc66;"&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span style="color: #0066CC;"&gt;public&lt;/span&gt; &lt;span style="color: #000000; font-weight: bold;"&gt;function&lt;/span&gt; test&lt;span style="color: #66cc66;"&gt;&amp;#40;&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;&amp;#41;&lt;/span&gt;:&lt;span style="color: #0066CC;"&gt;void&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;&amp;#123;&lt;/span&gt;
	&lt;span style="color: #000000; font-weight: bold;"&gt;var&lt;/span&gt; testObj:BaseClass = &lt;span style="color: #000000; font-weight: bold;"&gt;new&lt;/span&gt; SubClass&lt;span style="color: #66cc66;"&gt;&amp;#40;&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;&amp;#41;&lt;/span&gt;;
	testObj.&lt;span style="color: #006600;"&gt;modifyProperty&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;&amp;#40;&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;'count'&lt;/span&gt;, &lt;span style="color: #cc66cc;"&gt;3&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;&amp;#41;&lt;/span&gt;;
&lt;span style="color: #66cc66;"&gt;&amp;#125;&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Theoretically, the call at line no. 13 should not cause any error as &lt;code&gt;count&lt;/code&gt; is defined for &lt;/code&gt;testObj&lt;/code&gt; as a field in &lt;code&gt;SubClass&lt;/code&gt;, but it gives a &lt;code&gt;Cannot create property count on SubClass&lt;/code&gt;. Interestingly if we move &lt;code&gt;modifyProperty&lt;/code&gt; method to &lt;code&gt;SubClass&lt;/code&gt; or make &lt;code&gt;count&lt;/code&gt; public, it works without any error.&lt;/p&gt;
&lt;p&gt;So it can be said that we cannot access protected fields dynamically in a subclass.&lt;/p&gt;
&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/AnandNalya?a=jddtDizRnZw:goPkaPwdnWE:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/AnandNalya?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/AnandNalya?a=jddtDizRnZw:goPkaPwdnWE:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/AnandNalya?i=jddtDizRnZw:goPkaPwdnWE:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/AnandNalya?a=jddtDizRnZw:goPkaPwdnWE:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/AnandNalya?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</content>
		<link rel="replies" type="text/html" href="http://anandnalya.com/2010/06/25/protected-implementation-in-actionscript-in-broken/#comments" thr:count="0" />
		<link rel="replies" type="application/atom+xml" href="http://anandnalya.com/2010/06/25/protected-implementation-in-actionscript-in-broken/feed/atom/" thr:count="0" />
		<thr:total>0</thr:total>
	</entry>
		<entry>
		<author>
			<name>anand</name>
						<uri>http://</uri>
					</author>
		<title type="html"><![CDATA[How Facebook (probably) implements SMS threads]]></title>
		<link rel="alternate" type="text/html" href="http://anandnalya.com/2009/11/16/how-facebook-probably-implements-sms-threads/" />
		<id>http://anandnalya.com/2009/11/16/how-facebook-probably-implements-sms-threads/</id>
		<updated>2009-11-16T16:14:05Z</updated>
		<published>2009-11-16T16:14:05Z</published>
		<category scheme="http://anandnalya.com" term="Codeprix" /><category scheme="http://anandnalya.com" term="architecture" /><category scheme="http://anandnalya.com" term="design" /><category scheme="http://anandnalya.com" term="facebook" /><category scheme="http://anandnalya.com" term="sms" /><category scheme="http://anandnalya.com" term="text messages" /><category scheme="http://anandnalya.com" term="threads" />		<summary type="html"><![CDATA[A lot of web applications provides you the ability to receive or post updates using SMS (text messages). Twitter is the posterboy of such applications. But the feature that distinguishes Facebook SMS updates from any other service is that you can actually reply to individual messages and your message then becomes a part of the [...]]]></summary>
		<content type="html" xml:base="http://anandnalya.com/2009/11/16/how-facebook-probably-implements-sms-threads/">&lt;p&gt;A lot of web applications provides you the ability to receive or post updates using SMS (text messages). Twitter is the posterboy of such applications. &lt;/p&gt;
&lt;p&gt;But the feature that distinguishes Facebook SMS updates from any other service is that you can actually reply to individual messages and your message then becomes a part of the aforementioned thread. You don’t have to specify any special command to do so. Just hit the &lt;em&gt;reply&amp;#160; &lt;/em&gt;button and you are done. &lt;/p&gt;
&lt;p&gt;How do they know which message belongs to which thread? Its simple, each message comes from a different number. For example, say A writes something on your wall, then you will receive a message from +91922305501. Also B sends a message to you, a message comes from +91922305502 and when C comments on your note, you get a message from +91922305503. How many numbers do facebook own? Probably 100 in India, from +91922305500 to +9192230599.&amp;#160; A per user mapping of the number from which the message is sent and the object/thread id for that message is kept on the backend. So when the user replies to a particular number, say +91922305502 , it knows that is was a reply to the message sent by B and hence treats as a reply to that message. A rotation policy is used to decide from which number the message is to be sent. So after recieving a message from +9192230599, the next message will be from +91922305500&amp;#160; and now you cannot reply to the thread represented by the earlier message from the same number.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Discalimer:&lt;/em&gt; This is just a guess of how this functionality might have been implemented (or at least how I would implement it) and based strictly on SMSes received in India. Actual implementation might (probaly is) be entierly different from what is explained here.&lt;/p&gt;
&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/AnandNalya?a=kT5TBfWyBQQ:iz6tVWdHuBA:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/AnandNalya?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/AnandNalya?a=kT5TBfWyBQQ:iz6tVWdHuBA:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/AnandNalya?i=kT5TBfWyBQQ:iz6tVWdHuBA:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/AnandNalya?a=kT5TBfWyBQQ:iz6tVWdHuBA:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/AnandNalya?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</content>
		<link rel="replies" type="text/html" href="http://anandnalya.com/2009/11/16/how-facebook-probably-implements-sms-threads/#comments" thr:count="0" />
		<link rel="replies" type="application/atom+xml" href="http://anandnalya.com/2009/11/16/how-facebook-probably-implements-sms-threads/feed/atom/" thr:count="0" />
		<thr:total>0</thr:total>
	</entry>
		<entry>
		<author>
			<name>anand</name>
						<uri>http://</uri>
					</author>
		<title type="html"><![CDATA[Bing/Google toggle bookmarklet]]></title>
		<link rel="alternate" type="text/html" href="http://anandnalya.com/2009/10/06/binggoogle-toggle-bookmarklet/" />
		<id>http://anandnalya.com/?p=100</id>
		<updated>2009-10-06T11:52:43Z</updated>
		<published>2009-10-06T11:49:00Z</published>
		<category scheme="http://anandnalya.com" term="Codeprix" /><category scheme="http://anandnalya.com" term="bing" /><category scheme="http://anandnalya.com" term="bookmarklet" /><category scheme="http://anandnalya.com" term="google" /><category scheme="http://anandnalya.com" term="ie8" /><category scheme="http://anandnalya.com" term="javascript" />		<summary type="html"><![CDATA[I’ve been trying out Bing as my default search engine for last few months and the results are definitely at par with that of Google for most of the consumer categories. But sometimes you just need a quick toggle to see what Google would return for your query. So here is a small bookmarklet that [...]]]></summary>
		<content type="html" xml:base="http://anandnalya.com/2009/10/06/binggoogle-toggle-bookmarklet/">&lt;p&gt;I’ve been trying out &lt;a href="http://bing.com/"&gt;Bing&lt;/a&gt; as my default search engine for last few months and the results are definitely at par with that of Google for most of the consumer categories. But sometimes you just need a quick toggle to see what &lt;a href="http://google.com/"&gt;Google&lt;/a&gt; would return for your query. So here is a small bookmarklet that I wrote that toggles from Bing to Google and vice versa.&lt;/p&gt;
&lt;p&gt;Drag this to you favourites bar: &lt;a href="javascript:if(window.location.hostname.match(/\.bing\./))window.location.hostname='www.google.com';else if(window.location.hostname.match(/\.google\./))window.location.hostname='www.bing.com';"&gt;Bing/Google Toogle&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Note: Its tested on IE8 only. A few tweaks might be required for Firefox.&lt;/p&gt;
&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/AnandNalya?a=vQSjZ9Ropaw:fDga-2p0WMI:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/AnandNalya?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/AnandNalya?a=vQSjZ9Ropaw:fDga-2p0WMI:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/AnandNalya?i=vQSjZ9Ropaw:fDga-2p0WMI:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/AnandNalya?a=vQSjZ9Ropaw:fDga-2p0WMI:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/AnandNalya?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</content>
		<link rel="replies" type="text/html" href="http://anandnalya.com/2009/10/06/binggoogle-toggle-bookmarklet/#comments" thr:count="1" />
		<link rel="replies" type="application/atom+xml" href="http://anandnalya.com/2009/10/06/binggoogle-toggle-bookmarklet/feed/atom/" thr:count="1" />
		<thr:total>1</thr:total>
	</entry>
		<entry>
		<author>
			<name>anand</name>
						<uri>http://</uri>
					</author>
		<title type="html"><![CDATA[Minifying Javascript/css without changing file references in your source]]></title>
		<link rel="alternate" type="text/html" href="http://anandnalya.com/2009/06/05/minifying-javascriptcss-without-changing-file-references-in-your-source/" />
		<id>http://anandnalya.com/?p=79</id>
		<updated>2009-06-05T13:26:24Z</updated>
		<published>2009-06-05T13:21:02Z</published>
		<category scheme="http://anandnalya.com" term="Codeprix" /><category scheme="http://anandnalya.com" term="compression" /><category scheme="http://anandnalya.com" term="compressor" /><category scheme="http://anandnalya.com" term="css" /><category scheme="http://anandnalya.com" term="development" /><category scheme="http://anandnalya.com" term="javascript" /><category scheme="http://anandnalya.com" term="optimization" /><category scheme="http://anandnalya.com" term="performance" /><category scheme="http://anandnalya.com" term="programming" /><category scheme="http://anandnalya.com" term="tools" />		<summary type="html"><![CDATA[Rule 10 of Steve Souders High Performance Web Sites: Minify Javascript The most common problem faced while implemnting this is how you handle the full and minified version and how to change there reference in referencing documents. One of the easier ways to do this is to make it part of the deployment process. Here [...]]]></summary>
		<content type="html" xml:base="http://anandnalya.com/2009/06/05/minifying-javascriptcss-without-changing-file-references-in-your-source/">&lt;p&gt;Rule 10 of Steve Souders High Performance Web Sites: &lt;a href="http://developer.yahoo.net/blog/archives/2007/07/high_performanc_8.html"&gt;Minify Javascript&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The most common problem faced while implemnting this is how you handle the full and minified version and how to change there reference in referencing documents. One of the easier ways to do this is to make it part of the deployment process. &lt;/p&gt;
&lt;p&gt;Here are the relevent steps involved.&lt;/p&gt;
&lt;p&gt;I&amp;#8217;m using &lt;a href="http://developer.yahoo.com/yui/compressor/"&gt;YUI Compressor&lt;/a&gt;.&lt;/p&gt;

&lt;div class="wp_syntax"&gt;&lt;table&gt;&lt;tr&gt;&lt;td class="line_numbers"&gt;&lt;pre&gt;1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
&lt;/pre&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;pre class="bash" style="font-family:monospace;"&gt;&lt;span style="color: #666666; font-style: italic;"&gt;#!/bin/bash&lt;/span&gt;
&amp;nbsp;
&lt;span style="color: #666666; font-style: italic;"&gt;#Execute this script after checking out the latest source from repository.&lt;/span&gt;
&amp;nbsp;
&lt;span style="color: #666666; font-style: italic;"&gt;#Minify all javascript files&lt;/span&gt;
&lt;span style="color: #7a0874; font-weight: bold;"&gt;cd&lt;/span&gt; &lt;span style="color: #000000; font-weight: bold;"&gt;/&lt;/span&gt;path&lt;span style="color: #000000; font-weight: bold;"&gt;/&lt;/span&gt;to&lt;span style="color: #000000; font-weight: bold;"&gt;/&lt;/span&gt;javascript
&lt;span style="color: #000000; font-weight: bold;"&gt;for&lt;/span&gt; x &lt;span style="color: #000000; font-weight: bold;"&gt;in&lt;/span&gt; &lt;span style="color: #000000; font-weight: bold;"&gt;`&lt;/span&gt;&lt;span style="color: #c20cb9; font-weight: bold;"&gt;ls&lt;/span&gt; &lt;span style="color: #000000; font-weight: bold;"&gt;*&lt;/span&gt;.js&lt;span style="color: #000000; font-weight: bold;"&gt;`&lt;/span&gt;
&lt;span style="color: #000000; font-weight: bold;"&gt;do&lt;/span&gt;
        java &lt;span style="color: #660033;"&gt;-jar&lt;/span&gt; &lt;span style="color: #000000; font-weight: bold;"&gt;/&lt;/span&gt;path&lt;span style="color: #000000; font-weight: bold;"&gt;/&lt;/span&gt;to&lt;span style="color: #000000; font-weight: bold;"&gt;/&lt;/span&gt;compressor&lt;span style="color: #000000; font-weight: bold;"&gt;/&lt;/span&gt;yuicompressor-2.4.2.jar &lt;span style="color: #660033;"&gt;-o&lt;/span&gt; &lt;span style="color: #800000;"&gt;${x%%.*}&lt;/span&gt;-min.js &lt;span style="color: #660033;"&gt;--preserve-semi&lt;/span&gt;  &lt;span style="color: #007800;"&gt;$x&lt;/span&gt;
&lt;span style="color: #000000; font-weight: bold;"&gt;done&lt;/span&gt;
&amp;nbsp;
&lt;span style="color: #666666; font-style: italic;"&gt;#Minfiy all css files&lt;/span&gt;
&lt;span style="color: #7a0874; font-weight: bold;"&gt;cd&lt;/span&gt; &lt;span style="color: #000000; font-weight: bold;"&gt;/&lt;/span&gt;path&lt;span style="color: #000000; font-weight: bold;"&gt;/&lt;/span&gt;to&lt;span style="color: #000000; font-weight: bold;"&gt;/&lt;/span&gt;css
&lt;span style="color: #000000; font-weight: bold;"&gt;for&lt;/span&gt; x &lt;span style="color: #000000; font-weight: bold;"&gt;in&lt;/span&gt; &lt;span style="color: #000000; font-weight: bold;"&gt;`&lt;/span&gt;&lt;span style="color: #c20cb9; font-weight: bold;"&gt;ls&lt;/span&gt; &lt;span style="color: #000000; font-weight: bold;"&gt;*&lt;/span&gt;.css&lt;span style="color: #000000; font-weight: bold;"&gt;`&lt;/span&gt;
&lt;span style="color: #000000; font-weight: bold;"&gt;do&lt;/span&gt;
        java &lt;span style="color: #660033;"&gt;-jar&lt;/span&gt; &lt;span style="color: #000000; font-weight: bold;"&gt;/&lt;/span&gt;path&lt;span style="color: #000000; font-weight: bold;"&gt;/&lt;/span&gt;to&lt;span style="color: #000000; font-weight: bold;"&gt;/&lt;/span&gt;compressor&lt;span style="color: #000000; font-weight: bold;"&gt;/&lt;/span&gt;yuicompressor-2.4.2.jar &lt;span style="color: #660033;"&gt;-o&lt;/span&gt; &lt;span style="color: #800000;"&gt;${x%%.*}&lt;/span&gt;-min.css  &lt;span style="color: #007800;"&gt;$x&lt;/span&gt;
&lt;span style="color: #000000; font-weight: bold;"&gt;done&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Now you don&amp;#8217;t want to replace all references to &lt;em&gt;x.css&lt;/em&gt; or &lt;em&gt;x.js&lt;/em&gt; in your development code with references to &lt;em&gt;x-min.css&lt;/em&gt; and &lt;em&gt;x-min.js&lt;/em&gt; respectively. So what you can do is rewrite all those filenames at the web server level.&lt;/p&gt;
&lt;p&gt;For apache the following rewrite rules work fine:&lt;/p&gt;

&lt;div class="wp_syntax"&gt;&lt;table&gt;&lt;tr&gt;&lt;td class="line_numbers"&gt;&lt;pre&gt;1
2
3
4
&lt;/pre&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;pre class="apache" style="font-family:monospace;"&gt;&lt;span style="color: #adadad; font-style: italic;"&gt;#enable rewriting&lt;/span&gt;
&lt;span style="color: #00007f;"&gt;RewriteEngine&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;on&lt;/span&gt;
&lt;span style="color: #00007f;"&gt;RewriteRule&lt;/span&gt; /(.*)\.js /$&lt;span style="color: #ff0000;"&gt;1&lt;/span&gt;-min.js
&lt;span style="color: #00007f;"&gt;RewriteRule&lt;/span&gt; /(.*)\.css /$&lt;span style="color: #ff0000;"&gt;1&lt;/span&gt;-min.css&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;em&gt;Caution:&lt;/em&gt; Remember to delete existing minified css/js file before running the minifying script or you will end up with file names like x-min-min-min.js and so on. One way to do this is to clear the js/css folder before checking out files from your source repository.&lt;/p&gt;
&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/AnandNalya?a=v6WlbxrEyRo:eaV5HLMrEuk:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/AnandNalya?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/AnandNalya?a=v6WlbxrEyRo:eaV5HLMrEuk:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/AnandNalya?i=v6WlbxrEyRo:eaV5HLMrEuk:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/AnandNalya?a=v6WlbxrEyRo:eaV5HLMrEuk:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/AnandNalya?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</content>
		<link rel="replies" type="text/html" href="http://anandnalya.com/2009/06/05/minifying-javascriptcss-without-changing-file-references-in-your-source/#comments" thr:count="0" />
		<link rel="replies" type="application/atom+xml" href="http://anandnalya.com/2009/06/05/minifying-javascriptcss-without-changing-file-references-in-your-source/feed/atom/" thr:count="0" />
		<thr:total>0</thr:total>
	</entry>
		<entry>
		<author>
			<name>anand</name>
						<uri>http://</uri>
					</author>
		<title type="html"><![CDATA[Humanizing the time difference ( in django )]]></title>
		<link rel="alternate" type="text/html" href="http://anandnalya.com/2009/05/20/humanizing-the-time-difference-in-django/" />
		<id>http://anandnalya.com/?p=70</id>
		<updated>2009-05-20T10:03:29Z</updated>
		<published>2009-05-20T10:02:35Z</published>
		<category scheme="http://anandnalya.com" term="Codeprix" /><category scheme="http://anandnalya.com" term="django" /><category scheme="http://anandnalya.com" term="filters" /><category scheme="http://anandnalya.com" term="humanize" /><category scheme="http://anandnalya.com" term="python" />		<summary type="html"><![CDATA[django.contrib.humanize is a set of Django template filters that adds human touch to data. It provides naturalday filter that formats date to &#8216;yesterday&#8217;, &#8216;today&#8217; or &#8216;tomorrow&#8217; when applicable. A similar requirement which the humanize pacakge does not address is to display time difference with this human touch. so here is a snippet that does so. [...]]]></summary>
		<content type="html" xml:base="http://anandnalya.com/2009/05/20/humanizing-the-time-difference-in-django/">&lt;p&gt;&lt;a href="http://docs.djangoproject.com/en/dev/ref/contrib/humanize/#module-django.contrib.humanize"&gt;django.contrib.humanize&lt;/a&gt; is a set of Django template filters that adds human touch to data. It provides &lt;a href="http://docs.djangoproject.com/en/dev/ref/contrib/humanize/#naturalday"&gt;naturalday&lt;/a&gt; filter that formats date to &amp;#8216;yesterday&amp;#8217;, &amp;#8216;today&amp;#8217; or &amp;#8216;tomorrow&amp;#8217; when applicable.&lt;/p&gt;
&lt;p&gt;A similar requirement which the humanize pacakge does not address is to display time difference with this human touch. so here is a snippet that does so.&lt;/p&gt;

&lt;div class="wp_syntax"&gt;&lt;table&gt;&lt;tr&gt;&lt;td class="line_numbers"&gt;&lt;pre&gt;1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
&lt;/pre&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;pre class="python" style="font-family:monospace;"&gt;&lt;span style="color: #ff7700;font-weight:bold;"&gt;from&lt;/span&gt; django &lt;span style="color: #ff7700;font-weight:bold;"&gt;import&lt;/span&gt; template
&amp;nbsp;
register = template.&lt;span style="color: black;"&gt;Library&lt;/span&gt;&lt;span style="color: black;"&gt;&amp;#40;&lt;/span&gt;&lt;span style="color: black;"&gt;&amp;#41;&lt;/span&gt;
&amp;nbsp;
MOMENT = &lt;span style="color: #ff4500;"&gt;120&lt;/span&gt;    &lt;span style="color: #808080; font-style: italic;"&gt;# duration in seconds within which the time difference &lt;/span&gt;
                &lt;span style="color: #808080; font-style: italic;"&gt;# will be rendered as 'a moment ago'&lt;/span&gt;
&amp;nbsp;
@register.&lt;span style="color: #008000;"&gt;filter&lt;/span&gt;
&lt;span style="color: #ff7700;font-weight:bold;"&gt;def&lt;/span&gt; naturalTimeDifference&lt;span style="color: black;"&gt;&amp;#40;&lt;/span&gt;value&lt;span style="color: black;"&gt;&amp;#41;&lt;/span&gt;:
    &lt;span style="color: #483d8b;"&gt;&amp;quot;&amp;quot;&amp;quot;
    Finds the difference between the datetime value given and now()
    and returns appropriate humanize form
    &amp;quot;&amp;quot;&amp;quot;&lt;/span&gt;
&amp;nbsp;
    &lt;span style="color: #ff7700;font-weight:bold;"&gt;from&lt;/span&gt; &lt;span style="color: #dc143c;"&gt;datetime&lt;/span&gt; &lt;span style="color: #ff7700;font-weight:bold;"&gt;import&lt;/span&gt; &lt;span style="color: #dc143c;"&gt;datetime&lt;/span&gt;
&amp;nbsp;
    &lt;span style="color: #ff7700;font-weight:bold;"&gt;if&lt;/span&gt; &lt;span style="color: #008000;"&gt;isinstance&lt;/span&gt;&lt;span style="color: black;"&gt;&amp;#40;&lt;/span&gt;value, &lt;span style="color: #dc143c;"&gt;datetime&lt;/span&gt;&lt;span style="color: black;"&gt;&amp;#41;&lt;/span&gt;:
        delta = &lt;span style="color: #dc143c;"&gt;datetime&lt;/span&gt;.&lt;span style="color: black;"&gt;now&lt;/span&gt;&lt;span style="color: black;"&gt;&amp;#40;&lt;/span&gt;&lt;span style="color: black;"&gt;&amp;#41;&lt;/span&gt; - value
        &lt;span style="color: #ff7700;font-weight:bold;"&gt;if&lt;/span&gt; delta.&lt;span style="color: black;"&gt;days&lt;/span&gt; &lt;span style="color: #66cc66;"&gt;&amp;gt;&lt;/span&gt; &lt;span style="color: #ff4500;"&gt;6&lt;/span&gt;:
            &lt;span style="color: #ff7700;font-weight:bold;"&gt;return&lt;/span&gt; value.&lt;span style="color: black;"&gt;strftime&lt;/span&gt;&lt;span style="color: black;"&gt;&amp;#40;&lt;/span&gt;&lt;span style="color: #483d8b;"&gt;&amp;quot;%b %d&amp;quot;&lt;/span&gt;&lt;span style="color: black;"&gt;&amp;#41;&lt;/span&gt;                    &lt;span style="color: #808080; font-style: italic;"&gt;# May 15&lt;/span&gt;
        &lt;span style="color: #ff7700;font-weight:bold;"&gt;if&lt;/span&gt; delta.&lt;span style="color: black;"&gt;days&lt;/span&gt; &lt;span style="color: #66cc66;"&gt;&amp;gt;&lt;/span&gt; &lt;span style="color: #ff4500;"&gt;1&lt;/span&gt;:
            &lt;span style="color: #ff7700;font-weight:bold;"&gt;return&lt;/span&gt; value.&lt;span style="color: black;"&gt;strftime&lt;/span&gt;&lt;span style="color: black;"&gt;&amp;#40;&lt;/span&gt;&lt;span style="color: #483d8b;"&gt;&amp;quot;%A&amp;quot;&lt;/span&gt;&lt;span style="color: black;"&gt;&amp;#41;&lt;/span&gt;                       &lt;span style="color: #808080; font-style: italic;"&gt;# Wednesday&lt;/span&gt;
        &lt;span style="color: #ff7700;font-weight:bold;"&gt;elif&lt;/span&gt; delta.&lt;span style="color: black;"&gt;days&lt;/span&gt; == &lt;span style="color: #ff4500;"&gt;1&lt;/span&gt;:
            &lt;span style="color: #ff7700;font-weight:bold;"&gt;return&lt;/span&gt; &lt;span style="color: #483d8b;"&gt;'yesterday'&lt;/span&gt;                                &lt;span style="color: #808080; font-style: italic;"&gt;# yesterday&lt;/span&gt;
        &lt;span style="color: #ff7700;font-weight:bold;"&gt;elif&lt;/span&gt; delta.&lt;span style="color: black;"&gt;seconds&lt;/span&gt; &lt;span style="color: #66cc66;"&gt;&amp;gt;&lt;/span&gt; &lt;span style="color: #ff4500;"&gt;3600&lt;/span&gt;:
            &lt;span style="color: #ff7700;font-weight:bold;"&gt;return&lt;/span&gt; &lt;span style="color: #008000;"&gt;str&lt;/span&gt;&lt;span style="color: black;"&gt;&amp;#40;&lt;/span&gt;delta.&lt;span style="color: black;"&gt;seconds&lt;/span&gt; / &lt;span style="color: #ff4500;"&gt;3600&lt;/span&gt; &lt;span style="color: black;"&gt;&amp;#41;&lt;/span&gt; + &lt;span style="color: #483d8b;"&gt;' hours ago'&lt;/span&gt;  &lt;span style="color: #808080; font-style: italic;"&gt;# 3 hours ago&lt;/span&gt;
        &lt;span style="color: #ff7700;font-weight:bold;"&gt;elif&lt;/span&gt; delta.&lt;span style="color: black;"&gt;seconds&lt;/span&gt; &lt;span style="color: #66cc66;"&gt;&amp;gt;&lt;/span&gt;  MOMENT:
            &lt;span style="color: #ff7700;font-weight:bold;"&gt;return&lt;/span&gt; &lt;span style="color: #008000;"&gt;str&lt;/span&gt;&lt;span style="color: black;"&gt;&amp;#40;&lt;/span&gt;delta.&lt;span style="color: black;"&gt;seconds&lt;/span&gt;/&lt;span style="color: #ff4500;"&gt;60&lt;/span&gt;&lt;span style="color: black;"&gt;&amp;#41;&lt;/span&gt; + &lt;span style="color: #483d8b;"&gt;' minutes ago'&lt;/span&gt;     &lt;span style="color: #808080; font-style: italic;"&gt;# 29 minutes ago&lt;/span&gt;
        &lt;span style="color: #ff7700;font-weight:bold;"&gt;else&lt;/span&gt;:
            &lt;span style="color: #ff7700;font-weight:bold;"&gt;return&lt;/span&gt; &lt;span style="color: #483d8b;"&gt;'a moment ago'&lt;/span&gt;                             &lt;span style="color: #808080; font-style: italic;"&gt;# a moment ago&lt;/span&gt;
        &lt;span style="color: #ff7700;font-weight:bold;"&gt;return&lt;/span&gt; defaultfilters.&lt;span style="color: black;"&gt;date&lt;/span&gt;&lt;span style="color: black;"&gt;&amp;#40;&lt;/span&gt;value&lt;span style="color: black;"&gt;&amp;#41;&lt;/span&gt;
    &lt;span style="color: #ff7700;font-weight:bold;"&gt;else&lt;/span&gt;:
        &lt;span style="color: #ff7700;font-weight:bold;"&gt;return&lt;/span&gt; &lt;span style="color: #008000;"&gt;str&lt;/span&gt;&lt;span style="color: black;"&gt;&amp;#40;&lt;/span&gt;value&lt;span style="color: black;"&gt;&amp;#41;&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;

&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/AnandNalya?a=K4iJ8wsws8U:3ufbEV_sYro:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/AnandNalya?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/AnandNalya?a=K4iJ8wsws8U:3ufbEV_sYro:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/AnandNalya?i=K4iJ8wsws8U:3ufbEV_sYro:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/AnandNalya?a=K4iJ8wsws8U:3ufbEV_sYro:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/AnandNalya?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</content>
		<link rel="replies" type="text/html" href="http://anandnalya.com/2009/05/20/humanizing-the-time-difference-in-django/#comments" thr:count="1" />
		<link rel="replies" type="application/atom+xml" href="http://anandnalya.com/2009/05/20/humanizing-the-time-difference-in-django/feed/atom/" thr:count="1" />
		<thr:total>1</thr:total>
	</entry>
		<entry>
		<author>
			<name>anand</name>
						<uri>http://</uri>
					</author>
		<title type="html"><![CDATA[Running Glassfish as a service on CentOS]]></title>
		<link rel="alternate" type="text/html" href="http://anandnalya.com/2009/04/07/running-glassfish-as-a-service-on-centos/" />
		<id>http://anandnalya.com/?p=56</id>
		<updated>2009-10-30T10:30:56Z</updated>
		<published>2009-04-07T06:49:33Z</published>
		<category scheme="http://anandnalya.com" term="Codeprix" /><category scheme="http://anandnalya.com" term="centos" /><category scheme="http://anandnalya.com" term="glassfish" /><category scheme="http://anandnalya.com" term="java" />		<summary type="html"><![CDATA[Here is how you run glassfish as a service on CentOS: Create a user glassfish (you can call it anything you want) under which Glassfish will run. #useradd glassfish Install glassfish in /home/glassfish. Create the startup script /etc/init.d/glassifsh for glassfish. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 [...]]]></summary>
		<content type="html" xml:base="http://anandnalya.com/2009/04/07/running-glassfish-as-a-service-on-centos/">&lt;p&gt;Here is how you run glassfish as a service on CentOS:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt; Create a user &lt;em&gt;glassfish (&lt;/em&gt;you can call it anything you want) under which Glassfish will run.

&lt;div class="wp_syntax"&gt;&lt;div class="code"&gt;&lt;pre class="bash" style="font-family:monospace;"&gt;&lt;span style="color: #666666; font-style: italic;"&gt;#useradd glassfish&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;/li&gt;
&lt;li&gt; &lt;a href="https://glassfish.dev.java.net/downloads/v2.1-b60e.html"&gt;Install glassfish&lt;/a&gt; in /home/glassfish.&lt;/li&gt;
&lt;li&gt;Create the startup script &lt;em&gt;/etc/init.d/glassifsh&lt;/em&gt; for glassfish.

&lt;div class="wp_syntax"&gt;&lt;table&gt;&lt;tr&gt;&lt;td class="line_numbers"&gt;&lt;pre&gt;1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
&lt;/pre&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;pre class="bash" style="font-family:monospace;"&gt;&lt;span style="color: #666666; font-style: italic;"&gt;#!/bin/bash&lt;/span&gt;
&lt;span style="color: #666666; font-style: italic;"&gt;#&lt;/span&gt;
&lt;span style="color: #666666; font-style: italic;"&gt;# glassfish:          Startup script for Glassfish Application Server.&lt;/span&gt;
&lt;span style="color: #666666; font-style: italic;"&gt;#&lt;/span&gt;
&lt;span style="color: #666666; font-style: italic;"&gt;# chkconfig: 3 80 05&lt;/span&gt;
&lt;span style="color: #666666; font-style: italic;"&gt;# description:      Startup script for domain1 of Glassfish Application Server.&lt;/span&gt;
&amp;nbsp;
&lt;span style="color: #007800;"&gt;GLASSFISH_HOME&lt;/span&gt;=&lt;span style="color: #000000; font-weight: bold;"&gt;/&lt;/span&gt;home&lt;span style="color: #000000; font-weight: bold;"&gt;/&lt;/span&gt;glassfish&lt;span style="color: #000000; font-weight: bold;"&gt;/&lt;/span&gt;glassfish;
&lt;span style="color: #7a0874; font-weight: bold;"&gt;export&lt;/span&gt; GLASSFISH_HOME
&amp;nbsp;
&lt;span style="color: #007800;"&gt;GLASSFISH_OWNER&lt;/span&gt;=glassfish;
&lt;span style="color: #7a0874; font-weight: bold;"&gt;export&lt;/span&gt; GLASSFISH_OWNER
&amp;nbsp;
start&lt;span style="color: #7a0874; font-weight: bold;"&gt;&amp;#40;&lt;/span&gt;&lt;span style="color: #7a0874; font-weight: bold;"&gt;&amp;#41;&lt;/span&gt; &lt;span style="color: #7a0874; font-weight: bold;"&gt;&amp;#123;&lt;/span&gt;
        &lt;span style="color: #7a0874; font-weight: bold;"&gt;echo&lt;/span&gt; &lt;span style="color: #660033;"&gt;-n&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;&amp;quot;Starting Glassfish: &amp;quot;&lt;/span&gt;
        &lt;span style="color: #7a0874; font-weight: bold;"&gt;echo&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;&amp;quot;Starting Glassfish at &lt;span style="color: #780078;"&gt;`date`&lt;/span&gt;&amp;quot;&lt;/span&gt; &lt;span style="color: #000000; font-weight: bold;"&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span style="color: #007800;"&gt;$GLASSFISH_HOME&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;/&lt;/span&gt;domains&lt;span style="color: #000000; font-weight: bold;"&gt;/&lt;/span&gt;domain1&lt;span style="color: #000000; font-weight: bold;"&gt;/&lt;/span&gt;logs&lt;span style="color: #000000; font-weight: bold;"&gt;/&lt;/span&gt;startup.log
        &lt;span style="color: #c20cb9; font-weight: bold;"&gt;su&lt;/span&gt; &lt;span style="color: #007800;"&gt;$GLASSFISH_OWNER&lt;/span&gt; &lt;span style="color: #660033;"&gt;-c&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;&amp;quot;&lt;span style="color: #007800;"&gt;$GLASSFISH_HOME&lt;/span&gt;/bin/asadmin start-domain domain1&amp;quot;&lt;/span&gt; &lt;span style="color: #000000; font-weight: bold;"&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span style="color: #007800;"&gt;$GLASSFISH_HOME&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;/&lt;/span&gt;domains&lt;span style="color: #000000; font-weight: bold;"&gt;/&lt;/span&gt;domain1&lt;span style="color: #000000; font-weight: bold;"&gt;/&lt;/span&gt;logs&lt;span style="color: #000000; font-weight: bold;"&gt;/&lt;/span&gt;startup.log
        &lt;span style="color: #c20cb9; font-weight: bold;"&gt;sleep&lt;/span&gt; &lt;span style="color: #000000;"&gt;2&lt;/span&gt;
        &lt;span style="color: #7a0874; font-weight: bold;"&gt;echo&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;&amp;quot;done&amp;quot;&lt;/span&gt;
&lt;span style="color: #7a0874; font-weight: bold;"&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
stop&lt;span style="color: #7a0874; font-weight: bold;"&gt;&amp;#40;&lt;/span&gt;&lt;span style="color: #7a0874; font-weight: bold;"&gt;&amp;#41;&lt;/span&gt; &lt;span style="color: #7a0874; font-weight: bold;"&gt;&amp;#123;&lt;/span&gt;
        &lt;span style="color: #7a0874; font-weight: bold;"&gt;echo&lt;/span&gt; &lt;span style="color: #660033;"&gt;-n&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;&amp;quot;Stopping Glassfish: &amp;quot;&lt;/span&gt;
        &lt;span style="color: #7a0874; font-weight: bold;"&gt;echo&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;&amp;quot;Stopping Glassfish at &lt;span style="color: #780078;"&gt;`date`&lt;/span&gt;&amp;quot;&lt;/span&gt; &lt;span style="color: #000000; font-weight: bold;"&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span style="color: #007800;"&gt;$GLASSFISH_HOME&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;/&lt;/span&gt;domains&lt;span style="color: #000000; font-weight: bold;"&gt;/&lt;/span&gt;domain1&lt;span style="color: #000000; font-weight: bold;"&gt;/&lt;/span&gt;logs&lt;span style="color: #000000; font-weight: bold;"&gt;/&lt;/span&gt;startup.log
        &lt;span style="color: #c20cb9; font-weight: bold;"&gt;su&lt;/span&gt; &lt;span style="color: #007800;"&gt;$GLASSFISH_OWNER&lt;/span&gt; &lt;span style="color: #660033;"&gt;-c&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;&amp;quot;&lt;span style="color: #007800;"&gt;$GLASSFISH_HOME&lt;/span&gt;/bin/asadmin stop-domain domain1&amp;quot;&lt;/span&gt; &lt;span style="color: #000000; font-weight: bold;"&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span style="color: #007800;"&gt;$GLASSFISH_HOME&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;/&lt;/span&gt;domains&lt;span style="color: #000000; font-weight: bold;"&gt;/&lt;/span&gt;domain1&lt;span style="color: #000000; font-weight: bold;"&gt;/&lt;/span&gt;logs&lt;span style="color: #000000; font-weight: bold;"&gt;/&lt;/span&gt;startup.log
        &lt;span style="color: #7a0874; font-weight: bold;"&gt;echo&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;&amp;quot;done&amp;quot;&lt;/span&gt;
&lt;span style="color: #7a0874; font-weight: bold;"&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span style="color: #666666; font-style: italic;"&gt;# See how we were called.&lt;/span&gt;
&lt;span style="color: #000000; font-weight: bold;"&gt;case&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;&amp;quot;$1&amp;quot;&lt;/span&gt; &lt;span style="color: #000000; font-weight: bold;"&gt;in&lt;/span&gt;
        start&lt;span style="color: #7a0874; font-weight: bold;"&gt;&amp;#41;&lt;/span&gt;
                start
                &lt;span style="color: #000000; font-weight: bold;"&gt;;;&lt;/span&gt;
        stop&lt;span style="color: #7a0874; font-weight: bold;"&gt;&amp;#41;&lt;/span&gt;
                stop
                &lt;span style="color: #000000; font-weight: bold;"&gt;;;&lt;/span&gt;
        restart&lt;span style="color: #7a0874; font-weight: bold;"&gt;&amp;#41;&lt;/span&gt;
                stop
                start
                &lt;span style="color: #000000; font-weight: bold;"&gt;;;&lt;/span&gt;
        &lt;span style="color: #000000; font-weight: bold;"&gt;*&lt;/span&gt;&lt;span style="color: #7a0874; font-weight: bold;"&gt;&amp;#41;&lt;/span&gt;
                &lt;span style="color: #7a0874; font-weight: bold;"&gt;echo&lt;/span&gt; $&lt;span style="color: #ff0000;"&gt;&amp;quot;Usage: glassfish {start|stop|restart}&amp;quot;&lt;/span&gt;
                &lt;span style="color: #7a0874; font-weight: bold;"&gt;exit&lt;/span&gt;
&lt;span style="color: #000000; font-weight: bold;"&gt;esac&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;

&lt;/li&gt;
&lt;li&gt;Install the service

&lt;div class="wp_syntax"&gt;&lt;div class="code"&gt;&lt;pre class="bash" style="font-family:monospace;"&gt;&lt;span style="color: #666666; font-style: italic;"&gt;#chmod +x /etc/init.d/glassfish&lt;/span&gt;
&lt;span style="color: #666666; font-style: italic;"&gt;#chkconfig --add glassfish&lt;/span&gt;
&lt;span style="color: #666666; font-style: italic;"&gt;#chkconfig --level 3 glassfish on&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;/li&gt;
&lt;li&gt;Start glassfish.

&lt;div class="wp_syntax"&gt;&lt;div class="code"&gt;&lt;pre class="bash" style="font-family:monospace;"&gt;&lt;span style="color: #666666; font-style: italic;"&gt;#/etc/init.d/glassfish start&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/AnandNalya?a=H6R86SCBwRA:wRVKEM3uS-M:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/AnandNalya?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/AnandNalya?a=H6R86SCBwRA:wRVKEM3uS-M:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/AnandNalya?i=H6R86SCBwRA:wRVKEM3uS-M:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/AnandNalya?a=H6R86SCBwRA:wRVKEM3uS-M:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/AnandNalya?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</content>
		<link rel="replies" type="text/html" href="http://anandnalya.com/2009/04/07/running-glassfish-as-a-service-on-centos/#comments" thr:count="8" />
		<link rel="replies" type="application/atom+xml" href="http://anandnalya.com/2009/04/07/running-glassfish-as-a-service-on-centos/feed/atom/" thr:count="8" />
		<thr:total>8</thr:total>
	</entry>
		<entry>
		<author>
			<name>anand</name>
						<uri>http://</uri>
					</author>
		<title type="html"><![CDATA[Embedding flash object in Facebook Apps (FBML)]]></title>
		<link rel="alternate" type="text/html" href="http://anandnalya.com/2009/01/15/embedding-flash-object-in-facebook-apps-fbml/" />
		<id>http://anandnalya.com/?p=30</id>
		<updated>2009-01-15T03:12:26Z</updated>
		<published>2009-01-15T03:12:26Z</published>
		<category scheme="http://anandnalya.com" term="Codeprix" /><category scheme="http://anandnalya.com" term="facebook" /><category scheme="http://anandnalya.com" term="fbml" /><category scheme="http://anandnalya.com" term="flash" /><category scheme="http://anandnalya.com" term="hack" /><category scheme="http://anandnalya.com" term="iframe" />		<summary type="html"><![CDATA[Yesterday I was trying to include a flash object in a facebook app using FBML fb:swf tag. The flash object needed to change the url of the page it was running on on a particular event. But since facebook prevents direct script access from flash, this could not be done. Here is a simple workaround: [...]]]></summary>
		<content type="html" xml:base="http://anandnalya.com/2009/01/15/embedding-flash-object-in-facebook-apps-fbml/">&lt;p&gt;Yesterday I was trying to include a flash object in a facebook app using &lt;a href="http://wiki.developers.facebook.com/index.php/FBML"&gt;FBML&lt;/a&gt; &lt;a href="http://wiki.developers.facebook.com/index.php/Fb:swf"&gt;fb:swf&lt;/a&gt; tag. The flash object needed to change the url of the page it was running on on a particular event. But since facebook prevents direct script access from flash, this could not be done.&lt;/p&gt;
&lt;p&gt;Here is a simple workaround:&lt;/p&gt;
&lt;p&gt;1. Create a simple html page containing only the flash object that you want to include.&lt;/p&gt;

&lt;div class="wp_syntax"&gt;&lt;div class="code"&gt;&lt;pre class="html4strict" style="font-family:monospace;"&gt;&lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;html&lt;/span&gt;&amp;gt;&lt;/span&gt;
   &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;head&lt;/span&gt;&amp;gt;&lt;/span&gt;
      &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;meta&lt;/span&gt; &lt;span style="color: #000066;"&gt;http-equiv&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;=&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;&amp;quot;Content-Type&amp;quot;&lt;/span&gt; &lt;span style="color: #000066;"&gt;content&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;=&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;&amp;quot;text/html; charset=utf-8&amp;quot;&lt;/span&gt;&amp;gt;&lt;/span&gt;
   &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;head&lt;/span&gt;&amp;gt;&lt;/span&gt;
   &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;body&lt;/span&gt;&amp;gt;&lt;/span&gt;
   	&lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;object&lt;/span&gt; &lt;span style="color: #000066;"&gt;type&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;=&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;&amp;quot;application/x-shockwave-flash&amp;quot;&lt;/span&gt; &lt;span style="color: #000066;"&gt;data&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;=&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;&amp;quot;foo.swf&amp;quot;&lt;/span&gt; &lt;span style="color: #000066;"&gt;width&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;=&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;&amp;quot;300&amp;quot;&lt;/span&gt; &lt;span style="color: #000066;"&gt;height&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;=&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;&amp;quot;300&amp;quot;&lt;/span&gt;&amp;gt;&lt;/span&gt;
   		&lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;param&lt;/span&gt; &lt;span style="color: #000066;"&gt;name&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;=&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;&amp;quot;movie&amp;quot;&lt;/span&gt; &lt;span style="color: #000066;"&gt;value&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;=&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;&amp;quot;foo.swf&amp;quot;&lt;/span&gt;&amp;gt;&lt;/span&gt;
         	&lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;param&lt;/span&gt; &lt;span style="color: #000066;"&gt;name&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;=&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;&amp;quot;quality&amp;quot;&lt;/span&gt; &lt;span style="color: #000066;"&gt;value&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;=&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;&amp;quot;high&amp;quot;&lt;/span&gt;&amp;gt;&lt;/span&gt;
         	&lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;param&lt;/span&gt; &lt;span style="color: #000066;"&gt;name&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;=&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;&amp;quot;scale&amp;quot;&lt;/span&gt; &lt;span style="color: #000066;"&gt;value&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;=&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;&amp;quot;noscale&amp;quot;&lt;/span&gt;&amp;gt;&lt;/span&gt;
         	&lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;param&lt;/span&gt; &lt;span style="color: #000066;"&gt;name&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;=&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;&amp;quot;salign&amp;quot;&lt;/span&gt; &lt;span style="color: #000066;"&gt;value&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;=&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;&amp;quot;LT&amp;quot;&lt;/span&gt;&amp;gt;&lt;/span&gt;
         	&lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;param&lt;/span&gt; &lt;span style="color: #000066;"&gt;name&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;=&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;&amp;quot;menu&amp;quot;&lt;/span&gt; &lt;span style="color: #000066;"&gt;value&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;=&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;&amp;quot;false&amp;quot;&lt;/span&gt;&amp;gt;&lt;/span&gt;
    	&lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;object&lt;/span&gt;&amp;gt;&lt;/span&gt;
    &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;body&lt;/span&gt;&amp;gt;&lt;/span&gt;
&lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;html&lt;/span&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;2. Embed this html on the facebook page using the &lt;a href="http://wiki.developers.facebook.com/index.php/Fb:iframe"&gt;fb:iframe&lt;/a&gt; tag.&lt;/p&gt;

&lt;div class="wp_syntax"&gt;&lt;div class="code"&gt;&lt;pre class="html4strict" style="font-family:monospace;"&gt;&lt;span style="color: #009900;"&gt;&amp;lt;fb:iframe &lt;span style="color: #000066;"&gt;src&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;=&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;&amp;quot;http://anandnalya.com/foo.html&amp;quot;&lt;/span&gt; &lt;span style="color: #000066;"&gt;width&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;=&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;&amp;quot;300&amp;quot;&lt;/span&gt; &lt;span style="color: #000066;"&gt;height&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;=&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;&amp;quot;300&amp;quot;&lt;/span&gt; &lt;span style="color: #000066;"&gt;frameborder&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;=&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;&amp;quot;0&amp;quot;&lt;/span&gt; &lt;span style="color: #000066;"&gt;scrolling&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;=&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;&amp;quot;no&amp;quot;&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;fb:iframe&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Now you can make all the Actionscript calls you want to. Only caveat to this approach is that you will no longer be able to make Facebook API calls directly from flash.&lt;/p&gt;
&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/AnandNalya?a=-NSzFL29sAA:MjZE6YsFbzw:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/AnandNalya?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/AnandNalya?a=-NSzFL29sAA:MjZE6YsFbzw:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/AnandNalya?i=-NSzFL29sAA:MjZE6YsFbzw:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/AnandNalya?a=-NSzFL29sAA:MjZE6YsFbzw:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/AnandNalya?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</content>
		<link rel="replies" type="text/html" href="http://anandnalya.com/2009/01/15/embedding-flash-object-in-facebook-apps-fbml/#comments" thr:count="9" />
		<link rel="replies" type="application/atom+xml" href="http://anandnalya.com/2009/01/15/embedding-flash-object-in-facebook-apps-fbml/feed/atom/" thr:count="9" />
		<thr:total>9</thr:total>
	</entry>
		<entry>
		<author>
			<name>anand</name>
						<uri>http://</uri>
					</author>
		<title type="html"><![CDATA[Web 2.0: Tactical Questions]]></title>
		<link rel="alternate" type="text/html" href="http://anandnalya.com/2008/11/26/web-20-tactical-questions/" />
		<id>http://anandnalya.com/?p=7</id>
		<updated>2008-11-26T12:45:16Z</updated>
		<published>2008-11-26T06:12:58Z</published>
		<category scheme="http://anandnalya.com" term="Web 2.x" /><category scheme="http://anandnalya.com" term="web 2.0" />		<summary type="html"><![CDATA[Tactical questions to ask about your Web 2.0 Strategy: Are your web site, storefront, web presence, development ecosystem, and user experience aligned with and open to collective user value best practices? Are you (or is your management) comfortable with letting users have their own independent voices on your site? Do you allow users to participate [...]]]></summary>
		<content type="html" xml:base="http://anandnalya.com/2008/11/26/web-20-tactical-questions/">&lt;p&gt;Tactical questions to ask about your &lt;a href="http://acmsel.safaribooksonline.com/9780596529963"&gt;Web 2.0 Strategy&lt;/a&gt;:&lt;/p&gt;
&lt;blockquote&gt;
&lt;ul&gt;
&lt;li&gt;Are your web site, storefront, web presence, development ecosystem, and user experience aligned with and open to collective user value best practices?&lt;/li&gt;
&lt;li&gt; Are you (or is your management) comfortable with letting users have their own independent voices on your site?&lt;/li&gt;
&lt;li&gt; Do you allow users to participate on your site? Can they share their own questions and ideas there?&lt;/li&gt;
&lt;li&gt; How do you attract users to participate on your site? What brings them there initially, and what encourages them to come back?&lt;/li&gt;
&lt;li&gt; What features of your site help users make connections with each other? Can users form groups with other users?&lt;/li&gt;
&lt;li&gt; How sense-rich is the participation you support? Can users present sound, video, or even just formatted text?&lt;/li&gt;
&lt;li&gt; Do you provide mechanisms (tagging, for example) to help users create their own navigation through your site?&lt;/li&gt;
&lt;li&gt; Do you support user annotation of your site?&lt;/li&gt;
&lt;li&gt; How could your site learn from user behavior and adapt itself to users? Which categories of user behavior have the most potential in your situation?&lt;/li&gt;
&lt;li&gt; How do you encourage users to bring other people to your site?&lt;/li&gt;
&lt;li&gt; How do you encourage users to share information in public, where it can generate positive network effects? In other words, is your site &amp;#8220;public by default&amp;#8221;?&lt;/li&gt;
&lt;li&gt; Can you create—or tighten—feedback loops between user requests and your company&amp;#8217;s ability to fulfill them?&lt;/li&gt;
&lt;li&gt; Can users keep up with your site through syndication—RSS or similar approaches?&lt;/li&gt;
&lt;li&gt; Do you provide programming interface (API) access to developers who want to combine, or mash up, the contents of your site with complementary materials from elsewhere?&lt;/li&gt;
&lt;li&gt; What licensing do you use for your site contents? And what licensing can users specify for their own contributions? (For example, All Rights Reserved versus Creative Commons with some rights reserved.)&lt;/li&gt;
&lt;li&gt; Do users feel they can control their information once they&amp;#8217;ve entrusted your site with it? Can they extract it later?&lt;/li&gt;
&lt;li&gt; How do you support your active community members?&lt;/li&gt;
&lt;li&gt; Is there an opportunity to charge for the services your site provides? If so, can you structure those charges so that the people benefiting most directly from your site are the ones paying, while those contributing pay less or nothing?&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;em&gt;Addendum:&lt;/em&gt; Should you implement a Social Network? Ask these questions ( again from &lt;a href="http://acmsel.safaribooksonline.com/9780596529963/users_create_value#X2ludGVybmFsX1NlY3Rpb25Db250ZW50P3htbGlkPTk3ODA1OTY1Mjk5NjMvcXVlc3Rpb25zX3RvX2Fzay1pZDI="&gt;Web 2.0 Strategy&lt;/a&gt; )&lt;/p&gt;
&lt;blockquote&gt;
&lt;ul&gt;
&lt;li&gt;How might your users relate to each other? (Or, how do they presently relate to each other?)&lt;/li&gt;
&lt;li&gt;If you have an existing place for users to communicate, would you benefit from enriching it with profiles and contacts?&lt;/li&gt;
&lt;li&gt;Do you provide mechanisms for your users to communicate among themselves?&lt;/li&gt;
&lt;li&gt;Do you provide tools for users to invite others to join your site?&lt;/li&gt;
&lt;li&gt;How much information are your users really willing to share about themselves?&lt;/li&gt;
&lt;li&gt;What balance of openness and privacy is appropriate in your business&amp;#8217;s context? What mechanisms do you have to maintain that balance?&lt;/li&gt;
&lt;li&gt;What value might user information create for you in this context? Advertising value? User happiness value? A new business of people who want to contact your users?&lt;/li&gt;
&lt;li&gt;Do you know how tightly knit your current users are? Are they tightly clustered, loosely clustered, or purely individuals who haven&amp;#8217;t yet formed connections?&lt;/li&gt;
&lt;li&gt;Have you identified key individuals in your user base who have developed the trust of others and can make things happen on your site?&lt;/li&gt;
&lt;li&gt;Would your site benefit from a full-blown social networking component, with contact lists, degrees of separation, and more, or might simply adding a profile page for users provide more immediate benefits?&lt;/li&gt;
&lt;li&gt;How does the current nature of your user base influence your potential for expansion? Are there specific subjects you should explore or projects you should undertake to maximize network effects building on who your current users know?&lt;/li&gt;
&lt;li&gt;What are the ratios of different kinds of users on your site? How many are contributors, how many are readers, and how many are active in community-building or networking? How can you monetize some groups without alienating others?&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;
&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/AnandNalya?a=rpVbFXKp0LY:-v3pdG4rlzQ:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/AnandNalya?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/AnandNalya?a=rpVbFXKp0LY:-v3pdG4rlzQ:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/AnandNalya?i=rpVbFXKp0LY:-v3pdG4rlzQ:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/AnandNalya?a=rpVbFXKp0LY:-v3pdG4rlzQ:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/AnandNalya?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</content>
		<link rel="replies" type="text/html" href="http://anandnalya.com/2008/11/26/web-20-tactical-questions/#comments" thr:count="0" />
		<link rel="replies" type="application/atom+xml" href="http://anandnalya.com/2008/11/26/web-20-tactical-questions/feed/atom/" thr:count="0" />
		<thr:total>0</thr:total>
	</entry>
		<entry>
		<author>
			<name>anand</name>
						<uri>http://</uri>
					</author>
		<title type="html"><![CDATA[Hello world!]]></title>
		<link rel="alternate" type="text/html" href="http://anandnalya.com/2008/10/15/hello-world/" />
		<id>http://anandnalya.com/?p=1</id>
		<updated>2008-12-20T15:56:29Z</updated>
		<published>2008-10-16T05:01:53Z</published>
		<category scheme="http://anandnalya.com" term="General" />		<summary type="html"><![CDATA[// Hello world Welcome to WordPress. This is your first post. Edit or delete it, then start blogging!]]></summary>
		<content type="html" xml:base="http://anandnalya.com/2008/10/15/hello-world/">&lt;p&gt;&lt;span style="color: #16af16"&gt;// Hello world &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Welcome to WordPress. This is your first post. Edit or delete it, then start blogging!&lt;/p&gt;
&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/AnandNalya?a=PpJyW_5ssa8:03eLUFrJ0oo:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/AnandNalya?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/AnandNalya?a=PpJyW_5ssa8:03eLUFrJ0oo:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/AnandNalya?i=PpJyW_5ssa8:03eLUFrJ0oo:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/AnandNalya?a=PpJyW_5ssa8:03eLUFrJ0oo:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/AnandNalya?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</content>
		<link rel="replies" type="text/html" href="http://anandnalya.com/2008/10/15/hello-world/#comments" thr:count="1" />
		<link rel="replies" type="application/atom+xml" href="http://anandnalya.com/2008/10/15/hello-world/feed/atom/" thr:count="1" />
		<thr:total>1</thr:total>
	</entry>
	</feed><!-- Dynamic Page Served (once) in 0.892 seconds -->
