Friday, January 30, 2015

Bookmark this URL


Plan to start your own company

https://help.collective.com/en/collections/1733061-onboarding-entity-services

Watch World Cup Cricket
Watch World cup 2015 Cricket


Business News
businessinsider.com


Movie Ratings
http://www.rottentomatoes.com/

Find out crime info. in US street wise
http://www.trulia.com/

News
ndtv.com

Good forum site
stackoverflow.com

Best Website to buy anything 
amazon.com

Free Diet Plans
http://www.sparkpeople.com/

Order kids things in India
SnapDeal/
AmazonIndia/

Car Websites (Rental cars App)
http://www.zipcar.com/ (Good web-site. You will get car for an hourly basis in nearby location for cheap)
http://www.enterprise.com/car_rental/home.do
getaround.com (Peer-to-Peer rental cars)

TamilSongs Listen or Download by music Directors
http://tamiltunes.com/music-directors/m-ghibran/

Learn Maths for everything..
http://www.mathsisfun.com 

Prepare for Java Interview
http://www.javacodegeeks.com/2014/04/java-interview-questions-and-answers.html

Improve your Ubuntu Experience

Ubuntu VM : You can have Ubuntu from your windows machine by installing through virtual box.

Unity launcher folders - Easy to organize your browsers, editors, utilities and some more..You can see real Unity feature in Ubuntu experiencing this tool.

System Monitor - Always monitor your system CPU, Memory, Load, Download / upload Speed, Swap, Disk Read / write, File System capacity and more..Small icons can be added in your desktop and you can monitor memory and open your new applications accordingly.

Shutter : It is same as snagIt in windows. Purpose is to capture the selected screenshot. You can capture multiple screenshot and edit the screenshot as well. Open Shutter click 'Selection'. Select the selection area in your computer and Click 'Enter'. The selected image will be in the Shutter session. Powerful screencapture tool with selection, Desktop, Window etc..You can get in Ubuntu Software Center.

FileZilla :  You can use fileZilla for FTP, SFTP and so on in Ubuntu as well. You can get in Ubuntu Software Center.

VLC Media Player: You can play any type of videos and VLC Media player supports very well. You can get in Ubuntu Software Center.

Rhythmbox : It comes default in Ubuntu where you can play your audio songs with the Music section. You can also import and play your song with multiple selection and more options.

Multiple Skype :  Go to your Terminal and type 'skype &' you will get skype window opened. You can login into your skype into multiple accounts at the same time. Download skype from skype.com.

Konsole :  Alternate to Terminal if you bored. You can get in Ubuntu Software Center.

Eclipse :  Very good editor for Java, sql and for many things you can use Eclipse. Great editor. It has syntax Checker, Syntax corrector etc..

Chrome Browser : Download and install Chrome browser. It has bookmark sync with your google account. This is very easy for you to install chrome anywhere and sync with your google account brings your bookmark available. Make sure you signout if you signin bookmark in public computers.

ScreenCast :  Ubuntu wiki link i have attached. Its very nice article about screencast importance and their tool and how to do it with difference ways. Capture your screen in a video with good quality and add your audio for new leaners and for your own reference.In Ubuntu Software Center search for "gtk-recordmydesktop" and install.

a. Click 'Select window' and select your window.
b. Uncheck 'SoundQuality' if you don't want to record audio
c. Click 'Save As' and provide the folder you want to save the file and fileName.
d. Click 'Record' / record in ubuntu desktop icons. recordMyDesktop will start record your video. Click stop in your Ubuntu icons. The file will be saved as .ogv in the selected location with the fileName.

Pitvi (Video Editor) :  Pitvi is a video editor. We can edit the video and combine clips into video and audio and its very good to edit the streaming.

TeaTimeUnity :  From "Ubuntu Software Center" you can install 'Tea Timer' and it will help you giving sound once you tea is ready. The Icon will be added as a shortcut to your desktop widget.

This tool you can use to track your task and it will remind you upon timer completion.

To install Tea Time, add the PPA repository ppa:rojtberg/ppa and install it from the repository using the package name teatime-unity.

Some Useful Commands in Ubuntu

Add ppa into Ubuntu
sudo add-apt-repository ppa:foo/foobar
sudo apt-get update

Install after adding into ppa repository
sudo apt-get install foo  

Remove ppa include downgrading installed packages

Install ppa-purge:
sudo apt-get install ppa-purge

Then purge any ppa via:
sudo ppa-purge ppa:someppa/ppa

If You Trust Cloud

Below tools were available as Apps for FREE in Mobile, Tablet.

Evernote - Place to track your notes, ideas and thoughts and sync anywhere. Revise later or share with friends through email. Add-On plug-in available for browsers.

Dropbox - Keep your documents or any format files and sync the same anywhere. Dropbox supports linux and it acts as a drive to sync all your files. Don't search your files in mails. You can share dropbox links to download.

WunderList - Keep your TODO list in the cloud. It could be shopping items or day to day activity. It has scheduler to remind and you can add subTask too. Keep your shopping list in the cloud and sync anywhere. Wife / Son can update your shopping cart. Daughter can buy in the shop and remove from the cart. sync your activity and smile saying thanks to cloud.

 Mint - Effortless tool to track your bills. Remember those days in paper notebook, excel, carrying small bills to home...forget it. Use your card and "add your card" in Mint. It takes care tracking and reminding you on paying bills on-time. Schedule Weekly / Monthly summary charts and make sure you on it.

LastPass - Don't break your head remembering passwords. Push it to lastPass. Password is encrypted and stored. Plugin available for browsers. You can store and retrieve. Don't type 1000 times the same username and password.

Share your cloud tools and your opinion about keeping data in cloud.




Thursday, January 29, 2015

Quick Intro on MicroStrategy



Why MicroStrategy ?

Its another Business Intelligence tool. But, it has 'N' number of interesting charts (Ring Chart, Heat Chart, Scattered Chart, Map Chart etc..) You can analyse your organization internal and external data to make some business decisions. It has mobile service, cloud service and the performance even in live data reports were really fast.

You can quickly try creating dashboard and reports in cloud without any installation in windows or Mac: 

Try MicroStrategy Analytics in Cloud You can connect to multiple sources and generate dashboard / reports without having hussle on installing..

Install Enterprise Microstrategy Trial  for 30 days by registering your self Register in MicroStrategy

MicroStrategy Intelligence Server
   Intelligence server is an industrial strength analytical server optimized for enterprise querying, reporting and OLAP (Online analytics Processing) analysis


Microstrategy Developer Products (Desktop)
   The developer products provide an integrated development, administration and run-time business intelligence environment on personal computing desktop.


Microstrategy Enterprise Manager
   Enterprise Manager is a monitoring tool that provides usage and resource information of BI environment.


Other Components -> MicroStrategy MDX Cube Provider
   Microstrategy MDX Cube provider is used to access OLAP data source such as IBM Cognos, SQL Server and ORACLE DB...

PreRequistes to Install in Windows: 


1) Download .Net Framework 4.5 and installed
2) In Start -> Search 'Turn windows featurs on and off'
    1) Click'Internet Information Services' -> 
       World wide web services 
        a) security -> Windows Authentication
        b) Application Development features -> select ASP, ASP.net (asp.net for cubes)
        c) common HTTP Features -> select Static content, Default document

'Ok' and install those selected components 
  
3) IE 8 OR 9 OR 10+
  

Quick Links on Youtube to kick start : 



Wednesday, January 28, 2015

More Tips towards JUnit Framework

What is the difference between @Before, @BeforeClass, @After and @AfterClass annotations?

  • @Before public void method()
    The Before annotation indicates that this method must be executed before each test in the class, so as to execute some preconditions necessary for the test.
  • @BeforeClass public static void method()
    The BeforeClass annotation indicates that the static method to which is attached must be executed once and before all tests in the class. That happens when the test methods share computationally expensive setup (e.g. connect to database).
Note : @Before and @BeforeClass will be called after the superclass @Before or @BeforeClass execution if your class is inherited.

@After and @AfterClass also follow the same pattern where method / class call after the execution of @Test method or class completion. @AfterClass (eg close to database). Again superclass method will execute first if your class inherited. @AfterClass method also should be static.

Here is a simple example:


 public class Example {    DatabaseConnection database;
    @BeforeClass public static void login() {
        database= ...;
    }    @Before public void beforeEachTestAnnotateMethod() { }      

@Test public void something() {
          ...
    }
    @Test public void somethingElse() {
          ...
    }    @After public void afterEachTestAnnotateMethod() { }     

@AfterClass public static void logout() {
          database.logout();
    }
 }


More tips towards your Java world


Initialize multiple variable in same line
private int a,b,c,d;
a = b = c = d = 0;

Access Modifier in Java

Access Levels
Modifier Class Package Subclass World
public Y Y Y Y
protected Y Y Y N
no modifier Y Y N N
private Y N N N


Note : "No moidifier" can also call as package-private. Only difference between protected and package-private is protected modifier can be access in subClass.

Why static method can only have static variables & static methods ? 
When you run your java program, static methods call first. So, the methods and variables inside should also be static in order for the static method to be executable.

'final' keyword
final class cannot be superclass (Cannot Inherited by class)
final variable cannot be overwritten. Like constant
final method cannot be override. (Mostly final method will be used in abstract class)

Quotes

Good Quotes to read always
  • If you have anger explain it, don't express it - Control your emotion and explain
  • A penny saved is a penny earned -  Benjamin Franklin
  • Am I efficient ? List your task, estimate yourself and justify yourself - You can only answer about your efficiency not others.
  • To be a successful person first surround with successful people and tried to read more successful people biography to get motivate and you will get your success. 
  • If you been good with your friend, just be as it is. Don't change yourself because your friend did bad to you. Don't change your individuality. If you really hurt on him, Just ignore him and move on.

Tuesday, January 27, 2015

Install Hadoop in a Single Node (Linux / Ubuntu)

What is hadoop ?

The Apache Hadoop software library is a framework that allows for the distributed processing of large data sets across clusters of computers using simple programming models. It is designed to scale up from single servers to thousands of machines, each offering local computation and storage. Rather than rely on hardware to deliver high-availability, the library itself is designed to detect and handle failures at the application layer, so delivering a highly-available service on top of a cluster of computers, each of which may be prone to failures.

You can group lot of small hardWare CPU's as cluster and process / analyse your data using those clusters instead of data getting processed in a single system. 

PreRequisites:
Java 1.6+ (Recommended : Oracle Java)

Update .bashrc or /etc/profiles
export JAVA_HOME=/usr/local/java/jdk1.6.0_25
export JRE_HOME=$JAVA_HOME/jre
export PATH=$PATH:$JAVA_HOME/bin:$JRE_HOME/bin
Note : Make sure JAVA_HOME is set in /etc/profile. So that, java will be available for different users in the machine.
To Check the java version :
$ java -version
Create group and user for hadoop as a best practice
$ sudo addgroup hadoop
$ sudo adduser --ingroup hadoop hduser
Install and Configure ssh & rsync Tool used by hadoop distributed file system (HDFS)
$ sudo apt-get install ssh
$ sudo apt-get install rsync
Note : Make sure sshd is running in your machine
$ ps -ef | grep sshd
$ /etc/init.d/ssh start

Create SSH key for hduser
$ su - hduser
hduser@laptop: ssh-keygen -t rsa -P ""
Note : RSA key should be empty without password

Authorize SSH Key to avoid hdfs to provide password each time
$ cat $HOME/.ssh/id_rsa.pub >> $HOME/.ssh/authorized_keys
hduser$ ssh localhost

Hadoop Installation
Download Apache Hadoop stable version
$ cd /usr/local
$ sudo tar -xvzf hadoop-1.2.1.tar.gz
$ sudo mv hadoop-1.2.1 hadoop
$ sudo chown -R hduser:hadoop hadoop

Configure Hadoop  
Export HADOOP_HOME and add hadoop into bin Path in /etc/profile or hduser .bashrc. Make sure JAVA_HOME also configured
export HADOOP_HOME=/usr/local/hadoop
export PATH=$PATH:$HADOOP_HOME/bin

Update
$ vi /usr/local/hadoop/conf/hadoop-env.sh 
export JAVA_HOME=/usr/local/java/jdk1.6.0_25

Create directory for hadoop.tmp.dir (hadoop storage data files directory)
$ sudo mkdir -p /app/hadoop/tmp
$ sudo chown hduser:hadoop /app/hadoop/tmp
$ sudo chmod 750 /app/hadoop/tmp

Update $HADOOP_HOME/conf/conf/core-site.xml configuration tags with below configuration
<code>
<property>
<name>hadoop.tmp.dir</name>
<value>/app/hadoop/tmp</value>
<description>A base for other temporary directories.</description>
</property>

<property>
<name>fs.default.name</name>
<value>hdfs://localhost:54310</value>
<description>The name of the default file system.</description>
</property>
</code>

Update $HADOOP_HOME/conf/mapred-site.xml configuration tags with below configuration
<property>
<name>mapred.job.tracker</name>
<value>localhost:54311</value>
<description>The host and port that the MapReduce job tracker runs. If "local", then jobs are run in-process as a single map and reduce task
</description>
</property>

Format namenode before you start your daemons
$HADOOP_HOME/bin/hadoop namenode -format
Note : Please execute only in the local environment where you installing hadoop. This command format / delete the entire data from the hadoop distributed file system. It will format and create HDFS directory based on the dfs.name.dir variable declared in the $HADOOP_HOME/src/hdfs/hdfs-default.xml.

Starting your single  node cluster
hduser$ $HADOOP_HOME/bin/start-all.sh
Note : Above command will start NameNode, DataNode, JobTracker and TaskTracker

Check the java process to see the daemons started and check the listening port
$ jps
$ netstat -plten | grep java
Note : Hadoop error log files in the $HADOOP_HOME/logs/ directory. You can see separate log file for each and every daemons.

Hadoop Web UI's and ports
http://localhost:50070/ – NameNode UI
http://localhost:50030/ – JobTracker UI
http://localhost:50060/ – TaskTracker UI

MapReduce Job Examples
  • Make sure hadoop started and above mentioned ports are available
  • Download sample for hadoop from gitHub user.txt
  • Right click and click 'Save Page as'
Create directory in hdfs and copy sample files into hdfs
$ sudo su -
$ cp /home/user/Downloads/user.txt /home/hduser/
$ su hduser
$ hadoop fs -mkdir /samples/hadoop
$ hadoop fs -put /home/hduser/user.txt /samples/hadoop/
Command to run the wordCount example from hadoop
hduser$ cd /usr/local/hadoop
hduser$ hadoop jar hadoop*examples*.jar wordcount /samples/hadoop/user.txt /samples/hadoop-output
Delete existing output folder / folder from HDFS
hduser$ hadoop fs -rmr /samples/hadoop-output
Note : Make sure hadoop-output directory is not exist in hdfs. Hadoop example will create hadoop-output directory with output files. You can increase reduce task by passing "-D" mapred.reduce.tasks
hduser$ cd /usr/local/hadoop
hduser$ hadoop jar hadoop*examples*.jar wordcount -D mapred.reduce.tasks=16 /samples/hadoop/user.txt /samples/hadoop-output
Note : MapReduce job can accepts the user specified mapred.reduce.tasks and doesn’t manipulate. No. of mapper tasks will be decided by daemons based on the input content and available clusters. We cannot pass as input.
Verify the output generated file from HDFS
hduser$ /usr/local/hadoop/bin/hadoop dfs -cat /samples/hadoop-output/part-r-00000
Download the hdfs output file from hdfs to local
hduser$ hadoop dfs -get /samples/hadoop-output/part-r-00000 /tmp/
Command to stop your cluster
hduser$ /usr/local/hadoop/bin/stop-all.sh

Thanks Michael. I modified and added instruction upon my experience while following his blog.
Know more about Apache Hadoop and Developer.com BigData.
Install Cloudera VM, Counters, Partitioning, Combiners
Excellent hortonWorks tutorial



Thursday, January 22, 2015

IoT - Internet Of Things

Internet of things (IoT) is very interesting topic. 

What is IoT ? 

Physical Object + MicroController / Sensor  Or actuators + Internet = IoT

Devices came out relating IoT : 
FitBit -> It measure your steps, calories and sleep and pushes your data to your account. 

MicroController -> microcontroller also call as "small computer".  It has Processor (CPU), Memory (RAM), EPROM (Erasable Programmable ROM), I/O (Input / Output). 

Arduino - Very Interesting tool to take a look as a part of IoT

Sensor -> Is a device that detects events or changes in quantities and provides a corresponding output, generally as an electrical or optical signal;

Input Sensor example -> Keyboard / Mouse

Output Sensor example -> Monitor / Printer. Based on the input signals it converts and show in the monitor to user readable format.

More Examples on IoT 
1) Alarm clock developed based on train schedule. It wakes you up based on your train schedule by connecting into Internet. 
2) Bus Board in the Bus station. Since, every bus has GPS sensor it sends the information to Bus department and data from their delivers to bus stand board for display.
3) Umberalla : Umberalla signal with 'Red' indicator if forecast from BBC says rainy.

GlowCaps, wheredial.com  

The business closed due to technology changes are 
daily newspapers, classifieds which deliver adv. about rental, jobs, post letters, Telephones (Home Phones)..

Read : Designing the Internet of Things written by "Adrian McEwen" was very interesting.

Any IoT interested candidates need help on programming, please feel free to reach me. I am very excited to help you.
// Below script tag for SyntaxHighLighter