Wednesday, December 30, 2009

World's 10 Fastest-growing IT cos

  1. Research In Motion
  2. Sigma Designs
  3. Sohu.com
  4. Ebix
  5. Millicom International Cellular
  6. Open Text
  7. Pegasystems
  8. ANSYS
  9. Apple
  10. AsiaInfo Holdings
  11. Infosys Technologies
Source

6 Hot jobs for IT pros in 2010

  1. Java and .Net
  2. Cloud Computing
  3. Rich internet apps
  4. Mobile development
  5. Embedded technologies
  6. Project management

10 Most attractive IT workplaces for grads

  1. Google
  2. Microsoft
  3. IBM
  4. Intel
  5. Sony
  6. Siemens
  7. Hewlett-Packard
  8. Cisco
  9. Nokia
  10. Accenture

Tuesday, December 29, 2009

Netbeans Subversion plug-in update

Netbeans integrated subversion client for Netbeans 6.5 works along with TortoiseSVN 1.5.9.
After upgrading to TortoiseSVN 1.6.0 and above this issue will come up :
Netbeans integrated subversion client (being a unsupported client version for TortoiseSVN 1.6.0 and above) will fail to recognize files from the repository as a result of which committing, updating, checking out of files / folders wont be possible.

To solve the issue follow either of the two steps mentioned below:
  1. Downgrade TortoiseSVN 1.6.0 to TortoiseSVN 1.5.9
  2. Upgrade Netbeans integrated subversion client
To Upgrade Netbeans integrated subversion client follow the below steps :
  • Go to Tools -> Plugins -> Installed -> Select Subversion 1.5 for Windows (Category - Bridges) -> Click on Uninstall.
  • Download latest zip file for TortoiseSVN.
  • Unzip the downloaded file.
  • Go to Tools -> Options ->Miscellaneous -> Versioning -> Select subversion -> Copy the bin folder's path found in the unzipped file -> Paste that in "Path to the SVN executable File:" -> Ok -> Restart Netbeans


20 Biggest IT employers in India in 2009 (29 Dec 2009)

  1. Tata Consultancy Services
  2. Infosys Technologies
  3. Wipro Ltd
  4. Cognizant Technology Solutions India
  5. HCL Technologies
  6. Hewlett-Packard India
  7. MphasiS Ltd
  8. Intelenet Global Services Ltd
  9. IBM-Daksh
  10. Genpact India Pvt Ltd
  11. Tech Mahindra
  12. Aegis Ltd
  13. WNS Global Services (P) Ltd
  14. Firstsource Solutions Ltd
  15. CSC India Pvt Ltd
  16. Patni Computer
  17. Larsen & Toubro Infotech Ltd
  18. Hinduja Global Solutions Pvt Ltd
  19. Oracle Financial Services Software Ltd
  20. Convergys India Services

Friday, December 18, 2009

JTabbedPane for Netbeans Desktop Application

If any desktop application created in netbeans is using several tabs. Then each time the application is started, it will show the last selected tab. Even , by initially calling setSelectedIndex(int index) methodof JTabbedPane wont work. To resolve this issue following steps needs to be followed :Go to the class which extends SingleFrameApplication (,i.e,having public static void main).Update the overridden method shutdown() by selecting the default tab before super.shutdown() is called.

Writing resource file (I18N)

  • "\\" stands for "\"
  • "\n" stands for the newline character, U+000A
  • "\t" stands for the horizontal tab character, U+0009
  • "\ " stands for the space character, U+0020
  • Lines whose first non-whitespace character is "#" are comment lines and are ignored.
  • "\#" stands for the number sign character, U+0023.
  • This is only needed if a line within a heredoc string starts with this character.
  • Lines that contain only whitespace characters and are not part of a heredoc string are ignored
  • Leading and trailing whitespace is trimmed from both key and value
Source

setResizable for Netbeans Desktop Application

  • Go to the class which extends SingleFrameApplication (,i.e,having public static void main)
  • Update the overridden method startup() by calling this.getMainFrame().setResizable(boolean resizable) after show(View view) is called.

Tuesday, November 24, 2009

ClassFormatError

ALERT: java/lang/ClassFormatError: Bad version information.
If when launching a Midlet in netbeans emulator the above errors, then check if any jar file is being used which is created using Java 1.5 and above.

Wednesday, November 11, 2009

Null Pointer Exception in Java

Item array in J2ME : While initializing a Form object in J2ME application the corresponding label as well as items array might not be null. But this can throw NullPointerException if any one element of items array is null.

Hashtable : If Hashtable is used in our application ,then any manipulation of its reference prior creating the object will throw NullPointerException.

String array : If String array is initialized at the beginning, but , if at a later point , if that String array calls a function which returns null, then , trying to get the length of that String array will throw NullPointerException

Friday, October 16, 2009

World's 10 Fastest-growing IT cos

  1. Research in Motion
  2. Sigma Designs
  3. Sohu.com
  4. Ebix
  5. Millicom International Cellular
  6. Open Text
  7. Pegasystems
  8. ANSYS
  9. Apple
  10. AsiaInfo Holdings

IT's 7 new Best employers

  1. R Systems
  2. Perot Systems
  3. Ingram Micro India
  4. Sify Technologies
  5. Infogain India
  6. Unisys India
  7. Novell

IT’s 10 Best pay masters

  1. SAS Institute India
  2. Datacraft
  3. Sify Technologies
  4. Novell
  5. Perot Systems
  6. Nagarro
  7. Tavant Technologies
  8. Ingram Micro India
  9. Rolta India
  10. Fidelity (FIS)

India’s 15 biggest IT companies

  1. TCS
  2. Wipro
  3. Infosys
  4. HP
  5. IBM
  6. CTS
  7. Ingram Micro
  8. HCL technologies
  9. HCL Infosystems
  10. Redington India
  11. Cisco Systems
  12. Oracle India
  13. Intel India
  14. Accenture India
  15. SAP India

India's 20 best IT employers (14th Sep 2009)

  1. HCL Infosystems
  2. iGate
  3. Rolta
  4. RMSI
  5. SAS Institute India
  6. R Systems
  7. Perot Systems
  8. Tavant
  9. Datacraft India
  10. Synechron
  11. Ingram Micro India
  12. Tulip Telecom
  13. Sify
  14. SPAN Infotech India
  15. Hexaware
  16. Patni (PCS)
  17. Infogain India
  18. Unisys India
  19. Novell
  20. Virtusa

Wednesday, October 14, 2009

Out of Memory Exception in java

When we have 2 methods with following signature:
return_type method(String str);
return_type method(Object str);
if we call method("string") inside method(String str) assuming it will call method(Object str), it won't do so, rather function recursion will occur infinitely resulting in Out of Memory Exception.


Tuesday, September 29, 2009

Iterating for child elements in a DOJO tag

page = dijit.byId(page_id);
dojo.forEach(page.getDescendants(), function(widget){
if(widget.resize)widget.resize();
});

Iterating a page for all DOJO divs present

dojo.query("div").forEach(function(n){
if(dijit.byNode(n))
{
var page=dijit.byNode(n);
var dojoType=page.declaredClass.toString();
if(page.resize)page.resize();
}
});

Wednesday, September 23, 2009

DOJO include when Stores and I18N are used

<script type="text/javascript" src="dojo.js" djconfig="isDebug: false, parseOnLoad: true, usePlainJson: true, extraLocale: ['en-us', 'ja-jp', 'es-es', 'zh-cn', 'fr-fr', 'de-de']"></script>

Window events using DOJO

dojo.connect(window, 'resize', function() { //code})
dojo.connect(window, 'onload', function() { //code})

Viewing javadocs in netbeans with minimal key press

First Way:
  • Mouseover any member in the navigator window.
  • Press ctrl+F1 when javadocs is shown in a small popup.
  • Separate window is opened for javadocs.
  • Then while scrolling, appropriate documentations are shown as and when the cursor is in any member.
Second Way:
  • Windows --> Others --> Javadoc.
  • Separate window is opened for javadocs.
  • Then while scrolling, appropriate documentations are shown as and when the cursor is in any member.

Monday, September 7, 2009

J2ME InvalidJadException 36 while run

Exception:
com.sun.kvem.midletsuite.InvalidJadException: Reason = 36 Error in opening jar file:
Troubleshooting:
Right click on project - Application Descriptor - Attributes
Check if extra attributes other than following are there :
MIDlet-Name
MIDlet-Vendor
MIDlet-Version
If they are present remove those and again build and run.
If problem persists search in forums and add the solutions as a comment in this blog.

Opening editor in a new window from netbeans

Press "Alt+Shift+D " from current file
Repeat the process to restore the file to netbeans editor.

Friday, July 10, 2009

Optimizing code while styling HTML table rows

When specifying the css class name to be used for a tr HTML element, so as to specify the style for a HTML table row element , we need not explicitly specify the classname for all tr tags if all tr's have same styles. Rather we can only explicitly specify the classname for the first tr tag . By doing so subsequent tr tags will implicitly have the required style

Different ways to determine a browser

1. Using userAgent() of javascript
var userAgent=navigator.userAgent.toString();
var isMozilla=userAgent.indexOf("Mozilla");
var isSafari=userAgent.indexOf("Safari");
var isChrome=userAgent.indexOf("Chrome");
These 3 variables isMozilla , isSafari , isChrome returns -1 or a positive value.


Horizontal aligning of HTML elements using CSS

Center Align:
margin-left : auto;
margin-right : auto;

Right Align
float : right;

Left Align:
float : left;

Importing a css file in a css file

@import url("cssfile1.css");
@import url("cssfile2.css");

Few Guidelines while writing CSS

1. Defining font sizes in css:
While defining font sizes in stylesheets , we should hardcode the same only once. This will make font size manipulation easier. If we want different font sizes for various child elements of an HTML element we should use relative values (like em , %) . It is because a child element of an HTML element assumes its parent element's font size as its default value , thus inheriting the value thereby. But the most possible exception for this statement is IFRAME element in HTML

2. Reducing lines in a css file:
If we have number of same properties having same value. We should avoid repetition of the same by declaring that specific rules at a time and as usual separated by commas. By doing so we can make our css file compact.

Fix : Appearing of dotted borders when we click an element in mozilla

:focus { -moz-outline-style: none; }

Different ways of creating CSS rules

.css_class_name
{
..
}

.css_class_name *
{
..
}
.css_class_name html_tag_name
{
..
}

.css_class_name html_tag_name1, html_tag_name2
{
..
}

.css_class_name .its_child_class_name
{
..
}

.css_class_name table > tbody > tr > td
{
..
}

.css_class_name table > tbody > tr > td:first-child
{
..
}

#id_of_html_element
{
..
}

.css_class_name [id= id_of_html_element]
{
..
}

.css_class_name input[type=text]
{
..
}

CSS code to reduce image brightness by 50%

filter:alpha(opacity=50);
-moz-opacity:0.5;
opacity:0.5;