Vicky’s Programming and Management Archive
21
Nov

How to connect to access database in java without a DSN

   Posted by: admin   in java

Hi,

The following code connects to an access database “multilingual.mdb” located in the default folder of the java code. It does not requires to create a dsn for the same

CODE

try
{
Class.forName(”sun.jdbc.odbc.JdbcOdbcDriver”);
String myDB = “jdbc:odbc:Driver={Microsoft Access Driver (*.mdb)};DBQ=multilingual.mdb”;
Connection c = DriverManager.getConnection(myDB,”",”");

Statement s=c.createStatement();

ResultSet rss=s.executeQuery(”select naam from table1 where id=1″);

rss.next();
String st=rss.getString(1);

System.out.println(”string=”+st);
}
catch (Exception ex)

{
ex.printStackTrace();
}

Hi People, The following is my analysis on the Pricing and Promotion strategies of Sun Microsystems.

Pricing Strategy followed by Sun Microsystems: Java

Java is a programming language originally developed by James Gosling at Sun Microsystems and released in 1995 as a core component of Sun Microsystems’ Java platform.

Java is an Open Source Language .i.e. One does not have to Pay Sun Microsystems for downloading the Source code of Java. But then the Questions is: How does Sun Microsystems generate revenue from Java?

In 1996, Sun created Java and the terms under which it is distributed. Since then, the Java Community Process (JCP) has emerged, allowing companies to participate in shaping language changes, but the ownership of trademarks, licensing agreements, branding, and other fundamental product issues remains unchanged. One is reminded of this fact every time the Sun MicrosystemsTM trademark appears alongside the Java coffee cup logo, or when one is greeted with the message “brought to you by Sun Microsystems” at www.java.com. For anyone to use the Java-compatible logo on a product requires verification against the test compatibility kit (TCK), for which one has to enter into negotiations with Sun. Java, the technology, the trademark, and the language, are owned by Sun.

The current licensing agreements for Java generate revenue for Sun in two ways; one is through direct fees to its licensees, and the other is through indirect revenue generated off the back end of Java’s success.

Besides the above Java also generates revenue by conducting certificate programs and certifications exams like SCJP, SCJD, etc. Clearing these examinations is just like getting a degree which shows that the degree holder has a good knowledge of Java and these certifications are very important for an IT Personnel’s CV. Sun Microsystems charges around 7200 INR for these examinations

When asked how much income is generated from Java, Jonathan Schwartz, CEO of Sun, replied, “about $13 billion.”

Conclusion

Thus Sun Microsystems have not priced their actual product, but they have priced the services that people would require after using their product.

The reason Sun Microsystems could do this is that there a very few competitors in the market and in spite of the competition, Java is the best among them.

Promotion Strategy followed by Sun Microsystems: Java

Promotion through developers

Prior to java there were many programming languages for different Operating systems, Examples include C, C++, FoxPro, Visual Basic, etc. But there was one major common problem with all these languages; these languages were Platform Dependent .i.e. They had to be compiled differently on different Operating Systems .i.e. If a developer develops a code in C language and compiles the code on say Windows Operating System, then that code would not work on Linux Operating system, thus increasing the burden of the developer to compile the code again for Linux and Other Operating System.

Thus there was a great demand for a Programming Language that is Platform independent during the 1990’s. Sun Microsystems soon captured this Niche Segment of the Developers through its Platform Independent Language Java. On top of that the source code of Java was made open source to the developers all over the world. Any developer could download the source code from the website of Sun and use the code free of cost. Sun Microsystems used the fastest means of distribution .i.e. the Internet as their distribution Channel.

The main idea behind making the source code open source was to push the brand to the developers. Sun Microsystems was aware of the fact that the developers will in turn push the brand to many customers and enterprises, thus creating a cumulative effect, and Sun would earn through Licensing and Certifications. That is what Sun Microsystems is doing these days.

Sun Microsystems has also started a Developer network (SDN) to solve the problem faced by the developers that are using Java. This is to give their target audience a better service and support.

Promotion through software applications and Web servers

Soon after the launch of Java, Sun Microsystems also launched its Internet surfing browser Netscape Navigator which was developed totally on the Java Programming language. This move was taken to show the developers the extent to which Java can be used and how developers can add new features in their software using Java.

Sun Microsystems also developed a Web server called Apache Tomcat server to handle web requests in the form of HTTP. This also facilitated the promotion of Java, as the server was built on the Java Platform. (Please note that: A web server is a computer with equipped softwares where the web sites are hosted).

Again, all these facilitated pushing the Java brand to the Developers which was Sun Microsystems’ Main target.

Publicity

Soon after the launch, the Java source code became very popular among the developers. Many people started discussion forums, blogs & eLearning websites on Java Programming on the Internet. Thus, Java gained a lot of Publicity through its developer network and soon became very popular. Also, the increasing popularity of Java triggered the publishing of articles on Java in the Newspaper and online News portals like Forbes Newsletter, etc.

Conclusion

Thus, Sun Microsystems targeted only the Developer network and pushed the brand to Developers who in turn pushed it to the rest of the world.

13
Oct

How to Earn online through your Web site

   Posted by: admin   in Uncategorized

Many youngsters these days want to earn online, but hardly anyone knows how to do that.

It is actually very simple, if some one guides you in the entire process, otherwise it is very difficult. You can earn online by making your own web site and then advertising through your site. You can advertise in many ways, some of the most well known form of online advertising is google adsense, yahoo publisher, infolinks and many more.

The process of earning online

A typical process of earning online is as follows

  1. Register your domain name and web space for that domain.
  2. Build your site (Typically a CMS driven site) through which you can update your content daily. A blog like the current site or a forum (Click to see our forum) are the best examples of such a site
  3. Upload Good content on your site.
  4. Integrate or Place advertisements on your Web site. (Please note that anyone would place ads on your site only if your site is getting good number of hits and hits will come only if your site has good quantity as well as quality content)
  5. Get paid for the ads on your site.
  6. Thats it

The best part is that it costs hardly anything. People are making millions of money per month through the above process and guess what!!!! they hardly invested few dollars in the process. That is the Power of IT.

You can read more success stories by following this link : https://www.google.com/adsense/static/en_US/Success.html

Even you can have a success story like theirs. Believe me it can seriously get you millions (if not millions then at least thousands) just at the cost of few bucks.

If you are interested in earning online, then please contact us. We will guide you in the entire process.

You can contact us on the following numbers (India) : (+91) 9892388510, 9967433963, 9702115577, 9611191486

OR drop us an e mail. Click here to get our Contact details

Thanks

Vicky Jain

vickyjain05@gmail.com, vicky@convergenceservices.in

www.convergenceservices.in

I was trying to set default focus to a textfield which was placed in a joptionpane, but it wast working with the following code

cvendor.requestFocus();

whereas the same code worked perfectly when the textfield was placed in a jpanel. On research i found that the default focus in a joptionpane is always on the OK button and it cannot be changed statically, it can only b changed during runtime using the Runnable interface. Here is the code that did the trick

javax.swing.SwingUtilities.invokeLater(new Runnable() {//<—–add
public void run() { cvendor.requestFocus(); }});//<—-add

nn=JOptionPane.showConfirmDialog(null,Jop,”Please enter details”,JOptionPane.CANCEL_OPTION,JOptionPane.QUESTION_MESSAGE);

kool na………..

30
Sep

Accessing windows registry using java

   Posted by: admin   in java

Hi guys,

You can edit, change or delete any windows registry key values using java.

All you need to do is download d JNI interface for Windows registry from the following link

Click  JNI Registry to download the package

This package has many classes through which we can access the registry.

Hi guys,

I  found this kool info on forex currency trading….some good secrets are revealed.

Please follow this link to read the article.

http://jabr-fx-online-trading.blogspot.com/

Hope it helps some1

27
Sep

How to convert String to double in ASP.Net

   Posted by: admin   in .Net

Hi guys,

Converting a string to integer or double in .Net is very much similar to that in java.

Here is the code

double x=Double.Parse(”"+100.1);

Output

x=100.1

Hi Folks,

This is really interesting about flash. It can just read, but never write. We can read XML files in flash as well as data can be read, but we cannot write using flash. Due, to security reason, We cannot write anything into any file on neither the local file system nor the server file system using flash. Flash is not authorized to do so. Same is the case with databases. Flash cannot connect to databases as well. The problem seems to be a very serious one, but isnt. There is a very simple solution to this

Solution

Just use any scripting language like ASP, PHP, ASPX, etc. All you need to do is pass the variables that you wanna save to any scripting page and that scripting page would do the needful of connecting to database, or writing into any file. The action script code and the asp (i used asp as my scripting language) code for doing this is as follows

Flash Action Script Code

import mx.controls.*;

var send_lv:LoadVars = new LoadVars();
// define the component instances on the Stage.
var uname:TextInput;
var email:TextInput;
var phone:TextInput;
var address:TextArea;
var btnReset:Button;

var name_label:Label;
var email_label:Label;
var url_label:Label;
var comments_label:Label;

//set color of labels
name_label.setStyle(”color”, “0xFFFFFF”);
email_label.setStyle(”color”, “0xFFFFFF”);
url_label.setStyle(”color”, “0xFFFFFF”);
comments_label.setStyle(”color”, “0xFFFFFF”);

// set the tabbing order for the components
this.uname.tabIndex = 1;
this.email.tabIndex = 2;
this.phone.tabIndex = 3;
this.address.tabIndex = 4;
this.btnReset.tabIndex = 5;

Selection.setFocus(uname);
// when the clear button is clicked, set the form fields to empty strings.
var clearBtnListener:Object = new Object();
clearBtnListener.click = function(evt:Object) {
uname.text = “”;
email.text = “”;
phone.text = “”;
address.text = “”;
};
this.btnReset.addEventListener(”click”, clearBtnListener);

// when the next button is clicked, send the form values to the server using a LoadVars object.
var nextBtnListner:Object = new Object();
nextBtnListner.click = function(evt:Object) {
// if the name is blank, display an error message using the Alert component.
if (uname.text.length == 0) {
Alert.show(”Please enter your Name.”, “Error”, Alert.OK);
Selection.setFocus(uname);
return false;
}
//if email
if (email.text.length == 0) {
Alert.show(”Please enter your Email.”, “Error”, Alert.OK);
Selection.setFocus(email);
return false;
}
// if phone
if (phone.text.length == 0) {
Alert.show(”Please enter your Contact No.”, “Error”, Alert.OK);
Selection.setFocus(phone);
return false;
}
// make sure the comments_ta TextArea instance isn’t blank.
if (address.text.length == 0) {
Alert.show(”Please enter your Address.”, “Error”, Alert.OK);
Selection.setFocus(address);
return false;
}

// if all the required fields have been filled in, create a LoadVars object instance and populate it.

send_lv.name = uname.text;
send_lv.email = email.text;
send_lv.phone = phone.text;
send_lv.address = address.text;

gotoAndStop(5);

};
this.btnNext.addEventListener(”click”, nextBtnListner);

ASP File code to insert records(data passed by flash) into a database

<%

Dim conn,rs
set conn=server.CreateObject(”ADODB.Connection”)

conn.Open “Provider=Microsoft.Jet.OLEDB.4.0;Data Source=” & Server.mappath(”opinionpoll.mdb”)
set rs=server.createobject(”ADODB.recordset”)
rs.open “opinion”,conn,0,2

rs.addnew
rs.Fields(”name”) = request.form(”name”)
rs.Fields(”email”) = request.form(”email”)
rs.Fields(”phone”) = request.form(”phone”)
rs.Fields(”address”) = request.form(”address”)
rs.Fields(”Q1″) = request.form(”q1″)
rs.Fields(”Q2″) = request.form(”q2″)
rs.Fields(”Q4″) = request.form(”q4″)
rs.Fields(”Q5″) = request.form(”q5″)
rs.Fields(”Q3″) = request.form(”q3″)
rs.update
rs.close()

conn.Close
Response.Write(”Done”)
%>

Time management is extremely important when it comes to multi tasking, which is the basic activity which every businessman does these days. To list, some of the top reasons why time management is important are

1. Time is limited. Time is a very special resource in that you cannot store it or save it for later. Everyone gets the exact same amount of time each and every day. If you don’t use your time wisely, you can never get it back.

2. Time is scarce. Most people feel like they have too much to do and not enough time. Lack of time is blamed for everything from not getting enough exercise, poor finances, unachieved goals, too much stress, bad relationships, and even an unfulfilled life. Time management helps you use the time that you do have in better ways.

3. You need time to get what you want out of life. You need time to do almost anything worthwhile in life. Waiting for more free time is a loosing game that almost never results in getting time for what you want. You need to learn how to make time for the things that are important to you. Even if you can only afford to give a small amount of time each week to your goals, you’d be surprised at how much progress you can make.

4. You can accomplish more with less effort. When you become more productive using improved time management skills and tools, you can accomplish more with less effort. Reducing wasted time and effort gives you even more productive time throughout the day. Both of these allow you to make time for a wide range of activities that bring more balance and fulfillment to your life.

5. Too many choices. In this day and age, there are so many ways you can spend your time, that you need some sort of plan to make intelligent choices.

Time management helps you make conscious choices so you can spend more of your time doing things that are important and valuable to you.

 There are various techniques to manage time. All of them are briefed in a Power point ppt and i can be downloaded from the following linlk

Click here to download the ppt

You can use this for your Business communication / soft skills presentation if you are pursuing MBA

17
Sep

Risk and return presentation

   Posted by: admin   in MBA : Presentations and projects

Risk and return are always interrelated.

As a Finance manager, It is but obvious that the manager will have to take decisions because of the trade off  between risk and returns.

The presentation for risk and return can be downloaded from the following link

Click here to download the ppt