Monday, November 30, 2009

let us all be thankful.

“Let us rise up and be thankful, for if we didn’t learn a lot today, at least we learned a little, and if we didn’t learn a little, at least we didn’t get sick, and if we got sick, at least we didn’t die; so, let us all be thankful.”

- Buddha Through Julie911

Tragedy is a test of courage.

 “Tragedy is a test of courage. If you can meet it bravely, it will leave you bigger than it found you.”

- A Star is Born (1937) from Perfectly Imperfect/Julie911

 

 

The joy of life comes from our encounters with new experiences

 “So many people live within unhappy circumstances and yet will not take the initiative to change their situation because they are conditioned to a life of security, conformity, and conservatism, all of which may appear to give one peace of mind, but in reality nothing is more dangerous to the adventurous spirit within a man than a secure future. The very basic core of a man’s living spirit is his passion for adventure. The joy of life comes from our encounters with new experiences, and hence there is no greater joy than to have an endlessly changing horizon, for each day to have a new and different sun.”

- Chris McCandless, Into The Wild from Perfectly Imperfect/Julie911

 

 

Wednesday, November 25, 2009

You should never try to be better than someone else

You should never try to be better than someone else. Always learn from others. Never sease trying to be the best that you could be. That is under your control. If you are too engrossed into things that you have no control, it will adversely affect the things over which you have control.

Definition of success: Peace of mind attending only through self satisfaction in knowing you made the best of the effort of which you are capable of. Others cannot judge it. Your reputation is what you are perceived to be. Your character is what you really are.

Believe that the ways will work out the way we want it to provided we do what we should.


Sometimes I think the Fates must grin as we denounce them and insist the only reason we can't win, is the Fates themselves that miss.
Yet there lives on the ancient claim:
We win or lose within ourselves. The shining trophies on our shelves can never win tomorrow's game.
You and I know deeper down, there's always a chance to win the crown,
But when we fail to give our best,
we simply haven't met the test, of giving all
and saving none until the game is really won.
Of showing what is meant by grit.
Of playing through when other Quit,
Of playing though, not letting up.
It's beating down that wins the cup. Of dreaming there's a goal ahead.
Of hoping when our dream are dead.
Of praying when our hopes are fled.
Yet losing, not afraid to fall,
if bravely we have given all. For who can ask more of a man
then giving all within his span.
Giving all, it seems to me, is not so far from vistory.
And so the fates are seldom wrong, no matter how they twist and wind,
It's you and I who make our fates.
We open up or close the gates on the road ahead or the road behind.



Never mention Winning. You can lose when you outscore somebody in a game. And you can win when you're outscored.
Hold your head up after a game. When a game is over, and you see somebody that didn't know the outcome, I hope they cound't tell by your actions whether you outscored an opponent or the opponent outscored you.

If you make the effort to do the best you can regularly, the results will be about what they should be. Not necessary to be what you want them to be, but they will be about what they should.

The result of the game should be the byproduct of your best effort and not the end result.

"The journey is better than the end" - Cervantes


- My notes from a talk by John Wooden (source)

The reason people find it so hard to be happy is ...

“The reason people find it so hard to be happy is that they always see the past better than it was, the present worse than it is, and the future less resolved than it will be.”

- 
Marcel Pagnol Through Julie911

Monday, November 23, 2009

...This, too, shall pass.

“Expect trouble as an inevitable part of life and repeat to yourself the most comforting words of all: This, too, shall pass.”

- Ann Landers Through Julie911

Sunday, November 22, 2009

Strategies for development with Liferay

Following options can be adopted for developing Liferay based solutions
1. Plug-in SDK Environment (least [but sufficient in most cases,] flexibility and least migration effort): Liferay supports different types of plugins such as themes, layout templates, portlets, webs (which are web applications) and hooks. Liferay provides a Plug-in SDK to facilitate development of these plugins. One can extend by implementing the appropriate plug-in.
2. Extension Environment (Very good flexibility and can need extensive migration effort): This approach involves writing custom code that overrides Liferay code. Following approaches to overriding liferay code exist:
a. Modifying JSP files (of the porttal or the built in portlets)
b. Modifying configuration files (portal-ext.properties [layouts, themes, hibernate, cache, users, groups ets...], system-ext.properties [for java system properties used by liferay], ext-spring.xml [custom source code being spring dependency injected], web.xml [for servlet configuration], struts-config.xml [for struts related extension]
c. Custom classes (configures through portal.properties)
This approach does *not* include changing Liferay source code.
3. Modifying Liferay Source code: Pay Liferay, get their source code changed and contributed back to community.

Portlets in Liferay

There are 3 approaches to building portlets that can be deployed in liferay
1. JSR 168/286 Compliant Portlet - This is a standards compliant portlet and can hence be deployed not only in Liferay but in any portal server. The downside is it cannot use Liferay specific APIs.
2. Liferay plugin portlet - These portlets are liferay plugins. They may have a dependency on Liferay APIs (Portal kernel and Portal Service). Having dependencies on Liferay APIs restricts their portability to Liferay only.
3. Web application exposed as a portlet - One type of a Liferay plugin is a web applications (webs). So a simple web application can be exposed as a portlet in Liferay using the webs plugin.

Saturday, November 21, 2009

DRM - Digital Rights Management

My limited understanding of DRM: When music is downloaded from itunes, it includes the user id as a (DRM) label into the content file. This way when the content file is published on a file sharing web site, the culprit is easily know.

Friday, November 20, 2009

Audio connectors/plug/jacks

Stereo plugs are TRS (Tip, Ring, Sleeve) connectors. The TRS indicate contact points where audio signals are passed on. There are just TS and TRRS connectors too.

Jack plug, in UK, refers to a female connector and an Jack socket to a make connector.

In US when a connector is fixed, its called a jack.

2.5mm (diameter) Male Stereo socket - not commonly used

3.5mm (diameter) Male Stereo socket - the most commonly used:
There is also a 6.3 mm which is also used but not as frequently as 3.5 mm.

An RCA (Radio Corporation of America - which found it ) Male socket




Thursday, November 19, 2009

Which process has a lock on a file (continued....)

The command line utility to check the processes that have a lock on a given file:

 

e.g.

 

$ handle server.log

 

Handle v3.42

Copyright (C) 1997-2008 Mark Russinovich

Sysinternals - www.sysinternals.com

 

<Non-existant Process> pid: 277144  43C: E:\xyz\abc\logs\server.log

<Non-existant Process> pid: 278500  71C: E:\xyz\abc\logs\server.log

<Non-existant Process> pid: 279112  71C: E:\xyz\abc\logs\server.log

$CDPATH - very useful for bash shell navigation

Often, we “cd” to commonly used directories in a bash shell. Having to type the whole path is often a pain. I was using aliases to navigate to commonly used directories (e.g. alias scripts=’cd /cygdrive/c/scripts’). But this would require you to identify each frequently used directory, define an alias for each one of them and remember the alias.

 

A good friend of mine, pointed out an alternate to achieve the same. $CDPATH. This is a set of paths that the “cd” command would look into (besides “.”) for the directory to switch to. So if “cd scripts” is executed, it will check if the current directory has a “scripts” directory, if not, it will look for a “scripts” directory in each directory indicated in the “CDPATH” variable. If “CDPATH” has “/cygdrive/c/: /cygdrive/c/home/xyz”, then cd will look for “./scripts”, “/cygdrive/c/scripts”, “/cygdrive/c/home/xyz/scripts” and cd to the first directory that exists.

 

Source.

 

Wednesday, November 18, 2009

Which process has a lock on a file

Many times one attempts to delete a file and windows reports that the file is in use by another program and hence cannot be deleted. Tracing out which program is using the file was a hassle.

 

With Windows Process Explorer, you can figure out which process is holding the lock on a given file.

 

Once installed and started, click on “Show Lower Pane (Ctrl + L)” on the tool bar. This will open up a listing below the list of the processes. Now click on a process and all files used by that process is listed in the lower pane.

Saturday, November 14, 2009

Friday, November 13, 2009

Merging specific commited changes from one branch to another

To merge changes made in revision 7877 from trunk to the current working directory (which could be another branch):

 

svn merge -r -r7876:7877 svn://xyz/abc/efg/trunk

Lunch at O'falafel today

Went to O’falafel today and the sandwich for pretty good.

Thursday, November 12, 2009

Tuesday, November 10, 2009

When you love someone...

“When you love someone, you’ve got to trust them. There’s no other way. You’ve got to give them the key to everything that’s yours. Otherwise, what’s the point?”

- 
Robert De Niro, Casino through Julie911

"A cheerful frame of mind, reinforced by relaxation. is the medicine that puts all ghosts of fear on the run."

“A cheerful frame of mind, reinforced by relaxation… is the medicine that puts all ghosts of fear on the run.”

- 
George Matthew Adams through Julie911

Friday, November 06, 2009

Tuesday, November 03, 2009

Stress is poison.

“Stress is poison.”

- Agavé Powers through Julie911