Tuesday, 6 December 2016

basic web page desinging






<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>self trail</title>

<style>
/*.WebContainer{
    width: 100%;
    height: auto;
}*/
/*.articles{
    width:90%;
    height: auto;
    margin: auto;
}*/
/*body, html {
    margin: 0px;
    padding: 0px;
}*/

.Container {
    width: 90%;
    min-width: 500px;
    margin: auto;
}

header {
    width: 100%;
    height: 120px;
    line-height: 120px;
    background-color: pink;
}

    header span {
        color: #fff;
        font-size: 30px;
        padding-left: 20px;
    }

/*nav {
    width: 100%;
    height: 40px;
    background-color: grey;
}*/
ul.tab {
    list-style-type: none;
    margin: 0;
    padding: 0;
    overflow: hidden;
    border: 1px solid #ccc;
    background-color: #f1f1f1;
}

/* Float the list items side by side */
ul.tab li {float: left;}

/* Style the links inside the list items */
ul.tab li a {
    display: inline-block;
    color: black;
    text-align: center;
    padding: 14px 16px;
    text-decoration: none;
    transition: 0.3s;
    font-size: 17px;
}

/* Change background color of links on hover */
ul.tab li a:hover {
    background-color: #ddd;
}

/* Create an active/current tablink class */
ul.tab li a:focus, .active {
    background-color: #ccc;
}

/* Style the tab content */
.tabcontent {
    display: none;
    padding: 6px 12px;
    border: 1px solid #ccc;
    border-top: none;
}

.content {
    width: 100%;
    height: 700px;
    padding: 10px 0px;
    background-color: skyblue;
}

footer {
    width: 100%;
    height: 80px;
    background-color: #808080;
    margin-bottom: 20px;
}

.main_articles {
    width: 70%;
    float: left;
    height: 650px;
    margin-left: 10px;
}

.side_article {
    width: 25%;
    float: right;
    height: 600px;
    border-left: 1px dotted #6d6d6d;
}

.siteDescription {
    display: -moz-box; /* Firefox*/
    display: -webkit-box; /* Chrome */
    display: -ms-flexbox; /* IE 10 */
    display: flexbox;
    flex-direction: row;
    flex-align:start;
    width: 95%;
    height: 150px;
}

/*.desImage {
    -webkit-box-ordinal-group: 1; /* iOS 6-, Safari, Opera*/
   /* -moz-box-ordinal-group: 1; /* Firefox*/
    /*-ms-flex-order: 1; /* IE 10 */
    /*-webkit-order: 1; /* Chrome */
   /* flex-order: 1;
    width: 200px;
    height: 150px;
}

    .desImage img {
        width: 200px;
        height: 150px;
        margin-left: 5px;
        border: 2px solid #6d6d6d;
    }
*/
.des {
    margin-left: 15px;
    -webkit-box-ordinal-group: 2; /* iOS 6-, Safari, Opera*/
    -moz-box-ordinal-group: 2; /* Firefox*/
    -ms-flex-order: 2; /* IE 10 */
    -webkit-order: 2; /* Chrome */
    flex-order: 2;
    width: 70%;
    height: 140px;
    background-color: #e9e9e9;
    padding: 5px;
}
/*@media all and (max-width: 900px) {
    .side_article { /* Hide advertisement panel*/
        /*display: none;
        visibility: hidden;
    }*/

  /*  .siteDescription {
        width: 100%; /* Earlier 70%*/
   /* }
/*
    .main_articles {
        width: 90%;/* Earlier 95%*/
 /*   }
} */
/*@media all and (max-width: 700px) {

    header {
        height: 90px; /* Earlier 120px*/
     /*   line-height: 90px; /* Earlier 120px*/
   /* }

        header span {
            font-size: 20px; /* Earlier 30px*/
     /*   }

    .des {
        width: 50%; /* Earlier 70%*/
    /*    background-color: #e9e9e9;
    }
}
@media all and (max-width: 500px) {
    header {
        height: 70px;
        line-height: 70px;
    }

        header span {
            font-size: 16px;
        }

    .side_article {
        display: none;
        visibility: hidden;
    }

    .main_articles {
        width: 90%;
    }

    .siteDescription {
        width: 95%;
        height: auto;
        display: block;
    }

    .desImage {
        margin: auto;
        width: 90%;
        height: auto;
    }

        .desImage img {
            width: 95%;
            margin-left: 5px;
        }

    .des {
        margin: auto;
        margin-top: 10px;
        width: 90%;
        height: 300px;
        background-color: #d9d9d9;
    }
}*/
body, html {
    margin: 0px;
    padding: 0px;
    background-color: #ededed;
    font-family: 'Trebuchet MS';
}
/*
@media only screen and (max-device-width: 480px), only screen and (-webkit-min-device-pixel-ratio: 2) , screen and (-webkit-device-pixel-ratio:1.5){
    .Container {
        width: 90%;
        min-width: 480px;
        margin: auto;
    }

    header {
        width: 100%;
        height: 150px;
        line-height: 150px;
        background-color: #313131;
    }

        header span {
            color: #fff;
            font-size: 35px;
            padding-left: 20px;
        }

    nav {
        width: 100%;
        height: 70px;
        background-color: #ff6a00;
    }

    .content {
        width: 100%;
        height: 900px;
        clear:both;
        padding: 10px 0px;
        background-color: #fff;
        font-size:35px;
    }

    footer {
        width: 100%;
        height: 80px;
        background-color: #808080;
        margin-bottom: 20px;
    }

    .main_articles {
        width: 95%;
        float: left;
        height: auto;
        margin:auto;
    }

    .side_article {
        display: none;
        visibility: hidden;
    }

    .siteDescription {
        width: 95%;
        height: auto;
        display: block;
        margin:auto;
    }

    .desImage {
        margin: auto;
        width: 100%;
        height: auto;
    }

        .desImage img {
            width: 100%;
            height: 100%;
            margin-left: 5px;
            border: 2px solid #6d6d6d;
        }

    .des {
        margin: auto;
        margin-top: 10px;
        width: 100%;
        height: 300px;
        background-color: #d9d9d9;
        padding: 5px;
    }
}*/
.ads {
    width: 90%;
    margin: auto;
    margin-top: 10px;
    height: 150px;
    text-align: center;
    padding-top: 10px;
    background-color: #e5eff3;
}
</style>
</head>
<body>
        <div class="Container">
            <header>
                <span>yemmy pizza shop </span>
            </header>
            <nav>
<ul class="tab">
  <li><a >Cheese pizza</a></li>
  <li><a >Mushroom pizza</a></li>
  <li><a >Chiken pizza</a></li>
  <li><a >Corn Pizza</a></li>
  <li><a >veg Pizza</a></li>
 
 
</ul>

            </nav>
            <div class="content">
                <section class="main_articles">
                    <article class="siteDescription">
                        <div class="desImage">
                            <img src="pizza.png" />
                        </div>
                        <div class="des">
                            yemmy pizzzaaa......
                        </div>
                    </article>
                </section>

                <aside class="side_article">
                    <div class="ads">
                        pizza 1.
                    </div>

                    <div class="ads">
                        pizza 2.
                    </div>
                </aside>
            </div>
            <footer>
            </footer>
        </div>

</body>
</html>

read and write file in java

writter:

package file.writer.and.reader;
import java.io.*;

/**
 *
 * @author Vishnuyardini
 */
public class writter {
    public static void main(String ... arg)
    {
        try{
   FileWriter fw=new FileWriter("abc.txt");
   fw.write("hai parwez.. this is my first task.. i did this");
   fw.close();
  }
        catch(Exception e){System.out.println(e);}
  System.out.println("success content was success fully write");
 }
    }


reader:

package file.writer.and.reader;
import java.io.*;

/**
 *
 * @author Vishnuyardini
 */
public class reader {
    public static void main(String... arg)throws Exception{  
        try (FileReader fr = new FileReader("abc.txt")) {
            int i;
            while((i=fr.read())!=-1)
                System.out.print((char)i);
        }  
    
}
}

fetch link from webpage

import org.openqa.selenium.By;

import org.openqa.selenium.WebDriver;

import org.openqa.selenium.WebElement;


import org.openqa.selenium.chrome.ChromeDriver;
import java.util.*;
public class link1 {


public link1() {
// TODO Auto-generated constructor stub
}


public static void main(String[] args) throws InterruptedException {

String driverPath=System.getProperty("user.dir")+"/drivers/chromedriver.exe";
System.setProperty("webdriver.chrome.driver",driverPath);
WebDriver driver = new ChromeDriver();

driver.get("https://www.thesun.co.uk/");
List<WebElement> links=driver.findElements(By.tagName("a"));


for(WebElement link:links){

 System.out.println(link.getAttribute("href"));
}

System.out.println("URL-----"+links.size());
}

}

Monday, 5 December 2016

Spiritual Mother

Spiritual Mother
If the disciple enters the mental sphere of the guru, surrendering all belongings to him, it takes only seven months to deliver him into the brighter world. But the process is generally delayed for a considerable time because while living in the guru's mental sphere, the disciple retains the consciousness of his own thoughts and feeling. Thus we find that the position of a guru is much the same as that of a mother. The conception of guru as a spiritual mother promotes in us feelings of love, reverence and surrender, which are the main factors of spiritual life.
  

Thursday, 1 December 2016

change the port number of glass fish server

How To Change Port Number Of GlassFish

If GlassFish and Oracle Database are installed in the same system, it results in port conflict as both of them use port 8080.
Here is the procedure to change port number of GlassFish so that you can run GlassFish at a different port number from Oracle to avoid the port conflict.
  1. Find out the folder where GlassFish is installed.
    If you installed GlassFish along with NetBeans, you can find out the folder where GlassFish is installed by using the following procedure.
    • Select Services window by using Window -> Services in NetBeans IDE
    • Expand Servers node and select GlassFish Domain
    • Right click and select Properties option from popup menu
    • On the right of Domains Folder you can see the folder where GlassFish is installed. For example : C:\netbeans6.8\glassfish-v3\glassfish\domains You can also see the other details regarding Glassfish such as port number, in the same window.
  2. Go to the folder where Glassfish in installed.
  3. Go into config folder which is as follows: c:\netbeans6.8\glassfish-3\glassfish\domains\domain1\config
  4. Open domain.xml using any text editor.
  5. Look for 8080 and change it to some other port number that doesn’t conflict with other port numbers. I generally change it to 9999.
  6. Save domain.xml.
  7. Now you need to remove GlassFish from NetBeans and add it again so that NetBeans IDE understands the new port number. For this do the following:
    • In Servers window of NetBeans, remove GlassFish by using RemoveServer button after selecting GlassFish server
    • Click on AddServer and select GlassFish V2 or GlassFish V3 and click on Next
    • Select the Installation Location of GlassFish and click on Next
    • Accept defaults and click on Finish
  8. Restart GlassFish, if it was already running.

Monday, 28 November 2016

Example for Priority and Severity

Example for High Priority and High Severity :-

 Suppose there is ATM Machine hope everyone is aware of ATM ma machine which is used for banking transactions. If ATM machine has bug like when user withdraw money from same bank ATM for which he is holding bank account, He is getting charged by 20 rs per transaction. Which is invalid as bank policy says withdrawing money from owns bank ATM no charge will be applied.

So this bug is high priority  because Bank is charging 20 rs per transaction for own ATM which is opposite to business logic. 

and bug is high severity this bug need to resolved immediately because thousands of user withdraw money per hour so it cost high. 

Example for High Priority and Low Severity Bug

Suppose there is ATM machine. Every one use ATM machine for daily transactions.
When you visit ATM machine sometime you may see advertisements from bank on festival season. Suppose on 2nd Oct on occasions of Gandhi jayanti (Last date to do saving is 3rd oct) bank is giving 0.5% extra (basic 5 % + additional 0.5%= 5.5%) additional interest for senior citizens on savings. This advertisement need to flash on or before 3rd oct. Suppose you visited ATM on 4th Oct morning and still you are seeing this add and date displaying in advertisement is 3rd oct last date to do savings.

Here priority is high as advertisement is flashing on multiple ATMs after end of date to do savings. and Impact is not much as date displaying in  advertisement 3rd oct
 means scheme is already over so severity is low . So need to stop this advertisement on priority.

so this is one of example of high priority and low severity


    Now about the next Example for Low Priority and Low Severity Bug. Here we can talk about well know and well used website portal. Yahoo.com. Everyone knows logo of Yahoo.com. Suppose while updating the website they made a spell mistake in a content. Its fine it wont impact much. User can still use the website. Its not mean that no need to fix this bug. Bug need to be fix but on Low Priority and Low Severity Bug.

    This bug is in Low Priority because - Its fine it wont impact much. User can still use the website and can be fix after some time.
    This bug is in Low Severity because - Its fine it wont impact much. User can still use the website 



    Example of low priority and high severity bug

    This is the best example for low priority and high severity bug. Lest's think there is Banking application who gives interest of rs 2 for every 1000 rs in account on the last day of year. Means on last day of year 31.12.YYYY the bank will deposit 2 rs interest for every 1000rs in account. Now bank found a bug that instead of 2 rs application giving interest of 4 rs for every 1000 rs in account. Means due to bug interest is going double.

    This bug is high severity - Due to bug interest is going double and bank may have thousands of accounts, So it will not be profitable for bank.

    This bug is Low priority  - Depositing interest is happen on last day of year so if its beginning of year like January then there is lot of time to solve this bug .


    agile methodology

    1)SCRUM
    2)Lean and Kanban
    3)Extrem programming
    4)Crystal
    5)Dynamic system development
    6)feature driven developement