<?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>Best Free Tips</title>
	<atom:link href="http://www.bestfreetips.co.uk/feed" rel="self" type="application/rss+xml" />
	<link>http://www.bestfreetips.co.uk</link>
	<description>Tutorials and Tips</description>
	<lastBuildDate>Tue, 09 Aug 2011 18:25:12 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.3</generator>
		<item>
		<title>Spring Batch Example</title>
		<link>http://www.bestfreetips.co.uk/tutorials-guides/spring-batch-example?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=spring-batch-example</link>
		<comments>http://www.bestfreetips.co.uk/tutorials-guides/spring-batch-example#comments</comments>
		<pubDate>Sat, 06 Aug 2011 09:43:05 +0000</pubDate>
		<dc:creator>zully</dc:creator>
				<category><![CDATA[Tutorials & Guides]]></category>
		<category><![CDATA[Batch]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Spring Batch]]></category>
		<category><![CDATA[XML]]></category>

		<guid isPermaLink="false">http://www.bestfreetips.co.uk/?p=105</guid>
		<description><![CDATA[This is a basic guide to get you started with Spring Batch Framework. The framework has alot to get your head around. Key Terms with references Job<a href="http://www.bestfreetips.co.uk/tutorials-guides/spring-batch-example"> Read More...</a>]]></description>
			<content:encoded><![CDATA[<p>This is a basic guide to get you started with <a href="http://static.springsource.org/spring-batch/">Spring Batch Framework</a>.  The framework has alot to get your head around.</p>
<h2>Key Terms with references</h2>
<ul>
<li><a href="http://static.springsource.org/spring-batch/reference/html/domain.html#domainJob">Job</a> &#8211; Contains steps for the process execution (describes what job is and how it is executed). It is entire set of batch work.</li>
<li><a href="http://static.springsource.org/spring-batch/reference/html/domain.html#domainJobInstance">Job Instance</a> &#8211; Represents the given job during the execution process (organises the job process with job parameters)</li>
<li><a href="http://static.springsource.org/spring-batch/reference/html/domain.html#domainJobParameters">Job Parameters</a> &#8211; are type properties that are parameters for the job instance.</li>
<li><a href="http://static.springsource.org/spring-batch/reference/html/domain.html#domainJobExecution">Job Execution</a> &#8211; is what happend during job run (i.e. status, failures etc.) &#8211; Each run of Job Instance results in Job Execution.</li>
<li>Step Execution &#8211; is a run of a single step execution in Job Instance.</li>
<li><a href="http://static.springsource.org/spring-batch/reference/html/domain.html#domainJobRepository">Job Repository</a> &#8211; represents a persistent store (i.e. database) for the jobs to run.</li>
<li>Tasklet &#8211; is to setup or cleanup resources before the main business logic is executed.</li>
<li><a href="http://static.springsource.org/spring-batch/reference/html/domain.html#domainJobLauncher">Job Launcher</a> &#8211; is responsible for starting a Job with given job parameters</li>
</ul>
<h2>Example</h2>
<p>We will be using SimpleJobLauncher that relies on a TaskExecutor to  launch the jobs. If there is no specific TaskExecutor is set then a  SyncTaskExecutor is used. We will use the SimpleJobRepository  implementation which requires a set of execution Daos to store its  information.</p>
<p><strong>Tasklet Example</strong></p>
<pre class="java">
public class PrintTasklet implements Tasklet
{
private String message;
public void setMessage(String message)
{
this.message = message;
}
public ExitStatus execute() throws Exception
{
System.out.println("**** "+message+" ******");
return ExitStatus.FINISHED;
}
}
</pre>
<p><strong>Luncher Context Example</strong></p>
<pre class="xhtml">
&lt;beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans <a href="http://www.springframework.org/schema/beans/spring-beans-2.5.xsd" rel="nofollow">http://www.springframework.org/schema/beans/spring-beans-2.5.xsd</a>"&gt;
&lt;bean id="jobLauncher" class="org.springframework.batch.core.launch.support.SimpleJobLauncher"&gt;
&lt;property name="jobRepository" ref="jobRepository"/&gt;
&lt;/bean&gt;
&lt;bean id="jobRepository" class="org.springframework.batch.core.repository.support.SimpleJobRepository"&gt;
&lt;constructor-arg&gt;
&lt;bean class="org.springframework.batch.core.repository.dao.MapJobInstanceDao"/&gt;
&lt;/constructor-arg&gt;
&lt;constructor-arg&gt;
&lt;bean class="org.springframework.batch.core.repository.dao.MapJobExecutionDao" /&gt;
&lt;/constructor-arg&gt;
&lt;constructor-arg&gt;
&lt;bean class="org.springframework.batch.core.repository.dao.MapStepExecutionDao"/&gt;
&lt;/constructor-arg&gt;
&lt;/bean&gt;
&lt;/beans&gt;
</pre>
<p><strong>Job XML Example</strong></p>
<pre class="xhtml">
&nbsp;
&lt;bean id="hello" class="eg.spring.batch.PrintTasklet"&gt;
&lt;property name="message" value="Hello"/&gt;
&lt;/bean&gt;
&lt;bean id="space" class="eg.spring.batch.PrintTasklet"&gt;
&lt;property name="message" value=" "/&gt;
&lt;/bean&gt;
&lt;bean id="world" class="eg.spring.batch.PrintTasklet"&gt;
&lt;property name="message" value="World!"/&gt;
&lt;/bean&gt;
&lt;bean id="taskletStep" abstract="true"
class="org.springframework.batch.core.step.tasklet.TaskletStep"&gt;
&lt;property name="jobRepository" ref="jobRepository"/&gt;
&lt;/bean&gt;
&lt;bean id="simpleJob" class="org.springframework.batch.core.job.SimpleJob"&gt;
&lt;property name="name" value="simpleJob" /&gt;
&lt;property name="steps"&gt;
&lt;list&gt;
&lt;bean parent="taskletStep"&gt;
&lt;property name="tasklet" ref="hello"/&gt;
&lt;/bean&gt;
&lt;bean parent="taskletStep"&gt;
&lt;property name="tasklet" ref="space"/&gt;
&lt;/bean&gt;
&lt;bean parent="taskletStep"&gt;
&lt;property name="tasklet" ref="world"/&gt;
&lt;/bean&gt;
&lt;/list&gt;
&lt;/property&gt;
&lt;property name="jobRepository" ref="jobRepository"/&gt;
&lt;/bean&gt;
&lt;/beans&gt;
</pre>
<p><strong>Running the Example</strong></p>
<p>Download spring batch version 1.2 and add all the jars into the  classpath. Also add in launcherContext.xml and simpleJob.xml in  classpath as well as PrintTaskLet.class or in a jar file. Ensure that  PrintTasklet class is in package &#8220;eg.spring.batch&#8221;.<br />
Then from command prompt:<br />
java org.springframework.batch.core.launch.support.CommandLineJobRunner simpleJob.xml simpleJob</p>
<p>Resourcess</p>
<ul>
<li><a href="http://static.springsource.org/spring-batch/" rel="nofollow">http://static.springsource.org/spring-batch/</a></li>
</ul>]]></content:encoded>
			<wfw:commentRss>http://www.bestfreetips.co.uk/tutorials-guides/spring-batch-example/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HTML Tips &amp; Tricks</title>
		<link>http://www.bestfreetips.co.uk/tips-tricks/open-a-link-in-a-new-window?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=open-a-link-in-a-new-window</link>
		<comments>http://www.bestfreetips.co.uk/tips-tricks/open-a-link-in-a-new-window#comments</comments>
		<pubDate>Tue, 26 Jul 2011 16:44:36 +0000</pubDate>
		<dc:creator>zahra</dc:creator>
				<category><![CDATA[HTML]]></category>
		<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://www.bestfreetips.co.uk/?p=65</guid>
		<description><![CDATA[How to Open a Link in a New Window You can open a link in a new window using HTML. This is a little better than JavaScript<a href="http://www.bestfreetips.co.uk/tips-tricks/open-a-link-in-a-new-window"> Read More...</a>]]></description>
			<content:encoded><![CDATA[<p><strong>How to Open a Link in a New Window</strong></p>
<p>You can open a link in a new window using HTML.</p>
<p>This is a little better than JavaScript as it will work whether the  browser has JavaScript enabled  or not.</p>
<p>You implement this by adding the  text <strong>target=”_blank”</strong> to your anchor tag that you want to open in the new window.</p>
<p>For example:</p>
<p><code> &lt;a href="http://www.bestfreetips.co.uk/" target="_blank"&gt;Click here to visit  Best Free Tips site in a new Browser Window&lt;/a&gt; </code></p>
<p>&nbsp;</p>]]></content:encoded>
			<wfw:commentRss>http://www.bestfreetips.co.uk/tips-tricks/open-a-link-in-a-new-window/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>LESS</title>
		<link>http://www.bestfreetips.co.uk/tutorials-guides/css/less?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=less</link>
		<comments>http://www.bestfreetips.co.uk/tutorials-guides/css/less#comments</comments>
		<pubDate>Mon, 25 Jul 2011 20:17:25 +0000</pubDate>
		<dc:creator>zully</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[LESS]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.bestfreetips.co.uk/?p=54</guid>
		<description><![CDATA[LESS &#8211; The dynamic stylesheet language that extends CSS with dynamic behavior. It allows flexibility when creating the stylesheets. LESS runs on both the client-side (IE6+, Firefox<a href="http://www.bestfreetips.co.uk/tutorials-guides/css/less"> Read More...</a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://lesscss.org/">LESS</a> &#8211; The dynamic stylesheet language that extends CSS with dynamic behavior. It allows flexibility when creating the stylesheets.</p>
<p>LESS runs on both the client-side (IE6+, Firefox etc..) and server-side. LESS was developed by Alexis Sellier known as <a href="http://cloudhead.io/">cloudhead</a>.</p>
<p>In this quick basic guide I will be discussing only how to use  LESS on client-side. With example of of variables, operators, mix-ins  and nested selectors.</p>
<p>First you need to download the latest version of less.js from <a href="https://github.com/cloudhead/less.js/tree/master/dist">github.com</a>. Version 1.1.3 is latest at the time of writing.</p>
<p>You need to create stylesheet in a file with .less extension (i.e style.less) and save the following content.</p>
<p>&nbsp;</p>
<pre class="css">
// LESS stylesheet
// VARIABLES
@<span class="cssProperty">font-color</span><span class="cssRest">:</span><span class="cssValue"> #FF0000</span><span class="cssRest">;</span>
@<span class="cssProperty">header-font-size</span><span class="cssRest">:</span><span class="cssValue"> 26px</span><span class="cssRest">;</span>
@<span class="cssProperty">base-font-size</span><span class="cssRest">:</span><span class="cssValue"> 12px</span><span class="cssRest">;</span>
<span class="cssSelector">#content {</span>
h1 {
<span class="cssProperty">font-size</span><span class="cssRest">:</span><span class="cssValue"> @header-font-size</span><span class="cssRest">;</span>
<span class="cssProperty">font-weight</span><span class="cssRest">:</span><span class="cssValue"> bold</span><span class="cssRest">;</span>
<span class="cssSelector">}</span>
<span class="cssSelector">p {</span>
<span class="cssProperty">font-size</span><span class="cssRest">:</span><span class="cssValue"> @base-font-size</span><span class="cssRest">;</span>
<span class="cssProperty">color</span><span class="cssRest">:</span><span class="cssValue"> @font-color</span><span class="cssRest">;</span>
<span class="cssSelector">}</span>
// NESTED
<span class="cssSelector">div {</span>
a {
<span class="cssProperty">text-decoration</span><span class="cssRest">:</span><span class="cssValue"> none</span><span class="cssRest">;</span>
&amp;:hover {
<span class="cssProperty">font-weight</span><span class="cssRest">:</span><span class="cssValue"> bold</span><span class="cssRest">;</span>
<span class="cssProperty">color</span><span class="cssRest">:</span><span class="cssValue"> @font-color</span><span class="cssRest">;</span>
<span class="cssSelector">}</span>
<span class="cssMedia">}</span>
<span class="cssMedia">}</span>
// OPERATORS
<span class="cssSelector">#footer {</span>
<span class="cssProperty">color</span><span class="cssRest">:</span><span class="cssValue"> @font-color + #0033FF</span><span class="cssRest">;</span>
<span class="cssSelector">}</span>
// FUNCTIONS
.font-sizer (@size: 12px) {
<span class="cssProperty">font-size</span><span class="cssRest">:</span><span class="cssValue"> @size</span><span class="cssRest">;</span>
<span class="cssMedia">}</span>
<span class="cssSelector">#functionEx {</span>
.font-sizer;
<span class="cssSelector">}</span>
<span class="cssSelector">#functionEx2 {</span>
.font-sizer(30px);
<span class="cssSelector">}</span>
<span class="cssMedia">}</span>
</pre>
<p>&nbsp;</p>
<p><strong>Html File</strong></p>
<p>You need to copy the following content and save it in a html file.</p>
<pre class="html">
Styled page with LESS
<span class="htmlScriptTag">&lt;script src=<span class="htmlAttributeValue">&quot;less-1.1.3.min.js&quot;</span> type=<span class="htmlAttributeValue">&quot;text/javascript&quot;</span>&gt;</span><span class="htmlScriptTag">&lt;/script&gt;</span>
<span class="htmlOtherTag">&lt;div id=<span class="htmlAttributeValue">&quot;content&quot;</span>&gt;</span>
<span class="htmlOtherTag">&lt;h1&gt;</span>Page Header<span class="htmlOtherTag">&lt;/h1&gt;</span>
Welcome to my LESS styled page!
<span class="htmlOtherTag">&lt;div&gt;</span>More content and <span class="htmlAnchorTag">&lt;a href=<span class="htmlAttributeValue">&quot;.&quot;</span>&gt;</span>links<span class="htmlAnchorTag">&lt;/a&gt;</span><span class="htmlOtherTag">&lt;/div&gt;</span>
<span class="htmlOtherTag">&lt;div id=<span class="htmlAttributeValue">&quot;footer&quot;</span>&gt;</span>Footer content goes here<span class="htmlOtherTag">&lt;/div&gt;</span>
<span class="htmlOtherTag">&lt;div id=<span class="htmlAttributeValue">&quot;functionEx&quot;</span>&gt;</span>Usage of function with default font size<span class="htmlOtherTag">&lt;/div&gt;</span>
<span class="htmlOtherTag">&lt;div id=<span class="htmlAttributeValue">&quot;functionEx2&quot;</span>&gt;</span>Usage of function with parameter<span class="htmlOtherTag">&lt;/div&gt;</span>
<span class="htmlOtherTag">&lt;/div&gt;</span>
</pre>
<p>Click here to see <a href="http://www.bestfreetips.co.uk/samples/less" target="_blank">See LESS in Action</a></p>
<p><strong>Resourcess</strong></p>
<ul>
<li><a href="http://lesscss.org" rel="nofollow">http://lesscss.org</a></li>
<li><a href="http://fadeyev.net/2010/06/19/lessjs-will-obsolete-css/" rel="nofollow">http://fadeyev.net/2010/06/19/lessjs-will-obsolete-css/</a></li>
<li><a href="http://www.greenwoodsoftware.com/less/index.html" rel="nofollow">http://www.greenwoodsoftware.com/less/index.html</a></li>
</ul>]]></content:encoded>
			<wfw:commentRss>http://www.bestfreetips.co.uk/tutorials-guides/css/less/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

