Sunday, 8 April 2012

log base 2 or x in java or any other programming language

if you want to take log base 2 or 3 or 4 or any thing the standard formula for base conversion


x is the base and M is the value you want to take log.

Now only for base 2





Wednesday, 21 March 2012

Using MySQL server in java netbeans 6.8

I found many codes to connect with MySQL Server i tried that ones, but fails to connect.  after a long effort i found that you just need to add the MySQL JDBC Drivers to your project libraries.
right click on libraries folder in your project and click on add library. you will see a list of libraries just select the required labray and click on add. the simply use this code.


Friday, 10 February 2012

ID3 Code With Missing Value Attributes Handling

The algorithm ID3 (Quinlan) uses the method top-down induction of decision trees. Given a set of classified examples a decision tree is induced, biased by the information gain measure, which heuristically leads to small trees. The examples are given in attribute-value representation. The set of possible classes is finite. Only tests, that split the set of instances of the underlying example languages depending on the value of a single attribute are supported.

Tuesday, 18 October 2011

android : Open folder with default application using Intents without Mime Types

Two ways to do do so.
1)
                String path="File Path";
                Intent intent = new Intent();
                intent.setAction(android.content.Intent.ACTION_VIEW);
                File file = new File(path);
               
                intent.setData(Uri.fromFile(file));
               
                startActivity(intent);

Monday, 3 October 2011

Burning Sand 2 Hello World Example

WRITE ELEMENT:Earth 210 230 40 CENTER TEXT "Hello World!"

Brainfuck Hello World Example

++++++++++[>+++++++>++++++++++>+++>+<<<<-]
>++.>+.+++++++..+++.>++.<<+++++++++++++++.
>.+++.------.--------.>+.>.

boo Hello World Example

print "Hello, world!"

BlooP, FlooP Hello World Example

 DEFINE PROCEDURE ''HELLO-WORLD''[N]:
   BLOCK 0: BEGIN
       PRINT['Hello, world!'];
   BLOCK 0: END.

BlitzBasic Hello World Example

Print "Hello, world!"
WaitKey

BLISS Hello World Example

%TITLE 'HELLO_WORLD'
MODULE HELLO_WORLD (IDENT='V1.0', MAIN=HELLO_WORLD,
        ADDRESSING_MODE (EXTERNAL=GENERAL)) =
BEGIN

    LIBRARY 'SYS$LIBRARY:STARLET';

    EXTERNAL ROUTINE
       LIB$PUT_OUTPUT;

GLOBAL ROUTINE HELLO_WORLD =
BEGIN
    LIB$PUT_OUTPUT(%ASCID %STRING('Hello, world!'))
END;

END
ELUDOM

BITGGAL Jihwaja Hello World Example

J( 1 TM 5 ZV 3 "Hellow, world" )

BITGGAL AgileDog Hello World Example

T 
 1 "Hellow, World"
 0

Befunge Hello World Example

"!dlrow olleH">v
               :
               ,
              ^_@

BCPL Hello World Example

GET "LIBHDR"

LET START () BE
$(
    WRITES ("Hello, world!*N")
$)

bc Hello World Example

"Hello, world!"

Batch Hello World Example

echo hello world

BASIC Hello World Example

10 REM Hello World in BASIC
20 PRINT "Hello World!"

Bash or sh Hello World Example

echo 'Hello, world!'

Ball Hello World Example

write Hello, *s world *n

Baan Tools Hello World Example

function main()
{
    message("Hello, world!")
}