Posts

Finding Postions of HTML Element in a Scrollable Div

Hi Friends, Have you ever find it difficult to find the x, y coordinates value for a HTML element in side a scrollable div. Just few days back, i got this problem. where i wanted to show tool tip on a link, but since the HTML element was in a scrollable div, the positioning to tooltip was not correct. Here is the code earlier i used to find the X and Y positions: function findPosX(obj) { var curleft = 0; if (obj.offsetParent) { while (obj.offsetParent) { curleft += obj.offsetLeft obj = obj.offsetParent; } } else if (obj.x) curleft += obj.x; return curleft; } function findPosY(obj) { var curtop = 0; if (obj.offsetParent) { while (obj.offsetParent) { curtop += obj.offsetTop obj = obj.offsetParent; } } else if (obj.y) curtop += obj.y; return curtop; } This function works well when your HTML element is not within a scrollable div. B...

Removing null or specific values from list in Java

Have you tried to remove null values from a List (may a ArrayList). Yesterday I was trying it out, when I had to remove null values from a List before processing it. Initially, I was trying with the simple for loop and out I was getting Still NullPointerException while processing. I tried with couple of ways, before I came to a efficient one. Lets see this with an example: Lets see what are the flaws, when u try to remove null values from a List with a for loop: List li = new ArrayList(); FileListItem fLI = new FileListItem(); fLI.setFormFileName("123"); FileListItem fLI2 = new FileListItem(); FileListItem fLI3 = new FileListItem(); FileListItem fLI4 = new FileListItem(); fLI4.setFormFileName("456"); li.add(fLI); li.add(fLI2); li.add(fLI3); li.add(fLI4); System.out.println("====this.fileList() =====" + li); for(int i = 0;i System.out.println("li Size ====" + li.size() + " & Va...

Holi 2008 - Better than Expected

Image
Hi Friends, This time I celebrated holi in Pune. This year it was special. Check out the photos, which will tell you about it. Thanks My frens, who were there with Me. I hope Everybody had a great fun on that day.

Its nothing but All about me.

Hi Friends, I am Ashish Kumar Mishra. I am an Indian. I born an brought up in Hisar, a district of Haryana. I did my schooling from Hisar. But Schools keep changing after every year or 2. I did my Matriculation, From Leading High School. And Intermediate from New Yashoda Public School. Then I joined degree program from Maharshi Dayanand University in Computer Applications. In my school days (Before Matriculation), I decided that i am going for a Degree in Computers and I thought a Degree in Computer Applications was a better option. After my graduation, I went to Delhi, started preparing for the Entrance of Post Graduation in Computer Application. I joined a Company in Delhi as Trainee Programmer. But my father wanted me to go for Higher Educations. Even I wanted to go for it. And I took admission in my Post Graduation Programme in Computer Application offered by Amravati University. I passed my Post Graduation in 2007. But in 5th Semester, I joined a Company called Vision System G...

Sun To acquire MySQL

Image
Sun Microsystems is going to jump in the database market with the purchase of most successful open source database developer MySQL for $1 billion. This is the main center of attraction on both the websites: & With the move, announced Wednesday, Sun takes a big leap into the $15 billion database market and pits it against the likes of Microsoft, IBM and Oracle. MySQL have clients Facebook, Google, Nokia and Baidu as customers. What makes MySQL interesting to Sun. About 20 percent of MySQL deployments run on Solaris, according to Sun estimates outlined on a conference call. Seventy five percent of MySQL deployments are not on Sun hardware. That gives Sun an opportunity to bundle hardware software and services. While Sun can also distribute MySQL through its channel and OEM partnerships and create various bundles. The overarching goal is to give MySQL more “commercial appeal” and boost adoption of open source software in the enterprise. One big question is what Sun does next to build...

Three Rules for Effective Exception Handling

Image
Exceptions in Java provide a consistent mechanism for identifying and responding to error conditions. Effective exception handling will make your programs more robust and easier to debug. Exceptions are a tremendous debugging aid because they help answer these three questions: • What went wrong? • Where did it go wrong? • Why did it go wrong? When exceptions are used effectively, what is answered by the type of exception thrown, where is answered by the exception stack trace, and why is answered by the exception message. If you find your exceptions aren't answering all three questions, chances are they aren't being used effectively. Three rules will help you make the best use of exceptions when debugging your programs. These rules are: be specific, throw early, and catch late. To illustrate these rules of effective exception handling, this article discusses a fictional personal finance manager called JCheckbook. JCheckbook can be used to record and track bank account activity...

Waoo - Netbeans 6 is Available

Image
The much awaited IDE NetBeans 6 is out today. In morning when i saw the email from net beans stating: [nbannounce] NetBeans IDE 6.0 Available . I couldn't stop myself from digging its features. It supports almost all current technologies and standard of Java/J2EE/Web Services/SOA. Even, I ordered for a Free starter kit DVD. So why Don't you order or download the NetBeans 6 Today. NetBeans is easy to use IDE. Here is link to order a Starter Kit: Get My Own NetBeans 6 Starter Kit . or Click the Image to get It: NetBeans 6 DVD includes: NetBeans IDE 6.0 with all packs Java(TM) Platform Standard Edition Development Kit (JDK) 6.0 Update 3, Java Tutorials, NetBeans tutorials and screencasts. Following Operating Systems are Supported: Windows, Linux, Solaris x86, Solaris SPARC Mac OS X. Currently, The NetBeans starter kit is available in English language, but very soon it will be available in other languages also. So what are you waiting for. Just register and Get it.