tag:blogger.com,1999:blog-71535429856074163622024-02-19T09:13:20.559+05:30Waruna's BlogWarunahttp://www.blogger.com/profile/08581648110541505066noreply@blogger.comBlogger37125tag:blogger.com,1999:blog-7153542985607416362.post-7876963881715466572013-10-23T04:57:00.001+05:302013-10-23T05:01:35.616+05:30How to read a character using scanf in a loop<div dir="ltr" style="text-align: left;" trbidi="on">
It is tricky to read a character in a loop using scanf function.<br />
<br />
if you use scanf like below<br />
<pre class="javascript" style="background-color: #333333; border: 1px solid rgb(212, 212, 212); font-family: courier new; padding: 15px;"><span style="color: #339933;">#include <stdio.h></span>
<span style="color: #993333;">int</span> main<span style="color: #009900;">(</span><span style="color: #993333;">void</span><span style="color: #009900;">)</span> <span style="color: #009900;">{</span>
<span style="color: #993333;">char</span> ch<span style="color: #339933;">;</span>
<span style="color: #b1b100;">do</span>
<span style="color: #009900;">{</span>
<span style="color: #000066;">printf</span><span style="color: #009900;">(</span><span style="color: red;">"enter a char: "</span><span style="color: #009900;">)</span><span style="color: #339933;">;</span>
<span style="color: #000066;">scanf</span><span style="color: #009900;">(</span><span style="color: red;">"%c"</span><span style="color: #339933;">,</span> <span style="color: #339933;">&</span>ch<span style="color: #009900;">)</span><span style="color: #339933;">;</span>
<span style="color: #000066;">printf</span><span style="color: #009900;">(</span><span style="color: red;">"<span style="color: #000099; font-weight: bold;">\n</span>entered: %c<span style="color: #000099; font-weight: bold;">\n</span>"</span><span style="color: #339933;">,</span> ch<span style="color: #009900;">)</span><span style="color: #339933;">;</span>
<span style="color: #009900;">}</span> <span style="color: #b1b100;">while</span><span style="color: #009900;">(</span>ch <span style="color: #339933;">!=</span> <span style="color: red;">'q'</span><span style="color: #009900;">)</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">return</span> <span style="color: #0000dd;">0</span><span style="color: #339933;">;</span>
<span style="color: #009900;">}</span>
</pre>
<br />
You will see an output like below<br />
<pre class="javascript" style="background-color: #333333; border: 1px solid rgb(212, 212, 212); font-family: courier new; padding: 15px;"><span style="color: #009900;">enter a char: s
entered: s
enter a char:
entered:
enter a char: </span></pre>
<br />
The second input get automatically printed. This is because the when you reading characters using scanf, it reads all the types of characters one by one, including the special characters like "enter". Therefore, in this case it reads "s" character in the first scanf and "enter" in the next scanf. But if you read a integer (%d) using scanf then this does not happen, thats because %d discard all the special characters and only reads the integer part.<br />
<br />
You can instruct the scanf to ignore the special characters by prefixing %c by a space character. See the following example.<br />
<pre class="javascript" style="background-color: #333333; border: 1px solid rgb(212, 212, 212); font-family: courier new; padding: 15px;"><span style="color: #339933;">#include <stdio.h></span>
<span style="color: #993333;">int</span> main<span style="color: #009900;">(</span><span style="color: #993333;">void</span><span style="color: #009900;">)</span> <span style="color: #009900;">{</span>
<span style="color: #993333;">char</span> ch<span style="color: #339933;">;</span>
<span style="color: #b1b100;">do</span>
<span style="color: #009900;">{</span>
<span style="color: #000066;">printf</span><span style="color: #009900;">(</span><span style="color: red;">"enter a char: "</span><span style="color: #009900;">)</span><span style="color: #339933;">;</span>
<span style="color: #000066;">scanf</span><span style="color: #009900;">(</span><span style="color: red;">" %c"</span><span style="color: #339933;">,</span> <span style="color: #339933;">&</span>ch<span style="color: #009900;">)</span><span style="color: #339933;">;</span>
<span style="color: #000066;">printf</span><span style="color: #009900;">(</span><span style="color: red;">"<span style="color: #000099; font-weight: bold;">\n</span>entered: %c<span style="color: #000099; font-weight: bold;">\n</span>"</span><span style="color: #339933;">,</span> ch<span style="color: #009900;">)</span><span style="color: #339933;">;</span>
<span style="color: #009900;">}</span> <span style="color: #b1b100;">while</span><span style="color: #009900;">(</span>ch <span style="color: #339933;">!=</span> <span style="color: red;">'q'</span><span style="color: #009900;">)</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">return</span> <span style="color: #0000dd;">0</span><span style="color: #339933;">;</span>
<span style="color: #009900;">}</span>
</pre>
<br />
You will see the following output<br />
<pre class="javascript" style="background-color: #333333; border: 1px solid rgb(212, 212, 212); font-family: courier new; padding: 15px;"><span style="color: #009900;">enter a char: s
entered: s
enter a char: </span></pre>
<br /></div>
Warunahttp://www.blogger.com/profile/08581648110541505066noreply@blogger.com5tag:blogger.com,1999:blog-7153542985607416362.post-91690126656145819102013-10-16T04:08:00.000+05:302013-10-16T04:08:24.947+05:30How to check whether the GPU support power profiling in NVIDIA Visual Profiler<div dir="ltr" style="text-align: left;" trbidi="on">
CUDA 5.5 announced that NVIDIA's Visual Profiler supports power, thermal and clock profiling. I tried the profiler on a GTX 480, but it only profile the thermal values in different timestamps, but not power nor clock.<br />
<br />
If you are wondering whether your GPU supports power profiling, you can verify it by running the following command.<br />
<br />
<pre class="javascript" style="background-color: #333333; border: 1px solid rgb(212, 212, 212); font-family: courier new; padding: 15px;"><span style="color: #009900;">nvidia-smi -q -d power</span></pre>
<br />
This command should return something similar to below with actual power values.<br />
<br />
<pre class="javascript" style="background-color: #333333; border: 1px solid rgb(212, 212, 212); font-family: courier new; padding: 15px;"><span style="color: #009900;">Attached GPUs : 1
GPU 0000:00:00.0
Power Readings
Power Management : XXX
Power Draw : XXX
Power Limit : XXX
Default Power Limit : XXX
Enforced Power Limit : XXX
Min Power Limit : XXX
Max Power Limit : XXX</span></pre>
<br />
If the values are "N/A", then your GPU does not support power profiling.</div>
Warunahttp://www.blogger.com/profile/08581648110541505066noreply@blogger.com0tag:blogger.com,1999:blog-7153542985607416362.post-84786828226071761112012-05-14T21:55:00.004+05:302012-05-14T21:57:40.914+05:30Webinar - Using WSO2 Carbon to Help Convert One-Sixth of New Zealand’s Population into Mobile Telecom Customers<div dir="ltr" style="text-align: left;" trbidi="on">
<div style="text-align: justify;">
The <a href="http://wso2.org/library/webinars/2012/05/wso2-2degrees-case-study-using-wso2-carbon-help-convert-onesixth-new-zealand-population-mobile/" target="_blank">webinar</a> for my previous post - <a href="http://warunapw.blogspot.com/2012/03/wso2-middleware-to-enable-mobile.html" target="_blank">WSO2 Middleware to Enable Mobile Services for Telecommunications</a> is scheduled on 17th May 2012. </div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<a href="http://wso2.org/library/webinars/2012/05/wso2-2degrees-case-study-using-wso2-carbon-help-convert-onesixth-new-zealand-population-mobile/" target="_blank">Join</a> Asanka Abeysinghe, WSO2 Director Solutions Architecture, and Waruna
Ranasinghe, WSO2 Senior Software Engineer, along with Guest Speaker
Neeraj Satja, 2degrees Mobile Software Development Manager, for a
discussion on how the WSO2 Carbon enterprise middleware platform has
enabled 2degrees to deliver the innovation, high volume and high
performance required to be a mobile market leader.</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<a href="http://wso2.org/library/webinars/2012/05/wso2-2degrees-case-study-using-wso2-carbon-help-convert-onesixth-new-zealand-population-mobile/" target="_blank">Click here to register</a>. </div>
<div style="text-align: justify;">
<br /></div>
</div>Warunahttp://www.blogger.com/profile/08581648110541505066noreply@blogger.com0tag:blogger.com,1999:blog-7153542985607416362.post-67951163003692651642012-03-11T11:16:00.000+05:302012-03-11T12:04:16.082+05:30WSO2 Middleware to Enable Mobile Services for Telecommunications<div dir="ltr" style="text-align: left;" trbidi="on">
<div dir="ltr" style="background-color: #333333; border: 1px solid rgb(212, 212, 212); color: black; font-family: courier new; font-weight: bold; padding: 15px; text-align: justify; white-space: pre-wrap;"><span style="font-family: Verdana,sans-serif;">"With <a href="http://wso2.com/products/carbon">WSO2 Carbon</a>, we’ve found a strong middleware platform that is enabling us to deliver the innovation, high volume and high performance required to be a mobile market leader."</span> says 2degrees Software Development Manager Neeraj Satija.</div>
<div style="text-align: justify;">
<br /></div>
<div style="font-family: "Helvetica Neue",Arial,Helvetica,sans-serif; text-align: justify;">
<a href="http://www.2degreesmobile.co.nz/">2Degrees Mobile</a>, despite being the newest mobile company in New Zealand, has been able attract 1/6 of the New Zealand population. Having entered a saturated market, 2Degrees has been providing innovative services to users to attract customers from established mobile companies. <a href="http://wso2.com/">WSO2</a> Middleware Platform (i.e <a href="http://wso2.com/products/enterprise-service-bus">WSO2 ESB</a>) has facilitated them to enable innovative mobile services rapidly. It is the WSO2 Middleware that enabled 2Degrees to increase the response to the market by providing most suited middleware to rapidly implement mobile services. </div>
<div style="font-family: "Helvetica Neue",Arial,Helvetica,sans-serif; text-align: justify;">
<br /></div>
<div style="font-family: "Helvetica Neue",Arial,Helvetica,sans-serif; text-align: justify;">
Currently, 2 Degrees uses <a href="http://wso2.com/products/enterprise-service-bus">WSO2 ESB</a>, <a href="http://wso2.com/products/data-services-server">WSO2 DSS</a> and <a href="http://wso2.com/products/business-process-server">WSO2 BPS</a> to enable Mobile Services to the customers.<br />
<br />
<a href="http://wso2.com/about/news/new-zealands-newest-mobile-provider-uses-wso2-carbon-middleware-to-help-capture-nearly-one-sixth-of-the-market">Read More... </a><br />
<a href="http://wso2.com/casestudies/wso2-mobile-service-provider-orchestrates-its-success-with-wso2-middleware/">Downlo<span id="goog_2005722056"></span><span id="goog_2005722057"></span>ad</a> the complete case-study.</div>
</div>Warunahttp://www.blogger.com/profile/08581648110541505066noreply@blogger.com1tag:blogger.com,1999:blog-7153542985607416362.post-57159938533046962372011-11-26T17:36:00.001+05:302012-02-03T22:24:32.534+05:30How to read HTTP headers through Synapse Config<div dir="ltr" style="text-align: left;" trbidi="on">
You can use the following property mediator to read HTTP headers inside <a href="http://wso2.org/library/esb">WSO2 ESB</a> through Synapse Configuration.<br />
<pre class="xml" style="background-color: #333333; border: 1px solid rgb(212, 212, 212); font-family: courier new; padding: 15px; white-space: pre-wrap;"><span style="color: black; font-weight: bold;"><property</span> <span style="color: #000066;">name</span>=<span style="color: red;">"Lang"</span> <span style="color: #000066;">expression</span>=<span style="color: red;">"get-property('transport', 'Accept')"</span><span style="color: black; font-weight: bold;">/></span></pre>
<br />
Here, the value of the HTTP header called "Accept" get assigned in to property called "Lang"</div>Warunahttp://www.blogger.com/profile/08581648110541505066noreply@blogger.com1tag:blogger.com,1999:blog-7153542985607416362.post-321458225370201412011-11-24T22:23:00.001+05:302012-02-03T22:25:59.906+05:30How to apply throttling policies through service.xml<div dir="ltr" style="text-align: left;" trbidi="on">
<div dir="ltr" style="text-align: left;" trbidi="on">
You can always apply <a href="http://wso2.org/library/articles/wso2-throttling">throttling</a> to services deployed in <a href="http://wso2.org/library/application-server">WSO2 AS</a> using the Management console. But what if you want to apply the <a href="http://wso2.org/library/articles/wso2-throttling">throttling policy</a> while the service get deployed. Then you can specify the throttling policy in the <a href="http://wso2.org/library/2060">service.xml</a> file.</div>
<pre class="xml" style="background-color: #333333; border: 1px solid rgb(212, 212, 212); font-family: courier new; padding: 15px; white-space: pre-wrap;"><span style="color: #009900;"><span style="color: black; font-weight: bold;"><?xml</span> <span style="color: #000066;">version</span>=<span style="color: red;">"1.0"</span> <span style="color: #000066;">encoding</span>=<span style="color: red;">"UTF-8"</span><span style="color: black; font-weight: bold;">?></span></span>
<span style="color: grey; font-style: italic;"><!-- This file was auto-generated from WSDL --></span>
<span style="color: grey; font-style: italic;"><!-- by the Apache Axis2 version: 1.6.1-wso2v1 Built on : Jun 08, 2011 (07:37:38 IST) --></span>
<span style="color: #009900;"><span style="color: black; font-weight: bold;"><serviceGroup<span style="color: black; font-weight: bold;">></span></span></span>
<span style="color: #009900;"><span style="color: black; font-weight: bold;"><service</span> <span style="color: #000066;">name</span>=<span style="color: red;">"echo"</span><span style="color: black; font-weight: bold;">></span></span>
<span style="color: #009900;"><span style="color: black; font-weight: bold;"><messageReceivers<span style="color: black; font-weight: bold;">></span></span></span>
<span style="color: #009900;"><span style="color: black; font-weight: bold;"><messageReceiver</span> <span style="color: #000066;">mep</span>=<span style="color: red;">"http://www.w3.org/ns/wsdl/in-out"</span> <span style="color: #000066;">class</span>=<span style="color: red;">"org.wso2.carbon.sample.service.echo.EchoMessageReceiverInOut"</span><span style="color: black; font-weight: bold;">/></span></span>
<span style="color: #009900;"><span style="color: black; font-weight: bold;"></messageReceivers<span style="color: black; font-weight: bold;">></span></span></span>
<span style="color: #009900;"><span style="color: black; font-weight: bold;"><parameter</span> <span style="color: #000066;">name</span>=<span style="color: red;">"ServiceClass"</span><span style="color: black; font-weight: bold;">></span></span>org.wso2.carbon.sample.service.echo.EchoSkeleton<span style="color: #009900;"><span style="color: black; font-weight: bold;"></parameter<span style="color: black; font-weight: bold;">></span></span></span>
<span style="color: #009900;"><span style="color: black; font-weight: bold;"><parameter</span> <span style="color: #000066;">name</span>=<span style="color: red;">"useOriginalwsdl"</span><span style="color: black; font-weight: bold;">></span></span>true<span style="color: #009900;"><span style="color: black; font-weight: bold;"></parameter<span style="color: black; font-weight: bold;">></span></span></span>
<span style="color: #009900;"><span style="color: black; font-weight: bold;"><parameter</span> <span style="color: #000066;">name</span>=<span style="color: red;">"modifyUserWSDLPortAddress"</span><span style="color: black; font-weight: bold;">></span></span>true<span style="color: #009900;"><span style="color: black; font-weight: bold;"></parameter<span style="color: black; font-weight: bold;">></span></span></span>
<span style="color: #009900;"><span style="color: black; font-weight: bold;"><operation</span> <span style="color: #000066;">name</span>=<span style="color: red;">"echoString"</span> <span style="color: #000066;">mep</span>=<span style="color: red;">"http://www.w3.org/ns/wsdl/in-out"</span> <span style="color: #000066;">namespace</span>=<span style="color: red;">"http://echo.services.core.carbon.wso2.org"</span><span style="color: black; font-weight: bold;">></span></span>
<span style="color: #009900;"><span style="color: black; font-weight: bold;"><actionMapping<span style="color: black; font-weight: bold;">></span></span></span>urn:echoString<span style="color: #009900;"><span style="color: black; font-weight: bold;"></actionMapping<span style="color: black; font-weight: bold;">></span></span></span>
<span style="color: #009900;"><span style="color: black; font-weight: bold;"><outputActionMapping<span style="color: black; font-weight: bold;">></span></span></span>urn:echoStringResponse<span style="color: #009900;"><span style="color: black; font-weight: bold;"></outputActionMapping<span style="color: black; font-weight: bold;">></span></span></span>
<span style="color: #009900;"><span style="color: black; font-weight: bold;"><faultActionMapping</span> <span style="color: #000066;">faultName</span>=<span style="color: red;">"echoFault"</span><span style="color: black; font-weight: bold;">></span></span>urn:echoFaultMessage<span style="color: #009900;"><span style="color: black; font-weight: bold;"></faultActionMapping<span style="color: black; font-weight: bold;">></span></span></span>
<span style="color: #009900;"><span style="color: black; font-weight: bold;"><faultActionMapping</span> <span style="color: #000066;">faultName</span>=<span style="color: red;">"EchoFault"</span><span style="color: black; font-weight: bold;">></span></span>urn:echoFaultMessage<span style="color: #009900;"><span style="color: black; font-weight: bold;"></faultActionMapping<span style="color: black; font-weight: bold;">></span></span></span>
<span style="color: #009900;"><span style="color: black; font-weight: bold;"><faultActionMapping</span> <span style="color: #000066;">faultName</span>=<span style="color: red;">"EchoFault_Exception"</span><span style="color: black; font-weight: bold;">></span></span>urn:echoFaultMessage<span style="color: #009900;"><span style="color: black; font-weight: bold;"></faultActionMapping<span style="color: black; font-weight: bold;">></span></span></span>
<span style="color: #009900;"><span style="color: black; font-weight: bold;"></operation<span style="color: black; font-weight: bold;">></span></span></span>
<span style="color: #009900;"><span style="color: black; font-weight: bold;"><operation</span> <span style="color: #000066;">name</span>=<span style="color: red;">"throwAxisFault"</span> <span style="color: #000066;">mep</span>=<span style="color: red;">"http://www.w3.org/ns/wsdl/in-out"</span> <span style="color: #000066;">namespace</span>=<span style="color: red;">"http://echo.services.core.carbon.wso2.org"</span><span style="color: black; font-weight: bold;">></span></span>
<span style="color: #009900;"><span style="color: black; font-weight: bold;"><actionMapping<span style="color: black; font-weight: bold;">></span></span></span>urn:throwAxisFault<span style="color: #009900;"><span style="color: black; font-weight: bold;"></actionMapping<span style="color: black; font-weight: bold;">></span></span></span>
<span style="color: #009900;"><span style="color: black; font-weight: bold;"><outputActionMapping<span style="color: black; font-weight: bold;">></span></span></span>urn:throwAxisFaultResponse<span style="color: #009900;"><span style="color: black; font-weight: bold;"></outputActionMapping<span style="color: black; font-weight: bold;">></span></span></span>
<span style="color: #009900;"><span style="color: black; font-weight: bold;"></operation<span style="color: black; font-weight: bold;">></span></span></span>
<span style="color: #009900;"><span style="color: black; font-weight: bold;"><operation</span> <span style="color: #000066;">name</span>=<span style="color: red;">"echoStringArrays"</span> <span style="color: #000066;">mep</span>=<span style="color: red;">"http://www.w3.org/ns/wsdl/in-out"</span> <span style="color: #000066;">namespace</span>=<span style="color: red;">"http://echo.services.core.carbon.wso2.org"</span><span style="color: black; font-weight: bold;">></span></span>
<span style="color: #009900;"><span style="color: black; font-weight: bold;"><actionMapping<span style="color: black; font-weight: bold;">></span></span></span>urn:echoStringArrays<span style="color: #009900;"><span style="color: black; font-weight: bold;"></actionMapping<span style="color: black; font-weight: bold;">></span></span></span>
<span style="color: #009900;"><span style="color: black; font-weight: bold;"><outputActionMapping<span style="color: black; font-weight: bold;">></span></span></span>urn:echoStringArraysResponse<span style="color: #009900;"><span style="color: black; font-weight: bold;"></outputActionMapping<span style="color: black; font-weight: bold;">></span></span></span>
<span style="color: #009900;"><span style="color: black; font-weight: bold;"></operation<span style="color: black; font-weight: bold;">></span></span></span>
<span style="color: #009900;"><span style="color: black; font-weight: bold;"><operation</span> <span style="color: #000066;">name</span>=<span style="color: red;">"echoOMElement"</span> <span style="color: #000066;">mep</span>=<span style="color: red;">"http://www.w3.org/ns/wsdl/in-out"</span> <span style="color: #000066;">namespace</span>=<span style="color: red;">"http://echo.services.core.carbon.wso2.org"</span><span style="color: black; font-weight: bold;">></span></span>
<span style="color: #009900;"><span style="color: black; font-weight: bold;"><actionMapping<span style="color: black; font-weight: bold;">></span></span></span>urn:echoOMElement<span style="color: #009900;"><span style="color: black; font-weight: bold;"></actionMapping<span style="color: black; font-weight: bold;">></span></span></span>
<span style="color: #009900;"><span style="color: black; font-weight: bold;"><outputActionMapping<span style="color: black; font-weight: bold;">></span></span></span>urn:echoOMElementResponse<span style="color: #009900;"><span style="color: black; font-weight: bold;"></outputActionMapping<span style="color: black; font-weight: bold;">></span></span></span>
<span style="color: #009900;"><span style="color: black; font-weight: bold;"></operation<span style="color: black; font-weight: bold;">></span></span></span>
<span style="color: #009900;"><span style="color: black; font-weight: bold;"><operation</span> <span style="color: #000066;">name</span>=<span style="color: red;">"echoInt"</span> <span style="color: #000066;">mep</span>=<span style="color: red;">"http://www.w3.org/ns/wsdl/in-out"</span> <span style="color: #000066;">namespace</span>=<span style="color: red;">"http://echo.services.core.carbon.wso2.org"</span><span style="color: black; font-weight: bold;">></span></span>
<span style="color: #009900;"><span style="color: black; font-weight: bold;"><actionMapping<span style="color: black; font-weight: bold;">></span></span></span>urn:echoInt<span style="color: #009900;"><span style="color: black; font-weight: bold;"></actionMapping<span style="color: black; font-weight: bold;">></span></span></span>
<span style="color: #009900;"><span style="color: black; font-weight: bold;"><outputActionMapping<span style="color: black; font-weight: bold;">></span></span></span>urn:echoIntResponse<span style="color: #009900;"><span style="color: black; font-weight: bold;"></outputActionMapping<span style="color: black; font-weight: bold;">></span></span></span>
<span style="color: #009900;"><span style="color: black; font-weight: bold;"></operation<span style="color: black; font-weight: bold;">></span></span></span>
<span style="color: #009900;"><span style="color: black; font-weight: bold;"><module</span> <span style="color: #000066;">ref</span>=<span style="color: red;">"wso2throttle"</span><span style="color: black; font-weight: bold;">/></span></span>
<span style="color: #009900;"><span style="color: black; font-weight: bold;"><wsp:Policy</span> <span style="color: #000066;">wsu:Id</span>=<span style="color: red;">"WSO2ServiceThrottlingPolicy"</span> <span style="color: #000066;">xmlns:wsp</span>=<span style="color: red;">"http://schemas.xmlsoap.org/ws/2004/09/policy"</span> <span style="color: #000066;">xmlns:wsu</span>=<span style="color: red;">"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"</span><span style="color: black; font-weight: bold;">></span></span>
<span style="color: #009900;"><span style="color: black; font-weight: bold;"><wsp:ExactlyOne<span style="color: black; font-weight: bold;">></span></span></span>
<span style="color: #009900;"><span style="color: black; font-weight: bold;"><wsp:All<span style="color: black; font-weight: bold;">></span></span></span>
<span style="color: #009900;"><span style="color: black; font-weight: bold;"><throttle:ServiceThrottleAssertion</span> <span style="color: #000066;">xmlns:throttle</span>=<span style="color: red;">"http://www.wso2.org/products/wso2commons/throttle"</span><span style="color: black; font-weight: bold;">></span></span>
<span style="color: #009900;"><span style="color: black; font-weight: bold;"><wsp:Policy<span style="color: black; font-weight: bold;">></span></span></span>
<span style="color: #009900;"><span style="color: black; font-weight: bold;"><throttle:ID</span> <span style="color: #000066;">throttle:type</span>=<span style="color: red;">"DOMAIN"</span><span style="color: black; font-weight: bold;">></span></span>172.16.49.1<span style="color: #009900;"><span style="color: black; font-weight: bold;"></throttle:ID<span style="color: black; font-weight: bold;">></span></span></span>
<span style="color: #009900;"><span style="color: black; font-weight: bold;"><wsp:Policy<span style="color: black; font-weight: bold;">></span></span></span>
<span style="color: #009900;"><span style="color: black; font-weight: bold;"><throttle:Control<span style="color: black; font-weight: bold;">></span></span></span>
<span style="color: #009900;"><span style="color: black; font-weight: bold;"><wsp:Policy<span style="color: black; font-weight: bold;">></span></span></span>
<span style="color: #009900;"><span style="color: black; font-weight: bold;"><throttle:MaximumCount<span style="color: black; font-weight: bold;">></span></span></span>2<span style="color: #009900;"><span style="color: black; font-weight: bold;"></throttle:MaximumCount<span style="color: black; font-weight: bold;">></span></span></span>
<span style="color: #009900;"><span style="color: black; font-weight: bold;"><throttle:UnitTime<span style="color: black; font-weight: bold;">></span></span></span>20000<span style="color: #009900;"><span style="color: black; font-weight: bold;"></throttle:UnitTime<span style="color: black; font-weight: bold;">></span></span></span>
<span style="color: #009900;"><span style="color: black; font-weight: bold;"><throttle:ProhibitTimePeriod</span> <span style="color: #000066;">wsp:Optional</span>=<span style="color: red;">"true"</span><span style="color: black; font-weight: bold;">></span></span>30000<span style="color: #009900;"><span style="color: black; font-weight: bold;"></throttle:ProhibitTimePeriod<span style="color: black; font-weight: bold;">></span></span></span>
<span style="color: #009900;"><span style="color: black; font-weight: bold;"></wsp:Policy<span style="color: black; font-weight: bold;">></span></span></span>
<span style="color: #009900;"><span style="color: black; font-weight: bold;"></throttle:Control<span style="color: black; font-weight: bold;">></span></span></span>
<span style="color: #009900;"><span style="color: black; font-weight: bold;"></wsp:Policy<span style="color: black; font-weight: bold;">></span></span></span>
<span style="color: #009900;"><span style="color: black; font-weight: bold;"></wsp:Policy<span style="color: black; font-weight: bold;">></span></span></span>
<span style="color: #009900;"><span style="color: black; font-weight: bold;"><wsp:Policy<span style="color: black; font-weight: bold;">></span></span></span>
<span style="color: #009900;"><span style="color: black; font-weight: bold;"><throttle:ID</span> <span style="color: #000066;">throttle:type</span>=<span style="color: red;">"DOMAIN"</span><span style="color: black; font-weight: bold;">></span></span>other<span style="color: #009900;"><span style="color: black; font-weight: bold;"></throttle:ID<span style="color: black; font-weight: bold;">></span></span></span>
<span style="color: #009900;"><span style="color: black; font-weight: bold;"><wsp:Policy<span style="color: black; font-weight: bold;">></span></span></span>
<span style="color: #009900;"><span style="color: black; font-weight: bold;"><throttle:Deny</span><span style="color: black; font-weight: bold;">/></span></span>
<span style="color: #009900;"><span style="color: black; font-weight: bold;"></wsp:Policy<span style="color: black; font-weight: bold;">></span></span></span>
<span style="color: #009900;"><span style="color: black; font-weight: bold;"></wsp:Policy<span style="color: black; font-weight: bold;">></span></span></span>
<span style="color: #009900;"><span style="color: black; font-weight: bold;"></throttle:ServiceThrottleAssertion<span style="color: black; font-weight: bold;">></span></span></span>
<span style="color: #009900;"><span style="color: black; font-weight: bold;"></wsp:All<span style="color: black; font-weight: bold;">></span></span></span>
<span style="color: #009900;"><span style="color: black; font-weight: bold;"></wsp:ExactlyOne<span style="color: black; font-weight: bold;">></span></span></span>
<span style="color: #009900;"><span style="color: black; font-weight: bold;"></wsp:Policy<span style="color: black; font-weight: bold;">></span></span></span>
<span style="color: #009900;"><span style="color: black; font-weight: bold;"></service<span style="color: black; font-weight: bold;">></span></span></span>
<span style="color: #009900;"><span style="color: black; font-weight: bold;"></serviceGroup<span style="color: black; font-weight: bold;">></span></span></span></pre>
</div>Warunahttp://www.blogger.com/profile/08581648110541505066noreply@blogger.com2tag:blogger.com,1999:blog-7153542985607416362.post-3531701682123117682011-08-09T14:31:00.000+05:302011-08-09T14:31:12.122+05:30<div dir="ltr" style="text-align: left;" trbidi="on">
WSO2Con 2011<br />
<br />
<span class="Apple-style-span" style="color: #434343; font-family: Arial, Helvetica, Verdana, monospace, san-serif; font-size: 12px; line-height: 19px;">Architects, Developers, IT Managers and technology enthusiasts, WSO2Con 2011, focuses on you! Newbie or seasoned professional, WSO2Con offers a great week of learning, sharing and the opportunity to connect with experts who have shaped the future enterprise. Register <a href="http://wso2.com/events/wso2con-2011-colombo/">here</a></span></div>
Warunahttp://www.blogger.com/profile/08581648110541505066noreply@blogger.com0tag:blogger.com,1999:blog-7153542985607416362.post-57020215971643333302011-04-03T23:51:00.002+05:302011-04-03T23:56:23.530+05:30How to hide vertical grid lines in jQuery flot<div dir="ltr" style="text-align: left;" trbidi="on"><div style="text-align: justify;">There is a straight forward method to hide vertical or horizontal grid lines in your <a href="http://jquery.com/">jQuery</a> <a href="http://flot.googlecode.com/">flot</a> bar chart. First of all you need to checkout the <a href="http://flot.googlecode.com/svn/trunk/">flot trunk</a> and include<a href="http://flot.googlecode.com/svn/trunk/jquery.flot.js"> jquery.flot.js</a> and <a href="http://flot.googlecode.com/svn/trunk/jquery.flot.stack.js">jquery.flot.stack.js</a> scripts in your script. You need the trunk, since released flot - 0.6 does not support this feature.</div><div style="text-align: justify;"><br />
</div>Then include the following as the options.<br />
<pre class="javascript" style="background-color: #333333; border: 1px solid rgb(212, 212, 212); font-family: courier new; padding: 15px;">xaxis<span style="color: #339933;">:</span> <span style="color: #009900;">{</span>
tickLength<span style="color: #339933;">:</span> <span style="color: #cc0000;">0</span>
<span style="color: #009900;">}</span></pre><br />
i.e.<br />
<pre class="javascript" style="background-color: #333333; border: 1px solid rgb(212, 212, 212); font-family: courier new; padding: 15px;"><span style="color: #339933;"><</span>script id<span style="color: #339933;">=</span><span style="color: #3366cc;">"source"</span><span style="color: #339933;">></span>
$<span style="color: #009900;">(</span><span style="color: #000066; font-weight: bold;">function</span> <span style="color: #009900;">(</span><span style="color: #009900;">)</span> <span style="color: #009900;">{</span>
<span style="color: #000066; font-weight: bold;">var</span> d1 <span style="color: #339933;">=</span> <span style="color: #009900;">[</span><span style="color: #009900;">]</span><span style="color: #339933;">;</span>
<span style="color: #000066; font-weight: bold;">for</span> <span style="color: #009900;">(</span><span style="color: #000066; font-weight: bold;">var</span> i <span style="color: #339933;">=</span> <span style="color: #cc0000;">0</span><span style="color: #339933;">;</span> i <span style="color: #339933;"><=</span> <span style="color: #cc0000;">10</span><span style="color: #339933;">;</span> i <span style="color: #339933;">+=</span> <span style="color: #cc0000;">1</span><span style="color: #009900;">)</span>
d1.<span style="color: #660066;">push</span><span style="color: #009900;">(</span><span style="color: #009900;">[</span>i<span style="color: #339933;">,</span> parseInt<span style="color: #009900;">(</span>Math.<span style="color: #660066;">random</span><span style="color: #009900;">(</span><span style="color: #009900;">)</span> <span style="color: #339933;">*</span> <span style="color: #cc0000;">30</span><span style="color: #009900;">)</span><span style="color: #009900;">]</span><span style="color: #009900;">)</span><span style="color: #339933;">;</span>
<span style="color: #000066; font-weight: bold;">var</span> d2 <span style="color: #339933;">=</span> <span style="color: #009900;">[</span><span style="color: #009900;">]</span><span style="color: #339933;">;</span>
<span style="color: #000066; font-weight: bold;">for</span> <span style="color: #009900;">(</span><span style="color: #000066; font-weight: bold;">var</span> i <span style="color: #339933;">=</span> <span style="color: #cc0000;">0</span><span style="color: #339933;">;</span> i <span style="color: #339933;"><=</span> <span style="color: #cc0000;">10</span><span style="color: #339933;">;</span> i <span style="color: #339933;">+=</span> <span style="color: #cc0000;">1</span><span style="color: #009900;">)</span>
d2.<span style="color: #660066;">push</span><span style="color: #009900;">(</span><span style="color: #009900;">[</span>i<span style="color: #339933;">,</span> parseInt<span style="color: #009900;">(</span>Math.<span style="color: #660066;">random</span><span style="color: #009900;">(</span><span style="color: #009900;">)</span> <span style="color: #339933;">*</span> <span style="color: #cc0000;">30</span><span style="color: #009900;">)</span><span style="color: #009900;">]</span><span style="color: #009900;">)</span><span style="color: #339933;">;</span>
<span style="color: #000066; font-weight: bold;">var</span> d3 <span style="color: #339933;">=</span> <span style="color: #009900;">[</span><span style="color: #009900;">]</span><span style="color: #339933;">;</span>
<span style="color: #000066; font-weight: bold;">for</span> <span style="color: #009900;">(</span><span style="color: #000066; font-weight: bold;">var</span> i <span style="color: #339933;">=</span> <span style="color: #cc0000;">0</span><span style="color: #339933;">;</span> i <span style="color: #339933;"><=</span> <span style="color: #cc0000;">10</span><span style="color: #339933;">;</span> i <span style="color: #339933;">+=</span> <span style="color: #cc0000;">1</span><span style="color: #009900;">)</span>
d3.<span style="color: #660066;">push</span><span style="color: #009900;">(</span><span style="color: #009900;">[</span>i<span style="color: #339933;">,</span> parseInt<span style="color: #009900;">(</span>Math.<span style="color: #660066;">random</span><span style="color: #009900;">(</span><span style="color: #009900;">)</span> <span style="color: #339933;">*</span> <span style="color: #cc0000;">30</span><span style="color: #009900;">)</span><span style="color: #009900;">]</span><span style="color: #009900;">)</span><span style="color: #339933;">;</span>
<span style="color: #000066; font-weight: bold;">var</span> stack <span style="color: #339933;">=</span> <span style="color: #cc0000;">0</span><span style="color: #339933;">,</span> bars <span style="color: #339933;">=</span> <span style="color: #000066; font-weight: bold;">true</span><span style="color: #339933;">,</span> lines <span style="color: #339933;">=</span> <span style="color: #000066; font-weight: bold;">false</span><span style="color: #339933;">,</span> steps <span style="color: #339933;">=</span> <span style="color: #000066; font-weight: bold;">false</span><span style="color: #339933;">;</span>
<span style="color: #000066; font-weight: bold;">function</span> plotWithOptions<span style="color: #009900;">(</span><span style="color: #009900;">)</span> <span style="color: #009900;">{</span>
$.<span style="color: #660066;">plot</span><span style="color: #009900;">(</span>$<span style="color: #009900;">(</span><span style="color: #3366cc;">"#placeholder"</span><span style="color: #009900;">)</span><span style="color: #339933;">,</span> <span style="color: #009900;">[</span> d1<span style="color: #339933;">,</span> d2<span style="color: #339933;">,</span> d3 <span style="color: #009900;">]</span><span style="color: #339933;">,</span> <span style="color: #009900;">{</span>
series<span style="color: #339933;">:</span> <span style="color: #009900;">{</span>
stack<span style="color: #339933;">:</span> stack<span style="color: #339933;">,</span>
lines<span style="color: #339933;">:</span> <span style="color: #009900;">{</span> show<span style="color: #339933;">:</span> lines<span style="color: #339933;">,</span> steps<span style="color: #339933;">:</span> steps <span style="color: #009900;">}</span><span style="color: #339933;">,</span>
bars<span style="color: #339933;">:</span> <span style="color: #009900;">{</span> show<span style="color: #339933;">:</span> bars<span style="color: #339933;">,</span> barWidth<span style="color: #339933;">:</span> <span style="color: #cc0000;">0.6</span><span style="color: #339933;">,</span> align<span style="color: #339933;">:</span> <span style="color: #3366cc;">"center"</span> <span style="color: #009900;">}</span>
<span style="color: #009900;">}</span><span style="color: #339933;">,</span>
xaxis<span style="color: #339933;">:</span> <span style="color: #009900;">{</span> tickLength<span style="color: #339933;">:</span> <span style="color: #cc0000;">0</span><span style="color: #009900;">}</span>
<span style="color: #009900;">}</span><span style="color: #009900;">)</span><span style="color: #339933;">;</span>
<span style="color: #009900;">}</span>
plotWithOptions<span style="color: #009900;">(</span><span style="color: #009900;">)</span><span style="color: #339933;">;</span>
<span style="color: #009900;">}</span><span style="color: #009900;">)</span><span style="color: #339933;">;</span>
<span style="color: #339933;"></</span>script<span style="color: #339933;">></span></pre><br />
<div id="placeholder" style="height: 300px;"></div><br />
<br />
<script src="http://code.jquery.com/jquery-1.5.js">
</script><br />
<script language="javascript" src="http://flot.googlecode.com/svn/trunk/jquery.flot.js" type="text/javascript">
</script><br />
<script language="javascript" src="http://flot.googlecode.com/svn/trunk/jquery.flot.stack.js" type="text/javascript">
</script><br />
<script id="source">
$(function () {
var d1 = [];
for (var i = 0; i <= 10; i += 1)
d1.push([i, parseInt(Math.random() * 30)]);
var d2 = [];
for (var i = 0; i <= 10; i += 1)
d2.push([i, parseInt(Math.random() * 30)]);
var d3 = [];
for (var i = 0; i <= 10; i += 1)
d3.push([i, parseInt(Math.random() * 30)]);
var stack = 0, bars = true, lines = false, steps = false;
function plotWithOptions() {
$.plot($("#placeholder"), [ d1, d2, d3 ], {
series: {
stack: stack,
lines: { show: lines, steps: steps },
bars: { show: bars, barWidth: 0.6, align: "center" }
},
xaxis: { tickLength: 0}
});
}
plotWithOptions();
});
</script>
</div>Warunahttp://www.blogger.com/profile/08581648110541505066noreply@blogger.com4tag:blogger.com,1999:blog-7153542985607416362.post-14379270155205199272011-03-04T23:09:00.000+05:302011-03-04T23:09:07.973+05:30How to list all svn externals recursivelyYou can use the following command to list all the svn externals in a directory structure.<br />
<br />
<pre style="background-color: #333333; border: 1px solid rgb(212, 212, 212); font-family: courier new; padding: 15px;">svn propget svn:externals -R</pre>Warunahttp://www.blogger.com/profile/08581648110541505066noreply@blogger.com2tag:blogger.com,1999:blog-7153542985607416362.post-4307924735750522052011-03-02T00:56:00.000+05:302013-06-01T18:15:36.224+05:30How to get the transitive dependency list using Maven<div dir="ltr" style="text-align: left;" trbidi="on">
You may need to find the list of transitive dependencies, so that you can exclude unnecessary dependencies. Add the following maven plugin<br />
<br />
<pre style="background-color: #333333; border: 1px solid rgb(212, 212, 212); font-family: courier new; padding: 15px;"><span style="color: #009900;"><span style="color: black; font-weight: bold;"> <build<span style="color: black; font-weight: bold;">></span></span></span>
<span style="color: #009900;"><span style="color: black; font-weight: bold;"><plugins<span style="color: black; font-weight: bold;">></span></span></span>
<span style="color: #009900;"><span style="color: black; font-weight: bold;"><plugin<span style="color: black; font-weight: bold;">></span></span></span>
<span style="color: #009900;"><span style="color: black; font-weight: bold;"><groupId<span style="color: black; font-weight: bold;">></span></span></span>org.apache.maven.plugins<span style="color: #009900;"><span style="color: black; font-weight: bold;"></groupId<span style="color: black; font-weight: bold;">></span></span></span>
<span style="color: #009900;"><span style="color: black; font-weight: bold;"><artifactId<span style="color: black; font-weight: bold;">></span></span></span>maven-dependency-plugin<span style="color: #009900;"><span style="color: black; font-weight: bold;"></artifactId<span style="color: black; font-weight: bold;">></span></span></span>
<span style="color: #009900;"><span style="color: black; font-weight: bold;"></plugin<span style="color: black; font-weight: bold;">></span></span></span>
<span style="color: #009900;"><span style="color: black; font-weight: bold;"></plugins<span style="color: black; font-weight: bold;">></span></span></span>
<span style="color: #009900;"><span style="color: black; font-weight: bold;"></build<span style="color: black; font-weight: bold;">></span></span></span></pre>
<br />
Use dependency:tree as the goal.<br />
<br />
<pre style="background-color: #333333; border: 1px solid rgb(212, 212, 212); font-family: courier new; padding: 15px;">mvn clean install dependency<span style="color: #339933;">:</span>tree</pre>
<br />
If maven fails with some error, then, use dependency:tree as the goal with -X option.<br />
<br />
<pre style="background-color: #333333; border: 1px solid rgb(212, 212, 212); font-family: courier new; padding: 15px;">mvn clean install dependency<span style="color: #339933;">:</span>tree -X</pre>
<br />
Sample:<br />
<br />
<pre style="background-color: #333333; border: 1px solid rgb(212, 212, 212); font-family: courier new; padding: 15px;">com.hp.hpl.jena.wso2:arq:bundle:1.0.0.wso2v1
+- com.ibm.icu:icu4j:jar:3.8:compile
\- com.hp.hpl.jena:arq:jar:2.8.3:compile
+- com.hp.hpl.jena:jena:jar:2.6.2:compile
| +- org.slf4j:slf4j-log4j12:jar:1.5.6:runtime
| \- log4j:log4j:jar:1.2.13:runtime
+- com.hp.hpl.jena:iri:jar:0.8:compile
+- org.codehaus.woodstox:wstx-asl:jar:3.2.9:compile
| \- stax:stax-api:jar:1.0.1:compile
+- org.apache.lucene:lucene-core:jar:2.3.1:compile
+- junit:junit:jar:3.8.1:compile (version managed from 4.5)
+- org.slf4j:slf4j-api:jar:1.5.8:compile
\- xerces:xercesImpl:jar:2.7.1:compile
------------------------------------------------------------------------</pre>
</div>
Warunahttp://www.blogger.com/profile/08581648110541505066noreply@blogger.com3tag:blogger.com,1999:blog-7153542985607416362.post-23688762950224473452011-02-08T23:18:00.000+05:302011-02-08T23:18:25.842+05:30How to Deploy WSO2 BPS on JBoss<div dir="ltr" style="text-align: left;" trbidi="on"><a href="http://wso2.org/library/knowledge-base/2011/01/deploying-wso2-bps-202-jboss-510-1">This</a> article from <a href="http://pavithramadurangi.blogspot.com/">Pavithra</a> provides step by step directions to deploy <a href="http://wso2.com/products/business-process-server/">WSO2 BPS</a> 2.0.2 in JBoss 5.1.0 GA.<br />
<a href="http://wso2.com/products/business-process-server/">WSO2 BPS</a> can also be installed on other application servers as well. Refer <a href="http://wso2.org/">Oxygen Tank</a> for more information.</div>Warunahttp://www.blogger.com/profile/08581648110541505066noreply@blogger.com0tag:blogger.com,1999:blog-7153542985607416362.post-20913426935404668702011-02-07T23:00:00.001+05:302011-02-07T23:39:05.393+05:30Orchestration vs Choreography<div dir="ltr" style="text-align: left;" trbidi="on"><div style="text-align: justify;">Service orchestration and service choreography are widely spoken topics when it comes to service composition. Lets take a look at the definitions.</div><br />
<b><span class="Apple-style-span" style="font-size: large;">Orchestration</span></b><br />
<br />
<b>Analogy</b>: Orchestra<br />
<br />
<a href="http://www.flickr.com/photos/rightlyso/2153099037/" title="Applause by rightlySo, on Flickr"><img alt="Applause" height="187" src="http://farm3.static.flickr.com/2356/2153099037_50cae07032.jpg" width="500" /></a><br />
<br />
<div style="text-align: justify;">The conductor of the orchestra is the one who knows the entire composition. The musicians in the orchestra do not necessarily have to know what other musicians part or what they do. The musicians just have to know how play their instrument in which they best at. The conductor orchestrate the group of musicians to achieve the final output (composition).</div><div style="text-align: justify;"><br />
</div><div style="text-align: justify;">Orchestration is the coordination of web services in order to compose the business processes. The business process plays the role of orchestrator/conductor and coordinate the services to fulfill the business process. The individual web services do not aware (it is not necessarily need to know) of the other services involved in the process and the services even do not know that they participate in a business process, they just serve the requests. <a href="http://docs.oasis-open.org/wsbpel/2.0/OS/wsbpel-v2.0-OS.html">WS-BPEL</a> specification is an example. <a href="http://docs.oasis-open.org/wsbpel/2.0/OS/wsbpel-v2.0-OS.html">WS-BPEL</a> is a language for defining processes that can be executed on an orchestration engine such as <a href="http://wso2.com/products/business-process-server/">WSO2 BPS</a>.</div><br />
<b><span class="Apple-style-span" style="font-size: large;">Choreography</span></b><br />
<br />
<b>Analogy:</b> Group Dance<br />
<a href="http://www.flickr.com/photos/aamenakhan/5140476188/" title="Hacettepe University Folk Dances Group by Aamena, on Flickr"><img alt="Hacettepe University Folk Dances Group" height="172" src="http://farm5.static.flickr.com/4071/5140476188_e7d30f8813.jpg" width="500" /></a><br />
<br />
<div style="text-align: justify;">Each and every dancer know, exactly what to do and what other dances will do. They synchronize them selves according to the other dances. The dancers aware of the each others moves.</div><div style="text-align: justify;"><br />
</div><div style="text-align: justify;">Therefore, in choreography, services do not rely on a central coordinator. Each of the service, knows exactly when to execute them selves and when to talk to its peers and sync up. <a href="http://www.w3.org/TR/2004/WD-ws-cdl-10-20040427/">WS-CDL</a> standard is an example.</div><br />
References: <a href="http://www.infoq.com/news/2008/09/Orchestration">http://www.infoq.com/news/2008/09/Orchestration</a></div>Warunahttp://www.blogger.com/profile/08581648110541505066noreply@blogger.com1tag:blogger.com,1999:blog-7153542985607416362.post-46365263412155990162010-09-12T23:25:00.002+05:302010-09-12T23:28:21.853+05:30WSO2Con 2010<a href="http://wso2.org/">WSO2</a> celebrates 5th year anniversary with <a href="http://wso2con.com/">WSO2Con 2010</a>.<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjWa_twHP8u-6AE5vpjYrEuQx_wFugKh0Ik8Z0qyFAi3TGNG6RyTY6IrNn98ZE7VA0sxJtl-ptpcfPvHlkB8cbDH6SSyTbcImiBTnnssBIgtp9MbA0sby9BqpbNfXmEo7208SmSA9e4IYLQ/s1600/wso2con-topheader.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjWa_twHP8u-6AE5vpjYrEuQx_wFugKh0Ik8Z0qyFAi3TGNG6RyTY6IrNn98ZE7VA0sxJtl-ptpcfPvHlkB8cbDH6SSyTbcImiBTnnssBIgtp9MbA0sby9BqpbNfXmEo7208SmSA9e4IYLQ/s1600/wso2con-topheader.gif" /></a></div><br />
<br />
<br />
The conference will feature some of WSO2’s most renowned technical thought leaders. Topics range from Platform-as-a-Service (PaaS) and On-Premise Cloud Systems, Enterprise Security, Governance, and Managing Business Processes.<br />
<br />
Most importantly, there will be a demo of an end to end business scenario which is powered by <a href="http://wso2.com/products/">WSO2 product stack</a>.<br />
<br />
Still not too late. <a href="http://wso2.com/events/wso2con-2010-colombo/register/">Register</a> for WSO2Con 2010.<br />
<br />
<br />
<div><object height="295" width="480"><param name="movie" value="http://www.youtube.com/v/j-xtzwPb8Yc?fs=1&hl=en_US"><param name="allowFullScreen" value="true"><param name="allowscriptaccess" value="always"><embed src="http://www.youtube.com/v/j-xtzwPb8Yc?fs=1&hl=en_US" width="480" height="295" allowscriptaccess="never" allowfullscreen="true" wmode="transparent" type="application/x-shockwave-flash"></embed></object></div>Warunahttp://www.blogger.com/profile/08581648110541505066noreply@blogger.com0tag:blogger.com,1999:blog-7153542985607416362.post-1657559060217395502010-07-16T21:02:00.003+05:302010-07-17T21:10:17.227+05:30WSO2 Business Activity Monitor 1.1.0 Released<div style="text-align: justify;"><a href="http://wso2.org/projects/bam">WSO2 Business Activity Monitor</a> (<a href="http://wso2.org/projects/bam">WSO2 BAM</a>) is a tool designed to exercise Business Activity Monitoring (BAM). WSO2 BAM is intended to serve the needs of both business and IT domain experts to monitor and understand business activities within a SOA deployment. It is specifically designed for monitoring SOA deployments, and can be extended to cater for other general monitoring requirements as well.</div><div style="text-align: justify;"><br />
</div><div style="text-align: justify;">New Features:</div><div style="text-align: justify;"></div><ul><li>Support for Oracle DBMS</li>
<li>Error category monitoring for WSO2 ESB mediation data</li>
<li>Improvements to analytics summary calculations, storage and visualization</li>
<li>Support for deployment on JBoss, Apache Tomcat, and WebLogic Application servers</li>
<li>Improved P2 based provisioning and feature management support</li>
<li>Support for deleting Monitored Servers</li>
</ul>Warunahttp://www.blogger.com/profile/08581648110541505066noreply@blogger.com0tag:blogger.com,1999:blog-7153542985607416362.post-28588788125802972852010-07-15T22:22:00.002+05:302010-07-17T21:11:12.638+05:30WSO2 Webinar - Business Processes with Human Smarts<span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; font-family: arial, helvetica, verdana; font-size: 12px; line-height: 18px;"></span><br />
<table><tbody>
<tr><td style="font-family: arial, helvetica, verdana; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: left; vertical-align: top;"><div style="text-align: justify;">What is a business process? A series of steps that need to be performed in order to provide goods or services. Processes that used to be performed by humans are becoming increasingly automated by enterprise IT, allowing them to be performed more quickly and reliably and at much greater scale. But there can be unintended consequences - reverberation of failures, lack of accountability, an inability to handle situations outside the norm.</div></td></tr>
<tr><td height="10" style="font-family: arial, sans-serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"></td></tr>
<tr><td style="font-family: arial, helvetica, verdana; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: left; vertical-align: top;"><div style="text-align: justify;">So why are business processes challenging to get right? Getting it right often means striking a good balance between automation and using the wisdom and flexibility of the human mind. But the technologies and systems for automating interactions which include humans differs substantially from automating interactions among software applications. This gulf has been difficult to bridge. Until now.</div></td></tr>
<tr><td height="10" style="font-family: arial, sans-serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"></td></tr>
<tr><td style="font-family: arial, helvetica, verdana; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: left; vertical-align: top;"><div style="text-align: justify;">The recent introduction of two new standards in this space - BPEL4People and WS-Human Task - enables organizations to extend automated systems smoothly to include human interaction. WSO2 supports these new capabilities in the latest release of the WSO2 Business Process Server.</div></td></tr>
<tr><td height="10" style="font-family: arial, sans-serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"></td></tr>
<tr><td style="font-family: arial, helvetica, verdana; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: left; vertical-align: top;">Your presenter, Milinda Pathirage, will cover the following topics:</td></tr>
<tr><td height="10" style="font-family: arial, sans-serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"></td></tr>
<tr><td style="font-family: arial, sans-serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"><table style="border-bottom-style: none; border-bottom-width: 0pt; border-color: initial; border-left-style: none; border-left-width: 0pt; border-right-style: none; border-right-width: 0pt; border-top-style: none; border-top-width: 0pt;"><tbody>
<tr><td style="font-family: arial, sans-serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-right: 5px; text-align: left; vertical-align: top;"><img src="http://wso2.org/sites/all/themes/wso2-v6/images/bullet-ico.jpg?utm_source=newsletter&utm_medium=email&utm_campaign=WSO2%20Webinars" style="border-bottom-style: none; border-bottom-width: 0pt; border-color: initial; border-left-style: none; border-left-width: 0pt; border-right-style: none; border-right-width: 0pt; border-top-style: none; border-top-width: 0pt;" /></td><td style="font-family: arial, helvetica, verdana; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: left; vertical-align: top;">Scenarios highlighting business process involving humans</td></tr>
<tr><td style="font-family: arial, sans-serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-right: 5px; text-align: left; vertical-align: top;"><img src="http://wso2.org/sites/all/themes/wso2-v6/images/bullet-ico.jpg?utm_source=newsletter&utm_medium=email&utm_campaign=WSO2%20Webinars" style="border-bottom-style: none; border-bottom-width: 0pt; border-color: initial; border-left-style: none; border-left-width: 0pt; border-right-style: none; border-right-width: 0pt; border-top-style: none; border-top-width: 0pt;" /></td><td style="font-family: arial, helvetica, verdana; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: left; vertical-align: top;">Insights into BPEL4People and WS-Human Tasks</td></tr>
<tr><td style="font-family: arial, sans-serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-right: 5px; text-align: left; vertical-align: top;"><img src="http://wso2.org/sites/all/themes/wso2-v6/images/bullet-ico.jpg?utm_source=newsletter&utm_medium=email&utm_campaign=WSO2%20Webinars" style="border-bottom-style: none; border-bottom-width: 0pt; border-color: initial; border-left-style: none; border-left-width: 0pt; border-right-style: none; border-right-width: 0pt; border-top-style: none; border-top-width: 0pt;" /></td><td style="font-family: arial, helvetica, verdana; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: left; vertical-align: top;">Overview of the WSO2 Business Process Server</td></tr>
<tr><td style="font-family: arial, sans-serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-right: 5px; text-align: left; vertical-align: top;"><img src="http://wso2.org/sites/all/themes/wso2-v6/images/bullet-ico.jpg?utm_source=newsletter&utm_medium=email&utm_campaign=WSO2%20Webinars" style="border-bottom-style: none; border-bottom-width: 0pt; border-color: initial; border-left-style: none; border-left-width: 0pt; border-right-style: none; border-right-width: 0pt; border-top-style: none; border-top-width: 0pt;" /></td><td style="font-family: arial, helvetica, verdana; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: left; vertical-align: top;">Review of the new human-interaction features of the latest version of the WSO2 BPS</td></tr>
</tbody></table></td></tr>
<tr><td height="10" style="font-family: arial, sans-serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"></td></tr>
<tr><td style="font-family: arial, helvetica, verdana; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: left; vertical-align: top;">Who should attend:</td></tr>
<tr><td height="10" style="font-family: arial, sans-serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"></td></tr>
<tr><td style="font-family: arial, sans-serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"><table style="border-bottom-style: none; border-bottom-width: 0pt; border-color: initial; border-left-style: none; border-left-width: 0pt; border-right-style: none; border-right-width: 0pt; border-top-style: none; border-top-width: 0pt;"><tbody>
<tr><td style="font-family: arial, sans-serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-right: 5px; text-align: left; vertical-align: top;"><img src="http://wso2.org/sites/all/themes/wso2-v6/images/bullet-ico.jpg?utm_source=newsletter&utm_medium=email&utm_campaign=WSO2%20Webinars" style="border-bottom-style: none; border-bottom-width: 0pt; border-color: initial; border-left-style: none; border-left-width: 0pt; border-right-style: none; border-right-width: 0pt; border-top-style: none; border-top-width: 0pt;" /></td><td style="font-family: arial, helvetica, verdana; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: left; vertical-align: top;">Architects and developers expanding their toolkit to include business processes</td></tr>
</tbody></table></td></tr>
<tr><td style="font-family: arial, sans-serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"><table style="border-bottom-style: none; border-bottom-width: 0pt; border-color: initial; border-left-style: none; border-left-width: 0pt; border-right-style: none; border-right-width: 0pt; border-top-style: none; border-top-width: 0pt;"><tbody>
<tr><td style="font-family: arial, sans-serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-right: 5px; text-align: left; vertical-align: top;"><img src="http://wso2.org/sites/all/themes/wso2-v6/images/bullet-ico.jpg?utm_source=newsletter&utm_medium=email&utm_campaign=WSO2%20Webinars" style="border-bottom-style: none; border-bottom-width: 0pt; border-color: initial; border-left-style: none; border-left-width: 0pt; border-right-style: none; border-right-width: 0pt; border-top-style: none; border-top-width: 0pt;" /></td><td style="font-family: arial, helvetica, verdana; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: left; vertical-align: top;">Business process analysts</td></tr>
</tbody></table></td></tr>
<tr><td style="font-family: arial, sans-serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"><table style="border-bottom-style: none; border-bottom-width: 0pt; border-color: initial; border-left-style: none; border-left-width: 0pt; border-right-style: none; border-right-width: 0pt; border-top-style: none; border-top-width: 0pt;"><tbody>
<tr><td style="font-family: arial, sans-serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-right: 5px; text-align: left; vertical-align: top;"><img src="http://wso2.org/sites/all/themes/wso2-v6/images/bullet-ico.jpg?utm_source=newsletter&utm_medium=email&utm_campaign=WSO2%20Webinars" style="border-bottom-style: none; border-bottom-width: 0pt; border-color: initial; border-left-style: none; border-left-width: 0pt; border-right-style: none; border-right-width: 0pt; border-top-style: none; border-top-width: 0pt;" /></td><td style="font-family: arial, helvetica, verdana; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: left; vertical-align: top;">Consultants and analysts specializing in SOA</td></tr>
</tbody></table></td></tr>
<tr><td height="10" style="font-family: arial, sans-serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"></td></tr>
<tr><td style="font-family: arial, helvetica, verdana; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: left; vertical-align: top;"><div style="text-align: justify;">Milinda Pathirage is product manager for the WSO2 Business Process Server and is an active contributor for Apache ODE project. He brings a wealth of knowledge on business processes and how enterprises leverage these technologies today.</div></td></tr>
</tbody></table>Warunahttp://www.blogger.com/profile/08581648110541505066noreply@blogger.com2tag:blogger.com,1999:blog-7153542985607416362.post-14722772164257855242010-07-14T22:51:00.000+05:302010-07-14T22:51:15.803+05:30MySQL with C/C++ - My First BLOG post<a href="http://pulse.yahoo.com/_IXSJSFXILGQMGECOCN22GOFY7I/blog/articles/10949?listPage=date&listItem=200710">MySQL with C/C++</a>Warunahttp://www.blogger.com/profile/08581648110541505066noreply@blogger.com0tag:blogger.com,1999:blog-7153542985607416362.post-56028381371994467162010-07-14T21:32:00.004+05:302010-07-17T21:13:19.376+05:30WSO2 Business Process Server 2.0.0 Released<div><a href="http://wso2.com/products/business-process-server/">WSO2 Business Process Server</a> (WSO2 BPS) 2.0.0 is released few weeks back.<br />
<div style="text-align: justify;">WSO2 BPS is an opensource BPEL process engine which support BPEL4People and WS-HumanTasks </div><br />
New features are:</div><div><ul><li>BPEL4People and WS-HumanTask Support(Experimental)</li>
<li>Instance cleanup scheduled task for production deployments</li>
<li>Component manager to install and uninstall features (provisioning support)</li>
<li>External service invocation via JMS</li>
<li>XPath extension support</li>
<li>Various bug fixes and performance improvements for Apache ODE</li>
</ul></div><div><div style="text-align: justify;">WS-HumanTask support is in its early stages. The upcoming releases will provide comprehensive support for Human Tasks. </div></div><div><br />
</div><div><div style="text-align: justify;">Component manager is a cool feature which enables you to install other features to BPS server. For instance, now you can install <a href="http://wso2.com/products/enterprise-service-bus/">WSO2 ESB</a> or any other <a href="http://wso2.com/products/">WSO2 products'</a> features to the BPS server itself. </div></div><div><div style="text-align: justify;"><br />
</div></div><div><div style="text-align: justify;">You can find a sample XPath extension for WSO2 BPS <a href="http://blog.mpathirage.com/2010/06/20/extending-wso2-bps-2-0-0-with-custom-xpath-functions/">here</a>.</div></div><div><div style="text-align: justify;"><br />
</div></div><div><div style="text-align: justify;"><br />
</div></div><div><div style="text-align: justify;">WSO2 BPS is an opensource product. If you found an issue, please raise a jira at <a href="https://wso2.org/jira/browse/CARBON">https://wso2.org/jira/browse/CARBON</a> under BPEL and HumanTask components.</div></div><div><div style="text-align: justify;">Please feel free to fix issues and attach patches as well ;)</div></div>Warunahttp://www.blogger.com/profile/08581648110541505066noreply@blogger.com0tag:blogger.com,1999:blog-7153542985607416362.post-49040968596897658402010-02-12T16:07:00.002+05:302010-06-13T19:33:23.262+05:30How to enable Google BuzzIf you haven't offered Google buzz yet, you can try it by enabling multiple inboxes in Gmail Labs and set is:buzz in one of the empty panes.<br />
<br />
<br />
Reference: <a href="http://aext.net/2010/02/12-undocumented-tricks-for-google-buzz/">http://aext.net/2010/02/12-undocumented-tricks-for-google-buzz/</a>Warunahttp://www.blogger.com/profile/08581648110541505066noreply@blogger.com0tag:blogger.com,1999:blog-7153542985607416362.post-63680149108376301902010-01-02T18:01:00.007+05:302011-02-10T20:48:22.356+05:30Batch Resize Images in GIMPIt is always required to resize a set of images at once. So that, no need to do it one by one. Let's see, how this can be achieved using GIMP image editor in Ubuntu.<div><br />
</div><div>We are using the batch mode of GIMP to do image processing from the command line. Let's write a simple script in Scheme language to resize a set of image files.</div><br />
<pre class="scheme" style="font-family:monospace;"><span style="color:#66cc66;">(</span><span style="color:#b1b100;">define</span> <span style="color:#66cc66;">(</span>batch<span style="color:#66cc66;">-</span>resize pattern width height<span style="color:#66cc66;">)</span>
<span style="color:#66cc66;">(</span><span style="color:#b1b100;">let*</span> <span style="color:#66cc66;">(</span><span style="color:#66cc66;">(</span>filelist <span style="color:#66cc66;">(</span><span style="color:#b1b100;">cadr</span> <span style="color:#66cc66;">(</span>file<span style="color:#66cc66;">-</span>glob pattern <span style="color:#cc66cc;">1</span><span style="color:#66cc66;">)</span><span style="color:#66cc66;">)</span><span style="color:#66cc66;">)</span><span style="color:#66cc66;">)</span>
<span style="color:#66cc66;">(</span>while <span style="color:#66cc66;">(</span><span style="color:#b1b100;">not</span> <span style="color:#66cc66;">(</span><span style="color:#b1b100;">null?</span> filelist<span style="color:#66cc66;">)</span><span style="color:#66cc66;">)</span>
<span style="color:#66cc66;">(</span><span style="color:#b1b100;">let*</span> <span style="color:#66cc66;">(</span><span style="color:#66cc66;">(</span>filename <span style="color:#66cc66;">(</span><span style="color:#b1b100;">car</span> filelist<span style="color:#66cc66;">)</span><span style="color:#66cc66;">)</span>
<span style="color:#66cc66;">(</span>image <span style="color:#66cc66;">(</span><span style="color:#b1b100;">car</span> <span style="color:#66cc66;">(</span>gimp<span style="color:#66cc66;">-</span>file<span style="color:#66cc66;">-</span><span style="color:#b1b100;">load</span> RUN<span style="color:#66cc66;">-</span>NONINTERACTIVE filename filename<span style="color:#66cc66;">)</span><span style="color:#66cc66;">)</span><span style="color:#66cc66;">)</span>
<span style="color:#66cc66;">(</span>drawable <span style="color:#66cc66;">(</span><span style="color:#b1b100;">car</span> <span style="color:#66cc66;">(</span>gimp<span style="color:#66cc66;">-</span>image<span style="color:#66cc66;">-</span>get<span style="color:#66cc66;">-</span>active<span style="color:#66cc66;">-</span>layer image<span style="color:#66cc66;">)</span><span style="color:#66cc66;">)</span><span style="color:#66cc66;">)</span><span style="color:#66cc66;">)</span>
<span style="color:#66cc66;">(</span>gimp<span style="color:#66cc66;">-</span>image<span style="color:#66cc66;">-</span>scale<span style="color:#66cc66;">-</span>full image width height INTERPOLATION<span style="color:#66cc66;">-</span>CUBIC<span style="color:#66cc66;">)</span>
<span style="color:#66cc66;">(</span>gimp<span style="color:#66cc66;">-</span>file<span style="color:#66cc66;">-</span>save RUN<span style="color:#66cc66;">-</span>NONINTERACTIVE image drawable filename filename<span style="color:#66cc66;">)</span>
<span style="color:#66cc66;">(</span>gimp<span style="color:#66cc66;">-</span>image<span style="color:#66cc66;">-</span>delete image<span style="color:#66cc66;">)</span><span style="color:#66cc66;">)</span>
<span style="color:#66cc66;">(</span><span style="color:#b1b100;">set!</span> filelist <span style="color:#66cc66;">(</span><span style="color:#b1b100;">cdr</span> filelist<span style="color:#66cc66;">)</span><span style="color:#66cc66;">)</span><span style="color:#66cc66;">)</span><span style="color:#66cc66;">)</span><span style="color:#66cc66;">)</span></pre><br />
<!--pre style="border: 1px solid rgb(212, 212, 212); padding: 15px; background-color: rgb(229, 238, 204);font-family:courier new;">(define (batch-resize pattern width height)<br />
(let* ((filelist (cadr (file-glob pattern 1))))<br />
(while (not (null? filelist))<br />
(let* ((filename (car filelist))<br />
(image (car (gimp-file-load RUN-NONINTERACTIVE filename filename)))<br />
(drawable (car (gimp-image-get-active-layer image))))<br />
(gimp-image-scale-full image width height INTERPOLATION-CUBIC)<br />
(gimp-file-save RUN-NONINTERACTIVE image drawable filename filename)<br />
(gimp-image-delete image))<br />
(set! filelist (cdr filelist))<br />
)<br />
)<br />
)</pre-->This particular script takes a pattern for filename, desired width and height as inputs and resize all image files that are matched. This script overwrite the existing file. In order to run the script, save it with <span class="Apple-style-span" style="font-family:'courier new';">.scm</span> extension in the <span class="Apple-style-span" style="font-family:'courier new';">~/.gimp-<version>/scripts/</version></span> directory.<br />
<div>Then goto the directory which contains images, then run the following command to resize images.</div><div><br />
</div><div><pre style="border: 1px solid rgb(212, 212, 212); padding: 15px; background-color:#333333;font-family:courier new;">gimp -i -b '(batch-resize "*.JPG" 604 453)' -b '(gimp-quit 0)'</pre>The above command will resize all the image files end with .JPG to <span class="Apple-style-span" style="font-family:arial;">604X453</span> </div><div>The above script can be customized to any other image processing requirements as well. Refer the <span class="Apple-style-span" style="font-family:'courier new';">Help -> Procedure Browser</span> in GIMP for more operations. </div><div><br />
<div>The following script rename the resized image file by adding 'a' to the beginning of the file name</div><div><br />
</div><pre class="scheme" style="font-family:monospace;"><span style="color:#66cc66;">(</span><span style="color:#b1b100;">define</span> <span style="color:#66cc66;">(</span>batch<span style="color:#66cc66;">-</span>resize<span style="color:#66cc66;">-</span>rename pattern width height<span style="color:#66cc66;">)</span>
<span style="color:#66cc66;">(</span><span style="color:#b1b100;">let*</span> <span style="color:#66cc66;">(</span><span style="color:#66cc66;">(</span>filelist <span style="color:#66cc66;">(</span><span style="color:#b1b100;">cadr</span> <span style="color:#66cc66;">(</span>file<span style="color:#66cc66;">-</span>glob pattern <span style="color:#cc66cc;">1</span><span style="color:#66cc66;">)</span><span style="color:#66cc66;">)</span><span style="color:#66cc66;">)</span><span style="color:#66cc66;">)</span>
<span style="color:#66cc66;">(</span>while <span style="color:#66cc66;">(</span><span style="color:#b1b100;">not</span> <span style="color:#66cc66;">(</span><span style="color:#b1b100;">null?</span> filelist<span style="color:#66cc66;">)</span><span style="color:#66cc66;">)</span>
<span style="color:#66cc66;">(</span><span style="color:#b1b100;">let*</span> <span style="color:#66cc66;">(</span><span style="color:#66cc66;">(</span>filename <span style="color:#66cc66;">(</span><span style="color:#b1b100;">car</span> filelist<span style="color:#66cc66;">)</span><span style="color:#66cc66;">)</span>
<span style="color:#66cc66;">(</span>image <span style="color:#66cc66;">(</span><span style="color:#b1b100;">car</span> <span style="color:#66cc66;">(</span>gimp<span style="color:#66cc66;">-</span>file<span style="color:#66cc66;">-</span><span style="color:#b1b100;">load</span> RUN<span style="color:#66cc66;">-</span>NONINTERACTIVE filename filename<span style="color:#66cc66;">)</span><span style="color:#66cc66;">)</span><span style="color:#66cc66;">)</span>
<span style="color:#66cc66;">(</span>drawable <span style="color:#66cc66;">(</span><span style="color:#b1b100;">car</span> <span style="color:#66cc66;">(</span>gimp<span style="color:#66cc66;">-</span>image<span style="color:#66cc66;">-</span>get<span style="color:#66cc66;">-</span>active<span style="color:#66cc66;">-</span>layer image<span style="color:#66cc66;">)</span><span style="color:#66cc66;">)</span><span style="color:#66cc66;">)</span><span style="color:#66cc66;">)</span>
<span style="color:#66cc66;">(</span>gimp<span style="color:#66cc66;">-</span>image<span style="color:#66cc66;">-</span>scale<span style="color:#66cc66;">-</span>full image width height INTERPOLATION<span style="color:#66cc66;">-</span>CUBIC<span style="color:#66cc66;">)</span>
<span style="color:#66cc66;">(</span><span style="color:#b1b100;">let</span> <span style="color:#66cc66;">(</span><span style="color:#66cc66;">(</span>nfilename <span style="color:#66cc66;">(</span><span style="color:#b1b100;">string-append</span> <span style="color:#ff0000;">"a"</span> filename<span style="color:#66cc66;">)</span><span style="color:#66cc66;">)</span><span style="color:#66cc66;">)</span>
<span style="color:#66cc66;">(</span>gimp<span style="color:#66cc66;">-</span>file<span style="color:#66cc66;">-</span>save RUN<span style="color:#66cc66;">-</span>NONINTERACTIVE image drawable nfilename nfilename<span style="color:#66cc66;">)</span><span style="color:#66cc66;">)</span>
<span style="color:#66cc66;">(</span>gimp<span style="color:#66cc66;">-</span>image<span style="color:#66cc66;">-</span>delete image<span style="color:#66cc66;">)</span><span style="color:#66cc66;">)</span>
<span style="color:#66cc66;">(</span><span style="color:#b1b100;">set!</span> filelist <span style="color:#66cc66;">(</span><span style="color:#b1b100;">cdr</span> filelist<span style="color:#66cc66;">)</span><span style="color:#66cc66;">)</span><span style="color:#66cc66;">)</span><span style="color:#66cc66;">)</span><span style="color:#66cc66;">)</span></pre><br />
<!--div><pre style="border: 1px solid rgb(212, 212, 212); padding: 15px; background-color: rgb(229, 238, 204);font-family:courier new;">(define (batch-resize-rename pattern width height)
(let* ((filelist (cadr (file-glob pattern 1))))
(while (not (null? filelist))
(let* ((filename (car filelist))
(image (car (gimp-file-load RUN-NONINTERACTIVE filename filename)))
(drawable (car (gimp-image-get-active-layer image))))
(gimp-image-scale-full image width height INTERPOLATION-CUBIC)
(let ((nfilename (string-append "a" filename)))
(gimp-file-save RUN-NONINTERACTIVE image drawable nfilename nfilename))
(gimp-image-delete image))
(set! filelist (cdr filelist))
)
)
)</pre></div--><div>By referring to the GIMP procedure and plugins browser and a Scheme tutorial, it is possible to customize the above script as required.</div><div><br />
</div><div>References: </div><div><a href="http://www.gimp.org/tutorials/Basic_Batch/">GIMP Batch Mode</a></div><div><a href="http://www.gimp.org/tutorials/Basic_Scheme/">Basic Scheme Tutorial</a></div></div>Warunahttp://www.blogger.com/profile/08581648110541505066noreply@blogger.com3tag:blogger.com,1999:blog-7153542985607416362.post-64589662560289573632009-11-20T21:22:00.002+05:302012-02-03T22:20:09.117+05:30How to write a BPEL extension for WSO2 BPS 1.1.0 and Apache ODE<div dir="ltr" style="text-align: left;" trbidi="on">
<div style="text-align: justify;">
You may always wanted to write your own BPEL activity to handle your scenario. This article will go through step by step process to implement a simple BPEL extension activity for<a href="http://wso2.org/projects/bps"> WSO2 BPS</a> and <a href="http://ode.apache.org/">Apache ODE</a>.</div>
<div style="text-align: justify;">
WSO2 Business Process Server (<a href="http://wso2.org/projects/bps">BPS</a>) is an easy-to-use open source business process server that executes business processes written using the WS-BPEL standard. It is powered by Apache ODE (open source BPEL engine) and provides a complete Web-based graphical console to deploy, manage and view processes in addition to managing and viewing process instances.</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<b>Implementation of Extension Bundle</b></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
Create a class by implementing one of the <span class="Apple-style-span" style="font-family: 'courier new';">ExtensionOperation</span> interfaces which are available at [<a href="http://svn.apache.org/viewvc/ode/trunk/runtimes/src/main/java/org/apache/ode/bpel/rtrep/common/extension/">1</a>]. The <span class="Apple-style-span" style="font-family: 'courier new';">run*</span> method of this class should contain the implementation of the extension activity. You can find a sample implementation of this class at [<a href="http://svn.wso2.org/repos/wso2/branches/bps/1.1.0/product/modules/samples/bpel-extension/src/main/java/org/wso2/bps/samples/extension/B4PExtensionOperation.java">2</a>]. </div>
<div style="text-align: justify;">
Then You have to create a class by implementing <a href="http://svn.apache.org/viewvc/ode/trunk/runtimes/src/main/java/org/apache/ode/bpel/rtrep/common/extension/AbstractExtensionBundle.java?view=log" name="AbstractExtensionBundle.java" style="color: #880088;" title="View file revision log"><span class="Apple-style-span" style="font-family: 'courier new';">AbstractExtensionBundle</span></a> interface. Within this class, the above implemented ExtensionOperation class should be registered. A sample implementation can be found at [<a href="http://svn.wso2.org/repos/wso2/branches/bps/1.1.0/product/modules/samples/bpel-extension/src/main/java/org/wso2/bps/samples/extension/B4PExtensionBundle.java">3</a>].</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<b>Configure WSO2 BPS</b></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
There are two methods to expose the extension classes to BPS.<br />
<ul>
<li>Creating a jar.<br />
<br />
Copy the jar to BPS_HOME/repository/components/lib directory.<br />
</li>
<li>Creating an OSGI bundle<br />
<br />
Copy the bundle to BPS_HOME/repository/components/dropins directory.<br />
</li>
</ul>
</div>
<div style="text-align: justify;">
Add the following configuration entry to the bps.xml file in BPS_HOME/conf directory. Repalce <span style="font-family: monospace;">org.wso2.bps.samples.extension</span> by your extension class name.</div>
<div style="text-align: justify;">
Note: By default, the sample extension bundles shipped with WSO2 BPS are copied to BPS_HOME/repository/components/lib. You have to add the following configuration to get them registered in BPS.</div>
<pre class="xml" style="background-color: #333333; border: 1px solid rgb(212, 212, 212); font-family: courier new; padding: 15px;"><span style="color: #009900;"><span style="color: black; font-weight: bold;"><bps</span> <span style="color: #000066;">xmlns</span>=<span style="color: red;">"http://wso2.org/bps/config"</span><span style="color: black; font-weight: bold;">></span></span>
...
<span style="color: #009900;"><span style="color: black; font-weight: bold;"><extensionBundles<span style="color: black; font-weight: bold;">></span></span></span>
<span style="color: #009900;"><span style="color: black; font-weight: bold;"><runtimes<span style="color: black; font-weight: bold;">></span></span></span>
<span style="color: #009900;"><span style="color: black; font-weight: bold;"><runtime<span style="color: black; font-weight: bold;">></span></span></span>org.wso2.bps.samples.extension<span style="color: #009900;"><span style="color: black; font-weight: bold;"></runtime<span style="color: black; font-weight: bold;">></span></span></span>
<span style="color: #009900;"><span style="color: black; font-weight: bold;"></runtimes<span style="color: black; font-weight: bold;">></span></span></span>
<span style="color: #009900;"><span style="color: black; font-weight: bold;"></extensionBundles<span style="color: black; font-weight: bold;">></span></span></span>
...
<span style="color: #009900;"><span style="color: black; font-weight: bold;"></bps<span style="color: black; font-weight: bold;">></span></span></span></pre>
Now, restart WSO2 BPS sever, and you are ready to use the new extension in your BPEL.<br />
<div>
<br /></div>
<div>
The process is almost the same for Apache ODE. But there is a separate configuration file to register the extension. Please refer <a href="http://ode.apache.org/extension-activities-extensible-assign-operations.html">ODE extensions</a> documentation for more details.<br />
<br />
<b>Using the Extension activity in your BPEL</b></div>
<div>
<br /></div>
<div>
The extension must be declared before, it is used.</div>
<pre class="xml" style="background-color: #333333; border: 1px solid rgb(212, 212, 212); font-family: courier new; padding: 15px;"><span style="color: #009900;"><span style="color: black; font-weight: bold;"><bpel:process...<span style="color: black; font-weight: bold;">></span></span></span>
<span style="color: #009900;"><span style="color: black; font-weight: bold;"><bpel:extensions<span style="color: black; font-weight: bold;">></span></span></span>
<span style="color: #009900;"><span style="color: black; font-weight: bold;"><bpel:extension</span> <span style="color: #000066;">namespace</span>=<span style="color: red;">"#extension-namespace#"</span> </span>
<span style="color: #009900;"> <span style="color: #000066;">mustUnderstand</span>=<span style="color: red;">"yes|no"</span><span style="color: black; font-weight: bold;">/></span></span>
<span style="color: #009900;"><span style="color: black; font-weight: bold;"></bpel:extensions<span style="color: black; font-weight: bold;">></span></span></span>
...
<span style="color: #009900;"><span style="color: black; font-weight: bold;"></bpel:process<span style="color: black; font-weight: bold;">></span></span></span>
</pre>
If the <span class="Apple-style-span" style="color: #000066; font-family: monospace; font-size: 13px; white-space: pre;">mustUnderstand</span> attribute is set to <b>yes, </b>then the extension should be registered in BPS server in order to deploy the BPEL process. Otherwise, it will throws an error at the compilation stage of the process. If the <span class="Apple-style-span" style="color: #000066; font-family: monospace; font-size: 13px; white-space: pre;">mustUnderstand</span> attribute is set to <b>no, </b>then the BPEL process will be deployed without checking whether there is an extension registered in the server.<br />
<br />
<div>
Using the activity. According to the sample <span class="Apple-style-span" style="font-family: monospace; font-size: 13px; font-weight: bold; white-space: pre;">anyElementQName <span class="Apple-style-span" style="font-family: Georgia,serif; font-size: 16px; font-weight: normal; white-space: normal;">should be equal to <span class="Apple-style-span" style="font-family: monospace; font-size: medium; white-space: pre-wrap;">b4ptest</span></span></span></div>
<pre class="xml" style="background-color: #333333; border: 1px solid rgb(212, 212, 212); font-family: courier new; padding: 15px;"><span style="color: #009900;"><span style="color: black; font-weight: bold;"><extensionActivity<span style="color: black; font-weight: bold;">></span></span></span>
<span style="color: #009900;"><span style="color: black; font-weight: bold;"><anyElementQName</span> standard-attributes<span style="color: black; font-weight: bold;">></span></span>
standard-elements
<span style="color: #009900;"><span style="color: black; font-weight: bold;"></anyElementQName<span style="color: black; font-weight: bold;">></span></span></span>
<span style="color: #009900;"><span style="color: black; font-weight: bold;"></extensionActivity<span style="color: black; font-weight: bold;">></span></span></span>
</pre>
<div>
<div style="text-align: justify;">
You can find a sample BPEL process at <a href="http://people.wso2.com/%7Ewaruna/TestExtensionActivity.zip">TestExtensionActivity.zip</a></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
References:</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
[1] - <a href="http://svn.apache.org/viewvc/ode/trunk/runtimes/src/main/java/org/apache/ode/bpel/rtrep/common/extension/">extension</a></div>
<div style="text-align: justify;">
[2] - <a href="http://svn.wso2.org/repos/wso2/branches/bps/1.1.0/product/modules/samples/bpel-extension/src/main/java/org/wso2/bps/samples/extension/B4PExtensionOperation.java">B4PExtensionOperation.java</a></div>
<div style="text-align: justify;">
[3] - <a href="http://svn.wso2.org/repos/wso2/branches/bps/1.1.0/product/modules/samples/bpel-extension/src/main/java/org/wso2/bps/samples/extension/B4PExtensionBundle.java">B4PExtensionBundle.java</a></div>
</div>
</div>Warunahttp://www.blogger.com/profile/08581648110541505066noreply@blogger.com4tag:blogger.com,1999:blog-7153542985607416362.post-37858327585824724392009-11-20T09:25:00.006+05:302010-01-12T16:24:19.607+05:30WSO2 Business Process Server 1.1.0 is Released<span class="Apple-style-span" style=" border-collapse: collapse; font-family:arial, sans-serif;font-size:13px;"><div>WSO2 Business Process Server (<a href="http://wso2.org/projects/bps">WSO2 BPS</a>) team is pleased to announce the release of version 1.1.0 of the easy-to-use open source business process server that executes business processes written following WS-BPEL standard.</div><div><br /></div><div><a href="http://wso2.org/projects/bps">WSO2 BPS</a> v1.1.0 is available for <a href="http://wso2.org/downloads/bps">download</a> at [1].</div><div><br /></div><div>The WSO2 BPS v1.1.0 is developed on top of the revolutionary <a href="http://wso2.org/projects/carbon">Carbon platform</a>[2] (Middleware a' la carte), and is based on the OSGi framework to achieve the better modularity for you SOA. </div><div><br /></div><div>An open source product, WSO2 BPS v1.1.0 is available under the <a href="http://www.apache.org/licenses/LICENSE-2.0.html">Apache Software License</a> (v2.0) . This includes all of the extra integration and management functionality as well.</div><div><br /></div><div>New Features in WSO2 BPS v1.1.0</div><div>------------------------------<wbr>-</div><div> - Apache ODE trunk is used as the BPEL Engine</div><div> - New WSO2 Carbon integration layer for Apache ODE</div><div> - BPEL Process Versioning Support</div><div> - Support for invoking secured(Using WS-Security) partner services.</div><div> - Experimental clustering support</div><div> - Invoke activity recovery support through management console </div><div> - E4X based data manipulation support for BPEL assignments</div><div> - BPEL Extension support for extending WS-BPEL language</div><div> - Equinox P2 based provisioning support - extend your BPS instance by installing new P2 features [5].</div><div><br /></div><div>Other Key Features</div><div>------------------</div><div> - Deploying Business Processes written in compliance with WS-BPEL 2.0 Standard and BPEL4WS 1.1 standard.</div><div> - Ability deploy BPEL event listeners</div><div> - Managing BPEL packages, processes and process instances.</div><div> - WS-Security support for business processes.</div><div> - Ability to use external data base system as the BPEL engine's perssitence storage</div><div> - Caching support for business processes.</div><div> - Throttling support for business processes.</div><div> - Transport management.</div><div> - Internationalized web based management console.</div><div> - System monitoring.</div><div> - Try-it for business processes.</div><div> - SOAP Message Tracing.</div><div> - Web Services tooling support such as WSDL2Java, Java2WSDL and WSDL Converter.</div><div> - Customizable server - You can customize the WSO2 BPS to fit into your exact requirements, by removing certain features or by adding new optional features.</div><div><br /></div><div>How to Run</div><div>------------------</div><div>1. Extract the downloaded zip.</div><div>2. Go to the bin directory in the extracted folder.</div><div>3. Run the wso2server.sh or wso2server.bat as appropriate.</div><div>4. Point your browser to the URL <a href="https://localhost:9443/carbon" target="_blank" style="color: rgb(0, 101, 204); ">https://localhost:9443/carbon</a></div><div>5. Use "admin", "admin" as the user name and password.</div><div>6. If you need to start the OSGi console with the server use the</div><div>property -DosgiConsole when starting the server</div><div><br /></div><div>Known issues</div><div>----------------------</div><div>All the known issues have been filed here [3]. Please report any other</div><div>issues you find as JIRA entries.</div><div><br /></div><div>Contact us</div><div>-----------------</div><div>WSO2 Business Process Server developers can be contacted via the mailing lists:</div><div>For Users: <a href="mailto:carbon-user@wso2.org" target="_blank" style="color: rgb(0, 101, 204); ">carbon-user@wso2.org</a></div><div>For Developers: <a href="mailto:carbon-dev@wso2.org" target="_blank" style="color: rgb(0, 101, 204); ">carbon-dev@wso2.org</a></div><div><br /></div><div>Alternatively, questions can also be raised in the Business Process Server forum</div><div>at <a href="http://wso2.org/forum/886" target="_blank" style="color: rgb(0, 101, 204); ">http://wso2.org/forum/886</a>.</div><div><br /></div><div>Training</div><div>---------------</div><div>WSO2 Inc. offers a variety of professional Training Programs, including</div><div>training on general Web services as well as WSO2 Business Process Server,</div><div>Apache Axis2, Data Services and a number of other products. For</div><div>additional support information please refer to</div><div><a href="http://wso2.com/training/course-catalog/" target="_blank" style="color: rgb(0, 101, 204); ">http://wso2.com/training/<wbr>course-catalog/</a></div><div><br /></div><div><br /></div><div>Support</div><div>--------------</div><div>WSO2 Inc. offers a variety of development and production support</div><div>programs, ranging from Web-based support up through normal business</div><div>hours, to premium 24x7 phone support. For additional support information</div><div>please refer to <a href="http://wso2.com/support/" target="_blank" style="color: rgb(0, 101, 204); ">http://wso2.com/support/</a></div><div><br /></div><div>For more information on WSO2 Business Process Server, visit the WSO2 Oxygen Tank[4].</div><div><br /></div><div>Thank you for your interest in WSO2 Business Process Server.</div><div><br /></div><div>-The WSO2 Business Process Server team</div><div><br /></div><div>[1] <a href="http://wso2.org/downloads/bps" target="_blank" style="color: rgb(0, 101, 204); ">http://wso2.org/downloads/bps</a></div><div>[2] <a href="http://wso2.org/projects/carbon" target="_blank" style="color: rgb(0, 101, 204); ">http://wso2.org/projects/<wbr>carbon</a></div><div>[3] <a href="https://wso2.org/jira/browse/CARBON" target="_blank" style="color: rgb(0, 101, 204); ">https://wso2.org/jira/browse/<wbr>CARBON</a></div><div>[4] <a href="http://wso2.org/" target="_blank" style="color: rgb(0, 101, 204); ">http://wso2.org</a></div><div>[5] <a href="https://wso2.org/wiki/display/carbon/p2-based-provisioning-support" target="_blank" style="color: rgb(0, 101, 204); ">https://wso2.org/wiki/display/<wbr>carbon/p2-based-provisioning-<wbr>support</a></div><div><br /></div></span>Warunahttp://www.blogger.com/profile/08581648110541505066noreply@blogger.com0tag:blogger.com,1999:blog-7153542985607416362.post-73766722505318859592009-11-14T00:07:00.007+05:302012-02-03T22:28:47.067+05:30jQuery DatePicker with icon<div style="text-align: justify;">It is always quite convenient to use an icon to pop-up the <a href="http://docs.jquery.com/UI/Datepicker">date picker</a> in onclick of an icon. It is a very easy task with <a href="http://jquery.com/">jQuery</a> date picker. Try following code:</div><pre style="border: 1px solid rgb(212, 212, 212); padding: 15px; background-color:#333333;font-family:courier new; white-space: pre-wrap;"><span style="color: rgb(0, 153, 0);"><<span style="font-weight: bold; color: rgb(0, 0, 0);">html</span>></span>
<span style="color: rgb(0, 153, 0);"><<span style="font-weight: bold; color: rgb(0, 0, 0);">head</span>></span>
<span style="color: rgb(0, 153, 0);"><<span style="font-weight: bold; color: rgb(0, 0, 0);">link</span> <span style="color: rgb(0, 0, 102);">type</span><span style="color: rgb(102, 204, 102);">=</span><span style="color: rgb(255, 0, 0);">"text/css"</span> <span style="color: rgb(0, 0, 102);">href</span><span style="color: rgb(102, 204, 102);">=</span><span style="color: rgb(255, 0, 0);">"http://jqueryui.com/latest/themes/base/ui.all.css"</span> <span style="color: rgb(0, 0, 102);">rel</span><span style="color: rgb(102, 204, 102);">=</span><span style="color: rgb(255, 0, 0);">"stylesheet"</span> <span style="color: rgb(102, 204, 102);">/</span>></span>
<span style="color: rgb(0, 153, 0);"><<span style="font-weight: bold; color: rgb(0, 0, 0);">script</span> <span style="color: rgb(0, 0, 102);">type</span><span style="color: rgb(102, 204, 102);">=</span><span style="color: rgb(255, 0, 0);">"text/javascript"</span> <span style="color: rgb(0, 0, 102);">src</span><span style="color: rgb(102, 204, 102);">=</span><span style="color: rgb(255, 0, 0);">"http://jqueryui.com/latest/jquery-1.3.2.js"</span>><<span style="color: rgb(102, 204, 102);">/</span><span style="font-weight: bold; color: rgb(0, 0, 0);">script</span>></span>
<span style="color: rgb(0, 153, 0);"><<span style="font-weight: bold; color: rgb(0, 0, 0);">script</span> <span style="color: rgb(0, 0, 102);">type</span><span style="color: rgb(102, 204, 102);">=</span><span style="color: rgb(255, 0, 0);">"text/javascript"</span> <span style="color: rgb(0, 0, 102);">src</span><span style="color: rgb(102, 204, 102);">=</span><span style="color: rgb(255, 0, 0);">"http://jqueryui.com/latest/ui/ui.core.js"</span>><<span style="color: rgb(102, 204, 102);">/</span><span style="font-weight: bold; color: rgb(0, 0, 0);">script</span>></span>
<span style="color: rgb(0, 153, 0);"><<span style="font-weight: bold; color: rgb(0, 0, 0);">script</span> <span style="color: rgb(0, 0, 102);">type</span><span style="color: rgb(102, 204, 102);">=</span><span style="color: rgb(255, 0, 0);">"text/javascript"</span> <span style="color: rgb(0, 0, 102);">src</span><span style="color: rgb(102, 204, 102);">=</span><span style="color: rgb(255, 0, 0);">"http://jqueryui.com/latest/ui/ui.datepicker.js"</span>><<span style="color: rgb(102, 204, 102);">/</span><span style="font-weight: bold; color: rgb(0, 0, 0);">script</span>></span>
<span style="color: rgb(0, 153, 0);"><<span style="font-weight: bold; color: rgb(0, 0, 0);">script</span> <span style="color: rgb(0, 0, 102);">type</span><span style="color: rgb(102, 204, 102);">=</span><span style="color: rgb(255, 0, 0);">"text/javascript"</span>></span>
$(document).ready(function(){
$("#datepicker").datepicker({showOn: 'button', buttonImage: '/images/search.gif', buttonImageOnly: true});
});
<span style="color: rgb(0, 153, 0);"><<span style="color: rgb(102, 204, 102);">/</span><span style="font-weight: bold; color: rgb(0, 0, 0);">script</span>></span>
<span style="color: rgb(0, 153, 0);"><<span style="color: rgb(102, 204, 102);">/</span><span style="font-weight: bold; color: rgb(0, 0, 0);">head</span>></span>
<span style="color: rgb(0, 153, 0);"><<span style="font-weight: bold; color: rgb(0, 0, 0);">body</span>></span>
<span style="color: rgb(0, 153, 0);"><<span style="font-weight: bold; color: rgb(0, 0, 0);">div</span> <span style="color: rgb(0, 0, 102);">class</span><span style="color: rgb(102, 204, 102);">=</span><span style="color: rgb(255, 0, 0);">"demo"</span>></span>
<span style="color: rgb(0, 153, 0);"><<span style="font-weight: bold; color: rgb(0, 0, 0);">p</span>></span>Date: <span style="color: rgb(0, 153, 0);"><<span style="font-weight: bold; color: rgb(0, 0, 0);">input</span> <span style="color: rgb(0, 0, 102);">type</span><span style="color: rgb(102, 204, 102);">=</span><span style="color: rgb(255, 0, 0);">"text"</span> <span style="color: rgb(0, 0, 102);">id</span><span style="color: rgb(102, 204, 102);">=</span><span style="color: rgb(255, 0, 0);">"datepicker"</span>><<span style="color: rgb(102, 204, 102);">/</span><span style="font-weight: bold; color: rgb(0, 0, 0);">p</span>></span>
<span style="color: rgb(0, 153, 0);"><<span style="color: rgb(102, 204, 102);">/</span><span style="font-weight: bold; color: rgb(0, 0, 0);">div</span>></span>
<span style="color: rgb(0, 153, 0);"><<span style="color: rgb(102, 204, 102);">/</span><span style="font-weight: bold; color: rgb(0, 0, 0);">body</span>></span>
<span style="color: rgb(0, 153, 0);"><<span style="color: rgb(102, 204, 102);">/</span><span style="font-weight: bold; color: rgb(0, 0, 0);">html</span>></span></pre><br />
<div style="text-align: justify;">But when you use the above code, the DatePicker will not be popped-up when clicked in the text box, but on the icon. Please be kind enough to make a comment if you happend to find the solution for that.</div><div style="text-align: justify;"><br />
</div><div style="text-align: justify;"><br />
</div><div style="text-align: justify;">Reference: <a href="http://jqueryui.com/demos/datepicker/#icon-trigger">http://jqueryui.com/demos/datepicker/#icon-trigger</a><br />
<a href="http://docs.jquery.com/UI/Datepicker">http://docs.jquery.com/UI/Datepicker</a><br />
</div>Warunahttp://www.blogger.com/profile/08581648110541505066noreply@blogger.com4tag:blogger.com,1999:blog-7153542985607416362.post-63009797952180995102009-11-13T23:34:00.005+05:302009-11-15T19:18:07.288+05:30Install pidgin-facebookchat 1.62 in Ubuntu<div style="text-align: justify;">I tried to install <a href="http://code.google.com/p/pidgin-facebookchat/">pidgin-facebookchat</a> <a href="http://pidgin-facebookchat.googlecode.com/files/pidgin-facebookchat-1.62.deb">1.62 </a>in Ubuntu 9.04. But it gave me an error mentioning that it requires a version of libjson-glib-1.0-0 >= 0.7.6</div><div style="text-align: justify;"><br /></div><div style="text-align: justify;">But you will not be able to install libjson-glib-1.0-0 version >= 0.7.6 using synaptic package manager or apt-get. Therefore, the first thing you have to do is uninstall the old pidgin-facebookchat plugin. Then install libjson-glib-1.0-0 version 0.7.6 from <a href="http://mirrors.kernel.org/ubuntu/pool/main/j/json-glib/">here</a></div>Warunahttp://www.blogger.com/profile/08581648110541505066noreply@blogger.com0tag:blogger.com,1999:blog-7153542985607416362.post-4351739934689124552009-09-16T16:14:00.025+05:302011-02-10T20:44:53.350+05:30Maven Surefire for Integration Tests in JUnit<div style="text-align: justify;">It is quite convenient to use <a href="http://maven.apache.org/plugins/maven-surefire-plugin/">maven-surefire-plugin</a> to run tests using <a href="http://www.blogger.com/maven.apache.org">Maven</a>. It enables generating reports in txt, XML as well as HTML. By default surefire tests are executed in the test phase of Maven <a href="http://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html">build lifecycle</a>. Therefore it enables to run unit tests, but not integration tests which should be executed after package phase.</div><div><div style="text-align: justify;">It is just a matter of configuring the surefire plugin, in order to run integration tests. The configuration given below can be used to change the phase of the surefire plugin.<br />
</div><br />
</div><pre style="border: 1px solid rgb(212, 212, 212); padding: 15px; background-color:#333333; font-family: courier new;"><plugin>
<groupid>org.apache.maven.plugins</groupid>
<artifactid>maven-surefire-plugin</artifactid>
<configuration>
<!-- skip unit tests in the test phase, since it is required to run integration tests -->
<skip>true</skip>
</configuration>
<executions>
<execution>
<id>surefire-it</id>
<phase>integration-test</phase>
<configuration>
<skip>false</skip>
<!--forkMode>pertest</forkMode-->
<argline>-enableassertions</argline>
<testfailureignore>true</testfailureignore>
</configuration>
<goals>
<goal>test</goal>
</goals>
</execution>
</executions>
<plugin>
</pre><div style="text-align: justify;">In addition, we need to add the junit dependancy to the pom's dependancy list. This should be added in a manner that it resolves only for the testing.<br />
</div><br />
<pre style="border: 1px solid rgb(212, 212, 212); padding: 15px; background-color:#333333; font-family: courier new;"><dependencies&
...
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
</dependencies>
</pre><div style="text-align: justify;">The version may change depending on your requirements.</div>Warunahttp://www.blogger.com/profile/08581648110541505066noreply@blogger.com0tag:blogger.com,1999:blog-7153542985607416362.post-37523044485232928902009-08-04T22:08:00.008+05:302011-02-10T20:42:38.019+05:30Installing Amarok in Ubuntu 9.04<div style="text-align: justify;">There are problems in Amarok 2.0 in Ubuntu :(<br />
Only work around is to use Amarok version 1.4<br />
</div>Therefore,<br />
<div style="border: 1px solid rgb(212, 212, 212); padding: 15px; background-color:#333333; font-family: courier new;">sudo apt-get install amarok<br />
</div><br />
does not work. Instead use<br />
<div style="border: 1px solid rgb(212, 212, 212); padding: 15px; background-color:#333333; font-family: courier new;">sudo apt-get install amarok14<br />
</div><br />
For further details refer - <a href="http://nomad.ca/blog/2009/apr/3/amarok-14-jaunty-ubuntu-904/">http://nomad.ca/blog/2009/apr/3/amarok-14-jaunty-ubuntu-904/</a>Warunahttp://www.blogger.com/profile/08581648110541505066noreply@blogger.com0