Friday, December 22, 2006

Superb Ad!!

Superb Advertisement- shows popularity and respect for Gandhi'ji, A great ad.... Ironically from a non- Indian company!!
This ad won the EPICA awards for best ad.

See Advertisement

Thursday, November 02, 2006

About Google Code Search

Google Code Search helps you find function definitions and sample code by giving you one place to search publicly accessible source code hosted on the Internet. With Google Code Search, you can:

* Use regular expressions to search more precisely
* Restrict your search by language, license or filename
* View the source file with links back to the entire package and the webpage where it came from
Want to read more...

Tuesday, October 31, 2006

Live Local

If you want to have route between two cities on the map, Use Live.Com site.


Route between Pune and Kalyan

Thursday, October 26, 2006

SQL Server Lesson 2 : sp_refreshview system stored procedure

When a new column is added to a table being referenced by a view, the new column will not automatically be reflected to the view, especially if the view is doing a SELECT * from the table.

For the new column to be reflected on the view, you have to refresh the definition of the view using the sp_refreshview system stored procedure. The sp_refreshview system stored procedure refreshes the metadata for the specified view.

Let us check this by example.

Create Table Customers:
CREATE TABLE [dbo].[Customers] (
[CustomerID] INT,
[CustomerName] VARCHAR(100),
[Address] VARCHAR(100)

)

INSERT INTO [dbo].[Customers] VALUES(100, 'Kiran Marke', 'Kalyan');
INSERT
INTO [dbo].[Customers] VALUES(101, 'Ankit Jain', 'Ahmedabad');

CREATE VIEW [dbo].[CustomersView]
AS
SELECT
* FROM [dbo].[Customers]

Now just do this
SELECT * FROM [dbo].[CustomersView]

This will give all records from the view with all the columns of [dbo]. [Customers] table.

Now let's add one more column to to above table
ALTER TABLE [dbo].[Customers] ADD [Gender] CHAR(1)
UPDATE [dbo].[Customers] SET [Gender] = 'M'

Now once again perform SELECT * FROM [dbo].[CustomersView]

This view will not include the new [Gender] column in the output.
EXECUTE sp_refreshview '[dbo].[CustomersView]'
After issuing this statement, the view will now include the new [Gender] column in the output.

Tuesday, October 24, 2006

Google helps you build your own search engine

Google is opening up its vast online index so other web sites can build their own specialty search engines.
Check on this link: http://www.google.com/coop/cse/

Thursday, October 19, 2006

FileInfo Class Properties

Interestingly, the creation time, last access time and then last write time properties are all writable:

For example:
FileInfo f = new FileInfo(@"C:\MyFile.txt");
Console.WriteLine(f.CreationTime.ToString());
f.CreationTime = new DateTime(2001, 1, 1, 7, 30, 0);
Console.WriteLine(f.CreationTime.ToString());

Reason given behind this is(Which is quite good also):

If you have a program that effectively modifies a file by simply reading it in, then deletingit and creating a new file with the new contents, then you’d probably want to modify the creation date tomatch the original creation date of the old file.

Monday, October 16, 2006

SQL Server Shortcut keys.......

Bookmarks: Clear all bookmarks. CTRL-SHIFT-F2
Bookmarks: Insert or remove a bookmark (toggle). CTRL+F2
Bookmarks: Move to next bookmark. F2
Bookmarks: Move to previous bookmark. SHIFT+F2
Cancel a query. ALT+BREAK
Connections: Connect. CTRL+O
Connections: Disconnect. CTRL+F4
Connections: Disconnect and close child window. CTRL+F4
Database object information. ALT+F1
Editing: Clear the active Editor pane. CTRL+SHIFT+ DEL
Editing: Comment out code. CTRL+SHIFT+C
Editing: Copy. You can also use CTRL+INSERT. CTRL+C
Editing: Cut. You can also use SHIFT+DEL. CTRL+X
Editing: Decrease indent. SHIFT+TAB
Editing: Delete through the end of a line in the Editor pane. CTRL+DEL
Editing: Find. CTRL+F
Editing: Go to a line number. CTRL+G
Editing: Increase indent. TAB
Editing: Make selection lowercase. CTRL+SHIFT+L
Editing: Make selection uppercase. CTRL+SHIFT+U
Editing: Paste. You can also use SHIFT+INSERT. CTRL+V
Editing: Remove comments. CTRL+SHIFT+R
Editing: Repeat last search or find next. F3
Editing: Replace. CTRL+H
Editing: Select all. CTRL+A
Editing: Undo. CTRL+Z
Execute a query. You can also use CTRL+E. F5
Help for SQL Query Analyzer. F1
Help for the selected Transact-SQL statement. SHIFT+F1
Navigation: Switch between query and result panes. F6
Navigation: Switch panes. Shift+F6
Navigation: Window Selector. CTRL+W
New Query window. CTRL+N
Object Browser (show/hide). F8
Object Search. F4
Parse the query and check syntax. CTRL+F5
Print. CTRL+P
Results: Display results in grid format. CTRL+D
Results: Display results in text format. CTRL+T
Results: Move the splitter. CTRL+B
Results: Save results to file. CTRL+SHIFT+F
Results: Show Results pane (toggle). CTRL+R
Save. CTRL+S
Templates: Insert a template. CTRL+SHIFT+INSERT
Templates: Replace template parameters. CTRL+SHIFT+M
Tuning: Display estimated execution plan. CTRL+L
Tuning: Display execution plan (toggle ON/OFF). CTRL+K
Tuning: Index Tuning Wizard. CTRL+I
Tuning: Show client statistics CTRL+SHIFT+S
Tuning: Show server trace. CTRL+SHIFT+T
Use database. CTRL+U

Tuesday, October 03, 2006

Thanks Microsoft@persistent Team

Thanks Microsoft@persistent team for celebrating my birthday. :)

29th September: My Birthday

Rushit and company made 29th September, 2006 memorable for me.

On 28th September, I went home early as I had no work pending in the office. I was looking for partner for dinner, but couldn’t find anyone. So went alone. When I came home after dinner, no one was at home. I just got surprised because they all should have been there at home, as they also had left office early like me.

As there was no one at home to chat, there were only two options available with me. One was watching TV and another was to have some study. I preferred watching TV. But I was just busy surfing TV channels as none of the channels had any good program available. It was that kind of boring life, I had that day.

But I was totally unaware of some memorable moments were waiting for me in next half an hour. At 11:30pm Rajesh, Rakesh, and Kiran entered room. Vijayendra, Rushit and Preeti followed them. I cut a cake on exact stroke of 12:00 am and everybody cheered with birthday song.

That was totally embarrassing situation for me, when everybody just attacked on me to give birthday- bumps. But I really enjoyed them also.

This was followed by photo-session to catch “my good looking face” ;) which was covered with the cake I cut. I tried to smile, but the same time was not able to hide very sorrow reactions after getting those free kicks by my friends.

That was really wonderful night, I spent with my friends.

Wednesday, September 27, 2006

SQL Server Lesson :1

If any user-created stored procedure has the same name as a system stored procedure, the user-created stored procedure will never be executed.

That is:

USE Kiran_DB
GO
CREATE PROCEDURE sp_who
AS
PRINT 'Some Text'
GO
EXECUTE sp_who


Will not print the above text.

This will still return information about current SQL Server users and processes.