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

Monday, January 25, 2016

Android Survey Article


 A Survey Permission Based Mobile Malware Detection
-
Mitul S. Bhatt,Hinaxi Patel,Swati Kariya


Abstract

          Smartphone have been widely used in recent years due to their functionality, thus they also become attack targets of malware. Android provides a permission category that requires each application to explicitly request permission before it can be installed to run. Permissions are silent work when it is given request by the user, means over privileged permissions action going towards malicious purpose. Reverse engineering process application is repacked with the malicious permissions. Android provides inter process communication to other application are able to leak user’s location, data and identity. To protect from malicious application it is needed to have some control mechanism to analyze application from malicious activity. This paper focuses of various permission based malware analysis method to detect malwares in android application.

Download Link


http://ijcta.com/documents/volumes/vol6issue5/ijcta2015060536.pdf