படித்ததில் பிடித்தவை - 6
Posted On Saturday, November 27, 2010 at at 9:48 AM by Lokeshகருமணியிற் பாவாய்நீ போதாயாம் வீழும்
திருநுதற்கு இல்லை இடம்.
கலைஞர் உரை:
நான் விரும்புகின்ற அழகிக்கு என் கண்ணிலேயே இடம் கொடுப்பதற்காக என் கண்ணின் கருமணியில் உள்ள பாவையே! அவளுக்கு இடமளித்து விட்டு நீ போய்விடு!.மு.வ உரை:
என் கண்ணின் கருமணியில் உள்ள பாவையே நீ போய் விடு, யாம் விரும்புகின்ற இவளுக்கு என் கண்ணில் இருக்க இடம் இல்லையே.சாலமன் பாப்பையா உரை:
என் கருமணிக்குள் இருக்கும் பாவையே! நீ அதை விட்டுப் போய்விடு; நான் விரும்பும் என் மனைவிக்கு என் கண்ணுக்குள் இருக்க இடம் போதவில்லை.Translation:
For her with beauteous brow, the maid I love, there place is none;Explanation:
To give her image room, O pupil of mine eye, begone! .
O you image in the pupil (of my eye)! depart; there is no room for (my) fair-browed beloved.
Source:www.thirukural.com
Extension Methods
Posted On Sunday, November 14, 2010 at at 5:06 AM by LokeshI was working on a Ruby on Rails project. I was partly influenced by the syntactic sugars.
Here is the extension method in C# for Ruby times
1: using System;
2: 3: namespace ConsoleApplication1
4: {5: class Program
6: {7: static void Main(string[] args)
8: { 9: 5.Times(DoSomething); 10: } 11: 12: private static void DoSomething(int x)
13: {14: // Do something with x
15: } 16: } 17: 18: internal static class Extensions
19: {20: public static void Times(this int times, Action<int> action)
21: {22: for (var i = 0; i < times; i++)
23: action(i); 24: } 25: } 26: }