<?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>Coding with Coffee</title>
	<atom:link href="http://codingwithcoffee.com/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://codingwithcoffee.com</link>
	<description>Personal blog focused on technical notes, code snippets and software</description>
	<lastBuildDate>Sun, 22 May 2011 13:06:02 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>jQuery.i18n.properties</title>
		<link>http://codingwithcoffee.com/?p=272</link>
		<comments>http://codingwithcoffee.com/?p=272#comments</comments>
		<pubDate>Fri, 11 Sep 2009 10:51:39 +0000</pubDate>
		<dc:creator>Nuno</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[sakai]]></category>
		<category><![CDATA[i18n]]></category>
		<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://codingwithcoffee.com/?p=272</guid>
		<description><![CDATA[jQuery.i18n.properties is a lightweight jQuery plugin for providing internationalization to javascript from '.properties' files, just like in Java Resource Bundles. It loads and parses resource bundles (.properties) based on provided language and country codes (ISO-639 and ISO-3166) or language reported by browser.]]></description>
			<content:encoded><![CDATA[<div class="info" style="padding-top:5px; margin-top:0px"><b>Project page has moved!</b><br/><br />
The project page for the jQuery.i18n.properties plugin is now located at:<br/><a href="http://code.google.com/p/jquery-i18n-properties/">http://code.google.com/p/jquery-i18n-properties</a><br/><br/> </p>
<p>Due to lack of resources, the plugin has received little or no attention lately&#8230; If you would like to volunteer by helping on the plugin development, please contact me to become a project committer!<br/><br/></p>
<p>The page below is now locked for editing and commenting, and will be kept here only for historic purposes. Please use the new project page for <a href="http://code.google.com/p/jquery-i18n-properties/issues/list">creating issues</a>, <a href="http://groups.google.com/group/jqueryi18nproperties-general">providing feedback</a>, etc&#8230;
</div>
<p><br/></p>
<h2>About</h2>
<p><br/></p>
<p><strong>jQuery.i18n.properties</strong> is a lightweight <em>jQuery</em> plugin for providing internationalization to javascript from &#8216;.properties&#8217; files, just like in Java Resource Bundles. It loads and parses resource bundles (.properties) based on provided language and country codes (ISO-639 and ISO-3166) or language reported by browser.</p>
<p><br/></p>
<p>Resource bundles are &#8216;<em>.properties</em>&#8216; files containing locale specific key-value pairs. The use of &#8216;<em>.properties</em>&#8216; files for translation is specially useful when sharing i18n files between Java and JavaScript projects. This plugin loads the default file (eg, Messages.properties) first and then locale specific files (Messages_pt.properties, then Messages_pt_PT.properties), so that a default value is always available when there is no translation provided. Translation keys will be available to developer as javascript variables/functions (functions, if translated value contains substitutions (eg, {0}) or as a map.</p>
<p><br/></p>
<p>This plugin was inspired on the <a href="http://keith-wood.name/localisation.html">Localisation assistance for jQuery</a> from Keith Wood, and is made available under a dual license (GPL and MIT).</p>
<p><br/><br />
<h2>Features</h2>
<p><br/></p>
<ul>
<li>Use Java standard &#8216;<em>.properties</em>&#8216; files for translations</li>
<li>Use standard ISO-639 for language code and ISO-3166 for country code</li>
<li>Sequential loading of resource bundles from base language to user-specified/browser-specified so there is always a default value for an untranslated string (eg: msg.properties, msg_pt.properties, msg_pt_PT.properties)</li>
<li>Use browser reported language if no language was specified</li>
<li>Placeholder substitution in resource bundle strings (eg, msg_hello = Hello {0}!!)</li>
<li>Suport for namespaces in keys (eg, com.company.msgs.hello = Hello!)</li>
<li>Support for multi-line property values</li>
<li>Resource bundle keys available as Javascript vars/functions or as a map</li>
</ul>
<p><br/><br />
<h2>Example</h2>
<p><br/></p>
<p>Take as an example the following <em>Messages.properties</em>, <em>Messages_pt.properties</em> and <em>Messages_pt_PT.properties</em>:
</p>
<h6>Messages.properties</h6>
<div class="codecolorer-container properties twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br /></div></td><td><div class="properties codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #808080; font-style: italic;"># This line is ignored by the plugin</span><br />
<span style="color: #000080; font-weight:bold;">msg_hello</span> <span style="color: #000000;">=</span><span style="color: #008000; font-weight:bold;"> Hello</span><br />
<span style="color: #000080; font-weight:bold;">msg_world</span> <span style="color: #000000;">=</span><span style="color: #008000; font-weight:bold;"> World</span><br />
<span style="color: #000080; font-weight:bold;">msg_complex</span> <span style="color: #000000;">=</span><span style="color: #008000; font-weight:bold;"> Good morning <span style="">&#123;</span>0<span style="">&#125;</span>!</span></div></td></tr></tbody></table></div>
<h6>Messages_pt.properties</h6>
<div class="codecolorer-container properties twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br /></div></td><td><div class="properties codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #808080; font-style: italic;"># We only provide a translation for the 'msg_hello' key</span><br />
<span style="color: #000080; font-weight:bold;">msg_hello</span> <span style="color: #000000;">=</span><span style="color: #008000; font-weight:bold;"> Bom dia</span></div></td></tr></tbody></table></div>
<h6>Messages_pt_PT.properties</h6>
<div class="codecolorer-container properties twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br /></div></td><td><div class="properties codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #808080; font-style: italic;"># We only provide a translation for the 'msg_hello' key</span><br />
<span style="color: #000080; font-weight:bold;">msg_hello</span> <span style="color: #000000;">=</span><span style="color: #008000; font-weight:bold;"> Olá</span></div></td></tr></tbody></table></div>
<p/>
Now, suppose these files are located on the &#8216;<em>bundle/</em>&#8216; folder. One can invoke the plugin like below:</p>
<div class="codecolorer-container javascript twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br />20<br />21<br />22<br />23<br /></div></td><td><div class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #006600; font-style: italic;">// This will initialize the plugin </span><br />
<span style="color: #006600; font-style: italic;">// and show two dialog boxes: one with the text &quot;Olá World&quot;</span><br />
<span style="color: #006600; font-style: italic;">// and other with the text &quot;Good morning John!&quot; </span><br />
jQuery.<span style="color: #660066;">i18n</span>.<span style="color: #660066;">properties</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #000066;">name</span><span style="color: #339933;">:</span><span style="color: #3366CC;">'Messages'</span><span style="color: #339933;">,</span> <br />
&nbsp; &nbsp; path<span style="color: #339933;">:</span><span style="color: #3366CC;">'bundle/'</span><span style="color: #339933;">,</span> <br />
&nbsp; &nbsp; mode<span style="color: #339933;">:</span><span style="color: #3366CC;">'both'</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; language<span style="color: #339933;">:</span><span style="color: #3366CC;">'pt_PT'</span><span style="color: #339933;">,</span> <br />
&nbsp; &nbsp; callback<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #006600; font-style: italic;">// We specified mode: 'both' so translated values will be</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #006600; font-style: italic;">// available as JS vars/functions and as a map</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #006600; font-style: italic;">// Accessing a simple value through the map</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; jQuery.<span style="color: #660066;">i18n</span>.<span style="color: #660066;">prop</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'msg_hello'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #006600; font-style: italic;">// Accessing a value with placeholders through the map</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; jQuery.<span style="color: #660066;">i18n</span>.<span style="color: #660066;">prop</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'msg_complex'</span><span style="color: #339933;">,</span> <span style="color: #009900;">&#91;</span><span style="color: #3366CC;">'John'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #006600; font-style: italic;">// Accessing a simple value through a JS variable</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066;">alert</span><span style="color: #009900;">&#40;</span>msg_hello <span style="color: #339933;">+</span><span style="color: #3366CC;">' '</span><span style="color: #339933;">+</span> msg_world<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #006600; font-style: italic;">// Accessing a value with placeholders through a JS function</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066;">alert</span><span style="color: #009900;">&#40;</span>msg_complex<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'John'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></td></tr></tbody></table></div>
<p>This will initialize the plugin (loading bundle files and parsing them) and show a dialog box with the text <strong>&#8220;Olá World&#8221;</strong> and other with <strong>&#8220;Good morning John!&#8221;</strong>. The english word &#8220;World&#8221; is shown because we  didn&#8217;t provide a translation for the <em>msg_world</em> key. Also notice that keys are available as a <u>map</u> and also as <u>javascript variables</u> (for simple strings) and <u>javascript functions</u> (for strings with placeholders for substitution).</p>
<p><br/><br />
<h2>Usage</h2>
<h3>Options</h3>
<table style="border: 1px solid #283C4B;">
<thead style=";color:#fff">
<th style="background-color:#283C4B">Option</th>
<th style="background-color:#283C4B">Description</th>
<th style="background-color:#283C4B">Notes</th>
</thead>
<tbody>
<tr>
<td><strong>name</strong></td>
<td>Partial name (or names) of files representing resource bundles (eg, &#8216;Messages&#8217; or ['Msg1','Msg2'])</td>
<td><strong>Required</strong><br/>String or String[]</td>
</tr>
<tr>
<td><strong>language</strong></td>
<td>ISO-639 Language code and, optionally, ISO-3166 country code (eg, &#8216;en&#8217;, &#8216;en_US&#8217;, &#8216;pt_PT&#8217;). If not specified, language reported by the browser will be used instead.</td>
<td><strong>Optional</strong><br/>String</td>
</tr>
<tr>
<td><strong>path</strong></td>
<td>Path to directory that contains &#8216;<em>.properties</em>&#8216; files to load.</td>
<td><strong>Optional</strong><br/>String</td>
</tr>
<tr>
<td><strong>mode</strong></td>
<td>Option to have resource bundle keys available as Javascript vars/functions OR as a map. The &#8216;map&#8217; option is mandatory if your bundle keys contain <a href="http://javascript.about.com/library/blreserved.htm">Javascript Reserved Words</a>. Possible options: &#8216;vars&#8217; (default),  &#8216;map&#8217; or &#8216;both&#8217;</td>
<td><strong>Optional</strong><br/>String </td>
</tr>
<tr>
<td><strong>callback</strong></td>
<td>Callback function to be called uppon script execution completion.</td>
<td><strong>Optional</strong><br/>function()</td>
</tr>
</tbody>
</table>
<p/>
<h3>Including and invoking the plugin</h3>
<ol>
<li>Load the script:
<div class="codecolorer-container javascript twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br /></div></td><td><div class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #339933;">&lt;</span>script type<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;text/javascript&quot;</span> language<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;JavaScript&quot;</span><br />
&nbsp; src<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;js/jquery.i18n.properties-min.js&quot;</span><span style="color: #339933;">&gt;&lt;/</span>script<span style="color: #339933;">&gt;</span></div></td></tr></tbody></table></div>
</li>
<li>Initialize the plugin (minimal usage, will use language reported by browser), and access a translated value (assuming a key named &#8216;<u>org.somekey</u>&#8216; exists):
<div class="codecolorer-container javascript twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br /></div></td><td><div class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">jQuery.<span style="color: #660066;">i18n</span>.<span style="color: #660066;">properties</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span><br />
&nbsp; <span style="color: #000066;">name</span><span style="color: #339933;">:</span> <span style="color: #3366CC;">'Messages'</span><span style="color: #339933;">,</span> <br />
&nbsp; callback<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span> <span style="color: #000066;">alert</span><span style="color: #009900;">&#40;</span> org.<span style="color: #660066;">somekey</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span><br />
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></td></tr></tbody></table></div>
</ol>
<p><br/><br />
<h2>Demo</h2>
<p><a href="/files/trunk/index.html">See a small demonstration</a></p>
<p><br/><br />
<h2>Download</h2>
<p><br/></p>
<h5>1.0.8<small>&nbsp;&nbsp;[2010-07-09]</small></h5>
<ul>
<li><a href="http://codingwithcoffee.com/websvn/dl.php?repname=jQuery.18n.properties&#038;path=%2Ftags%2F1.0.8%2Fjquery.i18n.properties.js&#038;rev=11&#038;peg=11&#038;">jquery.i18n.properties.js</a> <em>(13 KB)</em></li>
<li><a href="http://codingwithcoffee.com/websvn/dl.php?repname=jQuery.18n.properties&#038;path=%2Ftags%2F1.0.8%2Fjquery.i18n.properties-min.js&#038;rev=11&#038;peg=11&#038;">jquery.i18n.properties-min.js</a> <em>(3.3 KB)</em></li>
</ul>
<p><br/><br />
<h2>Change Log</h2>
<p><br/></p>
<h5>1.0.8<small>&nbsp;&nbsp;[2010-07-09]</small></h5>
<ul>
<li>Fixed IE bug caused by the MS buggy implementation of String.split() method</li>
</ul>
<h5>1.0.7<small>&nbsp;&nbsp;[2010-06-09]</small></h5>
<ul>
<li>Added support for multi-line properties</li>
<li>Prevent browser caching of old property files</li>
</ul>
<h5>1.0.6<small>&nbsp;&nbsp;[2010-03-28]</small></h5>
<ul>
<li>Fixed checkKeyNamespace issue (FF only)</li>
<li>Fixed issue that truncated values when containing &#8216;=&#8217; symbol</li>
<li>Added demo page</li>
</ul>
<h5>1.0.4<small>&nbsp;&nbsp;[2009-12-29]</small></h5>
<ul>
<li>When using the map approach to retrieve bundle values, unicode chars may not be properly unescaped</li>
</ul>
<h5>1.0.3<small>&nbsp;&nbsp;[2009-10-06]</small></h5>
<ul>
<li>When using the map approach to retrieve bundle values, if there&#8217;s no value for a specified key, key is returned (previously, null was returned)</li>
<li>Fixed lot of errors accordingly to JSLint</li>
</ul>
<h5>1.0.2<small>&nbsp;&nbsp;[2009-09-18]</small></h5>
<ul>
<li>Option to have resource bundle keys available as Javascript vars/functions AND/OR as a map. The later is mandatory if your bundle keys contain <a href="http://javascript.about.com/library/blreserved.htm">Javascript reserved words</a></li>
</ul>
<h5>1.0.1<small>&nbsp;&nbsp;[2009-09-14]</small></h5>
<ul>
<li><a href="http://plugins.jquery.com/node/10297">Keys with namespaces doesn&#8217;t work</a></li>
<li><a href="http://plugins.jquery.com/node/10296">Values with quotation mark (&#8220;) break the code</a></li>
</ul>
<p><br/><br />
<h2>Known issues</h2>
<p><br/></p>
<ul>
<li>Cross-site requests not allowed (see <a href="http://en.wikipedia.org/wiki/Same_origin_policy">Same Origin policy</a>).</li>
<li>Local file requests (file://) may fail in some browsers (<a href="http://code.google.com/p/chromium/issues/detail?id=40787">Chrome Issue 40787</a>)</li>
<li>Having HTML elements with IDs equal to key values in .properties files will fail on some browsers (IE, Chrome) when values are not accessed through jQuery.i18n.prop() method.<br />
Example:</p>
<div class="codecolorer-container text twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&nbsp; &lt;!-- on HTML file: --&gt;<br />
&nbsp; &lt;div id=&quot;test123&quot;&gt;ola&lt;/div&gt;<br />
&nbsp; # on .properties file:<br />
&nbsp; test123 = qwerty</div></td></tr></tbody></table></div>
<p>Executing <i>&#8220;alert(test123);&#8221;</i> will output the div object with id <i>&#8220;ola&#8221;</i> and not the <i>&#8220;qwerty&#8221;</i> string!
</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://codingwithcoffee.com/?feed=rss2&#038;p=272</wfw:commentRss>
		<slash:comments>102</slash:comments>
		</item>
		<item>
		<title>SiteStats 2.0 released!</title>
		<link>http://codingwithcoffee.com/?p=169</link>
		<comments>http://codingwithcoffee.com/?p=169#comments</comments>
		<pubDate>Wed, 05 Aug 2009 13:38:40 +0000</pubDate>
		<dc:creator>Nuno</dc:creator>
				<category><![CDATA[sakai]]></category>
		<category><![CDATA[sitestats]]></category>

		<guid isPermaLink="false">http://codingwithcoffee.com/?p=169</guid>
		<description><![CDATA[I am very pleased to announce the 2.0 release of SiteStats for Sakai. SiteStats allows authorized users to view site usage statistics related to site visits, tool activity and resource activity. This version is available for Sakai 2.5 and Sakai 2.6.]]></description>
			<content:encoded><![CDATA[<p><a style="float: right" href="http://codingwithcoffee.com/wp-content/uploads/2009/05/sst2-overview.png" rel="shadowbox[sbpost-169];player=img;"><img src="http://codingwithcoffee.com/wp-content/uploads/2009/05/sst2-overview-150x150.png" alt="SiteStats 2.0" title="SiteStats 2.0" width="150" height="150" class="size-thumbnail wp-image-148" /></a>I am very pleased to announce the 2.0 release of <strong>SiteStats</strong> for Sakai!<br/><br />
SiteStats allows authorized users to view site usage statistics related to user visits, tool activity and resource activity. This version is available for Sakai 2.6 and Sakai 2.5.<br/><br />
SiteStats 2.0 is major rewrite of previous version with several optimizations, a new exciting ajax based UI with powerful reporting options and enhanced tool support. This release incorporates over <a href="http://jira.sakaiproject.org/browse/STAT/fixforversion/11273" target="_blank">70 bugfixes and enhancements</a>! (<a href="http://jira.sakaiproject.org/secure/ReleaseNote.jspa?projectId=10150&#038;styleName=Html&#038;version=11273" target="_blank">Release notes</a>)<br/></p>
<div style="font-size:14px; font-weight: bold; margin: 20px 0px 10px">Features:</div>
<div style="font-size: 12px">
<ul>
<li><strong>Overview page with summary information presenting most instructor requested information related to site visits, tool activity and resource activity:</strong>
<ul>
<li>Simple statistics<span style="color: #888888;"> (e.g., &#8216;Most active user&#8217;, &#8216;Enrolled users that did not visit site&#8217;, &#8216;Most opened file&#8217;, &#8230;)</span> <span class="action" style="color:rgb(201, 88, 20);font-size: 11px; padding-left: 5px">New!</span></li>
<li>Expandable area with compact chart and table view with predefined grouping<span style="color: #888888;"> (e.g., &#8216;By date&#8217;, &#8216;By user&#8217;, &#8230;) </span>and filtering<span style="color: #888888;"> (e.g., filtering by user role, date, &#8230;)</span> options <span class="action" style="color:rgb(201, 88, 20);font-size: 11px; padding-left: 5px">New!</span></li>
</ul>
</li>
<li><strong>Reports page with support for</strong>:
<ul>
<li>User-defined reports, per site <span class="action" style="color:rgb(201, 88, 20);font-size: 11px; padding-left: 5px">New!</span></li>
<li>Predefined reports, available on all sites <span class="action" style="color:rgb(201, 88, 20);font-size: 11px; padding-left: 5px">New!</span></li>
</ul>
</li>
<li><strong>Advanced reporting capabilities</strong>:
<ul>
<li>Type of activity to report <span style="color: #888888;">(visits, tool activity, resource activity)</span></li>
<li>Time period to report</li>
<li>Target users to report</li>
<li>Results grouping capabilities <span class="action" style="color:rgb(201, 88, 20);font-size: 11px; padding-left: 5px">New!</span></li>
<li>Report presentation: table and/or chart <span class="action" style="color:rgb(201, 88, 20);font-size: 11px; padding-left: 5px">New!</span></li>
<li>Printable</li>
<li>Exportable <span style="color: #888888;">(Excel, CSV or PDF)</span></li>
</ul>
</li>
<li><strong>Admin tool capabilities</strong>:
<ul>
<li>Browse statistics per site</li>
<li>Build predefined reports to be available on all sites <span class="action" style="color:rgb(201, 88, 20);font-size: 11px; padding-left: 5px">New!</span></li>
<li>Build admin reports to report against all sites <span class="action" style="color:rgb(201, 88, 20);font-size: 11px; padding-left: 5px">New!</span></li>
</ul>
</li>
<li><strong>Highly configurable</strong>:
<ul>
<li>Use Sakai database or an externally specified database<span style="color: #888888;"> (support for MySQL and Oracle)</span></li>
<li>Aggregate events instantly or on a regular time interval<span style="color: #888888;"> (e.g., once a day)</span></li>
<li>Aggregate events for all sites or only for sites with the SiteStats tool placed</li>
<li>And many other configurable options!</li>
</ul>
</li>
<li><strong>Other</strong>:
<ul>
<li>Support for a large number of tools <span class="action" style="color:rgb(201, 88, 20);font-size: 11px; padding-left: 5px">New!</span> <b>(1)</b></li>
<li>Apache Wicket as rendering engine</li>
<li>Automatic event registration for tools implementing Entitybroker <a href="https://source.sakaiproject.org/svn/entitybroker/trunk/api/src/java/org/sakaiproject/entitybroker/entityprovider/capabilities/Statisticable.java" target="_blank">Statisticable</a> capability <span class="action" style="color:rgb(201, 88, 20);font-size: 11px; padding-left: 5px">New!</span> <b>(2)</b></li>
<li>Import reports from other sites <span style="color: #888888;">(Site Info -> Import from site)</span> <span class="action" style="color:rgb(201, 88, 20);font-size: 11px; padding-left: 5px">New!</span></li>
<li>Help contents available (English only) <span class="action" style="color:rgb(201, 88, 20);font-size: 11px; padding-left: 5px">New!</span></li>
<li>Available in English, Portuguese, French, Spanish, Russian, Chinese and Swedish</li>
</ul>
</li>
</ul>
</div>
<div style="font-size: 11px">
<b>(1) </b>Some tools can have limited or no support on Sakai 2.5 (unless <a href="http://confluence.sakaiproject.org/display/STAT/SiteStats+and+SAK-10801" target="_blank">SAK-10801</a> is applied)<br />
<b>(2) </b>Not supported on Sakai 2.5</div>
<div style="font-size:14px; font-weight: bold; margin: 25px 0px 10px">SiteStats 2.0 release information:</div>
<div style="font-size: 12px">
<ul>
<li><a href="http://bugs.sakaiproject.org/confluence/display/STAT/Features" target="_blank">List of features</a></li>
<li><a href="http://bugs.sakaiproject.org/confluence/display/STAT/2.0+Release+Screenshots" target="_blank">Screenshots</a></li>
<li><a href="http://bugs.sakaiproject.org/confluence/display/STAT/Installation+Guide" target="_blank">Installation guide</a></li>
<li><a href="http://bugs.sakaiproject.org/confluence/display/STAT/Configuration+Options" target="_blank">Configuration options</a></li>
<li><a title="Download" href="http://confluence.sakaiproject.org/display/STAT" target="_blank">Download</a></li>
</ul>
</div>
<p>For more information, please consult the <a title="SiteStats official page" href="http://confluence.sakaiproject.org/display/STAT" target="_blank">SiteStats official page</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://codingwithcoffee.com/?feed=rss2&#038;p=169</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SiteStats 2.0 Release Candidate 1</title>
		<link>http://codingwithcoffee.com/?p=145</link>
		<comments>http://codingwithcoffee.com/?p=145#comments</comments>
		<pubDate>Thu, 07 May 2009 10:25:19 +0000</pubDate>
		<dc:creator>Nuno</dc:creator>
				<category><![CDATA[sakai]]></category>
		<category><![CDATA[sitestats]]></category>

		<guid isPermaLink="false">http://codingwithcoffee.com/?p=145</guid>
		<description><![CDATA[A fresh tag has been cut for testing and evaluation of SiteStats 2.0. The code is only a few tweaks and/or bugfixes away from the final release, so you may wish to give it a try!]]></description>
			<content:encoded><![CDATA[<p>A fresh tag has been cut for testing and evaluation of <strong>SiteStats 2.0</strong>! The code is only a few tweaks and/or bugfixes away from the final release, so you may wish to give it a try!<br />
<center><br />
<a href="http://codingwithcoffee.com/wp-content/uploads/2009/05/sst2-overview.png" rel="shadowbox[sbpost-145];player=img;"><img src="http://codingwithcoffee.com/wp-content/uploads/2009/05/sst2-overview-150x150.png" alt="SiteStats 2.0" title="SiteStats 2.0 initial page" width="150" height="150" class="size-thumbnail wp-image-148" /></a></center><br />
Download from SVN: <a href="https://source.sakaiproject.org/contrib/ufp/sitestats/tags/sitestats_2-0-rc1">Site Stats 2.0 Release Candidate 1</a></p>
<div class="warn">This RC1 version is only available for Sakai 2.6.x/trunk builds. The final release will be available for Sakai 2.4.x/2.5.x/2.6.x/trunk.</div>
<p><br/><br />
<strong>SiteStats 2.0 release information:</strong></p>
<ul>
<li><a href="http://bugs.sakaiproject.org/confluence/display/STAT/Features" target="_blank">List of features</a></li>
<li><a href="http://bugs.sakaiproject.org/confluence/display/STAT/2.0+Release+Screenshots" target="_blank">Screenshots</a></li>
<li><a href="http://bugs.sakaiproject.org/confluence/display/STAT/Installation+Guide" target="_blank">Installation guide</a></li>
<li><a href="http://bugs.sakaiproject.org/confluence/display/STAT/Configuration+Options" target="_blank">Configuration options</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://codingwithcoffee.com/?feed=rss2&#038;p=145</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Auto detection of Sakai K1 or pre-K1 dependencies in Maven projects</title>
		<link>http://codingwithcoffee.com/?p=135</link>
		<comments>http://codingwithcoffee.com/?p=135#comments</comments>
		<pubDate>Thu, 07 May 2009 09:45:01 +0000</pubDate>
		<dc:creator>Nuno</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[sakai]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[maven]]></category>

		<guid isPermaLink="false">http://codingwithcoffee.com/?p=135</guid>
		<description><![CDATA[An approach for auto activation of Sakai K1/pre-K1 Maven profiles, as outlined on the Steve Swinsburg profile approach for selecting appropriate Sakai K1 and pre-K1 kernel module dependencies.]]></description>
			<content:encoded><![CDATA[<p>Following the excellent profile-approach for activation of Sakai Kernel K1 or pre-K1 dependencies (<a href="http://steve-on-sakai.blogspot.com/2009/03/build-profiles-and-sakai-dependencies.html" target="_blank">from Steve Swinsburg blog entry</a>), I came up with an approach for auto activation of the most appropriate profile.</p>
<p><br/></p>
<p>This approach consists in checking for the existence of the sakai <strong>kernel-deploy/</strong> module, only available on K1 builds. Basically, instead of checking for the <i>../kernel-deploy/pom.xml</i> file (which fails for cases where optional tools are not downloaded to the Sakai source folder) we will be checking for <i>../master/../kernel-deploy/pom.xml</i>. This works for standard and non-standard source folder layouts (where linking to <strong>pom.xml</strong> and <strong>master/</strong> is required) because the way the OS follow symlinks:</p>
<div class="codecolorer-container bash twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br />20<br />21<br />22<br />23<br />24<br />25<br />26<br />27<br />28<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666; font-style: italic;">### STANDARD LAYOUT:</span><br />
<span style="color: #000000; font-weight: bold;">/</span>src<br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">|</span>--sakai<span style="color: #000000; font-weight: bold;">/</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">|</span>--authz<span style="color: #000000; font-weight: bold;">/</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">|</span>--alias<span style="color: #000000; font-weight: bold;">/</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">|</span>--...<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">|</span>--master<span style="color: #000000; font-weight: bold;">/</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">|</span>--kernel-deploy<span style="color: #000000; font-weight: bold;">/</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">|</span>--...<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">|</span>--sitestats<span style="color: #000000; font-weight: bold;">/</span> &nbsp;<span style="color: #7a0874; font-weight: bold;">&#40;</span>or any non-core tool<span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">|</span>--... <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">|</span>--pom.xml<br />
<br />
<span style="color: #666666; font-style: italic;">### NON-STANDARD LAYOUT:</span><br />
<span style="color: #000000; font-weight: bold;">/</span>src<br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">|</span>--sakai<span style="color: #000000; font-weight: bold;">/</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">|</span>--authz<span style="color: #000000; font-weight: bold;">/</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">|</span>--alias<span style="color: #000000; font-weight: bold;">/</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">|</span>--...<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">|</span>--master<span style="color: #000000; font-weight: bold;">/</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">|</span>--kernel-deploy<span style="color: #000000; font-weight: bold;">/</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">|</span>--...<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">|</span>--pom.xml<br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">|</span>--contrib<span style="color: #000000; font-weight: bold;">/</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">|</span>--pom.xml <span style="color: #7a0874; font-weight: bold;">&#40;</span>links to ..<span style="color: #000000; font-weight: bold;">/</span>sakai<span style="color: #000000; font-weight: bold;">/</span>pom.xml<span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>required<span style="color: #7a0874; font-weight: bold;">&#93;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">|</span>--master<span style="color: #000000; font-weight: bold;">/</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>links to ..<span style="color: #000000; font-weight: bold;">/</span>sakai<span style="color: #000000; font-weight: bold;">/</span>master<span style="color: #000000; font-weight: bold;">/</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>required<span style="color: #7a0874; font-weight: bold;">&#93;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">|</span>--sitestats<span style="color: #000000; font-weight: bold;">/</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>or any non-core tool<span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">|</span>--...</div></td></tr></tbody></table></div>
<p>So, in your pom.xml files, you implement profile auto-activation as follows:</p>
<div class="codecolorer-container xml twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br />20<br />21<br />22<br />23<br />24<br />25<br />26<br />27<br /></div></td><td><div class="xml codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&nbsp; <span style="color: #808080; font-style: italic;">&lt;!-- ... --&gt;</span><br />
<br />
&nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;profiles<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
<br />
&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;profile<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">&lt;!-- Binds to Sakai Kernel K1 - for Sakai 2.6.0+ --&gt;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;id<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>K1<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/id<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;activation<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;file<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;exists<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>../master/../kernel-deploy/pom.xml<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/exists<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/file<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/activation<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/profile<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
<br />
&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;profile<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">&lt;!-- Binds to Sakai pre Kernel K1 - for Sakai 2.4.x/2.5.x --&gt;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;id<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>pre-K1<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/id<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;activation<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;file<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;missing<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>../master/../kernel-deploy/pom.xml<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/missing<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/file<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/activation<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;profile<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
<br />
&nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/profiles<span style="color: #000000; font-weight: bold;">&gt;</span></span></span> <br />
<br />
&nbsp; <span style="color: #808080; font-style: italic;">&lt;!-- ... --&gt;</span></div></td></tr></tbody></table></div>
<p>&#8230; et voilÃ¡! You may want to read through <a href="http://steve-on-sakai.blogspot.com/2009/03/build-profiles-and-sakai-dependencies.html" target="_blank">Steve Swinsburg blog entry</a> to implement the set of dependencies for each profile! Alternatively, you may want to read <a href="http://steve-on-sakai.blogspot.com/2009/05/build-profiles-and-sakai-dependencies.html" target="_blank">Steve&#8217;s post</a> about this profile auto activation approach!</p>
]]></content:encoded>
			<wfw:commentRss>http://codingwithcoffee.com/?feed=rss2&#038;p=135</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Workaround fix for ORA-01795: maximum number of expressions in a list</title>
		<link>http://codingwithcoffee.com/?p=121</link>
		<comments>http://codingwithcoffee.com/?p=121#comments</comments>
		<pubDate>Mon, 04 May 2009 12:04:23 +0000</pubDate>
		<dc:creator>Nuno</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[oracle]]></category>

		<guid isPermaLink="false">http://codingwithcoffee.com/?p=121</guid>
		<description><![CDATA[A workaround fix for ORA-01795: maximum number of expressions in a list. The article describes the proposed fix and presents sample java code for it.]]></description>
			<content:encoded><![CDATA[<p>When working with Oracle database, ORA-01795 (maximum number of expressions in a list) is a typical error when working with a large number of expressions in list parameters (<b>IN(expr_list)</b>).</p>
<h6>The workaround</h6>
<p>A simple workaround is to partition this parameter list in smaller lists with a maximum of 1000 elements (the oracle limit). Example, using HQL syntax (the Hibernate Query Language):</p>
<div class="codecolorer-container sql twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br /></div></td><td><div class="sql codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #808080; font-style: italic;">-- Instead of having:</span><br />
s<span style="color: #66cc66;">.</span>userId <span style="color: #993333; font-weight: bold;">IN</span> <span style="color: #66cc66;">&#40;</span>:users<span style="color: #66cc66;">&#41;</span><br />
<span style="color: #808080; font-style: italic;">-- We will have:</span><br />
<span style="color: #66cc66;">&#40;</span><br />
&nbsp; s<span style="color: #66cc66;">.</span>userId <span style="color: #993333; font-weight: bold;">IN</span> <span style="color: #66cc66;">&#40;</span>:users0<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">OR</span> <br />
&nbsp; s<span style="color: #66cc66;">.</span>userId <span style="color: #993333; font-weight: bold;">IN</span> <span style="color: #66cc66;">&#40;</span>:users1<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">OR</span> <br />
&nbsp; <span style="color: #66cc66;">...</span> <span style="color: #993333; font-weight: bold;">OR</span><br />
&nbsp; s<span style="color: #66cc66;">.</span>userId <span style="color: #993333; font-weight: bold;">IN</span> <span style="color: #66cc66;">&#40;</span>:usersN<span style="color: #66cc66;">&#41;</span><br />
<span style="color: #66cc66;">&#41;</span></div></td></tr></tbody></table></div>
<p/>
<h6>The workaround: Java implementation</h6>
<p>If you&#8217;re programming in Java, you can build the HQL query and pass its parameters as described below:</p>
<div class="codecolorer-container java twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br />20<br />21<br />22<br />23<br />24<br />25<br />26<br />27<br />28<br />29<br />30<br />31<br />32<br />33<br />34<br />35<br />36<br />37<br />38<br />39<br />40<br />41<br />42<br />43<br />44<br />45<br />46<br />47<br />48<br />49<br />50<br />51<br />52<br />53<br />54<br />55<br /></div></td><td><div class="java codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666; font-style: italic;">// The HQL query string</span><br />
StringBuilder hql <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> StringBuilder<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;select * from Table s where &quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
<span style="color: #666666; font-style: italic;">// The original user IDs list</span><br />
<a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Alist+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">List</span></a> userIds <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> ArrayList<span style="color: #339933;">&lt;</span>String<span style="color: #339933;">&gt;</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
<span style="color: #666666; font-style: italic;">// Build the HQL query</span><br />
<span style="color: #000000; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>userIds.<span style="color: #006633;">size</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&lt;=</span> <span style="color: #cc66cc;">1000</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #666666; font-style: italic;">// Less or equal to the limit - leave as is</span><br />
&nbsp; &nbsp; hql.<span style="color: #006633;">append</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;s.userId in (:users)&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Asystem+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">System</span></a>.<span style="color: #006633;">out</span>.<span style="color: #006633;">println</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;s.userId in (:users)&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span><span style="color: #000000; font-weight: bold;">else</span><span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #666666; font-style: italic;">// Higher than the limit - partition list...</span><br />
&nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">int</span> nUsers <span style="color: #339933;">=</span> userIds.<span style="color: #006633;">size</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">int</span> blockId <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; StringBuilder buff <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> StringBuilder<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; buff.<span style="color: #006633;">append</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;(&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">int</span> blocks <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">int</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#40;</span>nUsers <span style="color: #339933;">/</span> <span style="color: #cc66cc;">1000</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; blocks <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span>blocks<span style="color: #339933;">*</span><span style="color: #cc66cc;">1000</span> <span style="color: #339933;">==</span> nUsers<span style="color: #009900;">&#41;</span> <span style="color: #339933;">?</span> blocks <span style="color: #339933;">:</span> blocks<span style="color: #339933;">+</span><span style="color: #cc66cc;">1</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">for</span><span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">int</span> i<span style="color: #339933;">=</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span> i<span style="color: #339933;">&lt;</span>blocks<span style="color: #339933;">-</span><span style="color: #cc66cc;">1</span><span style="color: #339933;">;</span> i<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; buff.<span style="color: #006633;">append</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;s.userId in (:users&quot;</span><span style="color: #339933;">+</span>blockId<span style="color: #339933;">+</span><span style="color: #0000ff;">&quot;)&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; buff.<span style="color: #006633;">append</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot; OR &quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; blockId<span style="color: #339933;">++;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; buff.<span style="color: #006633;">append</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;s.userId in (:users&quot;</span><span style="color: #339933;">+</span>blockId<span style="color: #339933;">+</span><span style="color: #0000ff;">&quot;)&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; buff.<span style="color: #006633;">append</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;)&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; hql.<span style="color: #006633;">append</span><span style="color: #009900;">&#40;</span>buff.<span style="color: #006633;">toString</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span><br />
<a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Asystem+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">System</span></a>.<span style="color: #006633;">out</span>.<span style="color: #006633;">println</span><span style="color: #009900;">&#40;</span>hql.<span style="color: #006633;">toString</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
<span style="color: #666666; font-style: italic;">// Fill in list parameters</span><br />
Query q <span style="color: #339933;">=</span> session.<span style="color: #006633;">createQuery</span><span style="color: #009900;">&#40;</span>hql.<span style="color: #006633;">toString</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #000000; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>userIds.<span style="color: #006633;">size</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&lt;=</span> <span style="color: #cc66cc;">1000</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; q.<span style="color: #006633;">setParameterList</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;users&quot;</span>, userIds<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span><span style="color: #000000; font-weight: bold;">else</span><span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">int</span> nUsers <span style="color: #339933;">=</span> userIds.<span style="color: #006633;">size</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">int</span> blockId <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span>, startIndex <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">int</span> blocks <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">int</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#40;</span>nUsers <span style="color: #339933;">/</span> <span style="color: #cc66cc;">1000</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; blocks <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span>blocks<span style="color: #339933;">*</span><span style="color: #cc66cc;">1000</span> <span style="color: #339933;">==</span> nUsers<span style="color: #009900;">&#41;</span> <span style="color: #339933;">?</span> blocks <span style="color: #339933;">:</span> blocks<span style="color: #339933;">+</span><span style="color: #cc66cc;">1</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">for</span><span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">int</span> i<span style="color: #339933;">=</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span> i<span style="color: #339933;">&lt;</span>blocks<span style="color: #339933;">-</span><span style="color: #cc66cc;">1</span><span style="color: #339933;">;</span> i<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; q.<span style="color: #006633;">setParameterList</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;users&quot;</span><span style="color: #339933;">+</span>blockId, <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; userIds.<span style="color: #006633;">subList</span><span style="color: #009900;">&#40;</span>startIndex, startIndex<span style="color: #339933;">+</span><span style="color: #cc66cc;">1000</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Asystem+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">System</span></a>.<span style="color: #006633;">out</span>.<span style="color: #006633;">println</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;users&quot;</span><span style="color: #339933;">+</span>blockId<span style="color: #339933;">+</span><span style="color: #0000ff;">&quot;: &quot;</span><span style="color: #339933;">+</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; userIds.<span style="color: #006633;">subList</span><span style="color: #009900;">&#40;</span>startIndex, startIndex<span style="color: #339933;">+</span><span style="color: #cc66cc;">1000</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; blockId<span style="color: #339933;">++;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; startIndex <span style="color: #339933;">+=</span> <span style="color: #cc66cc;">1000</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; q.<span style="color: #006633;">setParameterList</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;users&quot;</span><span style="color: #339933;">+</span>blockId, <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; userIds.<span style="color: #006633;">subList</span><span style="color: #009900;">&#40;</span>startIndex, nUsers<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Asystem+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">System</span></a>.<span style="color: #006633;">out</span>.<span style="color: #006633;">println</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;users&quot;</span><span style="color: #339933;">+</span>blockId<span style="color: #339933;">+</span><span style="color: #0000ff;">&quot;: &quot;</span><span style="color: #339933;">+</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; userIds.<span style="color: #006633;">subList</span><span style="color: #009900;">&#40;</span>startIndex, nUsers<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span><br />
<br />
<span style="color: #666666; font-style: italic;">// Execute query...</span><br />
<span style="color: #666666; font-style: italic;">// ...</span></div></td></tr></tbody></table></div>
]]></content:encoded>
			<wfw:commentRss>http://codingwithcoffee.com/?feed=rss2&#038;p=121</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Code Swarm: Sakai UFP Contrib</title>
		<link>http://codingwithcoffee.com/?p=92</link>
		<comments>http://codingwithcoffee.com/?p=92#comments</comments>
		<pubDate>Thu, 12 Mar 2009 16:54:34 +0000</pubDate>
		<dc:creator>Nuno</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[sakai]]></category>
		<category><![CDATA[svn]]></category>

		<guid isPermaLink="false">http://codingwithcoffee.com/?p=92</guid>
		<description><![CDATA[An organic visualization of svn activity for the UFP contrib space in Sakai Project. Done with the Code Swarm project!]]></description>
			<content:encoded><![CDATA[<p>I have created an <strong>organic visualization of svn activity</strong> for the <a href="https://source.sakaiproject.org/contrib/ufp">UFP contrib space</a> in Sakai Project. This space contains part of the contributed code by me, as an Universidade Fernando Pessoa worker. This was built using the <a href="http://code.google.com/p/codeswarm">Code Swarm</a> project&#8230; enjoy!</p>
<p style="text-align:center"><object width="410" height="341" data="http://www.veoh.com/static/swf/webplayer/WebPlayer.swf?version=AFrontend.5.4.0.3.1003&amp;permalinkId=v17984819ZcB8GQhj&amp;player=videodetailsembedded&amp;videoAutoPlay=0&amp;id=anonymous" type="application/x-shockwave-flash"><param name="id" value="veohFlashPlayer" /><param name="name" value="veohFlashPlayer" /><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.veoh.com/static/swf/webplayer/WebPlayer.swf?version=AFrontend.5.4.0.3.1003&amp;permalinkId=v17984819ZcB8GQhj&amp;player=videodetailsembedded&amp;videoAutoPlay=0&amp;id=anonymous" /><param name="allowfullscreen" value="true" /></object><br />
<span style="font-size: xx-small;">Watch <a href="http://www.veoh.com/browse/videos/category/technology_and_gaming/watch/v17984819ZcB8GQhj">Code Swarm: Sakai Contrib-UFP</a>Â Â |Â Â View More <a href="http://www.veoh.com">Free Videos Online at Veoh.com</a></span></p>
]]></content:encoded>
			<wfw:commentRss>http://codingwithcoffee.com/?feed=rss2&#038;p=92</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Moving torwards SiteStats 2.0!</title>
		<link>http://codingwithcoffee.com/?p=35</link>
		<comments>http://codingwithcoffee.com/?p=35#comments</comments>
		<pubDate>Tue, 10 Feb 2009 11:51:24 +0000</pubDate>
		<dc:creator>Nuno</dc:creator>
				<category><![CDATA[sakai]]></category>
		<category><![CDATA[sitestats]]></category>

		<guid isPermaLink="false">http://codingwithcoffee.com/?p=35</guid>
		<description><![CDATA[SiteStats - the Sakai statistical tool - getting closer to the 2.0 release... Read the full article to know about some of the new features!]]></description>
			<content:encoded><![CDATA[<p><a href="http://bugs.sakaiproject.org/confluence/display/STAT" target="_blank">SiteStats</a> &#8211; the Sakai statistical tool &#8211; is getting closer to the 2.0 release! Over the last months I have been working hard on making SiteStats more complete, powerful and user friendly, based on instructors feedback. There a lot of changes between 1.x and the 2.0 code base , most of them presented below.<br />
Soon, a beta tag will be cut for translators&#8230;</p>
<h3>Changes</h3>
<ul>
<li>Improved SiteStats API (for 3rd party tools);</li>
<li>New presentation framework: Apache Wicket instead of JSF;</li>
<li>Automatic event registration for tools implementing the new <a href="https://source.sakaiproject.org/svn/entitybroker/trunk/api/src/java/org/sakaiproject/entitybroker/entityprovider/capabilities/Statisticable.java" target="_blank">Statisticable</a> capability of <a href="http://bugs.sakaiproject.org/confluence/display/SAKDEV/Entity+Provider+and+Broker" target="_blank">EntityBroker</a> &#8211; this allows SiteStats to pick upÂ interestingÂ events to get statistics on, as well as localized event descriptions provided by the tool developer and/or provided by SiteStats;</li>
<li>Ability to save report definitions per site for posterior execution;</li>
<li>Ability to provide predefined report definitions through the admin version of the tool &#8211; these will be listed on every site&#8217;s SiteStats instance;</li>
<li>More powerful and customizable reports: ability to select columns to group by results (which allows, for example, to list most opened files or students who have done only a particular action);</li>
<li>Redesigned reports page to accomodate new reporting parameters;</li>
<li>Added possibility of presenting reports data in table and/or chart format;</li>
<li>Preliminary support for sakai-wide reports: ability to report agains all sites in sitestats admin version (like &#8220;Top 10 most accessed resources across sites&#8221; or, &#8220;Most used tools across site&#8221;);</li>
<li>Completely redesigned start page with compact view, offering a lot of usefull information over the current version (<a href="http://jira.sakaiproject.org/jira/browse/STAT-126">STAT-126</a>) &#8211; most instructor/site maintainer questions will be answered on this page;</li>
<li>And more&#8230;</li>
</ul>
<h3>Screenshots</h3>
<div class="warn">Overview page screenshot below (#1) is based on mockups, not representing the final design.</div>
<p style="text-align: center;"><a href="http://codingwithcoffee.com/wp-content/uploads/2009/02/sst2sakai_preview.png" rel="shadowbox[sbpost-35];player=img;"><br />
<img class="size-medium wp-image-39 aligncenter" title="Overview page" src="http://codingwithcoffee.com/wp-content/uploads/2009/02/sst2sakai_preview-300x293.png" alt="Overview page" width="200" height="200" /></a><a href="http://codingwithcoffee.com/wp-content/uploads/2009/02/sst_reports.png" rel="shadowbox[sbpost-35];player=img;"><img class="aligncenter size-medium wp-image-79" title="Report list" src="http://codingwithcoffee.com/wp-content/uploads/2009/02/sst_reports-300x286.png" alt="Report list" width="200" height="200" /></a><a href="http://codingwithcoffee.com/wp-content/uploads/2009/02/sst2_report_edit.png" rel="shadowbox[sbpost-35];player=img;"><img class="aligncenter size-medium wp-image-80" title="Report Editing" src="http://codingwithcoffee.com/wp-content/uploads/2009/02/sst2_report_edit-227x300.png" alt="Report Editing" width="200" height="200" /></a><a href="http://codingwithcoffee.com/wp-content/uploads/2009/02/sst2_report_data.png" rel="shadowbox[sbpost-35];player=img;"><img class="aligncenter size-medium wp-image-81" title="Report Results" src="http://codingwithcoffee.com/wp-content/uploads/2009/02/sst2_report_data-300x286.png" alt="Report Results" width="200" height="200" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://codingwithcoffee.com/?feed=rss2&#038;p=35</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Basic CSS chart</title>
		<link>http://codingwithcoffee.com/?p=52</link>
		<comments>http://codingwithcoffee.com/?p=52#comments</comments>
		<pubDate>Mon, 09 Feb 2009 12:39:05 +0000</pubDate>
		<dc:creator>Nuno</dc:creator>
				<category><![CDATA[webdesign]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[html]]></category>

		<guid isPermaLink="false">http://codingwithcoffee.com/?p=52</guid>
		<description><![CDATA[A simple cross-browser horizontal chart using only HTML and CSS.]]></description>
			<content:encoded><![CDATA[<p>Today I came up with a very simple horizontal chart using only HTML+CSS, working Firefox, Safari, IE and Google Chrome:</p>
<p style="text-align: center;"><a href="http://codingwithcoffee.com/wp-content/uploads/2009/02/preview.png" rel="shadowbox[sbpost-52];player=img;"><img class="aligncenter size-full wp-image-65" title="preview" src="http://codingwithcoffee.com/wp-content/uploads/2009/02/preview.png" alt="preview" width="220" height="32" /></a></p>
<h6>HTML</h6>
<div class="codecolorer-container html4strict twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br /></div></td><td><div class="html4strict codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/span.html"><span style="color: #000000; font-weight: bold;">span</span></a> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;basicChart&quot;</span> <span style="color: #000066;">style</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;width: 200px&quot;</span>&gt;</span><br />
&nbsp; <span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">div</span></a> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;bar&quot;</span> <span style="color: #000066;">style</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;width: 70%&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">div</span></a>&gt;</span><br />
&nbsp; <span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/span.html"><span style="color: #000000; font-weight: bold;">span</span></a> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;value&quot;</span>&gt;</span>70%<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/span.html"><span style="color: #000000; font-weight: bold;">span</span></a>&gt;</span><br />
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/span.html"><span style="color: #000000; font-weight: bold;">span</span></a>&gt;</span></div></td></tr></tbody></table></div>
<h6>CSS</h6>
<div class="codecolorer-container css twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br />20<br />21<br />22<br />23<br />24<br />25<br />26<br />27<br />28<br />29<br />30<br />31<br />32<br /></div></td><td><div class="css codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #6666ff;">.basicChart</span> <span style="color: #00AA00;">&#123;</span><br />
&nbsp; <span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">relative</span><span style="color: #00AA00;">;</span><br />
&nbsp; <span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span> inline-<span style="color: #993333;">block</span><span style="color: #00AA00;">;</span><br />
&nbsp; <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">90%</span><span style="color: #00AA00;">;</span><br />
&nbsp; <span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span> <span style="color: #933;">12px</span><span style="color: #00AA00;">;</span><br />
&nbsp; <span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span> <span style="color: #933;">5px</span><span style="color: #00AA00;">;</span><br />
&nbsp; <span style="color: #000000; font-weight: bold;">border</span><span style="color: #00AA00;">:</span> <span style="color: #933;">1px</span> <span style="color: #993333;">solid</span> <span style="color: #cc00cc;">#777</span><span style="color: #00AA00;">;</span><br />
&nbsp; <span style="color: #000000; font-weight: bold;">text-align</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">center</span><span style="color: #00AA00;">;</span><br />
&nbsp; <span style="color: #000000; font-weight: bold;">vertical-align</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">middle</span><span style="color: #00AA00;">;</span><br />
&nbsp; <span style="color: #000000; font-weight: bold;">font-family</span><span style="color: #00AA00;">:</span> Arial<span style="color: #00AA00;">,</span>Helvetica<span style="color: #00AA00;">,</span><span style="color: #993333;">sans-serif</span><span style="color: #00AA00;">;</span><br />
&nbsp; <span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span> <span style="color: #933;">11px</span><span style="color: #00AA00;">;</span><br />
&nbsp; <span style="color: #000000; font-weight: bold;">font-weight</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">bold</span><span style="color: #00AA00;">;</span><br />
&nbsp; <span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#000</span><span style="color: #00AA00;">;</span><br />
<span style="color: #00AA00;">&#125;</span><br />
<span style="color: #6666ff;">.basicChart</span> <span style="color: #6666ff;">.bar</span> &nbsp;<span style="color: #00AA00;">&#123;</span><br />
&nbsp; <span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">absolute</span><span style="color: #00AA00;">;</span><br />
&nbsp; <span style="color: #000000; font-weight: bold;">top</span><span style="color: #00AA00;">:</span> <span style="color: #933;">0px</span><span style="color: #00AA00;">;</span><br />
&nbsp; <span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">:</span> <span style="color: #933;">0px</span><span style="color: #00AA00;">;</span><br />
&nbsp; <span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span> <span style="color: #933;">1px</span><span style="color: #00AA00;">;</span><br />
&nbsp; <span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span> <span style="color: #933;">90%</span><span style="color: #00AA00;">;</span><br />
&nbsp; <span style="color: #000000; font-weight: bold;">background-color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#00A5E3</span><span style="color: #00AA00;">;</span><br />
&nbsp; <span style="color: #000000; font-weight: bold;">z-index</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">1</span><span style="color: #00AA00;">;</span><br />
<span style="color: #00AA00;">&#125;</span><br />
<span style="color: #6666ff;">.basicChart</span> <span style="color: #6666ff;">.value</span> <span style="color: #00AA00;">&#123;</span><br />
&nbsp; <span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">absolute</span><span style="color: #00AA00;">;</span><br />
&nbsp; <span style="color: #000000; font-weight: bold;">top</span><span style="color: #00AA00;">:</span> <span style="color: #933;">0px</span><span style="color: #00AA00;">;</span><br />
&nbsp; <span style="color: #000000; font-weight: bold;">right</span><span style="color: #00AA00;">:</span> <span style="color: #933;">5px</span><span style="color: #00AA00;">;</span><br />
&nbsp; <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">auto</span><span style="color: #00AA00;">;</span><br />
&nbsp; <span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span> <span style="color: #933;">100%</span><span style="color: #00AA00;">;</span><br />
&nbsp; <span style="color: #000000; font-weight: bold;">z-index</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">2</span><span style="color: #00AA00;">;</span><br />
&nbsp; <span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span> <span style="color: #933;">10px</span><span style="color: #00AA00;">;</span><br />
<span style="color: #00AA00;">&#125;</span></div></td></tr></tbody></table></div>
]]></content:encoded>
			<wfw:commentRss>http://codingwithcoffee.com/?feed=rss2&#038;p=52</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>SVN patches including new files</title>
		<link>http://codingwithcoffee.com/?p=6</link>
		<comments>http://codingwithcoffee.com/?p=6#comments</comments>
		<pubDate>Mon, 09 Feb 2009 11:37:13 +0000</pubDate>
		<dc:creator>Nuno</dc:creator>
				<category><![CDATA[sysadmin]]></category>
		<category><![CDATA[svn]]></category>

		<guid isPermaLink="false">http://codingwithcoffee.com/?p=6</guid>
		<description><![CDATA[How to create patches against a SVN working copy that also includes new files not in repository.]]></description>
			<content:encoded><![CDATA[<p><strong>svn diff</strong> is a very usefull and used command to getÂ the differences between two revisions or paths. One common use is to get differences on current working copy related with a new feature/change we are working on. This use case typically happens when we are not using a branch for these features/changes and want to share the differences with someone else or, if we are maintaining a set of local customizations to apply that won&#8217;t be ever shared with the community.</p>
<p>However, there is a problem with this command: new files won&#8217;t be added to generated patch! This happens because we often forget to execute a very simple command prior to &#8216;svn diff&#8217; &#8211; <strong>svn add</strong>!</p>
<div class="warn">Please note that this will not work for binary content (such as images)!</div>
<div class="codecolorer-container bash twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">svn add</span> pom.xml<br />
<span style="color: #c20cb9; font-weight: bold;">svn diff</span> .</div></td></tr></tbody></table></div>
]]></content:encoded>
			<wfw:commentRss>http://codingwithcoffee.com/?feed=rss2&#038;p=6</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
