Tuesday, 2 September 2014




ANDROID HISTORY
Company / developer Google
Open Handset Alliance
Written in C (core), C++, Java (UI)[1]
OS family Unix-like
Working state Current
Source model Open source[2] and in most devices with proprietary components[3]
Initial release September 23, 2008[4]
Latest release 4.4.4 KitKat / June 19, 2014; 2 months ago[5]
Latest preview Android L developer preview / June 26, 2014; 2 months ago[6][7]
Marketing target Smartphones
Tablet computers
Available in Multi-lingual (46 languages)
Package manager Google Play, APK
Platforms 32-bit ARM, MIPS,[8] x86,[9] x86-64
Kernel type Monolithic (modified Linux kernel)
Userland Bionic libc,[10] mksh shell,[11] native core utilities with a few from NetBSD[12]
Default user interface Graphical (Multi-touch)
License Apache License 2.0
Modified Linux kernel under GNU GPL v2[13]
Official website www.android.com

Thursday, 19 December 2013

wallpepars









java overview

4
An Introduction to Java Programming
M
T
W
R
F
S
S
DAY
DAY
1
P2/V4sqc7 TY Java in 21 Days 030-4 sdv 12.22.95 Ch01 LP#4
Hello and welcome to
Teach Yourself Java in 21 Days
! Starting today and for the next three weeks
you’ll learn all about the Java language and how to use it to create applets, as well as how to create
stand-alone Java applications that you can use for just about anything.
An
applet
is a dynamic and interactive program that can run inside a Web page displayed
by a Java-capable browser such as HotJava or Netscape 2.0.
The
HotJava
browser
is a World Wide Web browser used to view Web pages, follow links, and
submit forms. It can also download and play applets on the reader’s system.
That’s the overall goal for the next three weeks. Today, the goals are somewhat more modest,
and you’ll learn about the following:
ν
ν
What exactly Java and HotJava are, and their current status
ν
ν
Why you should learn Java—its various features and advantages over other program-
ming languages
ν
ν
Getting started programming in Java—what you’ll need in terms of software and
background, as well as some basic terminology
ν
ν
How to create your first Java programs—to close this day, you’ll create both a simple
Java application and a simple Java applet!
What Is Java?
Java is an object-oriented programming language developed by Sun Microsystems, a company
best known for its high-end Unix workstations. Modeled after C++, the Java language was
designed to be small, simple, and portable across platforms and operating systems, both at the
source and at the binary level (more about this later).
Java is often mentioned in the same breath as HotJava, a World Wide Web browser from Sun
like Netscape or Mosaic (see Figure 1.1). What makes HotJava different from most other
browsers is that, in addition to all its basic Web features, it can also download and play applets
on the reader’s system. Applets appear in a Web page much in the same way as images do, but
unlike images, applets are dynamic and interactive. Applets can be used to create animations,
figures, or areas that can respond to input from the reader, games, or other interactive effects on
the same Web pages among the text and graphics.
Although HotJava was the first World Wide Web browser to be able to play Java applets, Java
support is rapidly becoming available in other browsers. Netscape 2.0 provides support for Java
applets, and other browser developers have also announced support for Java in forthcoming
products.
NEW
TERM
∗
030-4s CH01.i
1/29/96, 8:34 PM
4

Saturday, 19 October 2013

Concatenate two strings

\\ Concatenate two strings
 
 
 
#include <iostream>
#include <string>

using namespace std;

int main()
{
  string str1("A");
  string str2("B");
  string str3("G");
  string str4;

  cout << "  str1: " << str1 << endl;
  cout << "  str2: " << str2 << endl;
  cout << "  str3: " << str3 << "\n\n";

  // Concatenate two strings.
  str4 = str1 + str3;
  cout << "str4 after begin assigned st1+str3: " << str4 << "\n\n";

  return 0;
}

Friday, 18 October 2013

Arrays of pointers to functions

\\ Arrays of pointers to functions

 
 
 
#include <iostream>
 
 void Square (int&,int&);
 void Cube (int&, int&);
 void Swap (int&, int &);
 void GetVals(int&, int&);
 void PrintVals(int, int);
 
 int main()
 {
     int valOne=1, valTwo=2;
     int i;
     const int MaxArray = 5;
     void (*pFuncArray[MaxArray])(int&, int&);
 
     pFuncArray[0] = GetVals; 
     pFuncArray[1] = Square; 
     pFuncArray[2] = Cube; 
     pFuncArray[3] = Swap; 
     pFuncArray[4] = Square; 
 
     for (i=0;i<MaxArray; i++)
     {
         pFuncArray[i](valOne,valTwo);
         PrintVals(valOne,valTwo);
     }
     return 0;
 }
 
 void PrintVals(int x, int y)
 {
     std::cout << "x: " << x << " y: " << y << std::endl;
 }
 
 void Square (int & rX, int & rY)
 {
     rX *= rX;
     rY *= rY;
 }
 
 void Cube (int & rX, int & rY)
 {
     int tmp;
 
     tmp = rX;
     rX *= rX;
     rX = rX * tmp;
 
     tmp = rY;
     rY *= rY;
     rY = rY * tmp;
 }
 
 void Swap(int & rX, int & rY)
 {
     int temp;
     temp = rX;
     rX = rY;
     rY = temp;
 }
 
 void GetVals (int & rValOne, int & rValTwo)
 {
     std::cout << "New value for ValOne: ";
     std::cin >> rValOne;
     std::cout << "New value for ValTwo: ";
     std::cin >> rValTwo;
 }

Search a two-dimension array

 \\ Search a two-dimension array
 
#include <iostream> 
#include <cstdio> 
using namespace std; 
 
int main() 
{ 
  int i; 
  char str[80]; 
  char numbers[10][80] = { 
    "A", "322", 
    "B", "976", 
    "C", "037", 
    "D", "400", 
    "E", "873" 
  }; 
 
  cout << "Enter name (A): "; 
  cin >> str; 
 
  for(i=0; i < 10; i += 2)  
    if(!strcmp(str, numbers[i])) { 
      cout << "Number is " << numbers[i+1] << "\n"; 
      break; 
    } 
   
  if(i == 10) cout << "Not found.\n"; 
   
 
  return 0; 
}