How to download YouTube videos using Linux Terminal?

Using youtube-dl

1. Open the Linux Terminal. [Press ctrl+alt+t]
2. Install youtube-dl
sudo apt-get install youtube-dl
3. Copy the link of YouTube video and use this command to download.
youtube-dl “Youtube-Video-URL”
Example: youtube-dl

That’s it YouTube video will download to your present working directory.

youtube-dl supports to many websites. You can use this tool to download video from many websites.
List of supported websites:

Read documentation for more options:

There are lots of options available like download only audio from video file, download video in different supported format, download subtitles of video, bulk download etc. many more.

Get details by using this command
youtube-dl Help Command
youtube-dl -h

Download video with particular format and resolution.
You can get all available formats for particular video. You can also select your prefered resolution of the video.
youtube-dl -F YouTube-Video-Link-URL

youtube-dl -F

Download YouTube Video
Use format code to download video with your preferred format.
I am downloading this YouTube video with .flv format with 400×240 resolution.

Example: youtube-dl -f 5

Using cclive – lightweight video extraction tool

It is used to download videos from YouTube or other websites.
1. Open the Linux Terminal. [Press ctrl+alt+t]
2. Install cclive
sudo apt-get install cclive
3. Copy the link of YouTube video and use this command to download.
cclive “Youtube-Video-URL”
Ex: cclive

That’s it YouTube video will download to your present working directory.

Other options
Download the best available format of the media.
cclive -f best “YouTube-Video-URL”

More Details:

Posted in Linux Tagged with: , ,

Generate jar with spring dependencies using maven

The issue while generating Uber jar with Spring dependencies using maven is that Jar generation is the final spring.handlers and spring.schemas does not contain all required xsd locations. The root cause for this issue is while combining all the dependecies, generation process also copies META-INF of individual jar into the Uber jar’s META-INF folder. Due to this there is a possibility that some jar’s META-INF content might be overriden by another Jar’s META-INF content if the file names are same.
As in Spring we have this issue because individual jars of spring – (spring-core.jar, spring-beans.jar, spring-expression.jar, spring-aop.jar, spring-context.jar, spring-context-support.jar, spring-jms.jar, spring-tx.jar, spring-jdbc.jar, spring-orm.jar, spring-oxm.jar, spring-web.jar, spring-webmvc.jar, spring-test.jar)

contains their own spring.handlers and spring.schemas in their META-INF folder.

I was getting below error after generating uber jar:

Caused by: org.xml.sax.SAXParseException; lineNumber: 14; columnNumber: 33; cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'context:annotation-config'.

Here is the solution for this problem -Use AppendingTransformer which will merge all spring.handlers into one file, similarly for spring.schemas file in single spring.schemas which will be copied inside META-INF/spring.schemas.

									implementation ="org.apache.maven.plugins.shade.resource.AppendingTransformer">
									implementation ="org.apache.maven.plugins.shade.resource.AppendingTransformer">

Hope this post will help you. Also please let me know if you are facing any issues which generating uber jars.

Posted in Java Tagged with: , ,

How to compare strings in Java?

To compare strings in java you should always use equals() method instead of == operator. == operator will work with constants but not for runtime objects.
compare strings in java

public static void main(String[] args) {

String str1="Techvark";
String str2="Techvark";

String str3=new String("Techvark");
String str4=new String("Techvark");

String str5="";

if(str1==str2){ //if both are constants
System.out.println("case 1: equal");

if(str2.equals(str3)){ //if one is constant and str3 is created at runtime
System.out.println("case 2: equal");
if(str3.equals(str4)){ //if both string created at runtime
System.out.println("case 3: equal");
if(str3.equals(str4.intern())){ //if both string created at runtime and use of intern method
System.out.println("case 4: equal");
if(!str4.equals(str5)){ //use of Not equals
System.out.println("case 5: not equal");

Posted in Java Tagged with: , ,

Best Ways to Learn Python Online

List of websites to learn Python online

1. Official Python tutorial. Best website to get all documentation related to Python.
The Python Official Tutorial

2. Good Python Tutorial with examples, questions, videos.
Learn Python the Hard Way

3. Learn Python with online practical lessons.

4. Learn Python from Google Education.
Google’s Python Class

5. Join Online Course at Coursera.

6. Learn Python with step by step visual execution of code.
Online Python Tutor

Benefits of Python on other programming languages

1. Easy to learn Python.
2. Writing code in Python is easy compared to other programming languages.
3. Line of code is less compared to other programming languages.
4. Python has powerful libraries to perform any operation.
5. Fast programming and execution of code.
6. Readability of Python code is easy.
7. Easy to use different data structures in Python.

Hope you like this post. ūüôā

Posted in Programming Tagged with: , ,

iPhone 6 Plus 5.5 inches screen

iphone 6 plus

After many months of rumours, leaks and speculation, the new iphone 6 plus is launched today (9 sept). Actually there are two version released – Iphone 6 and Iphone 6 plus. These both phones are with “Retina HD” display which is 4.7 inches for iphone 6 and 5.5 inches for iphone 6 plus.
The resolution for iphone 6 is 1334×750 and for iphone 6 plus is 1920×1080.
As these two mobiles are the thinnest phones ever apple launched. Apple 6 with 6.9mm and 6+ with 7.1mm body.

iphone 6 plus backside

These two smartphones are powered by new A8 processors which are twenthy five percent faster than the perivious version of processors which is A7. And also A8 processor has extremly good graphic rendring power which is fifty percent times faster than previous releases. There is also claims about improved battery power. These both handsets are build with 802.11 ac wifi support which can offer 1gbps speed to a phone.

These two phones are enabled with phase detection technology with auto focus feature which can offer you DSLR camera capabilities.

Here are the phone price details:
16GB iPhone 6 – $199 on contract
Other options ($299 for 64GB, $399 for 128GB),iphone 6 plus
16GB iPhone 6 Plus – $299
Other options ($399 for 64GB, $499 for 128GB)


Please share this post with your friends and let me know your feedback.

Posted in Iphone Tagged with: , ,

News in Shorts – A Best App To Get News in Just 60 Words

news in shorts

If your time is precious and you don’t like lengthy news articles then this app is best for you. News in Shorts provides news to you in short, concise way. You will get complete news in just 60 words. It brings to you top news in curated form.

News in Shorts Android App Link
News in Shorts iTunes App Store Link
News in Shorts Website Link [for other devices]

news in shorts

Just add this app and get summarized news in your phone with best user experience.

Posted in Android Tagged with: , , , ,

Command flushdns in Windows 7 or Windows 8

run cmd command

How to flush dns in windows 7 or windows 8?

In all OS(operating systems) dns data is cached which is provided by DNS server (IP Address /DNS details), this is required to increase the dns lookup for the subsequent request to the same domain/hostname. In some cases you will see error page or invalid host page for a given host. This can be because the dns details cached at your computer is not valid anymore. So in that case you need to clear dns cache. There are commands available in each OS. These command clears the cache and then next time dns client will get the latest data from dns server.(when the next request triggers)

Command flush dns cache data in windows 7 –

Here are the steps you can follow for flushing dns-


  • Press windows key + R to get “Run command” window (or goto start menu and click on ‘Run..’)

run cmd command

  • Type ‘cmd’ and click OK


  • Now you will see command window
  • Type ‘ipconfig /flushdns’ and press enter key

ipconfig flushdns windows7

you will see ‘Successfully flushed the DNS Resolver Cache’


To flush dns cache data in windows 8¬†–

  1. It is same as above but the only difference is you need to run the ‘command prompt’ by pressing the windows key and typing cmd.
  2. Make sure you run the cmd.exe in administration mode – “run as adminstrator” (this option you have to select by right clicking the command prompt)
  3. Then you will see screen as shown above.
  4. Type the same command – ipconfig /flushdns
  5. You will see the success message ‘Successfully flushed the DNS Resolver Cache’

It is also advised that you close your all the browser before you flush dns as this will clear browser in-memory dns cache as well.

Please let us know if you are still facing issue, Write down in comments, we will try to solve your windows related problems. Please share this blog on facebook.

Posted in Windows Tagged with: , , , ,

A Best Book for Technical Interview Preparation for Top IT Companies

book for coding interview

If you are looking for technical job in top IT companies like Google, Microsoft, Facebook etc. then you must have good problem solving skills. You should be good in data structures and algorithms. If you are preparing for coding interview then this book surely helpful for you. This is one of the best book to improve your coding skills, improve data structures and make ready for technical interviews.

Book Name: Cracking the Coding Interview: 150 Programming Questions and Solutions

Author: Gayle Laakmann McDowell(Founder/CEO,
book for coding interview

This book is recommended by many software engineers who are working in top IT companies.

This book aims to provide you with all the information that you need, to prepare for your interview, as you get ready to apply for the best jobs in the field of software development. The author gives you all the technical know-how that you need to have to come out of your interview, with flying colours.

This book is one that spans over 500 pages. It is inclusive of 150 detailed questions and answers on programming interviews. The author has also made sure to provide you with lots of other information and advice that you might need before your interview.

The book covers seven major topics, which are The Interview Process, Behind The Scenes, Special Situations, Before The Interview, Behavioural Preparation, Technical Questions (+5 Algorithm Approaches) and 150 Programming Questions And Answers. The answers to these questions are written almost completely in Java (excluding those questions that are based on C/C++).

Posted in Career, Jobs Tagged with: ,

Iphone 6 – Photos, Specs, Price

iphone 6 photos

The iPhone 6 is one of the most anticipatory version of Iphone smartphones of this year mean while Apple’s iPhone 5s now completing its first year, all iphone lovers flooded by iphone 6 rumours . This post conjunct all of those rumors into one place, so you will be knowing more about the inPhone 6 device before the device is launched later this year. We calibrated the possible iPhone 6 release date, ¬†price rumours.

We also collected some iPhone 6 photos for you:

iphone 6 box


iphone 6 photos iphone 5 slimiphone-6-photos_7iphone-6-photos_2iphone 6 photosiphone-6-photos_vs_iphone_5_backiphone-6-photos_vs_iphone_5s_screeniphone-6-photos_3


iPhone 6 release date

The iphone 6 release date is almost final as it should be on 9 th September  2014, it will be perfect date as for ios 8 rollout.

There will be another launch in October 2014 РIpad Air. For these two events Apple German stores has postponed employee holiday plan. ,

Possibilities are that there will be two version of iphone   a 4.7-inch iPhone 6 and a 5.5-inch phablet. These two models are going to launched together.

All previous Iphone’s release dates:

iPhone 5 s/5 c September, 2013
iPhone 5 September, 2012
iPhone 4 s October, 2011
iPhone 4 June, 2010
iPhone 3 GS June, 2009
iPhone 3 G July, 2008
iPhone 1st gen June, 2007

iPhone 6 effulgence

  • iPhone-6 Release date: 9th September 2014
  • iPhone 6 Price in indian rupees
  • 1)Same as existing: 16GB (46000 INR), 32GB (57000 INR), 64GB¬†(65000 INR)
  • iPhone-6 Screen sizes: 5.5-inches
  • iPhone-6 possible new features:
    • Up to 128GB internal storage with¬†expandable storage
    • iOS 8¬†OS
    • Heart rate EarPods
    • Near Field Communication chip
    • A8 processor chip
    • Wireless charging Feature
    • Better camera
    • Pre configured with¬†Apple’s iWatch
Posted in Iphone Tagged with: , , ,

Best Way to Learn Java Online using Video Tutorials Free

Java video tutorials

I tried learning Java online using video Tutorials by John Purcell on Udemy. This way I learn lot of basics of Java development. John Purcell explained core Java concepts in very good way with sample examples. He explained core Java in 75 lectures(16+ hours). More than 200000 students already enrolled in this course on Udemy. This course is focused for beginners who want to learn Java development.
Follow this link to enroll in this course:-
Just need to free signup to join this wonderful course of Java development.

Get Sample Java Examples Based on Core Java.

how to do:

  1. You can download java jdk(java development toolkit) from
  2. You can download Java 7 or Java 8. Please make sure you download proper version as per your computer processor ( java jdk for 32 bit or java jdk for 64 bit).
  3. You can also read and learn more details about java at oracle’s java tutorial website.¬†
  4. If you want to compile java online then you can try this online compiler for java :


So let’s start to learn Java online.

learn Java

If you like this post or want to help others to learn Java then share with others.

Posted in Programming, Tutorial Tagged with: ,

Sponsored Links

Facebook Page