Thursday, July 16, 2009

Do you have TIME?

It's a nice touching story sent by my friend from more than a decade when I told him that I am undergoing tremendous work pressure spending lot of hours in a day working on projects & deadlines...
A woman came home from work late, tired and irritated, to find her 5-year old son waiting for her at the door.
SON: 'Mummy, may I ask you a question?'
MUM: 'Yeah sure, what it is?' replied the woman.
SON: 'Mummy, how much do you make an hour?'
MUM: 'That's none of your business. Why do you ask such a thing?' the woman said angrily.
SON: 'I just want to know. Please tell me, how much do you make an hour?'
MUM: 'If you must know, I make R 50 an hour.'
SON: 'Oh,' the little boy replied, with his head down. SON: 'Mummy, may I please borrow R25?'
The mother was furious, 'If the only reason you asked that is so you can borrow some money to buy a silly toy or some other nonsense, then you march yourself straight to your room and go to bed. Think about why you are being so selfish. I don't work hard everyday for such childish frivolities.' The little boy quietly went to his room and shut the door...
The woman sat down and started to get even angrier about the little boy's questions. How dare he ask such questions only to get some money? After about an hour or so, the woman had calmed down , and started to think: Maybe there was something he really needed to buy with that R25.00 and she really didn't ask for money very often.The woman went to the door of the little boy's room and opened the door.
'Are you asleep, son?' She asked. 'No Mummy, I'm awake,' replied the boy. 'I've been thinking, maybe I was too hard on you earlier' said the woman. 'It's been a long day and I took out my aggravation on you. Here's the R25 you asked for.' The little boy sat straight up, smiling. 'Oh, thank you Mummy!' he yelled. Then, reaching under his pillow he pulled out some crumpled up bills. The woman saw that the boy already had money, started to get angry again. The little boy slowly counted out his money, and then looked up at his mother. 'Why do you want more money if you already have some?' the mother grumbled. 'Because I didn't have enough, but now I do,' the little boy replied.
'Mummy, I have R50 now. Can I buy an hour of your time? Please come home early tomorrow. I would like to have dinner with you.' The mother was crushed. She put her arms around her little son, and she begged for his forgiveness.
It's just a short reminder to all of you working so hard in life. We should not let time slip through our fingers without having spent some time with those who really matter to us, those close to our hearts. Do remember to share that R50 worth of your time with someone you love. If we die tomorrow, the company that we are working for could easily replace us in a matter of hours. But the family & friends we leave behind will feel the loss for the rest of their lives.

Wednesday, July 08, 2009

Must Declare the scalar variable "@EmployeeID"

Used Technolgies: Visual Web Developer, C#, SQL Server Express 2005
I did some cut paste from the code samples available on web which is better to use instead of reinventing the wheel. Compiling was OK. Page ran successfully. And then, when I tried to delete one row from Grid View, I ran into the error 'Must declare the scalar variable "@EmployeeID"'. Again searching around the web started. Found the fix luckily… here is the one which solved my problem.
Set the DataKeyNames property for the GridView. This property sets the GridView automatically for the parameter values.

Saturday, June 20, 2009

Solution: Failed to Access IIS metabase

How to solve Failed to Access IIS metabase

I have solved my problems all the time by running

aspnet_regiis -i

at command prompt from "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\".

You can also do that...

Monday, June 15, 2009

Folder Tricks [Windows Vista]

How to bring Menu in Folder [Windows Vista]

Menus are not appearing in folders. Dont worry - press the ALT key and menu are there to be served... ALT key toggles Menu on or off.

How to change mouse clicking from double click to single click in Windows Vista.

  1. Go to the start menu and choose computer From the menu, choose tools.
  2. Then choose Folder Options. On the general tab undering the heading click items as follows, choose single-click to open an item.
  3. Then choose which single click option you want to use.
  4. Then press apply and ok.

Friday, May 22, 2009

Flood Forecasting


An excellent resource for flood forecasting and flood monitoring exists in Bangladesh.
Bangladesh Water Development has access to an online system wherein it issue daily forecast for water level, inundation map and relevant flood information. See attached pic and visit website at http://www.ffwc.gov.bd/.

Such attempts helps in minimizing nature's apathy by giving some time to take precautionary action.

Tuesday, April 28, 2009

A for Alpha and B for Bravo

I thought people outside of tourism industry should use these:
A: Alpha
B: Bravo
C: Charlie
D: Delta
E: Echo
F: Foxtrot
G: Golf
H: Hotel
I: India
J: Juliet
K: Kilo
L: Lima
M: Mike
N: November
O: Oscar
P: Papa
Q: Quebec
R: Romeo
S: Sierra
T: Tango
U: Uniform
V: Victor
W: Whisky
X: X Ray
Y: Yankee
Z: Zulu

Friday, April 24, 2009

Hydrology Modeling - EnKF and Monte Carlo Simulation

Ensemble Kalman Filter
Source: http://en.wikipedia.org/wiki/Ensemble_Kalman_filter
The ensemble Kalman filter (EnKF) is a recursive filter suitable for problems with a large number of variables, such as discretizations of partial differential equations in geophysical models. EnKF makes the assumption that all probability distributions involved are Gaussian; when it is applicable, it is much more efficient than the particle filter.
EnKFs represent the distribution of the system state using a collection of state vectors, called an ensemble, and replace the covariance matrix by the sample covariance computed from the ensemble. The ensemble is operated with as if it were a random sample, but the ensemble members are really not independent - the EnKF ties them together. One advantage of EnKFs is that advancing the pdf in time is achieved by simply advancing each member of the ensemble.

Ensemble
Source: http://en.wikipedia.org/wiki/Numerical_weather_prediction#Ensembles
It is impossible to definitively predict the state of the atmosphere, owing to the chaotic nature of the fluid dynamics equations involved. Furthermore, existing observation networks have limited spatial and temporal resolution, especially over large bodies of water such as the Pacific Ocean, which introduces uncertainty into the true initial state of the atmosphere. To account for this uncertainty, stochastic or "ensemble" forecasting is used, involving multiple forecasts created with different model systems, different physical parametrizations, or varying initial conditions. The ensemble forecast is usually evaluated in terms of the ensemble mean of a forecast variable, and the ensemble spread, which represents the degree of agreement between various forecasts in the ensemble system, known as ensemble members.

Monte Carlo Simulation
Source: http://en.wikipedia.org/wiki/Monte_Carlo_method
The name "Monte Carlo" was popularized by physics researchers Stanislaw Ulam, Enrico Fermi, John von Neumann, and Nicholas Metropolis, among others; the name is a reference to the Monte Carlo Casino in Monaco where Ulam's uncle would borrow money to gamble.
Monte Carlo simulation methods are especially useful in studying systems with a large number of coupled degrees of freedom, such as fluids, disordered materials, strongly coupled solids, and cellular structures. More broadly, Monte Carlo methods are useful for modeling phenomena with significant uncertainty in inputs, such as the calculation of risk in business, hydrological modeling.
Monte Carlo methods are a class of computational algorithms that rely on repeated random sampling to compute their results. Monte Carlo methods are often used when simulating physical and mathematical systems. Because of their reliance on repeated computation and random or pseudo-random numbers, Monte Carlo methods are most suited to calculation by a computer. Monte Carlo methods tend to be used when it is infeasible or impossible to compute an exact result with a deterministic algorithm.