Source: http://en.wikipedia.org/wiki/Terry_Fox
Monday, May 25, 2009
Inspirational Canadian Terrance Stanley "Terry" Fox
Source: http://en.wikipedia.org/wiki/Terry_Fox
Saturday, February 21, 2009
Dangerous VapoRub for children

2 health articles on VapoRub usage on children under two years old.. Take precautions when you use this medicine. See more details articles >>
Health: Don’t use VapoRub on Children under 2
Tags: Haelth, Danger, Vicks, Article, News, Danger to Baby, Parenting, Health Hazard, Chemical, Flu, Influenza, Pharmaceutical, VapoRub, Child care, Doctor
Thursday, October 23, 2008
What is Internet Marketing??
What is Internet Marketing??
Internet marketing is still a complete mystery to a large majority of Internet users. For many users, internet marketing is seen as some foreign area of the web, populated with silly get-rich-quick schemes and unsavory characters ready to rip off the innocent and uninformed consumer at the click of a mouse. Continue to read more.. SEO: 5 Most Popular Forms of Internet Marketing
Thursday, October 02, 2008
Birds, Animals and Trees Amaze you!
Here's some amazing facts about Birds, Animals and Trees amaze you! 1) SNAILS have 14175 teeth laid along 135 rows on their tongue.
2) A BUTTERFLY has 12,000 eyes.
3) DOLPHINS sleep with 1 eye open.
4) A BLUE WHALE can eat as much as 3 tonnes of food everyday, but at the same time can live without food for 6 months.
5) ELEPHANT teeth can weigh as much as 9 pounds.
6) The fierce DINOSAUR was TRYNOSAURS which has sixty long & sharp teeth, used to attack & eat other dinosaurs.
7) DIMETRODON was a mammal like REPTILE with a snail on its back. This acted as a radiator to cool the body of the animal.
8) CASSOWARY is one of the dangerous BIRD, that can kill a man or animal by tearing off with its dagger like claw.
Read more here : Cool & Amazing World FactsThursday, August 14, 2008
How to Create Select Drop Down list with different font and background color
Saturday, July 12, 2008
SQL Server Function to Determine a Leap Year
Problem
I need to write a function to determine if particular year is a leap year (i.e. February contains 29 days rather than 28 days). I know that there are various rules for calculating leap years. Is there an easy way to figure this out? Can you provide an example or two to validate various years?
Solution
Yes, there a few rules to consider when determining when a year is a leap year. For instance, contrary to popular belief not all years divisible by 4 are leap years. For instance, the year 1900 was not a leap year. However, you needn't bother yourself about leap year rules... you can let the SQL Server engine do the work for you!
The following scalar function takes in a year and returns a bit flag indicating whether the passed in year is a leap year or not.
create function dbo.fn_IsLeapYear (@year int) returns bit as begin return(select case datepart(mm, dateadd(dd, 1, cast((cast(@year as varchar(4)) + '0228') as datetime))) when 2 then 1 else 0 end) end go |
That's all there is to it! The function takes in the year, appends '0228' to it (for February 28th) and adds a day. If the month of the next day is a 2 (as extracted by the DATEPART function), then we're still in February so it must be a leap year! If not, it is not a leap year.
Here are a few examples:select dbo.fn_IsLeapYear(1900) as 'IsLeapYear?' select dbo.fn_IsLeapYear(2000) as 'IsLeapYear?' select dbo.fn_IsLeapYear(2007) as 'IsLeapYear?' select dbo.fn_IsLeapYear(2008) as 'IsLeapYear?' |
As you can see, sometimes you can leverage the SQL Server engine to do some heavy lifting for you!
Saturday, July 05, 2008
Sony Computer Entertainment - Playstation 9
A superb cool advertisement from Sony Computer Entertainment for their Playstation 9 (PS9), which the company claims will be released in year 2078. Watch the video here see what the future holds >>
Cool Stuff: Sony Playstation 9
Friday, July 04, 2008
Weekly Quote - Freedom, Entrepreneurism & Enthusiasm
“We hold these truths to be self-evident, that all men are created equal, that they are endowed by their Creator with certain unalienable Rights that among these are Life, Liberty and the pursuit of Happiness.” ~The Declaration of Independence
“In order to live free and happily you must sacrifice boredom. It is not always an easy sacrifice.” ~Richard Bach
Posterity! You will never know how much it cost the present generation to preserve your freedom! I hope you will make good use of it! (letter to Abigail Adams, April 26, 1777) ~John Adams
“These are the times that try men’s souls. The summer soldier and the sunshine patriot will, in this crisis, shrink from the service of their country; but he that stands it now, deserves the love and thanks of man and woman.” ~Thomas Paine
Read more ..
Quotes of the Week - Freedom, Entrepreneurism & Enthusiasm
Thursday, July 03, 2008
DotA: WoWt DotA All-stars v6.52d Map
DotA: WOW DotA All-Stars v6.52d Map Free Download Link
Check out the Latest World Of Wwarcraft Dota-Allstars map is out.. here’s the change logs and download links of DotA v6.52d map at the end of the post .. Enjoy the maps download here >>
DotA: World of Warcraft DotA Allstars v6.52d Map Download Link
Tuesday, June 24, 2008
SQL Tips: Calculating Mathematical Values in SQL Server
Problem
In our application we have the need to perform mathematical calculations. Right now we are doing so in our front end application. Unfortunately we are starting to experience performance problems with large data sets and differences in calculations due to developers using different logic. We are seeking some other options to perform the calculations. Does SQL Server perform basic mathematical calculations?
Solution
Yes - SQL Server can perform basic addition, subtraction, multiplication and division. So if you need some of those basic building blocks those are available and we will walk through some examples in this tip. In addition, SQL Server can calculate SUM, COUNT, AVG, etc. For these type of calculations, check out SQL Server T-SQL Aggregate Functions. To address the multiple code issues, I would recommend researching stored procedures. This tip Getting started with SQL Server stored procedures is probably a good place to start.
In this tip, let's focus on some basic building blocks to perform your calculations with the T-SQL language. Here are the examples we will cover:
- Calculations on Values
- Calculations on Parameters
- Calculations on Columns
- Calculations in Computed Columns
Calculations on Values
As a starting point, values themselves can have mathematical operations performed on them. So in the code below we are performing addition (+), subtraction (-), multiplication (*), division (/) and a combination of operations. In these examples, both positive and negative whole numbers and decimals are used. The value calculated by the statement is below the code to serve as a point of reference. Review and copy the code into a SQL Server 2005 Management Studio window to get a feel for these calculations. Certainly this list is not comprehensive, so feel free to test some operations in your applications or from your experiences.
| Calculations on Values |
| -- Example 1 - Addition (+) SELECT 1 + 1 SELECT 1 + 2 + 3 + 4 + 99 + 704 SELECT 1.5 + 1.5 SELECT .25678 + .00096356 SELECT 1.75 + -2.25 -- Example 2 - Subtraction (-) SELECT 1 - 1 SELECT 918 - 704 SELECT 3.2 - 1.9 SELECT 1.9 - 3.2 SELECT 9 - 3 - 3 SELECT .75 - .68 -- Example 3 - Multiplication (*) SELECT 1 * 1 SELECT 2 * -4 SELECT 2 * 5 * 10 SELECT 1.25 * 3 SELECT .4 * .5 -- Example 4 - Division (/) SELECT 1/2 SELECT 1.0/2.0 SELECT 0/5 SELECT 100/12 SELECT 100.0/12.0 SELECT -75.0/4.5 SELECT .5/.1 -- Example 5 - Combination SELECT ((100 + 100) * .05) SELECT (10 - 5)/2 SELECT (10.0 - 5.0)/2.0 SELECT ((100 + 100) - (50 + 50)) |
Calculations on Parameters
Since we have covered the bulk of the calculations in the section above let's just focus on a few different operations to show how parameters with specific data types play an important role. Since this set of examples are not comprehensive, feel free to copy the code below into a SQL Server 2005 Management Studio window and test the code with some of your own logic.
| Calculations on Parameters |
| -- Variable declaration DECLARE @i1 int DECLARE @i2 int DECLARE @i3 int DECLARE @d1 decimal(10,2) DECLARE @d2 decimal(10,2) DECLARE @d3 decimal(10,2) -- Initialize variables -- Example 1 - Addition (+) SELECT @d2 + -@d3 -- Example 2 - Subtraction (-) SELECT @d2 - @d3 -- Example 3 - Multiplication (*) SELECT @d2 * @d3 -- Example 4 - Division (/) SELECT @d2 / @d3 -- Example 5 - Combination SELECT ((@i1 + @i2) - (@d1 + @d2)) |
Calculations on Columns
Another option is to calculate the values based on a SELECT statement as the example below shows. If the data is in 1 or more columns, this approach eliminates the need to calculate the values based on additional parameters or logic.
| Calculations on Columns |
| -- Sample Table CREATE TABLE dbo.CalculationExample( ProductID int NOT NULL, Cost decimal(10,2) NOT NULL) GO -- Populate Table -- Verify Insertion -- Declare Variables -- Initialize Variables -- Calculate Values |
Calculations in Computed Columns
Let's take those same calculations and now move them to computed columns in the table. Here is that example:
| Calculations in Computed Columns |
| CREATE TABLE [dbo].[CalculationExample_ComputedColumns]( [ProductID] [int] NOT NULL, [Cost] [decimal](18, 0) NOT NULL, [Tax] AS ([Cost]*(0.05)), [Margin] AS ([Cost]*(0.20)), [FinalCost] AS (([Cost]+[Cost]*(0.20))+[Cost]*(0.05)), CONSTRAINT [PK_CalculationExample_ComputedColumns] PRIMARY KEY CLUSTERED ( [ProductID] ASC )WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY] ) ON [PRIMARY] -- Populate Table -- Review the values |
Saturday, June 07, 2008
BMW GINA Light Visionary Photos
Health Tips: How to identify FAKE fish oil before you buy it
Identifying fake fish oil before buying it is crucial to ensure you’re getting a high-quality product that delivers the health benefit...
-
Freakin out! First up, if the thought of sharing the gospel freaks you out, you’re not alone. Even here at SP we find it tough at times (nor...
-
Identifying fake fish oil before buying it is crucial to ensure you’re getting a high-quality product that delivers the health benefit...
