Thursday, October 16, 2008

Handling of Hijri Calendar in Microsoft Products

It was interesting to me to see how Microsoft was handling Hijri dates, as we know that Muslims follow the lunar calendar. They are using an algorithm called "Kuwaiti Algorithm", which they haven't exposed it to the public. But this alogorithm has been developed after extensive analysis.

It is also interesting to see that they have a special flag to convert gregorian dates to Hijri, and vice versa in SQL Server 2000, SQL Server 2005 and SQL Server 2008 as well.

There are two CONVERT styles that are available in SQL Server 2000 to support Hijri dates:

130 - Returns the date via the Hijri calendar, in dd mon yyyy hh:mi:ss:mmmAM format.

131 - Returns the date via the Hijri calendar, in dd/mm/yy hh:mi:ss:mmmAM format.

For example, to convert a date to Hijri format in Transact-SQL, you would use syntax such as the following:

SELECT CONVERT(nchar, GETDATE(), 131) 

This query will return a string such as the following in its result set:

7/05/1421 12:14:35:727PM 

The reverse operation is also possible. The following syntax would be used to go in the opposite direction:

SELECT CONVERT(datetime, ' 7/05/1421 12:14:35:727PM', 131) 

This query would convert the date to SQL Server datetime type, which in Query Analyzer would look like:

2000-08-07 12:14:35.727
You find more details about the above discussion, follow this link:

Monday, August 4, 2008

Creating a StringCollection Array in C#.

This explanation was tried in C# 2.0. Basically we all know that StringCollection class allows you to store multiple strings. But unfortunately it doesn't have the possibility of using it as an Array type. But interestingly it allows you to define something like:
StringCollection[] coll = new StringCollection[2];
You get no compile errors,but you cannot access it.It will give a Runtime error, which still I don't know why. I was in need of having a set of related StringCollections stored in an array. So after some discussion and analysis with a friend, we both came up with a solution to achieve what I wanted. I was able to create, and access my StringCollection Array like this:

Initially import the the following mnaespaces:
using System.Collections.Generic;
using System.Collections.Specialized;

Then some where in a button click event (or just anywhere you prefer):

//Create two string arrays

String[] nameArr = new String[] {"Mafaz","David" };
String[] countryArr = new String[] {"Srilanka","India" };

//The primary StringCollections i'm storing
//the array values to

StringCollection nameColl = new StringCollection();
StringCollection countryColl = new StringCollection();

//Adding the arrays to the relevant StringCollections

nameColl.AddRange(nameArr);
countryColl.AddRange(countryArr);

//declare an ArrayList with the number of StringCollections
//which we want to atore as Arrays
//Basically this will serve as a StringCollection Array.
//In this case we have two string collections

ArrayList al = new ArrayList(2);

//Add the StringCollections as Elements

al.Add(nameColl);
al.Add(countryColl);

//Two view the elements again

StringCollection coll2 = new StringCollection();

//You have to cast it to StringCollection type from the
//arraylist

coll2 =(StringCollection) al[0];
Console.WriteLine("Names :"+ coll2[0] + coll2[1]);

coll2 =(StringCollection) al[1];
Console.WriteLine("Countries :"+ coll2[0] + coll2[1]);

You can use a loop also to iterate through many StringCollection array elements. So that's it, That's how you create a StringCollection Array... :-)

Thursday, June 12, 2008

Sanity check: Will IT 2.0 eliminate the geeks or spawn a new breed?

This is an interesting article I read recently from www.techrepublic.com, which clearly gives an overview of what the next generation professionals should look into. There seems to be a widespread need of business skills fro most of the experts to be competitive in future...

  • Date: June 9th, 2008
  • Author: Jason Hiner
The IT profession will change significantly over the next decade in order to keep up with the swift advance of the technology industry. There are four factors driving these changes. IT will split into two separate career tracks.

———————————————————————————————————————–

The world of technology is racing at a pace so fast that it’s in a continual state of transformation. So how could the professionals who manage that technology not expect to be caught in the vortex of this rapid and perpetual change?

As bandwidth dramatically increases and mobilizes, computing power becomes more efficient and less expensive, and applications move to an always-on and always-available model, the IT profession itself will be dramatically altered to meet the changing requirements of businesses.

Here come the changes

In its recent article IT 2.0: How Changing Technology is Having Big Impacts on Business, the ReadWriteWeb stated:

“Today, there still may be plenty of businesses employing ‘classic geeks’ in their I.T. Department, but that’s about to change. Don’t misunderstand - the world will always need a good engineer, but the I.T. leaders of tomorrow - the ones guiding the business in the use of their computer resources, the ones working with the CEOs to execute the vision and direction via information technology - they will no longer be what we think of as the classic ‘computer geek.’ You know the type - the stereotypical introvert, who’s more comfortable behind the glow of computer screen than interacting with the rest of the human race. The one who likes to speak in acronyms that only he or she understands. The ones who know how to do everything from a command prompt. These folks will be a dying breed…at least around the office.

Instead, tomorrow’s computer ‘geek’ will be a true member of the business team as opposed to the mysterious man behind the curtain who you only notice when something goes wrong. So what does the ‘new geek’ need to know to run tomorrow’s I.T. Department? An entirely new skill set, as it turns out.”

In terms of the factors involved in these changes, ReadWriteWeb cited these four:

  • Enteprise 2.0 - Collaboration among employees and teams using tools such as SharePoint, Wikis, blogs, and RSS
  • Cloud services - A lot of servers will move from the corporate data center to the cloud, hosted by Microsoft, Google, and Amazon
  • The mobile workforce - Mobile office work will spread across the organization, and will no longer be confined just to business travelers
  • Self-provisioning user base - The next generation of users will be digital savvy and will often select their own hardware and software

Two kinds of IT professionals

While the ReadWriteWeb has accurately described the environment that is revolutionizing the traditional IT department, I have a different conclusion about what it will mean for IT professionals. I think the ultimate factor driving change in the profession will be the long-developing trend toward companies hiring only the professionals who serve the core competencies of their business, and outsourcing everything else to contractors.

This is already be seen in the move toward utility computing and managed services, where a company will contract out parts of its IT department to a provider such as IBM, Hewlett-Packard, or Verizon Business. These providers can offer 24/7 service, better specialization and problem solving, and cost containment.

The move to cloud computing will further accelerate the trend. For example, instead of hiring Exchange administrators to manage internal Microsoft Exchange servers, many companies will outsource the Exchange infrastructure to Microsoft in a hosted environment. This type of move also migrates the jobs from the individual company to the provider of the hosted data center.

As such, I believe that over the next decade the IT field will develop into two distinct tracks:

  1. Business analysts - IT professionals who work directly for individual companies — rather than part of a provider or consultancy — will have to become much more business savvy. These will essentially be business professionals who understand technology and how to strategically apply it to business processes. They will need to be well-rounded technologically and have excellent communications skills.
  2. Technology experts - This is where many of the traditional geeks will end up, although many of them will need more business skills than they currently have today, especially if they have to interface with clients. They will rarely work directly for one company, but will rather work with various companies to help solve their IT problems, implement new technologies, and manage their IT infrastructures. For example, this will take the form of well-rounded teams of project-for-hire developers and big data centers managed by large teams of network and server specialists.

Tuesday, June 10, 2008

My First MCP certification

During my fresher course at SLIIT, i was wondering when do I get the opportunity to sit for a MCP exam. Well my expectations came true when after 3 years at my Job place. The director at my office gave me the opportunity to sit for the MB7-14 C/SIDE Introduction to Microsoft Dynamics NAV 5.0, which falls under the Microsoft Business Solutions Category of certification. Although I preferred the MCTS (.NET certification track) to start my career, after some internal exams I took before sitting for the exam, I luckily manged to pass and obtain my First ever MCP certification.
The certification I earned on May 12th 2008 after passing with 93/100 is Microsoft Certified Business Solutions Specialist for Microsoft Dynamics NAV 5.0.

Thursday, April 3, 2008

OOXML becomes a standard

Microsoft Office 2007's default format Office Open XML becomes a ISO standard amidst a hard struggle from critics and tecnical experts all around the world.
Check for more information from the following links:
http://arstechnica.com/news.ars/post/20080401-microsofts-office-open-xml-now-an-official-iso-standard.html
http://blogs.zdnet.com/open-source/?p=2220&tag=nl.e019
http://blogs.zdnet.com/open-source/?p=2222&tag=nl.e019

Anyway Microsoft is Microsoft, seems to be they remain the same always ;-)

Tuesday, February 12, 2008

Removing Multiple Instances of MS SQL Server 2005

I have been into this issue for a long time after installing Microsoft SQL Server 2005 in my PC. I had to create multiple server instances in my PC for different projects. But after using them I felt it was just a waste lying there and couldn't find a way to remove them. Interestingly the SQL Server Management Studio or the Enterprise Manager itself didn't have any option to do so.
A friend of mine recently showed this article of how to do it....
http://www.mydigitallife.info/2007/10/14/uninstall-and-remove-multiple-database-instances-of-microsoft-sql-server-2005/

Wednesday, January 30, 2008

Programmatically compiling another .Net file in C#

This feature would be cool if we think of a world where we do not need to worry about regular updates etc. I had a need of having this for my 4th year project, luckily I found this (but if the underlying Framework changes this approach will not be appealing :-( )

http://support.microsoft.com/kb/304655

Thursday, December 27, 2007

பணம் பணமறிய அவா!

கொடுவாயூர்: ஜாஃபர் சாதிக், பாகவி

அன்னை தேசத்து
அகதிகள் நாம்
எண்ணெய் தேசங்களில்
எரிந்து கொண்டிருக்கிறோம்!

அடி வயிற்றில் பதிந்த
வறுமைக் கோடுகளின்
மர்மக் கரங்கள்
அறித்தெறிந்து வீசிய
ஜீவனுள்ள மாமிசத்
துண்டுகள் நாம்!

கண் தெரியா தேசத்தில் விழுந்து
காயங்கள் தலை சாய்த்துக்
கண்ணீர் வடிக்கிறோம்!

மொத்தக் குடும்பத்தையும்
முதுகில் சுமந்து
இன்னும் தீர்மானிக்கப்படாத்
திசைகளில் தொடர்கிறது
நம் பயணம்!

ஒவ்வொரு முறையும்
நலம் நலமறிய அவா
என்றுதான் கடிதம் எழுதுகிறோம்!
பணம் பணமறிய அவா
என்றல்லவா பதில் வருகிறது!

நமக்கு மட்டும் ஏன்
பணம் பந்த பாசங்களின்
சமாதியாகி விட்டது!

ஒரு டெலிபோன் கார்டிலும்
ஒரு பொட்டலம் பிரியாணியிலும்
முற்றுப்பெற்று விடுகிறது
நம் பெருநாட்கள் ஒவ்வொன்றும்...

உயிரை பிழிந்து பிழிந்து
பாசத்தால் ஒத்தடம் தந்த
உறவுகளைப் பிரிந்து
இன்னும் எத்தனை நாட்கள்
இந்த ஏகாந்த வாழ்க்கை?

கலவரத்தில்
கைக் குழந்தையைத் தொலைத்த
தாயின் பதற்றத்தைப்போல்தான்
ஒவ்வொரு முறையும் போன் பேசிய
பின்னால் அடையும் அவஸ்தைகள்...

நம்மில் பலருக்கு
தாம்பத்திய வாழ்க்கைகூட
தவணை முறையில்தான்
தட்டுப்படுகிறது...

தொலைபேசியிலும்
தபாலிலும்
கொஞ்சலும், சிணுங்கலுமாய்
இன்ஸ்டால்மெண்டில்
இல்லறம் நடக்கிறது...

மனைவியின் மூச்சுக்காற்று தந்த சுகம் கூட
இந்த ஏசி காற்று தருவதில்லை!

குடும்ப விளக்குகளை
கும்மிருட்டில் தவிக்கவிட்டு விட்டு
தீக்குச்சிகள் நாம்
தன்னந்தனியாய்
இந்தத் தீவுகளில்...

வீடுகூடும் நிஜம் தொலைத்து
ஒரு வீடு கட்டும் கனாவில்
இன்னும் எத்தனை ஆண்டுகள்
இந்த பாலைப் பிரதேசங்களில்?..

உயிரோடு இருக்கும்
பெற்ற குழந்தைக்கு
புகைப் படத்தில்
தான்கொடுக்க முடிகிறது
செல்ல முத்தங்கள்!

என்ன இருந்தாலும்
காகிதங்கள் உணருமா
பாசத்தின் ருசி

ஒவ்வொரு முறையும்
ஊர் சென்று திரும்பும்போது
மறக்காமல் எல்லாவற்றையும்
எடுத்து வர முடிகிறது
மனசைத் தவிர...

காலத்தின்
இந்த பசை தடவல்கள்
நம்மைக் கட்டிப் போடாமல்
வெறும் கடிதம் போடத்தானா?

பாலைவன ஜீவன்கள் நாம்
தாகத்தோடு காத்திருக்கின்றோம்
தண்ணீருக்காக அல்ல
தபால்களுக்காக...

வாழ்க்கையின் பாதி
விரக்தியிலும் விரகத்தீயிலும்
எரிந்துபோகும் நம் வாலிப வாழ்க்கை
கடைசியில் நரம்புகள் அறுந்துபோய்
முகாரி பாடும் வீணைகளாய்...

என்ன சொல்லி
என்ன பயன்
தண்ணீரில் மீன் அழுதால்
கண்ணீரை யார் அறிவார்?

சுட்ட இடம் : www.pottalputhur.com

Google Transliterate

This is a great service from google...I've planned to use this for posting data in Tamil letters...
http://www.google.com/transliterate/indic/Tamil

Monday, December 24, 2007

A letter to the teacher


This is a letter the late American president Abraham Lincoln once wrote to his son’s teacher. A good example for parents.

He will have to learn, I know, that all men are not just, all men are not true, but teach him also that for every scoundrel there is a hero, that for every selfish politician there is a dedicated leader. Teach him that for every enemy there is a friend.
It will take time I know, but teach him if you can that a dollar earned is far more value than five found, teach him to lose and also to enjoy winning. Steer him away from envy. If you can, teach him the secret of quiet laughter. Let him learn early that the bullies are the easiest to lick. Teach him if you can the wonder of books. But also give him quiet time to ponder the eternal mystery of birds in the sky, bees in the sun and flowers on a green hillside.
In the school teach him it’s far more honorable to fail than to cheat. Teach him to have faith in his own ideas even if everyone tells him they are wrong. Teach him to be gentle with gentle people and tough with the tough.
Try to give my son the strength not to follow the crowd when everyone is getting on the bandwagon. Teach him to listen to all men, but teach him also to filter all he hears on a screen of truth and take only the good that comes through. Teach him if you can how to laugh when he is sad. Teach him that there is no shame in tears.
Teach him to scoff at cynics and to beware of too much sweetness. Teach him to sell his brawn and brain to the highest bidders, but never to put a price tag on his heart and soul. Teach him to close his ears to a howling mob and to stand and fight if he thinks he is right.
Treat him gently, but do not cuddle him because only the test of fire makes fine steel. Let him have the courage to be impatient… let him have the patience to be brave. Teach him always to have sublime faith in mankind.
That’s a big order, but see what you can do because he’s a fine little fellow, my son.