If you set height in css for a div and check it in IE and Firefox you will get two different heights.
Empty divs in IE have a minimum height, more or less equal to the current line-height.
The way to solve this is:
1) Put a comment inside the div: <div style="height: 10px;"><!-- --></div>
2) Put a inside the div and add this to its style: font-size:1px; line-height:0.
A repository of my thoughts, a blog, a source to get insight, know-hows, my views on Software Development and everything else in between......
Wednesday, June 04, 2008
Friday, May 30, 2008
Inflation is 8.1% in India
All are aware of the recent inflation thats happening in India, but one thing i have observed is, whenever prices go high and come down after some days or months the people who increased the prices of the goods carry the same high prices. Government must take action and it should avoid problems happening due to this issue.
What are your opinions?
What are your opinions?
Friday, May 02, 2008
Sequence Generator Function in SQL
Here is the sequence generator function written in SQL, which when passed starting and end numbers will generate the rest sequence automatically.
CREATE FUNCTION fn_p( @exp int)
RETURNS @result TABLE (id int)
AS
BEGIN
DECLARE @pow int
SET @pow = POWER(10, @exp)
INSERT @result SELECT 0 id UNION ALL SELECT 1 * @pow UNION ALL SELECT 2 * @pow UNION ALL SELECT 3 * @pow UNION ALL SELECT 4 * @pow UNION ALL SELECT 5 * @pow UNION ALL SELECT 6 * @pow UNION ALL SELECT 7 * @pow UNION ALL SELECT 8 * @pow UNION ALL SELECT 9 * @pow RETURNENDGO
CREATE FUNCTION fn_sequence
(
@start int,
@end int
)
RETURNS @result TABLE(id int)
AS
BEGIN
IF @start > @end
RETURN
IF @end < 10
INSERT @result SELECT id FROM ( SELECT a0.id id FROM fn_p(0) a0 ) d WHERE id BETWEEN @start AND @end ELSE
IF @end < 100 INSERT @result SELECT id FROM ( SELECT (a1.id + a0.id) id FROM fn_p(1) a1 CROSS JOIN fn_p(0) a0 ) d WHERE id BETWEEN @start AND @end ELSE
IF @end < 1000 INSERT @result SELECT id FROM ( SELECT (a2.id + a1.id + a0.id) id FROM fn_p(2) a2 CROSS JOIN fn_p(1) a1 CROSS JOIN fn_p(0) a0 ) d WHERE id BETWEEN @start AND @end ELSE
IF @end < 10000 INSERT @result SELECT id FROM ( SELECT (a3.id + a2.id + a1.id + a0.id) id FROM fn_p(3) a3 CROSS JOIN fn_p(2) a2 CROSS JOIN fn_p(1) a1 CROSS JOIN fn_p(0) a0 ) d WHERE id BETWEEN @start AND @end
RETURNENDGO
Friday, April 11, 2008
Thursday, March 27, 2008
Tutorials to Learn ASP.NET
Following are the tutorials i hope are good to learn ASP.NET.
1. http://msconline.maconstate.edu/tutorials/ASPNET20/default.htm
2. http://www.asp.net/learn/
Will keep posting such useful stuff whenever i find.
1. http://msconline.maconstate.edu/tutorials/ASPNET20/default.htm
2. http://www.asp.net/learn/
Will keep posting such useful stuff whenever i find.
Tuesday, March 25, 2008
Nanotechnology: The Future
See the below video by Nokia, which shows the future based on Nanotechnology. It's pretty impressive to see such things which are futuristic. I think we are living in wonderful era with so many inventions.
Here goes the explanation given for it on you tube. And Find out more from Nokia .
Morph is a concept demonstrating some of the possibilities nanotechnologies might enable in future communication devices. Morph can sense its environment, is energy harvesting and self cleaning .
Morph is a flexible two-piece device that can adapt its shape to different use modes. Nanotechnology enables to have adaptive materials yet rigid forms on demand.
It is also featured in the MoMA online exhibition "Design and the Elastic Mind". It has been a collaboration project of Nokia Research Center and Cambridge Nanoscience Center.
Here goes the explanation given for it on you tube. And Find out more from Nokia .
Morph is a concept demonstrating some of the possibilities nanotechnologies might enable in future communication devices. Morph can sense its environment, is energy harvesting and self cleaning .
Morph is a flexible two-piece device that can adapt its shape to different use modes. Nanotechnology enables to have adaptive materials yet rigid forms on demand.
It is also featured in the MoMA online exhibition "Design and the Elastic Mind". It has been a collaboration project of Nokia Research Center and Cambridge Nanoscience Center.
Recapturing the milestones of Networking and Internet
It's really exciting to see the developments that lead to current situations. The way we communicate and collaborate,do business and every thing else has been revolutionized by the Internet.
Networking has changed our world…
Email, the web, peer-to-peer networks, blogging …
State of the art is changing fast…
Just in the last 10 years
Maturation of web 1.0 (NCSA Mosaic, Netscape, IE, firefox)
Internet searching (Google) and online Ads Market
Deployment / popularization of VoIP
Broadband
Wireless LANs (and NATs)
Peer-to-peer systems and multimedia
From illegal music (Napster/Kazaa) to legal (iTunes) to illegal movies (BitTorrent) and Video Sharing
Cheap web servers
Blogging
Social Networking
Wikis …
And much more is coming…
Networking has changed our world…
Email, the web, peer-to-peer networks, blogging …
State of the art is changing fast…
Just in the last 10 years
Maturation of web 1.0 (NCSA Mosaic, Netscape, IE, firefox)
Internet searching (Google) and online Ads Market
Deployment / popularization of VoIP
Broadband
Wireless LANs (and NATs)
Peer-to-peer systems and multimedia
From illegal music (Napster/Kazaa) to legal (iTunes) to illegal movies (BitTorrent) and Video Sharing
Cheap web servers
Blogging
Social Networking
Wikis …
And much more is coming…
Monday, March 24, 2008
C# Code for measuring application performance
The DateTime class is not very exact and only can measure in milliseconds. When doing performance measuring on an application you most certainly need to be able to measure with smaller time units than that. High-resolution timers are supported in the Win32 API so following code wraps it up in a simple class:
public class PerformanceTimer
{
[DllImport("Kernel32.dll")]
public static extern void QueryPerformanceCounter(ref long ticks);
long startTime = 0;
long stopTime = 0;
public void Start()
{
QueryPerformanceCounter(ref startTime);
}
public void Stop()
{
QueryPerformanceCounter(ref stopTime);
}
public long Time
{
get
{
return stopTime - startTime;
}
}
}
I’m sure the code is easy to understand. Here is the sample code to show how to use it.
PerformanceTimer perfoTimer = new PerformanceTimer();
perfTimer.Start();
// Do something
perfTimer.Stop();
System.Diagnostics.Trace.WriteLine(perfoTimer.Time);
public class PerformanceTimer
{
[DllImport("Kernel32.dll")]
public static extern void QueryPerformanceCounter(ref long ticks);
long startTime = 0;
long stopTime = 0;
public void Start()
{
QueryPerformanceCounter(ref startTime);
}
public void Stop()
{
QueryPerformanceCounter(ref stopTime);
}
public long Time
{
get
{
return stopTime - startTime;
}
}
}
I’m sure the code is easy to understand. Here is the sample code to show how to use it.
PerformanceTimer perfoTimer = new PerformanceTimer();
perfTimer.Start();
// Do something
perfTimer.Stop();
System.Diagnostics.Trace.WriteLine(perfoTimer.Time);
Number 1 on Google
If you search on my name Kiran Tikare on Google.com, then this blog is displayed as the number one choice.
To see which Google servers you are currently hooked up to, open a command window and enter "nslookup google.com" which should list a couple of IP addresses. McDar.net has a handy Google Watch Tool which does a web search on all known Google servers for you so you don’t manually have to try different IP addresses.
So it took me some time to reach Google fame. I started this blog in March 2006 and was working on SEO. Finally i reached the desired destination with respect to my blog.
To see which Google servers you are currently hooked up to, open a command window and enter "nslookup google.com" which should list a couple of IP addresses. McDar.net has a handy Google Watch Tool which does a web search on all known Google servers for you so you don’t manually have to try different IP addresses.
So it took me some time to reach Google fame. I started this blog in March 2006 and was working on SEO. Finally i reached the desired destination with respect to my blog.
Friday, March 21, 2008
My Celebrity Look Alikes
The website MyHeritage apparently does some face recognition to determine who your celebrity lookalikes are. Mine include Tobey Maguire (Spider Man), Johnny Depp (Pirates Of the Caribbean) , Halle Berry .
Whats Happening?
I think I need to really get a life and find the meaning of it. I don't know what is happening in India (i mean to say Karnataka, i don't know about other states.).Most of the people I know happen to be engineers. Yeah, I mean the BE/B.Tech sort.
I know very few folks doing commerce and related courses. A couple of them doing pure sciences. And very, very few in Arts. And just, just ONE person pursuing fine arts. And anyway, these aren’t people I interact with on a daily basis - just old friends who I get together with once in a while in the name of a reunion.
Around where I live is surrounded by software folks, and those who aren’t Software Engineers or not into IT are into ITES. At home… my parents aren’t engineering graduates.
My interaction with non-engineers is minimal.We try to analyze the ‘railway ticket allotment and booking algorithm’ while waiting in queues. And queues are where we crib about people not optimizing using queuing theory.
And we are also the sort who commit very less to memory, for everything is available on the Net - it is commonplace to have a information like - wikipedia+James Bond film, String+theory+Philosophy. As per my analysis, the amount of information and knowledge is so huge that we know only basic things and we depend on other things on Internet,we can't live without Internet.
It's very disturbing thing that if some terrorist organizations break the very backbone aka.Internet or some company like Google, many things will go down to where they all started, it may put humanity in trouble.
And we are not at all concentrating towards fundamental science, which is essential for technological advancement for humanity.
Can any body tell me what is happening? where are we moving? What is life?
I know very few folks doing commerce and related courses. A couple of them doing pure sciences. And very, very few in Arts. And just, just ONE person pursuing fine arts. And anyway, these aren’t people I interact with on a daily basis - just old friends who I get together with once in a while in the name of a reunion.
Around where I live is surrounded by software folks, and those who aren’t Software Engineers or not into IT are into ITES. At home… my parents aren’t engineering graduates.
My interaction with non-engineers is minimal.We try to analyze the ‘railway ticket allotment and booking algorithm’ while waiting in queues. And queues are where we crib about people not optimizing using queuing theory.
And we are also the sort who commit very less to memory, for everything is available on the Net - it is commonplace to have a information like - wikipedia+James Bond film, String+theory+Philosophy. As per my analysis, the amount of information and knowledge is so huge that we know only basic things and we depend on other things on Internet,we can't live without Internet.
It's very disturbing thing that if some terrorist organizations break the very backbone aka.Internet or some company like Google, many things will go down to where they all started, it may put humanity in trouble.
And we are not at all concentrating towards fundamental science, which is essential for technological advancement for humanity.
Can any body tell me what is happening? where are we moving? What is life?
Wednesday, March 19, 2008
Thursday, March 13, 2008
What AI people are trying to do?
While thinking about AI, i was struck by two questions. Which i feel will decide whether we are going in right direction or not. Here are the questions that we need to answer.
1. Are we trying to produce programs that do the tasks the same way people do?
2. Are we attempting to produce programs that simply do the tasks in whatever way appears easiest?
Based on the answers to above questions we can think whether we are moving in right direction or not.
People are aware of "The Matrix" moview and its views on AI. If we try to produce programs that simply do the task in whatever way appears easiest then, there are chances that once the machines gain the intelligence of doing the tasks which is easier for them they may think that humans are obstacles to achieve the simple tasks and they can start destroying the humans.
1. Are we trying to produce programs that do the tasks the same way people do?
2. Are we attempting to produce programs that simply do the tasks in whatever way appears easiest?
Based on the answers to above questions we can think whether we are moving in right direction or not.
People are aware of "The Matrix" moview and its views on AI. If we try to produce programs that simply do the task in whatever way appears easiest then, there are chances that once the machines gain the intelligence of doing the tasks which is easier for them they may think that humans are obstacles to achieve the simple tasks and they can start destroying the humans.
Thursday, February 21, 2008
Making Sense of Application Paths in ASP.NET
Path names in ASP.NET may be confusing, but the concepts are simple:
Physical paths refer to the server's filesystem (e.g., c:\inetpub\wwwroot\index.aspx).
Virtual paths refer to HTTP paths, the stuff in the browser address bar.
They come in two types: absolute and relative.
Absolute virtual paths are exactly what you see in the browser, starting with the / after the host name (e.g., /kiran/articles).
Relative (or app-relative) virtual paths start with ~/. The ~/ is magic and always represents the root virtual path of your application. So for an IIS application deployed at /India/culture/ ASP.NET transforms ~/ into /India/culture/. If the app is deployed to the IIS root (/), then ~/ simply becomes /.
For more information please refer to
1. ASP.NET Paths
Physical paths refer to the server's filesystem (e.g., c:\inetpub\wwwroot\index.aspx).
Virtual paths refer to HTTP paths, the stuff in the browser address bar.
They come in two types: absolute and relative.
Absolute virtual paths are exactly what you see in the browser, starting with the / after the host name (e.g., /kiran/articles).
Relative (or app-relative) virtual paths start with ~/. The ~/ is magic and always represents the root virtual path of your application. So for an IIS application deployed at /India/culture/ ASP.NET transforms ~/ into /India/culture/. If the app is deployed to the IIS root (/), then ~/ simply becomes /.
For more information please refer to
1. ASP.NET Paths
Tuesday, February 05, 2008
The Noah Phase
Couple of hours ago i read the article published in The Newyork Times written by famous Thomas Friedman (Author of The World Is Flat).
He discusses about the current phase of our human race. He mentions that we are the first generation in the whole human history that literally acting like Noah ( Hope many people know stroy of Noah, who as instructed by God, saved the animals from the Great Flood.).
He says that currently we are in Noah Phase.As many of you are aware that because of our activities many species are threatened with extinction. Now it is on entire human race to save the very living specieses of our planet from extinction.Otherwise we will end up on a dead planet without Plants, Trees and Animals, which slowly leads us to our end.
Let us conserve our environment before its too late........
He discusses about the current phase of our human race. He mentions that we are the first generation in the whole human history that literally acting like Noah ( Hope many people know stroy of Noah, who as instructed by God, saved the animals from the Great Flood.).
He says that currently we are in Noah Phase.As many of you are aware that because of our activities many species are threatened with extinction. Now it is on entire human race to save the very living specieses of our planet from extinction.Otherwise we will end up on a dead planet without Plants, Trees and Animals, which slowly leads us to our end.
Let us conserve our environment before its too late........
Calculate the sum of a column in a dataset
Problem : Calculate the sum of a column in a dataset
Solution :
After filling the dataset from your query you can calculate the sum of a numeric column.
Dataset's DataTable provides a default method called Compute through which you can perform any aggregate function based operation on columns in a DataTable.
Suppose you have
1. Column : Salary
2. DataSet : dsData
3. DataTable Name : Payroll
Then
dsData.Tables("Payroll").Compute("SUM(Salary)", String.Empty)
Gives the sum of that column.
Compute accepts two arguments : 1. Expression (Any aggregate Expression)
2. Filter (Any Filtering option, here String.Empty means no filter value)
Solution :
After filling the dataset from your query you can calculate the sum of a numeric column.
Dataset's DataTable provides a default method called Compute through which you can perform any aggregate function based operation on columns in a DataTable.
Suppose you have
1. Column : Salary
2. DataSet : dsData
3. DataTable Name : Payroll
Then
dsData.Tables("Payroll").Compute("SUM(Salary)", String.Empty)
Gives the sum of that column.
Compute accepts two arguments : 1. Expression (Any aggregate Expression)
2. Filter (Any Filtering option, here String.Empty means no filter value)
Monday, February 04, 2008
P = NP problem and the Valentine's Day Song
Here is a nice Song i found on the Net, which reminds us about the Famous Unsolved Mathematical Problem P = NP .
its a love story
of two strange people
who never knew they could
fall for each other
when they first met
they only ended up fighting
but slowy it became clear to them
that they sure shared something
a small problem happened
when pride overtook him
he thought she was
less smarter than him
she would solve a puzzle
and he would solve it again
he would tell her
that she was simply
an idea away from him...
he said that he always gets this idea
and then he does all that she can
and probably much more...
one day she decided
his behaviour had to be checked
she thought for a while and
then she said...
fine, then you sure
can do everything
but if you are strictly more smart
you have to do the following
think of some puzzle
that you can easily do
and then give it to me
to solve and lets see if
i can't do....
all the king's men and
all the king's horses
could not come up
with a puzzle like this
the duo got closer and
the world around more curious
today as it stands
the puzzle is still not found
and hence the duo
lives happily close bound
they two are well known
as simply, inseparable
P is the queen and
NP the king of our fable...
Hope you all enjoy it.......
Source : Nutan's Blog
its a love story
of two strange people
who never knew they could
fall for each other
when they first met
they only ended up fighting
but slowy it became clear to them
that they sure shared something
a small problem happened
when pride overtook him
he thought she was
less smarter than him
she would solve a puzzle
and he would solve it again
he would tell her
that she was simply
an idea away from him...
he said that he always gets this idea
and then he does all that she can
and probably much more...
one day she decided
his behaviour had to be checked
she thought for a while and
then she said...
fine, then you sure
can do everything
but if you are strictly more smart
you have to do the following
think of some puzzle
that you can easily do
and then give it to me
to solve and lets see if
i can't do....
all the king's men and
all the king's horses
could not come up
with a puzzle like this
the duo got closer and
the world around more curious
today as it stands
the puzzle is still not found
and hence the duo
lives happily close bound
they two are well known
as simply, inseparable
P is the queen and
NP the king of our fable...
Hope you all enjoy it.......
Source : Nutan's Blog
Friday, January 25, 2008
Tracing Gmail Emails
"How do you trace an Email?"
Quite often i am being asked about this simple question. Most of you know that any email can be traced by just looking at the Header information of the Email.
But that is possible for Emails sent by Email clients like Outlook Express, because they use SMTP(Simple Mail Transfer Protocol) to send the mails.
SMTP is a protocol used to send Mails from one system to another system, so each time when SMTP sends mail it includes the IP address of the local system(source address) in Email's header.
But web based clients like Gmail, Hotmail use HTTP to send the Messages, as people will be interacting with their web browsers which work through HTTP.
So in order to include the source addresses these clients use the IP address determined by the Web Browser so you can still find them on the message header.
Once you log on to Gmail, you click any mails in the inbox, that will open up the mail. Next when you click down arrow displayed after reply icon displayed at the top of your mail you will get a drop down menu. Here is how it looks.

Now click on "Show original" you will get the header information.
That's it all about Gmail's option to see the header information. Hope some one may benefit from this post.
For More Information visit the following site.
1. Tracing Email
Quite often i am being asked about this simple question. Most of you know that any email can be traced by just looking at the Header information of the Email.
But that is possible for Emails sent by Email clients like Outlook Express, because they use SMTP(Simple Mail Transfer Protocol) to send the mails.
SMTP is a protocol used to send Mails from one system to another system, so each time when SMTP sends mail it includes the IP address of the local system(source address) in Email's header.
But web based clients like Gmail, Hotmail use HTTP to send the Messages, as people will be interacting with their web browsers which work through HTTP.
So in order to include the source addresses these clients use the IP address determined by the Web Browser so you can still find them on the message header.
Once you log on to Gmail, you click any mails in the inbox, that will open up the mail. Next when you click down arrow displayed after reply icon displayed at the top of your mail you will get a drop down menu. Here is how it looks.

Now click on "Show original" you will get the header information.
That's it all about Gmail's option to see the header information. Hope some one may benefit from this post.
For More Information visit the following site.
1. Tracing Email
Wednesday, January 23, 2008
The Wonder that was INDIA!!!!!!!
Today is the Birth Day of Subhash Chandra bose A Forgotten Hero, who among many other helped India to win its Freedom.Very Less people remember this day and even very less people speak about him these days. Every one is so busy earning the Money and they forget those people who sacrificed their life for freedom and for our own future.
I just wanted people to read about it so that they can remember the great Hero.
Recently i visited Chennai for some work, and that day i came to know that "Azadi Express" train was in chennai .The train, which showcases the 'heroic moments' of the freedom struggle through tableaux, pictures, exhibits and portraits, is the brainchild of the Directorate of Advertising and Visual Publicity, the Union Ministry of Information and Broadcasting to mark the 150th anniversary of the 'First War of Independence'.
In the first bogey i saw one poster on which Lord Macaulay's speech given around 02 Feb 1835 in British Parliament regarding INDIA was written which is reproduced below.
"I have traveled across the length and breadth of India and I have not seen one person who is a beggar, who is a thief. Such wealth I have seen in this country, such high moral values, people of such calibre, that I do not think we would ever conquer this country, unless we break the very backbone of this nation, which is her spiritual and cultural heritage, and, therefore, I propose that we replace her old and ancient education system, her culture, for if the Indians think that all that is foreign and English is good and greater than their own, they will lose their self-esteem, their native self-culture and they will become what we want them, a truly dominated nation."
From this one can know how British dominated INDIA and Indian's.
At last i want to conclude with a salutation to India and Indians " Jai Hind".
Quotes by Subhas Chandra Bose :
1. "Give me blood, and I shall give you freedom!"
2. "No real change in history has ever been achieved by discussions... Freedom is not given, it is taken.. One individual may die for an idea; but that idea will, after his death, incarnate itself in a thousand lives. That is how the wheel of evolution moves on and the ideas and dreams of one nation are bequeathed to the next..."
Subscribe to:
Posts (Atom)