Friday, June 27, 2008

Bill Gates

He has been my inspiration all the time, I have his poster in my bed room :) a great man, wise man... gave a lot of things to people. Today it was his last day at Microsoft from his day-to-day activities.

I wish Microsoft best of luck and I would like to thank Bill Gates a lot, without him today software industry wouldn't exist at all.

Thanks Bill.



PS: do check this out Farewell Speech, you can actually feel that he was almost about to cry I guess...

but really great man..

once again Thank you so much Bill Gates for creating industry.

Wednesday, May 28, 2008

Article: C# 3.0 New Features

Finally I am done with my first Article - here it is - http://www.learnitonweb.com/lowcom/Articles/ReadArticle.aspx?contId=4&page=1

Saturday, May 24, 2008

XBOX 360 or PS3?

If you are thinking about what to go for XBOX 360 or PS3? I recommed this particular link - http://www.gamespot.com/features/6191251/index.html?tag=topslot;title;1 in this they have taken screen shot from same game running on PS3 and XBOX 360 and compared the graphics.. we can clearly see XBOX 360 wins the race :)

btw am getting my XBOX 360 in coming few days :D

Friday, May 02, 2008

Grow Body Parts



this is pretty exciting news story... do read it here - Grow Body Parts - this is really awsome thing to happen in medical science... I hope its a true thing and not a scam.

Thursday, May 01, 2008

Tengu - Community-Credit.com won :D



from community-credit below thing is what I have won... am pretty excited about it now.. more information about it here - Tengu

Wednesday, April 30, 2008

SQL Server 2008 - Table Type Parameter

This is very neat feature in SQL Server 2008 which many people really waited for...

now SQL Server 2008 has got a table type which can be passed as parameters in functions and stored procedures.

simplest example.. lets create employees table.

CREATE TABLE dbo.Employee(
EmpID int NOT NULL,
EmpName nvarchar(100) NOT NULL,
EmpEmail nvarchar(100) NOT NULL)


and create stored procedure to add new employees..

CREATE PROCEDURE NewEmployeeMS(@EmpID int,@EmpName nvarchar(100),@EmpEmail
nvarchar(100))
As
BEGIN
INSERT INTO dbo.Employee
values(
@EmpID, @EmpName, @EmpEmail)


now if I have to add record in it.. I have to execute this procedure multiple times..

now lets take example.. that I got records in another table and I have to get records from that and put it in another table.. I will go about doing it this way..

CREATE TYPE EmployeeTableType AS TABLE
(EmpID INT, EmpName nvarchar(100), EmpEmail nvarchar(100))

creating table type.. and when I create stored procedure it will take parameter as table type only..

CREATE PROCEDURE NewEmployee(@EmployeeDetails EmployeeTableType READONLY)
As
BEGIN
INSERT INTO dbo.Employee
SELECT * FROM @EmployeeDetails
END


notice READONLY thing in parameter.. it says that table is going to be read only.. so no any update, insert, delete will be performed.. just select.. and this thing is necessary.

finally I will do this..

DECLARE @NewEmployees EmployeeTableType
INSERT INTO @NewEmployees
VALUES(1,'John McLean','JohnMcLean@contoso.com')
INSERT INTO @NewEmployees
VALUES(2,'Bob Smith','BobSmith@contoso.com')
INSERT INTO @NewEmployees
VALUES(3,'Ted Connery','TedConnery@contoso.com')
EXECUTE NewEmployee @NewEmployees

SQL Server 2008 - MERGE Function

I am quite impressed with the MERGE function.. in SQL Server 2008, which is a new feature added.

lets take a simplest example to understand MERGE Function.

let's say we got a PurchaseRecords table, in which we are storing customerId and productId and PurchaseDate...

here is code to create a table with all indexes..

IF OBJECT_ID (N'dbo.PurchaseRecords', N'U') IS NOT NULL
DROP TABLE dbo.PurchaseRecords;
GO

CREATE TABLE PurchaseRecords (ProductID int, CustomerID int, PurchaseDate datetime);
GO

IF EXISTS (SELECT name FROM sys.indexes
WHERE name = N'IX_PurchaseRecords_ProductID')
DROP INDEX IX_PurchaseRecords_ProductID ON dbo.PurchaseRecords;
GO

CREATE CLUSTERED INDEX IX_PurchaseRecords_ProductID
ON dbo.PurchaseRecords (ProductID);
GO

and here is the code to insert some dummy records in table.

INSERT INTO PurchaseRecords VALUES(707, 11794, '20060821'),
(707, 15160, '20060825'),(708, 18529, '20060821'),
(711, 11794, '20060821'),(711, 19585, '20060822'),
(712, 14680, '20060825'),(712, 21524, '20060825'),
(712, 19072, '20060821'),(870, 15160, '20060823'),
(870, 11927, '20060824'),(870, 18749, '20060825');
GO


now we gona have a table which is going to store information regards to CustomerPurchaseHabit..

and code for that is here..

IF OBJECT_ID (N'dbo.FactBuyingHabits', N'U') IS NOT NULL
DROP TABLE dbo.FactBuyingHabits;
GO

CREATE TABLE FactBuyingHabits (ProductID int, CustomerID int, LastPurchaseDate datetime);
GO

IF EXISTS (SELECT name FROM sys.indexes
WHERE name = N'IX_FactBuyingHabits_ProductID')
DROP INDEX IX_FactBuyingHabits_ProductID ON dbo.FactBuyingHabits;
GO

CREATE CLUSTERED INDEX IX_FactBuyingHabits_ProductID
ON dbo.FactBuyingHabits (ProductID);
GO


INSERT INTO FactBuyingHabits VALUES(707, 11794, '20060814'),
(707, 18178, '20060818'),(864, 14114, '20060818'),
(866, 13350, '20060818'),(866, 20201, '20060815'),
(867, 20201, '20060814'),(869, 19893, '20060815'),
(870, 17151, '20060818'),(870, 15160, '20060817'),
(871, 21717, '20060817'),(871, 21163, '20060815'),
(871, 13350, '20060815'),(873, 23381, '20060815');
GO


ok now what we want to do is.. we want to go through each records in PurchaseRecords and check whether this information exists in FactBuyingHabits or not.. if it exists then update its date if it doesnt then insert it, now if we want to do this.. we will go about creating cursor then if condition inside it and do it.. what do we get? we get result.. but cursors are very slow... in SQL Server 2008 Microsoft introduced MERGE function which allows us to do this pretty easily, and performance is increased pretty good.

and code for this is something like following:

MERGE FactBuyingHabits AS fbh
USING (SELECT CustomerID, ProductID, PurchaseDate FROM PurchaseRecords) AS src
ON (fbh.ProductID = src.ProductID AND fbh.CustomerID = src.CustomerID)
WHEN MATCHED THEN
UPDATE SET fbh.LastPurchaseDate = src.PurchaseDate
WHEN NOT MATCHED THEN
INSERT (CustomerID, ProductID, LastPurchaseDate)
VALUES (src.CustomerID, src.ProductID, src.PurchaseDate);

Bad Captcha


This is seriously bad captcha.. I cant understand what it says...

while I was writing above post I got this captcha..

Wednesday, April 16, 2008

Blog Addiction

70%How Addicted to Blogging Are You?

Tuesday, March 11, 2008

Tuesday, March 04, 2008

Site done

It's almost 2 months, since I have blogged about anything... I got caught up with lots of hectic schedule and lost track of many things.... I was also working very hard on a site and finally I have completed web site after a long time, here it is http://www.LearnITOnWeb.com/ - still I have not added RSS to it, but will be doing that too as well very quickly. I now have to load site with lots and lots of content and get it to good rolling.

I have been busy with lots of work these days, which I am executing very soon in a 2 months time frame.

but you will find me blogging again now.. I have managed to get back on to track and get back on to calendar and tasks - yeah this happens to me.. many times I just loss track of my calendar and task list.

btw if any of you coming to Launch 5th March 2008 - Regal Cinema, do let me know.. will meet up for sure. - more information - http://www.heroeshappenhere.co.in/

Tuesday, January 08, 2008

Saturday, January 05, 2008

Here comes another bubble

looking at the way so many web 2.0 sites coming up.. blog sites.. community sites and what not... this video justifies it all.

and like in song of the video says.. blog it blog it.. blog this song.. so here I am doing it :D

http://www.youtube.com/watch?v=I6IQ_FOCE6I

Friday, January 04, 2008

PUG Meet

I will be in Pune tomorrow (5th January 2008) and will be presenting at PUG meeting.

Topic: Building Communication Aware Applications for Windows Mobile
Abstract: In this presentation Mayur Tendulkar will show how developers can leverage the functionality provided by Microsoft Windows Mobile platform to build Communication aware application. This will include, making and receiving calls, SMS interception, Bluetooth development, using emulators and real devices
Speaker: Mayur Tendulkar

Topic: ASP.NET URL Rewriting
Abstract: URL Rewriting is process of simplifying complex URLs, which are easily remembered by users and adds a great business value to web site in terms of Search Engine Optmization
Speaker: Dhaval Faria

Time: 2:30 PM to 5:30 PM
Address: Microsoft Corporation (I) Pvt. Ltd.202, 2nd Floor, Phoenix, Bund Garden Rd., Opp. Pune Residency Club, Pune 411001, Maharashtra, India

Thursday, January 03, 2008

Underwater Digital Camera


you wont find me blog abotu gadgets very often.. though I am gadget freak as many of you knows...


but this thing just catches my eyes.. and looks a bit funny, you might have seen many waterproof cameras... this one is no different apart from its looks... this digital camera just makes it perfect to catch moments while ur catching up fish, shells, shark, jelly fish, etc... and u dont have to be busy holding it with one hand and pressing shutter button with another.


Wednesday, January 02, 2008

Thanks to Community-Credit for Crediting me with Artoo Potatoo


as many if you know I am very much into community contribution... I have been contributing to the community since 2000-2001, few days back I discovered a site called http://www.community-credit.com/ this site credits community contributor with stupid geeky prizes... I have won the 14th prize - Artoo Potatoo. I am now waiting for my prize to come... :D I am excited about this.. and would like to really thank Community-Credit for this.
Thank you Community-Credit and David Silverlight :D

Tuesday, January 01, 2008

Bye Bye Netscape

AOL announced that Netscape wont be Supported from 1st February 2008 - Source - http://blog.netscape.com/2007/12/28/end-of-support-for-netscape-web-browsers/

I have a very special respect for Netscape, its because of Netscape I am what I am :)... not talking about internet... ok let me talk in a more detail... 1997 got my first internet connection that time Netscape was the only browser popular among the users, I still remember version number Netscape Navigator 4.5 and 4.6 being my mots fav that time... I used Netscape Navigator to surf web sites, check emails and many more things... one day accidently or fortunately I mistaked Composer option in Netscape as Compose for email... which incidently had the same icon and with same name and same place for writing email in netscape email program (dont remeber name but operated from same application), I thought Composer is for email, clicked on it... and I was introduced to a whole new world of HTML... and my journey begins to the programming world :), and one more respect to Netscape for coming up with javascript....

its sad to know that Netscape wont be there sooner.. which will actually mean lesser competition and might slow down the development in the browser market.. the kind of revolution you can see in IE from IE 6 to IE 7 and in next version IE 8 is because of competition from Firefox, Opera and others... hope this continues and consumers gets more out of it.

Netscape will be remembered forever.

PS: I stopped using Netscape after IE 4.1

Friday, December 07, 2007

Expanding Tree SQL Query

I was working on my web site, and I wanted to implement expanding category view... I have done this many times, and I thought of sharing this with you all.

I have a category table like following..

catId int
catName nvarchar(255)
parcatId int

in which I will be entering categories, and this will allow me to have categories upto multiple levels.. for example I got parent category which has ID 1 and category name is Software Development, then I got categoies like Microsoft, Sun and Linux this three got catId 2,3,4 respectively and parcatId as 1.. then I got few more categories like .NET, MFC, Silverlight, WPF.. whcih got catid like 5,6,7,8 respectively and parcatId as 2.. so this allows me to have unlimited tree for categories.

now, what I wanted was, that if I say catId 8 which is WPF, then I wanted to have output which gives me all parent categories.. like Software Development > Microsoft > WPF... also I wanted if I give catId 1 which is Software development then to give me all categories belonging to that one.. so it gives me output.. Software Development > Microsoft, Sun, Linux > inside Microsoft > .NET, MFC, Silverlight, WPF.

to do the above thing.. following SQL Query I have written.

- to get explosion from top to bottom.

WITH ExpandedCat(catId, catName, parcatId) AS
(
SELECT Cat1.catId, Cat1.catName, Cat1.parcatId
FROM Categories AS Cat1
WHERE Cat1.catId=1

UNION ALL

SELECT Cat2.catId, Cat2.catName, Cat2.parcatId
FROM ExpandedCat, Categories Cat2
WHERE ExpandedCat.catId = Cat2.parcatId
)
SELECT DISTINCT catId, catName, parcatId
FROM ExpandedCat
ORDER BY parcatId


and to get explosion from bottom to top.

WITH ExpandedCat(catId, catName, parcatId) AS
(
SELECT Cat1.catId, Cat1.catName, Cat1.parcatId
FROM Categories AS Cat1
WHERE Cat1.catId=8

UNION ALL

SELECT Cat2.catId, Cat2.catName, Cat2.parcatId
FROM ExpandedCat, Categories Cat2
WHERE ExpandedCat.parcatId = Cat2.catId
)
SELECT DISTINCT catId, catName, parcatId
FROM ExpandedCat
ORDER BY parcatId

Sunday, December 02, 2007

3D Max Tutorial on Ashtray at learnitonweb.com

I have uploaded 3rd video at http://www.learnitonweb.com on how to create or model Ashtray in 3D Max and apply materials (textures) to it and make it look like ceramic 3D Ashtray.

Check it out, and leave your comments on the site.

Sunday, November 25, 2007

Thursday, November 22, 2007

Future Currency or Money

Back in time………. There was no concept of currency or money, and probably these words never existed. Back in time there was no valuation of things, it was just give and take… what you can do I can’t do, and what I can do you can’t do… so you give me what you have and I give you what I have, and of course there was no measurement instruments in those days, so things were given without proper valuation and without measurement. Now lets keep measurement issue apart and talk about valuation, later on it came into picture that to make particular thing one needs to put it huge amount of efforts and other person is putting less efforts to do the what he can do, but both are giving each other same of goods or almost same amount of goods, so valuation of both goods were same regardless whether it took huge amount of time to produce 1st product or 2nd product… things were going on, and later on there a concept of Gold coins came in, but yet they were not used for valuation, they were used to give rewards, again no valuation of goods happened, but valuation of work started happening, because of that people understood the valuation o f the goods, and coin age started, transition from barter system to gold coins to coin age never happened instantly it took huge amount of time, and also it never happened everywhere at the same time, at some places it was going through centuries some places it was just introduced and some places they never heard about it. Coin age started valuing the goods, and people started understanding the efforts, value and measurement s of the goods, and started exchanging goods for the coins they have (this is what we still do, but now we call it we are buying).

Now lets look at how things are going… now the era of hard money is going on, bank notes… no coins… and now its going towards Plastic Money what we more popularly know it as Credit Cards, Debit Cards, etc… when we bought something we gave money now when we are buying something we are giving them plastic card to swipe.. and while making payment to a credit card company we are still not giving them money but we are sending them cheque or sometimes cash but most of the time its cheque, when we are giving cheque again transaction of cheque is done digitally no hard money is involved.. they are just numbers going from here to there… and this transition from money to plastic money is happening very quickly, the reason for this is the whole world is connected. Why plastic money is become so popular… if you look earlier people started valuing about the goods but they time was never valuable… now people have started valuing about the value of goods as well as of time… and plastic money saves a lot of time… now there have been huge amount of cases happening all the time regarding fraud credit card transaction, etc… now people needs to also value security… and I see future currency to be my bio genetic print… wherever I am going.. and I want to make transaction… give my fingerprint of any other bio genetic print and transaction is done…. Welcome to the future.

Monday, November 19, 2007

learnitonweb.com

Finally after a long long long work and waiting... I am finally launching http://www.learnitonweb.com/.

still site is not completely done, but the main purpose why I started is done and is working :), I am working on its new design in Microsoft Silverlight 1.1 and will be done with it very soon, but will not be launching it till Microsoft gives it go at least till Beta.

so if you want to learn programming, computer, system admin, networking, database administration learnitonweb.com is the site :), I will be posting lots of video tutorials, along with the code.

Please visit it, have a look at them.. and leave your comments, and spread the word.

its - Learn IT On Web

Friday, November 09, 2007

Travelling, Meetings and Calls

This week’s three days were really busy for me and I was able to check up the limit of my cell phone battery, how hot it gets, and my running strength and time time time.

Monday I was in event where Steve Ballmer had come down, it wasn’t that busy, but looking at Tuesday it was really hectic day… morning get up reach at Microsoft India Mumbai office at Kalina from Goregaon, local trains are great very crowded and a huge bag with me :P, reached for meeting.. meeting for 3 hours, I was expecting meeting to last for 2 hour, had scheduled another meeting in next 2 hours, but this meeting got extended for 1 hour, hence I decided to do that meeting on phone, while was in meeting was travelling and was heading towards town side, had to reach there by 3:30 PM and it was already 2:45 PM, running talking on phone reached finally at 3:20 PM and of course call on phone ended right on time.

Third day was again very hectic, morning 2 meetings, and phone meeting was great, so did 4 meetings on cell phone, and finally had to reach Worli for one more meeting, completed meeting in just 1 hour, and returned back from there , reached home 9 PM.
Fourth day wasn’t much hectic but was really nice smooth day but again with 2-3 meetings on cell phone.

My cell phone isn’t able to last its battery life compared to my last cell phone… oh btw my last cell phone i-mate JasJar I sold it and got new one HTC Touch, but this is really good one very light weight so talking a lot doesn’t make my arms pain.

And my running strength is same as before, just that I get a bit tired easily… hmm calls me for exercise, yeah am planning to join swimming… but no idea when plan will be implemented.

Wednesday, September 12, 2007

CHM and Windows Vista or Windows XP SP2

I was struggling to open up .chm file, which is a legacy Help file, I was trying to open it up in Windows Vista it opens up but when I try to navigate through chm file all I see is navigation is canceled, this is not just with Windows Vista, but Windows XP Service Pack 2 (SP2) also faces same problem.



I was going through file properties and noticed something, and clicked on Unblock button and then tried to open it up and yes it opens up :)

Thursday, August 16, 2007

Updates

I am excited to tell u all about my new site coming up soon... design, programming and testing is done, I am right now working on content for the site... once I am done with a handful of content am gona start posting on it and will publish it... right now I have not published my web site, I am expecting to be done with content by end of this month, or starting of next month.