Posts

Showing posts from 2017

How to disable indexing or directory browsing ?

To disable indexing or directory browsing you need to follow the steps:   Create a .htaccess file with the following: Options -Indexes

Problem playing hotstar videos in Ubuntu

Play directly in Firefox/Google Chrome In your browser, Open  https://www.hlsplayer.net/  and select M3U8 player (if not selected already) Now we have to get the url to paste it in the input box. First, get id from video page. Say your video page is  http://www.hotstar.com/sports/cricket/india-vs-australia-day-4/2001805383 , id is 2001805383 Open  http://getcdn.hotstar.com/AVS/besc?action=GetCDN&asJson=Y&channel=TABLET&id=123&type=VOD  . (Replace 123 with your actual video page id. Here it is 2001805383) In the json response, get the value of src. This is the url.  Ex : It will be something  like .

How to install Tomcat on Ubuntu

How to install Tomcat on Ubuntu and Integrate with Eclipse search for tomcat.  $ sudo apt-cache search tomcat Install tomcat admin and tomcat  $ sudo apt-get install tomcat7-admin $ sudo apt-get install tomcat7 $ sudo /etc/init.d/tomcat7 start $ sudo /etc/init.d/tomcat7 stop $ sudo /etc/init.d/tomcat7 restart Check for tomcat status sudo service tomcat7 status Open Eclipse:  Add Server and select path till     /usr/lib/tomcat7

SQL Interview Questions and Answers DDL DML queries

Find the below link to see all SQL Queries for Day 1, 2 and 3.😉 Click Here You can even run the above scripts by logging into LiveSQL website by registering on the web portal. 1. HTML stands for Hyper Text Markup Language. 2.  HTML is an improvised version of SGML. 3. SGML stands for  Standard Generalized Markup Language. 4. HTML is an encoding language for creating webpages. 5. HTML consists of Tags and elements. 6 . .html and .htm are extensions for HTML. 7. elements in HTML enclosed in angular brackets are called Tags . 8. Tags are case sensitive. FALSE 9. <body background="images/logo.PNG" bgcolor="yellow" font="red" leftmargin="60"> must be text="red" 10. anchor element marks the text as hyperlink. 11. h1 tag display the heading in big size and h6 tag display the heading in small size.

Java Practice Questions MCQ

1. What is the output? class point1 { static void a (int x, int y) { this.x=x; //non-static variable this cannot be referenced from a static context this.y=y; System.out.println(x+ “,”+y); } } class point { public static void main (String[] args) { point1 pp=new point1(); pp.a(4,3); } } a. 4 ,3 b. 3 ,4 c. Compile Error d. None of the above ------------------------------------------------------------------------------------------------------- 2. Local variables cannot be declared as final.(True / False) .... False ----------------------------------------------------------------------------------------------------- 3. What is the output? class A { A(int x, int y) { this.x=x; this.y=y; } A() { this(2,3); } public static void main(String[] args) { A a1 = new A(); System.out.println(“x=”+a1.x+”,y=”+a1.y); // cannot find symbol x and y } } a. x=2 y=3 b. x=-1