Tuesday, June 27, 2017

HTML Menu

HTML Menu sample program tutorial.


Below code is very simple menu code with css (Cascading Style Sheet)

Code:

<html>
  <head>
    <link rel="stylesheet" href="hyper.css" type="text/css">
  </head>
  <body>
    <a href="a.html">Home</a> | <a href="b.html">Login</a>
  </body>
</html>

Explanation

It will look like this



when clicking on home it will redirect to a.html and when clicking on another menu login it will redirect to b.html.



How to refresh webpage using meta tag to another webpage



Meta Tag Sample Program to refresh webpage and redirect to 
targeted webpage


<! DOCTYPE HTML>
<html>
   <head>
      <title>
         Meta tag 
      </title>
<meta http-equiv="refresh" content="7;url=D:\ASPDoTNet Practical\a.html">
   </head>
   <body>
      hello world
   </body>
</html>


Explanation
Here in this html code meta tag refresh web page in 7 second 
and redirect to a.html page.

Wednesday, April 19, 2017

Android Simple Calculator Source Code

"Android Simple Calculator Source Code", Edit main.xml file and activity file..!Below I addressed two file main.xml and P1Activity.java file for simple android calculator source code, You can easily copy and paste this code into your eclipse or android studio.

main.xml

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:orientation="vertical" >

    <TextView
        android:id="@+id/textView1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="@string/n1"
        android:textAppearance="?android:attr/textAppearanceMedium" />

    <EditText
        android:id="@+id/ed1"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:inputType="number" >

        <requestFocus />
    </EditText>

    <TextView
        android:id="@+id/textView2"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="@string/n2"
        android:textAppearance="?android:attr/textAppearanceMedium" />

    <EditText
        android:id="@+id/ed2"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:inputType="number" />

    <TextView
        android:id="@+id/textView3"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="@string/a"
        android:textAppearance="?android:attr/textAppearanceMedium" />

    <EditText
        android:id="@+id/ed3"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:inputType="number" />

    <LinearLayout
        android:id="@+id/linearLayout1"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="vertical" >

        <TableRow
            android:id="@+id/tableRow1"
            android:layout_width="match_parent"
            android:layout_height="wrap_content" >



            <Button
                android:id="@+id/pluse"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="@string/pluse" />


            <Button
                android:id="@+id/min"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="@string/minus" />

            <Button
                android:id="@+id/mul"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="@string/mul" />
            <Button
                android:id="@+id/div"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="@string/div" />

        </TableRow>

    </LinearLayout>

</LinearLayout>
P1Activity.java

package com.p1;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;

public class P1Activity extends Activity implements OnClickListener {
    /** Called when the activity is first created. */
 EditText ed1,ed2,ed3;
 Button pluse,min,mul,div;
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        ed1=(EditText)findViewById(R.id.ed1);
        ed2=(EditText)findViewById(R.id.ed2);
        ed3=(EditText)findViewById(R.id.ed3);
        pluse=(Button)findViewById(R.id.pluse);
        min=(Button)findViewById(R.id.min);
        mul=(Button)findViewById(R.id.mul);
        div=(Button)findViewById(R.id.div);
        pluse.setOnClickListener(this);
        min.setOnClickListener(this);
        mul.setOnClickListener(this);
        div.setOnClickListener(this);
        
    }
 public void onClick(View arg0) {
  // TODO Auto-generated method stub
  
  String st1=ed1.getText().toString();
  String st2=ed2.getText().toString();
  int p=Integer.parseInt(st1);
  int r=Integer.parseInt(st2);
  
  if(arg0.getId()==R.id.pluse)
  {
   double a=p+r;
   
   ed3.setText(""+a);
   
  }
  else if(arg0.getId()==R.id.min)
  {
   double a=p-r;
   
   ed3.setText(""+a);
   
  }
  else if(arg0.getId()==R.id.mul)
  {
   double a=p*r;
   
   ed3.setText(""+a);
   
  
  }
  else if(arg0.getId()==R.id.div)
  {
   double a=p/r;
   
   ed3.setText(""+a);
   
  }
  else
  {
   
  }
 }
}

Friday, December 9, 2016

Shortcut Tips

1.How to quickly Log-off Computer

Ans: Start Button+Press L

2.Want Alarm Clock Online?

Ans: http://kukuklok.com 

3.How to make beautiful online wallpaper?

Ans:http://bighugelabs.com

Tech and Tips

Some Basic Meaningful Answer

1.What is the meaning of 32k & 64k SIM ?

Ans: It Means your SIM is Operating in the frequency of 32khz or 64khz & your sim is a GSM SIM Card.


2.What is Auxiliary Memory ?

Ans:Devices that provide backup storage are called Auxiliary memory. They holds information that are not presently used by devices (computer).

3.Forgot Computer Password?

Ans: 1. Restart PC
         2. Press F5 key
         3. Select-Safe Mode
         4. Select Control Panel
         5. Select Administrator
         6. Goto User Account
         7. Remove Password
         8. Restart..Enjoy...!

4.Microsoft office is now online!

Ans: Edit your office work anywhere, anytime

Address: http://office.microsoft.com/en-in/web-apps/

Thursday, December 8, 2016

How To Download Free IEEE, Springer and Any Scholarly Paper

Follow This Step to download free IEEE, Springer and any Scholarly Paper

1.Find a Paper which is want to download.

2.Find DOI Number which is given in paper. write down this number or copy this(Ctrl+C).


3.Start new Tab in Browser and enter the website (https://sci-hub.tw/) and (https://libgen.is/)in address bar and Press Enter.



4.Find Search Box and Paste DOI number and open it, sometimes website will ask to write captcha      code before opening the article or paper.

5.Click on Download...!Enjoy..!

Black Hole Attack Survey Paper

Prevention and Detection of Black Hole Attack in MANET: A Survey
-Mitul Bhatt, Hinaxi Patel, Swati Kariya


Abstract


         Mobile Ad-hoc Networks (MANETS) are the networks which are temporary, dynamic, self-configurable and self-maintainable. MANET’s nodes are communicated with each other as being in dynamic topology and without any fix infrastructure. In MANET each and every node acts as a client and server. Any node in the MANET can join and leave the network without any permission. In MANETS have different types of security active attacks like Black Hole, Worm Hole, Grey Hole and Sink Hole Attack which disrupts the network or gaining the data by attacker. Black Hole Attacks are serious security risk to the routing protocol in MANETS. Black Hole Attacks are a kind of attacks where a malicious node advertise itself a shortest path during routing discovery and redirect the data towards malicious node. Malicious node dropped the data or its desired destination instead of original destination. In This Paper focuses of various prevention and detection methods for Black Hole Attack described.

Download Link