tag:blogger.com,1999:blog-50809362024-03-13T12:51:55.211-07:00Life of a java discipleNothing under SUN is better than JAVAKumarhttp://www.blogger.com/profile/17664018066095939310noreply@blogger.comBlogger142125tag:blogger.com,1999:blog-5080936.post-41753342276411340982019-06-21T23:09:00.000-07:002019-06-21T23:10:19.044-07:00Missing Guide for App Bundles
App Bundles is an amazing feature for Android Developers. It helps reduce the app size for quicker downloads without having to worry about building for every architecture separately. Bundletool provides command line too to help with testing App Bundles before publishing the app.
Bundletool docs seem to miss critical information to complete testing for developers today. This guide hopes to Kumarhttp://www.blogger.com/profile/17664018066095939310noreply@blogger.com0tag:blogger.com,1999:blog-5080936.post-79035268209092262192010-10-25T00:15:00.000-07:002010-10-25T00:26:24.678-07:00Secure Facebook BrowsingIt is common that most websites use HTTPS for user authentication and use HTTP for everything else. This leaves users vulnerable to Cookie Hijacking. Tools like Firesheep brought this to forefront. It lets someone in your network perform Cookie Hijacking of Facebook as simple as installing Firefox Extension. The best way to avoid this hack is to completely use HTTPS when using Facebook but the Kumarhttp://www.blogger.com/profile/17664018066095939310noreply@blogger.com0tag:blogger.com,1999:blog-5080936.post-39822996058860714222010-10-22T22:50:00.000-07:002010-10-22T23:03:19.405-07:00Firefox Extension: Block Facebook from your lifeIts impossible to be on web and not be a Facebook user these days. Even if you are not a Social Network user, Facebook is notified whenever you visit one of the more than one million sites on the web that use Facebook Connect and has a history of leaking personally identifiable information to third parties. Either way Facebook knows your web life.Here is a Firefox Extension that completely blocksKumarhttp://www.blogger.com/profile/17664018066095939310noreply@blogger.com0tag:blogger.com,1999:blog-5080936.post-79092394801617880092010-04-12T15:14:00.000-07:002010-04-12T15:28:15.306-07:00WGET - AuthenticationHow to access a page using wget that requires authentication? wget is well equipped to handle multiple authentication scenario's.HTTP Basic Athentication: To download a page that requires HTTP basic authentication use the following mechanism:wget https://myUserName:myPassword@www.myserver.com/mypage.htmlwget http://myUserName:myPassword@www.myserver.com/mypage.htmlForm Post: To download a page Kumarhttp://www.blogger.com/profile/17664018066095939310noreply@blogger.com0tag:blogger.com,1999:blog-5080936.post-38964260700536053002010-03-31T10:59:00.000-07:002010-03-31T11:15:05.436-07:00Hey Microsoft how about banning iTunes on windows?Wouldn't it be interesting if Microsoft follows "CPU Hog" strategy from Jobs and ban iTunes on windows for installing malware that is "Memory Hog"?Kumarhttp://www.blogger.com/profile/17664018066095939310noreply@blogger.com1tag:blogger.com,1999:blog-5080936.post-88152026083702661032010-03-08T09:57:00.000-08:002010-03-09T08:29:10.079-08:00Making No as Default in EXTJS Confirm DialogCurrently there is no configuration that supports making "No" button as default for a Confirm dialog in ExtJS. So how to make no button as default?One way to do this is to get Dialog and mark second button as default. Here is the code snippet that makes no as default button:var dialog = Ext.MessageBox.confirm('Confirm', 'Do you really mean it?' ,feedbackFunction).getDialog();dialog.defaultButton Kumarhttp://www.blogger.com/profile/17664018066095939310noreply@blogger.com0tag:blogger.com,1999:blog-5080936.post-51298856192161961282010-03-07T10:13:00.000-08:002010-03-07T10:43:33.365-08:00GZIP and Save the earthIt is amazing how we think about least significant things and put in Maximum effort rather than take care of low hanging fruits first. GZIP RFC came out around 1996 and all modern browsers (HTTP/1.1 supported Browsers) support GZIP and still it is amazing how many website doesn't support such a basic trick to save 50% of their bandwidth costs. Just adding GZIP support reduces bandwidth by 50% (Kumarhttp://www.blogger.com/profile/17664018066095939310noreply@blogger.com0tag:blogger.com,1999:blog-5080936.post-76465622472643613502010-01-18T05:16:00.000-08:002010-01-18T05:57:31.248-08:00Making Jersey work with SpringMaking Jersey work with Spring simplifies JAX-RS (Restful webservices) and make Restful services development look lot easier. This is simple tutorial of how to make Jersey work with Spring3.0 (Same can be applied to Spring 2.5)Libraries needed:1) Spring 3.0 distribution.2) Jersey 1.x distribution.3) Jersey Spring 1.0.1-SNAPSHOTLets Inject a simple Spring Bean using Jersey @Inject annotation.Step Kumarhttp://www.blogger.com/profile/17664018066095939310noreply@blogger.com4tag:blogger.com,1999:blog-5080936.post-55258541858086380932010-01-08T17:17:00.000-08:002010-01-08T17:22:00.053-08:00Android EverywhereSun's dream of putting Java Everywhere is finally being realized but it has nothing to do with Sun and everything to do with Google.Now Android is on Laptops, Netbooks, Mobile Phones, Video Phones, Washing Machines, Microwaves, Printers. Android is fast becoming UI device for consumer electronics.Kumarhttp://www.blogger.com/profile/17664018066095939310noreply@blogger.com0tag:blogger.com,1999:blog-5080936.post-22895479326441202622010-01-04T22:19:00.000-08:002010-01-04T22:32:43.260-08:00MySpace Shame: Fix API and then talk of Developer ContestToday MySpace announced Submissions Now Open for the MySpace Developer Challenge. Which is really great because MySpace is also trying to drive innovation from developer community on its platform. I got pretty excited to get an app going using Myspace API. After trying to integrate MySpace OAuth for an hour without much success constantly failing in 6.3.2 section of OAuth spec title Service Kumarhttp://www.blogger.com/profile/17664018066095939310noreply@blogger.com0tag:blogger.com,1999:blog-5080936.post-52033726510484178692009-12-24T07:30:00.000-08:002009-12-24T07:34:41.713-08:00Disabling browser context menu in ExtJSMany a times when ExtJs context menu (Right Click Menu) is added to components, it creates a problem as browser right click menu comes up after ExtJs right click menu is displayed. This is one of common issues posted on ExtJs forums consistently. Here is a simple way to solve the problem:Add the following line: Ext.getBody().on("contextmenu", Ext.emptyFn, null, {preventDefault: true});as firstKumarhttp://www.blogger.com/profile/17664018066095939310noreply@blogger.com0tag:blogger.com,1999:blog-5080936.post-85255053432654669362009-10-09T00:09:00.000-07:002009-10-09T00:12:09.702-07:00The Boy Who Harnessed the WindFirst watched this dude on John Stewart. Most fascinating thing I heard in a while and proof world is filled with Hope: Kumarhttp://www.blogger.com/profile/17664018066095939310noreply@blogger.com0tag:blogger.com,1999:blog-5080936.post-31346508669766770442009-02-19T22:27:00.000-08:002009-02-19T22:39:39.695-08:00Bye Bye SpammersIt appears after the latest attempt to drop the connection from spammers at IP level, traffic has come to normal level. To read about the issue and resolution follow these links:Day 1Day 2Graph showing traffic returning to normal:Kumarhttp://www.blogger.com/profile/17664018066095939310noreply@blogger.com0tag:blogger.com,1999:blog-5080936.post-22626170775615176692009-02-19T00:09:00.000-08:002009-02-19T16:55:37.366-08:00Someone remind google what year it isChrome 1.0.154.48. was released on Feb 3 2009.Chrome home page seems to have the same issue:Kumarhttp://www.blogger.com/profile/17664018066095939310noreply@blogger.com0tag:blogger.com,1999:blog-5080936.post-81545040916127271592009-02-17T19:46:00.000-08:002009-02-17T19:51:54.932-08:00More fun with ProxyAfter disabling proxy on my server, I still see traffic on my server being high (My monthly quota might not exceed at this rate but takes up 50% of Bandwidth). Looking at access log it appears that requests hasn't stopped though they are getting 403 error. So requests coming to server and 403 response by itself is making up few GB worth a data every day. So decided to block these requests at IP Kumarhttp://www.blogger.com/profile/17664018066095939310noreply@blogger.com0tag:blogger.com,1999:blog-5080936.post-34273795244318973522009-02-16T11:22:00.000-08:002009-02-16T11:27:49.293-08:00Proxy turn it offNoticed something funny on my personal webserver. I was testing some proxy settings and left proxy setting on when done. Today morning when I tried to access my server, its unreachable. Checking on the log's there seem to be too many requests proxying through my web server. All the IP's seem to originate from China and destination seems to be Ad server:60.173.11.121 - - [16/Feb/2009:12:07:27 Kumarhttp://www.blogger.com/profile/17664018066095939310noreply@blogger.com0tag:blogger.com,1999:blog-5080936.post-31088550817908767182009-01-11T20:48:00.000-08:002009-01-11T22:48:29.509-08:00JSF and Nested Diagnostic ContextOne of the important design criteria for any large concurrent system is to be able to audit and debug production logs. Any real-world web applications need to deal with multiple clients simultaneously. In a typical java web application implementation of such a system, different threads will handle different clients. A possible but discouraged approach to differentiate the logging output of one Kumarhttp://www.blogger.com/profile/17664018066095939310noreply@blogger.com1tag:blogger.com,1999:blog-5080936.post-9188446416066063522009-01-10T11:01:00.000-08:002009-01-10T11:33:12.171-08:00Microsoft and Silly bugsLess than a fortnight back Zune30 leap year bug caused mass suicide of all Zune30 devices. Later on it was found to be simple looping bug in Zune's Clock Driver as shown here in the code to determine year part of the date:year = ORIGINYEAR; /* = 1980 */while (days > 365){ if (IsLeapYear(year)) { if (days > 366) { days -= 366; year += 1; } } Kumarhttp://www.blogger.com/profile/17664018066095939310noreply@blogger.com2tag:blogger.com,1999:blog-5080936.post-88576904854532178822008-12-24T17:46:00.000-08:002008-12-24T17:47:12.617-08:00If Matrix ran on WindowsKumarhttp://www.blogger.com/profile/17664018066095939310noreply@blogger.com0tag:blogger.com,1999:blog-5080936.post-44494222659197986292008-11-03T18:26:00.000-08:002008-11-03T18:41:00.825-08:00Throwing this java.lang.Error can get you firedImagine your boss going through your server log file and he see's the Error being thrown as CoderMalfunctionError. The discussion might not start in a pleasant way but you both might end up laughing since it really has nothing to do with Coder Malfunctioning. java.nio.charset.CoderMalfunctionError is thrown when either encoder or decoder is malfunctioning. Sun decided to call combination of Kumarhttp://www.blogger.com/profile/17664018066095939310noreply@blogger.com1tag:blogger.com,1999:blog-5080936.post-42226110760908587042008-10-17T21:56:00.000-07:002008-10-17T23:27:11.462-07:00Debugging JWS with EclipseAfter nearly 10 years, I spent considerable amount of time working on java desktop application recently. Looking at Java Web Start forums and FAQ it appears still users have issues with setting up Eclipse Remote Debugging with Java Web Start. This can be easily achieved by following three simple steps:1. Debug Java Web Start applications locally before deploying them on your web server. i.e use Kumarhttp://www.blogger.com/profile/17664018066095939310noreply@blogger.com1tag:blogger.com,1999:blog-5080936.post-52469493477749541262008-09-23T15:07:00.000-07:002008-09-23T15:09:11.049-07:00Android PriceI saw the live webcast and tried to preorder Andriod which was supposed to be 179$ with 2 year contract. But here is what I see when I go to TMobile web site and try to buy G1:Kumarhttp://www.blogger.com/profile/17664018066095939310noreply@blogger.com1tag:blogger.com,1999:blog-5080936.post-41635143155132159952008-09-19T11:59:00.001-07:002008-09-19T12:01:18.622-07:00Best PC vs Mac ParodyWith all the hype around Microsoft and Apple Ads, I think this the best parody:Kumarhttp://www.blogger.com/profile/17664018066095939310noreply@blogger.com1tag:blogger.com,1999:blog-5080936.post-7436062787382116892008-09-15T22:16:00.000-07:002008-10-27T22:06:23.261-07:00JPA: java.lang.IllegalArgumentException: Removing a detachedOne of the common issues that I end up debugging is the following exception:java.lang.IllegalArgumentException: Removing a detached instanceWhen does this occur?: While removing a record.Why does this occur?: You are trying to delete a record which is retrieved in another transaction (probably even trying to delete a record that is stored in user HTTP session).How to fix it?: Make sure you Kumarhttp://www.blogger.com/profile/17664018066095939310noreply@blogger.com1tag:blogger.com,1999:blog-5080936.post-37285528763558624792008-08-31T23:02:00.000-07:002008-08-31T23:26:31.698-07:00Low cost Multi-Touch projectSince there is too much hype of Multi-Touch products from different companies, its worth checking out Johnny Lee's cheaper version of Multi-Touch screen. I bought a LED flashlight for 18$ and ever since having fun with my WII.Here is a introduction video from Johnny Lee:Johnny Lee’s page has more info and is worth checking out.Also Wiimote Whiteboard has a good Java API that worked fairly well Kumarhttp://www.blogger.com/profile/17664018066095939310noreply@blogger.com0