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