<?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>Jeshurun&#039;s Blog &#124; Jeshurun&#039;s Blog</title> <atom:link href="http://blog.jeshurun.ca/feed" rel="self" type="application/rss+xml" /><link>http://blog.jeshurun.ca</link> <description>A collection of tiny details on software and technology</description> <lastBuildDate>Tue, 30 Apr 2013 23:57:03 +0000</lastBuildDate> <language>en-US</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.5.1</generator> <item><title>Bootstrap Progress Bar Component for Tapestry 5</title><link>http://blog.jeshurun.ca/technology/bootstrap-progress-bar-for-tapestry-5</link> <comments>http://blog.jeshurun.ca/technology/bootstrap-progress-bar-for-tapestry-5#comments</comments> <pubDate>Tue, 30 Apr 2013 20:06:05 +0000</pubDate> <dc:creator>Jeshurun Daniel</dc:creator> <category><![CDATA[Technology]]></category> <category><![CDATA[bootstrap]]></category> <category><![CDATA[tapestry]]></category> <category><![CDATA[tapestry5]]></category> <guid
isPermaLink="false">http://blog.jeshurun.ca/?p=827</guid> <description><![CDATA[Here is a quick and dirty bootstrap progress bar component designed to be used with the tapestry-bootstrap project. The component provides a re-usable wrapper around bootstrap&#8217;s CSS3 progress bars. First up is the Java source: // Licensed under the Apache License, Version 2.0 (the &#34;License&#34;); // you may not use &#8230;]]></description> <content:encoded><![CDATA[<p>Here is a quick and dirty <a
href="http://twitter.github.io/bootstrap/components.html#progress" title="bootstrap progress bar" target="_blank">bootstrap progress bar</a> component designed to be used with the <a
href="https://github.com/trsvax/tapestry-bootstrap" title="Tapestry-Bootstrap" target="_blank">tapestry-bootstrap</a> project. The component provides a re-usable wrapper around bootstrap&#8217;s CSS3 progress bars.</p><p>First up is the Java source:</p><pre class="prettyprint java">
// Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an &quot;AS IS&quot; BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package ca.jeshurun.blog.components;
import java.util.Arrays;
import java.util.List;
import org.apache.tapestry5.BindingConstants;
import org.apache.tapestry5.annotations.Parameter;
import org.apache.tapestry5.annotations.Property;
import org.apache.tapestry5.annotations.SetupRender;
/**
 *
 * @author Jeshurun Daniel
 *
 */
public class Progressbar {
	@Parameter
	private boolean striped;
	@Parameter
	private boolean active;
	@Parameter(defaultPrefix=BindingConstants.LITERAL)
	private String widths;
	@Parameter(defaultPrefix=BindingConstants.LITERAL, value=&quot;danger,warning,info,success&quot;, allowNull=false)
	private String ordering;
	@Property
	private int index;
	@Parameter(defaultPrefix=BindingConstants.PROP)
	private String[] widthsArray;
	@SetupRender
	void setup() {
		if(widthsArray == null &amp;&amp; widths != null) {
			widthsArray = widths.split(&quot;,&quot;);
		}
	}
	public List&lt;String&gt; getBars() {
		return Arrays.asList(ordering.split(&quot;,&quot;));
	}
	public String getStriped() {
		return striped || active ? &quot;progress-striped&quot; : &quot;&quot;;
	}
	public String getActive() {
		return active ? &quot;active&quot; : &quot;&quot;;
	}
	public String getWidth() {
		if(widthsArray == null || widthsArray.length &lt;= index) return &quot;0&quot;;
		return widthsArray[index].trim().isEmpty() ? &quot;0&quot; : widthsArray[index];
	}
}
</pre><p>followed by the xml component template:</p><pre class="prettyprint xml">
&lt;div class=&quot;progress ${striped} ${active}&quot;
	xmlns:t=&quot;http://tapestry.apache.org/schema/tapestry_5_3.xsd&quot;&gt;
	&lt;t:loop source=&quot;bars&quot; value=&quot;var:bar&quot; index=&quot;index&quot;&gt;
		&lt;div class=&quot;bar bar-${var:bar}&quot; style=&quot;width: ${width}%;&quot;&gt;&lt;/div&gt;
	&lt;/t:loop&gt;
&lt;/div&gt;
</pre><p>And here is how you would use it:</p><div
class="wpInsert wpInsertInPostAd wpInsertMiddle" style="margin: 5px;padding: 0px;"><script type="text/javascript">google_ad_client = "ca-pub-7298306999157442";
/* inserts */
google_ad_slot = "2873800965";
google_ad_width = 468;
google_ad_height = 60;</script> <script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script></div><pre class="prettyprint xml">
&lt;t:progressbar t:widths=&quot;10,20,30,40&quot; t:active=&quot;true&quot; t:ordering=&quot;warning,info,success,danger&quot; /&gt;
</pre><p>Which should give you something like this:<br
/> <a
href="http://blog.jeshurun.ca/wp-content/uploads/2013/04/progressbar.png"><img
src="http://blog.jeshurun.ca/wp-content/uploads/2013/04/progressbar-300x8.png" alt="progressbar" width="300" height="8" class="alignleft size-medium wp-image-832" /></a></p><div
style="clear:both;"></div><p>The parameters you can pass in are:</p><ul><li><strong>widths</strong> The widths of each bar. The corresponding bar will be blank when omitted or 0</li><li><strong>widthsArray</strong> Pass the widths as a prop array instead of as a literal string</li><li><strong>striped</strong> Adds the progress-striped class to the progress bar</li><li><strong>active</strong> Adds the active class. Implies progress-striped.</li><li><strong>ordering</strong> The ordering of colours in the progress bar. Default values are danger,warning,info,success. You can change the ordering of the bars by changing the order of the values, or you can define your own progress-custom class and apply your own custom styles to it.</li></ul> ]]></content:encoded> <wfw:commentRss>http://blog.jeshurun.ca/technology/bootstrap-progress-bar-for-tapestry-5/feed</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>TurboTax Sucks or: How I Got a Bigger Refund with SimpleTax</title><link>http://blog.jeshurun.ca/technology/turbotax-sucks-or-how-i-got-a-bigger-refund-with-simpletax</link> <comments>http://blog.jeshurun.ca/technology/turbotax-sucks-or-how-i-got-a-bigger-refund-with-simpletax#comments</comments> <pubDate>Tue, 23 Apr 2013 10:33:56 +0000</pubDate> <dc:creator>Jeshurun Daniel</dc:creator> <category><![CDATA[Technology]]></category> <category><![CDATA[2012-return]]></category> <category><![CDATA[cra]]></category> <category><![CDATA[simpletax]]></category> <category><![CDATA[turbotax]]></category> <guid
isPermaLink="false">http://blog.jeshurun.ca/?p=801</guid> <description><![CDATA[&#8216;Tis that time of the year again, when a weekend is spent by the entire nation in frantically trying to scrape all receipts, invoices and slips together in order to file ones taxes on time. With the deadline fast approaching, I decided on doing just that this past weekend, and &#8230;]]></description> <content:encoded><![CDATA[<p>&#8216;Tis that time of the year again, when a weekend is spent by the entire nation in frantically trying to scrape all receipts, invoices and slips together in order to file ones taxes on time. With the deadline fast approaching, I decided on doing just that this past weekend, and began by doing what I always did first when filing taxes, fire up the tax program.</p><p>Advertising had gotten the better of me, and over the years, without much consideration, I had been enslaved to the only tax program that I thought existed, TurboTax from Intuit. When I first started filing taxes, the free version of TurboTax worked out just fine for my simplistic needs. Even though the privacy invasion detector and security concern meter inside me went off every time I punched all my personal information into their website, it got the job done, and I never gave it much thought afterwards. But over the years, as my returns became increasingly complex, I began to notice the increased cost in using the various features of the program. But being a programmer myself, I presumed this was only fair, and albeit slightly grudgingly, coughed up $50 last year before I could download my .tax file.</p><p>So I figured this year wouldn&#8217;t be any different, and mindlessly started punching my information into the the website. Everything was going great, until I tried entering my line 369. The first thing that happened when I selected this option was, **drum-roll**, a box popped up prompting me to &#8216;upgrade&#8217; to the &#8216;standard&#8217; version. It was at this point that I realized I had been subconsciously waiting all along for this to happen as I ticked each box and clicked each button, for that annoying little pop up to come up saying &#8220;Aha! It looks like you will be getting some money back here matey, and we want a slice of that pie!&#8221;. But the worst part was when I clicked OK and the program seemed to simply fail to take my line 369 into consideration. There was a small bump, but nothing near what I was expecting. I tried clicking the back and next buttons, toggling the various boxes, logging out and logging back in, all to no avail. The refund counter simply would not budge thereafter.</p><p>Then I decided to see if I could simply take it off, and get bumped back to the free version. Thats when I hit the second snag. Once you &#8220;upgrade&#8221; to the paid version, there is no straightforward way to go back to the free version. A bit of Googling around found me a page on their support forums which suggested sending an email to their support team, who would then consider my case, and decice on if they would bump me down or not. I figured I didn&#8217;t have time for this BS, and just continued on with entering the rest of my information.</p><p>It was only when I got to the end, to the point where you can&#8217;t go past without paying up, that I figured what was actually going on with the unbudging refund meter. The program was failing to distinguish T4&#8242;s from multiple provinces, and was applying the rules for one province or the other to all of them. Try as I might, I simply could not get it to recognize that the slips were from different provinces, even though this information had been entered into the page which recorded the T4&#8242;s under box 10.</p><p>I started contemplating my options here, and started Googling around again to see if others had the same problem. This was when I hit upon this gem of an article from arstechnica, <a
href="http://arstechnica.com/business/2013/03/how-the-maker-of-turbotax-fought-free-simple-tax-filing/" title="How the maker of TurboTax fought free, simple tax filing" target="_blank">How the maker of TurboTax fought free, simple tax filing</a>.</p><p>This article opened my mind to a world of truth, on how TurboTax and their moles had spent millions in lobbying to effectively prevent the government from implementing an idea known as &#8220;return-free filing&#8221;. The idea is simple. Instead of hiring someone to do your taxes, or paying up to use tax software like TurboTax, the government would prepare your return and send it to you stating how much they thought you owed them. You make needed changes if any, and send it back. If you did not like the one they prepared for you for some reason, you were free to hire your own accountant to do it for you. This idea, when put to practice, would save an estimated $2 Billion (with a B) and 225 million hours of taxpayer&#8217;s time and money. Since this would essentially put companies like them out of business, they were flexing their lobbying muscle with bogus arguments, which as one commenter puts it:</p><blockquote><p> the government would do a shitty job of this and we do a great job of it, so don&#8217;t let people have the option of letting the government do it, because that wouldn&#8217;t be fair to our clearly superior product and service.</p><div
class="wpInsert wpInsertInPostAd wpInsertMiddle" style="margin: 5px;padding: 0px;"><script type="text/javascript">google_ad_client = "ca-pub-7298306999157442";
/* inserts */
google_ad_slot = "2873800965";
google_ad_width = 468;
google_ad_height = 60;</script> <script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script></div></blockquote><p>As I have a personal policy to not support companies that engage in such practices, for the first time ever, I started to look around for an alternative to TurboTax. I soon stumbled upon <a
href="http://netfile.gc.ca/sftwr-eng.html" title="Certified Software for the 2013 NETFILE Program ">this</a> page on the CRA website, which lists all software certified by them for the current tax year. Looking down the list under the &#8220;online&#8221; section, the third option down caught my eye: <a
href="http://simpletax.ca/" title="SimpleTax" target="_blank">SimpleTax</a>. Frustrated by how much of my weekend was being wasted on finding glitches with TurboTax, the name felt refreshing and sounded like exactly what I needed. As a bonus, it was also listed as &#8220;Free for everyone&#8221;. Sweet.</p><p>And refreshing it was. The first thing that impressed me was their privacy policy:</p><blockquote><p> Your email address is the only personally identifiable information that we can access without your password. All other information you provide is encrypted.</p><p>Your email address will never be sold and will only be used to inform you of product updates and future versions. We will never send you third-party marketing emails. We hate spam just as much as you do.</p></blockquote><p>Exactly what I had wanted to hear. I also read how the program had been developed by a startup of 3, who had themselves been frustrated with TurboTax. How poetic. I quickly started entering my information and found the program an absolute joy to use. The interface was quick, responsive and uncluttered, and I was done entering all my information in less than 10 minutes. The refund numbers finally started to look right, and I sent a small donation their way to show my appreciation for their awesome work in putting the software together.</p><p>Whenever I come across a web application that I really like, the first thing that crosses my mind is &#8220;I wonder what they built this with&#8221;. From a quick glance at the interface, it was obvious that <a
href="http://twitter.github.io/bootstrap/" title="Twitter Bootstrap" target="_blank">Twitter Bootstrap</a> had been employed extensively to create the attractive, sleek and intuitive interface. What wasn&#8217;t quite obvious was the the server-side technology being used to drive the interface. <a
href="http://builtwith.com/simpletax.ca" title="Built With" target="_blank">BuiltWith</a> listed jQuery, nginx and TypeKit, but not much else. My curiosity was satisfied when I sent a short thank you note to the developers, commending them for their excellent work. They got back to me almost instantaneously, and with a simple hint in my email that I was a developer, they read my mind, asked if I was curious, and linked me to their <a
href="http://simpletax.ca/humans.txt" title="SimpleTax Humans.txt" target="_blank">humans.txt</a> file which lists all technologies they had employed to build the program.</p><p>If you haven&#8217;t done your taxes yet, I would definitely recommend checking <a
href="http://simpletax.ca/" title="SimpleTax" target="_blank">SimpleTax</a> out and saving yourself time and money, and also possibly get a bigger refund, that other tax programs might have botched up. They had mentioned in their parting email that they had some exciting features planned for next year, and I am excited to see what they have in the works. Strange but true, I am actually looking forward to doing my taxes next year.</p> ]]></content:encoded> <wfw:commentRss>http://blog.jeshurun.ca/technology/turbotax-sucks-or-how-i-got-a-bigger-refund-with-simpletax/feed</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>Tapestry 5 DateField as 3 Select Dropdowns</title><link>http://blog.jeshurun.ca/technology/tapestry-5-datefield-as-3-select-dropdowns</link> <comments>http://blog.jeshurun.ca/technology/tapestry-5-datefield-as-3-select-dropdowns#comments</comments> <pubDate>Wed, 17 Apr 2013 00:31:32 +0000</pubDate> <dc:creator>Jeshurun Daniel</dc:creator> <category><![CDATA[Technology]]></category> <category><![CDATA[Android]]></category> <category><![CDATA[ipad]]></category> <category><![CDATA[java]]></category> <category><![CDATA[mobile]]></category> <category><![CDATA[tapestry]]></category> <category><![CDATA[tapestry5]]></category> <guid
isPermaLink="false">http://blog.jeshurun.ca/?p=765</guid> <description><![CDATA[Tapestry 5 has an excellent javascript-based date picker component called DateField, which greatly simplifies the task of entering a properly formatted date for the user. The component gets the job done nicely when using a browser with a keyboard and mouse, but is somewhat clunky to use on smaller mobile &#8230;]]></description> <content:encoded><![CDATA[<p>Tapestry 5 has an excellent javascript-based date picker component called DateField, which greatly simplifies the task of entering a properly formatted date for the user. The component gets the job done nicely when using a browser with a keyboard and mouse, but is somewhat clunky to use on smaller mobile devices with a touch screen.</p><p>I recently worked on a project that primarily targeted mobile devices, and users were reporting difficulties with using it on touch screens. My first attempt at tackling the problem was to use HTML5&#8242;s new &#8216;date&#8217; input type. This worked well on iPads and on Android devices with the Chrome browser, but failed miserably on desktop browsers, as <a
href="http://caniuse.com/#search=input%20type" title="HTML5 date support" target="_blank">support for this type is still quite spotty</a>. Google&#8217;s Chrome and Opera are the only desktop browsers that present a UI, while Firefox and Internet Explorer simply display a text field.</p><p>I finally decided to use the tried and tested method of displays 3 selects, one each for date, month and year, and set out to create a component for the task that I could reuse within the app. This turned out to be more difficult that I had anticipated, mostly due to how Tapestry handles form submission and nested components when the component is used inside a loop. Specifically, because client ids for components inside loops are generated on the fly, it was difficult to read the selected values properly from request parameters. I finally managed to hack together a working solution using Tapestry&#8217;s <a
href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/corelib/components/SubmitNotifier.html" title="submitnotifier">submitnotifier</a> notifier component.</p><p>Below is the source code for the class file, which goes in the components package:</p><div
class="wpInsert wpInsertInPostAd wpInsertMiddle" style="margin: 5px;padding: 0px;"><script type="text/javascript">google_ad_client = "ca-pub-7298306999157442";
/* inserts */
google_ad_slot = "2873800965";
google_ad_width = 468;
google_ad_height = 60;</script> <script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script></div><pre class="prettyprint java">
// Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an &quot;AS IS&quot; BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package ca.jeshurun.blog.example;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
import java.util.List;
import javax.inject.Inject;
import org.apache.tapestry5.Binding;
import org.apache.tapestry5.BindingConstants;
import org.apache.tapestry5.ComponentResources;
import org.apache.tapestry5.FieldValidator;
import org.apache.tapestry5.OptionGroupModel;
import org.apache.tapestry5.OptionModel;
import org.apache.tapestry5.SelectModel;
import org.apache.tapestry5.ValidationTracker;
import org.apache.tapestry5.ValueEncoder;
import org.apache.tapestry5.annotations.Environmental;
import org.apache.tapestry5.annotations.OnEvent;
import org.apache.tapestry5.annotations.Parameter;
import org.apache.tapestry5.annotations.Property;
import org.apache.tapestry5.annotations.SetupRender;
import org.apache.tapestry5.corelib.base.AbstractField;
import org.apache.tapestry5.internal.OptionModelImpl;
import org.apache.tapestry5.ioc.Messages;
import org.apache.tapestry5.services.ComponentDefaultProvider;
import org.apache.tapestry5.services.Request;
import org.apache.tapestry5.util.AbstractSelectModel;
import org.joda.time.LocalDate;
import org.joda.time.Period;
import org.joda.time.PeriodType;
import org.joda.time.format.DateTimeFormat;
import org.joda.time.format.DateTimeFormatter;
/**
 *
 * @author Jeshurun Daniel
 *
 */
public class DropdownCalendarField extends AbstractField {
	private static final String PATTERN = &quot;dd/MM/yyyy&quot;;
	private static final ThreadLocal&lt;SimpleDateFormat&gt; df = new ThreadLocal&lt;SimpleDateFormat&gt;() {
		@Override
		public SimpleDateFormat get() {
			return new SimpleDateFormat(PATTERN);
		}
	};
	private static final DateTimeFormatter fmt = DateTimeFormat
			.forPattern(PATTERN);
	private static final String MONTHS[] = { &quot;Jan&quot;, &quot;Feb&quot;, &quot;Mar&quot;, &quot;Apr&quot;, &quot;May&quot;,
			&quot;Jun&quot;, &quot;Jul&quot;, &quot;Aug&quot;, &quot;Sep&quot;, &quot;Oct&quot;, &quot;Nov&quot;, &quot;Dec&quot;, };
	private static final List&lt;String&gt; MONTHS_LIST = Arrays.asList(MONTHS);
	@Inject
	private ComponentResources resources;
	@Inject
	private Messages messages;
	@Inject
	private ComponentDefaultProvider defaultProvider;
	@Inject
	private Request request;
	@Environmental
	private ValidationTracker tracker;
	@Property
	private int date;
	@Property
	private int month;
	@Property
	private int year;
	@Property
	@Parameter(defaultPrefix = BindingConstants.VALIDATE)
	private FieldValidator&lt;Object&gt; validate;
	/**
	 * The value parameter of a DateField must be a {@link java.util.Date}.
	 */
	@Parameter(required = true, principal = true, autoconnect = true)
	private Date value;
	/**
	 * The value parameter of a DateField must be a {@link java.util.Date}.
	 */
	@Parameter(defaultPrefix = BindingConstants.LITERAL)
	private String start;
	/**
	 * The value parameter of a DateField must be a {@link java.util.Date}.
	 */
	@Parameter(defaultPrefix = BindingConstants.LITERAL)
	private String end;
	private LocalDate rangeStart;
	private LocalDate rangeEnd;
	@SetupRender
	void setupRender() {
		if (value != null) {
			LocalDate lDate = LocalDate.fromDateFields(value);
			this.date = lDate.getDayOfMonth();
			this.month = lDate.getMonthOfYear();
			this.year = lDate.getYear();
		}
		if (start != null) {
			try {
				rangeStart = LocalDate.fromDateFields(df.get().parse(start));
			} catch (ParseException e) {
			}
		}
		if (rangeStart == null) {
			rangeStart = LocalDate.fromDateFields(
					new Date(System.currentTimeMillis())).minusYears(25);
		}
		if (end != null) {
			try {
				rangeEnd = LocalDate.fromDateFields(df.get().parse(end));
			} catch (ParseException e) {
			}
		}
		if (rangeEnd == null) {
			rangeEnd = LocalDate.fromDateFields(new Date(System
					.currentTimeMillis()));
		}
	}
	/**
	 * Computes a default value for the &quot;validate&quot; parameter using
	 * {@link ComponentDefaultProvider}.
	 */
	final Binding defaultValidate() {
		return defaultProvider.defaultValidatorBinding(&quot;value&quot;, resources);
	}
	public SelectModel getDateSelectModel() {
		if (new Period(rangeStart, rangeEnd, PeriodType.days()).getDays() &gt; 30) {
			return createRangeSelectModel(1, 31, false);
		}
		return createRangeSelectModel(rangeStart.getDayOfMonth(),
				rangeEnd.getDayOfMonth(), false);
	}
	public SelectModel getMonthSelectModel() {
		if (new Period(rangeStart, rangeEnd, PeriodType.months()).getMonths() &gt; 12) {
			return createRangeSelectModel(1, 12, true);
		}
		return createRangeSelectModel(rangeStart.getMonthOfYear(),
				rangeEnd.getMonthOfYear(), true);
	}
	public ValueEncoder&lt;Integer&gt; getMonthEncoder() {
		return new ValueEncoder&lt;Integer&gt;() {
			@Override
			public String toClient(Integer month) {
				return MONTHS[month - 1];
			}
			@Override
			public Integer toValue(String month) {
				return MONTHS_LIST.indexOf(month) + 1;
			}
		};
	}
	public SelectModel getYearSelectModel() {
		return createRangeSelectModel(rangeStart.getYear(), rangeEnd.getYear(),
				false);
	}
	@Override
	protected void processSubmission(String controlName) {
	}
	@OnEvent(value = &quot;AfterSubmit&quot;)
	void afterSubmit() {
		try {
			if (date != 0 &amp;&amp; month != 0 &amp;&amp; year != 0)
				value = fmt.parseDateTime(date + &quot;/&quot; + month + &quot;/&quot; + year)
						.toDate();
		} catch (Exception ex) {
			tracker.recordError(
					this,
					messages.format(&quot;date-value-not-parseable&quot;, date + &quot;/&quot;
							+ month + &quot;/&quot; + year));
		}
	}
	private SelectModel createRangeSelectModel(final int start, final int end,
			final boolean isMonth) {
		return new AbstractSelectModel() {
			@Override
			public List&lt;OptionModel&gt; getOptions() {
				List&lt;OptionModel&gt; options = new ArrayList&lt;OptionModel&gt;();
				for (int i = start; i &lt;= end; i++) {
					if (isMonth)
						options.add(new OptionModelImpl(MONTHS[i - 1], i));
					else
						options.add(new OptionModelImpl(String.valueOf(i)));
				}
				return options;
			}
			@Override
			public List&lt;OptionGroupModel&gt; getOptionGroups() {
				return null;
			}
		};
	}
}
</pre><p>And the source of the template file which would be under the same package, possibly in a different source folder:</p><pre class="prettyprint xml">
&lt;div class=&quot;dropdown-calendar&quot;
    xmlns:t=&quot;http://tapestry.apache.org/schema/tapestry_5_3.xsd&quot;&gt;
    &lt;t:submitnotifier&gt;
        &lt;t:select value=&quot;date&quot; model=&quot;dateSelectModel&quot; validate=&quot;prop:validate&quot; blankLabel=&quot;--&quot; blankOption=&quot;ALWAYS&quot; class=&quot;input-mini&quot; /&gt;
        &lt;t:select value=&quot;month&quot; model=&quot;monthSelectModel&quot; validate=&quot;prop:validate&quot; blankLabel=&quot;--&quot; blankOption=&quot;ALWAYS&quot; class=&quot;input-small&quot; encoder=&quot;monthEncoder&quot; /&gt;
        &lt;t:select value=&quot;year&quot; model=&quot;yearSelectModel&quot; validate=&quot;prop:validate&quot; blankLabel=&quot;--&quot; blankOption=&quot;ALWAYS&quot; class=&quot;input-small&quot; /&gt;
    &lt;/t:submitnotifier&gt;
&lt;/div&gt;
</pre><p>To use it, simply include the component in your page template:</p><pre class="prettyprint xml">
&lt;t:dropdowncalendarfield value=&quot;date&quot; label=&quot;Assessment Date&quot; validate=&quot;required&quot; start=&quot;1/1/2000&quot; end=&quot;5/1/2000&quot; /&gt;
</pre><p>where</p><ul><li><em>value</em> is bound to a property of type java.util.Date in the page, where the value of the selection will be stored</li><li><em>validate</em> is an implementation of <a
href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/ValidationTracker.html" title="ValidationTracker" target="_blank">org.apache.tapestry5.ValidationTracker</a> that is passed to each individual select within the component</li><li><em>start</em> is a java.lang.String in dd/MM/yyyy format indicating the first selectable date. Defaults to 25 years from the current date.</li><li><em>end</em> is a java.lang.String in dd/MM/yyyy format indicating the last selectable date. Defaults to the current date.</li></ul><p>Happy coding!</p> ]]></content:encoded> <wfw:commentRss>http://blog.jeshurun.ca/technology/tapestry-5-datefield-as-3-select-dropdowns/feed</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Configuring ZadmiN for Android with your VMWare Zimbra Server</title><link>http://blog.jeshurun.ca/technology/configuring-zadmin-for-android-vmware-zimbra-email-server</link> <comments>http://blog.jeshurun.ca/technology/configuring-zadmin-for-android-vmware-zimbra-email-server#comments</comments> <pubDate>Wed, 20 Feb 2013 06:35:04 +0000</pubDate> <dc:creator>Jeshurun Daniel</dc:creator> <category><![CDATA[Technology]]></category> <category><![CDATA[admin]]></category> <category><![CDATA[administration]]></category> <category><![CDATA[Android]]></category> <category><![CDATA[email]]></category> <category><![CDATA[vmware]]></category> <category><![CDATA[zadmin]]></category> <category><![CDATA[zimbra]]></category> <guid
isPermaLink="false">http://blog.jeshurun.ca/?p=618</guid> <description><![CDATA[If you are reading this post, chances are, you have either recently purchased or are contemplating purchasing the ZadmiN app. If you haven&#8217;t checked it out already, Prerequisites The following are necessary for the app to do its thing: Internet connection on your device Access to the admin port (7071 &#8230;]]></description> <content:encoded><![CDATA[<p>If you are reading this post, chances are, you have either recently purchased or are contemplating purchasing the ZadmiN app. If you haven&#8217;t checked it out already, <a
href="https://play.google.com/store/apps/details?id=com.appsropos.zadmin" target="_blank"> <img
alt="Get it on Google Play" src="https://developer.android.com/images/brand/en_generic_rgb_wo_45.png" /></a><br
/> <span
id="more-618"></span><br
/><div
id="attachment_620" class="wp-caption alignright" style="width: 212px"><a
href="http://blog.jeshurun.ca/wp-content/uploads/2013/02/1.png"><img
class="size-medium wp-image-620" alt="Step 1" src="http://blog.jeshurun.ca/wp-content/uploads/2013/02/1-202x300.png" width="202" height="300" /></a><p
class="wp-caption-text">Step 1</p></div><br
/> <strong>Prerequisites</strong><br
/> The following are necessary for the app to do its thing:</p><ol><li>Internet connection on your device</li><li>Access to the admin port (7071 by default) of a Zimbra server</li><li>Administrative access to the server</li></ol><p>It is customary to protect the admin port behind a firewall, so make sure you can access it from the network the device is in, either directly, through a VPN, port forward over a tunnel, or other means.</p><p><strong>Configuring the server in the app</strong></p><p>Touch the &#8220;Configure a Server&#8221; button to get started.</p><div
style="clear:both;"></div><ol><li>Enter the name or ip address of the server in the host field</li><li>Enter the <em>admin</em> port, or a port forwarding to the admin port of the server in the port field, or leave it blank to use the default (7071)</li><li>Uncheck the https box if you have non-https access to the admin soap daemon configured for some reason</li><li>Enter the username and password of an account with administrative privileges on the server</li><li>Click &#8220;Save&#8221;</li></ol><div
style="clear:both;"></div><div
id="attachment_621" class="wp-caption alignleft" style="width: 212px"><a
href="http://blog.jeshurun.ca/wp-content/uploads/2013/02/2.png"><img
src="http://blog.jeshurun.ca/wp-content/uploads/2013/02/2-202x300.png" alt="Add Configuration" width="202" height="300" class="size-medium wp-image-621" /></a><p
class="wp-caption-text">Add Configuration</p></div><div
id="attachment_655" class="wp-caption alignright" style="width: 213px"><a
href="http://blog.jeshurun.ca/wp-content/uploads/2013/02/7.png"><img
src="http://blog.jeshurun.ca/wp-content/uploads/2013/02/7-203x300.png" alt="Save Configuration" width="203" height="300" class="size-medium wp-image-655" /></a><p
class="wp-caption-text">Save Configuration</p></div><div
style="clear:both;"></div><p>Once you have successfully configured the server, a toast appears if the configuration was saved successfully. If the server connection could not be established for some reason, another toast appears indicating the reason the connection could not be established. After a successful connection, the home page will fetch and list the status of all running servers on the server. If you don&#8217;t see the services listed, try the refresh button.</p><div
class="wpInsert wpInsertInPostAd wpInsertMiddle" style="margin: 5px;padding: 0px;"><script type="text/javascript">google_ad_client = "ca-pub-7298306999157442";
/* inserts */
google_ad_slot = "2873800965";
google_ad_width = 468;
google_ad_height = 60;</script> <script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script></div><p>You can access your server configurations at any time by touching the more icon on the action bar, and selecting &#8220;Server Configurations&#8221;. If you have multiple servers configured, you will also have a servers icon on the action bar. Touching this allows you to toggle between your configured servers anywhere within the app.</p><div
id="attachment_622" class="wp-caption alignleft" style="width: 213px"><a
href="http://blog.jeshurun.ca/wp-content/uploads/2013/02/3.png"><img
src="http://blog.jeshurun.ca/wp-content/uploads/2013/02/3-203x300.png" alt="Accessing Server Configurations" width="203" height="300" class="size-medium wp-image-622" /></a><p
class="wp-caption-text">Accessing Server Configurations</p></div><div
id="attachment_623" class="wp-caption alignright" style="width: 213px"><a
href="http://blog.jeshurun.ca/wp-content/uploads/2013/02/4.png"><img
src="http://blog.jeshurun.ca/wp-content/uploads/2013/02/4-203x300.png" alt="Selecting a Server" width="203" height="300" class="size-medium wp-image-623" /></a><p
class="wp-caption-text">Selecting a Server</p></div><div
style="clear:both;"></div><p>Touching the &#8220;Server Configurations&#8221; menu on the action bar brings up a list of all servers you have configured within the app. You can touch the add icon on the action bar to add a new server. Touching a server configuration brings up a menu which lets you edit or delete the configuration.</p><div
id="attachment_624" class="wp-caption alignright" style="width: 213px"><a
href="http://blog.jeshurun.ca/wp-content/uploads/2013/02/5.png"><img
src="http://blog.jeshurun.ca/wp-content/uploads/2013/02/5-203x300.png" alt="Adding more servers" width="203" height="300" class="size-medium wp-image-624" /></a><p
class="wp-caption-text">Adding more servers</p></div><div
id="attachment_625" class="wp-caption alignleft" style="width: 213px"><a
href="http://blog.jeshurun.ca/wp-content/uploads/2013/02/6.png"><img
src="http://blog.jeshurun.ca/wp-content/uploads/2013/02/6-203x300.png" alt="Edit / Delete Configuration" width="203" height="300" class="size-medium wp-image-625" /></a><p
class="wp-caption-text">Edit / Delete Configuration</p></div><div
style="clear:both;"></div> ]]></content:encoded> <wfw:commentRss>http://blog.jeshurun.ca/technology/configuring-zadmin-for-android-vmware-zimbra-email-server/feed</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>ZadmiN &#8211; VMware Zimbra Administration app for Android</title><link>http://blog.jeshurun.ca/technology/zadmin-zimbra-administration-app-for-android</link> <comments>http://blog.jeshurun.ca/technology/zadmin-zimbra-administration-app-for-android#comments</comments> <pubDate>Fri, 15 Feb 2013 17:38:59 +0000</pubDate> <dc:creator>Jeshurun Daniel</dc:creator> <category><![CDATA[Technology]]></category> <category><![CDATA[administration]]></category> <category><![CDATA[Android]]></category> <category><![CDATA[app]]></category> <category><![CDATA[vmware]]></category> <category><![CDATA[zadmin]]></category> <category><![CDATA[zimbra]]></category> <guid
isPermaLink="false">http://blog.jeshurun.ca/?p=578</guid> <description><![CDATA[ZadmiN lets you manage, monitor and administer any number of VMware Zimbra email servers from your Android smartphone or tablet without enduring the hassles of using VMware Zimbra&#8217;s admin web interface on a mobile device. You can easily add / edit accounts and distribution lists, view graphs for MTA counts, &#8230;]]></description> <content:encoded><![CDATA[<p><a
href="https://play.google.com/store/apps/details?id=com.appsropos.zadmin" target="_blank"><br
/> <img
alt="Android app on Google Play" src="https://developer.android.com/images/brand/en_app_rgb_wo_60.png"  class="aligncenter size-full" /><br
/> </a></p><div
id="attachment_579" class="wp-caption alignright" style="width: 317px"><a
href="http://blog.jeshurun.ca/wp-content/uploads/2013/02/1.jpg"><img
src="http://blog.jeshurun.ca/wp-content/uploads/2013/02/1.jpg" alt="ZadmiN Home" width="307" height="512" class="size-full wp-image-579" /></a><p
class="wp-caption-text">ZadmiN Home</p></div><p>ZadmiN lets you manage, monitor and administer any number of VMware Zimbra email servers from your Android smartphone or tablet without enduring the hassles of using VMware Zimbra&#8217;s admin web interface on a mobile device.</p><p>You can easily add / edit accounts and distribution lists, view graphs for MTA counts, volume and anti-virus / anti-spam activity and all other advanced statistics, manage the mail queue, check every account&#8217;s quota usage, and much more on multiple VMware Zimbra servers simultaneously.</p><p>You can also easily set up notifications that periodically check various parameters on the VMware Zimbra server, and notify you immediately when any of them are exceeded. Examples of such notifications would be to check the server periodically for locked out accounts or inactive accounts.</p><p>The app also includes a widget that monitors all services on any of your VMware Zimbra servers and notifies you immediately were any of them to go down.<br
/> Tested to work with Android versions 1.6 and above.</p><p><a
href="https://play.google.com/store/apps/details?id=com.appsropos.zadmin" target="_blank"><br
/> <img
alt="Get it on Google Play" src="https://developer.android.com/images/brand/en_generic_rgb_wo_60.png" class="aligncenter size-full" /><br
/> </a></p><div
id="attachment_580" class="wp-caption aligncenter" style="width: 317px"><a
href="http://blog.jeshurun.ca/wp-content/uploads/2013/02/2.jpg"><img
src="http://blog.jeshurun.ca/wp-content/uploads/2013/02/2.jpg" alt="ZadmiN Monitor" width="307" height="512" class="size-full wp-image-580" /></a><p
class="wp-caption-text">ZadmiN Monitor</p><div
class="wpInsert wpInsertInPostAd wpInsertMiddle" style="margin: 5px;padding: 0px;"><script type="text/javascript">google_ad_client = "ca-pub-7298306999157442";
/* inserts */
google_ad_slot = "2873800965";
google_ad_width = 468;
google_ad_height = 60;</script> <script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script></div></div><div
id="attachment_581" class="wp-caption aligncenter" style="width: 317px"><a
href="http://blog.jeshurun.ca/wp-content/uploads/2013/02/3.jpg"><img
src="http://blog.jeshurun.ca/wp-content/uploads/2013/02/3.jpg" alt="ZadmiN Add Account" width="307" height="512" class="size-full wp-image-581" /></a><p
class="wp-caption-text">ZadmiN Add Account</p></div><div
style="clear:both;"></div><div
id="attachment_582" class="wp-caption aligncenter" style="width: 317px"><a
href="http://blog.jeshurun.ca/wp-content/uploads/2013/02/4.jpg"><img
src="http://blog.jeshurun.ca/wp-content/uploads/2013/02/4.jpg" alt="ZadmiN Advanced Statistics" width="307" height="512" class="size-full wp-image-582" /></a><p
class="wp-caption-text">ZadmiN Advanced Statistics</p></div><div
id="attachment_583" class="wp-caption aligncenter" style="width: 317px"><a
href="http://blog.jeshurun.ca/wp-content/uploads/2013/02/5.jpg"><img
src="http://blog.jeshurun.ca/wp-content/uploads/2013/02/5.jpg" alt="ZadmiN Anti-Spam / Anti-Virus" width="307" height="512" class="size-full wp-image-583" /></a><p
class="wp-caption-text">ZadmiN Anti-Spam / Anti-Virus</p></div><div
style="clear:both;"></div><div
id="attachment_584" class="wp-caption aligncenter" style="width: 317px"><a
href="http://blog.jeshurun.ca/wp-content/uploads/2013/02/6.jpg"><img
src="http://blog.jeshurun.ca/wp-content/uploads/2013/02/6.jpg" alt="ZadmiN Message Queue" width="307" height="512" class="size-full wp-image-584" /></a><p
class="wp-caption-text">ZadmiN Message Queue</p></div><div
id="attachment_585" class="wp-caption aligncenter" style="width: 317px"><a
href="http://blog.jeshurun.ca/wp-content/uploads/2013/02/7.jpg"><img
src="http://blog.jeshurun.ca/wp-content/uploads/2013/02/7.jpg" alt="ZadmiN Sessions" width="307" height="512" class="size-full wp-image-585" /></a><p
class="wp-caption-text">ZadmiN Sessions</p></div><div
style="clear:both;"></div><div
id="attachment_586" class="wp-caption aligncenter" style="width: 317px"><a
href="http://blog.jeshurun.ca/wp-content/uploads/2013/02/8.jpg"><img
src="http://blog.jeshurun.ca/wp-content/uploads/2013/02/8.jpg" alt="ZadmiN Notifications" width="307" height="512" class="size-full wp-image-586" /></a><p
class="wp-caption-text">ZadmiN Notifications</p></div><div
style="clear:both;"></div><p><a
href="https://play.google.com/store/apps/details?id=com.appsropos.zadmin" target="_blank"><br
/> <img
alt="Get it on Google Play" src="https://developer.android.com/images/brand/en_generic_rgb_wo_60.png" class="aligncenter size-full" /><br
/> </a></p> ]]></content:encoded> <wfw:commentRss>http://blog.jeshurun.ca/technology/zadmin-zimbra-administration-app-for-android/feed</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>A Week with the Nexus 4</title><link>http://blog.jeshurun.ca/technology/a-week-with-the-nexus-4</link> <comments>http://blog.jeshurun.ca/technology/a-week-with-the-nexus-4#comments</comments> <pubDate>Tue, 15 Jan 2013 14:44:31 +0000</pubDate> <dc:creator>Jeshurun Daniel</dc:creator> <category><![CDATA[Technology]]></category> <category><![CDATA[Android]]></category> <category><![CDATA[android 4.2]]></category> <category><![CDATA[google]]></category> <category><![CDATA[jellybean]]></category> <category><![CDATA[nexus 4]]></category> <category><![CDATA[review]]></category> <guid
isPermaLink="false">http://blog.jeshurun.ca/?p=524</guid> <description><![CDATA[I happen to be one of the lucky few who managed to grab a Nexus 4 soon after its release. As you might already know, Google is having a huge contraction when it comes to keeping these babies in stock, and I had to pay a sizable premium on top &#8230;]]></description> <content:encoded><![CDATA[<p>I happen to be one of the lucky few who managed to grab a Nexus 4 soon after its release. As you might already know, Google is having a huge contraction when it comes to keeping these babies in stock, and I had to pay a sizable premium on top of the retail price to get my hands on one by Christmas. We all know by now that Google dropped the ball when it comes to churning these out at a rate required to meet demand, so I will spare myself the trouble of elaborating on that. I have now been using the device for over a week as my primary phone, and thought it would be a good time to share my thoughts on the device.</p><p><span
id="more-524"></span></p><h3>Hardware</h3><h5>Construction</h5><p>Plenty has already been said and I am simply reiterating that the hardware is top notch. The phone is looks absolutely stunning to behold and feels great in the hands. It is enclosed by slabs of glass in the front and the back, which are held together by a rubberised frame. The rubberised frame greatly aids in operating the phone with one hand.</p><p>The power button is on the right and the volume keys are on the left. I found this setup rather inconvenient, as I am used to having the volume keys on the right side of the handset on my pervious phone (Xperia Arc) and also on the Nexus 7, but I guess Google wanted to keep things consistent with the previous Nexus phones.</p><p>The speaker is located behind the back of the phone and is exposed by a thin slit in the back glass. While this looks great, it caused a lot of missed calls and notifications, as the speakers are completely covered up when the phone is placed with its back facing down on a desk or matterss. However, this problem is easily solved by using the bumper case that Google is selling with the phone, if you can find one that is.</p><p>Another neat feature is the hidden notification LED, which is located below the screen and in line with the Home button. The LED only supports one color by default(white), but other apps such as K9-Mail seem to be able to make it flash in just about any colour you would like. Instead of flashing boringly, the LED pulses in a fashion somewhat akin to the charging indicator on the MacBook Pro.</p><p>The front glass is tapered at the edges, which makes it a lot easier to swipe from the edge of the screen. For example, in the Chrome browser app, swiping anywhere on the screen scrolls the page horizontally, whereas swiping from either edge cycles between adjacent open tabs. The tapered glass makes it easy to distinguish between the two gestures. The edges of the front glass however does not fit snugly with the outer silver bezel, and instead leaves a tiny gap about the width of a hair. I&#8217;ve noticed that this gap tends to collect dust that could be extremely hard to clean. Hopefully none of them find their way into the display itself.</p><h5>Ports &#038; HDMI</h5><p>The Nexus 4 includes a standard 3.5mm jack on top and a MicroUSB port on the bottom. While it lacks a dedicated HDMI port, it is one of the first handsets to support the <a
href="http://www.amazon.com/SlimPort%C2%AE-SP1002-Connect-connector--Supports/dp/B009UZBLSG/ref=sr_1_1?ie=UTF8&#038;qid=1358257726&#038;sr=8-1&#038;keywords=slimport+hdmihttp://" title="Slimport HDMI Adapter" target="_blank">Slimport HDMI adapter</a>. The adapter hooks up to the micro USB port on the phone and can be plugged into the HDMI port of a TV or projector on the other end via a regular HDMI cable. I&#8217;ve ordered mine on Amazon but it hasn&#8217;t shown up yet. I will update this post when I&#8217;ve had a chance to play with it.</p><h5>Camera</h5><p>The camera is recessed into the frame and is protected by the back cover itself, instead of protruding out or sitting flush with it as found on various other phones. This is great as it protects the lens from scratches, and also makes it easy to clean, by simply wiping the back glass. The Nexus 4 is unlikely to win any awards for the quality of its camera, but it is certainly a big improvement from the one that was on the Galaxy Nexus.</p><p>The Nexus 4 is the first phone I have come across that doesn&#8217;t include a headset in the box, but considering its price tag, this is something that can easily be overlooked.</p><h5>Battery Life</h5><p>Battery life on the Nexus 4 seems to be a fairly solid deal. With my bluetooth headset (MW600) connected to the phone all day, WiFi turned off and the phone connected to the 3G network, I can easily get by my entire day on a single charge, with a couple of hours of calls, 20-30 texts, a 100 or so emails, 30 minutes of web browsing and about an hour of using business apps. I do have auto brightness turned off and have the brightness set to about 30%. The Nexus 4&#8242;s Battery life certainly a big jump from the battery life on the Xperia Arc, and I only expect it would get better with future software updates.</p><h4>Issues</h4><p>A rather annoying and unnerving issue with the Nexus is a faint but weird electronic buzz that emanates from the front of the headset. It is unclear where exactly in the phone the noise originates from, but seems to be audible the most around the mid-region of the handset.<br
/> <a
href="http://blog.jeshurun.ca/wp-content/uploads/2013/01/nexus4_hissing_noise_max_region.png"><img
src="http://blog.jeshurun.ca/wp-content/uploads/2013/01/nexus4_hissing_noise_max_region-300x175.png" alt="nexus4_hissing_noise_max_region" width="300" height="175" class="alignright size-medium wp-image-532" /></a></p><p>Contrary to what others believe, the noise does not seem to originate from the earpiece, but rather seems to originate from a much larger component such as the display or the battery, considering it can be heard by placing the ear anywhere on the front screen. The hissing can be heard irrespective of if the screen is turned on or not. It does seem to change from a high-pitched hissing (like the sound of an electric discharge) when the screen is off to a crackling when it is turned on. The noise is also present during calls, although it does not seem to interfere with the call quality. Luckily, the noise is completely absent during calls when a bluetooth headset is used.</p><p>At first I believed I might have a defective handset, but judging from the number of replies to <a
href="http://code.google.com/p/android/issues/detail?id=39936" title="Nexus Buzzing">this</a> bug report, it appears to be a more widespread problem. Hopefully, this isn&#8217;t another antennagate and Google will be able to resolve the issue with a simple software patch.</p><div
class="wpInsert wpInsertInPostAd wpInsertMiddle" style="margin: 5px;padding: 0px;"><script type="text/javascript">google_ad_client = "ca-pub-7298306999157442";
/* inserts */
google_ad_slot = "2873800965";
google_ad_width = 468;
google_ad_height = 60;</script> <script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script></div><h3>Software</h3><p><div
id="attachment_558" class="wp-caption alignleft" style="width: 190px"><a
href="http://blog.jeshurun.ca/wp-content/uploads/2013/01/jb.png"><img
src="http://blog.jeshurun.ca/wp-content/uploads/2013/01/jb-180x300.png" alt="Android 4.2 JellyBean" width="180" height="300" class="size-medium wp-image-558" /></a><p
class="wp-caption-text">JellyBean on the Nexus 4</p></div><p>Stock Android on the Nexus 4 rocks. Project Butter really shines through in this latest iteration of JellyBean. In all the time that I have used the phone, I can safely say that not once did I experience any sort of lag or stutter whatsoever. It appears that all the Android bashers will finally have to come up with a better reason than &#8216;its laggy&#8217; on why not to choose Android over the competition.</p><h5>New Features</h5><p>New and noteworthy is the photosphere feature in the camera that let&#8217;s you easily snap together a spherical panaroma picture. The developer options have now been hidden away to keep the average user from accidentally making changes. To enable it, you have to go to Settings-> About Phone and tap the Build Number 7 times. After the last tap, you get a toast that says &#8220;Congratulations, you are now a developer!&#8221; and the option becomes available in settings.</p><h5>Stock Apps<br
/><h5><p>The clock app has been completely redesigned with a brand new interface and revamped input controls for entering dates and times. Swiping to the right brings the timer and swiping to the left brings the stopwatch.<div
id="attachment_555" class="wp-caption alignright" style="width: 190px"><a
href="http://blog.jeshurun.ca/wp-content/uploads/2013/01/clock.png"><img
src="http://blog.jeshurun.ca/wp-content/uploads/2013/01/clock-180x300.png" alt="JellyBean Clock" width="180" height="300" class="size-medium wp-image-555" /></a><p
class="wp-caption-text">The Clock App</p></div> The SMS app now appears almost identical to the GoogleTalk app, and displays a counter on the main page beside each thread on the number of messages in that thread. Other Google apps such as Gmail and Calendar have a few minor enhancements but no radical changes. The default launcher still has no way of ordering or sorting the app drawer, but this is easily taken care of by the numerous custom launchers in the app store.</p><h5>Lock Screen Widgets</h5><div
id="attachment_560" class="wp-caption alignleft" style="width: 190px"><a
href="http://blog.jeshurun.ca/wp-content/uploads/2013/01/lock_screen_widgets.png"><img
src="http://blog.jeshurun.ca/wp-content/uploads/2013/01/lock_screen_widgets-180x300.png" alt="Lock Screen Widgets" width="180" height="300" class="size-medium wp-image-560" /></a><p
class="wp-caption-text">Lock Screen Widgets</p></div><p>JellyBean also adds support for lock screen widgets. Widgets of certain apps such as calendar, Google+, Currents and Gmail can be added and arranged here. These then allow for quickly viewing information at a glance without having to unlock the phone. There doesn&#8217;t seem to be a lot of support for this feature from existing apps out there, but that is to be expected given this feature is relatively new.</p><p>Swiping to the right on the lock screen also allows to quickly access the camera without unlocking the phone. If you have a pass code set, the camera app will restrict you to only viewing the pictures you have taken since the last time the phone was locked.</p><h5>Daydream</h5><div
id="attachment_562" class="wp-caption alignright" style="width: 190px"><a
href="http://blog.jeshurun.ca/wp-content/uploads/2013/01/daydream.png"><img
src="http://blog.jeshurun.ca/wp-content/uploads/2013/01/daydream-180x300.png" alt="Daydream Apps" width="180" height="300" class="size-medium wp-image-562" /></a><p
class="wp-caption-text">Daydream Apps</p></div><p>Another neat little feature is daydream under Settings -> Display, that let&#8217;s you pick a supported application to display on the screen when the phone is docked or charging. This is similar to screensavers on desktops, but comes with an API that apps can use to publish information. Flipboard is the most recent app to add support for this feature.</p><h5>Security Enhancements</h5><p>Settings -> Security has an encrypt storage option which encrypts everything in the entire phone. You will have to enter your password every time you boot your phone to decrypt storage. One caveat is that this pin/password is the same as the one used to unlock the screen, and changing one also changes the other. If you get the password wrong about 30 times in a row, the phone automatically reboots and wipes the entire phone.</p><h4>WiFi Issues</h4><p>Getting WiFi to work reliably on the phone has been a challenge. The phone will connect initially, but after a period of sleep/inactivity, will fail to connect to the network again. The WiFi icon turns grey and never turns blue. Turning WiFi off and back on gets it stuck at &#8216;Authenticating&#8217; or &#8216;Obtaining IP Address&#8217;, then eventually dropping out to &#8216;Not in Range&#8217;. The only way to get WiFi working again seems to be by toggling airplane mode or rebooting the phone.</p><p>The issue is absent in the Nexus 7 running the same version of Android, so this seems like a hardware or a driver issue. There is a bug report <a
href="http://code.google.com/p/android/issues/detail?id=40065">here</a>, with several &#8216;me too&#8217; posts, so the problem seems fairly widespread. Google have remained mum on the issue so far. <a
href="http://www.androidcentral.com/earpiece-buzz-not-unique-nexus-4" title="Nexus Buzzing">Android Central</a> however seems to believe the issue is also present in handsets from other manufacturers, although the author&#8217;s own Nexus 4 did not exibit these problems, almost validating that this is a hardware problem.</p><h4>Final Thoughts</h4><p>The Nexus 4 might be the hottest phone on the block right now, but that doesn&#8217;t make it exempt from its share of issues. Now don&#8217;t get me wrong, the Nexus 4 is one of the best phones out there today, if not the very best considering its wallet-friendly price tag and cutting edge specs, but some of these issues it is experiencing right now can be really frustrating during day-to-day usage. Here is hoping that Google work diligently to iron out these glitches and make this phone the best it can be. In the end it appears that the stock issues the Nexus 4 is experiencing might actually be a blessing in disguise for Google, as it might give them more time to work on these problems. Now that the holiday shopping frenzy is over, if you haven&#8217;t managed to get your hands on one yet, your best bet might be to hold off your purchase until Google get their act together and fix the issues that currently plague this otherwise amazing phone.</p> ]]></content:encoded> <wfw:commentRss>http://blog.jeshurun.ca/technology/a-week-with-the-nexus-4/feed</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Integrating TinyMCE with Tapestry 5 and jQuery</title><link>http://blog.jeshurun.ca/technology/integrating-tinymce-tapestry-5-jquer</link> <comments>http://blog.jeshurun.ca/technology/integrating-tinymce-tapestry-5-jquer#comments</comments> <pubDate>Thu, 15 Nov 2012 16:53:36 +0000</pubDate> <dc:creator>Jeshurun Daniel</dc:creator> <category><![CDATA[Technology]]></category> <category><![CDATA[jquery]]></category> <category><![CDATA[tapestry]]></category> <category><![CDATA[tinymce]]></category> <guid
isPermaLink="false">http://blog.jeshurun.ca/?p=503</guid> <description><![CDATA[If you use Tapestry5-jQuery in your Tapestry 5 project, you can easily integrate the TinyMCE Rich Text Editor as a mixin for textareas in your form. Download TinyMCE jQuery package from here. Add all the downloaded files, including the langs and themes folder into a folder in your Web application &#8230;]]></description> <content:encoded><![CDATA[<p>If you use <a
title="Tapestry5 jQuery" href="http://tapestry5-jquery.com/" target="_blank">Tapestry5-jQuery</a> in your <a
title="Tapestry 5" href="http://tapestry.apache.org/" target="_blank">Tapestry 5</a> project, you can easily integrate the <a
title="TinyMCE" href="http://www.tinymce.com/" target="_blank">TinyMCE</a> Rich Text Editor as a mixin for textareas in your form.</p><p><span
id="more-503"></span></p><div
class="wpInsert wpInsertInPostAd wpInsertMiddle" style="margin: 5px;padding: 0px;"><script type="text/javascript">google_ad_client = "ca-pub-7298306999157442";
/* inserts */
google_ad_slot = "2873800965";
google_ad_width = 468;
google_ad_height = 60;</script> <script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script></div><ul><li>Download TinyMCE jQuery package from <a
title="TinyMCE Download" href="http://blog.jeshurun.ca/technology/alfresco-on-ubuntu-complete-installation-guide" target="_blank">here</a>.</li><li>Add all the downloaded files, including the langs and themes folder into a folder in your Web application context. For example, add all the files and folders to the Your_Project/WebContent/js/tinymce/ folder</li><li>Add the following class to your mixins package.</li></ul><pre class="brush: java; title: ; notranslate">
import org.apache.tapestry5.ClientElement;
import org.apache.tapestry5.annotations.BeginRender;
import org.apache.tapestry5.annotations.Import;
import org.apache.tapestry5.annotations.InjectContainer;
import org.apache.tapestry5.ioc.annotations.Inject;
import org.apache.tapestry5.services.javascript.JavaScriptSupport;
/**
 *
 * @author Jeshurun Daniel
 *
 */
@Import(library={&quot;context:/js/tinymce/jquery.tinymce.js&quot;,
&quot;context:/js/tinymce/tiny_mce.js&quot;})
public class TinyMCE {
	@Inject
	private JavaScriptSupport jsSupport;
	@InjectContainer
	private ClientElement element;
	@BeginRender
	void begin() {
		jsSupport.addScript(&quot;tinyMCE.init({ mode : &quot;exact&quot;, elements: &quot;%s&quot; });&quot;, element.getClientId());
	}
}
</pre><ul><li>To use it, simply add the mixin to any element you want, such as textareas or textfields.</li></ul><pre class="brush: xml; title: ; notranslate">
&lt;t:textarea value=&quot;value&quot;  t:mixins=&quot;tinymce&quot;/&gt;
</pre>]]></content:encoded> <wfw:commentRss>http://blog.jeshurun.ca/technology/integrating-tinymce-tapestry-5-jquer/feed</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>Alfresco on Ubuntu &#8211; Complete Installation Guide</title><link>http://blog.jeshurun.ca/technology/alfresco-on-ubuntu-complete-installation-guide</link> <comments>http://blog.jeshurun.ca/technology/alfresco-on-ubuntu-complete-installation-guide#comments</comments> <pubDate>Sat, 13 Oct 2012 11:09:26 +0000</pubDate> <dc:creator>Jeshurun Daniel</dc:creator> <category><![CDATA[Technology]]></category> <category><![CDATA[alfresco]]></category> <category><![CDATA[linux]]></category> <category><![CDATA[ubuntu]]></category> <guid
isPermaLink="false">http://blog.jeshurun.ca/?p=458</guid> <description><![CDATA[In an earlier post, I had outlined the process of installing Alfresco on a 32-bit Ubuntu server. This walkthrough documents the steps required to get Alfresco going on a 64-bit machine running Ubuntu 10.04 LTS server, including installing and successfully establishing a connection with OpenOffice for document conversion and previews. &#8230;]]></description> <content:encoded><![CDATA[<p>In an earlier post, I had outlined the process of <a
href="http://blog.jeshurun.ca/technology/manually-installing-alfresco-on-ubuntu-server">installing Alfresco on a 32-bit Ubuntu server</a>. This walkthrough documents the steps required to get Alfresco going on a 64-bit machine running Ubuntu 10.04 LTS server, including installing and successfully establishing a connection with OpenOffice for document conversion and previews.</p><p><span
id="more-458"></span><br
/> <a
href="http://blog.jeshurun.ca/wp-content/uploads/2012/10/Alfresco_On_Ubuntu_r.png"><img
src="http://blog.jeshurun.ca/wp-content/uploads/2012/10/Alfresco_On_Ubuntu_r.png" alt="" title="Alfresco on Ubuntu" width="233" height="150" class="alignright size-full wp-image-476" /></a></p><h4>Pre-Requisites:</h5><ul><li>A machine running Ubuntu Server 10.04 LTS (64 bit) installed.</li></ul><p>Installation of additional Alfresco components, such as solr,  web quick start, web editor and sharepoint integration will not be covered in this walkthrough.</p><h4>Prepping the system:</h5><ol><li>Install MySQL server<pre class="brush: bash; title: ; notranslate">
sudo apt-get install mysql-server
</pre><p>During the installation, the installer will prompt you for the root password of the MySQL server.</li><li> Login to MySQL, then setup the database and user account that Alfresco will use.</p><pre class="brush: sql; title: ; notranslate">
create database alfresco;
</pre><p>Next, generate a password for the alfresco user on the server.</p><pre class="brush: sql; title: ; notranslate">
show create password('yourpassword');
</pre><p>Make a note of the hash value that was generated. Finally, create the alfresco user account in MySQL and flush privileges for the changes to take effect.</p><pre class="brush: sql; title: ; notranslate">
grant all privileges on `alfresco`.* to 'alfresco'@'localhost' identified by password '*YOURGENERATEDHASH';
flush privileges;
</pre></li><li><p>Install either the Sun(Oracle) or OpenJDK6 (1.8+) JVM. Alfresco will run fine on either of them, and performance will be similar, so choosing one over the other is a matter of personal preference.</p><p>To install OpenJDK, if it isn&#8217;t already installed for some reason:</p><pre class="brush: bash; title: ; notranslate">
sudo apt-get install openjdk6-jre
</pre><p>Note that Alfresco 4.2+ only works on OpenJDK version 7 and up.</p><p>If you prefer the Sun (now Oracle) JVM, run the following commands instead.</p><pre class="brush: bash; title: ; notranslate">
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java7-installer
</pre></li><li> Install OpenOffice and friends</p><pre class="brush: bash; title: ; notranslate">
sudo apt-get install openoffice.org-base openoffice.org-base-core openoffice.org-calc openoffice.org-common openoffice.org-draw openoffice.org-impress openoffice.org-math openoffice.org-style-galaxy openoffice.org-style-human openoffice.org-style-industrial openoffice.org-style-oxygen openoffice.org-style-tango openoffice.org-writer openoffice.org ooo-thumbnailer
</pre><p>The full open office suite (minus the GUI, dictionaries and language packs) is required for document conversions to work properly.</li><li>Install Swftools. Alfresco uses the pdf2swf binary contained therin to generate previews for PDF files in Share.<pre class="brush: bash; title: ; notranslate">
sudo apt-get install python-software-properties
sudo apt-add-repository ppa:guilhem-fr/swftools
sudo apt-get update
sudo apt-get install swftools
</pre></li><li> Install JODConverter.</p><pre class="brush: bash; title: ; notranslate">
sudo apt-get install jodconverter jodconverter-java
</pre></li><li> Install ImageMagick.</p><pre class="brush: bash; title: ; notranslate">
sudo apt-get install imagemagick
</pre></li><li>Install Microsoft core fonts, as these may be used by some documents and are required for converted documents to retain formatting.<pre class="brush: bash; title: ; notranslate">
sudo apt-get install ttf-mscorefonts-installer
</pre></li><li> Download the latest version of Apache Tomcat:</p><pre class="brush: bash; title: ; notranslate">
wget http://apache.mirror.rafal.ca/tomcat/tomcat-7/v7.0.32/bin/apache-tomcat-7.0.32.tar.gz
</pre></li><li> Download the Java MySQL drivers (Connector/J) from the MySQL website.</p><div
class="wpInsert wpInsertInPostAd wpInsertMiddle" style="margin: 5px;padding: 0px;"><script type="text/javascript">google_ad_client = "ca-pub-7298306999157442";
/* inserts */
google_ad_slot = "2873800965";
google_ad_width = 468;
google_ad_height = 60;</script> <script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script></div><pre class="brush: bash; title: ; notranslate">
wget http://cdn.mysql.com/Downloads/Connector-J/mysql-connector-java-5.1.22.tar.gz
</pre></li><li>Finally, download the latest version of Alfresco. Visit <a
href="http://wiki.alfresco.com/wiki/Download_and_Install_Alfresco">this</a> page, then click on &#8220;Custom Installs &#038; Optional Modules&#8221;. Download the &#8220;alfresco-community-4.x.x.zip&#8221; file with wget.<pre class="brush: bash; title: ; notranslate">
wget  http://dl.alfresco.com/release/community/build-4428/alfresco-community-4.2.a.zip
</pre></li><li> We will be installing Alfresco in /opt/webapps, but you could choose any directory of your liking, including a user&#8217;s home directory. Just make sure you update the path in the scripts below. It is also advisable to create a separate user account on the system with restricted privileges that will under which the tomcat process will be executed, and also possibly fronted by Apache. These configurations are beyond the scope of this discussion. It is however worth mentioning that this user must be granged ownership to the chosen installation folder.</li></ol><h4>Installing Alfresco<br
/><h4><h5>Setting up and testing Tomcat</h5><p>Extract Tomcat from the downloaded zip file into the target installation folder. Rename this folder to Tomcat. Test that it works by itself by executing bin/startup.sh. You should be able to access the default page by navigating to <your
server ip address>:8080 from a web browser in a computer on your network. If all is well, stop Tomcat by executing bin/shutdown.sh</p><p>Now that we know Tomcat works fine by itself, we will have to tweak it a bit for it to play nice hosting Alfresco.</p><ol><li>Create the file tomcat/conf/Catalina/localhost/alfresco.xml with the following contents:<pre class="brush: xml; title: ; notranslate">
&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
&lt;Context&gt;
  &lt;Environment override=&quot;false&quot; type=&quot;java.lang.Boolean&quot; name=&quot;properties/startup.enable&quot; description=&quot;A flag that globally enables or disables startup of the major Alfresco subsystems.&quot; value=&quot;true&quot;/&gt;
  &lt;Environment override=&quot;false&quot; type=&quot;java.lang.String&quot; name=&quot;properties/dir.root&quot; description=&quot;The filesystem directory below which content and index data is stored. Should be on a shared disk if this is a clustered installation.&quot;/&gt;
  &lt;Environment override=&quot;false&quot; type=&quot;java.lang.String&quot; name=&quot;properties/hibernate.dialect&quot; description=&quot;The fully qualified name of a org.hibernate.dialect.Dialect subclass that allows Hibernate to generate SQL optimized for a particular relational database. Choose from org.hibernate.dialect.DerbyDialect, org.hibernate.dialect.MySQLInnoDBDialect, org.alfresco.repo.domain.hibernate.dialect.AlfrescoOracle9Dialect, org.alfresco.repo.domain.hibernate.dialect.AlfrescoSybaseAnywhereDialect, org.alfresco.repo.domain.hibernate.dialect.AlfrescoSQLServerDialect, org.hibernate.dialect.PostgreSQLDialect&quot;/&gt;
  &lt;Environment override=&quot;false&quot; type=&quot;java.lang.String&quot; name=&quot;properties/hibernate.query.substitutions&quot; description=&quot;Mapping from tokens in Hibernate queries to SQL tokens. For PostgreSQL, set this to &amp;quot;true TRUE, false FALSE&amp;quot;.&quot;/&gt;
  &lt;Environment override=&quot;false&quot; type=&quot;java.lang.Boolean&quot; name=&quot;properties/hibernate.jdbc.use_get_generated_keys&quot; description=&quot;Enable use of JDBC3 PreparedStatement.getGeneratedKeys() to retrieve natively generated keys after insert. Requires JDBC3+ driver. Set to false if your driver has problems with the Hibernate identifier generators. By default, tries to determine the driver capabilities using connection metadata.&quot;/&gt;
  &lt;Environment override=&quot;false&quot; type=&quot;java.lang.String&quot; name=&quot;properties/hibernate.default_schema&quot; description=&quot;Qualify unqualified table names with the given schema/tablespace in generated SQL. It may be necessary to set this when the target database has more than one schema.&quot;/&gt;
&lt;/Context&gt;
</pre></li><li> Edit catalina.properties in Tomcat&#8217;s conf folder and locate the line<pre class="brush: java; light: true; title: ; notranslate">shared.loader=</pre><p> and change it to<pre class="brush: java; light: true; title: ; notranslate">shared.loader=${catalina.base}/shared/classes,${catalina.base}/shared/lib/*.jar</pre></li></ol><h5>Deploying Alfresco and Share on Tomcat</h5><ol><li> Unzip the alfresco.zip file that you downloaded previously into a folder in your home directory</li><li>Copy the endorsed folder into the Tomcat directory.</li><li>Copy the files in the lib folder into the lib folder in the tomcat directory.</li><li>Copy the war files in the webapps directory to tomcat&#8217;s webapps directory.</li><li>Copy the shared folder into the tomcat directory.</li><li>Extract the MySQL Connector/J jar you downloaded earlier and copy it into Tomcat&#8217;s lib folder.</li><li>Create a directory named data in the root install directory, which will be Alfresco&#8217;s main data directory. When writing backup scripts, make sure this directory is backed up above all else!</li></ol><h5>Alfresco Utility Scripts</h5><p>We will use three scripts, alfresco.sh, alf_start.sh and alf_stop.sh to aid in starting and stopping the server. These files are not included in the custom install version of Alfresco that we downloaded, and will have to be created in root install directory. Once created, these files will have to be made executable. This can by done by the chmod command:<pre class="brush: bash; light: true; title: ; notranslate">chmod +x filename.sh</pre></p><p><strong>alfresco.sh</strong></p><pre class="brush: bash; title: ; notranslate">
#!/bin/sh
# Start or stop Alfresco server
# Set the following to where Tomcat is installed
ALF_HOME=/opt/webapps/alfresco
cd &quot;$ALF_HOME&quot;
APPSERVER=&quot;${ALF_HOME}/tomcat&quot;
export JAVA_HOME=&quot;/usr/lib/jvm/java-7-oracle/&quot;
# Set any default JVM values
export JAVA_OPTS='-server -Xms2G -Xmx3G -XX:MaxPermSize=2048M -XX:NewSize=1024m'
export JAVA_OPTS=&quot;${JAVA_OPTS} -Dalfresco.home=${ALF_HOME} -Dcom.sun.management.jmxremote&quot;
export JAVA_OPTS=&quot;${JAVA_OPTS} -Djava.rmi.server.hostname=localhost&quot;
export JAVA_OPTS=&quot;${JAVA_OPTS} -Djava.awt.headless=true&quot;
#
if [ &quot;$1&quot; = &quot;start&quot; ]; then
  &quot;${APPSERVER}/bin/startup.sh&quot;
elif [ &quot;$1&quot; = &quot;stop&quot; ]; then
  &quot;${APPSERVER}/bin/shutdown.sh&quot;
fi
</pre><p>You can tweak the VM options passed to better suit your environment. Note that if you installed OpenJDK, you will have to modify the JAVA_HOME variable as well (usually /usr/lib/jvm/java-7-openjdk).</p><p><strong>alf_start.sh</strong></p><pre class="brush: bash; title: ; notranslate">
#!/bin/sh
bash /opt/webapps/alfresco/alfresco.sh start
</pre></p><p><strong>alf_stop.sh</strong></p><pre class="brush: bash; title: ; notranslate">
#!/bin/sh
bash /opt/webapps/alfresco/alfresco.sh stop
</pre></p><h5>Configuring the Alfresco Installation</h5><p>Finally, we edit alfresco-global.properties, which is Alfresco&#8217;s primary configuration file, and includes database connection properties, indexer configuration, ftp and cifs configuration and the location of binaries of supporting libraries such as OpenOffice among others. The file is located under tomcat/shared/classes. A sample properties file is also provided for reference.</p><p>After a bit of tweaking, my alfresco-global.properties looked like this. The file is self-explanatory with the included comments.</p><pre class="brush: java; title: ; notranslate">
###############################
## Common Alfresco Properties #
###############################
#
# custom content and index data location
#
dir.root=/opt/alfresco/data
#dir.keystore=${dir.root}/keystore
# we are not using solr yet, and will use lucene for the time being
index.subsystem.name=lucene
#
# Sample database connection properties
#
db.name=alfresco
db.host=localhost
db.port=3306
db.username=yourdbusername
db.password=yourdbpassword
db.driver=org.gjt.mm.mysql.Driver
db.url=jdbc:mysql://${db.host}:${db.port}/${db.name}
#
# External locations
#-------------
ooo.exe=/usr/lib/openoffice/program/soffice
ooo.enabled=true
jodconverter.officeHome=/usr/lib/openoffice
jodconverter.portNumbers=8101
jodconverter.enabled=true
img.root=/usr
swf.exe=/usr/bin/pdf2swf
#
# Index Recovery Mode
#-------------
index.recovery.mode=AUTO
#
# URL Generation Parameters (The ${localname} token is replaced by the local server name)
#-------------
alfresco.context=alfresco
alfresco.host=${localname}
alfresco.port=8080
alfresco.protocol=http
#
share.context=share
share.host=${localname}
share.port=8080
share.protocol=http
# Cifs settings to use non-privileged ports, as tomcat runs as non-root
# @see https://forums.alfresco.com/en/viewtopic.php?f=8&amp;t=20893
cifs.enabled=true
cifs.Server.Name={localname}
cifs.domain=WORKGROUP
cifs.hostanounce=true
cifs.broadcast=0.0.0.0
cifs.tcpipSMB.port=50601
cifs.ipv6.enabled=false
cifs.netBIOSSMB.namePort=50602
cifs.netBIOSSMB.datagramPort=50603
cifs.netBIOSSMB.sessionPort=50604
# FTP
# Move the default ftp server port to a port over 1024 to avoid having to run tomcat with elevated privileges.
ftp.enabled=true
ftp.port=2121
</pre><p>That pretty much sums up all the configuration that is needed to get Alfresco up and running on an Ubuntu server. To start the server, simply execute alf_start.sh and tail Tomcat&#8217;s logs to make sure everything starts up smoothly.</p><h5>Init Scripts To Automatically Start / Stop Alfresco during Server Reboot Cycles</h5><p>One final piece of configuration is to add some init scripts to the server, to make sure tomcat is properly started / stopped when the server power cycles. This is done by creating an init script (which I have named alfresco) in /etc/init.d, and then using the update-rd.d tool to update the run levels on the server. Note that the example file below also attempts to start / stop the server as a non-privileged user named alfresco</p><pre class="brush: bash; title: ; notranslate">
#!/bin/sh
#
# description: Alfresco Community Startup Script
# adapted by JD
#
RETVAL=0
start () {
    sudo -u alfresco /opt/webapps/alfresco/alfresco.sh start &quot;$2&quot;
    RETVAL=$?
}
stop () {
    sudo -u alfresco /opt/webapps/alfresco/alfresco.sh stop &quot;$2&quot;
    RETVAL=$?
}
case &quot;$1&quot; in
    start)
        start &quot;$@&quot;
        ;;
    stop)
        stop &quot;$@&quot;
        ;;
    restart)
        stop &quot;$@&quot;
        start &quot;$@&quot;
        ;;
    *)
        sudo -u alfresco /opt/webapps/alfresco/alfresco.sh &quot;$@&quot;
        RETVAL=$?
esac
exit $RETVAL
</pre><p>Finally, run update-rc.d to update the run levels.</p><pre class="brush: bash; title: ; notranslate">
update-rc.d alfresco defaults
</pre><p>And thats all there is to manually installing Alfresco on a 64-bit Ubuntu server.</p> ]]></content:encoded> <wfw:commentRss>http://blog.jeshurun.ca/technology/alfresco-on-ubuntu-complete-installation-guide/feed</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Alienware + OS X = Pure Win</title><link>http://blog.jeshurun.ca/technology/alienware-os-x-pure-win</link> <comments>http://blog.jeshurun.ca/technology/alienware-os-x-pure-win#comments</comments> <pubDate>Tue, 25 Sep 2012 06:32:57 +0000</pubDate> <dc:creator>Jeshurun Daniel</dc:creator> <category><![CDATA[Technology]]></category> <category><![CDATA[alienware]]></category> <category><![CDATA[apple]]></category> <category><![CDATA[osx]]></category> <guid
isPermaLink="false">http://blog.jeshurun.ca/?p=411</guid> <description><![CDATA[]]></description> <content:encoded><![CDATA[<div
class="ngg-galleryoverview" id="ngg-gallery-2-411"><div
class="slideshowlink"> <a
class="slideshowlink" href="http://blog.jeshurun.ca/technology/alienware-os-x-pure-win?show=slide"> [Show as slideshow] </a></div><div
id="ngg-image-37" class="ngg-gallery-thumbnail-box"  ><div
class="ngg-gallery-thumbnail" > <a
href="http://blog.jeshurun.ca/wp-content/gallery/osxonalienware/osx_on_alienware_1.jpg" title="OS X on Alienware M14X" class="shutterset_set_2" > <img
title="osx_on_alienware_1" alt="osx_on_alienware_1" src="http://blog.jeshurun.ca/wp-content/gallery/osxonalienware/thumbs/thumbs_osx_on_alienware_1.jpg" width="100" height="75" /> </a></div></div><div
class='ngg-clear'></div></div> ]]></content:encoded> <wfw:commentRss>http://blog.jeshurun.ca/technology/alienware-os-x-pure-win/feed</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Connecting the Google Nexus 7 to Ubuntu / Mint over USB</title><link>http://blog.jeshurun.ca/technology/connecting-the-google-nexus-7-to-ubuntu-mint-over-usb</link> <comments>http://blog.jeshurun.ca/technology/connecting-the-google-nexus-7-to-ubuntu-mint-over-usb#comments</comments> <pubDate>Mon, 24 Sep 2012 07:48:38 +0000</pubDate> <dc:creator>Jeshurun Daniel</dc:creator> <category><![CDATA[Technology]]></category> <category><![CDATA[Android]]></category> <category><![CDATA[google]]></category> <category><![CDATA[mtp]]></category> <category><![CDATA[nexus7]]></category> <category><![CDATA[ubuntu]]></category> <category><![CDATA[usb]]></category> <guid
isPermaLink="false">http://blog.jeshurun.ca/?p=401</guid> <description><![CDATA[I have had the pleasure of using a Nexus 7 for the past few days, and while it is a fantastic tablet all around, there is one minor roadblock I hit, which was connecting it to my Ubuntu laptop to transfer files via USB. The problem stems from the fact &#8230;]]></description> <content:encoded><![CDATA[<p>I have had the pleasure of using a <strong>Nexus 7</strong> for the past few days, and while it is a fantastic tablet all around, there is one minor roadblock I hit, which was connecting it to my Ubuntu laptop to transfer files via <strong>USB</strong>. The problem stems from the fact that the Nexus 7 uses the <strong><a
href="http://www.reddit.com/r/Android/comments/mg14z/whoa_whoa_ics_doesnt_support_usb_mass_storage/c30q93p" title="Why no MTP on Android Jelly Bean">Media Transfer Protocol (MTP)</a></strong>, support for which is not included by default (yet) on <strong>Ubuntu</strong>.</p><p>But as with all things Linux, mounting the tab and transferring files was accomplished with only a few simple commands. Here is what I had to do:</p><div
class="wpInsert wpInsertInPostAd wpInsertMiddle" style="margin: 5px;padding: 0px;"><script type="text/javascript">google_ad_client = "ca-pub-7298306999157442";
/* inserts */
google_ad_slot = "2873800965";
google_ad_width = 468;
google_ad_height = 60;</script> <script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script></div><p><span
id="more-401"></span></p><ol><li>Open a terminal.</li><li>Create a udev rules file for the Nexus 7 with it&#8217;s device id (18d1)<pre class="brush: bash; title: ; notranslate">sudo nano /etc/udev/rules.d/99-android.rules</pre></li><li>Paste the following contents into the, save and exit (ctrl+o, then ctrl+x):<pre class="brush: plain; title: ; notranslate"># Nexus 7
SUBSYSTEM==&quot;usb&quot;, SYSFS{idVendor}==&quot;18d1&quot;, MODE=&quot;0666&quot;</pre><p>You can find a list of vendor ids for various Android OEMs <a
href="http://developer.android.com/tools/device.html#VendorIds" title="USB Vendor IDs" target="_blank">here</a>.</li><li>Make the file executable (gotta love the security on Linux)<pre class="brush: bash; title: ; notranslate">sudo chmod +x /etc/udev/rules.d/99-android.rules</pre></li><li>Install the mtp libraries from the repos<pre class="brush: bash; title: ; notranslate">sudo apt-get install libmtp-common libmtp-runtime libmtp9 mtpfs mtp-tools</pre></li><li>Create a mount point for the Nexus 7 and make it accessable to all users<pre class="brush: bash; title: ; notranslate">sudo mkdir /media/nexus7
sudo chmod 755 /media/nexus7</pre></li><li>Finally plug your Nexus 7 into an empty USB slot on your comptuer and run the following command on the terminal:<pre class="brush: bash; title: ; notranslate">sudo mtpfs -o allow_other /media/nexus7</pre></li><li>In a few seconds, the tablet should appear mounted as an external drive on your file browser.</li><li>Note that these steps are applicable to <em>all</em> <strong>Debian</strong> based systems including <strong>Linux Mint</strong></li><li>When you are done moving files, unmount the mounted folder before unplugging the device.<pre class="brush: bash; title: ; notranslate">sudo umount /media/nexus7</pre></li></ol> ]]></content:encoded> <wfw:commentRss>http://blog.jeshurun.ca/technology/connecting-the-google-nexus-7-to-ubuntu-mint-over-usb/feed</wfw:commentRss> <slash:comments>5</slash:comments> </item> </channel> </rss>