Tuesday, November 24, 2009

Technorati Blog Claiming process

This is the code sent to me by Technorati to verify my ownership of this blog!

Monday, November 23, 2009

Edison Govt listens to Citizen Service Requests

Being a Common IT Man, many a times I have to walk to the Metropark NJTransit station through Wood Avenue between Oak Tree Road and Lincoln Highway. The side walk on this particular section of the road is (or rather was) in shambles, causing a lot of problems to pedestrians. Many people in fact had to walk on the road in some stretches which caused the vehicular traffic to slow down - this is a hazard for both the pedestrians & the auto drivers.

Frustrated at this, I had put in a request through the Edison NJ Citizen Service Request on 10/6/2009 for the heck of it and then totally forgotten all about it.

Over a month later, on last Thursday morning 11/19/2009, I was in for a pleasant surprise! The same section of side walk for which I had complained, was being repaired!!!

Well, it is quite possible that I was not the first or the only one to put in this request. Or that this repair could have already been on their list of "To-Do" items as the Metropark station is already being revamped. Whatever the case, it felt qutie good to see Edison government taking such swift action on Citizen Service Requests - especially the one that I had lodged.

On a side note, some of the newly laid concrete pavement blocks have already cracked :(

Using XSane to scan on Ubuntu

While scanning on Ubuntu using Brother MFC-240C and XSane, I was frustrated that there is no way to preview the image and play with the image size, color, gamma, contrast, brightness, etc.

After fiddling around with the options in XSane, I found out that all this is very much possible by enabling the Preview Window - shortcut key CTRL+1. If you want greater control, enable the Advanced Options window as well. Check out the details of these options on the XSane documentation website:
For Preview Window
For Advanced Options

Check out the specs & reviews of Brother MFC-240C on Amazon:

Half Century: Finally Crossed the 50 Posts Mark!!!

On a side note, it's good to just realize that I finally completed my Half Century! Took me about 7 months to reach & cross the 50 posts mark! Hope to accelerate the speed of posting next year - that's going to be my New Year Resolution for 2010 ;)

Brother MFC-240C Scanner & xsane problems on Ubuntu

I have Ubuntu 9.04 running on a Dell Vostro 1000 and some time back, had configured Brother MFC-240C to scan & print. However, when I tried to scan some pictures yesterday, I was not getting any images at all! I tried with different pictures just to be sure and sometimes I got strange blobs. As I was qorking on solving this issue, I faced a set of problems and here's how I solved them ...

I tried to plug-in the MFC to different ports to check if it was a specific USB port problem but that did not help. On the contrary, I got the errors:
  • Failed to start scanner: Error during device I/O
  • Bus XXX Device XXX: Device not found
  • Failed to start scanner: Invalid Argument
These were resolved when I powered down the MFC before unplugging it and then powered it back up after plugging it in to another port.

After a while of playing around, I got the error:
Error during CMS conversion. could not open scanner ICM profile.
I realised that while playing with the scanner settings, I had inadvertantly enabled "Color Management". Unchecking "Preferences > Enable Color Management" resolved this issue but that does not end the story yet!

A search on ubuntu forums and google in general showed that many people had faced these same problems before and so I was flabbergasted when even after trying all this, the scanner was working but again I was not getting any images at all?!

After a bit of poking around, it just struck me to check whether the temp space had finished. And lo behold - I had used up almost all the available space in /tmp as well as root - the usage was 100%! Due to this, xsane was not able to save the image data sent by the scanner. Clearing up space in root and tmp finally resolved the problem and I got the scanned images perfectly now!

Check out the specs & reviews of Brother MFC-240C on Amazon:

Wednesday, November 18, 2009

Java EE 6 coming soon

Attended a presentation on Java EE 6 at NYJavaSIG by Alexis Roos & Eric Bruno.

JSR 316: Java EE 6 Specification is up for final approval ballot and should be finalized by end of this month. Java EE 6 looks very promising & exciting; it's main features are pruning and profiles.

Pruning will be remove APIs which are no longer relevant/supported/useful/popular. This implies that the pruned APIs need need not be supported by application server vendors. For example, EJB 2.x Entity Beans CMP have been axed in favor of the lighter and simpler POJO based JPA persistence model introduced as part of EJB 3 in Java EE 5. Similarly, the enhanced & more robust, feature-rich and popular JAX-WS API supercedes JAX-RPC for Web Services.

Profiles allow users to take only the components they want instead of being forced to take the whole stack. This reduces the footprint & the costs. Currently only two profiles are included - Web Profile & Full Profile. However, there is scope for creating custom profiles as well.

There are major changes to GlassFish - it is now lighter and comes up faster. It now also supports redeployment with session retention - this is a huge plus for testing/debugging complex applications.

A new glue layer called Web Beans 1.0 has been introduced which will intergrate the persistence & web layers. The persistance layers (EJB 3.0, JTA, JCA and JPA) and the presentation layers (Servlets, JSP and JSF) were segregated and featured no closed interaction. This gap has been filled with Web Beans 1.0 which are designed to be compatible with both the tiers. The Web Beans have been equipped with beans that could interact with multiple tiers and are influenced by the popular frameworks JBoss Seam and Google Guice.

Apart from these major changes, there are a lot of small things that I liked:
  • EJB 3.1 now supports CRON like scheduling from inside the container
  • EJB 3.1 now do not require business interfaces to be created - developers can now write session beans without business interfaces
  • War structure has been simplified and EJB components can be packaged directly in a WAR file instead of creating an intermediate JAR file
  • EJB Lite has been introduced as a lighter & simpler version of EJB - supports only Session Beans & JPA
  • Servlets 3.0 introduces annotations such as such as @WebServlet, @ServletFilter, etc. to reduce web.xml configuration
  • Servlets now support Asynchronous processing to support AJAX calls
  • JSF 2.0 has major enhancements and new features like request processing lifecycle is now AJAX-aware, bookmarkable JSF pages and a mechanism to easily access persistent store
  • Very good support for REST programming through JAX-RS
  • Better support for AJAX

Check out the Release Notes and the good Tutorial for Java EE 6.

Tuesday, November 17, 2009

Unix - Delete last line of file

For some stuff that I was working on, I needed to remove the last line from a very large data file. At this point, Cygwin + Sed came to my rescue!

sed '$d' source_file.dat > destination_file.dat

However, there was a catch - the last line in the file had a "\n" character at the end. The above code removed the last line but kept the newline character intact!

I verified this behavior with the command "wc -l" and that too ignored this newline character.

So after a lot of struggle, I still could not get rid of the extra newline character ...
If you find a solution for this - please let me know - thanks!

BTW, here is a link to a set of very useful one-line sed scripts on the sed sourceforge site.


Related Posts Plugin for WordPress, Blogger...