Phone or Fax 999-999-9999
"\d{3}\-\d{3}\-\d{4}"
Phone or Fax (999) 999-9999
"\(\d{3}\) \d{3}\-\d{4}"
Simple Email
(\w[-._\w]*\w@\w[-._\w]*\w\.\w{2,3})
Email blah@blah.com
"^([0-9a-zA-Z]+[-._+&])*[0-9a-zA-Z]+@([-0-9a-zA-Z]+[.])+[a-zA-Z]{2,6}$"
Email blah._blah@blah.com
"^(([\w-]+\.)+[\w-]+|([a-zA-Z0-9]{1}|[\w-]{2,}))+@([-0-9a-zA-Z]+[._])+[a-zA-Z]{2,6}$"
Number 965
"\d\"
Thursday, May 21, 2009
Regular Expressions
Wednesday, May 6, 2009
Why Vista Failed?
Windows 7 is through beta, it is now release candidate, soon we are going to have a brand new operating system from Microsoft. I have been some what loyal to Microsoft Windows, when i worked on Windows 98 for the first time it was like Wow! I would say Windows 98 really changed the way people think about a personal computer. When Windows Me came in, i decided to stick with Windows 98, reason was i did not find any reason to switch as Windows 98 was doing everything i wanted at that time. When Windows XP, i still kept with Windows 98 until Windows XP Service pack 1 came in.
Now i am using Windows XP Service pack 3, i installed a dual boot with Windows Vista a number of times, but was unable to convince myself to switch. As i have been so used too with Windows XP and i really like it now.
Windows Vista Service pack 1 is a real improvement, but compatibility issue of Windows Vista with its predecessors is one of the reasons most of the users are not switching. Still i have kept Vista on a Virtual machine.
Reasons behind failure of Vista i think:
1. Strong security model, which keeps showing annoying dialog windows, and it is so frequent that users get used to just click OK without bothering for it, because they want to complete a task quickly
2. Hardware requirements, so Windows XP users will have to buy a new hardware if they want to have Windows Aero
3. Performance promises not met, seem to be slow as compare to XP
4. Windows Vista not showing backward computability is biggest reason among all
5. Most of the IT industry have applications developed that run nicely on Windows XP, but same application tends to crash on Vista without a clue
6. Software Vendors are also getting problem in making their programs work on Vista, for this they have to maintain a Virtual machine all the time to test their code on Vista.
7. For gamers that like their old games as well, get a set back when they see the older games are not working well on Vista
I hope Microsoft gets around and fixes them in the up coming Windows 7, i am hopping for the best, otherwise i will keep myself with Windows XP, and let Vista run on a Virtual machine.
Now i am using Windows XP Service pack 3, i installed a dual boot with Windows Vista a number of times, but was unable to convince myself to switch. As i have been so used too with Windows XP and i really like it now.
Windows Vista Service pack 1 is a real improvement, but compatibility issue of Windows Vista with its predecessors is one of the reasons most of the users are not switching. Still i have kept Vista on a Virtual machine.
Reasons behind failure of Vista i think:
1. Strong security model, which keeps showing annoying dialog windows, and it is so frequent that users get used to just click OK without bothering for it, because they want to complete a task quickly
2. Hardware requirements, so Windows XP users will have to buy a new hardware if they want to have Windows Aero
3. Performance promises not met, seem to be slow as compare to XP
4. Windows Vista not showing backward computability is biggest reason among all
5. Most of the IT industry have applications developed that run nicely on Windows XP, but same application tends to crash on Vista without a clue
6. Software Vendors are also getting problem in making their programs work on Vista, for this they have to maintain a Virtual machine all the time to test their code on Vista.
7. For gamers that like their old games as well, get a set back when they see the older games are not working well on Vista
I hope Microsoft gets around and fixes them in the up coming Windows 7, i am hopping for the best, otherwise i will keep myself with Windows XP, and let Vista run on a Virtual machine.
Sunday, May 3, 2009
Using Missing Index Information to Write CREATE INDEX Statements
SELECT 'CREATE NONCLUSTERED INDEX NewNameHere ON ' + sys.schemas.name
+ '.' + sys.objects.name + ' ( ' + mid.equality_columns + CASE WHEN mid.inequality_columns IS NULL
THEN '' ELSE CASE WHEN mid.equality_columns IS NULL
THEN '' ELSE ',' END + mid.inequality_columns END + ' ) ' +
CASE WHEN mid.included_columns IS NULL
THEN '' ELSE 'INCLUDE (' + mid.included_columns + ')' END + ';' AS CreateIndexStatement,
mid.equality_columns, mid.inequality_columns, mid.included_columns
FROM sys.dm_db_missing_index_group_stats AS migs
INNER JOIN sys.dm_db_missing_index_groups AS mig
ON migs.group_handle = mig.index_group_handle
INNER JOIN sys.dm_db_missing_index_details AS mid
ON mig.index_handle = mid.index_handle
INNER JOIN sys.objects WITH (nolock)
ON mid.object_id = sys.objects.object_id
INNER JOIN sys.schemas
ON sys.objects.schema_id = sys.schemas.schema_id
WHERE (migs.group_handle IN ( SELECT TOP 100 PERCENT group_handle
FROM sys.dm_db_missing_index_group_stats WITH (nolock)
ORDER BY (avg_total_user_cost * avg_user_impact) * (user_seeks + user_scans) DESC
AND sys.objects.type = 'U'
MSDN : Using Missing Index Information to Write CREATE INDEX Statements
Brian Knight's blog on the Missing Index DMV
Reference: http://msdn.microsoft.com/en-us/library/ms345405(SQL.90).aspx
Friday, May 1, 2009
Text Area Maximum Length
/*Text Area Maximum Length
<textarea cols="40" rows="3" id="" wrap="physical"
onKeyUp="return textCounter(this.form.other,this.form.remLen_1,100);"
onKeyDown="return textCounter(this.form.other,this.form.remLen_1,100);" name="other"></textarea>
<input type="text" name="remLen_1" value="100">
*/
function textCounter(field, countfield, maxlimit) {
var textlength = field.value.length;
if (textlength > maxlimit) {
field.value = field.value.substring(0, maxlimit);
} else {
countfield.value = maxlimit - textlength;
}
}
Subscribe to:
Posts (Atom)

