December 2010 archive

PHP Pagination Script

In this article, attached the script to make it working and easy to edit. This is a flexible and easy to implement PHP pagination script which will help you split large result sets over multiple pages. Click here to download the script Steps to use: include the ps_pagination.php file to your script. Create a ps_pagination …

Continue reading

Permanent link to this article: https://blog.openshell.in/2010/12/php-pagination-script/

Aptitude Question

Eight peoples take positions in clockwise, direction starting from the position of head of the group around a circular table. There are 4 males: Ajay, Nilesh, Gautam and Vishal and 4 females: Komal, Babita, Chaitali and Divyani in the group. The following conditions are to be followed: The head of the group, Vishal has a …

Continue reading

Permanent link to this article: https://blog.openshell.in/2010/12/aptitude-question/

MySQL Subquery Optimization

Never use a subquery inside a WHERE field IN(…)  the SQL query.  It will slow down the process. Slow: SELECT * FORM table1 WHERE field1 IN (SELECT field2 FROM table2 GROUP BY field1) Instead of using a subquery inside an IN(…),  use INNER JOIN query. It will speed up the process, but in IN(…) query …

Continue reading

Permanent link to this article: https://blog.openshell.in/2010/12/mysql-subquery-optimization/

Exception Handling Provided by Struts

Exception Handling Capabilities of Struts Target Audience: J2EE Developers, Web Component Developers What you should know already: MVC Design Pattern, Struts Framework, Struts configuration file Exception handling is very crucial part in Web application development. Throwing an exception is Java’s way of informing the client that something has gone wrong while doing a certain processing …

Continue reading

Permanent link to this article: https://blog.openshell.in/2010/12/exception-handling-provided-by-struts/

Enable .htaccess in Apache2

At first You should define,  mod_rewrite is a part of Apache server that can rewrite requested urls on the fly. To enable in Ubuntu, you just need to write this command in terminal sudo a2enmod rewrite Then edit /etc/apache2/sites-available/default Find the following Options Indexes FollowSymLinks MultiViews AllowOverride None Order allow,deny allow from all and change …

Continue reading

Permanent link to this article: https://blog.openshell.in/2010/12/enable-htaccess-in-apache2/

Configure Ruby on Rails with no database

Although Rails is intended for creating database-backed web applications, this example is simple enough that it doesn’t require one. In this case, you need to edit the enviroment.rb configuration file to indicate that your application does not use a database. It is possible to disable loading ActiveRecord by making a simple modification to environment.rb: 1. …

Continue reading

Permanent link to this article: https://blog.openshell.in/2010/12/configure-ruby-on-rails-with-no-database/

Registering XML Schema to IBM DB2 pureXML

Target Audience: DBA, DB Developers What you should know: XML, XML Schema, Understanding of IBM DB2 pureXML DB2 is unrivaled in its ability to manage both relational and XML data, enabling strong runtime performance and high levels of development time and cost savings. By integrating XML data intact into a relational database structure, users can …

Continue reading

Permanent link to this article: https://blog.openshell.in/2010/12/registering-xml-schema-to-ibm-db2-purexml/

Creating Windows tray icons

If you want to add,modify or delete a system tray icon.Follow the below steps: STEP:1 Go to run and type REGEDIT STEP:2 Under MyComputer->Select HKEY_LOCAL_MACHINE STEP:3 Expand the folder SOFTWARE Step:4 Select and expand the folder MICROSOFT Step:5 Select the folder WINDOWS and expand it. Step:6 Expand CURRENTVERSION Step:7 Double Click the Run Step:8 In …

Continue reading

Permanent link to this article: https://blog.openshell.in/2010/12/working-with-tray-icon-in-windows/

Actually what is .Net ???

.NET provides tools and libraries that enable developers to create Windows software much faster and easier. .NET benefits end-users by providing applications of higher capability, quality and security. The .NET Framework must be installed on a user’s PC to run .NET applications. The .NET Framework allows you to: * Apply common skills across a variety …

Continue reading

Permanent link to this article: https://blog.openshell.in/2010/12/actually-what-is-net/

var args – The magic in Java

Target Audience: Java Developers What should you know? Core Java Writing methods for a class gives completeness for your object. But sometimes it seems to be incomplete when you are not sure about the number of arguments for a method. For example if you are writing a method to find summation of 2 numbers, then …

Continue reading

Permanent link to this article: https://blog.openshell.in/2010/12/var-args-the-magic-in-java/