tag:blogger.com,1999:blog-86179732746019227732024-03-18T12:30:01.395-07:00Shelan's BlogUncompiled Source CodeAnonymoushttp://www.blogger.com/profile/11874278867021490476noreply@blogger.comBlogger38125tag:blogger.com,1999:blog-8617973274601922773.post-92053080681846576132016-02-05T01:25:00.001-08:002016-02-05T01:26:20.767-08:00Moved to a new Site.<div dir="ltr" style="text-align: left;" trbidi="on">
Hi all,<br />
<div>
<br /></div>
<div>
I have moved my blog to shelan.org. wanted to explore something new therefore, I changed my site to a static site with the help of <a href="https://gohugo.io/">hugo</a>.</div>
<div>
<br /></div>
<div>
New blog is at :</div>
<div>
<h2 style="text-align: center;">
<a href="http://shelan.org/">http://shelan.org</a></h2>
</div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
</div>
Anonymoushttp://www.blogger.com/profile/11874278867021490476noreply@blogger.com55tag:blogger.com,1999:blog-8617973274601922773.post-60130168402247620752015-04-09T10:39:00.000-07:002015-04-09T10:39:07.425-07:00How to make your presentation effective - 10/20/30 rule<div dir="ltr" style="text-align: left;" trbidi="on">
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjtBhhtWdPmwyIiuL8EMR_gI9EZJVvjTCN93nCcaU6Yo8ptClKFBQO9ZkTAZsyEAdZHeL6LutU2_g4jvi7H2kN5MO_fxjla6q_WUDrUvzqTllnRSUgulc6nkhsIhE09Gf1ZwkON1HK-mRk/s1600/102030--.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjtBhhtWdPmwyIiuL8EMR_gI9EZJVvjTCN93nCcaU6Yo8ptClKFBQO9ZkTAZsyEAdZHeL6LutU2_g4jvi7H2kN5MO_fxjla6q_WUDrUvzqTllnRSUgulc6nkhsIhE09Gf1ZwkON1HK-mRk/s1600/102030--.jpg" height="253" width="320" /></a></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
Have you ever presented yourself in front of an audience ? Then you may have use slides for your talk to make it better.</div>
<div>
<br /></div>
<div>
But did it really improve or destroy your talk?</div>
<div>
<br /></div>
<div>
Lets find out few facts that may be things you will not like to see if you are in an audience. Because that is the best place to give a verdict about a presentation.</div>
<div>
<br /></div>
<div>
Here are few common errors that i have observed in the presentations which you should avoid. </div>
<div>
<br /></div>
<div>
1) Too much text in the presentation</div>
<div>
<br /></div>
<div>
How often have we seen the entire wikipedia or at least close to that in slides? Slides are not meant to be read. Believe me if you let the audience read slides you loose attention. You loose some of the audience. Once they are out of your story it is not easy to grab them back. Maximum 10 words would be ideal. If you can find a single picture which gives the idea at once fantastic use that..</div>
<div>
<br /></div>
<div>
2) Too much slides in the presentation</div>
<div>
<br /></div>
<div>
Do not try to overload the presentation. Usually if have lots of slides then you are at the risk of going out of your time limits. Be careful not to give lots of ideas in your presentation. Usually i follow a rule of 3. Which means pitch 3 key ideas to the audience and make sure they remember that 3 even after the presentation.</div>
<div>
<br /></div>
<div>
3) Slide formatting.</div>
<div>
<br /></div>
<div>
If you have letters in the slides the text size and the text formatting matters a lot. Text should look great in the presentation screen and not only on your laptop/desktop screen. Use bigger fonts as possible and make sure everyone can see without any effort. Use a proper standard font which looks neat ,well spaced and easy on eyes.</div>
<div>
<br /></div>
<div>
Following video describes a better way to optimize your slides or a good framework. Using 10/20/30 rule.</div>
<div>
<br /></div>
<div>
1) 10 - slides</div>
<div>
2) 20 - minutes</div>
<div>
3) 30 - minimum font size.</div>
<div>
<br /></div>
<div>
Just watch this short video and you will understand it better.</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /><iframe width="320" height="266" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/liQLdRk0Ziw/0.jpg" src="http://www.youtube.com/embed/liQLdRk0Ziw?feature=player_embedded" frameborder="0" allowfullscreen></iframe></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<a href="http://guykawasaki.com/the_102030_rule/">http://guykawasaki.com/the_102030_rule/</a></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
</div>
Anonymoushttp://www.blogger.com/profile/11874278867021490476noreply@blogger.com7tag:blogger.com,1999:blog-8617973274601922773.post-2551171547947351372015-04-02T02:33:00.001-07:002015-04-02T02:34:08.623-07:00What you should know if you travel in Paris<div dir="ltr" style="text-align: left;" trbidi="on">
I had a dream to visit Paris , City of love with a breeze of Romance. It is a lovely city to explore lots of things. But if you are a traveller knowing few things i have experience will make your journey much nicer :).<br />
<div>
<br /></div>
<div>
<br /></div>
<div>
1) If you arrive in Beauvais airport and you need to find a way to go to Paris city center you can get Bus tickets from <a href="http://tickets.aeroportbeauvais.com/Information.aspx">here</a>. Because Ryan air which is most of the time cheaper will land only in this airport. Most of the people suggest other airports which is near to Paris but if you can spend one extra hour you can land in Beauvais and come to city center by bus. Because it (flight + bus) may be cheaper than some flight options.</div>
<div>
</div>
<div>
2) Paris city metro is little bit complicated but it covers almost all the areas. It may be cheaper to get Paris 10 tickets options which will give you 10 tickets at once at a discounted price.</div>
<div>
<br /></div>
<div>
http://parisbytrain.com/paris-metro-tickets/</div>
<div>
<br /></div>
<div>
3) Get a metro map and correctly identify zones and lanes. Because there are some connecting lanes which can be confusing a bit. And also make sure you are not going through an exit when changing lanes or metros, Because once you do you ticket become void and have to use another ticket. Some routes combine rail and metro and may be cumbersome to find them. So to make things easier i opted only to use metro even though the ticket is valid for both to make my journeys hassle free.</div>
<div>
<br /></div>
<div>
3) You should visit paris by night which is more beautiful than the day time. I am posting few pics below and you can decide :)</div>
<div>
<br /></div>
<div>
4) Louvre is an amazing place to visit. But it takes time to explore since it is massive. Plan to spend at least 5 to 6 hours of the day there. Make sure you check the timetable as they closes the Museum on time</div>
<div>
http://www.louvre.fr/en/hours-admission</div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://fbcdn-sphotos-f-a.akamaihd.net/hphotos-ak-xpf1/t31.0-8/10471568_10152724330039537_7112686376028971370_o.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://fbcdn-sphotos-f-a.akamaihd.net/hphotos-ak-xpf1/t31.0-8/10471568_10152724330039537_7112686376028971370_o.jpg" width="213" /></a></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjsGmCq0icpErWF5GhZ9IBArP2uodI2CgtOayLhu1vbG6RPULS5JnvuxohcnO5kEgLmTyLiu4q64vUuSbUvfm2Spv6YnpSNVTMBFhZYd88HVp1ADp0jmOWsPiyeOme99YgXdtFLVf6MKp8/s1600/DSC_0116.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjsGmCq0icpErWF5GhZ9IBArP2uodI2CgtOayLhu1vbG6RPULS5JnvuxohcnO5kEgLmTyLiu4q64vUuSbUvfm2Spv6YnpSNVTMBFhZYd88HVp1ADp0jmOWsPiyeOme99YgXdtFLVf6MKp8/s1600/DSC_0116.jpg" height="225" width="320" /></a></div>
<div>
<br /></div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://scontent-mad.xx.fbcdn.net/hphotos-xpa1/t31.0-8/11079520_10152786975379537_7621879822141826536_o.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://scontent-mad.xx.fbcdn.net/hphotos-xpa1/t31.0-8/11079520_10152786975379537_7621879822141826536_o.jpg" width="213" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://scontent-mad.xx.fbcdn.net/hphotos-xap1/t31.0-8/1401174_10152786977564537_807794027696012579_o.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="213" src="https://scontent-mad.xx.fbcdn.net/hphotos-xap1/t31.0-8/1401174_10152786977564537_807794027696012579_o.jpg" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://fbcdn-sphotos-a-a.akamaihd.net/hphotos-ak-xfp1/t31.0-8/11058435_10152786977544537_2254000224629004012_o.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="213" src="https://fbcdn-sphotos-a-a.akamaihd.net/hphotos-ak-xfp1/t31.0-8/11058435_10152786977544537_2254000224629004012_o.jpg" width="320" /></a></div>
<div>
<br /></div>
</div>
Anonymoushttp://www.blogger.com/profile/11874278867021490476noreply@blogger.com11tag:blogger.com,1999:blog-8617973274601922773.post-84100012256242631052015-03-30T12:13:00.001-07:002015-03-30T12:22:57.745-07:00How does the confidence look like?<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
<br />"John Carpenter (born c. 1968)<a href="http://en.wikipedia.org/wiki/John_Carpenter_(game_show_contestant)#cite_note-1">[1]</a> became the first millionaire on the <a href="http://en.wikipedia.org/wiki/United_States">United States</a> version of the <a href="http://en.wikipedia.org/wiki/Game_show">game show</a> <a href="http://en.wikipedia.org/wiki/Who_Wants_to_Be_a_Millionaire_(U.S._game_show)">Who Wants to Be a Millionaire</a> on November 19, 1999" [1].<br /><br /><br /> The most important part of the show is the last question where he attempted to claim the final prize. Watch the following video which is too good for being a contestant at his final question for 1 million dollars.<span style="background-color: white;"><span style="color: #252525; font-family: sans-serif;"><span style="font-size: 14px; line-height: 22px;"><br /></span></span></span>
<br />
<div class="separator" style="clear: both; text-align: center;">
<iframe allowfullscreen="" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/JSUmAGV2Uco/0.jpg" frameborder="0" height="266" src="http://www.youtube.com/embed/JSUmAGV2Uco?feature=player_embedded" width="320"></iframe></div>
<span style="background-color: white;"><span style="color: #252525; font-family: sans-serif;"><span style="font-size: 14px; line-height: 22px;"><br /></span></span></span>
<br />
[1] http://en.wikipedia.org/wiki/John_Carpenter_(game_show_contestant)</div>
Anonymoushttp://www.blogger.com/profile/11874278867021490476noreply@blogger.com6tag:blogger.com,1999:blog-8617973274601922773.post-82977866816637828962015-03-29T16:09:00.002-07:002015-03-29T16:09:53.981-07:00How to build Open JDK 9 on Mac OSX Yosemite<div dir="ltr" style="text-align: left;" trbidi="on">
I have been struggling lately to find good resources to compile and change OpenJDK. There is a problem with Mac OS Yosemite as it uses Clang as the compiler. But Open JDK 9 builds without a problem. I am adding useful resources here just incase someone finds it useful.<br />
<br />
How to build it<br />
<br />
1) hg clone http://hg.openjdk.java.net/jdk9/jdk9 jdk9<br />
<span style="background-color: #eeeeee;"><br /></span>
2) cd ./jdk9<div>
<br /></div>
<div>
3) bash ./get_source.sh (This will take sometime to download the sources so be patient. May be few hours sometimes)</div>
<div>
<br /></div>
<div>
4) when you try to issue command ./configure you will get the following issue.</div>
<div>
<br /></div>
<span style="font-family: Courier New, Courier, monospace;">configure: error: Could not find freetype! configure exiting with result code 1</span><div>
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div>
<span style="font-family: inherit;">5) You need install </span><a href="http://xquartz.macosforge.org/landing/">Xquartz</a> to eliminate the above issue.</div>
<div>
<br /></div>
<div>
6) type <span style="font-family: Courier New, Courier, monospace;">make all </span><span style="font-family: inherit;">to build the system. In the make file you can see different options to build the system.</span></div>
<div>
<span style="font-family: inherit;"><br /></span></div>
<div>
<span style="font-family: inherit;">7) Built image will be available usually at at </span><span style="font-family: Courier New, Courier, monospace;">build/macosx-x86_64-normal-server-release/jdk/</span></div>
<div>
<span style="font-family: inherit;"><br /></span></div>
<div>
<span style="font-family: inherit;">If you are trying on Mavericks i could find the </span>following<span style="font-family: inherit;"> resource which seems to be useful but did not verify whether it actually works 100%</span></div>
<div>
<span style="font-family: inherit;"><br /></span></div>
<div>
<a href="http://gvsmirnov.ru/blog/tech/2014/02/07/building-openjdk-8-on-osx-maverick.html">http://gvsmirnov.ru/blog/tech/2014/02/07/building-openjdk-8-on-osx-maverick.html</a></div>
<div>
<span style="font-family: inherit;"><br /></span></div>
</div>
Anonymoushttp://www.blogger.com/profile/11874278867021490476noreply@blogger.com61tag:blogger.com,1999:blog-8617973274601922773.post-77525858690479731672015-03-20T16:36:00.003-07:002015-03-21T02:33:48.700-07:00What should you do when your mobile phone is lost?<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://www.burptech.com/wp-content/uploads/2014/11/Phone-Lost-Realization-Meme.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://www.burptech.com/wp-content/uploads/2014/11/Phone-Lost-Realization-Meme.jpg" height="179" width="320" /></a></div>
<br />
<br />
<br />
Have you ever lost your mobile phone in your life? I have lost twice and yes it is not a great position to be. But these two incidents had two different implications. When i lost my first phone it was a nokia phone (N71 to be exact) which was quite a smart phone at that time around 2007. Yes i wanted to find the phone but could not the story was over and life went on. But... Second time i lost a Nexus 4 which is android.<br />
<br />
So what is the big deal?<br />
<br />
"Oh my gmail account"<br />
<br />
When i sensed for the first time that i have lost my mobile phone the first thing that came to my mind was "oh gosh all my accounts are there". But fortunately i have thought about this topic before i lost this phone so the next steps to be done was obvious to me. I think you might be interesting and you may have better suggestions as well. :)<br />
<br />
Three important things<br />
<br />
1) Android phone has your email account , If you use gmail as the primary account then you might use gmail for most of other online accounts as well. (Facebook , twitter, ebay so on...)<br />
<br />
So if anyone can get hold of it then you are doomed, Because anyone can use forgot my username or password reset features to take control of other account.<br />
<br />
2) Android phone has all your data :). In this what google does not back up. I think only your life which cannot be backed up restore later.<br />
<br />
3) If your phone is not pin protected or not protected with any other mechanism then you are at the highest level of vulnerability.<br />
<br />
<b>So what I should do?</b><br />
<br />
1) Change your email address password immediately. This is very crucial and the most important step<br />
<br />
You can check login history here. If there is a recent login just after you<br />
<a href="https://security.google.com/settings/security/activity?pli=1">https://security.google.com/settings/security/activity?pli=1</a><br />
<br />
2) You should visit <a href="https://www.google.com/android/devicemanager">https://www.google.com/android/devicemanager</a>. Using this you can erase your mobile phone data (or in other words do a remote wipe out of data).<br />
<br />
This will only happen if the device is online.<br />
<br />
If you need to locate the device you need to do it before the wipe out using the same above link.<br />
<br />
3) You may register a police complaint at last.<br />
<br />
Finding the phone is more important. But for someone who needs to protect data, other accounts and also privacy above mentioned steps becomes vital.<br />
<br />
If you have other suggestions please do share in comments :)<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br /></div>
Anonymoushttp://www.blogger.com/profile/11874278867021490476noreply@blogger.com12tag:blogger.com,1999:blog-8617973274601922773.post-48596637228851153482015-02-25T16:10:00.001-08:002015-02-25T16:28:08.055-08:00When should you give up ?<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
When should i give up something?<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://fbcdn-sphotos-g-a.akamaihd.net/hphotos-ak-xaf1/v/t1.0-9/293816_10150651215023702_1763017496_n.jpg?oh=0027195c5a812a0873d8873bee99e95b&oe=558E84E4&__gda__=1435207791_a870cbdbf5db88685073fdb00ab6040f" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="302" src="https://fbcdn-sphotos-g-a.akamaihd.net/hphotos-ak-xaf1/v/t1.0-9/293816_10150651215023702_1763017496_n.jpg?oh=0027195c5a812a0873d8873bee99e95b&oe=558E84E4&__gda__=1435207791_a870cbdbf5db88685073fdb00ab6040f" width="320" /></a></div>
<br />
<br />
So you should never give up something until you find something you really want. Yes... Until you find it.. :). We usually draw the give up line on what society believe, Not what we really believe. We often create boundaries on what society believes achievable. Until someone who really believe him or herself step in expand the limits.<br />
<br />
We never thought someone could fly until wright brothers flew, We never imagined a world speaking with someone thousand of miles away until Alexander Graham Bell invented the first practical telephone. We may be prisoners of the society unless we brave enough to reach outside.<br />
<br />
So When should we give up on something? We should give up on the day we win the game. It seems so simple, obvious but senseless.<br />
<br />
Watch the following video if you need to breath a life into what i mentioned.<br />
<br />
<b>"It's Not OVER Until You Win! Your Dream is Possible - Les Brown"</b><br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<iframe allowfullscreen="" class="YOUTUBE-iframe-video" data-thumbnail-src="https://ytimg.googleusercontent.com/vi/KlUMrzwmbyo/0.jpg" frameborder="0" height="266" src="http://www.youtube.com/embed/KlUMrzwmbyo?feature=player_embedded" width="320"></iframe></div>
<br /></div>
Anonymoushttp://www.blogger.com/profile/11874278867021490476noreply@blogger.com7tag:blogger.com,1999:blog-8617973274601922773.post-83501511223483951862015-02-17T13:55:00.000-08:002015-02-17T13:55:47.733-08:00How to use python BOTO framework to connect to Amazon EC2 <div dir="ltr" style="text-align: left;" trbidi="on">
<br />
Python Boto framework is an excellent tool to automate things with Amazon. You have almost everything to automate Amazon EC2 using this comprehensive library.<br />
<br />
A quick guide on how to use it in your project<br />
<br />
1) Configure your EC2 credentials to be used by your application using one of the followings.<br />
<br />
<ul class="simple" style="color: #3e4349; font-family: 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, Arial, sans-serif; font-size: 14px;">
<li style="line-height: 1.5em;">/etc/boto.cfg - for site-wide settings that all users on this machine will use</li>
<li style="line-height: 1.5em;">~/.boto - for user-specific settings</li>
<li style="line-height: 1.5em;">~/.aws/credentials - for credentials shared between SDKs </li>
</ul>
<br />
<a href="http://boto.readthedocs.org/en/latest/boto_config_tut.html">http://boto.readthedocs.org/en/latest/boto_config_tut.html</a><br />
<br />
2) Refer the API and choose what you need to do.<br />
<br />
<a href="http://boto.readthedocs.org/en/latest/#currently-supported-services">http://boto.readthedocs.org/en/latest/#currently-supported-services</a><br />
<br />
3) Sample code for a simple autoscaler written using Boto framework. You may reuse the code in your projects quickly. This autoscaler spawn new instances based on the spike pattern of the load.<br />
<br />
<a href="https://gist.github.com/shelan/b4a3f3ed0ccf9b4777e5">https://gist.github.com/shelan/b4a3f3ed0ccf9b4777e5</a><br />
<blockquote class="tr_bq">
</blockquote>
</div>
Anonymoushttp://www.blogger.com/profile/11874278867021490476noreply@blogger.com2tag:blogger.com,1999:blog-8617973274601922773.post-19259582870997868992015-02-03T14:02:00.001-08:002015-02-03T14:02:27.777-08:00Perfect Memory.. A Skill developed or a gifted super natural ?<div dir="ltr" style="text-align: left;" trbidi="on">
In the <a href="http://blog.shelan.org/2015/02/do-we-need-to-master-memory-in-googles.html" target="_blank">previous post</a> i discussed about the importance of developing a most important gift a human has inside his brain.... the memory.<br />
<br />
In this world we have externalized most of the important stuff to external digital world. In a way it has made things evolving faster. We are gathering much more knowledge than earlier. Wait.. Is it knowledge or knowledge pointers?<br />
<br />
The most suitable word is knowledge pointers using which we can retrieve knowledge easily. Imagine a world without internet or any other form of knowledge reference. How far can we survive.? We are loosing our capability of retaining information in our brains day by day and making the external storages cost effective at an similar pace.<br />
<br />
I am striving to regain that capability if i have lost and see how far i can succeed. Because following video will be one of your eye openers if you are one of the crazy people how would like to travel back to history and master one of the key aspects of a perfect Human being.<br />
<br />
This is a Ted talk which you will be fascinated to watch.<br />
<br />
"There are people who can quickly memorize lists of thousands of numbers, the order of all the cards in a deck (or ten!), and much more. Science writer Joshua Foer describes the technique — called the memory palace — and shows off its most remarkable feature: anyone can learn how to use it, including him"<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<iframe width="320" height="266" class="YOUTUBE-iframe-video" data-thumbnail-src="https://ytimg.googleusercontent.com/vi/U6PoUg7jXsA/0.jpg" src="http://www.youtube.com/embed/U6PoUg7jXsA?feature=player_embedded" frameborder="0" allowfullscreen></iframe></div>
<div>
<br /></div>
</div>
Anonymoushttp://www.blogger.com/profile/11874278867021490476noreply@blogger.com3tag:blogger.com,1999:blog-8617973274601922773.post-18429152078127004862015-02-02T13:06:00.002-08:002015-02-03T13:49:29.817-08:00Do we need to master memory in Google's Era ?<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
If you need any information you just type Google. Simple is n't it? So do we have to bother about memorizing anything this world? Is there a pay back for what you memorize? Can we rely on internet and only just learn how to search and can we be successful?<br />
<br />
I am sure most of the people have forgotten the importance of memorizing things in this information age. But the people who master memorizing things excel more often than people who do not. The simple reason is you can apply only what you know.<br />
<br />
As a Software Engineer and as a Masters student in computer science we often think for any problem we can just Google and find answers. But how fast? You may say within seconds you may have thousands of results before you.<br />
<br />
But... You need to type go to the first answer and if you are lucky you have a hit.. If not repeat until you find the correct answer. Imagine you have things in memory.... It will not take fractions of a second to retrieve. It will be simply comparing to a cache retrieval to a Hard disk access.<br />
<br />
People often think there are lots of information how can we memorize all these things? Yes it is true that in this digital world content is being produced super faster. But you have to be super smart to filter out what is important to you and memorize those things. We often underestimate the capability of retaining information in our brain and lazily forget techniques to master memory.<br />
<br />
If you have not read following <a href="http://www.amazon.com/Unlimited-Memory-Advanced-Learning-Strategies-ebook/dp/B00I3QS1XQ" target="_blank">book</a> is a great source of encouragement as well as a learning tool by a<br />
Memory Champ Kevin Horsley.<br />
<br />
Following video is one of his world record breaking videos [<span style="background-color: white; color: #333333; font-family: arial, sans-serif; font-size: 13px; line-height: 17px;">Successful World Record attempt in Pi matrix memorization]</span><br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<iframe allowfullscreen="" class="YOUTUBE-iframe-video" data-thumbnail-src="https://ytimg.googleusercontent.com/vi/lmbpCUrCWdI/0.jpg" frameborder="0" height="266" src="http://www.youtube.com/embed/lmbpCUrCWdI?feature=player_embedded" width="320"></iframe></div>
<br /></div>
Anonymoushttp://www.blogger.com/profile/11874278867021490476noreply@blogger.com1tag:blogger.com,1999:blog-8617973274601922773.post-35211662562247681062015-01-29T08:57:00.002-08:002015-02-03T13:49:04.398-08:00Learning Math and Science - Genius Mind<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
Do you think learning math and science is something alien from outer universe ? Do you struggle to solve complex mathematics or science problems? If you keep on adding questions there will be a lot to add on. Because even i have some of those problems in my mind.<br />
<br />
I excelled in college and was able to get into the top engineering University in Sri Lanka. At present i am reading for my Masters Degree in Distributed computing in Europe which involve Science and Mathematics heavily.<br />
<br />
If you read my post<a href="http://blog.shelan.org/2014/09/want-to-learn-anything-faster.html" target="_blank"> Want to Learn anythin faster</a> was a spark to ignite my habit of learning. Often i was comfortable at Theoretical subjects which needed rote memorization or comprehension. I wanted to understand the reasons so anyone who suffers the same can be benefit of it. Further there is a common misunderstanding that maths is hard and complex even before attempting to realize the beauty of it.<br />
<br />
As Human beings we are computing machines. We can do lot of maths in our head to survive in this world. To measure the distance by contrasting with other objects, Cross a road safely without being hit by a vehicle and the list is endless..So then why we cannot do it in the class room?<br />
<br />
I often find the way we approach math and science is wrong. There are several observations that i have made why we think maths is complex.<br />
<br />
1) If we relate a story to a problem and try to solve it will be easier than denoting it with x,y or any other mathematical notation. When we have a story we have solid mapping of the problems in our mind so understanding a problem and working towards a solution makes more realistic. Good mathematicians or scientists create problems more vivid in their minds. They live in it as real worlds. Symbols are just notation to express what they understood in common language.<br />
<br />
2) In classroom or tests we try to rote memorize concepts. Maths and science is super easy when you understand the fundamentals about it. You need to feel or live with the concepts to solve problems. learning an equation will not give you the ability to solve problems unless it is just a substitution.<br />
If you clearly observe an equation, it is a complete story. It is a story of how incidents of left side will come to a common agreement on your right hand side.<br />
<br />
3) Connect what you learn with what you know. Our brain is structured as a web. If you do not want to lose newly learnt concepts you have to link and bind with what you know to avoid loosing them. Isolated memory islands disappears soon. Try to relate to whatever the concept you have really understood and try to construct on top of that. If you find anything hard at once try it repeatably in different ways but always have a break. Our brain needs to digest and it takes time to assimilate.<br />
<br />
I am still researching and try to apply those concepts in practice to see how they work in real world. But it has been producing interesting results so far. I find myself learning more complex math or science problem than before as i changed the approach.<br />
<br />
I am currently reading this book which is an excellent resource for who wants to develop a "mind for numbers". Happy learning.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<img border="0" src="http://www.tarcherbooks.net/wp-content/uploads/2014/04/Mind-for-Numbers.jpg" height="200" width="142" /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://www.amazon.com/Mind-For-Numbers-Science-Flunked-ebook/dp/B00G3L19ZU" target="_blank">Mind</a> <a href="http://www.amazon.com/Mind-For-Numbers-Science-Flunked-ebook/dp/B00G3L19ZU" target="_blank">for Numbers</a></div>
<br />
<br />
<br /></div>
Anonymoushttp://www.blogger.com/profile/11874278867021490476noreply@blogger.com1tag:blogger.com,1999:blog-8617973274601922773.post-18033138180161606142014-11-11T08:27:00.002-08:002014-11-11T08:28:24.258-08:00Handy Mac OSX shortcuts to work with Terminal<div dir="ltr" style="text-align: left;" trbidi="on">
<!--?xml version="1.0" encoding="UTF-8" standalone="no"?-->
<br />
<span style="font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; font-size: 14px; line-height: 17.804800033569336px;">Clean up the line: You can use </span><kbd style="-webkit-box-shadow: rgba(0, 0, 0, 0.2) 0px 1px 0px, rgb(255, 255, 255) 0px 0px 0px 2px inset; background-color: #f7f7f7; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 1px solid rgb(204, 204, 204); box-shadow: rgba(0, 0, 0, 0.2) 0px 1px 0px, rgb(255, 255, 255) 0px 0px 0px 2px inset; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 11px; line-height: 1.4; padding: 0.1em 0.6em; text-shadow: rgb(255, 255, 255) 0px 1px 0px; vertical-align: baseline; white-space: nowrap;">Ctrl</kbd><span style="font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; font-size: 14px; line-height: 17.804800033569336px;">+</span><kbd style="-webkit-box-shadow: rgba(0, 0, 0, 0.2) 0px 1px 0px, rgb(255, 255, 255) 0px 0px 0px 2px inset; background-color: #f7f7f7; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 1px solid rgb(204, 204, 204); box-shadow: rgba(0, 0, 0, 0.2) 0px 1px 0px, rgb(255, 255, 255) 0px 0px 0px 2px inset; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 11px; line-height: 1.4; padding: 0.1em 0.6em; text-shadow: rgb(255, 255, 255) 0px 1px 0px; vertical-align: baseline; white-space: nowrap;">U</kbd><span style="font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; font-size: 14px; line-height: 17.804800033569336px;"> to clear up to the beginning.</span><br />
<span style="font-family: Arial, Liberation Sans, DejaVu Sans, sans-serif;"><span style="font-size: 14px; line-height: 17.804800033569336px;"><br /></span></span><span style="font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; font-size: 14px; line-height: 17.804800033569336px;">Clean up the line: </span><kbd style="-webkit-box-shadow: rgba(0, 0, 0, 0.2) 0px 1px 0px, rgb(255, 255, 255) 0px 0px 0px 2px inset; background-color: #f7f7f7; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 1px solid rgb(204, 204, 204); box-shadow: rgba(0, 0, 0, 0.2) 0px 1px 0px, rgb(255, 255, 255) 0px 0px 0px 2px inset; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 11px; line-height: 1.4; padding: 0.1em 0.6em; text-shadow: rgb(255, 255, 255) 0px 1px 0px; vertical-align: baseline; white-space: nowrap;">Ctrl</kbd><span style="font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; font-size: 14px; line-height: 17.804800033569336px;">+</span><kbd style="-webkit-box-shadow: rgba(0, 0, 0, 0.2) 0px 1px 0px, rgb(255, 255, 255) 0px 0px 0px 2px inset; background-color: #f7f7f7; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 1px solid rgb(204, 204, 204); box-shadow: rgba(0, 0, 0, 0.2) 0px 1px 0px, rgb(255, 255, 255) 0px 0px 0px 2px inset; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 11px; line-height: 1.4; padding: 0.1em 0.6em; text-shadow: rgb(255, 255, 255) 0px 1px 0px; vertical-align: baseline; white-space: nowrap;">A</kbd><span style="font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; font-size: 14px; line-height: 17.804800033569336px;"> </span><kbd style="-webkit-box-shadow: rgba(0, 0, 0, 0.2) 0px 1px 0px, rgb(255, 255, 255) 0px 0px 0px 2px inset; background-color: #f7f7f7; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 1px solid rgb(204, 204, 204); box-shadow: rgba(0, 0, 0, 0.2) 0px 1px 0px, rgb(255, 255, 255) 0px 0px 0px 2px inset; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 11px; line-height: 1.4; padding: 0.1em 0.6em; text-shadow: rgb(255, 255, 255) 0px 1px 0px; vertical-align: baseline; white-space: nowrap;">Ctrl</kbd><span style="font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; font-size: 14px; line-height: 17.804800033569336px;">+</span><kbd style="-webkit-box-shadow: rgba(0, 0, 0, 0.2) 0px 1px 0px, rgb(255, 255, 255) 0px 0px 0px 2px inset; background-color: #f7f7f7; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 1px solid rgb(204, 204, 204); box-shadow: rgba(0, 0, 0, 0.2) 0px 1px 0px, rgb(255, 255, 255) 0px 0px 0px 2px inset; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 11px; line-height: 1.4; padding: 0.1em 0.6em; text-shadow: rgb(255, 255, 255) 0px 1px 0px; vertical-align: baseline; white-space: nowrap;">K</kbd><span style="font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; font-size: 14px; line-height: 17.804800033569336px;"> to wipe the current line in the terminal </span><br />
<span style="font-family: Arial, Liberation Sans, DejaVu Sans, sans-serif;"><span style="font-size: 14px; line-height: 17.804800033569336px;"><br /></span></span><span style="font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; font-size: 14px; line-height: 17.804800033569336px;">Cancel the current command/line: </span><kbd style="-webkit-box-shadow: rgba(0, 0, 0, 0.2) 0px 1px 0px, rgb(255, 255, 255) 0px 0px 0px 2px inset; background-color: #f7f7f7; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 1px solid rgb(204, 204, 204); box-shadow: rgba(0, 0, 0, 0.2) 0px 1px 0px, rgb(255, 255, 255) 0px 0px 0px 2px inset; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 11px; line-height: 1.4; padding: 0.1em 0.6em; text-shadow: rgb(255, 255, 255) 0px 1px 0px; vertical-align: baseline; white-space: nowrap;">Ctrl</kbd><span style="font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; font-size: 14px; line-height: 17.804800033569336px;">+</span><kbd style="-webkit-box-shadow: rgba(0, 0, 0, 0.2) 0px 1px 0px, rgb(255, 255, 255) 0px 0px 0px 2px inset; background-color: #f7f7f7; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 1px solid rgb(204, 204, 204); box-shadow: rgba(0, 0, 0, 0.2) 0px 1px 0px, rgb(255, 255, 255) 0px 0px 0px 2px inset; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 11px; line-height: 1.4; padding: 0.1em 0.6em; text-shadow: rgb(255, 255, 255) 0px 1px 0px; vertical-align: baseline; white-space: nowrap;">C</kbd><span style="font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; font-size: 14px; line-height: 17.804800033569336px;">.</span><br />
<span style="font-family: Arial, Liberation Sans, DejaVu Sans, sans-serif;"><span style="font-size: 14px; line-height: 17.804800033569336px;"><br /></span></span><span style="font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; font-size: 14px; line-height: 17.804800033569336px;">Recall the deleted command: </span><kbd style="-webkit-box-shadow: rgba(0, 0, 0, 0.2) 0px 1px 0px, rgb(255, 255, 255) 0px 0px 0px 2px inset; background-color: #f7f7f7; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 1px solid rgb(204, 204, 204); box-shadow: rgba(0, 0, 0, 0.2) 0px 1px 0px, rgb(255, 255, 255) 0px 0px 0px 2px inset; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 11px; line-height: 1.4; padding: 0.1em 0.6em; text-shadow: rgb(255, 255, 255) 0px 1px 0px; vertical-align: baseline; white-space: nowrap;">Ctrl</kbd><span style="font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; font-size: 14px; line-height: 17.804800033569336px;">+</span><kbd style="-webkit-box-shadow: rgba(0, 0, 0, 0.2) 0px 1px 0px, rgb(255, 255, 255) 0px 0px 0px 2px inset; background-color: #f7f7f7; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 1px solid rgb(204, 204, 204); box-shadow: rgba(0, 0, 0, 0.2) 0px 1px 0px, rgb(255, 255, 255) 0px 0px 0px 2px inset; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 11px; line-height: 1.4; padding: 0.1em 0.6em; text-shadow: rgb(255, 255, 255) 0px 1px 0px; vertical-align: baseline; white-space: nowrap;">Y</kbd><br />
<span style="font-family: Arial, Liberation Sans, DejaVu Sans, sans-serif;"><span style="font-size: 14px; line-height: 17.804800033569336px;"><br /></span></span><span style="font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; font-size: 14px; line-height: 17.804800033569336px;">Go at the beginning of the line: </span><kbd style="-webkit-box-shadow: rgba(0, 0, 0, 0.2) 0px 1px 0px, rgb(255, 255, 255) 0px 0px 0px 2px inset; background-color: #f7f7f7; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 1px solid rgb(204, 204, 204); box-shadow: rgba(0, 0, 0, 0.2) 0px 1px 0px, rgb(255, 255, 255) 0px 0px 0px 2px inset; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 11px; line-height: 1.4; padding: 0.1em 0.6em; text-shadow: rgb(255, 255, 255) 0px 1px 0px; vertical-align: baseline; white-space: nowrap;">Ctrl</kbd><span style="font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; font-size: 14px; line-height: 17.804800033569336px;">+</span><kbd style="-webkit-box-shadow: rgba(0, 0, 0, 0.2) 0px 1px 0px, rgb(255, 255, 255) 0px 0px 0px 2px inset; background-color: #f7f7f7; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 1px solid rgb(204, 204, 204); box-shadow: rgba(0, 0, 0, 0.2) 0px 1px 0px, rgb(255, 255, 255) 0px 0px 0px 2px inset; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 11px; line-height: 1.4; padding: 0.1em 0.6em; text-shadow: rgb(255, 255, 255) 0px 1px 0px; vertical-align: baseline; white-space: nowrap;">A</kbd><br />
<span style="font-family: Arial, Liberation Sans, DejaVu Sans, sans-serif;"><span style="font-size: 14px; line-height: 17.804800033569336px;"><br /></span></span><span style="font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; font-size: 14px; line-height: 17.804800033569336px;">Go at the end of the line: </span><kbd style="-webkit-box-shadow: rgba(0, 0, 0, 0.2) 0px 1px 0px, rgb(255, 255, 255) 0px 0px 0px 2px inset; background-color: #f7f7f7; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 1px solid rgb(204, 204, 204); box-shadow: rgba(0, 0, 0, 0.2) 0px 1px 0px, rgb(255, 255, 255) 0px 0px 0px 2px inset; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 11px; line-height: 1.4; padding: 0.1em 0.6em; text-shadow: rgb(255, 255, 255) 0px 1px 0px; vertical-align: baseline; white-space: nowrap;">Ctrl</kbd><span style="font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; font-size: 14px; line-height: 17.804800033569336px;">+</span><kbd style="-webkit-box-shadow: rgba(0, 0, 0, 0.2) 0px 1px 0px, rgb(255, 255, 255) 0px 0px 0px 2px inset; background-color: #f7f7f7; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 1px solid rgb(204, 204, 204); box-shadow: rgba(0, 0, 0, 0.2) 0px 1px 0px, rgb(255, 255, 255) 0px 0px 0px 2px inset; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 11px; line-height: 1.4; padding: 0.1em 0.6em; text-shadow: rgb(255, 255, 255) 0px 1px 0px; vertical-align: baseline; white-space: nowrap;">E</kbd><br />
<span style="font-family: Arial, Liberation Sans, DejaVu Sans, sans-serif;"><span style="font-size: 14px; line-height: 17.804800033569336px;"><br /></span></span><span style="font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; font-size: 14px; line-height: 17.804800033569336px;">Remove the forward words for example, if you are middle of the command: </span><kbd style="-webkit-box-shadow: rgba(0, 0, 0, 0.2) 0px 1px 0px, rgb(255, 255, 255) 0px 0px 0px 2px inset; background-color: #f7f7f7; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 1px solid rgb(204, 204, 204); box-shadow: rgba(0, 0, 0, 0.2) 0px 1px 0px, rgb(255, 255, 255) 0px 0px 0px 2px inset; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 11px; line-height: 1.4; padding: 0.1em 0.6em; text-shadow: rgb(255, 255, 255) 0px 1px 0px; vertical-align: baseline; white-space: nowrap;">Ctrl</kbd><span style="font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; font-size: 14px; line-height: 17.804800033569336px;">+</span><kbd style="-webkit-box-shadow: rgba(0, 0, 0, 0.2) 0px 1px 0px, rgb(255, 255, 255) 0px 0px 0px 2px inset; background-color: #f7f7f7; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 1px solid rgb(204, 204, 204); box-shadow: rgba(0, 0, 0, 0.2) 0px 1px 0px, rgb(255, 255, 255) 0px 0px 0px 2px inset; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 11px; line-height: 1.4; padding: 0.1em 0.6em; text-shadow: rgb(255, 255, 255) 0px 1px 0px; vertical-align: baseline; white-space: nowrap;">K</kbd><br />
<span style="font-family: Arial, Liberation Sans, DejaVu Sans, sans-serif;"><span style="font-size: 14px; line-height: 17.804800033569336px;"><br /></span></span><span style="font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; font-size: 14px; line-height: 17.804800033569336px;">Remove characters on the left, until the beginning of the word: </span><kbd style="-webkit-box-shadow: rgba(0, 0, 0, 0.2) 0px 1px 0px, rgb(255, 255, 255) 0px 0px 0px 2px inset; background-color: #f7f7f7; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 1px solid rgb(204, 204, 204); box-shadow: rgba(0, 0, 0, 0.2) 0px 1px 0px, rgb(255, 255, 255) 0px 0px 0px 2px inset; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 11px; line-height: 1.4; padding: 0.1em 0.6em; text-shadow: rgb(255, 255, 255) 0px 1px 0px; vertical-align: baseline; white-space: nowrap;">Ctrl</kbd><span style="font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; font-size: 14px; line-height: 17.804800033569336px;">+</span><kbd style="-webkit-box-shadow: rgba(0, 0, 0, 0.2) 0px 1px 0px, rgb(255, 255, 255) 0px 0px 0px 2px inset; background-color: #f7f7f7; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 1px solid rgb(204, 204, 204); box-shadow: rgba(0, 0, 0, 0.2) 0px 1px 0px, rgb(255, 255, 255) 0px 0px 0px 2px inset; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 11px; line-height: 1.4; padding: 0.1em 0.6em; text-shadow: rgb(255, 255, 255) 0px 1px 0px; vertical-align: baseline; white-space: nowrap;">W</kbd><br />
<span style="font-family: Arial, Liberation Sans, DejaVu Sans, sans-serif;"><span style="font-size: 14px; line-height: 17.804800033569336px;"><br /></span></span><span style="font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; font-size: 14px; line-height: 17.804800033569336px;">To clear your entire command prompt: </span><kbd style="-webkit-box-shadow: rgba(0, 0, 0, 0.2) 0px 1px 0px, rgb(255, 255, 255) 0px 0px 0px 2px inset; background-color: #f7f7f7; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 1px solid rgb(204, 204, 204); box-shadow: rgba(0, 0, 0, 0.2) 0px 1px 0px, rgb(255, 255, 255) 0px 0px 0px 2px inset; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 11px; line-height: 1.4; padding: 0.1em 0.6em; text-shadow: rgb(255, 255, 255) 0px 1px 0px; vertical-align: baseline; white-space: nowrap;">Ctrl</kbd><span style="font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; font-size: 14px; line-height: 17.804800033569336px;"> + </span><kbd style="-webkit-box-shadow: rgba(0, 0, 0, 0.2) 0px 1px 0px, rgb(255, 255, 255) 0px 0px 0px 2px inset; background-color: #f7f7f7; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 1px solid rgb(204, 204, 204); box-shadow: rgba(0, 0, 0, 0.2) 0px 1px 0px, rgb(255, 255, 255) 0px 0px 0px 2px inset; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 11px; line-height: 1.4; padding: 0.1em 0.6em; text-shadow: rgb(255, 255, 255) 0px 1px 0px; vertical-align: baseline; white-space: nowrap;">L</kbd><br />
<span style="font-family: Arial, Liberation Sans, DejaVu Sans, sans-serif;"><span style="font-size: 14px; line-height: 17.804800033569336px;"><br /></span></span><span style="font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; font-size: 14px; line-height: 17.804800033569336px;">Toggle between the start of line and current cursor position: </span><kbd style="-webkit-box-shadow: rgba(0, 0, 0, 0.2) 0px 1px 0px, rgb(255, 255, 255) 0px 0px 0px 2px inset; background-color: #f7f7f7; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 1px solid rgb(204, 204, 204); box-shadow: rgba(0, 0, 0, 0.2) 0px 1px 0px, rgb(255, 255, 255) 0px 0px 0px 2px inset; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 11px; line-height: 1.4; padding: 0.1em 0.6em; text-shadow: rgb(255, 255, 255) 0px 1px 0px; vertical-align: baseline; white-space: nowrap;">Ctrl</kbd><span style="font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; font-size: 14px; line-height: 17.804800033569336px;"> + </span><kbd style="-webkit-box-shadow: rgba(0, 0, 0, 0.2) 0px 1px 0px, rgb(255, 255, 255) 0px 0px 0px 2px inset; background-color: #f7f7f7; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 1px solid rgb(204, 204, 204); box-shadow: rgba(0, 0, 0, 0.2) 0px 1px 0px, rgb(255, 255, 255) 0px 0px 0px 2px inset; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 11px; line-height: 1.4; padding: 0.1em 0.6em; text-shadow: rgb(255, 255, 255) 0px 1px 0px; vertical-align: baseline; white-space: nowrap;">XX</kbd><br />
<br />
<div>
Source : http://stackoverflow.com/questions/9679776/how-do-i-clear-delete-the-current-line-in-terminal</div>
</div>
Anonymoushttp://www.blogger.com/profile/11874278867021490476noreply@blogger.com4tag:blogger.com,1999:blog-8617973274601922773.post-33895803342181340192014-11-09T14:50:00.001-08:002014-11-09T14:50:28.790-08:00How to Remote Debug Standalone Hadoop <div dir="ltr" style="text-align: left;" trbidi="on">
<br />
When you run your map reduce applications you may have hiccups here and there and may need to have a look inside. If you need to remote debug rather going through logs and figuring out what went wrong following is the procedure.<br />
<br />
I am using Intellij Idea as the IDE but for other IDE's process is similar.<br />
<br />
1) In Intellij Idea go to Run > Edit Configuration and then click on "+" . And then add <b>Remote</b> for "Remote Debugging"<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjNBA7dDwOXnXDa0-Dli8vns69jSTXgj5fcUUL6aMcBRHC1gzkHLlrUeTqA_1bK1wDWqbxLWSm7uXKQ8Y5fDKUO_LcDQD-NHATm5R-D3O4VZAaZmPxWDdIIpXF34cZyo1dXvR8esCfHhwU/s1600/Screen+Shot+2014-11-09+at+10.34.01+PM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjNBA7dDwOXnXDa0-Dli8vns69jSTXgj5fcUUL6aMcBRHC1gzkHLlrUeTqA_1bK1wDWqbxLWSm7uXKQ8Y5fDKUO_LcDQD-NHATm5R-D3O4VZAaZmPxWDdIIpXF34cZyo1dXvR8esCfHhwU/s1600/Screen+Shot+2014-11-09+at+10.34.01+PM.png" height="400" width="250" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
2) You will have following window after clicking on Remote. You can change the port you are using for remote debugging in this panel.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh9XQkf-8tdeS3uwQdkRX33QnkgEXN6kwclrdlWNufpbdMwC_UshJvi_2aOtFuppF8X-pByuMsva4YAUeLTA1yhtuEIJV3cPtsnVJQMMTfR_RCsKu1yERfspCEi4HKXyHjvpq3Kqe4ERvo/s1600/Screen+Shot+2014-11-09+at+10.34.13+PM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh9XQkf-8tdeS3uwQdkRX33QnkgEXN6kwclrdlWNufpbdMwC_UshJvi_2aOtFuppF8X-pByuMsva4YAUeLTA1yhtuEIJV3cPtsnVJQMMTfR_RCsKu1yERfspCEi4HKXyHjvpq3Kqe4ERvo/s1600/Screen+Shot+2014-11-09+at+10.34.13+PM.png" height="320" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
3) Open your Hadoop Root folder and navigate to etc/hadoop-env.sh in your editor. At the bottom of the file add the following line. (Make sure to have the port you given for IDE configuration as the address)</div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div style="color: #d12f1b; font-family: Menlo; font-size: 11px;">
<span style="color: #bb2ca2; font-variant-ligatures: no-common-ligatures;">export</span><span style="color: black; font-variant-ligatures: no-common-ligatures;"> HADOOP_OPTS=</span>"-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=5005"</div>
<div style="color: #d12f1b; font-family: Menlo; font-size: 11px;">
<br /></div>
<br />Now you can start hadoop in standalone mode and it will wait until you attach your IDE to debug process to resume.<br /><div class="separator" style="clear: both; text-align: left;">
<br /></div>
<br /></div>
Anonymoushttp://www.blogger.com/profile/11874278867021490476noreply@blogger.com17tag:blogger.com,1999:blog-8617973274601922773.post-35107722172912861782014-10-25T02:35:00.000-07:002014-11-02T22:47:15.369-08:00How to correct "ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)" on Mac OS X<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
I tried to install mysql using home-brew. Everything was successful But could not connect to the server. Obviously server have not started.<br />
<br />
<div style="background-color: black; color: whitesmoke; font-family: Monaco; font-size: 12px;">
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)</div>
<div>
<br /></div>
<div>
Sigh..</div>
<div>
<br /></div>
<div>
Following command rescued me..</div>
<div>
<br /></div>
<div>
<pre class="lang-sql prettyprint prettyprinted" style="background-color: #eeeeee; border: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; font-size: 14px; line-height: 17.804800033569336px; margin-bottom: 10px; max-height: 600px; overflow: auto; padding: 5px; vertical-align: baseline; width: auto; word-wrap: normal;"><code style="border: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; margin: 0px; padding: 0px; vertical-align: baseline; white-space: inherit;"><span class="pln" style="background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">mysqld stop
mysql</span><span class="pun" style="background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">.</span><span class="pln" style="background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">server start</span><span class="kwd" style="background-color: transparent; border: 0px; color: darkblue; margin: 0px; padding: 0px; vertical-align: baseline;"></span></code></pre>
I found it in this stack overflow answer.</div>
<div>
<a href="http://stackoverflow.com/questions/15016376/cant-connect-to-local-mysql-server-through-socket-homebrew" target="_blank">http://stackoverflow.com/questions/15016376/cant-connect-to-local-mysql-server-through-socket-homebrew</a></div>
</div>
Anonymoushttp://www.blogger.com/profile/11874278867021490476noreply@blogger.com307tag:blogger.com,1999:blog-8617973274601922773.post-70796164487007648572014-10-11T13:52:00.003-07:002014-10-13T06:33:04.731-07:00How to install Hadoop Standalone / Pseudo Distributed mode 2.X.X on Mac with OS X Mavericks<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh7LAsqL4m4hdhLWq7DaiW6XsK77O60fVfca3usRxLLpfSLp282abNVWNPyZtGsgQvgk0w-j9Y3ypfpMCX_y6kN_Lvj5e1fOw51UDl8NcSeLJxic9v_wdRqDmypXzUiJFam6lhYj5NSh7I5/s400/img-carousel-2.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img alt="" border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh7LAsqL4m4hdhLWq7DaiW6XsK77O60fVfca3usRxLLpfSLp282abNVWNPyZtGsgQvgk0w-j9Y3ypfpMCX_y6kN_Lvj5e1fOw51UDl8NcSeLJxic9v_wdRqDmypXzUiJFam6lhYj5NSh7I5/s400/img-carousel-2.jpg" height="127" title="Hadoop" width="320" /></a></div>
<span style="font-size: xx-small;"> Image source: http://www.javacodegeeks.com/2011/05/hadoop-soft-introduction.html</span><br />
<br />
I was searching for a complete tutorial on installing Hadoop on Mac and play around with it. There are resources on installing Hadoop with "HomeBrew" which is the missing package manager in Mac ;). But i do not want to offload all the configuration burden to it as i need to learn this from top to bottom. I played with some and here are the configuration steps i followed.<br />
<br />
1) You need to download and extract Hadoop Binary. I used Hadoop 2.5.1 which is the latest at the moment.<br />
<br />
<a href="http://www.apache.org/dyn/closer.cgi/hadoop/common/">http://www.apache.org/dyn/closer.cgi/hadoop/common/</a><br />
<br />
2) Extract the binary and lets called the location as HADOOP_HOME<br />
<br />
eg: /Users/user1/software/hadoop-2.5.1<br />
<br />
3) Add HADOOP_HOME and JAVA_HOME as path variables to your system. You can add them to<br />
<div>
bashrc or bash_profile.</div>
<div>
<br /></div>
<div>
You can add them by issuing following commands.</div>
<div>
<br /></div>
<div>
<pre><code>
$vim ~/.bash_profile</code></pre>
</div>
<div>
<br /></div>
<div>
Add following entries and change paths according to your machine's configurations. </div>
<br />
<pre><code>
export JAVA_HOME=$(/usr/libexec/java_home)
export HADOOP_HOME=/Users/user1/software/hadoop-2.5.1
export PATH=$PATH:$HADOOP_HOME<div>
</div>
</code></pre>
<br />
<div>
and then reload the configurations.</div>
<div>
<br /></div>
<div>
<pre><code>
$source ~/.bash_profile
<div>
</div>
</code></pre>
<pre><code>(Follow these steps if you need to run in Pseudo Distributed mode. If you do continue you will have to add input files to the HDFS and then download output files from the HDFS too.)</code></pre>
</div>
<br />
<div>
4) Navigate to HADOOP_HOME and change following files as below.</div>
<div>
<br /></div>
<div>
<div class="section" style="font-family: Verdana, Helvetica, Arial, sans-serif; font-size: 13px; padding: 4px;">
<div style="font-size: 12px; line-height: 1.3em;">
etc/hadoop/core-site.xml:</div>
<div class="source" style="border: 1px solid rgb(153, 153, 153); margin: 1em 7px; overflow: auto; padding: 12px;">
<pre style="padding: 0px;"><configuration>
<property>
<name>fs.defaultFS</name>
<value>hdfs://localhost:9000</value>
</property>
</configuration></pre>
</div>
<div style="font-size: 12px; line-height: 1.3em;">
etc/hadoop/hdfs-site.xml:</div>
<div class="source" style="border: 1px solid rgb(153, 153, 153); margin: 1em 7px; overflow: auto; padding: 12px;">
<pre style="padding: 0px;"><configuration>
<property>
<name>dfs.replication</name>
<value>1</value>
</property>
</configuration></pre>
</div>
</div>
<br />
5) Setup passphraseless ssh<br />
<br />
Now check that you can ssh to the localhost without a passphrase:<br />
$ ssh localhost<br />
<br />
If you cannot ssh to localhost without a passphrase, execute the following commands:<br />
<pre><code>
$ ssh-keygen -t dsa -P '' -f ~/.ssh/id_dsa
$ cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys
</code></pre>
<pre><code>
</code></pre>
<pre><code>(You may need to enable remote-login in system preferences --> sharing if you have not enabled it later to login through ssh.)</code></pre>
6) Starting the Hadoop in Standalone mode.
</div>
<br />
Navigate to $HADOOP_HOME<br />
<div>
<br /></div>
<div>
Format the filesystem:</div>
<div>
<pre><code>
$ bin/hdfs namenode -format
</code></pre>
</div>
<br />
<br />
Start NameNode daemon and DataNode daemon:<br />
<pre><code>
$ sbin/start-dfs.sh
</code></pre>
<br />
<br />
<br />
The hadoop daemon log output is written to the $HADOOP_LOG_DIR directory (defaults to $HADOOP_HOME/logs).<br />
Browse the web interface for the NameNode; by default it is available at:
<br />
<div>
<br />
NameNode - <a href="http://localhost:50070/" target="_blank">http://localhost:50070/</a></div>
<div>
<br /></div>
<div>
So good luck with all your map reduce jobs. :)</div>
<div>
<br /></div>
<div>
References :<span id="docs-internal-guid-b7a54bfc-00f6-64ae-430d-6b42142d9b51"></span><br />
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span id="docs-internal-guid-b7a54bfc-00f6-64ae-430d-6b42142d9b51"><span style="color: #1155cc; font-family: Arial; font-size: 15px; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;"><a href="http://hadoop.apache.org/docs/r2.5.1/hadoop-project-dist/hadoop-common/SingleCluster.html#Standalone_Operation" style="text-decoration: none;">http://hadoop.apache.org/docs/r2.5.1/hadoop-project-dist/hadoop-common/SingleCluster.html#Standalone_Operation</a></span></span></div>
<span id="docs-internal-guid-b7a54bfc-00f6-64ae-430d-6b42142d9b51">
</span>
<br />
<div>
<span id="docs-internal-guid-b7a54bfc-00f6-64ae-430d-6b42142d9b51"><br /></span></div>
<span id="docs-internal-guid-b7a54bfc-00f6-64ae-430d-6b42142d9b51">
</span>
<br />
<br /></div>
</div>
Anonymoushttp://www.blogger.com/profile/11874278867021490476noreply@blogger.com44tag:blogger.com,1999:blog-8617973274601922773.post-15875282289667410052014-10-03T11:32:00.000-07:002014-10-03T11:32:45.048-07:00Castle of the Moors(Castelo dos Mouros) - Hill top Medieval Castle<div dir="ltr" style="text-align: left;" trbidi="on">
This is another weekend trip as last one. It seems there are plenty of places to be covered in Portugal which is an amazing country with lots of beautiful people and places.<br />
<br />
<a href="http://blog.shelan.org/2014/09/cabo-da-roca-western-most-cape-of.html">http://blog.shelan.org/2014/09/cabo-da-roca-western-most-cape-of.html</a><br />
<br />
So all the EMDC students got together for a weekend out. We decided to pay a visit to Sintra without knowing what exactly we would we be going to explore or it would offer. We knew that it had lots of attractions and that was all what we needed to know.<br />
<br />
You can reach there using viva gem card which is valid for Metro and train (My previous blog post explains about it) . We travelled from Alameda to Rossio Metro station and then changed into the train to Sintra. It took around 1 hour to reach there and it was a different city with mountains all around and more green sights. You can see lots of tourists visiting there too.<br />
<br />
We thought of going to the Castle of the Moors and then visit other places after that. But we had marginal time even to return. That place was amazing and a worth place to kill your time in the weekend. It took around 2 hours or more to go to the top. We hiked on our own and if you are bit lazy<br />
you can get a Hop on Hop off bus. To be frank we thought that option better too had we known that earlier :). But you will burn some calories (a lot i would say while enjoying the nature) so it is okay if you are settled for it.<br />
<br />
There are two castles on the top and one of them was closed (It closes around 4.30 pm after summer) so we had to choose Castle of the Moors which closes at 8.00pm. You need to pay Euro 7.50 per person for the entry ticket. This place was amazing and well maintained. Below pics will proof that to you for sure. You can enjoy a breath taking view from top of the Castle. And this castle was a Medieval Castle which built couple of centuries ago during 8th/9th Century. So it was pretty old one which poses a great historical value too.<br />
<br />
On our way back six of us got into two groups due to bad timing and three of us almost lost on the way. Luckily we had Google maps and found a way to Sintra Train station. Luckily<br />
That path was much shorter but steeper than the path we climbed. Ask Google the path he will tell you obviously :).<br />
<br />
Enjoy my pics.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://scontent-a-mad.xx.fbcdn.net/hphotos-xaf1/t31.0-8/10700302_10152403218784537_3261613954335319454_o.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="266" src="https://scontent-a-mad.xx.fbcdn.net/hphotos-xaf1/t31.0-8/10700302_10152403218784537_3261613954335319454_o.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://fbcdn-sphotos-g-a.akamaihd.net/hphotos-ak-xpa1/t31.0-8/10317593_10152403218509537_6260325335114143830_o.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="265" src="https://fbcdn-sphotos-g-a.akamaihd.net/hphotos-ak-xpa1/t31.0-8/10317593_10152403218509537_6260325335114143830_o.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://scontent-a-mad.xx.fbcdn.net/hphotos-xfa1/t31.0-8/10700232_10152403214894537_329373633539025940_o.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="265" src="https://scontent-a-mad.xx.fbcdn.net/hphotos-xfa1/t31.0-8/10700232_10152403214894537_329373633539025940_o.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://fbcdn-sphotos-f-a.akamaihd.net/hphotos-ak-xap1/t31.0-8/1979159_10152403218194537_7746828812168645944_o.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="266" src="https://fbcdn-sphotos-f-a.akamaihd.net/hphotos-ak-xap1/t31.0-8/1979159_10152403218194537_7746828812168645944_o.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://fbcdn-sphotos-e-a.akamaihd.net/hphotos-ak-xap1/t31.0-8/10648404_10152403214809537_1610000690052943661_o.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="266" src="https://fbcdn-sphotos-e-a.akamaihd.net/hphotos-ak-xap1/t31.0-8/10648404_10152403214809537_1610000690052943661_o.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<br />
<br /></div>
Anonymoushttp://www.blogger.com/profile/11874278867021490476noreply@blogger.com2tag:blogger.com,1999:blog-8617973274601922773.post-37807096745280047212014-09-19T17:27:00.001-07:002014-09-19T18:10:42.974-07:00Want to learn anything faster ?<div dir="ltr" style="text-align: left;" trbidi="on">
We are in a world with lot of learning opportunities. But how many stuff do we really learn ? What holds us back in learning new things faster?<br />
<br />
Learning how to learn is the greatest learning of all. I happened to read interesting reading from this blog [1] which had an amazing link mentioning about a guy who learned MIT 4 year course within 1 year.<br />
<br />
It starts with<br />
<br />
"My friend <a href="http://www.scotthyoung.com/blog/">Scott Young</a> recently finished an astounding feat: he completed all 33 courses in <a href="http://www.eecs.mit.edu/academics-admissions/undergraduate-programs/course-6-3-computer-science-and-engineering">MIT’s fabled computer science curriculum</a>, from Linear Algebra to Theory of Computation, in less than one year. More importantly, he did it all on his own, watching the lectures online and evaluating himself using the actual exams. (<a href="http://www.scotthyoung.com/blog/mit-challenge/">See Scott’s FAQ page for the details of how he ran this challenge.</a>)"<br />
<br />
<a href="http://calnewport.com/blog/2012/10/26/mastering-linear-algebra-in-10-days-astounding-experiments-in-ultra-learning/">http://calnewport.com/blog/2012/10/26/mastering-linear-algebra-in-10-days-astounding-experiments-in-ultra-learning/</a><br />
<br />
When i was going little bit deeper in the subject i found another useful resource in one of the ted talks about the time it takes to learn a new thing. Amazingly it is only twenty hours :). Yes it is less than a day to acquire a new skill.<br />
<br />
But...<br />
<br />
You need to do it in four steps. Four simple steps to rapid knowledge acquire.<br />
<br />
1) Deconstruct the new skill.<br />
<br />
divide and conquer small chunks of skill in new skill. Because most of the big skills are set of smaller skills<br />
<br />
2) Learn enough to self correct.<br />
<br />
He depicts the most common error we do in learning which is trying to learn everything and start practicing later. But Ideally what you should do is to learn the essential or more obvious things so you<br />
can self correct your self.<br />
<br />
3) Remove practice barriers.<br />
<br />
The most common barrier i can think of is "Facebook" ;)<br />
<br />
4) Practice atleast 20 hours.<br />
<br />
"The major barrier to learn new thing is not intellectual it is emotional"<br />
<br />
So start practicing what you love to acquire..!!!<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<iframe allowfullscreen='allowfullscreen' webkitallowfullscreen='webkitallowfullscreen' mozallowfullscreen='mozallowfullscreen' width='320' height='266' src='https://www.youtube.com/embed/5MgBikgcWnY?feature=player_embedded' frameborder='0'></iframe></div>
<br />
<br />
<br />
[1] http://kkpradeeban.blogspot.pt/2012/11/optimism-is-selection-of-nature.html</div>
Anonymoushttp://www.blogger.com/profile/11874278867021490476noreply@blogger.com2tag:blogger.com,1999:blog-8617973274601922773.post-4795033805197157672014-09-17T14:44:00.000-07:002014-09-21T10:04:37.338-07:00Cabo Da Roca - Western Most Cape of Europe <div dir="ltr" style="text-align: left;" trbidi="on">
<br />
It is a new country for me and it is full of new places to travel. Luckily we have one friend at the apartment who knows the area pretty well. So we did not have much trouble in locating the places to visit but if you travel by public transport following information would be useful for you.<br />
<br />
If you are near IST you need to travel from Alameda Metro station to Cais do Sodré station which is at the end of Green line. Then you need to get the Train from Cais do Sodré station to Cascais. To travel up to Cascais you can obtain a travel card from Metro station which covers all 4 forms of transportation including Bus, Metro, Train and Ferry. You have different options but it is better to buy a viva via gem card if you are a non frequent traveller. It is reusable and reloadable card.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://i2.wp.com/www.metrolisboa.pt/eng/wp-content/uploads/2012/02/viva-viagem.jpg?zoom=2&resize=299%2C190" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://i2.wp.com/www.metrolisboa.pt/eng/wp-content/uploads/2012/02/viva-viagem.jpg?zoom=2&resize=299%2C190" height="126" width="200" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
source :http://www.metrolisboa.pt/eng/customer-info/viva-viagem-card</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Loading this card with 10 Euros would be enough as we experienced and you can top up it from train stations or metro stations conviniently. It is advisable to keep 5,10 Euro notes as sometimes it will issue receipt for balance which you should claim at train stations if you try to recharge from a train station. Believe me it is a hassle :(.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
You should spend some time at Cascais as it is a beautiful area with lots of tourist and local activities. We stayed there before moving to Cabo da Roca.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://fbcdn-sphotos-f-a.akamaihd.net/hphotos-ak-xap1/t31.0-8/10648381_10152379640849537_9072821381358423645_o.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="280" src="https://fbcdn-sphotos-f-a.akamaihd.net/hphotos-ak-xap1/t31.0-8/10648381_10152379640849537_9072821381358423645_o.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://fbcdn-sphotos-g-a.akamaihd.net/hphotos-ak-xpa1/t31.0-8/10644466_10152379640839537_7049849155528250480_o.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="266" src="https://fbcdn-sphotos-g-a.akamaihd.net/hphotos-ak-xpa1/t31.0-8/10644466_10152379640839537_7049849155528250480_o.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
This was truly a beautiful beach...</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
From Cascais you need to get 403 bus operated by scottrub. It is usually has one hour frequency. It will go via Cabo da Roca to Sentra and you have to get down from the Cabo da Roca on the way. These buses does not have display boards for the stops but Cabo da Roca is a special stop and you know once you arrive there and just enjoy the breathtaking views out side on the way from the bus. (Believe me it is a special stop ;) )</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Cabo da Roca is the western most point of the Europe mainland. You will be surely amazed how picturesque the view is. You will lost in your thoughts for a moment when you reach the top. But make sure not to fall out from the top to Atlantic ocean while taking selfies.. Cos' it is a shame that you cannot tell how magnificent it was to you friends :P</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://scontent-a-mad.xx.fbcdn.net/hphotos-xaf1/t31.0-8/10608470_10152379641229537_5748040001244142185_o.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="266" src="https://scontent-a-mad.xx.fbcdn.net/hphotos-xaf1/t31.0-8/10608470_10152379641229537_5748040001244142185_o.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://fbcdn-sphotos-h-a.akamaihd.net/hphotos-ak-xfp1/t31.0-8/10688428_10152379641299537_1034355539304995498_o.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="266" src="https://fbcdn-sphotos-h-a.akamaihd.net/hphotos-ak-xfp1/t31.0-8/10688428_10152379641299537_1034355539304995498_o.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://scontent-a-mad.xx.fbcdn.net/hphotos-xaf1/t31.0-8/10557554_10152379643494537_3227882405899181779_o.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="266" src="https://scontent-a-mad.xx.fbcdn.net/hphotos-xaf1/t31.0-8/10557554_10152379643494537_3227882405899181779_o.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://fbcdn-sphotos-e-a.akamaihd.net/hphotos-ak-xpa1/t31.0-8/10683659_10152379643449537_683603572932791555_o.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="266" src="https://fbcdn-sphotos-e-a.akamaihd.net/hphotos-ak-xpa1/t31.0-8/10683659_10152379643449537_683603572932791555_o.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<br /></div>
Anonymoushttp://www.blogger.com/profile/11874278867021490476noreply@blogger.com1tag:blogger.com,1999:blog-8617973274601922773.post-13875167493888019942014-09-17T14:01:00.001-07:002014-09-17T14:04:57.320-07:00New window just opened ...!<div dir="ltr" style="text-align: left;" trbidi="on">
It has been a week since i have became a student once more in my life. I like the experience of recreating the feelings that i had when i was a student ago two years back. Since now this blog is full of technical content and i did not have much time to blog much about my other experiences. But now this is a new life so thought of doing the same to my blog. Lets see how the new story unfolds...<br />
<br />
I am an <a href="http://www.kth.se/en/studies/master/joint/emdc" target="_blank">EMDC</a> ( European Masters in Distributed Computing) student at IST (Instituto Superior Técnico) and KTH (Royal Institute of Technology) in Sweden. This offering is great not only because of the content it offers but the cultural experience you will gain. It is a bonus..<br />
<br />
During the first week I was fortunate to visit some of the very beautiful places in Lisbon. I should say the coastal area is really fantastic even though i am coming from a place with full of beaches covering my beautiful island Sri Lanka. I will post more about that place in another post with more details.. and of course with pictures. Till then Just relax with the view out of my apartment...<br />
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://fbcdn-sphotos-b-a.akamaihd.net/hphotos-ak-xaf1/t31.0-8/10662141_10152378216449537_7174922840836620794_o.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="379" src="https://fbcdn-sphotos-b-a.akamaihd.net/hphotos-ak-xaf1/t31.0-8/10662141_10152378216449537_7174922840836620794_o.jpg" width="640" /></a></div>
<br /></div>
Anonymoushttp://www.blogger.com/profile/11874278867021490476noreply@blogger.com0tag:blogger.com,1999:blog-8617973274601922773.post-26741239841938435212014-04-08T09:05:00.001-07:002014-04-08T09:05:22.575-07:00Error Recovery Mechanisms in WSO2 ESB with Store and Forward<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
You may be in a situation where you need to send messages reliably to an endpoint. There are couple of ways you can achieve that. WSO2 ESB provides store/forward pattern with a higher level of reliability and error recovery mechanisms. This post aggregate some of the comprehensive articles into a single piece.<br />
<br />
<br />
<ul style="text-align: left;">
<li><a href="http://wso2.com/library/articles/2011/10/implementing-store-forward-messaging-patterns-wso2esb-part-1/">http://wso2.com/library/articles/2011/10/implementing-store-forward-messaging-patterns-wso2esb-part-1/</a></li>
<li><a href="http://wso2.com/library/articles/2011/10/implementing-store-forward-messaging-patterns-wso2esb-part-1/">http://wso2.com/library/articles/2011/10/implementing-store-forward-messaging-patterns-wso2esb-part-1/</a></li>
<li><a href="http://techfeast-hiranya.blogspot.de/2012/01/wso2-esb-tips-tricks-08-message-stores.html">http://techfeast-hiranya.blogspot.de/2012/01/wso2-esb-tips-tricks-08-message-stores.html</a></li>
<li><a href="http://charith.wickramaarachchi.org/2012/05/another-message-redelivery-pattern-with.html">http://charith.wickramaarachchi.org/2012/05/another-message-redelivery-pattern-with.html</a></li>
</ul>
<br />
<br />
<br /></div>
Anonymoushttp://www.blogger.com/profile/11874278867021490476noreply@blogger.com4tag:blogger.com,1999:blog-8617973274601922773.post-72083647245497909662013-07-18T09:45:00.000-07:002013-07-18T09:52:53.160-07:00How to get a user profile for OAuth Token using JWT headers<div dir="ltr" style="text-align: left;" trbidi="on">
<span id="docs-internal-guid-303339eb-f296-f7f6-1b88-261a9c9bb1ba"></span><br />
<div dir="ltr" style="font-size: 15px; line-height: 17px; margin-bottom: 0pt; margin-top: 0pt; white-space: pre-wrap;">
<span style="font-family: Arial;">In this blog post lets discuss how you can retrieve user profile and view attributes of a user using only the OAuth token in WSO2 Identity server. I assume that reader is familiar with WSO2 identity server and if you need more help you can follow the documentation at </span><a href="http://docs.wso2.org/wiki/display/IS400/WSO2+Identity+Server+Documentation">http://docs.wso2.org/wiki/display/IS400/WSO2+Identity+Server+Documentation</a></div>
<div dir="ltr" style="font-size: 15px; line-height: 17px; margin-bottom: 0pt; margin-top: 0pt; white-space: pre-wrap;">
<span style="font-family: Arial;"><br /></span></div>
<div dir="ltr" style="margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: Arial; font-size: 15px; line-height: 17px; white-space: pre-wrap;">1) </span><span style="font-family: Arial; font-size: 15px; line-height: 17px; white-space: pre-wrap;">Change the CARBON_HOME/repository/conf/identity.xml and make following attribute true. Then start the WSO2 Identity server.</span></div>
<div dir="ltr" style="margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: Arial;"><span style="font-size: 15px; line-height: 17px; white-space: pre-wrap;"><pre><code>
<AuthorizationContextTokenGeneration>
<span style="background-color: yellow;"><Enabled>true</Enabled></span>
<TokenGeneratorImplClass>org.wso2.carbon.identity.oauth2.authcontext.JWTTokenGenerator</TokenGeneratorImplClass>
<ClaimsRetrieverImplClass>org.wso2.carbon.identity.oauth2.authcontext.DefaultClaimsRetriever</ClaimsRetrieverImplClass>
<ConsumerDialectURI>http://wso2.org/claims</ConsumerDialectURI>
<SignatureAlgorithm>SHA256withRSA</SignatureAlgorithm>
<AuthorizationContextTTL>15</AuthorizationContextTTL>
</AuthorizationContextTokenGeneration></code></pre></span></span></div>
<div dir="ltr" style="margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: Arial;"><span style="font-size: 15px; line-height: 17px; white-space: pre-wrap;"><br /></span></span></div>
<div dir="ltr" style="margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: Arial;"><span style="font-size: 15px; line-height: 17px; white-space: pre-wrap;">2) Get the oauth Token ( you need to get the base64 encoded value for (client id:client secret) value.</span></span><br />
<span style="font-family: Arial;"><span style="font-size: 15px; line-height: 17px; white-space: pre-wrap;"><br /></span></span>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQPxKMtRpkvZONbCk0ZrR1fXoW140olCXLxHnmEZqsKjWooVfbORSsuK1StF-KilB8pnnm38L1m7UPzqQYLPop0dmr5qUJ95WkPEBGCtNOU7sPXwy-0tEz9L5Jab2rf_GNNlgsPj4F_E8/s1600/oauth-secrets.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="401" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQPxKMtRpkvZONbCk0ZrR1fXoW140olCXLxHnmEZqsKjWooVfbORSsuK1StF-KilB8pnnm38L1m7UPzqQYLPop0dmr5qUJ95WkPEBGCtNOU7sPXwy-0tEz9L5Jab2rf_GNNlgsPj4F_E8/s640/oauth-secrets.png" width="640" /></a></div>
<span style="font-family: Arial;"><span style="font-size: 15px; line-height: 17px; white-space: pre-wrap;">
You can use an online service for encoding such as http://www.base64encode.org/
and then issue following CURL command to obtain the access token. (make sure you have the correct port in the server URL)
<pre><code>
curl -v -X POST -H "Authorization: Basic VE01enNFem9FZG9NRERjVEJjbXRBcWJGdTBFYTpYUU9URExINlBBOHJvUHJfSktrTHhUSTNseGNh" -H "Content-Type: application/x-www-form-urlencoded;charset=UTF-8" -k -d "grant_type=password&username=admin&password=admin" https://localhost:9443/oauth2endpoints/token</code></pre></span></span><br />
<br />
<span style="font-family: Arial;"><span style="font-size: 15px; line-height: 17px; white-space: pre-wrap;"><code><br /></code> 3) Now you need to invoke and admin service in the Identity server. Please follow </span></span><br />
<a href="http://charithaka.blogspot.com/2013/06/invoking-wso2-carbon-admin-services.html">http://charithaka.blogspot.com/2013/06/invoking-wso2-carbon-admin-services.html</a> on how to invoke admin services using SOAP UI.<br />
<br />
We shall now invoke the following service.<br />
<b id="docs-internal-guid-303339eb-f2a4-0a03-ae04-2c05a8d65a0b" style="font-weight: normal;"><a href="https://localhost:9443/services/OAuth2TokenValidationService" style="text-decoration: none;"><span style="color: #1155cc; font-family: Arial; font-size: 15px; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">https://localhost:9443/services/OAuth2TokenValidationService</span></a><span style="font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;"> </span></b><br />
<b style="font-weight: normal;"><span style="font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;"><br /></span></b>
<b style="font-weight: normal;"><span style="font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;">Request</span></b></div>
<div>
<span style="font-family: Arial;"><span style="font-size: 15px; line-height: 17px; white-space: pre-wrap;"><br /></span></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhSldgpMcu2RKTgkQJXawMg93bHGmjczbRsb1Yt1ZYuRIPvxWSDISVAkVV0bbvz0JIBRh80jAEajQf5CYBdGf04kOjcRyTtO-GjubI5x7V9PIfh_3QzJqZ_YW3Ag0Fms-dw6VjIjCnDv5M/s1600/request.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="414" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhSldgpMcu2RKTgkQJXawMg93bHGmjczbRsb1Yt1ZYuRIPvxWSDISVAkVV0bbvz0JIBRh80jAEajQf5CYBdGf04kOjcRyTtO-GjubI5x7V9PIfh_3QzJqZ_YW3Ag0Fms-dw6VjIjCnDv5M/s640/request.png" width="640" /></a></div>
<br />
<div>
<br />
Response<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhW_GJkJj789GEtEkPgLG1thf8Z4yHRIyvw1NjHBM_91IGjZiCT12b6erus0FINhYpNkuNj7ssDsGul8n4gZae8poAUkaLvhgwdqlpf9mhOd7nUPydL2nBJRCcjq2Kk0DsP33LpmZe1Mgw/s1600/response.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="270" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhW_GJkJj789GEtEkPgLG1thf8Z4yHRIyvw1NjHBM_91IGjZiCT12b6erus0FINhYpNkuNj7ssDsGul8n4gZae8poAUkaLvhgwdqlpf9mhOd7nUPydL2nBJRCcjq2Kk0DsP33LpmZe1Mgw/s640/response.png" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Now you will be getting the authorization context token which is encoded in base64 and delimited with "." values. Middle part will contain the user profile value and we can get it decoded using <a href="http://www.base64decode.org/">http://www.base64decode.org/</a></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
</div>
<div class="separator" style="clear: both;">
<ax2303:tokenString>eyJ0eXAiOiJKV1QiLCJhbGciOiJTSEEyNTZ3aXRoUlNBIiwieDV0IjoiTm1KbU9HVXhNelpsWWpNMlpEUmhOVFpsWVRBMVl6ZGhaVFJpT1dFME5XSTJNMkptT1RjMVpBPT0ifQ==.<span style="background-color: yellow;">eyJpc3MiOiJodHRwOi8vd3NvMi5vcmcvZ2F0ZXdheSIsImV4cCI6MTM3NDE2NDYzMDE4MiwiaHR0cDovL3dzbzIub3JnL2dhdGV3YXkvc3Vic2NyaWJlciI6ImFkbWluIiwiaHR0cDovL3dzbzIub3JnL2dhdGV3YXkvYXBwbGljYXRpb25uYW1lIjoiTXlBcHBsaWNhdGlvbiIsImh0dHA6Ly93c28yLm9yZy9nYXRld2F5L2VuZHVzZXIiOiJhZG1pbiIsICJodHRwOi8vd3NvMi5vcmcvY2xhaW1zL2FjY291bnRMb2NrIjoiZmFsc2UiLCAiaHR0cDovL3dzbzIub3JnL2NsYWltcy9jaGFsbGVuZ2VRdWVzdGlvbjEiOiIxMjM0NDUiLCAiaHR0cDovL3dzbzIub3JnL2NsYWltcy9jaGFsbGVuZ2VRdWVzdGlvbjIiOiI0NTY3NTYiLCAiaHR0cDovL3dzbzIub3JnL2NsYWltcy9jaGFsbGVuZ2VRdWVzdGlvblVyaXMiOiJteVRva2VuMiIsICJodHRwOi8vd3NvMi5vcmcvY2xhaW1zL2VtYWlsYWRkcmVzcyI6ImFkbWluQHdzbzIuY29tIiwgImh0dHA6Ly93c28yLm9yZy9jbGFpbXMvZnVsbG5hbWUiOiJhZG1pbiIsICJodHRwOi8vd3NvMi5vcmcvY2xhaW1zL2dpdmVubmFtZSI6ImFkbWluIiwgImh0dHA6Ly93c28yLm9yZy9jbGFpbXMvbGFzdG5hbWUiOiJhZG1pbiIsICJodHRwOi8vd3NvMi5vcmcvY2xhaW1zL3JvbGUiOiJhZG1pbixldmVyeW9uZSJ9</span>.IUpGsH149iJDcn/UWYdGBrAoTNOZiUdI3X7QMXqVt+ss5rOOlDeB5bgz0Q3Y4SKh+H4PBkvlLd0/WAlbuvTi9Zj/G/QupenQpqYKulOFihUMNHiWRUgFT5BvfATVMsvqO/023BFprhdDShuPlpI9pJAEeuvmUiRIBPVVeoj09Ec=</ax2303:tokenString></div>
<div class="separator" style="clear: both;">
<ax2303:tokenType>JWT</ax2303:tokenType></div>
<div class="separator" style="clear: both;">
<br /></div>
<div class="separator" style="clear: both;">
Following is the output of the decoded value which has the user profile details of the user who generated the OAuth access token.</div>
<div class="separator" style="clear: both;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3QyhJB1hZ6PFgKbI7ZLJycXCOpkQlFT4lvT5oGCKeiyoxfurwb4qRmExzY3JtVUXF0o1fhULkQ6CzrYO5OR0ziKuP497VxcwlCB80DhRw0tGqoOnK2yv4Pegnt9xa2oahbhpQJR8Yi3U/s1600/decoded-userprof.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="554" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3QyhJB1hZ6PFgKbI7ZLJycXCOpkQlFT4lvT5oGCKeiyoxfurwb4qRmExzY3JtVUXF0o1fhULkQ6CzrYO5OR0ziKuP497VxcwlCB80DhRw0tGqoOnK2yv4Pegnt9xa2oahbhpQJR8Yi3U/s640/decoded-userprof.png" width="640" /></a></div>
<div class="separator" style="clear: both;">
<br /></div>
<br />
<br /></div>
</div>Anonymoushttp://www.blogger.com/profile/11874278867021490476noreply@blogger.com9tag:blogger.com,1999:blog-8617973274601922773.post-63982301170645043292013-04-22T10:07:00.000-07:002013-04-26T19:19:14.673-07:00How to disable automatic service creation with WSDL upload<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
When you upload a WSDL to WSO2 Governance Registry it will create a Service Artifact automatically for that WSDL. But in case you do not want that to be automated and need to add services differently this is how to disable that feature.<br />
<br />
1) Open GREG_HOME/repository/conf/registry.xml<br />
<br />
2) Search for <span style="font-family: Courier New, Courier, monospace;">
</span><br />
<pre><pre style="background-color: #eeeeee; border: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; font-size: 14px; line-height: 18px; margin-bottom: 10px; max-height: 600px; overflow: auto; padding: 5px; vertical-align: baseline; width: auto;"><code style="border: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; margin: 0px; padding: 0px; vertical-align: baseline;"><property name="createService">false</property></code></pre>
</pre>
and uncomment them.<br />
<br />
There will be two locations generally for normal WSDL handler and for ZIP or archive based upload handler (Where you upload multiple WSDL files together).<br />
<br />
Save registry.xml and restart your server. Now you can observe that it will not create Services automatically for WSDL uploads.</div>
Anonymoushttp://www.blogger.com/profile/11874278867021490476noreply@blogger.com0tag:blogger.com,1999:blog-8617973274601922773.post-31493705317895366032013-03-26T22:07:00.002-07:002013-07-18T09:45:17.926-07:00How to send CDATA inside your SOAP message payload<div dir="ltr" style="text-align: left;" trbidi="on">
<span style="background-color: #ea9999;">(Please note this a temporary workaround and this will be addressed properly in future releases)</span><br />
<br />
If you need to send a SOAP message payload ever and if it resulted something like this.<br />
<br />
<span style="color: #434343; font-family: Courier New, Courier, monospace; font-size: 13px; line-height: 19px;"><b>&lt;task:customerSchema>&lt;ext:value>&amp;lt;maxStops>2&amp;lt;/maxStops>&lt;/ext:value>&lt;/task:customerSchema></b></span><br />
<span style="color: #434343; font-family: Arial, Helvetica, Verdana, monospace, san-serif; font-size: 13px; line-height: 19px;"><br /></span>
Because by default, a StAX parser must be in non coalescing mode (It overrides the default settings mandated by the StAX specification) and as a side effect of that parser coaelsce CDATA sections. [1]<span style="color: #434343; font-family: Arial, Helvetica, Verdana, monospace, san-serif; font-size: 13px; line-height: 19px;"><br /></span>
You need to add the XMLInputFactory.properties file with the following entry to CARBON_HOME/ (root) folder.<br />
<div>
<br /></div>
<div>
<b></b><br />
<pre><b><code>javax.xml.stream.isCoalescing=false</code></b></pre>
</div>
<div>
<br /></div>
<div>
For more information</div>
<div>
[1] http://people.apache.org/~veithen/axiom/userguide/ch04.html#factory.properties<br />
<br />
[2] http://wso2.org/forum/thread/10891</div>
<div>
<br /></div>
</div>
Anonymoushttp://www.blogger.com/profile/11874278867021490476noreply@blogger.com4tag:blogger.com,1999:blog-8617973274601922773.post-84942887292753488472013-02-16T09:11:00.002-08:002013-04-26T19:23:03.529-07:00Make a Torrent downloader with Raspberry Pi in 3 steps :)<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
If you are downloading torrents heavily with your highly capable machine, You are wasting a lot of resources. Why do not you use your Raspberry Pi to do it ;)<br />
<br />
I recieved a Raspberry Pi @ wso2con 2013. I was really happy after seeing this as i was planning to get down a one anyway. This is my first project out of it. Need some time to go for a real big project. Yes i have a pieces of my old nookcolor including its LCD ;).<br />
<h3 style="text-align: left;">
1st step</h3>
You need to configure your Raspberry pi with this tutorial.<br />
<a href="http://www.raspberrypi.org/downloads">http://www.raspberrypi.org/downloads</a><br />
<br />
When you go to configuration screen make sure you enable ssh. So you can get rid of your monitor after that.<br />
<h3 style="text-align: left;">
2nd Step</h3>
Install a remote viewer so you can view your Raspberry Pi desktop remotely.<br />
<a href="http://www.jeremymorgan.com/tutorials/raspberry-pi/how-to-remote-desktop-raspberry-pi/">http://www.jeremymorgan.com/tutorials/raspberry-pi/how-to-remote-desktop-raspberry-pi/</a><br />
<h3 style="text-align: left;">
3rd Step</h3>
<div>
Install Transmission in Raspberry pi. </div>
<div>
<br /></div>
<div>
<span style="font-family: Courier New, Courier, monospace;"><pre><code>sudo apt-get update</code></pre></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;"><pre><code>apt-get install transmission</code></pre></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div>
So you can download torrents from Raspberry pi and SCP them to your local machine at anytime. There are few torrent clients available so you can try them if you do not like transmission.</div>
<div>
<br /></div>
<div>
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg65aTABhU_i2Q-SBd4-c4iN4TM2YD2oZaqlL54hieolm2QGlt1FtOa4bZHQgVqllIMcWifVP_UvW0evgVpBZJGrx1rVPjNpjxMYcREW3FFS0h9VzDh3nSKWE0elYXZFTNUmgVj-IUW3pw/s1600/Screenshot+from+2013-02-16+21:39:36.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="492" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg65aTABhU_i2Q-SBd4-c4iN4TM2YD2oZaqlL54hieolm2QGlt1FtOa4bZHQgVqllIMcWifVP_UvW0evgVpBZJGrx1rVPjNpjxMYcREW3FFS0h9VzDh3nSKWE0elYXZFTNUmgVj-IUW3pw/s640/Screenshot+from+2013-02-16+21:39:36.png" width="640" /></a></div>
<div>
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div>
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEirb7oXJZtsqUfAm0Hh94mh7zF0Tvzuu2UZi2GLdEjoP25TmXrFeF05h5xeR57_g44vK-vu0r9_gYCiFu7YK6z5cR51QKRNVmUyQocVRtnYqDa8aRGfZhkKG3Dbd26dCuK1QUUbwVVQbeM/s1600/Screenshot+from+2013-02-16+21%253A51%253A46.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="496" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEirb7oXJZtsqUfAm0Hh94mh7zF0Tvzuu2UZi2GLdEjoP25TmXrFeF05h5xeR57_g44vK-vu0r9_gYCiFu7YK6z5cR51QKRNVmUyQocVRtnYqDa8aRGfZhkKG3Dbd26dCuK1QUUbwVVQbeM/s640/Screenshot+from+2013-02-16+21%253A51%253A46.png" width="640" /></a></div>
<div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<br /></div>
</div>Anonymoushttp://www.blogger.com/profile/11874278867021490476noreply@blogger.com4tag:blogger.com,1999:blog-8617973274601922773.post-8607418865104552142013-02-03T18:05:00.000-08:002013-04-27T20:17:25.328-07:00Application Governance with WSO2 GReg and Jenkins<div dir="ltr" style="text-align: left;" trbidi="on">
<div dir="ltr" style="text-align: left;" trbidi="on">
<span style="font-family: Arial, Helvetica, sans-serif;">This tutorial will show how you can automate the application Governance using WSO2 Governance Registry and Jenkins (for Build Automation).</span><br />
<b><span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></b>
<b><span style="font-family: Arial, Helvetica, sans-serif;">Pre-Requisites </span></b><br />
<br />
<ul style="text-align: left;">
<li><b id="internal-source-marker_0.09183679078705609" style="font-weight: normal; text-align: -webkit-auto;"><span style="font-size: 15px; vertical-align: baseline; white-space: pre-wrap;"><a href="http://wso2.org/more-downloads/governance-registry" target="_blank"><span style="font-family: Arial, Helvetica, sans-serif;">WSO2 Governance Registry 4.5.1</span></a></span></b></li>
<li><b style="font-weight: normal; text-align: -webkit-auto;"><a href="http://jenkins-ci.org/" target="_blank"><span style="font-family: Arial, Helvetica, sans-serif;">Jenkins</span></a></b></li>
<li><b style="font-weight: normal; text-align: -webkit-auto;"><span style="font-size: 15px; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: Arial, Helvetica, sans-serif;">A svn location to store build artifacts.</span></span></b></li>
</ul>
<br />
<h3 style="text-align: left;">
Things to note</h3>
<div>
<ul style="text-align: left;">
<li>Jenkins or similar build automation tool should be used to build the artifact and deploy it to the specific Dev SVN location. </li>
<li>There are three SVN locations required for Dev , QA and Production artifact deployment. </li>
<li>User needs to specify the exact name of the artifact (without the extension) as Application Name when adding the application to WSO2 Governance Registry. </li>
<li>This particular sample is tested with WSO2 Governance Registry 4.5.1. Therefore it is recommended to use the same version of the product.</li>
</ul>
<div>
<div class="separator" style="clear: both; font-weight: normal; text-align: center;">
<b id="internal-source-marker_0.09183679078705609"><b id="internal-source-marker_0.4754765050020069"><b id="internal-source-marker_0.35913173598237336" style="font-weight: normal; text-align: -webkit-auto;"></b></b></b></div>
<b id="internal-source-marker_0.09183679078705609"><b id="internal-source-marker_0.4754765050020069">
</b></b>
<br />
<h3 style="text-align: left;">
Resource Location</h3>
<h3 style="text-align: left;">
<b id="internal-source-marker_0.09183679078705609"><b id="internal-source-marker_0.4754765050020069"><b id="internal-source-marker_0.35913173598237336" style="font-weight: normal;"><span style="font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;">Please download resources from following location.</span><br /><span style="color: #1155cc; font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;"><a href="https://svn.wso2.org/repos/wso2/scratch/application-governance/">https://svn.wso2.org/repos/wso2/scratch/application-governance/</a></span></b></b></b></h3>
</div>
<h3 style="text-align: left;">
Workflow</h3>
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiR5RU2WXyJDm5dIkoniQpq1eNAmHVNshXnSNeBOH3fdjXSx3KKIgcrSzH06WxEyjB_g-nX7toBeMlijphsirDjGJnUqSEpNtuF75-stFeWCEGsiLTSkJbC2IdR_somQK-hEn4kW8LlGPY/s1600/Yenlog-Application-Governance.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiR5RU2WXyJDm5dIkoniQpq1eNAmHVNshXnSNeBOH3fdjXSx3KKIgcrSzH06WxEyjB_g-nX7toBeMlijphsirDjGJnUqSEpNtuF75-stFeWCEGsiLTSkJbC2IdR_somQK-hEn4kW8LlGPY/s640/Yenlog-Application-Governance.png" width="640" /></a></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<b id="internal-source-marker_0.09183679078705609" style="font-weight: normal;"><span style="font-family: Arial; font-size: 24px; font-weight: bold; vertical-align: baseline; white-space: pre-wrap;">Configurations</span></b></div>
<div>
<b style="font-weight: normal;"><span style="font-family: Arial; font-size: 24px; font-weight: bold; vertical-align: baseline; white-space: pre-wrap;"><br /></span></b></div>
<div>
<b id="internal-source-marker_0.09183679078705609" style="font-weight: normal;"><span style="font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;">n this workflow build automation is excluded and user needs to add the built artifact and first deploy to Dev SVN location. (Developer may use Jenkins to build and its plugin to add it to a SVN location)</span><br /><span style="font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;"></span><br /><span style="font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;">1) Create the Registry Extension file for Applications as specified below. Deploy the Application RXT file to Governance Registry as described in </span><a href="http://docs.wso2.org/wiki/display/Governance450/Deploying+an+Extension+File"><span style="color: #1155cc; font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;">http://docs.wso2.org/wiki/display/Governance450/Deploying+an+Extension+File</span></a><span style="font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;"></span><br /><span style="font-family: Arial; font-size: 13px; vertical-align: baseline; white-space: pre-wrap;"></span></b><br />
<br />
<pre><code><artifactType type="application/vnd.wso2-application+xml"
shortName="applications" singularLabel="Application" pluralLabel="Applications" hasNamespace="false" iconSet="9">
<storagePath>/applications/@{overview_name}</storagePath>
<nameAttribute>overview_name</nameAttribute>
<ui>
<list>
<column name="Name">
<data type="path" value="overview_name" href="/applications/@{name}"/>
</column>
<column name="type">
<data type="type" value="overview_type"/>
</column>
</list>
</ui>
<content>
<table name="Overview">
<field type="text" required="true">
<name>Name</name>
</field>
<field type="options">
<name>Type</name>
<values>
<value>car</value>
<value>war</value>
</values>
</field>
<field type="text-area">
<name>Description</name>
</field>
</table>
</content>
</artifactType>
</code></pre>
</div>
</div>
<div style="font-weight: bold;">
<br /></div>
<br />
<b style="font-weight: normal;"><br /></b>
<br />
<div>
<b id="internal-source-marker_0.09183679078705609" style="font-weight: normal;"><span style="font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;">2) Create an Application in Governance Registry.</span><br /><span style="font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;"></span><br /><span style="font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;">Add→ Application</span></b></div>
<div>
<b style="font-weight: normal;"><span style="font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;"><br /></span></b></div>
<div>
<b id="internal-source-marker_0.09183679078705609" style="font-weight: normal;"><img height="346px;" src="https://lh3.googleusercontent.com/RU-9va3JeTxFIQI0qEc9EHHQevnpQF8ccatXBa7Noi-Ye6nHIRAvoL8fcy39BU6d_MrRo5nVx6wd7bh79cPdYssjbP223z-udpqRzR8SnwClFa2GnZ0" width="408px;" /></b></div>
<div>
<b style="font-weight: normal;"><br /></b></div>
<div>
<b id="internal-source-marker_0.09183679078705609" style="font-weight: normal;"><span style="font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;">Specify </span><span style="font-family: Arial; font-size: 15px; font-weight: bold; vertical-align: baseline; white-space: pre-wrap;">Name</span><span style="font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;"> of the car/war file. (This should be the exact name in the svn location without extension)</span><br /><span style="font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;">eg: myCapp</span></b></div>
<div>
<b style="font-weight: normal;"><span style="font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;"><br /></span></b></div>
<div>
<b id="internal-source-marker_0.09183679078705609" style="font-weight: normal;"><img height="288px;" src="https://lh4.googleusercontent.com/uLSLDAtW9uT6Ty1Q_y_6Z3lhuXZYdacFLYolhEv_n6hTh-8kM9bMgZzK48SN22iuzKqiLpQeV1h8rTagmWbZI8XADHOTAt48O5AhG5AwmA379zwV7u0" width="569px;" /></b></div>
<div>
<b style="font-weight: normal;"><br /></b></div>
<div>
<b id="internal-source-marker_0.09183679078705609" style="font-weight: normal;"><span style="font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;">3) Add Svn Executor to Governance Registry Server.</span><br /><span style="font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;"></span></b><br />
<ul style="margin-bottom: 0pt; margin-top: 0pt;"><b id="internal-source-marker_0.09183679078705609" style="font-weight: normal;">
<li dir="ltr" style="font-family: Arial; font-size: 15px; list-style-type: disc; vertical-align: baseline;"><span style="vertical-align: baseline; white-space: pre-wrap;">Edit the </span><span style="font-weight: bold; vertical-align: baseline; white-space: pre-wrap;">svn-executor-1.0.jar</span><span style="vertical-align: baseline; white-space: pre-wrap;">’s </span><span style="background-color: yellow; font-weight: bold; vertical-align: baseline; white-space: pre-wrap;">svn.properties</span><span style="vertical-align: baseline; white-space: pre-wrap;"> file and add your svn credentials and Jenkins URL.</span></li>
</b></ul>
<b id="internal-source-marker_0.09183679078705609" style="font-weight: normal;">
<span style="font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;"></span></b>
<br />
<ul style="margin-bottom: 0pt; margin-top: 0pt;"><b id="internal-source-marker_0.09183679078705609" style="font-weight: normal;">
<li dir="ltr" style="font-family: Arial; font-size: 15px; list-style-type: disc; vertical-align: baseline;"><span style="vertical-align: baseline; white-space: pre-wrap;">Copy the </span><span style="font-weight: bold; vertical-align: baseline; white-space: pre-wrap;">svn-executor-1.0.jar</span><span style="vertical-align: baseline; white-space: pre-wrap;"> and </span><span style="font-weight: bold; vertical-align: baseline; white-space: pre-wrap;">svnkit-bundle-1.0.0.jar </span><span style="vertical-align: baseline; white-space: pre-wrap;">(provided separately) to </span><span style="font-style: italic; vertical-align: baseline; white-space: pre-wrap;">G-REG_HOME/repository/components/lib </span><span style="vertical-align: baseline; white-space: pre-wrap;">folder.</span></li>
</b></ul>
<span id="internal-source-marker_0.09183679078705609">
<b style="font-weight: normal;"><span style="font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;"></span></b></span>
<br />
<ul style="margin-bottom: 0pt; margin-top: 0pt;"><span id="internal-source-marker_0.09183679078705609">
<li dir="ltr" style="font-family: Arial; font-size: 15px; list-style-type: disc; vertical-align: baseline;"><span style="vertical-align: baseline; white-space: pre-wrap;">Copy<b> </b></span><span style="font-weight: bold; vertical-align: baseline; white-space: pre-wrap;">svn-client-adapter-1.6.18.wso2v2.jar</span><span style="font-weight: bold; vertical-align: baseline; white-space: pre-wrap;"> </span><span style="vertical-align: baseline; white-space: pre-wrap;">to</span><span style="font-weight: bold; vertical-align: baseline; white-space: pre-wrap;"> </span><span style="font-style: italic; font-weight: bold; vertical-align: baseline; white-space: pre-wrap;">G-REG_HOME/repository/components/dropins </span><span style="font-weight: bold; vertical-align: baseline; white-space: pre-wrap;">folder.</span></li>
</span></ul>
<span id="internal-source-marker_0.09183679078705609">
</span>
<br />
<div style="font-weight: bold;">
<span id="internal-source-marker_0.09183679078705609"><span style="font-family: Arial;"><span style="font-size: 15px; white-space: pre-wrap;"><br /></span></span></span></div>
<span id="internal-source-marker_0.09183679078705609">
</span>
<br />
<div>
<div>
<span id="internal-source-marker_0.09183679078705609"><span id="internal-source-marker_0.09183679078705609"><span style="font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;">4) Add a new lifecycle in Governance Registry names </span><span style="font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;">AppLifeCycle </span><span style="font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;">by following the instructions provided in</span><br /><a href="http://docs.wso2.org/wiki/display/Governance450/Adding+Lifecycles"><span style="color: #1155cc; font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;">http://docs.wso2.org/wiki/display/Governance450/Adding+Lifecycles</span></a><span style="font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;">. Use the lifecycle configuration specified below.</span><br />
</span></span><br />
<pre><code> <!--
~ Copyright (c) 2005-2010, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
~
~ WSO2 Inc. licenses this file to you under the Apache License,
~ Version 2.0 (the "License"); you may not use this file except
~ in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing,
~ software distributed under the License is distributed on an
~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
~ KIND, either express or implied. See the License for the
~ specific language governing permissions and limitations
~ under the License.
-->
<aspect name="AppLifeCycle" class="org.wso2.carbon.governance.registry.extensions.aspects.DefaultLifeCycle">
<configuration type="literal">
<lifecycle>
<scxml xmlns="http://www.w3.org/2005/07/scxml"
version="1.0"
initialstate="Development">
<state id="Development">
<datamodel>
<data name="checkItems">
<item name="Code Completed" forEvent="">
</item>
<item name="Added to SVN" forEvent="">
</item>
</data>
<data name="transitionExecution">
<execution forEvent="Promote" class="org.wso2.carbon.executor.SvnDeploymentExecutor">
<parameter name="currentEnvironment" value="https://svn.wso2.org/repos/wso2/scratch/greg-scm-test/dev"/>
<parameter name="targetEnvironment" value="https://svn.wso2.org/repos/wso2/scratch/greg-scm-test/qa"/>
</execution>
</data>
</datamodel>
<transition event="Promote" target="Testing"/>
</state>
<state id="Testing">
<datamodel>
<data name="checkItems">
<item name="Effective Inspection Completed" forEvent="">
</item>
<item name="Test Cases Passed" forEvent="">
</item>
<item name="Smoke Test Passed" forEvent="">
</item>
</data>
<data name="transitionExecution">
<execution forEvent="Promote" class="org.wso2.carbon.executor.SvnDeploymentExecutor">
<parameter name="currentEnvironment" value="https://svn.wso2.org/repos/wso2/scratch/greg-scm-test/qa"/>
<parameter name="targetEnvironment" value="https://svn.wso2.org/repos/wso2/scratch/greg-scm-test/prod"/>
</execution>
<execution forEvent="Demote" class="org.wso2.carbon.executor.SvnDeploymentExecutor">
<parameter name="currentEnvironment" value="https://svn.wso2.org/repos/wso2/scratch/greg-scm-test/qa"/>
</execution>
</data>
</datamodel>
<transition event="Promote" target="Production"/>
<transition event="Demote" target="Development"/>
</state>
<state id="Production">
<datamodel>
<data name="checkItems">
<item name="Verify No one using the application" forEvent="">
</item>
</data>
<data name="transitionExecution">
<execution forEvent="Retire" class="org.wso2.carbon.executor.SvnDeploymentExecutor">
<parameter name="currentEnvironment" value="https://svn.wso2.org/repos/wso2/scratch/greg-scm-test/qa"/>
<parameter name="targetEnvironment" value="https://svn.wso2.org/repos/wso2/scratch/greg-scm-test/prod"/>
</execution>
</data>
</datamodel>
<transition event="Retire" target="Retired"/>
</state>
<state id="Retired">
<datamodel>
</datamodel>
</state>
</scxml>
</lifecycle>
</configuration>
</aspect> </code></pre>
</div>
</div>
</div>
<span id="internal-source-marker_0.09183679078705609">
</span>
<br />
<div>
<span style="font-family: Courier New; font-size: x-small; font-weight: normal;"><span style="white-space: pre-wrap;"><br /></span></span><span style="font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;">In the above lifecycle configuration you need to change your svn locations that are used in promotions.</span><br />
<b style="font-weight: normal;"><span style="font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;"></span></b><br />
<span style="font-family: Arial; font-size: 15px; font-weight: bold; vertical-align: baseline; white-space: pre-wrap;">Eg: </span><br />
<b style="font-weight: normal;"><span style="font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;"></span></b><br />
<span style="font-family: Arial; font-size: 15px; font-weight: bold; vertical-align: baseline; white-space: pre-wrap;">From Dev to QA</span></div>
<div>
<pre><code><parameter name="currentEnvironment" value="https://svn.wso2.org/repos/wso2/scratch/greg-scm-test/dev"/></code></pre>
</div>
<div>
<parameter name="targetEnvironment" </div>
<div>
value="https://svn.wso2.org/repos/wso2/scratch/greg-scm-test/qa"/>
</div>
<div style="font-weight: bold;">
<b style="font-weight: normal;"><span style="font-family: 'Courier New'; font-size: 13px; vertical-align: baseline; white-space: pre-wrap;"><br /></span></b></div>
<div style="font-weight: bold;">
<b id="internal-source-marker_0.8600791208446026" style="font-weight: normal;"><span style="font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;">5) Attach the </span><span style="font-family: Arial; font-size: 15px; font-weight: bold; vertical-align: baseline; white-space: pre-wrap;">AppLifeCycle </span><span style="font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;">to your application.</span></b></div>
<div style="font-weight: bold;">
<b style="font-weight: normal;"><span style="font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;"><br /></span></b></div>
<div style="font-weight: bold;">
<b id="internal-source-marker_0.8600791208446026" style="font-weight: normal;"><img height="231px;" src="https://lh5.googleusercontent.com/33e3Gr2VOulxhePN0HcZuMN52RZQvruY_pQ6jOJoLXw_CEprMwdzafAmyCE0kFodHS255zXm2xa1r1N_1IQQDOlC6gA-rjhzR8gSk306rCo8gyKkStU" width="399px;" /></b></div>
<div style="font-weight: bold;">
<b style="font-weight: normal;"><br /></b></div>
<div style="font-weight: bold;">
<b id="internal-source-marker_0.8600791208446026" style="font-weight: normal;"><span style="font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;">6) Promote Application from Development to Testing.</span><br /><span style="font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;">This will copy external CApp from Dev environment to QA environment (in the relevant SVN locations)</span></b></div>
<div style="font-weight: bold;">
<b style="font-weight: normal;"><span style="font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;"><br /></span></b></div>
<div style="font-weight: bold;">
<b style="font-weight: normal;"><span style="font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;"><br /></span></b></div>
<div style="font-weight: bold;">
<b style="font-weight: normal;"><span style="font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;"><br /></span></b></div>
<div class="separator" style="clear: both; font-weight: bold; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgsUpsEpjlDtOxzkMz7kdtOC2qphBMAJt58enlI1DrVS2CbzHI0AC8pEeqyoJiZ86GEdZXe6IQbjzybzthbVho_JioQvyE8gf7gG49btUhSahSWPu16JDp8D4wKguiyfNOpZg45sidoOy0/s1600/promote-lc.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="219" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgsUpsEpjlDtOxzkMz7kdtOC2qphBMAJt58enlI1DrVS2CbzHI0AC8pEeqyoJiZ86GEdZXe6IQbjzybzthbVho_JioQvyE8gf7gG49btUhSahSWPu16JDp8D4wKguiyfNOpZg45sidoOy0/s640/promote-lc.png" width="640" /></a></div>
<div style="font-weight: bold;">
<b style="font-weight: normal;"><span style="font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;"><br /></span></b></div>
<b style="font-weight: normal;"><span style="font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;"></span></b>
<br />
<div>
<b><span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></b></div>
<div>
<b id="internal-source-marker_0.4754765050020069" style="font-weight: normal;"><span style="font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;">7) Demote Application from Testing to Development back</span><br /><span style="font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;">This will remove the artifact from QA environment (QA SVN location)</span></b></div>
<div>
<b style="font-weight: normal;"><span style="font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;"><br /></span></b></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjQOuP5fvn26-9RXuQ4t3ljgRs-QQTif7J2HJD8XAQ_8qJhbVS12xjZl7mIIp0vvUfXWI0iDg8VnKUFZjxqdZgYpnMQOkRH2LmOjTev5irlCwSqwY1fWjklk98azKPNCbNlGhu8AoIBkCE/s1600/demote-lc.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="208" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjQOuP5fvn26-9RXuQ4t3ljgRs-QQTif7J2HJD8XAQ_8qJhbVS12xjZl7mIIp0vvUfXWI0iDg8VnKUFZjxqdZgYpnMQOkRH2LmOjTev5irlCwSqwY1fWjklk98azKPNCbNlGhu8AoIBkCE/s640/demote-lc.png" width="640" /></a></div>
<div>
<b style="font-weight: normal;"><span style="font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;"><br /></span></b></div>
<div>
<b id="internal-source-marker_0.4754765050020069" style="font-weight: normal;"></b><br />
<h1 dir="ltr">
<b id="internal-source-marker_0.4754765050020069" style="font-weight: normal;">
<span style="font-family: Arial; font-size: 24px; vertical-align: baseline; white-space: pre-wrap;">Deployment Automation with Jenkins</span></b></h1>
<b id="internal-source-marker_0.4754765050020069" style="font-weight: normal;">
</b>
<br />
<h1 dir="ltr">
<b id="internal-source-marker_0.4754765050020069" style="font-weight: normal;">
<b id="internal-source-marker_0.4754765050020069" style="font-weight: normal;"><div class="separator" style="clear: both; display: inline !important; text-align: center;">
<b id="internal-source-marker_0.35913173598237336" style="font-weight: normal; text-align: -webkit-auto;"><span style="font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;">1) Start Jenkins and add the URL to svn-executor-1.0.jar’s properties file.</span></b></div>
</b></b></h1>
<b id="internal-source-marker_0.4754765050020069" style="font-weight: normal;">
</b>
<br />
<h1 dir="ltr">
<b id="internal-source-marker_0.4754765050020069" style="font-weight: normal;">
<b id="internal-source-marker_0.4754765050020069" style="font-weight: normal;"><div class="separator" style="clear: both; display: inline !important; text-align: center;">
<b id="internal-source-marker_0.35913173598237336" style="font-weight: normal; text-align: -webkit-auto;"><span style="font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;">2) Create two Build jobs with name “promote” and “demote”.</span></b></div>
</b></b></h1>
<b id="internal-source-marker_0.4754765050020069" style="font-weight: normal;">
</b>
<br />
<h1 dir="ltr">
<b id="internal-source-marker_0.4754765050020069" style="font-weight: normal;">
<b id="internal-source-marker_0.4754765050020069" style="font-weight: normal;"><div class="separator" style="clear: both; display: inline !important; text-align: center;">
<b id="internal-source-marker_0.35913173598237336" style="font-weight: normal; text-align: -webkit-auto;"><span style="font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;">3) Apply “This build is parameterized” check box and add following parameters to each of the job separately .</span></b></div>
</b></b></h1>
<span id="internal-source-marker_0.4754765050020069">
</span>
<br />
<ul style="font-weight: bold; margin-bottom: 0pt; margin-top: 0pt;"><span id="internal-source-marker_0.4754765050020069">
<li dir="ltr" style="font-family: Arial; font-size: 15px; list-style-type: circle; vertical-align: baseline;"><b id="internal-source-marker_0.35913173598237336" style="font-weight: normal; text-align: -webkit-auto;"><span style="vertical-align: baseline; white-space: pre-wrap;">name</span></b></li>
<li dir="ltr" style="font-family: Arial; font-size: 15px; list-style-type: circle; vertical-align: baseline;"><b id="internal-source-marker_0.35913173598237336" style="font-weight: normal; text-align: -webkit-auto;"><span style="vertical-align: baseline; white-space: pre-wrap;">svnUrl</span></b></li>
<li dir="ltr" style="font-family: Arial; font-size: 15px; list-style-type: circle; vertical-align: baseline;"><b id="internal-source-marker_0.35913173598237336" style="font-weight: normal; text-align: -webkit-auto;"><span style="vertical-align: baseline; white-space: pre-wrap;">state</span></b></li>
</span></ul>
<span id="internal-source-marker_0.4754765050020069">
<span id="internal-source-marker_0.35913173598237336" style="text-align: -webkit-auto;"><b style="font-weight: normal;"><span style="font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;"></span></b><br />4) Create a local repository (A folder in you local file system) to check out the artifacts.<br />eg: /home/user1/repository<br /><br />5) for promote Build job add the following script ( Build → Add build step → execute shell). Please change the values appropriately to suit your environment</span></span>
<br />
<pre><code>#!/bin/bash
if [[ "${state}" == "Testing" ]] ;
then
## repository location
cd /media/data/wso2/support/repository/
svn checkout $svnUrl
## svn checkout location (This will be repository url + ‘qa’ as
## QA artifact was store in our repository
## https://svn.wso2.org/repos/wso2/scratch/greg-scm-test/qa/
cd /media/data/wso2/support/repository/qa
cp -r ./$name
## Location of the Testing server
/media/data/wso2/support/wso2qaesb-4.5.0/repository/carbonapps/0/
fi
if [[ "${state}" == "Production" ]] ;
then
cd /media/data/wso2/support/repository/
svn checkout $svnUrl
## svn checkout location (This will be repository url + ‘prod’ as
## Production artifact was store in our repository
## https://svn.wso2.org/repos/wso2/scratch/greg-scm-test/prod/
cd /media/data/wso2/support/repository/prod
cp -r ./$name
## url of the Production server
/media/data/wso2/support/wso2prodesb-4.5.0/repository/carbonapps/0/
fi
</code></pre>
</div>
<div>
<span style="text-align: -webkit-auto;"><span style="font-family: Courier New; font-weight: normal;"><span style="font-size: 15px; white-space: pre-wrap;"><br /></span></span><b style="font-weight: normal;"><span style="font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;"></span></b></span>6) For demote Build job use the following action ( Build → Add build step → execute shell)<span style="text-align: -webkit-auto;"><br /><b style="font-weight: normal;"><span style="font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;"></span></b></span>
<br />
<pre><code>#!/bin/bash
if [[ "${state}" == "Testing" ]] ;
then
## location of the local ‘QA’ artifacts are stored.
cd /media/data/wso2/support/repository/qa
svn update
cd /media/data/wso2/support/wso2qaesb-4.5.0/repository/carbonapps/0
rm -rf ./$name
fi
</code></pre>
</div>
<span style="text-align: -webkit-auto;"><br /><b style="font-weight: normal;"><span style="font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;"></span></b></span>7) When you promote as in the script it will deploy the artifact to Development server and when demote it will remove the Application from Carbon server which will respectively deploy/ undeploy<br />
<br />
8) You need to have similar script for artifact deployment from initial project to developer location which is not covered in the sample.<br />
<br />
<b style="font-weight: normal;"><span style="font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;"></span></b>
</div>
Anonymoushttp://www.blogger.com/profile/11874278867021490476noreply@blogger.com3