Friday, December 25, 2009

JBoss timeout error in Eclipse

Error code: Server JBoss v5.0 at localhost was unable to start within 50 seconds. If the server requires more time, try increasing the in the server editor

Solution:
Double click on the server (or right click and select open) and then select the timeouts section. Change it to whatever you want.

Thursday, November 12, 2009

How to install Wine

To install latest version of wine download corresponding binary package for you Linux distribution from here.
Packages for Ubuntu are available here.
Install deb package:
sudo dpkg -i your_wine_package.deb
Configure by running winecfg command in terminal:
  • In Applications tab, choose Windows XP option.
  • In Drivers tab, click Autodetect button.
  • In Audio tab, check ALSA Driver and uncheck OSS Driver.




  • Then click OK button.

  • After wine is installed we should get latest iTunes from here and get it installed.

    1. Run in terminal:
      wine iTunesSetup.exe
    2. Install iTunes as you do it in Windows or Mac OS X
    3. Run it with command:
      wine ~/.wine/drive_c/Program\ Files/iTunes/iTunes.exe
    References:
    http://www.linuxscrew.com/2007/09/19/install-itunes-72-in-ubuntu-and-other-linux-distros/

    Wednesday, November 11, 2009

    Install JBoss in Ubuntu

    Create a user which the JBoss AS will run as. We create a separate user with a home directory, but no ability to log in and no password.
    useradd -d /usr/local/jboss -s /bin/sh jboss

    References:
    http://chiralsoftware.com/linux-system-administration/jboss-server-deployment.seam

    Install Eclipse in Ubuntu

    Extract the eclipse tar file and move it to /opt

    tar xzf my_eclipse_file_name.tar.gz
    sudo mv eclipse /opt/eclipse
    cd /opt sudo chown -R root:root eclipse
    sudo chmod -R +r eclipse
    sudo chmod +x `sudo find eclipse -type d`

    Saturday, May 9, 2009

    PDO

    The PHP Data Objects (PDO) extension defines a lightweight, consistent interface for accessing databases in PHP. Each database driver that implements the PDO interface can expose database-specific features as regular extension functions.

    References:
    http://www.php.net/manual/en/book.pdo.php
    http://www.phpro.org/tutorials/Introduction-to-PHP-PDO.html

    Sunday, May 3, 2009

    PostgreSQL maximum sizes

    Maximum size for a database? unlimited (32 TB databases exist)
    Maximum size for a table? 32 TB
    Maximum size for a row? 400 GB
    Maximum size for a field? 1 GB
    Maximum number of rows in a table? unlimited
    Maximum number of columns in a table? 250-1600 depending on column types
    Maximum number of indexes on a table? unlimited

    MySQL vs PostgreSQL

    MySQL vs PostgreSQL is a decision many must make when approaching open-source relational databases management systems. Both are time-proven solutions that compete strongly with proprietary database software. MySQL has long been assumed to be the faster but less full-featured of the two database systems, while PostgreSQL was assumed to be a more densely featured database system often described as an open-source version of Oracle. MySQL has been popular among various software projects because of its speed and ease of use, while PostgreSQL has had a close following from developers who come from an Oracle or SQL Server background.

    References
    http://www.wikivs.com/wiki/MySQL_vs_PostgreSQL
    http://tweakers.net/reviews/657/6

    Tuesday, April 28, 2009

    JBoss server runtime setup error in Eclipse

    Missing classpath entry /your_server_root/server/default/lib/mail.jar

    Go to,

    /your_eclipse_root/plugins/org.eclipse.jst.server.generic.jboss_1.5.205.v200805140145/servers

    folder and open the jboss.serverdef file.

    Change these lines as comments,

    exclude name="server/default/lib/mail.jar">
    archive path="${serverRootDirectory}/server/default/lib/mail.jar">

    Restart your Eclipse IDE

    Clustered Environment

    Clustering is the concept of distributing the workload of a server across multiple machines.
    You can use both vertical and horizontal clustering in a production environment. The production environment should use vertical clustering to take full advantage of the resources of a multi-processor system. In addition, it should make use of horizontal cloning to allow for upward scalability. To maximize security, horizontal clones should reside in different geographic locations to guard against natural disaster or site outages.

    References: http://wikis.sun.com/display/BluePrints/Deploying+MySQL+Database+in+Solaris+Cluster++Environments

    Sunday, April 26, 2009

    Oracle's Business Stratergy

    In recent years the Oracle has aggressively used acquisitions to expand its product lines, including the purchases of PeopleSoft, Siebel Systems, BEA Systems, and Hyperion Solutions. In April 2009 the company announced plans for its most ambitious acquisition to date, the purchase of Sun for about $7.4 billion.

    2004 DEC - PeopleSoft - $10.3 billion
    PeopleSoft, Inc. was a company that provided human resource management systems (HRMS), customer relationship management (CRM), manufacturing, financials, enterprise performance management, and student administration software solutions to large corporations, governments, and organizations. PeopleSoft was also the name of the company's product suite.

    2005 SEP - Siebel Systems - $5.85 billion
    Siebel Systems, Inc. was a software company principally engaged in the design, development, marketing, and support of customer relationship management (CRM) applications.

    2007 MAR - Hyperion Solutions - $3.3 billion
    Hyperion Solutions Corporation was a business performance management software company. Many of its products were targeted at the Business Intelligence and Business performance management market.

    2008 JAN - BEA Systems - $8.5 billion

    2009 APR - Sun Microsystems - $7.4 billion

    What does Oracle plan to do with MySQL?

    MySQL will be an addition to Oracle’s existing suite of database products, which already includes Oracle Database 11g, TimesTen, Berkeley DB open source database, and the open source transactional storage engine, InnoDB.

    References: http://www.oracle.com/sun/sun-faq.pdf

    Thursday, April 9, 2009

    Squid - Proxy Server

    Squid is a caching proxy for the Web supporting HTTP, HTTPS, FTP, and more. It reduces bandwidth and improves response times by caching and reusing frequently-requested web pages. Squid has extensive access controls and makes a great server accelerator. It runs on most available operating systems, including Windows and is licensed under the GNU GPL.

    For installation
    sudo apt-get install squid squid-common

    Tuesday, March 17, 2009

    utf8_unicode_ci vs utf8_general_ci

    utf8_general_ci is a very simple collation. What it does - it just
    - removes all accents
    - then converts to upper case
    and uses the code of this sort of "base letter" result letter to compare.

    For example, these Latin letters: ÀÁÅåāă (and all other Latin letters "a"
    with any accents and in any cases) are all compared as equal to "A".


    utf8_unicode_ci uses the default Unicode collation element table (DUCET).


    The main differences are:

    1. utf8_unicode_ci supports so called expansions and ligatures, for example:
    German letter ß (U+00DF LETTER SHARP S) is sorted near "ss"
    Letter Π(U+0152 LATIN CAPITAL LIGATURE OE) is sorted near "OE".

    utf8_general_ci does not support expansions/ligatures, it sorts
    all these letters as single characters, and sometimes in a wrong order.

    2. utf8_unicode_ci is *generally* more accurate for all scripts.
    For example, on Cyrillic block:
    utf8_unicode_ci is fine for all these languages:
    Russian, Bulgarian, Belarusian, Macedonian, Serbian, and Ukrainian.
    While utf8_general_ci is fine only for Russian and Bulgarian subset of Cyrillic.
    Extra letters used in Belarusian, Macedonian, Serbian, and Ukrainian
    are sorted not well.


    The disadvantage of utf8_unicode_ci is that it is a little bit
    slower than utf8_general_ci.

    So when you need better sorting order - use utf8_unicode_ci,
    and when you utterly interested in performance - use utf8_general_ci.

    Wednesday, March 11, 2009

    Rounded corners with CSS3

    W3C has offered some new options for borders in CSS3, of which one is border-radius. Both Mozila/Firefox and Safari 3 have implemented this function, which allows you to create round corners on box-items.

    border-radius: 6px;
    -moz-border-radius: 6px;
    -webkit-border-radius: 6px;
    border: 1px #cccccc solid;
    padding: 10px;

    border-top-right-radius
    border-bottom-right-radius
    border-bottom-left-radius
    border-top-left-radius

    -moz-border-radius-topleft
    -moz-border-radius-topright
    -moz-border-radius-bottomleft
    -moz-border-radius-bottomright

    -webkit-border-top-left-radius
    -webkit-border-top-right-radius
    -webkit-border-bottom-left-radius
    -webkit-border-bottom-right-radius

    Monday, March 9, 2009

    Difference between Sub domain,Parked Domain and Add-on domain

    Sub domain

    • Lets say your domain is mysite.com.
    • You install a Message Board and put in in a directory called mysite.com/board/.
    • You can turn the directory board into a sub-domain by adding it as a sub-domain from your Control Panel.
    • Now you can access your Message board as either mysite.com/board OR board.mysite.com

    Parked Domain

    • You have two domains mysite.com and my-other-site.com.
    • mysite.com is the domain of your website and you want to add my-other-site.com.
    • You want them both to go to the same place. In other words, when someone types either www.mysite.com or www.my-other-site.com they will go to the same page(s) on your website.
    • In order to have additional parked domains you need to purchase them from a registry.

    Add-On Domains

    • You have two domains mysite.com and my-other-site.com.
    • You want the two domains to be totally separate/independent websites.
    • In order to have additional add-on domains you need to purchase them from a registry.

    Saturday, March 7, 2009

    URL read in PHP

    file_get_contents with proxy server:
    <?php
    $context = array (
    'http' => array (
    'proxy' => 'hostIP:hostPort', 'request_fulluri' => true,
    ),
    );
    $context = stream_context_create ($context);
    $data = file_get_contents("http://www.fevoxtech.com",0,$context);
    echo $data;
    ?>

    file_get_contents without proxy server:

    <?php
    $data = file_get_contents("http://www.fevoxtech.com",0);
    echo $data;
    ?>

    cURL with proxy server:

    <?php
    $url = "http://www.fevoxtech.com";
    $ch = curl_init();
    $timeout = 5; // set to zero for no timeout
    curl_setopt ($ch, CURLOPT_URL, $url);
    curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
    curl_setopt($ch, CURLOPT_PROXY, IP Address);
    curl_setopt($ch, CURLOPT_PROXYPORT, Port No);
    $file_contents = curl_exec($ch);
    curl_close($ch);
    ?>

    cURL without proxy server:

    <?php
    $url = "http://www.fevoxtech.com";
    $ch = curl_init();
    $timeout = 5; // set to zero for no timeout
    curl_setopt ($ch, CURLOPT_URL, $url);
    curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
    $file_contents = curl_exec($ch);
    curl_close($ch);
    ?>

    Friday, March 6, 2009

    Basic Cryptography

    Cryptography means that process of data encryption and decryption method for communicate on unsafe media. Using these cryptographic methods such as encryption techniques, algorithms we can protect our data against hackers, criminals and etc.
    In day-today life
    cryptographic methods use for privacy, trust, electronic payments, access control and etc. For a examples if someone wants to send information to another location, he should use plain text.

    to be cont...

    Thursday, March 5, 2009

    JProgressBar Constructors

    These are five different constructors for JProgressBar:

    public JProgressBar()
    JProgressBar aJProgressBar = new JProgressBar();

    public JProgressBar(int orientation)
    JProgressBar aJProgressBar = new JProgressBar(JProgressBar.VERTICAL);
    JProgressBar bJProgressBar = new JProgressBar(JProgressBar.HORIZONTAL);

    public JProgressBar(int minimum, int maximum)
    JProgressBar aJProgressBar = new JProgressBar(0, 500);

    public JProgressBar(int orientation, int minimum, int maximum)
    JProgressBar aJProgressBar = new JProgressBar(JProgressBar.VERTICAL, 0, 1000);

    public JProgressBar(BoundedRangeModel model)
    // Data model, initial value 0, range 0-250, and extent of 0
    DefaultBoundedRangeModel model = new DefaultBoundedRangeModel(0, 0, 0, 250);
    JProgressBar aJProgressBar = new JProgressBar(model);

    Monday, March 2, 2009

    How to install, configure and start SAMBA Server

    For debian based distributions at the prompt enter the following command to install the SAMBA server applications:

    sudo apt-get install samba smbfs

    You can configure SAMBA server by editing /etc/samba/smb.conf file. Also by using

    man smb.conf

    command, can view the SAMBA Manual.

    To start the SAMBA Server,

    sudo /etc/init.d/samba start
    sudo /etc/init.d/samba restart
    sudo /etc/init.d/samba stop

    Sunday, March 1, 2009

    How to add an image in a Swing Component

    This is the simplest way to add image in your swing component, because we have tried lot of alternative methods and finally we realize that this is the best way to go ahead.
    Normally, If you want to add image to your swing component you can use javax.swing.ImageIcon class and use like this,

    ImageIcon icon = new ImageIcon("logo.png");

    But the thing is when you create the Java Archive (JAR) file or Applet, sometimes image will disappear from your swing component, because the executable file lost the image path.
    To skip this vulnerability, we have used the java.net.URL class and loaded the resource file using java.lang.ClassLoader.getResource() Method. Then you can use URL file naming convention for locating files in your application.


    package fvx.swing;

    import java.net.URL;
    import javax.swing.ImageIcon;
    import javax.swing.JButton;
    import javax.swing.JFrame;
    import javax.swing.JPanel;

    public class IconButton extends JPanel {
    public IconButton() {
    URL imageUrl = getClass().getResource("logo.png");
    ImageIcon icon = new ImageIcon(imageUrl);

    JButton btn = new JButton(icon);
    add(btn);
    }

    public static void main(String[] args) {
    JFrame frame = new JFrame();
    frame.getContentPane().add(new IconButton());

    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    frame.setSize(250, 250);
    frame.setLocationRelativeTo(null);
    frame.pack();
    frame.setVisible(true);
    }
    }


    Please, feel free to add your comment about this article.

    Saturday, February 28, 2009

    How to install fonts in Linux

    This is a simple way to install fonts in Graphical Linux Distributions.
    Press Alt-F2 to open the run dialog. Type the following into the text box and click “Run”.

    fonts://

    The window that opens allows you to copy and paste new font files to install them.

    This is the another way to install font using command line,

    sudo gksu nautilus /usr/share/fonts/truetype/

    Then you should get new GUI window and create a new folder with appropriate name and copy your font into it. Close the widow and come back to command line.

    sudo fc-cache -f -v

    Thats all about the installation...

    Tuesday, February 24, 2009

    Present and Future...!

    Currently, I'm working as a Software Engineer. In day-today life I came a cross lot of new IT related things and stuffs. I'm going to write that special points on this blog. Keep in touch with my blog.