Tuesday, May 13, 2008

Java One

I went to two of the java one session on thursday 8th May 2008 afternoon. One was TS-6457 Choosing Your Java™ Technology-Based Web Framework: A Comparison and other was TS-5186 Design Patterns Reconsidered. I liked both of these session, specially the former one. I didn't know that there are 101 java frameworks out in the market, Richard Pack picked 5 out of them which appeals to him, they were GWT, Widget, Struts2, Tapestry and Groovy/grails. One can find the presentation here. The author also recommend to see the comparison of java web frameworks here .
I have personally liked struts so far, but after listening to Rick, Widget looks really cool.

And then the presentation by Alex Miller on Design Patters Reconsidered. The way he have explained the flaws of the existing design pattern and how to overcome was really impressive. You can find the presentation on his blog which is also a great source of resource for any java developer.

Monday, March 24, 2008

XEmacs and Scheme

In Windows emacs Lisp is enabled.
If not you can do so by M-x scheme-mode in the command line at the bottom and hit enter.

To enable the syntax color for scheme in the Xemacs,
type M-x font-lock-mode in the command line at the bottom and hit enter.

To get help
type C-h

where M = Meta-key, usually Alt, but it could be something else also.
where C = Meta-key usually Ctrl.

IRC Troubleshooting

software caused connection abort


Check if you have the latest McAfee installed, they have added a new option to block the ports. and by default they blocks port 25 and all IRC ports..

* Open Virusscan console (rightclick icon in systray and select virusscan console)
* Open Acces Protection
* Uncheck Prevent IRC communication

Wednesday, September 19, 2007

XML

What is XML Whitespace?

XML considers four characters to be whitespace: the carriage return (\r or ch(13)), the linefeed (\n or ch(10)), the tab(\t), and the spacebar (' '). In XML documents, there are two types of whitespace:

  • Significant whitespace is part of the document content and should be preserved.
  • Insignificant whitespace is used when editing XML documents for readability. These whitespaces are typically not intended for inclusion in the delivery of the document.

Usually without DTD or XML schema definition, all whitespaces are significant whitespaces and should be preserved. However, with DTD or XML schema definitions, only the whitespaces in the content are significant as follows:


------------------
John Smith
Product Manager
Example.com
--------------------

What is XML Whitespace?

XML considers four characters to be whitespace: the carriage return (\r or ch(13)), the linefeed (\n or ch(10)), the tab(\t), and the spacebar (' '). In XML documents, there are two types of whitespace:

  • Significant whitespace is part of the document content and should be preserved.
  • Insignificant whitespace is used when editing XML documents for readability. These whitespaces are typically not intended for inclusion in the delivery of the document.

Usually without DTD or XML schema definition, all whitespaces are significant whitespaces and should be preserved. However, with DTD or XML schema definitions, only the whitespaces in the content are significant as follows:


------------------
John Smith
Product Manager
Example.com
--------------------


Problem : java.net.MalformedURLException: no protocol: error
DocumentBuilder documentBuilder
DocumentBuilderFactory.newInstance().newDocumentBuilder();

Document expectedDoc = documentBuilder.parse(new InputSource(actualResult)));
where actualResult is an string containing the xml

Solution : Here a String is passed to the parse method, but it expects a URI (as
the documentation says, "Parse the content of the given URI as an XML
document").

Do this instead:Document doc = documentBuilder.parse(new InputSource(new StringReader(getValidXML())));





Saturday, August 18, 2007

Virus Trouble Shooting

How to remove VirusProtectPro or VirusProtect Pro (Removal Instructions)
http://www.bleepingcomputer.com/forums/topic98219.html

Computer Troubleshooting guide

Few of the common problem that we see on computer and their solutions.
When you are making a change to windows registry most of the times it works but if it doesn't, restart your computer and then it should work.

Problem: Registry Editing Has Been Disabled By Your Administrator
Solution: Start > Run Type
REG add HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\System /v DisableRegistryTools /t REG_DWORD /d 0 /f

Problem: Task Manager button grayed out.
Solution: Could be group policy settings. Try this:
Start > Run, Type "gpedit.msc", then go User Configuration > Administrative Templates > System > Ctrl + Alt + Del Options. Set Remove Task Manager to Disabled.

Problem: Task Manager has been disabled by your administrator
Solution 1: Click Start, Run and type this command exactly as given below:

REG add HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\System /v DisableTaskMgr /t REG_DWORD /d 0 /f

Solution 2:
* Click Start, Run and type Regedit.exe
* Navigate to the following branch:
HKEY_CURRENT_USER \ Software \ Microsoft \ Windows \ CurrentVersion \ Policies\ System
* In the right-pane, delete the value named DisableTaskMgr

Problem: Folder options is not available in the Windows Explorer Tools menu.
Solution: Click Start, choose Run and execute regedit.

Navigate to: [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer]

Look for a value called NoFolderOptions on the right panel

Right click on the NoFolderOptions value and choose delete

Navigate to: [HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer]

Right click on NoFolderOptions on the right pane and choose Delete

Wednesday, May 2, 2007

VMWare Windows XP Ubuntu

I was trying to install ubuntu as a Guest OS on my Windows XP.
I started the installation two times and due to some reason I didn't completed it.
After that when I opened up VMWare Server Console, I was surprised to see that the option for creating a new virtual machine was not coming.
I searched on Google and I found a note somewhere that says go and restart the "VMWare Authorization Service" by running services.msc and yes the trick worked.

The second thing is I had downloaded the ISO image of ubuntu now I was not able to find out how do I use this image which is stored on my hard disk so the option is

Select "VM" -> "Settings" click on the CD-ROM drive.
Select the option to use ISO image and use the "Browse" button to locate the ISO image.

And then Start Virtual Machine, it will install the guest OS

Third thing if you have made the VM as private you won't be able to see it in the inventory.
So go to VM Settings uncheck the box for the private setting and you are done.