Sunday, 24 August 2014

Knowledge Transfer


1) Who hosted the Game which was initially called as British Empire Games 2014 and who is going to host in 2018?
Ans :
    2014     
    Glasgow    
Scotland
2018
Australia

2) Story of Girlfriend and Boyfriend:
Boyfriend had collected many gold coins. He did not want anybody to know about him. One day his girlfriend asked, “How many gold coins do we have?”  After pausing a moment, he replied,” Well! If I divide the coins into two unequal numbers, then 48 times the difference between the two numbers equals the difference between the square of the these numbers.” Girlfriend looked puzzled. Can you help her by finding out how many gold coins boyfriend has?
Ans :48
Exp :Two unequal numbers : x and y
48(x-y)=x^2 – y^2
ð                      x+y=48

3) 3, 6, 18, 90, 63o,?
Ans :6930
Exp : 3, 3*2=6, 6*3=18, 18*5=90, 90*7=630, 630*11=6930
  
4) Introducing a boy, a girl said, "He is the son of the daughter of the father of my uncle." How is the boy related to the girl?
Ans : Brother/ Cousin Brother

The father of the boy's uncle the grandfather of the boy and daughter of the grandfather sister of father.

5) If 15th August, 2008 is Friday then what day will fall on 15th August, 2018?
Ans :Wednesday

6)Name any three countries which share the same date of independence as India (excluding India, holiday name might be different for them).
Ans :
August 15
1971
Independence from the United Kingdom in 1971
August 15
1960
Independence from France in 1960.
August 15
1947
Independence from the United Kingdom on 15 August 1947.
August 15
1945
Independence from Japan was declared on March 1, 1919. Holiday is celebrated on August 15, anniversary of independent Korean governments creation on August 15, 1948

Liechtenstein

August 15

7) The owner of a jewellery shop hired 3 watchmen to guard his diamonds, but a thief still got in and stole some diamonds. On the way out, the thief met each watchman, one at a time. To each he gave ½ of the diamonds he had then, and 2 more besides. He escaped with one diamond. How many did he steel originally.
Ans :36
Exp :No. of diamonds before he gave some diamonds to the third watchman = x-(x/2+2)=1
ð              X-4/2=1  àx=6
Hence he had 6 diamonds before he gave 5 to the third watchman.
Similarly, x-4/2=6  à x=16 (number of diamonds before giving to second watchman)
And also x-4/2=16 à x=36
Therefore, thief stole 36 diamonds

8) 480, 240, 720, 180, 900, 150, ?
Ans :1050
Exp: 480, 480/2=240, 240*3=720, 720/4=180, 180*5=900, 900/6=150, 150*7=1050

9) Deepak said to Nitin, "That boy playing with the football is the younger of the two brothers of the daughter of my father's wife." How is the boy playing football related to Deepak?
Ans : Brother
Father's wife mother. Hence, the daughter of the mother means sister and sister's younger brother means brother. Therefore, the boy is the brother of Deepak.

10)What is the angle between the minute hand and the hour hand when the time is 03:40 hours?
Ans: 130
The total angle made by the minute hand during an hour is 360o. If it takes 360o for an hour, it will take 40/60*360= 240o. The angle between the hour hand the minute hand will therefore, be somewhere between 240 - 90 = 150o, as the hour hand is between 3 and 4.
The angle made by the hour hand when it moves from say 3 to 4 will be 30
o. That is the hour hand makes 30o during the course of an hour.
The hour hand will therefore, move 40/60*30
= 20o.
Therefore, the net angle between the hour hand and the minute hand will be 150 - 20 = 130
o. 

Tuesday, 8 July 2014

How to deploy a Eclipse Java Web Dynamic Project on TomCat


  1. Setup Apache Tomcat on your Sys.
    • Usually all you have to do is download the current version, unzip it, and start it by running apache-tomcat-folder\bin\startup.bat. (You can also donwload an installer and set it up as windows service. Check this link for more details).
    • Make sure you test it before continuing (open its address on a browser, something like http://yourinstaceaddress.com:8080/).
  2. Export your web application .war file
    • In Eclipse, right click on a Web project and select Export. Then select WAR file in the Export window and then select Next. Choose the project, the .war file name and folder to export. More detailed explanation can be found here and here (with pictures).
  3. Deploy the .war file to your Tomcat Server
    • The, by far, simplest way to do this is to place your .war (say myapp.war) file in your apache-tomcat-folder\webapps\ folder.
  4. Test your web app

Saturday, 21 June 2014

Install Decompiler in Eclipse Helios

Simple steps need to follow to install Decompiler,makes your life easy :

Steps:
1)  Open Eclipse IDE of Helios.
2) Click Help->Install New software.
3) Paste URL(http://feeling.sourceforge.net/update) and give name you want like Decompiler.
4) Select the Eclipse Class Decompiler.
5) Click on Next and accept agreements.
6) Install it, some ok and next.
7) Restart Eclipse and check now.

You will have decompiler installed, njy :)

Saturday, 10 May 2014

HTML Overview - Basics-3

1) Absolute Links :
Absolute links are those that include the entire pathname. In most cases, you use absolute links when linking to pages or sites that are not part of your own Web site.
<a href="http://www.yahoo.com">Visit Yahoo!</a>
2)Relative Links :
Relative links are called so because you don’t include the entire pathname of the page to which you are linking. Instead, the pathname you use is relative to the current page.
<a href="contactSk.html">Contact Sumit K</a>
3) Create an Anchor :
An anchor is a place within a page that is given a special name, enabling you to link to it later.
Sample for moving from Top to bottom or vice versa on same page using anchor tag:
https://drive.google.com/file/d/0BwyaWKtCo9z7dUsxTUlaUUlYZFU/edit?usp=sharing
4) E-mail Addresses :
When you want to give someone easy access to your e-mail address, you can include it on
your page as a mailto link.
<a href="mailto:ksumit@gmail.com">Email Sumit K!</a>
OR
<a href="mailto:ksumit@gmail.com?Subject=HTML
Book&cc=blogbooks@gmail.com"> Email me about this Blog</a>
5) Change Link Colors :
Attributes of the body tag to customize the three link colors of aWeb page: normal link colors (link), visited link colors (vlink) and active link colors (alink).
<body bgcolor="#ffffff" text="#000000" link="#003366" vlink="#999999"
alink="#ff33cc">
6) "alt" attribute of the img tag to provide alternative text for an image or an alternate image.
<img src="photo.jpg" width="391" height="274" alt="This photo of my blog, when i first started." />
7) Lists : Three different types of lists possible in HTML:
Ordered lists (ol) : default bullets (1,2,3,...)
Unordered lists (ul) : default bullets (disc sign)
Definition lists (dl)
   My favorite bikes are:
  <ol>
    <li>Bullet</li>
    <li>Pulsar</li>
    <li>Twister</li>
  </ol>
  The end tag for li is optional in HTML, but required in XHTML
  <dl>
  <dt>Coffee</dt>
  <dd>Black hot drink</dd>
  </dl>
8) Table and address :
Files for the reference, please follow the link below
Address:  https://drive.google.com/file/d/0BwyaWKtCo9z7TDJzcWoxN1NhXzQ/edit?usp=sharing
Table and address:  https://drive.google.com/file/d/0BwyaWKtCo9z7d1c0a2Q1X3JUSXM/edit?usp=sharing

HTML Overview - Basics-2

1) HTML is case-insensitive and, in fact, very forgiving. This means all of the following three examples would be considered the same by the browser:
● <html>
● <HTML>
● <HTml>
whereas XHTML is case-sensitive and requires all tags to be lowercase. Of the three previous examples, the browser would properly interpret only the first.
2) HTML doesn’t require quotation marks unless the value of an attribute contains a hash mark or a space, as in the following case:
<font face="Times New Roman">
XHTML does require all attribute values to be placed within straight quotation marks.
3) Comments or notes you need to add to your Web pages
<!-- Remember to like this(ksumitinfo.blogspot.com) blog if you like the info -->
4) CSS offers three types of style sheets:
 ● Inline : Styles are embedded right within the HTML code they affect.
  <h2 style="font-family: verdana;color: #003366">
 ● Internal : Styles are placed within the header information of the Web page, and then
 affect all corresponding tags on the page
 <head>
 <title>CSS Example</title>
 <style type="text/css">
 <!--
 h2 {font-family: verdana; color: blue}
 .red {font-family: verdana; color: red}
 -->
 </style>
 </head>
● External : Styles are coded in a separate document, which is then referenced from  within  the header of the actual Web page
5) Nonbreaking space character entity (&nbsp;)
6) Preformat : 
The only time pressing the RETURN or ENTER key in your page creates line breaks in the browser view is when the pre tag is used. Short for preformat, the pre tag renders text in the browser exactly as you type it.
7) Horizontal Rules :
One way you can separate sections of your Web page is to use the hr tag. By default, this tag produces a thin, gray horizontal line called a horizontal rule.
8) Logical Styles :
<abbr>  Indicates an abbreviation 
<acronym> Indicates an acronym 
<cite> Marks a reference to another source or a short quotation, italic
<dfn> Highlights a definition or defined term, italic
<em> Provides general emphasis, italic
<strong> Provides a stronger general emphasis than with <em>, bold
<var> Suggests a word or phrase that is variable and should be replaced with a specific value, italic
9) Physical Styles : 
<b> bold
<big> increases the font size by 1 each time it is used,(maximum size is 7,default size is 3)
<i> italic
<tt> typewriter font
<small> decreases the font size by 1 each time its used,(minimum sizeis 1,default sizeis 3)
<strike> Strikethrough
<sub> subscript
<sup> superscript
<u> underline

HTML Overview - Basics-1

1) HTML  : Hypertext Markup Language
2) HTML is a means of telling a Web browser how to display a page.
3) HTML files have an .html or .htm file extension.
4) URL : uniform resource locator.
5) The Web was mostly text based until Marc Andreessen created the first graphical Web browser in 1993, called Mosaic. This paved the way for video, sound, and photos on the Web.
6) Web server is a computer, running special software, which is always connected to the Internet.
7) A Web browser is a piece of software that runs on your personal computer and enables you to view Web pages. Web browsers, often simply called “browsers,” interpret the HTML code and provide a visual layout displayed on the screen. Many browsers can also be used to check e-mail and access newsgroups.
8) Dynamic HTML (or DHTML) is a newer version of HTML, in which page content is easily changed and customized on the fly, without having to send and receive additional information from the server. Style sheets, used especially in DHTML.
9) JavaScript is a scripting language designed to give Web pages more interactivity than can be achieved through HTML. Even though the name might make you think otherwise, JavaScript is different from Java, which is a full programming language.
10) !DOCTYPE :  Tells the browser which set of standards your page adheres to 
-Lists the standard (see the section “The Three Flavors of XHTML”) 
–Identifies the location of the standard by linking to the URL.
11) The Three Flavors of XHTML
The W3C has specified that XHTML 1.0 be available in three flavors, or versions, to
accommodate the transition time during which developers and browsers migrate from HTML 4.0 to XHTML. You need to identify your page with one of these three flavors to help the browser validate it. Because most of your pages will probably fall into one of the three categories, you can simply copy-and-paste the DOCTYPE from one page onto all the others.
    a. XHTML Transitional : This is the category under which the majority of your pages will
probably fall. It enables you to use those HTML 4.01 tags that are deprecated, as long as
you also follow the XHTML rules, such as closing all tags (even ones like br, that aren’t
required to be closed in regular HTML). Pages that are transitional are prepared for XHTML,but are also compatible with older browsers that don’t understand XHTML. To validate your pages against this flavor of XHTML, use
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"DTD/xhtml1-transitional.dtd">.
    b. XHTML Strict : Pages that fall into this category don’t contain any deprecated tags.
These pages may not be compatible with older browsers. To validate your pages against
this flavor of XHTML, use
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 
"DTD/xhtml1-strict.dtd">.
    c. XHTML Frameset:  Sites using HTML frames to divide the pages must identify with the
frameset flavor of XHTML. To validate your pages against this flavor of XHTML, use
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
"DTD/xhtml1-frameset.dtd">.

Tuesday, 22 April 2014

PYAR KA WAR -2

     " PYAR KA WAR " - Part 2 (Sequel)

Next din liye hatiyar, aur chla main maidan,
Dekhe to aaj, likha hai kya vidhan.
Dhund dhand ke, mili ek sundar si ladki,
Per jeb main dala hath, to thi bahut kadki. 

Phir bhi himmat juta ke, pahucha uske pass,
Vo to aise khush hui, jaise hu main uske liye khas.
Itni khushi bardash na ho payi mujhse,
Pyar ka bij, pheli bar panpa mujhme.!!!

Jindagi ka har pal kuch alag sa lagne laga tha,
Pyar iss duniya main hota hai, aisa main samajhne laga tha.
Phir vo kehti, ki kahin aadat na pad jaye mujhe apki,
Aur thode hi din baad, hum "Just Friend" keh nikal fatki...

Dil tuta tha, to dard to hona hi tha,
But iss chapter ka, conclusion to nikalna tha.
Ki pyar ke khel main jo bhi uljhe ga,
Muh ke bal, aa ke vo jarur girega.

So, just Rock 'n' Roll 

Note : The characters and incidents portrayed are fictitious and any resemblance to anything is purely coincidental. 

Monday, 21 April 2014

Some General Knowledge Questions


Q1 What can be the maximum number of members those are directly elected from states/UT?
Ans 550
The maximum number of elected members of Lok Sabha is 550. Article 81 of the Constitution provides that not more than 530 members will be elected from the States and not more than 20 members from Union Territories. Article 331 of the Constitution provides that not more than 2 members from the Anglo Indian Community may be nominated by the President of India, if in his opinion that community is not adequately represented in that House.

Q2 Brain cells can’t regenerate (true or false).
Ans False, This is myth that they can’t regenerate, they do generate.

Q3 What is the source and destination Airport scheduled for the missing Malaysia Airlines Flight 370 (MH370/MAS370) on 8 March 2014?
Ans

Flight origin
Destination



Q4 When (Date and Year) was Hindi declared as the Official Language of the Union of India?
Ans 14th Sep, 1949

Q5 The world famous tourist attraction "Mount Rushmore" is located in which country?

Q6 Where was 2014 ICC Women's World Twenty20 scheduled and who won the cup?
Ans Bangladesh, Asutralian Team

Q7 How many squares are there on the chessboard?
Ans 204
1, 8x8 square
4, 7x7 squares
9, 6x6 squares
16, 5x5 squares
25, 4x4 squares
36, 3x3 squares
49, 2x2 squares
64, 1x1 squares