October 2015


Android NDK ( Native Developement Tools) Why ??? How ??? when ??? Where ???

The NDK is a toolset that allows you to implement parts of your app using native-code languages such as C and C++. Typically, good use cases for the NDK are CPU-intensive applications such as game engines, signal processing, and physics simulation.–mobile-2152

Protected: best Mokeup site for android

This content is password protected. To view it please enter your password below:

Android Latest Technology

Finger Print API in Android Latest version

How to Enable nexus phone as dubugger for android

D:\ANDROID 32 BIT\adt-bundle-windows-x86-20140702\sdk\extras\google\usb_driver\

Right click on android_winusb.inf and install it.

Then enable developer and debugger mode from android phone.


How to compapre two date in JAVA

– Return value is 0 if both dates are equal.
– Return value is greater than 0 , if Date is after the date argument.
– Return value is less than 0, if Date is before the date argument.

Date date1 = new Date();
Date date2 = new Date();

    //Do Something

    //Do Something else

SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
        	Date date1 = sdf.parse("2009-12-31");
        	Date date2 = sdf.parse("2010-01-31");

        		System.out.println("Date1 is after Date2");
        	}else if(date1.compareTo(date2)<0){
        		System.out.println("Date1 is before Date2");
        	}else if(date1.compareTo(date2)==0){
        		System.out.println("Date1 is equal to Date2");
        		System.out.println("How to get here?");
Example :2

SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
        	Date date1 = sdf.parse("2009-12-31");
        	Date date2 = sdf.parse("2010-01-31");

        	Calendar cal1 = Calendar.getInstance();
        	Calendar cal2 = Calendar.getInstance();
        		System.out.println("Date1 is after Date2");
        		System.out.println("Date1 is before Date2");
        		System.out.println("Date1 is equal Date2");


Ubuntu Linux Unix

Ubuntu is a computer operating system based on the Debian Linux distribution and distributed as free and open source software, using its own desktop environment. It is named after the Southern African philosophy of ubuntu (“humanity towards others”). As of 2012, according to online surveys, Ubuntu is the most popular Linux distribution on desktop/laptop personal computers, and most Ubuntu coverage focuses on its use in that market.

Ubuntu is sponsored by the UK-based company Canonical Ltd., owned by South African entrepreneur Mark Shuttleworth. Canonical generates revenue by selling technical support and services related to Ubuntu, while the operating system itself is entirely free of charge.KrnDf

Unix was created in 1969 by Dennis Ritchie (also the creator of C programming language) & Ken Thompson

Slowly, an open operating system standardisation was thought of that led to the birth of POSIX (Portable Operating System Interface). The first POSIX standard was published in 1988

Then came 1991, when a college student in University of Helsinki decided to write his own operating system because he wanted a “powerful & Free Unix system“. His name was Linus Torvalds and he developed the 1st version of this new OS ( LINUX ) that was powered by Intel’s 80386 microprocessor (a 32 bit microprocessor launched in 1985)

Unlike other Unix systems, Linux is not a direct descendant of Unix source code. It implements Unix Application Programming Interface (API) defined by POSIX, but is classified as “Mostly POSIX-compliant” & not “Fully-POSIX compliant”

Difference between Unix and Linux

For Time Line,

Watch this Video,

JAVA Certified Cource Content

Types of NOSQL (Important)

  1. Key-Value Store – It has a Big Hash Table of keys & values {Example- Riak, Amazon S3 (Dynamo)}
  2. Document-based Store- It stores documents made up of tagged elements. {Example- CouchDB}
  3. Column-based Store- Each storage block contains data from only one column, {Example- HBase, Cassandra}
  4. Graph-based-A network database that uses edges and nodes to represent and store data. {Example- Neo4J}

Six Important Types of Databases


Comming Soon…..


  1. Apache tomcat server — Apache HTTP Server
  2. Server –Web server– Application Server –Database Server
  7. Procedural Language–Object-oriented language
  10. thread–asyntask

Best tutorial for learn Amazon webservices

Best way to design good api

Download Lecture PDF

[ Part 4 : Connection with Robomongo] MongoDB Development

Visit Previous Post Before visit this……

Step:1  Install Robomongo from any site

Step:2 Open Robomongo


Click on Create


You can write any name:ice_screenshot_20151012-194333  You can add Username and Password also ( optional )


Click on Connect


This is your Database which you already create in Previous Post.



[Part 3 : Usefull Information ] MongoDB Development

In NOSQL Database we use different term of normal database scenario.


Table –> Collection

Tuple/Row –> Document

Column –> Field


[Part 2 : Command and Basic Practical]MongoDB Development

>show dbs    It will show the default Database.

Write this Statements

>a = { title:"Arrested Development", airdate:"November 2, 2003", network:"FOX" }
> b = { title:"Stella", airdate:"June 28, 2005", network:"Comedy Central" }
> c = { title:"Modern Family", airdate:"September 23, 2009", network:"ABC" }
db.<yourdatabase name>.save( varialbe ) : This command save the data.
db.<yourdatabase name>.find() : Show your database content.
To get stats about mongodb server type the command db.stats() in mongodb client. This will show the database name, number of collection and documents in the database. 
>db :To check current database
>use <database name> : To take as your current database
>db.<yourdatabasename>.save( { “name”:”” }  )
>db.<yourtablename>.insert( { “name”:”androidtour” } )
You can also Write direct:
> { a: 1 } )

[Part 1: Basic] MongoDB Developement

Step 1

First install node js

create one file in nodejs folder (node js installed folder) is hello.js

var http = require(‘http’);
http.createServer(function (req, res) {
res.writeHead(200, {‘Content-Type’: ‘text/plain’});
res.end(‘Hello World !’);
}).listen(8080, ‘’);
console.log(‘Server running at;);

Step:2 Install MongoDB from any site

After install go to path C:\Program Files\MongoDB 2.6 Standard\bin

First Step is to set your DB path

Write command mongod.exe –dbpath write your path of your db folder

For go to mongo shell

write command mongo.exe in bin directory.

Note: Make sure all CMD must be open otherwise it will lost Connection.

Can we create static class at top level in JAVA???

Answer is :No

Outer classes cannot be static, but nested/inner classes can be. That basically helps you to use the nested/inner class without creating an instance of the outer class. Java has static methods that are associated with classes (e.g. java.lang.Math has only static methods), but the class itself is not static.

If you want to add static class functionality to top level class then follow below steps:

Java has static nested classes but it sounds like you’re looking for a top-level static class. Java has no way of making a top-level class static but you can simulate a static class like this:

  • Declare your class final – Prevents extension of the class since extending a static class makes no sense
  • Make the constructor private – Prevents instantiation by client code as it makes no sense to instantiate a static class
  • Make all the members and functions of the class static – Since the class cannot be instantiated no instance methods can be called or instance fields accessed
  • Note that the compiler will not prevent you from declaring an instance (non-static) member. The issue will only show up if you attempt to call the instance member.
public class TestMyStaticClass {
     public static void main(String []args){
        System.out.println("Static value: " + MyStaticClass.getMyStaticMember());
        System.out.println("Value squared: " + MyStaticClass.squareMyStaticMember());
        // MyStaticClass x = new MyStaticClass(); // results in compile time error

// A top-level Java class mimicking static class behavior
public final class MyStaticClass {
    private MyStaticClass () { // private constructor
        myStaticMember = 1;
    private static int myStaticMember;
    public static void setMyStaticMember(int val) {
        myStaticMember = val;
    public static int getMyStaticMember() {
        return myStaticMember;
    public static int squareMyStaticMember() {
        return myStaticMember * myStaticMember;

What good are static classes? 
A good use of a static class is in defining one-off, utility and/or library classes where instantiation would not make sense. A great example is the Math class that contains some mathematical constants such as PI and E and simply provides mathematical calculations. 

Usefull site for Android Developer

For create online app in any platform

For create mokeup

Subject and link for Interview of Computer Engineering

————–For beginner/fresher—————

C Basic

Simple Program logic









For understand algorithm basic





Android Architecture

Android Basic

—————–Some advanced topic for JAVA developer———————

Object-oriented design in terms of Programming

Dependency Injection

Scalability in Programs




Dependency Injection in Object Oriented Programming

Best site for learn free cyber security

How to convert Arraylist to String array

dat is the arraylist object

String [ ] data = dat.toArray( new String[dat.size()]);

One of Best site for learn computer technology and practical example

Step after Install JDK [java]

For setup JAVA Environment in your System

Install JDK from oracle

goto your installed java directory

copy the path : C:/programfile/java/jdk(versionname)/bin

Open environment variable setup menu from Computer Properties

In second Box click New and write name as JAVA_HOME and Copy this path without /bin

In PATH:  append this link with /bin



Program in JAVA for remove null production from CFG





* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
package cd;

import java.util.ArrayList;

* @author soham
public class null_removal {

static class OutputPrint {

void print() {

void print(String msg) {

void print(Character c) {

void print(StringBuilder c) {


public static void main(String[] args) throws FileNotFoundException, IOException {
OutputPrint op = new OutputPrint();

byte[] datainBytes;
try (DataInputStream dis = new DataInputStream(new FileInputStream(“file/null.txt”))) {
datainBytes = new byte[dis.available()];
String content = new String(datainBytes, 0, datainBytes.length);
String input = content;
//Split data as per new line
String lines[] = input.split(“\\r?\\n”);
StringBuilder[] sb = new StringBuilder[lines.length];
//Store data in StringBuilder
for (int i = 0; i < lines.length; i++) {
sb[i] = new StringBuilder(“”);

char cm[] = lines[i].toCharArray();
for (int z = 0; z < cm.length; z++) {
if (cm[z] == ‘#’) {
sb[i].deleteCharAt(z – 1);
} else {
//Store nonterminal which contain null in production
MyStack theStack = new MyStack(10);
for (String lin : lines) {
if (lin.contains(“/”)) {

String[] bits = lin.split(“@”);
// TODO: Validate that there are exactly two parts
String first = bits[0];
String second = bits[1];
String production[] = second.split(“/”);
for (String pro : production) {
add_null(pro, theStack, first);
} else {
String[] bits = lin.split(“@”);
// TODO: Validate that there are exactly two parts
String first = bits[0];
String second = bits[1];
add_null(second, theStack, first);
//loop until stack not empty
while (!theStack.isEmpty()) {
Character value = theStack.pop();
//op.print(“Pop Character ” + value);
int k = 0;
for (StringBuilder pro : sb) {
printOutput(pro, op, value, sb, k);
for (StringBuilder d : sb) {
op.print(d.toString() + “\n”);
//Ending Main Code , Method Implementation Start now

//for push non terminal which contain null
public static void add_null(String pro, MyStack theStack, String first) {
//op.print(first, pro);
if (pro.equals(“#”)) {
//op.print(“Found Null”);

//Method for process and replace the RHS of production
public static void printOutput(StringBuilder pro, OutputPrint op, Character value, StringBuilder[] sb, int k) {
int q = k;
String[] bits = pro.toString().split(“@”);
// TODO: Validate that there are exactly two parts
String first = bits[0];
String second = bits[1];
StringBuilder h = new StringBuilder();
//op.print(“Second “+second+”\n”);
if (second.contains(“/”)) {
String production[] = second.split(“/”);
int r = 0;
ArrayList<Integer> number = new ArrayList<>();
for (String sec : production) {
char ch[] = sec.toCharArray();
//for two or more character value
for (int l = 0; l < ch.length; l++) {
if (ch[l] == value) {
//      op.print(“Total Number of ch “+r+”\n”);
if (r > 1) {
for (int l = 0; l < r; l++) {
for (int j = 0; j < sec.length(); j++) {

if (j == number.get(l)) {

} else {
//            op.print(“Append Ch “+ch[j]+”\n”);

appendString(sb, q, h, op);
if (l == r – 1) {
for (int j = 0; j < sec.length(); j++) {
if (ch[j] == value) {
} else {
// op.print(“Append Ch “+ch[j]+”\n”);
appendString(sb, q, h, op);
} else {
if (sec.contains(String.valueOf(value))) {
for (int j = 0; j < sec.length(); j++) {
if (ch[j] == ‘#’ || ch[j] == ‘/’ || ch[j] == value) {
} else {
//op.print(“Append Ch “+ch[j]+”\n”);
appendString(sb, q, h, op);
r = 0;
} else {
if (second.contains(String.valueOf(value))) {
for (int j = 0; j < second.length(); j++) {
char ch[] = second.toCharArray();
if (ch[j] == ‘#’ || ch[j] == ‘/’ || ch[j] == value) {
} else {
//       op.print(“Append Ch “+ch[j]+”\n”);
appendString(sb, q, h, op);
} else {
//   op.print(sb[q]);

//function for append the String
public static void appendString(StringBuilder[] sb, int q, StringBuilder h, OutputPrint op) {
// sb[k].append(“/”);
sb[q].append(“/” + h);
h.delete(0, h.length());
// op.print(sb[q]);

//Method for Stack
public static class MyStack {

private final int maxSize;
private final Character[] stackArray;
private int top;

public MyStack(int s) {
maxSize = s;
stackArray = new Character[maxSize];
top = -1;

public void push(Character j) {
stackArray[++top] = j;

public Character pop() {
return stackArray[top–];

public Character peek() {
return stackArray[top];

public boolean isEmpty() {
return (top == -1);

public boolean isFull() {
return (top == maxSize – 1);



More Detail Comming Soon…..

Design Pattern in JAVA

In software engineering, a design pattern is a general reusable solution to a commonly occurring problem within a given context in software design. A design pattern is not a finished design that can be transformed directly into source or machine code.

Blog at

Up ↑