Wednesday, November 15, 2006

याद रक्खूंगा.....

When Gabbar is arrested and being sent to the jail, he meets Thakur on the way and says...
याद रक्खूंगा.....तुझे याद रक्खूंगा.....

The tone of his voice and the hatred in his eyes....लाजवाब!!

Monday, October 30, 2006

अनुस्वार

अरे ओ सांभा.....

Thursday, October 19, 2006

मराठीत लिखाण

मी आता मराठी लिहीण्यात चान्गलाच पटाईत झालो आहे.
सुरुवातीला जरा हळू हळू लिहाव लागल, पण आता मात्र वेग आला आहे.
अजून अनुस्वार देता येत नाही.

Thursday, October 12, 2006

Excellent tool for stock market

found this...
Market Heat Map

A very good tool to look at performances of major stocks.
Don't forget to click on options and check the color changes on selection of time periods.

Wednesday, October 11, 2006

Happy B'Day BigB

Our own BigB reaches 64 today.
Wishing him a very happy B'day and a great year ahead!!!


Excited to watch him play Gabbar.

Tuesday, September 26, 2006

10 Things I Have Learned

found very interesting artile here.
Worth a look and some thought.

Monday, September 25, 2006

Query hierarchical data - SQL 2005

Question:
Table data...
Line                            Name                           ForLine
1                                Stuff                          0
2                                SubStuff                       1
3                                SubSubStuff                    2
4                                Other                          0
5                                SubOther                       4
6                                LowStuff                       3
Result required...
Line          Name                           ForLine           TopName
3              SubSubStuff                 2                    Stuff
Gabbar:
   WITH MyTree (Line, Name, ForLine, TopName)
   AS
   (
   -- Anchor member definition
       SELECT
           Line,
           Name,
           ForLine,
           Name as TopName
       FROM
           MyTable
       WHERE
           ForLine = 0
       UNION ALL
   -- Recursive member definition
       SELECT
           m.Line,
           m.Name,
           m.ForLine,
           t.TopName
       FROM
           MyTable m
           INNER JOIN MyTree t
           ON m.ForLine = t.Line
   )

   SELECT
       Line,
       Name,
       ForLine,
       TopName
   FROM
       MyTree
   WHERE
       Line = 3

Wednesday, September 20, 2006

बराहाचा शोध

छानच लिहीता येते बराहा वापरुन. हा माझा पहिलाच प्रयोग आहे मराठी लिहिन्याचा. ठ लिहीणे जरा जडच गेले.

Tuesday, September 19, 2006

a win .. at last

I thought, I have forgotten how to win a chess game. But no, rising from the ashes, I won this, and that too with white pieces......

1. e4 e6 2. f4 d5 3. Nf3 d4 4. Bc4 c5 5. d3 a6 6. f5 b5 7. fxe6 bxc4 8. exf7+ Kxf7 9. Ne5+ Ke8 10. Qh5+ 11. Nxg6 12. Qe5+ 13. Nxh8 14. Qe6 15. Qf7#

मी

मी आहे असाच ...

Wednesday, August 16, 2006

Wednesday, August 09, 2006

Attack with white

Now, I'm not very good with white pieces. Still I managed to do a very good attack in this game. And I loved making the last two moves.

Among the best quick games that I've played.

click here to play through the game.

[Event "Long competition 2"]
[Site "chesshere.com"]
[Date "2006.05.04"]
[White "Gabbar"]
[Black "Zosimo02"]
[Result "1-0"]
[WhiteElo "1497"]
[BlackElo "1504"]

1. e4 e5 2. Nf3 Nc6 3. Bc4 Be7 4. d3 Nf6 5. Nc3 O-O 6. O-O d6 7. Nd5 Nxd5 8. Bxd5 Be6 9. d4 Bg4 10. Qd3 Bxf3 11. Qxf3 Nxd4 12. Qg4 Re8 13. f4 Nxc2 14. fxe5 Nxa1 15. Rxf7 g6 16. Bh6 dxe5 17. Rf8# 1-0

Tuesday, July 25, 2006

फुलले रे ...

फुलले रे क्षण माझे फुलले रे
मेंदीने, शकुनाच्या, शकुनाच्या मेंदीने, सजले रे क्षण माझे सजले रे

झुळूक वार्‍याची आली रे लेऊन कोवळी सोनफूले
साजण स्पर्शाची जाणिव होऊन, भाळले मन खुळे
या वेडाचे, या वेडाचे, नाचरे भाव बिलोरे
मेंदीने, शकुनाच्या मेंदीने, खुलले रे क्षण माझे खुलले रे

ओढ ही बेबंद, श्वासात, ध्यासात, स्वप्नात येणे तुझे
भांबावल्या माझ्या उरात, स्पर्शात रेशिम काटे तुझे
मनमोराचे, मनमोराचे, जादूभरे हे पिसारे
मेंदीने, शकुनाच्या मेंदीने, हसले रे क्षण माझे हसले रे

प्रीत ही, प्रीत ही उमजेना
जडला का जीव हा समजेना
कशी सांगू मी, कशी सांगू मी
माझ्या मनीची कथा रे
मेंदीने, शकुनाच्या मेंदीने, भुलले रे क्षण माझे भुलले रे

Thursday, July 20, 2006

Mate with two bishops

The last pawn was taken on 54th move.
It took me 14 moves to mate the white king.
To play through the chess game, visit chesshere.

Here's the PGN...

[Event "Team Game"]
[Site "chesshere.com"]
[Date "2006.01.02"]
[White "shakkiipe"]
[Black "Gabbar"]
[Result "0-1"]
[WhiteElo "1453"]
[BlackElo "1505"]

1. e4 e5 2. Nf3 Nc6 3. Nc3 Nf6 4. Bb5 Bc5 5. d3 O-O 6. Bg5 h6 7. Bh4 a6 8. Bxc6 dxc6 9. Nxe5 Qd6 10. Nc4 Qf4 11. Bg3 Qg5 12. O-O Bd4 13. Qf3 Bg4 14. Qf4 Rac8 15. Qxg5 hxg5 16. e5 Nh5 17. Rfe1 c5 18. Re4 Bf5 19. Ree1 c6 20. a3 b5 21. Nd6 b4 22. axb4 cxb4 23. Nxc8 Bxc8 24. Nd1 f6 25. e6 Re8 26. e7 Bc5 27. c3 Rxe7 28. Rxe7 Bxe7 29. Ne3 c5 30. Nd5 Bd8 31. cxb4 f5 32. h3 Nxg3 33. fxg3 cxb4 34. Nxb4 a5 35. Nc6 Bb6+ 36. Kf1 Bd7 37. Nxa5 Bd4 38. Nc4 f4 39. gxf4 gxf4 40. Ke2 g5 41. Ra8+ Kg7 42. b4 Bc6 43. Rd8 Bf6 44. Rd6 Bxg2 45. Rd7+ Kg6 46. b5 Bxh3 47. b6 Bxd7 48. b7 f3+ 49. Kf2 Bd4+ 50. Kxf3 Bc6+ 51. Kg4 Bxb7 52. Nd6 Ba6 53. Nf7 Kxf7 54. Kxg5 Bxd3 55. Kf4 Kf6 56. Kf3 Kf5 57. Kg3 Be4 58. Kh4 Be5 59. Kh3 Bf3 60. Kh4 Kf4 61. Kh3 Bf6 62. Kh2 Kg4 63. Kg1 Bh4 64. Kf1 Kh3 65. Kg1 Be2 66. Kh1 Bg5 67. Kg1 Be3+ 68. Kh1 Bf3# 0-1

Wednesday, July 19, 2006

How to access COM assembly from SQL CLR procedure

Question:
How to access COM assembly from SQL CLR procedure

Gabbar:
1. ALTER DATABASE [MyDatabase] Set TRUSTWORTHY ON
2. CREATE ASSEMBLY VSS FROM 'C:\Microsoft.VisualStudio.SourceSafe.Interop.dll'
WITH PERMISSION_SET = UNSAFE
3. Now, in the add reference window, this dll is visible.
4. Build and Deploy from buid menu option

The catch is, there are 3 permission levels for create assembly
1. SAFE - default mode - cannot access extrnal resource (files/folders)
2. EXTRNAL_ACCESS - can access extrnal resource (files/folders) bu not COM dlls.
3. UNSAFE - can do everything in the world including reference to COM dlls.

The naming of these options...SAFE, UNSAFE doesn't convey much.
But that's true for many microsoft things. :o(

Monday, July 17, 2006

Assembly not found in SQL Catalog

I don't believe this. Searching for my second day now.
All I want to so is create a CLR stored procedure which can access VSS on my own machine. I'm running into this when I try to deploy...

Assembly 'microsoft.visualstudio.sourcesafe.interop, version=5.2.0.0, culture=neutral, publickeytoken=b03f5f7f11d50a3a.' was not found in the SQL catalog.

Is it possible that only a limited pre-listed assemblies can be used for reference in a CLR procedure?

Here's the solution...

Monday, July 10, 2006

New and Improved askGabbar

Let me know if you like the new look of askGabbar.

Tuesday, July 04, 2006

Most used indexes in SQL Server 2005

Question:
How to find mostly used indexes in SQL Server 2005?

Gabbar:

SELECT TOP 5 total_worker_time/execution_count 'Avg CPU Time',
SUBSTRING(st.text, (qs.statement_start_offset/2)+1,
((CASE qs.statement_end_offset
WHEN -1 THEN DATALENGTH(st.text)
ELSE qs.statement_end_offset
END - qs.statement_start_offset)/2) + 1)statement_text
FROM
sys.dm_exec_query_stats qs
CROSS APPLY sys.dm_exec_sql_text(qs.sql_handle) st
ORDER BY
total_worker_time/execution_count DESC

This is copied from http://www.databasejournal.com/features/mssql/article.php/3608296

Un-used Indexes in SQL Server 2005

Question:
How to find un-used indexes in SQL Server 2005?

Gabbar:

SELECT
    o.name,
    i.name
FROM
    (
    SELECT
        x.id,
        x.indid
    FROM
        sys.dm_db_index_usage_stats us
        join sys.sysdatabases d
            on us.database_id = d.dbid
        join sys.sysindexes x
            on us.object_id = x.id and us.index_id = x.indid
        join sys.sysobjects o
            on us.object_id = o.id
    WHERE
        d.name = 'YourDatabaseName'
        AND o.xtype = 'u'
    ) used
    right outer join sys.sysindexes i
        on i.id = used.id and i.indid = used.indid
    join sysobjects o on o.id=i.id
WHERE
    o.xtype = 'u'
    and used.id is null

Monday, June 26, 2006

Mallikarjuna Temple

Mallikarjuna Temple is a highly revered shrine located at Pattadakkal, in Bagalkot District of Karnataka. The temple was built by the queens of Vikramaditya II in memory of his victorious march against Kanchi in 745 AD. The temple tower is topped by a dome and is noted for its architectural craftsmanship – an outstanding example of Chalukya style of architecture. Posted by Picasa

Wednesday, June 21, 2006

Chalukya edifices.

Durga Temple. Aihole. Posted by Picasa
The Ratha at Viththala Mandir, again Hampi!
In the left corner, the columns that you see are the instrument playing ones. Posted by Picasa

Pushkarini at Hampi

This is the Pushkarini at Hampi. Excellent architecture!! Posted by Picasa

Friday, June 02, 2006

three stages of a chess game

Savielly Tartakower: A chess game is divided into three stages: the first, when you hope you have the advantage, the second when you believe you have an advantage, and the third... when you know you're going to lose!

Monday, May 29, 2006

Trouble for being on time

You know what is the problem with with doing your work on/before time?
You sit idle when all your collegaes are rushing to meet the project deadlines.

:o(

Makes you feel kinda silly.

Saturday, May 06, 2006

Found the answer for Day 19

Found the answer!!!
guess where? in Google books!!

Day 19 Da Vinci Quest on Google

Going mad finding the answer to this question.

According to Grant Allen's Paris, who was Leonardo's scientific painter counterpart in Upper Italy?

Tuesday, May 02, 2006

Loosing a lot of games

I think I should play more sensibly. Loosing lots of games. :o(

Wednesday, April 26, 2006

तू कोण आहेस माझा?

आपल्या जवळजवळ प्रत्येक भेटीत तू मला तोच, एकमेव प्रश्‍न विचारतेस, "तू कोण आहेस माझा?' हा प्रश्‍न तू मला विचारलेला तर असतोच, पण तो तू स्वतःलाही विचारत असतेस. तुला उत्तर सापडेल, न सापडेल, माहिती नाही. पण मला मात्र उत्तर सापडलंय, नव्हे ते मी कष्टपूर्वक शोधलंय. तुला आजपर्यंत सांगितलं नाही, पण आता सांगतो. ऐक.... मनुष्यजन्म अतिदुर्लभ असतो म्हणतात. असं दुर्लभ भाग्य आपल्या दोघांच्या वाट्याला आलंय. अन्‌ दुधात साखर म्हणजे, माझ्यावर जिवापाड प्रेम करणारं माणूस मला मिळालंय. त्याला अन्‌ त्याच्या प्रेमाला मला तितकंच काळजीपूर्वक जपून ठेवायचंय. इतकसंसुद्धा न दुखावता... शेवटी ही सगळी करामत नात्याचीच असते ना! एक पुरुष म्हणून मी सर्व रूपांतली नाती निभावणार आहे... "मग ? उद्याचा काय प्रोग्रॅम?' असं जेव्हा मी विचारेन तेव्हा ती चौकस चौकशी नसेल, तर मित्र या नात्याने उत्सुकतेपोटी विचारलेला, प्रॉंट उत्तराची अपेक्षा नसलेला एक साधासुधा प्रश्‍न असेल. एका संध्याकाळी मोगऱ्याच्या गच्च सुवासाचा गजरा तुझ्या ओंजळीत ठेवेन तेव्हा मी तुझा प्रियकरच असेन. समुद्रकाठी वाळूत मनसोक्त फिरून झाल्यानंतर शांतपणे, डोळे मिटून तुझ्या मांडीवर डोकं ठेवून पडेन तेव्हा तुझा व्रात्य तरीही प्रेमळ मुलगा असेन. क्वचित कधी तुला उशीर झाला अन्‌ मला म्हणालीस, "न्यायला ये ना रे.' तर तुला न्यायला येताना, माझ्या मनातल्या भावना एखाद्या मोठ्या भावाप्रमाणेच असतील. तुला मिळालेलं बक्षीस, ट्रॉफी दाखवशील, तेव्हा त्या ट्रॉफीसकट बक्षिसासकट तुला मिठीत घेऊन कपाळावर ओठ टेकवताना, पित्याचं वात्सल्य कसं असतं, हे माझं मलाच उमजेल. पहिल्या लाजऱ्याबुजऱ्या श्रावणसरीनंतर जेव्हा मी तुला विचारेन, "चल येतेस? मस्त भटकून येऊ दोन दिवस.' तेव्हा प्रेमाबरोबर मला मैत्रीचीदेखील ओढ असेल.. आणि जेव्हा तुझ्या हातचं सुग्रास जेवून तृप्ततेचा विडा खाताना, तुझ्या कामसू गोऱ्या हातात नाटकाची दोन तिकिटं ठेवेन तेव्हा, त्याक्षणी मी फक्त तुझ्या नवरा असेन. संपूर्णपणे नवरा. ही सर्व नाती एकाच जन्मात निभावताना माझा निभाव लागेल की नाही माहीत नाही, पण प्रयत्न तर नक्कीच सच्चामुच्चा असेल. "माझ्यावर विश्‍वास ठेव' असं मी म्हणणार नाही, कारण तो आहेच... अगदी भरभक्कम आहे. त्यावरच तर ही नात्याची गुंफण होणार आहे. "फक्त तुझाच' हे नेहमी शेवटी येणारे शब्द माझ्या तोंडी नेहमी सर्वप्रथम असतील. कारण, उत्तरं शोधणाराच जाणतो राणी प्रश्‍नांची किंमत. आणि मौल्यवान प्रश्‍नांसाठी मौल्यवान उत्तरंच हुडकून काढतो.

job reservations

ET has opened a debate on "Is Premji right to go against job quotas in Wipro?"
As expected most of the posts agree with him... here is someone who put his pt in a v diff way.. :))

I think we should have job reservations in all the fields. I completely support the PM and all the politicians for promoting this.

Let's start the reservation with our cricket team. We should have 10 percent reservation for muslims. 30 percent for OBC, SC/ST like that. Cricket rules should be modified accordingly. The boundary circle should be reduced for an SC/ST player. The four hit by an OBC player should be considered as a six and a six hit by a OBC player should be counted as 8 runs. An OBC player scoring 60 runs should be declared as a century.
We should influence ICC and make rules so that the pace bowlers like Shoaib Akhtar should not bowl fast balls to our OBC player. Bowlers should bowl maximum speed of 80 kilometer per hour to an OBC player. Any delivery above this speed should be made illegal.

Also we should have reservation in Olympics. In the 100 meters race, an OBC player should be given a gold medal if he runs 80 meters.

There can be reservation in Government jobs also. Let's recruit SC/ST and OBC pilots for aircrafts which are carrying the ministers and politicians (that can really help the country.. )

Ensure that only SC/ST and OBC doctors do the operations for the ministers and other politicians. (Another way of saving the country..)

Let's be creative and think of ways and means to guide INDIA forward... Let's show the world that INDIA is a GREAT country. Let's be proud of being an INDIAN..

Wednesday, April 19, 2006

Paka's wedding

Paka's wedding is on 14th May.
Waiting eagerly to meet all of the wishram people there.

Saturday, April 15, 2006

Another win

Anothe win today in a chess game...
1. e4 e5 2. Nf3 d6 3. Nc3 c6 4. d4 Bg4 5. dxe5 Bxf3 6. Qxf3 dxe5 7. Bc4 Qc7 8. O-O a5 9. Rd1 h6 10. Be3 Nf6 11. a3 b5 12. Ba2 Na6 13. Ne2 Bc5 14. Ng3 Bxe3 15. Qxe3 O-O 16. Nf5 Kh7 17. Rd6 Rad8 18. Rxf6 g5 19. Rxh6+ Kg8 20. Qxg5# 1-0

Friday, April 14, 2006

Not exactly related to SQL, but one of my passions...
Chess...

I play white in this game.
1. e4 e6 2. e5 d5 3. d4 c5 4. c3 Nc6 5. Nf3 Qb6 6. dxc5 Bxc5 7. Be3 Bxe3 8. fxe3 Qxb2 9. Nbd2 Qxc3 10. Be2 Qxe3 11. Rb1 Nxe5 12. Rb3 Nxf3+ 13. Nxf3 Qe4 14. O-O Nf6 15. Ng5 Qg6 16. Bb5+ Bd7 17. Bxd7+ Nxd7 18. Nxf7 Ke7 19. Nxh8 Rxh8 20. Rxb7 Ra8 21. Qa4 Rd8 22. Qxa7 Qe4 23. Qc5+ Ke8 24. Rxd7 Kxd7 25. Rf7+ 1-0

Tuesday, April 04, 2006

Formula in SQL server 2000 database

Question:
How to use the formula when creating the table. What is the benefit of using this?

Gabbar:
CREATE table #mytable (myID int, PromoCode varchar(32),
PromoExpiration AS CASE WHEN PromoCode IS NOT NULL THEN dateadd(day,10,getdate()) ELSE NULL END)

Benifit is you don't have to take care of the value in this field in case of INSERT and UPDATE both. The value in the formula field are always in sync with your data.

delete ...

Question:
How would I write a SQL statement to delete rows from tables based upon matching values between 2 tables ?

Gabbar:
DELETE t1
FROM
tblTable1 t1
INNER JOIN tblTable2 t2 ON
(t1.fldID = t2.fldID
AND t1.fldField5 = t2.fldField5)
WHERE
t2.fldField6 = @Value

Age calculation

Question:
From tblAge (fields: DOB, City),
I need to pull out the counts of ages specified (let say Age_Category) below:

50 & under
51-64
65-69
70-74
75-79
80-84
85 & up

The output is to show:

Age_Category, City, count (city) based on DOB vs the date specified (let say 10/30/05).

Gabbar:
SELECT
CASE
WHEN DATEDIFF(YEAR, DOB, getdate()) < 51 THEN '50 & under'
WHEN DATEDIFF(YEAR, DOB, getdate()) BETWEEN 51 AND 64 THEN '51-64'
-- add another betweens cases here
WHEN DATEDIFF(YEAR, DOB, getdate()) > 84 THEN '85 & up'
END
AS Age_Category,
City,
count(city)
FROM
tblAge
GROUP BY
City,
CASE
WHEN DATEDIFF(YEAR, DOB, getdate()) < 51 THEN '50 & under'
WHEN DATEDIFF(YEAR, DOB, getdate()) BETWEEN 51 AND 64 THEN '51-64'
-- add another betweens cases here
WHEN DATEDIFF(YEAR, DOB, getdate()) > 84 THEN '85 & up'
END