Pages

websites To Download Free Software legally

Top 10 Sites To Download Free Software


Do you love installing software on your computer? In this article, you can see top 10 websites which offer free software that you can download on your PC without spending money. These websites allow users to download full version of software for free. Although you won't get all software free of cost , but most of software can be downloaded in full version free of charge. Okay here is the list of Top 10 Free Software Download Websites.

Top 10 Sites To Download Free Software


1. Cnet Download - One of the most popular websites where users can find free software to downloadon their computer. Download.com is an internet download directory where you can find all kinds of software easily. It was launched in 1996 and now this website is one of the most visited website in the world. Users can find here free and paid software for all major operating system including Windows, Mac, Linux and Mobile.

2. Softonic - Highly popular web portal for downloading free software. Softonic recently launched question answer service where users can ask questions related to software and mobile applications. Softonic was launched in 1997 by Tomás Diago (Owner & Creator).

Best way to earn money via internet

Best way to earn money via internet

10 Websites To Make Money by Blogging

Thousands of internet users are making decent money using some revenue sharing sites. If you can write articles on your interested topics, you can earn easy money through internet. In this article, I am going to talk about 10 useful websites which allow users to make money by blogging. Here you can see 10 popular and useful revenue sharing websites where thousands of registered users submit their articles each day to earn money through their ad programs. All of these websites can be joined totally free of cost. Okay let's see the list of sites to make money by blogging.

Make Money By Blogging


1. Blogger - Great free blogging platform by Google. You can create your free blog to publish articles on your interested topics. After publishing 50 to 100 quality articles, you can monetize your articles withtop advertising programs. You can expect sufficient earnings if your site receives more than 2000 page views per day.

Differences between SQL Server 2000, 2005 and 2008

Differences between SQL Server 2000, 2005 and 2008

The main differences among SQL Server 2000, 2005 and 2008 are shown in the following table.
S.NO
SQL SERVER 2000
SQL SERVER 2005
SQL SERVER 2008
1Query Analyzer and Enterprise manager are separate.Both are combined as SQL Server management Studio (SSMS).Both are combined as SQL Server management Studio (SSMS).
2No XML datatype is used.XML datatype is introduced.XML datatype is used.
3We can create a maximum of 65,535 databases.We can create 2(pow(20))-1 databases.We can create 2(pow(20))-1 databases.
4NillException HandlingException Handling
5NillVarchar(Max) data typeVarchar (Max) data type
6NillDDL TriggersDDL Triggers
7NillDataBase MirroringDataBase Mirroring
8NillRowNumber function for pagingRowNumber function for paging
9NillTable fragmentationTable fragmentation
10NillNillNill
11NillBulk Copy UpdateBulk Copy
12NillCan't encryptEncrypt the entire database introduced in 2008.
13Can't compress the tables and indexes.Can compress tables and indexes (introduced in 2005 SP2).Compress indexes.
14Datetime datatype is used for both date and time.Datetime is used for both date and time.Date and time are separately used for date and time datatype.
15No table datatype is included.No table datatype is included.Table datatype introduced.
16No SSIS is included.SSIS is started using.SSIS avails in this version.
17CMS is not available.CMS is not available.Central Management Server (CMS) was introduced.
18PBM is not available.PBM is not available.Policy based management (PBM) server was introduced.
19PIVOT and UNPIVOT functions are not used.PIVOT and UNPIVOT functions are used.PIVOT and UNPIVOT functions are used.
Overview and advantages of SQL Server 2008 depending on our need
SQL Server 2008 can be a data storage backend for various varieties of data: XML, time/calendar, file, document, spatial, and so on as well as perform search, query, analysis, sharing, and synchronization across all data types.

Other new data types include specialized date and time types and a Spatial data type for location-dependent data. Better support for unstructured and semi-structured data is provided using the new FILESTREAM data type, that can be used to reference any file stored on the file system. Structured data and metadata about the file is stored in SQL Server database, whereas the unstructured component is stored in the file system. Such files can be accessed both via Win32 file handling APIs as well as via SQL Server using T-SQL.

SQL Server 2008 delivers a rich set of integrated services that enable you to do more with your data, such as query, search, synchronize, report, and analyze. 

SQL Server 2008 provides the highest levels of security, reliability, and scalability for your business-critical applications. 

SQL Server 2008 also natively supports hierarchical data, and includes T-SQL constructs to directly deal with them, without using recursive queries. 

Date Picker Frame in swings java Source Code and tutorial

Date Picker Frame in swings java Source Code and tutorial

import java.awt.*;
import java.awt.event.*;
import javax.swing.*;

public class DatePicker extends JFrame{
        int month = java.util.Calendar.getInstance().get(java.util.Calendar.MONTH);
        int year = java.util.Calendar.getInstance().get(java.util.Calendar.YEAR);;
        JLabel l = new JLabel("", JLabel.CENTER);
        String day = "";
        JDialog d;
        JButton[] button = new JButton[49];

        public DatePicker(JPanel parent) {
                d = new JDialog();
                d.setModal(true);
                String[] header = { "Sun", "Mon", "Tue", "Wed", "Thur", "Fri", "Sat" };
                JPanel p1 = new JPanel(new GridLayout(7, 7));
                p1.setPreferredSize(new Dimension(430, 120));

                for (int x = 0; x < button.length; x++) {
                        final int selection = x;
                        button[x] = new JButton();
                        button[x].setFocusPainted(false);
                        button[x].setBackground(Color.white);
                        if (x > 6)
                                button[x].addActionListener(new ActionListener() {
                                        public void actionPerformed(ActionEvent ae) {
                                                day = button[selection].getActionCommand();
                                                d.dispose();
                                        }
                                });
                        if (x < 7) {
                                button[x].setText(header[x]);
                                button[x].setForeground(Color.red);
                        }
                        p1.add(button[x]);
                }
                JPanel p2 = new JPanel(new GridLayout(1, 3));
                JButton previous = new JButton("<< Previous");
                previous.addActionListener(new ActionListener() {
                        public void actionPerformed(ActionEvent ae) {
                                month--;
                                displayDate();
                        }
                });
                p2.add(previous);
                p2.add(l);
                JButton next = new JButton("Next >>");
                next.addActionListener(new ActionListener() {
                        public void actionPerformed(ActionEvent ae) {
                                month++;
                                displayDate();
                        }
                });
                p2.add(next);
                d.add(p1, BorderLayout.CENTER);
                d.add(p2, BorderLayout.SOUTH);
                d.pack();
                d.setLocationRelativeTo(parent);
                displayDate();
                d.setVisible(true);
        }

        public void displayDate() {
                for (int x = 7; x < button.length; x++)
                        button[x].setText("");
                java.text.SimpleDateFormat sdf = new java.text.SimpleDateFormat(
                                "MMMM yyyy");
                java.util.Calendar cal = java.util.Calendar.getInstance();
                cal.set(year, month, 1);
                int dayOfWeek = cal.get(java.util.Calendar.DAY_OF_WEEK);
                int daysInMonth = cal.getActualMaximum(java.util.Calendar.DAY_OF_MONTH);
                for (int x = 6 + dayOfWeek, day = 1; day <= daysInMonth; x++, day++)
                        button[x].setText("" + day);
                l.setText(sdf.format(cal.getTime()));
                d.setTitle("Date Picker");
        }

        public String setPickedDate() {
                if (day.equals(""))
                        return day;
                java.text.SimpleDateFormat sdf = new java.text.SimpleDateFormat(
                                "dd-MM-yyyy");
                java.util.Calendar cal = java.util.Calendar.getInstance();
                cal.set(year, month, Integer.parseInt(day));
                return sdf.format(cal.getTime());
        }
}

 class Picker {
        public static void main(String[] args) {
                JLabel label = new JLabel("Selected Date:");
                final JTextField text = new JTextField(20);
                JButton b = new JButton("popup");
                JPanel p = new JPanel();
                p.add(label);
                p.add(text);
                p.add(b);
                final JFrame f = new JFrame();
                f.getContentPane().add(p);
                f.pack();
                f.setVisible(true);
                b.addActionListener(new ActionListener() {
                        public void actionPerformed(ActionEvent ae) {
                                text.setText(new DatePicker(f).setPickedDate());
                        }
                });
        }
}

How to use JCalendar date picker in your Java Swing Applications with NetBeans

How to use JCalendar date picker in your Java Swing Applications with NetBeans


If you are one of those JAVA beginners like me who wants to implement a datepicker module in your experimental/business critical application developed with NetBeans IDE , then this for you. Let me share how I figured out to do so in simple steps with a sample code.
  1. Assuming that you have your Java Swing application ready, you will need to download the JCalendar package from herehttp://www.toedter.com/en/jcalendar/index.html . The page lists out various modules available with descriptions like JDateChooser, JCalendar, JYearChooser, JMonthChooser, JDayChooser, JSpinField and JLocaleChooser. The one I chose for my app was JDateChooser.
  2. After downloading and opening the ZIP file, you can see a whole set of files in it. The one we need is in the folder ‘lib’ with the name jcalendar-1.4.jar (this is the latest version while I was writing this). extract that file to your folder of comfort.

    JCalendar zip file
  3. The jar file you just extracted contains everything you need to implement the date picker in your Java Swing application. It requires few simple manoeuvres. Go to NetBeans, From Tools menu select Libraries. The Library Manager window will be displayed with list of existing libraries that makes built-in readymade functionality ready at our disposal.

    NetBeans Library
  4. Now our need is to create a new library for JCalendar. By now its obvious, so click on New Library… button. A new window will open requiring us to enter a name for the new library. I name mine as ‘JCalendar’.

    New Library NetBeans
  5. Next step is to import the extracted jcalendar-1.4.jar file in to the library. Click onAdd JAR/Folder… button on the right-side pane of Library Manager window. Import the extracted jcalendar-1.4.jar file. One imported it would look something like in the below screenprint. Click OK and close the Library Manager. We are done with Library Manager here. Note that what we are done here is creating a new library for JCalendar. You need to separately make this library available to each of your projects whenever needed. I will come to this point in upcoming steps.

    Add JAR to Library Netbeans
  6. Now that you have JCalendar library , the next step is to include the JCalendar modules in your Swing Palette. The default Swing Palette available in NetBeans looks like the one below.

    Swing Palette in NetBeans
    From Tools menu select Palette > Swing/AWT Components . This will openPalette Manger Window that provides a way to organize default drag and drop modules available as we talked about in previous point.
  7. I prefer to create a new category for adding JCalendar modules in to palette. So click on New Category . I named mine as ‘Third Party Components’.

    Third Party Components NetBeans Swing Palette
  8. Now click on Add from Library… button to select the Jcalendar library that we created already.

    Install Components to Palette NetBeans
  9. On clicking Next it will display the set of available modules from JCalendar library to choose from, that can be added in the palette. This is a multiselection window, so you can choose any component you need. I wanted to have JDateChooser in my application so I select it.

    JDateChooser NetBeans
  10. On clicking Next again you will be provided with options to categorize the newly imported components. As promised I’m going to import it in to the ‘Third Party Components' category. click Finish . click Close . Done!!! we will now have JDateChooser as a drag and drop module in NetBeans Swing palette like any other Swing component.
    .
    Category NetBeans
  11. Now we have JCalendar library and palette, but I have a feeling that we are still missing something. Yes by default these libraries wont be available in each projects we create. Its like summoning beauticians, electricians, carpenters, geologists to perform a surgery. All we need is a Surgeon. So for each of our projects we need to import these specific required libraries individually. So now I’m going to import the library in to my project. To do so right-click on the project you are working on and select Properties.

    Project Properties NetBeans
  12. In Project Properties Window, under Categories go to Libraries. Click on Add Library . Select the JCalendar library we created. Click Add Library. Click OK. Now we are all set. Let me show You a sample code to deal with the JCalendar.
Class with Main Method:
   1: /*
   2:  * To change this template, choose Tools | Templates
   3:  * and open the template in the editor.
   4:  */
   5: package calendar.app;
   6:  
   7: /**
   8:  *
   9:  * @author greenxgene
  10:  */
  11: public class CalendarApp {
  12:  
  13:     /**
  14:      * @param args the command line arguments
  15:      */
  16:     public static void main(String[] args) {
  17:         DatePickerExample dpe = new DatePickerExample();
  18:         dpe.setVisible(true);
  19:     }
  20: }

JFrame Class with Swing Componnets: (Refer to Line 112 to 116)





   1: /*
   2:  * To change this template, choose Tools | Templates
   3:  * and open the template in the editor.
   4:  */
   5: package calendar.app;
   6:  
   7: import java.util.Calendar;
   8:  
   9: /**
  10:  *
  11:  * @author greenxgene
  12:  */
  13: public class DatePickerExample extends javax.swing.JFrame {
  14:  
  15:     /**
  16:      * Creates new form DatePickerExample
  17:      */
  18:     public DatePickerExample() {
  19:         initComponents();
  20:     }
  21:  
  22:     /**
  23:      * This method is called from within the constructor to initialize the form.
  24:      * WARNING: Do NOT modify this code. The content of this method is always
  25:      * regenerated by the Form Editor.
  26:      */
  27:     @SuppressWarnings("unchecked")
  28:     // <editor-fold defaultstate="collapsed" desc="Generated Code">
  29:     private void initComponents() {
  30:  
  31:         jPanel1 = new javax.swing.JPanel();
  32:         outputtextbox = new javax.swing.JTextField();
  33:         mydatechooser = new com.toedter.calendar.JDateChooser();
  34:         jLabel1 = new javax.swing.JLabel();
  35:         jLabel2 = new javax.swing.JLabel();
  36:         jButton1 = new javax.swing.JButton();
  37:  
  38:         setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
  39:         setTitle("Date Picker Example");
  40:  
  41:         jLabel1.setText("Choose Date");
  42:  
  43:         jLabel2.setText("Output");
  44:  
  45:         jButton1.setText("Get Date");
  46:         jButton1.addActionListener(new java.awt.event.ActionListener() {
  47:             public void actionPerformed(java.awt.event.ActionEvent evt) {
  48:                 jButton1ActionPerformed(evt);
  49:             }
  50:         });
  51:  
  52:         javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
  53:         jPanel1.setLayout(jPanel1Layout);
  54:         jPanel1Layout.setHorizontalGroup(
  55:             jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  56:             .addGroup(jPanel1Layout.createSequentialGroup()
  57:                 .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  58:                     .addGroup(jPanel1Layout.createSequentialGroup()
  59:                         .addGap(147, 147, 147)
  60:                         .addComponent(jLabel1))
  61:                     .addGroup(jPanel1Layout.createSequentialGroup()
  62:                         .addGap(143, 143, 143)
  63:                         .addComponent(jButton1))
  64:                     .addGroup(jPanel1Layout.createSequentialGroup()
  65:                         .addGap(165, 165, 165)
  66:                         .addComponent(jLabel2))
  67:                     .addGroup(jPanel1Layout.createSequentialGroup()
  68:                         .addGap(123, 123, 123)
  69:                         .addComponent(mydatechooser, javax.swing.GroupLayout.PREFERRED_SIZE, 117, javax.swing.GroupLayout.PREFERRED_SIZE))
  70:                     .addGroup(jPanel1Layout.createSequentialGroup()
  71:                         .addGap(65, 65, 65)
  72:                         .addComponent(outputtextbox, javax.swing.GroupLayout.PREFERRED_SIZE, 232, javax.swing.GroupLayout.PREFERRED_SIZE)))
  73:                 .addContainerGap(83, Short.MAX_VALUE))
  74:         );
  75:         jPanel1Layout.setVerticalGroup(
  76:             jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  77:             .addGroup(jPanel1Layout.createSequentialGroup()
  78:                 .addContainerGap()
  79:                 .addComponent(jLabel1)
  80:                 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
  81:                 .addComponent(mydatechooser, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
  82:                 .addGap(13, 13, 13)
  83:                 .addComponent(jButton1)
  84:                 .addGap(25, 25, 25)
  85:                 .addComponent(jLabel2)
  86:                 .addGap(18, 18, 18)
  87:                 .addComponent(outputtextbox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
  88:                 .addContainerGap(25, Short.MAX_VALUE))
  89:         );
  90:  
  91:         javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
  92:         getContentPane().setLayout(layout);
  93:         layout.setHorizontalGroup(
  94:             layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  95:             .addGroup(layout.createSequentialGroup()
  96:                 .addContainerGap()
  97:                 .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
  98:                 .addContainerGap())
  99:         );
 100:         layout.setVerticalGroup(
 101:             layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
 102:             .addGroup(layout.createSequentialGroup()
 103:                 .addContainerGap()
 104:                 .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
 105:                 .addContainerGap())
 106:         );
 107:  
 108:         pack();
 109:     }// </editor-fold>
 110:  
 111:     private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
 112:         Calendar cal = mydatechooser.getCalendar();
 113:         int datevar = cal.get(Calendar.DATE);
 114:         int monthvar = cal.get(Calendar.MONTH);
 115:         int yearvar = cal.get(Calendar.YEAR);
 116:         outputtextbox.setText("Date is " + datevar + ", Month is " + monthvar + " and Year is "+ yearvar + ".");
 117:         
 118:     }
 119:  
 120:     /**
 121:      * @param args the command line arguments
 122:      */
 123:     public static void main(String args[]) {
 124:         /*
 125:          * Set the Nimbus look and feel
 126:          */
 127:         //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
 128:         /*
 129:          * If Nimbus (introduced in Java SE 6) is not available, stay with the
 130:          * default look and feel. For details see
 131:          * http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
 132:          */
 133:         try {
 134:             for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
 135:                 if ("Nimbus".equals(info.getName())) {
 136:                     javax.swing.UIManager.setLookAndFeel(info.getClassName());
 137:                     break;
 138:                 }
 139:             }
 140:         } catch (ClassNotFoundException ex) {
 141:             java.util.logging.Logger.getLogger(DatePickerExample.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
 142:         } catch (InstantiationException ex) {
 143:             java.util.logging.Logger.getLogger(DatePickerExample.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
 144:         } catch (IllegalAccessException ex) {
 145:             java.util.logging.Logger.getLogger(DatePickerExample.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
 146:         } catch (javax.swing.UnsupportedLookAndFeelException ex) {
 147:             java.util.logging.Logger.getLogger(DatePickerExample.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
 148:         }
 149:         //</editor-fold>
 150:  
 151:         /*
 152:          * Create and display the form
 153:          */
 154:         java.awt.EventQueue.invokeLater(new Runnable() {
 155:  
 156:             public void run() {
 157:                 new DatePickerExample().setVisible(true);
 158:             }
 159:         });
 160:     }
 161:     // Variables declaration - do not modify
 162:     private javax.swing.JButton jButton1;
 163:     private javax.swing.JLabel jLabel1;
 164:     private javax.swing.JLabel jLabel2;
 165:     private javax.swing.JPanel jPanel1;
 166:     private com.toedter.calendar.JDateChooser mydatechooser;
 167:     private javax.swing.JTextField outputtextbox;
 168:     // End of variables declaration
 169: }

Note : When you compile and build the code you will your application jar file along with a lib folder that contains supporting JCalendar file without which the application will not run. So dont tamper with it.

I will be more than glad to receive your comments and queries