Motorola Droid Razr HD / Vanquish / Fighter a.k.a XT926 Battery spec revealed
So if you are following the Droid Razr HD / Vanquish / Fighter a.k.a XT926 fiasco chances are you know that few days ago the Droid RAZR HD has passed the
Federal Communications Commission (FCC) which means that the release date is fast approaching.
if you did not know, then now you know!

What you do not know probably is its battery capacity, many people speculated that it will have the same battery life as Motorola DROID RAZR MAXX (3300 mAh) .. unfortunatly that is not going to happen according the FCC reveleaed specs, … the device will feature a 2530 mAh battery (exact model number is SNN5915A)

That is a little disappointing, but the battery should still prove that it is good combined with the efficient s4 processor.
exact info can be found in the Portable Cellular Phone SAR Test Report.
Read More
Get table of dates between two dates (period of dates) dynamically
Well I am kind of sure anyone dealing with database queries must have come across this problem
The problem
You need a list (or better said) table of Dates between two dates (start date, end date ) that you have
The solution
Well usually you will be handling this using loops, coursers to do your operation row by row for each date between start date and end date,
While playing around I just found another way(I feel it is better way)
The Better way
Just found out that TSQL (since SQL SERVER 2005) new keyword is introduced WITH and it is used to created temporary table !
So why don’t we create a temp table using WITH that has dates between my start date and end date
Here is how
declare @start datetime
,@end datetime
set @start=’6/20/2011′;
set @end=’7/19/2011′;
with alldates as
(
select @start DateVal
union
all
select DateVal + 1
from alldates
where DateVal + 1 <= @end
)
select DateVal
from alldates;
This will list down dates
Well doing that will gave me all dates within my start date and end date
BUT
but still there is some problems with the WITH keyword (it could be better in SQL SERVER 2008) in SQL SERVER 2005 you can’t use it in complicated query
CORRECTION
Simple enough what I did currently is I can get the start date and the end date from another table by sql query , so I created a view that that uses the mighty WITH and creates dynamic list of dates between two dates in different table (note: this code is written as if the T_Period table has only one row, in case there were more rows a where condition could have been added like where PeriodToUse=1
)
create
VIEW [dbo].[V_DATES_OF_PERIOD]
AS
WITH alldates AS
(SELECT period_start AS DateVal
FROM dbo.T_Period
UNION
ALL
SELECT alldates_2.DateVal + 1 AS Expr1
FROM alldates AS alldates_2
WHERE
(alldates_2.DateVal+ 1 <=
(select period_end from dbo.T_Period)
))
SELECT DateVal
FROM alldates AS alldates_1
GO
SET
ANSI_NULLS
OFF
GO
SET
QUOTED_IDENTIFIER
OFF
GO
Read MoreOur Companies databases are more complicated than twitter and facebook
Just got an idea to find out what are the databases used by the big heads in IT these days
Had a small search and found out the following
Google uses BigTable database(created by google)
Twitter uses MYSQL as database ! [I think they moved to some NOSQL kind of DBMS now]
Facebook uses MYSQL as database ! [I think they moved to some NOSQL kind of DBMS now]
( at least these two were using MYSQL the days the article I just read about them were writtern)
Well ok we understand the case for google it for sure needs a really extraordinary DBMS that can handle its unique requirements, but what about twitter and facebook!
These two giants have that huge data , and really fast growing database, with huge audience accessing and updating these database rapidly.
It really shows how much power an opensource DBMS like MYSQL can provide and again raises the question why many companies in our part of the world insist their DBMS must be either Oracle or Microsofts’ SQLSERVER !!! while 99% of the companies around here will never require more than the amount of data, number of users, powerfull security that MYSQL provides to Facebook and twitter.
What is the problem with the decisions of these companies ?! if you know the answer please let me know in the comment
Read More

