<?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>Melbourne Web Developer, Website Design &#38; Development &#187; Tech.</title>
	<atom:link href="http://blog.koumei.net/category/tech/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.koumei.net</link>
	<description>-(unichar) fn: (unichar)n{ return n ^ 0xFFFF004B == 0? n : [self fn:(n-0x1)]}</description>
	<lastBuildDate>Thu, 02 Jun 2011 02:46:33 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>koumei 7 theme!</title>
		<link>http://blog.koumei.net/2010/12/04/koumei-7-theme/</link>
		<comments>http://blog.koumei.net/2010/12/04/koumei-7-theme/#comments</comments>
		<pubDate>Fri, 03 Dec 2010 23:13:10 +0000</pubDate>
		<dc:creator>Koumei</dc:creator>
				<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Tech.]]></category>
		<category><![CDATA[iDEA]]></category>

		<guid isPermaLink="false">http://blog.koumei.net/?p=695</guid>
		<description><![CDATA[koumei finally change the theme!! but honestly, i like the previous one than this one.
with bing! site search plug-in which will be released on open source section next week!
]]></description>
			<content:encoded><![CDATA[<p>koumei finally change the theme!! but honestly, i like the previous one than this one.</p>
<p>with bing! site search plug-in which will be released on open source section next week!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.koumei.net/2010/12/04/koumei-7-theme/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Gallery CMS MOD: View As HTML or Partial HTML</title>
		<link>http://blog.koumei.net/2010/08/15/gallery-cms-mod-view-as-html-or-partial-html/</link>
		<comments>http://blog.koumei.net/2010/08/15/gallery-cms-mod-view-as-html-or-partial-html/#comments</comments>
		<pubDate>Sat, 14 Aug 2010 15:46:13 +0000</pubDate>
		<dc:creator>Koumei</dc:creator>
				<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Tech.]]></category>
		<category><![CDATA[iDEA]]></category>

		<guid isPermaLink="false">http://blog.koumei.net/?p=643</guid>
		<description><![CDATA[Gallery CMS  provides an easy-manage CMS (Content Management System) framework for gallery. I like the way they manage data, all the data are exposed as XML or JSON. It is not a complete solution of photo gallery online, but if you need to integrate photo gallery on your website that would be a very good [...]]]></description>
			<content:encoded><![CDATA[<p>Gallery CMS  provides an easy-manage CMS (Content Management System) framework for gallery. I like the way they manage data, all the data are exposed as XML or JSON. It is not a complete solution of photo gallery online, but if you need to integrate photo gallery on your website that would be a very good start: you can easily develop or integrate. And guess what is the exciting part? It&#8217;s free! For more information, please feel free to download @ http://www.gallerycms.com/</p>
<p>It&#8217;s easily integrate but sometime you might need more convenience when integrate it to your website. Of course using XML or JSON which is the basic data structure is not that difficult, but I think most of time, for the integration itself, the most easiest and convenient is managing HTML. On the view if you are rendering the content partially, later you can use AJAX to replace the partial HTML content dynamically other than managing JSON on client side: we need rich client application, but if it lose weight a little bit, why don&#8217;t we make it lighter?</p>
<p>So, let us apply the MOD to it. It&#8217;s MIT license, so, no harm to mod it. Just pay a little attention to it&#8217;s license file: Gallery CMS comes with 2 licenses, one license is MIT license which represent itself, and the other license is derived from CodeIgniter which the basic framework.</p>
<p>1.\application\controllers\view.php //Add the following codes to it:</p>
<p><em>function html() {<br />
$data['row'] = $this-&gt;gallery_xml-&gt;viewXML();<br />
$this-&gt;load-&gt;model(&#8217;settings_tbl&#8217;);<br />
$data['settings'] = $this-&gt;settings_tbl-&gt;viewSettings();<br />
$this-&gt;load-&gt;view(&#8216;view_html&#8217;, $data);<br />
} </em></p>
<p>2. On\application\views\ folder, create a file view_html.php</p>
<p>Please note that, you can make the view html a full html or you can partially render it like this:</p>
<p><em>&lt;?php if(isset($row)) {?&gt;<br />
&lt;div&gt;<br />
&lt;?php foreach($row as $r){?&gt;<br />
&lt;?php if(isset($r-&gt;images)) {<br />
foreach($r-&gt;images as $img) { ?&gt;<br />
&lt;div&gt;<br />
&lt;div&gt;&lt;a href=&#8221;&lt;?php echo base_url();?&gt;uploads/&lt;?php echo $img-&gt;filename;?&gt;&#8221; target=&#8221;_blank&#8221; title=&#8221;&lt;?php echo $img-&gt;caption;?&gt;&#8221;&gt;&lt;img src=&#8221;&lt;?php echo base_url();?&gt;uploads/&lt;?php echo $img-&gt;thumbnail;?&gt;&#8221; border=&#8221;0&#8243; align=&#8221;absmiddle&#8221; width=&#8221;&lt;?php echo $settings[0]-&gt;thumb_width; ?&gt;&#8221; height=&#8221;&lt;?php echo $settings[0]-&gt;thumb_height; ?&gt;&#8221;/&gt;&lt;/a&gt;&lt;/div&gt;<br />
&lt;div&gt;&lt;?php echo $r-&gt;title;?&gt;&lt;/div&gt;<br />
&lt;div&gt;&lt;?php echo $r-&gt;description;?&gt;&lt;/div&gt;<br />
&lt;/div&gt;<br />
&lt;?php } ?&gt;<br />
&lt;?php } //if  ?&gt;<br />
&lt;?php } ?&gt;<br />
&lt;div style=&#8221;clear:both&#8221;&gt;&lt;/div&gt;<br />
&lt;/div&gt;<br />
&lt;?php }?&gt;</em></p>
<p>After that, you can use: http://&lt;GALLERY_CMS_WEBSITE&gt;/index.php/html  to retrieve the HTML content. In our mod above, it is just partial HTML, so you can jQuery it:</p>
<p><em>$.get(&#8216;http://&lt;GALLERY_CMS_WEBSITE&gt;/index.php/html &#8216;, null, new function(resp){$(&#8216;#html-container&#8217;).html(resp);});</em></p>
<p>Nice and easy.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.koumei.net/2010/08/15/gallery-cms-mod-view-as-html-or-partial-html/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ASP.NET MVC Whole Site 301 Permanent Redirect</title>
		<link>http://blog.koumei.net/2010/08/12/asp-net-mvc-whole-site-301-permanent-redirect/</link>
		<comments>http://blog.koumei.net/2010/08/12/asp-net-mvc-whole-site-301-permanent-redirect/#comments</comments>
		<pubDate>Thu, 12 Aug 2010 12:50:30 +0000</pubDate>
		<dc:creator>Koumei</dc:creator>
				<category><![CDATA[ASP.NET MVC]]></category>
		<category><![CDATA[Interesting]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Principle]]></category>
		<category><![CDATA[SEO]]></category>
		<category><![CDATA[Tech.]]></category>

		<guid isPermaLink="false">http://blog.koumei.net/?p=639</guid>
		<description><![CDATA[For some reasons, we need to permanently redirect the whole website to another website. It would be much easier that you are the owner of the server. But most of time you just host your website on the server out there. It wouldn&#8217;t be a big problem that your hosting company will support you to [...]]]></description>
			<content:encoded><![CDATA[<p>For some reasons, we need to permanently redirect the whole website to another website. It would be much easier that you are the owner of the server. But most of time you just host your website on the server out there. It wouldn&#8217;t be a big problem that your hosting company will support you to do some simple 301 redirect or may you have enough privilege to do it yourself. Is it possible to redirect permanently the website to other website by programming a little bit?</p>
<p>Sure you can. With MVC routing facilities, you can define your customized redirect logic: CREATE AN EMPTY MVC PROJECT, MODIFY GLOBAL.ASPX.CS FILE ONLY ON THIS EXAMPLE:</p>
<p>First of all, define two objects which implemented IRouteHandler and IHttpHandler, you can feel free to define those two objects on Global.aspx.cs file:</p>
<p>//@Implements IRouteHandler<br />
<em>class RedirectRouteHandler : IRouteHandler<br />
{<br />
private string newUrl;<br />
public RedirectRouteHandler(string newUrl) { this.newUrl = newUrl; }<br />
public IHttpHandler GetHttpHandler(RequestContext requestContext)<br />
{<br />
return new RedirectHandler(newUrl);<br />
}<br />
}</em></p>
<p>//@object implements IHttpHandler<br />
<em>class RedirectHandler : IHttpHandler<br />
{<br />
private string newUrl;</p>
<p>public RedirectHandler(string newUrl) { this.newUrl = newUrl; }</p>
<p>public bool IsReusable { get { return true; } }</p>
<p>public void ProcessRequest(HttpContext httpContext)<br />
{<br />
httpContext.Response.Status = &#8220;301 Moved Permanently&#8221;;<br />
httpContext.Response.StatusCode = 301;<br />
httpContext.Response.AppendHeader(&#8220;Location&#8221;, newUrl);<br />
return;<br />
}<br />
}</em></p>
<p>Then add one line on RegisterRoutes(RouteCollection routes) method (in Global.aspx.cs):</p>
<p><em>routes.Add(new Route(&#8220;{*pathInfo}&#8221;, new RedirectRouteHandler(@&#8221;http://koumei.net&#8221;));</em></p>
<p>Now all request to the website will redirect to &#8220;koumei.net&#8221; permanently. <img src='http://blog.koumei.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.koumei.net/2010/08/12/asp-net-mvc-whole-site-301-permanent-redirect/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>REMIX10 &#8211; Share the Web Love, Late Update</title>
		<link>http://blog.koumei.net/2010/06/19/remix10-share-the-web-love-late-update/</link>
		<comments>http://blog.koumei.net/2010/06/19/remix10-share-the-web-love-late-update/#comments</comments>
		<pubDate>Fri, 18 Jun 2010 15:01:09 +0000</pubDate>
		<dc:creator>Koumei</dc:creator>
				<category><![CDATA[ASP.NET MVC]]></category>
		<category><![CDATA[Interesting]]></category>
		<category><![CDATA[Living in Victoria]]></category>
		<category><![CDATA[Tech.]]></category>

		<guid isPermaLink="false">http://blog.koumei.net/?p=585</guid>
		<description><![CDATA[I almost forget the interesting 2-day event or you can say &#8220;meeting&#8221; in Melbourne. The idea of this conference is to show Microsoft developer the latest development kits and to let technical or IT people catch up each other. $300 for joining the meeting but I got it for free. Thanks to my boss to [...]]]></description>
			<content:encoded><![CDATA[<p>I almost forget the interesting 2-day event or you can say &#8220;meeting&#8221; in Melbourne. The idea of this conference is to show Microsoft developer the latest development kits and to let technical or IT people catch up each other. $300 for joining the meeting but I got it for free. Thanks to my boss to give me such great opportunity to join the great event.</p>
<p>I got 2 souvenirs, such as t-shirt, caps, but all are related to Microsoft stuff. You want to get the t-shirt? well, need to make some efforts. Everyone who attends the meeting will get a magic cube from the host, and need to fix the cube to a designated image. After all, once cubes are fixed, the host sorts them out and put them in a frame, to shape a IE icon:</p>
<div id="attachment_586" class="wp-caption alignnone" style="width: 310px"><a href="http://blog.koumei.net/wp-content/uploads/2010/06/IMG00293-20100602-1056.jpg"><img class="size-medium wp-image-586" title="The Frame of Magic cubes" src="http://blog.koumei.net/wp-content/uploads/2010/06/IMG00293-20100602-1056-300x225.jpg" alt="The Frame of Magic cubes" width="300" height="225" /></a><p class="wp-caption-text">The Frame of Magic cubes,Everyone is involved</p></div>
<p>I think the most useful sessions are about how jQuery works peacefully with ASP.NET and VS.NET 2010 new features, and one interesting session talking about the future data representation, and introduce Pivot. Microsoft considers the cooperation with jQuery is a giant step forward, and shows its ambitions to open source community. Microsoft starts to contribute to open source community and make a lot of effort towards it, look forward to seeing its powerful tool released in months to come.</p>
<div id="attachment_587" class="wp-caption alignnone" style="width: 310px"><a href="http://blog.koumei.net/wp-content/uploads/2010/06/IMG00294-20100602-1255.jpg"><img class="size-medium wp-image-587" title="Frankly Speaking - Talk Show in REMIX10" src="http://blog.koumei.net/wp-content/uploads/2010/06/IMG00294-20100602-1255-300x224.jpg" alt="Frankly Speaking - Talk Show in REMIX10" width="300" height="224" /></a><p class="wp-caption-text">Frankly Speaking - Talk Show in REMIX10</p></div>
<p>One thing somehow a little bit disappointed me is on this event, Microsoft doesn&#8217;t show any thing about HTML5 and CSS3, I think because Microsoft more focuses on sliverlight technology?</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.koumei.net/2010/06/19/remix10-share-the-web-love-late-update/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Use of Lambda Expression to Create Complicated Query</title>
		<link>http://blog.koumei.net/2010/03/10/use-lambda-expression-to-create-complicated-query/</link>
		<comments>http://blog.koumei.net/2010/03/10/use-lambda-expression-to-create-complicated-query/#comments</comments>
		<pubDate>Wed, 10 Mar 2010 07:12:31 +0000</pubDate>
		<dc:creator>Koumei</dc:creator>
				<category><![CDATA[ASP.NET MVC]]></category>
		<category><![CDATA[Lab]]></category>
		<category><![CDATA[Tech.]]></category>

		<guid isPermaLink="false">http://blog.koumei.net/?p=465</guid>
		<description><![CDATA[.NET FX introduces a powerful weapon for creating the compact, breezy and elegant code in your project. The weapon&#8217;s name is as complicated as the mathematical stuff, called Lambda expression.
As the name implies, the great convenience comes great complication inside. Lambda expression is too important to understand, it is useful and I think it is [...]]]></description>
			<content:encoded><![CDATA[<p>.NET FX introduces a powerful weapon for creating the compact, breezy and elegant code in your project. The weapon&#8217;s name is as complicated as the mathematical stuff, called Lambda expression.</p>
<p>As the name implies, the great convenience comes great complication inside. Lambda expression is too important to understand, it is useful and I think it is good to know how it works. Well, it&#8217;s not as complicated as we think, just a little bit confusing when using it.</p>
<p>First of all, Lambda is used for 2 purposes. 1 is to simplify delegation, 2 is to create expression tree. In my case, I need to create lambda expression to create dynamic query.</p>
<p>Imagine the following usecase:</p>
<p>In your product table, there is a field called &#8220;Tags&#8221; and it&#8217;s used for storing the CSV (comma separated value) like &#8220;car, mazda, suv, luxury&#8221;, you have many records:</p>
<p>Product Table: (Table name: ProductTable)</p>
<p><span style="text-decoration: underline;"><strong>ID    ProductName    Tags</strong></span><br />
1    Tow bar        car,mazda,suv,luxury<br />
2    Cup holder    car,luxury<br />
3    Phone holder    car,mazda<br />
4    FM Transmitter    car,suv<br />
5    Queens bed    luxury<br />
6    DVD Burner    car,BMW,x5,luxury</p>
<p>When your searching criteria is<br />
&#8220;mazda&#8221; and &#8220;luxury&#8221;, the following records would be selected out:</p>
<p><span style="text-decoration: underline;"><strong>ID    ProductName    Tags</strong></span><br />
1    Tow bar        car,mazda,suv,luxury<br />
2    Cup holder    car,luxury<br />
3    Phone holder    car,mazda<br />
5    Queens bed    luxury<br />
6    DVD Burner    car,BMW,x5,luxury</p>
<p>In ancient SQL age, you would probably write a SQL like this:</p>
<address>string SQL = &#8220;SELECT * FORM ProductTable WHERE Tags LIKE&#8217;%mazda%&#8217; OR Tags LIKE &#8216;%luxury%&#8217;&#8221;;</address>
<p>It is IMpossible to create SQL like above except the project scope tells you the fixed keywords that would be used, the keywords should flexible. Then the code would be as much as:</p>
<address>string[] tags = new string[]{&#8220;mazda&#8221;, &#8220;luxury&#8221;};</address>
<address>string SQL = &#8220;SELECT * FROM ProductTable WHERE 1=1&#8243;;<br />
foreach(string tag in tags)<br />
{<br />
SQL += string.format(@&#8221; AND Tags like &#8216;%{0}%&#8217;&#8221;, tag);<br />
}</address>
<p>You must be very exciting that your code supports as many keywrods as it can. (I did before, I mean I would be very exciting when the code filled with logical stuff, LOL, of course, not now, that&#8217;s what geek did before~ )</p>
<p>Back to the reality, to the modern age, with the lambda expression, what you need to do is:</p>
<p>(pre-condition: you have created corresponding domain model which mapped to the database.)<br />
The domain object or entity would look like:</p>
<address>[Table("ProductTable")] Class ProductTable{<br />
[Column]public int Id{get; set;}<br />
[Column]public string ProductName{get; set;}<br />
[Column]public string Tags{get; set;}<br />
}</address>
<p>to fullfill the same kind of logic as the stone-aged people do, you just need to</p>
<address>DataContext db = new DataContext(&#8220;&lt;connection-string&gt;&#8221;);<br />
Table&lt;ProductTable&gt; table = db.GetTable&lt;ProductTable&gt;();</address>
<address>string tag1 = &#8220;mazda&#8221;;<br />
string tag2 = &#8220;luxury&#8221;;</address>
<address>var data = table.where(x=&gt;x.Tags.Contains(tag1)).where(x=&gt;x.Tags.Contains(tag2)) select new ProductTable;<br />
return data.AsQueryable();</address>
<p>Since so far, you still feel comfortable with this, but after minute, you would probably wanna go back stone age, how do we dynamically create the query in this case? Unfortunately, there is no short-cut for this, but many people provide lots of solutions on the Internet. We can either download some source codes about dynamically query on Internet or just grab the codes from the blogger&#8217;s website.( Most of time, you can&#8217;t use all of their codes posted on the blog, the codes are broken and bad structure, remember what Koumei always suggests, absorb the mind from the other coders, do not copy the code they provided. )</p>
<p>But in here, I would rather to use Expression Tree to implement the dynamic query.</p>
<p>First of all, we need to create an expression, because it would be applied to IQueryable.Where(Expression&lt;Func&lt;ProductTable, bool&gt;&gt; expression), so the expression should be defined as:</p>
<address>public static System.Linq.Expressions.Expression&lt;Func&lt;ProductTable, bool&gt;&gt; ApplyTags(IEnumerable&lt;string&gt; tags) //parameter is the collection of tags<br />
{</address>
<address>ParameterExpression c = Expression.Parameter(typeof(ProductTable), &#8220;c&#8221;); //Get the parameter from Func&lt;ProductTable, bool&gt;, remember? this is the advanced and lazy version of delegation, we need to craete ParameterExpression to hold this</address>
<address>var tagsProperty = Expression.Property(c, typeof(ProductTable).GetProperty(&#8220;Tags&#8221;)); //Here is the expression for get the Tags value from ProductTable object</address>
<address>Type[] ContainsTypes = new Type[1];</address>
<address>ContainsTypes[0] = typeof(string);</address>
<address>System.Reflection.MethodInfo myContainsInfo = typeof(string).GetMethod(&#8220;Contains&#8221;, ContainsTypes);</address>
<address>//Create the expression collection (based on the tags collection from parameter)<br />
List&lt;Expression&gt; myTagExpressions = new List&lt;Expression&gt;();</address>
<address>foreach (var t in tags)<br />
{<br />
myTagExpressions.Add(Expression.Call(Expression.Call(tagsProperty, &#8220;ToString&#8221;, null, null), myContainsInfo, Expression.Constant(t)));<br />
}</address>
<address>Expression OrExpression = null;</address>
<address>foreach (Expression myTagExpression in myTagExpressions)<br />
{<br />
if (OrExpression == null)<br />
{<br />
OrExpression = myTagExpression;<br />
}<br />
else<br />
{<br />
//Need to implement OR relationship among all the expressions<br />
OrExpression = Expression.Or(myTagExpression, OrExpression);<br />
}<br />
}</address>
<address>//This is how Expression would be extracted to expression tree later on.<br />
Expression&lt;Func&lt;ProductTable, bool&gt;&gt; predicate = Expression.Lambda&lt;Func&lt;ProductTable, bool&gt;&gt;(OrExpression, c);</address>
<address>return predicate;</address>
<address>}</address>
<p>Again, you can&#8217;t copy the code, since you would NOT have the same object like ProductTable and the same &#8220;Tags&#8221; property as I do. Luckily, you still can copy the code that I provide later, which is using the magic of template or generic programming. Before that, let us see how to use it:</p>
<address>IQueryable all = table.Where(ApplyTags(new List{&#8220;mazda&#8221;,&#8221;luxury&#8221;})).AsQueryable();</address>
<p>Since so far, I am 100% sure you can do it like refactoring, re-structuring to optimize your code. However, I would like to provide the code which can be general used:</p>
<address>public static System.Linq.Expressions.Expression&lt;Func&lt;T, bool&gt;&gt; ApplyFilter&lt;T&gt;(IEnumerable&lt;string&gt; filters, string property)<br />
{<br />
//Get parameter<br />
ParameterExpression c = Expression.Parameter(typeof(T), &#8220;c&#8221;);</address>
<address>//Get property from &lt;T&gt;<br />
var tagsProperty = Expression.Property(c, typeof(T).GetProperty(property));</address>
<address>Type[] ContainsTypes = new Type[1];<br />
ContainsTypes[0] = typeof(string);<br />
System.Reflection.MethodInfo myContainsInfo = typeof(string).GetMethod(&#8220;Contains&#8221;, ContainsTypes);<br />
List&lt;Expression&gt; myTagExpressions = new List&lt;Expression&gt;();<br />
foreach (var t in filters)<br />
{<br />
myTagExpressions.Add(Expression.Call(Expression.Call(tagsProperty, &#8220;ToString&#8221;, null, null), myContainsInfo, Expression.Constant(t)));<br />
}<br />
Expression OrExpression = null;<br />
foreach (Expression myTagExpression in myTagExpressions)<br />
{<br />
if (OrExpression == null)<br />
{<br />
OrExpression = myTagExpression;<br />
}<br />
else<br />
{<br />
OrExpression = Expression.Or(myTagExpression, OrExpression);<br />
}<br />
}<br />
Expression&lt;Func&lt;T, bool&gt;&gt; predicate = Expression.Lambda&lt;Func&lt;T, bool&gt;&gt;(OrExpression, c);<br />
return predicate;<br />
}</address>
<p>The usage is similiar:</p>
<address>IQueryable all = table.Where(ApplyFilter&lt;ProductTable&gt;(new List{&#8220;mazda&#8221;,&#8221;luxury&#8221;}, &#8220;Tags&#8221;)).AsQueryable();</address>
<p>Not that hard, right?</p>
<p>Enjoy the powerful weapon, but don&#8217;t hurt yourself, bacause the deadline is ahead!</p>
<div id="_mcePaste" style="overflow: hidden; position: absolute; left: -10000px; top: 114px; width: 1px; height: 1px;">6    DVD Burner    car,BMW,x5,luxury</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.koumei.net/2010/03/10/use-lambda-expression-to-create-complicated-query/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>My Webklip Plugin For Wordpress: Goes Multiple-RSS!</title>
		<link>http://blog.koumei.net/2009/03/29/my-webklip-plugin-for-wordpress-goes-multiple-rss/</link>
		<comments>http://blog.koumei.net/2009/03/29/my-webklip-plugin-for-wordpress-goes-multiple-rss/#comments</comments>
		<pubDate>Sat, 28 Mar 2009 16:58:15 +0000</pubDate>
		<dc:creator>Koumei</dc:creator>
				<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Tech.]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[web klip]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.koumei.net/?p=293</guid>
		<description><![CDATA[Today I refactory the source code and add new features to Webklip, it becomes 1.2 and, most encouraging, multiple rss supports!
The improvement includes:

Uses template engine to show widget. No more embedded HTML.
Moves all functions to a util class
Supports up to 5 RSS
Still reads RSS feed dynamically on client-side

The feature version will be released next day [...]]]></description>
			<content:encoded><![CDATA[<p>Today I refactory the source code and add new features to Webklip, it becomes 1.2 and, most encouraging, multiple rss supports!</p>
<p>The improvement includes:</p>
<ul>
<li>Uses template engine to show widget. No more embedded HTML.</li>
<li>Moves all functions to a util class</li>
<li>Supports up to 5 RSS</li>
<li>Still reads RSS feed dynamically on client-side</li>
</ul>
<p>The feature version will be released next day or two, will enhance javascript flexibility. E.g., not compulsorily needs jQuery framework.</p>
<p>You can download the widget on <a title="wp-webKlip.zip" href="/download/wp-webKlip.zip" target="_blank">http://www.koumei.net/download/wp-webKlip.zip</a></p>
<p>Relative article:</p>
<p><a title="Permanent Link to Wordpress Widget: Client-side RSS util, The Web Klip Released!" rel="bookmark" href="http://blog.koumei.net/2009/03/21/wordpress-widget-client-side-rss-util-the-web-klip-released/">Wordpress Widget: Client-side RSS util, The Web Klip Released!</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.koumei.net/2009/03/29/my-webklip-plugin-for-wordpress-goes-multiple-rss/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Virtuemart: Ajax Effect on IE 8 Fix List based on Virtuemart 1.1.3(stable release since 22, Jan)</title>
		<link>http://blog.koumei.net/2009/03/23/virtuemart-ajax-effect-in-ie-8-fix-list-based-on-virtuemart-113stable-release-since-22-jan/</link>
		<comments>http://blog.koumei.net/2009/03/23/virtuemart-ajax-effect-in-ie-8-fix-list-based-on-virtuemart-113stable-release-since-22-jan/#comments</comments>
		<pubDate>Sun, 22 Mar 2009 13:27:54 +0000</pubDate>
		<dc:creator>Koumei</dc:creator>
				<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Tech.]]></category>
		<category><![CDATA[Ajax]]></category>
		<category><![CDATA[IE8]]></category>
		<category><![CDATA[mooTools]]></category>
		<category><![CDATA[virtuemart]]></category>

		<guid isPermaLink="false">http://www.koumei.net/?p=286</guid>
		<description><![CDATA[Virtuemart utilizes Ajax mostly by mooTools. It works fine in many browsers except microsoft newly released browser IE 8. Especially when user try to add a product to shopping cart using Ajax, the mooPrompt (a pop-up window) fails, and nothing happen on that page&#8230; Maybe the first thing you are about to do is to [...]]]></description>
			<content:encoded><![CDATA[<p>Virtuemart utilizes Ajax mostly by mooTools. It works fine in many browsers except microsoft newly released browser IE 8. Especially when user try to add a product to shopping cart using Ajax, the mooPrompt (a pop-up window) fails, and nothing happen on that page&#8230; Maybe the first thing you are about to do is to upgrade mooTools. Yes, that&#8217;s seems a great idea, however mooTools&#8217;s updates from 1.11 to 1.21 is totally a nightmare for developer. Many things change, you have to revise the code manually for Virtuemart. </p>
<p>The following files should be updated (if you want to satisfy IE 8 users):</p>
<ul>
<li>\components\com_virtuemart\js\mootools\mootools-release-1.11.js  (update to 1.21)</li>
<li><strong>\components\com_virtuemart\js\mootools\mooPrompt.js</strong> (you have to revise it manually. Should change a lot of JS class definitions in accordance with mootools 1.21 syntax)</li>
<li>\components\com_virtuemart\js\slimbox (update to slimbox for mootools 1.21)</li>
<li><strong>\components\com_virtuemart\themes\default\theme.js</strong> (you have to revise it manually. Should fix a bug on line 59, change to <em>var timeoutID = setTimeout( &#8216;document.boxB.close()&#8217;, 3000 );</em>)</li>
</ul>
<p>Besides updating corresponding files, you can also disable Ajax function on the administration page. Or.. Wait until next stable release of VM). If you need the files above, just leave me a message, and I will pack them up for you.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.koumei.net/2009/03/23/virtuemart-ajax-effect-in-ie-8-fix-list-based-on-virtuemart-113stable-release-since-22-jan/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>Web Klip Enhancement &#8211; Special Effect Applied</title>
		<link>http://blog.koumei.net/2009/03/22/web-klip-enhancement-special-effect-applied/</link>
		<comments>http://blog.koumei.net/2009/03/22/web-klip-enhancement-special-effect-applied/#comments</comments>
		<pubDate>Sat, 21 Mar 2009 14:14:43 +0000</pubDate>
		<dc:creator>Koumei</dc:creator>
				<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Tech.]]></category>

		<guid isPermaLink="false">http://www.koumei.net/?p=283</guid>
		<description><![CDATA[Currect release: 1.1
Download: http://www.koumei.net/download/wp-webKlip.zip
Not too much special effects. In order to make the contents which read from the underneath javascript show themselves up naturally. Not in a harsh.
]]></description>
			<content:encoded><![CDATA[<p>Currect release: 1.1</p>
<p>Download: <a title="wp-webKlip.zip" href="http://www.koumei.net/download/wp-webKlip.zip" target="_blank">http://www.koumei.net/download/wp-webKlip.zip</a></p>
<p>Not too much special effects. In order to make the contents which read from the underneath javascript show themselves up naturally. Not in a harsh.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.koumei.net/2009/03/22/web-klip-enhancement-special-effect-applied/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Wordpress Widget: Client-side RSS util, The Web Klip Released!</title>
		<link>http://blog.koumei.net/2009/03/21/wordpress-widget-client-side-rss-util-the-web-klip-released/</link>
		<comments>http://blog.koumei.net/2009/03/21/wordpress-widget-client-side-rss-util-the-web-klip-released/#comments</comments>
		<pubDate>Fri, 20 Mar 2009 16:33:14 +0000</pubDate>
		<dc:creator>Koumei</dc:creator>
				<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Tech.]]></category>
		<category><![CDATA[RSS util]]></category>
		<category><![CDATA[web klip]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.koumei.net/?p=272</guid>
		<description><![CDATA[The original Wordpress (2.7+) provides RSS clip widget from the other website. It looks good but it is server-side script that may occupy the server resource to interpret the RSS. I don&#8217;t like that approach. So I decide to create a client-side script that loads rss from other website or blog.
If you want to try, [...]]]></description>
			<content:encoded><![CDATA[<p>The original Wordpress (2.7+) provides RSS clip widget from the other website. It looks good but it is server-side script that may occupy the server resource to interpret the RSS. I don&#8217;t like that approach. So I decide to create a client-side script that loads rss from other website or blog.</p>
<p>If you want to try, just download the widget on <a title="wp-webKlip.zip" href="http://www.koumei.net/download/wp-webKlip.zip" target="_blank">http://www.koumei.net/download/wp-webKlip.zip</a> , then unzip to wp-content/plug-ins/ folder, and activate the plugin and add widget to you wordpress blog.</p>
<p>Before using this widget, there are some notes you should know:</p>
<ol>
<li><strong>Defects</strong>:<br />
Currently only support ONE RSS excerpt.<br />
Only shows the first RSS item.<br />
<span style="text-decoration: underline;">jQuery should be included on your blog. </span></li>
<li><strong>Usability</strong>:<br />
Site that provide at least 1 item RSS feed could be refered by this widget.</li>
<li><strong>Extension</strong>:<br />
Multiple-RSS and rollover will be available  on next release.</li>
</ol>
<p>The Demo:</p>
<address><img class="alignnone size-full wp-image-274" title="webklip_1" src="/wp-content/uploads/2009/03/webklip_1.jpg" alt="webklip_1" width="586" height="41" /><br />
<em> Picture 1. The plugin will be shown after you copy the unzipped file to your plugin folder</em></address>
<address><img class="alignnone size-full wp-image-275" title="webklip_2" src="/wp-content/uploads/2009/03/webklip_2.jpg" alt="webklip_2" width="298" height="228" /><br />
<em> Picture 2. Add the widget to the &#8220;Widgets&#8221; menu on your administration panel. You can add a RSS feed to this widget</em></address>
<p>You can  find the demo on the right side of my blog.</p>
<p> <img src='http://blog.koumei.net/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.koumei.net/2009/03/21/wordpress-widget-client-side-rss-util-the-web-klip-released/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>A Simple Rss2Json Service Released!</title>
		<link>http://blog.koumei.net/2009/03/20/a-simple-rss2json-service-released/</link>
		<comments>http://blog.koumei.net/2009/03/20/a-simple-rss2json-service-released/#comments</comments>
		<pubDate>Thu, 19 Mar 2009 14:33:43 +0000</pubDate>
		<dc:creator>Koumei</dc:creator>
				<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Tech.]]></category>
		<category><![CDATA[Ajax]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[JSON]]></category>
		<category><![CDATA[RSS]]></category>

		<guid isPermaLink="false">http://www.koumei.net/?p=264</guid>
		<description><![CDATA[Now I simply add a Rss2Json service on my blog, it just return the very first post from the target website as JSON and, of course, the target should be RSS format. The reason why I create this interface is because I would like to utilize cool AJAX to obtain the content from my friend&#8217;s [...]]]></description>
			<content:encoded><![CDATA[<p>Now I simply add a Rss2Json service on my blog, it just return the very first post from the target website as JSON and, of course, the target should be RSS format. The reason why I create this interface is because I would like to utilize cool AJAX to obtain the content from my friend&#8217;s blog, yet the browser secure prevent me crossing the boundary to other domain. Could it be working using iFrame? Negative. The only approach to cross the border is using JSON.</p>
<p>The definition of my interface is:</p>
<p><strong>Name</strong>: Rss2JSon<br />
<strong>Interface</strong>: http://www.koumei.net/rss2json/<br />
<strong>Method</strong>: GET<br />
<strong>Parameter 1</strong>:  rss  &#8211; The URL of the rss content<br />
<strong>Parameter 2</strong>: cb &#8212; The javascript callback function<br />
<strong>Return</strong>: application/x-javascript<br />
<strong>Example</strong>: http://www.koumei.net/rss2json/?rss=http://www.blogjava.net/max/rss&amp;cb=&lt;callback&gt;  (A blog of my friend)</p>
<p>The callback function is very <strong><span style="font-family: mceinline;"><span style="text-decoration: underline;">significant</span></span></strong>. Don&#8217;t forget to define a callback JS function on your script. The definition of the callback function should be similar as below ( parameter rss is an object, containing &#8220;title&#8221;, &#8220;link&#8221; and &#8220;description&#8221; and so forth&lt;please go through RSS schema on item tag&gt;.)</p>
<p><em>&lt;script type=&#8221;text/javascript&#8221;&gt; </em></p>
<p><em>function myCallback(rss){<br />
    var title = rss["title"];   // or rss.title<br />
    var link = rss["link"];  // or rss.link<br />
    var desc = rss["description"];  // or rss.description.<br />
}</em></p>
<p><em>&lt;/script&gt;</em></p>
<p>Now, you can embed the script to wherever you need.<br />
&lt;script type=&#8221;text/javascript&#8221; src=&#8221;http://www.koumei.net/rss2json/?rss=http://www.blogjava.net/max/rss&amp;cb=myCallback&#8221;&gt;&lt;/script&gt; </p>
<p>Enjoy scripting.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.koumei.net/2009/03/20/a-simple-rss2json-service-released/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

