Thursday, July 26, 2007

Hai Sharmaon

Ah what the hell..another cool commercial

Best Firefox ad ever

IIS 5.1 XP cannot load asp pages

I have Windows XP Pro, SP2 installed and I cannot view my asp pages. I read all the posts in this forum, done every possible way that I could to solve this problem, but nothing seems to work.

I always get the same message:

The page cannot be displayed
There is a problem with the page you are trying to reach and it cannot be displayed.
--------------------------------------------------------------------------------
Please try the following:
Open the localhost home page, and then look for links to the information you want.
Click the Refresh button, or try again later.
Click Search to look for information on the Internet.
You can also see a list of related sites.


HTTP 500 - Internal server error
Internet Explorer


I had a problem at hand and lost 15 – 20 hours solving it!

The problem might be in 2 places:



1 – It is possible that IIs was not installed correctly. I uninstalled and reinstalled, but I still got the same problem. (Others with a similar problem solved it that way).



2 – Check if the Distributed Transaction Coordinator is configured to use remote host to coordinate transactions, if it is the case, it is likely that remote host cannot be contacted.

2b – Change that stupid setting to LOCAL, not remote host.



3 - Restart



You can configure MSDTC to use local coordinator by clicking MSDTC toolbar button in Component Services MMC snap-in (in administrative tools). Since further execution is impossible at this time, server process has been terminated.



It is possible that when you try to expand the My computer node it pops up with An Error occurred while processing the last operation Error code 8004E00F - COM+ was unable to talk to the Microsoft Distributed Transaction Coordinator



This worked for me:

cd %systemroot%\system32
msdtc -uninstall
msdtc -install



If this does not work try performing the steps in "Microsoft Knowledge Base Article - 315296" to clean 'Clean Up a Damaged COM+ Catalog' (http://support.microsoft.com/default.aspx?scid=kb;en-us;315296) and then do the step above again. I don't think 315296 actually helped fix the problem; but I can't say for sure since I did do 315296 before doing the steps above. Therefore, try just the steps above first. If you do perform 315296, the following may apply: If "IIS In-Process Applications" and "IIS Out-Of-Process Pooled Applications" do not appear in the "COM+ Applications" folder of the Component Manager:


cd %systemroot%\system32\inetsrv
rundll32 wamreg.dll, CreateIISPackage


Finally, go to your browser and try:
http://localhost

you should get the IIs start-up page.

Do not forget to configure MSDTC to use local coordinator!

Good luck!

Tuesday, July 24, 2007

404 page not found/

HTTP/1.0 Room 404 Object Not Found

The history of 404

Before the beginning of time, when the Internet was still very much
under the spell of bare Unix shells and Gopher, before SLIP or PPP
became widely used, an ambitious group of young scientists at CERN
(Switzerland) started working on what was to become the media
revolution of the nineties: the World Wide Web, later to be known as
WWW, or simply 'the Web'. Their aim: to create a database
infrastructure that offered open access to data in various formats:
multi-media. The ultimate goal was clearly to create a protocol that
would combine text and pictures and present it as one document, and
allow linking to other such documents: hypertext.

Because these bright young minds were reluctant to reveal their
progress (and setbacks) to the world, they started developing their
protocol in a closed environment: CERN's internal network. Many hours
were spend on what later became the world-wide standard for multimedia
documents. Using the physical lay-out of CERN's network and buildings
as a metaphor for the 'real world' they situated different functions of
the protocol in different offices within CERN.

In an office on the fourth floor (room 404), they placed the World Wide
Web's central database: any request for a file was routed to that
office, where two or three people would manually locate the requested
files and transfer them, over the network, to the person who made that
request.

When the database started to grow, and the people at CERN realised that
they were able to retrieve documents other than their own
research-papers, not only the number of requests grew, but also the
number of requests that could not be fulfilled, usually because the
person who requested a file typed in the wrong name for that file. Soon
these faulty requests were answered with a standard message: 'Room 404:
file not found'.

Later, when these processes were automated and people could directly
query the database, the messageID's for error messages remained linked
to the physical location the process took place: '404: file not
found'.

The room numbers remained in the error codes in the official release of
HTTP (Hyper Text Transfer Protocol) when the Web left CERN to conquer
the world, and are still displayed when a browser makes a faulty
request to a Web server. In memory of the heroic boys and girls that
worked deep into the night for all those months, in those small and hot
offices at CERN, Room 404 is preserved as a 'place on the Web'. None of
the other rooms are still used for the Web. Room 404 is the only and
true monument to the beginning of the Web, a tribute to a place in the
past, where the future was shaped.

Friday, July 20, 2007

10 mins of day

We take our internet usage for granted for the most part. I read a post on security monkey about a guy getting only 10 mins a day for internet usage...

What if YOU only had ten minutes of slow internet usage a day? What would you do and/or not do?

Here's my list:
  1. Use only 1 email account. Check only the emails which clearly state their purpose in the subject box
  2. Stop buying crap from ebay
  3. Stop using the IM
  4. Stop reading the news...Atleast use RSS feeds which filter out images
  5. Compose my blogs beforehand
  6. Compose my emails beforehand
  7. Stop stumbling every hour
  8. Start saving the offline copies of my references
  9. Install local copy of MSDN
  10. Get local copies of a lot of drivers
What would you do if you have only 10 mins of net every day ?

What's your list? Post 'em.

Chief

numly esn

Some more possible harry potter endings !!!

Harry Potter leaked and available on P2P services - 10 spoilers we'd like to be true

Well, there's discontent on the Internet, because the final installment of Harry Potter has been leaked. Although lawyers have quickly ensured the page has been taken down, it hasn't stopped some quick witted people copying it down and making it available on P2P services. Now, we haven't read the document, but here's the spoilers we'd *like* to see:

1. Harry wakes up in the shower, only to find that it was all a dream, and he's just a teenager living in Kingston.

2. Hermione realises Harry is a bit of a loser, and she's actually much keener on girls. She starts a meaningful relationship with Luna Lovegood.

3. Harry pushes Ron Weasley into the fiery pit of Mordor, before swordfighting Captain Jack Sparrow and turning Spiderman into a frog. All on the island from Lost.

4. Snape discovers shampoo, and decides that being evil isn't totally for him. Clean hair gives him a new perspective and he reverts to good.

5. Ron tries out life as a brunette. The universe collapses.

6. Harry decides to take up life as an actor, giving up all this saving the world. First part? Getting naked and pretending to be in love with horses.

7. Lord Voldemort engages in a to-the-death battle with Harry, only to find out that the battery has run out in his wand. Game over.

8. Harry wins against evil, and goes on to become a world class Quidditch player. He marries a Spice Girl and moves to LA.

9. Harry decides to run for London Mayor. He's got that terribly British awkward bumbling down to a fine art.

10. The last page reading "To be continued...

Tuesday, July 17, 2007

Funny Colbert report

117 RUn commands in Windows

117 Run Commands In Windows Xp

Run command is very useful, but sometimes it is forgotten. Use it sometimes and you will find how powerful is run command.




Accessibility Controls - access.cpl

Accessibility Wizard - accwiz

Add Hardware Wizard - hdwwiz.cpl

Add/Remove Programs - appwiz.cpl

Administrative Tools - control admintools

Automatic Updates - wuaucpl.cpl

Bluetooth Transfer Wizard - fsquirt

Calculator - calc

Certificate Manager - certmgr.msc

Character Map - charmap

Check Disk Utility - chkdsk

Clipboard Viewer - clipbrd

Command Prompt - cmd

Component Services - dcomcnfg

Computer Management - compmgmt.msc

Control Panel - control

Date and Time Properties - timedate.cpl

DDE Shares - ddeshare

Device Manager - devmgmt.msc

Direct X Troubleshooter - dxdiag

Disk Cleanup Utility - cleanmgr

Disk Defragment - dfrg.msc

Disk Management - diskmgmt.msc

Disk Partition Manager - diskpart

Display Properties - control desktop

Display Properties - desk.cpl

Dr. Watson System Troubleshooting Utility - drwtsn32

Driver Verifier Utility - verifier

Event Viewer - eventvwr.msc

Files and Settings Transfer Tool - migwiz

File Signature Verification Tool - sigverif

Findfast - findfast.cpl

Firefox - firefox

Folders Properties - control folders

Fonts - control fonts

Fonts Folder - fonts

Free Cell Card Game - freecell

Game Controllers - joy.cpl

Group Policy Editor (for xp professional) - gpedit.msc

Hearts Card Game - mshearts

Help and Support - helpctr

HyperTerminal - hypertrm

Iexpress Wizard - iexpress

Indexing Service - ciadv.msc

Internet Connection Wizard - icwconn1

Internet Explorer - iexplore

Internet Properties - inetcpl.cpl

Keyboard Properties - control keyboard

Local Security Settings - secpol.msc

Local Users and Groups - lusrmgr.msc

Logs You Out Of Windows - logoff

Malicious Software Removal Tool - mrt

Microsoft Chat - winchat

Microsoft Movie Maker - moviemk

Microsoft Paint - mspaint

Microsoft Syncronization Tool - mobsync

Minesweeper Game - winmine

Mouse Properties - control mouse

Mouse Properties - main.cpl

Netmeeting - conf

Network Connections - control netconnections

Network Connections - ncpa.cpl

Network Setup Wizard - netsetup.cpl

Notepad notepad

Object Packager - packager

ODBC Data Source Administrator - odbccp32.cpl

On Screen Keyboard - osk

Outlook Express - msimn

Paint - pbrush

Password Properties - password.cpl

Performance Monitor - perfmon.msc

Performance Monitor - perfmon

Phone and Modem Options - telephon.cpl

Phone Dialer - dialer

Pinball Game - pinball

Power Configuration - powercfg.cpl

Printers and Faxes - control printers

Printers Folder - printers

Regional Settings - intl.cpl

Registry Editor - regedit

Registry Editor - regedit32

Remote Access Phonebook - rasphone

Remote Desktop - mstsc

Removable Storage - ntmsmgr.msc

Removable Storage Operator Requests - ntmsoprq.msc

Resultant Set of Policy (for xp professional) - rsop.msc

Scanners and Cameras - sticpl.cpl

Scheduled Tasks - control schedtasks

Security Center - wscui.cpl

Services - services.msc

Shared Folders - fsmgmt.msc

Shuts Down Windows - shutdown

Sounds and Audio - mmsys.cpl

Spider Solitare Card Game - spider

SQL Client Configuration - cliconfg

System Configuration Editor - sysedit

System Configuration Utility - msconfig

System Information - msinfo32

System Properties - sysdm.cpl

Task Manager - taskmgr

TCP Tester - tcptest

Telnet Client - telnet

User Account Management - nusrmgr.cpl

Utility Manager - utilman

Windows Address Book - wab

Windows Address Book Import Utility - wabmig

Windows Explorer - explorer

Windows Firewall - firewall.cpl

Windows Magnifier - magnify

Windows Management Infrastructure - wmimgmt.msc

Windows Media Player - wmplayer

Windows Messenger - msmsgs

Windows System Security Tool - syskey

Windows Update Launches - wupdmgr

Windows Version - winver

Windows XP Tour Wizard - tourstart

Wordpad - write

Harry potter ...the unlikely endings

Everyone is impatiently waiting for the harry potter books and so, i thought may be we should discuss some unlikely endings for the book...

There is no spoils here...and all these are just figments of imaginations

7. Voldemort finally reveals the truth to Harry, "Dumbledore told you I killed your father. He lied! I, Voldemort, am your father!" Hermione later turns out to be Harry's long lost twin sister. (so star wars like)

6. Harry retrieves the final five Hoarcruxes, only to enter into an amicable agreement with Voldemort aided by lalu prasad yaadav jee mediating the discussions whereby they postpone their showdown for seven more books. (hehahahahahahaha, long live lalujee)

5. Dumbledore returns, cloaked in robes of white with white shoes on, at which point Jitendra sues dumbledore and intervenes and the rest of the book is withheld by a court ordered injunction.

4. After learning the truth of the prophecy as told to Harry by Dumbledore, Neville Longbottom decides to take matters into his own hands. He neatly finishes off Voldemort in one book, then seriously fucks up Harry for stealing the seven book franchise that should have been his to begin with.

3. After waiting a decade for conclusion of the saga of the Boy Who Lived, millions of fans around world wait in line the night before the release of Harry Potter and the Deathly Hallows only to receive a notice that the final book will not be made available to the public until J.K. Rowlings is made the new reigning monarch of England. The British parliament has a good laugh ... until the fighting breaks out.

2. Harry Potter does indeed die, and, as in all hindi movies, the evil woman did it. That's right. Mrs. Weasley finally shows her true colors, exactly lalita pawar style...key mere bete sey tera beta smart kaisey!!!!

1. In a satellite-broadcast world event, J.K. Rowlings appears before her millions of fans on the night before the announced release of "Harry Potter and the Deathly Hallows", holds her hand-written manuscript aloft, and in one supreme demonstration of the disdain she holds for all of her readers, casts the manuscript into a great cauldron of fire, declaring, "Now, you'll NEVER know how it ends, you little bastards!"

Hindu Chaplin, US Senate and hacklers



For the first time ever, the US senate opened with a non-Christian prayer and the effect was tremendous....

Though there were a few disruptors, all from the visitors galleries, all in all, this step was a big step.

Rajan Zed is reportedly the first Hindu to deliver opening prayers in an American state legislature, having done so in both the Nevada State Assembly and Nevada State Senate earlier this year. He has stated that Thursday's prayer will be "universal in approach," despite being drawn from Hindu religious texts.


Quoting the news report -
"Barry Lynn, executive director of religious watchdog group Americans United for Separation of Church and State, said the protest showed the intolerance of the "religious right."

"I don't think the Senate should open with prayers, but if it's going to happen, the invocations ought to reflect the diversity of the American people," Lynn said in a statement.

Senate Majority Leader Harry Reid had invited Zed.

"I think it speaks well of our country that someone representing the faith of about a billion people comes here and can speak in communication with our heavenly father regarding peace," he said after the disruption."

Thursday, July 12, 2007

5 htaccess Tricks Every Webmaster Should Know

5 htaccess Tricks Every Webmaster Should Know

If you’re new to htaccess, here’s a quick introduction. Otherwise, here are 5 sets of htaccess directives every webmaster should know:

1 - Redirect Visitors While You Update Your Site

Update and test your site while visitors are redirected to the page of your choice:

order deny,allow
deny from all
allow from 123.123.123.123

ErrorDocument 403 /page.html


allow from all


Replace 123.123.123.123 with your IP address. Also replace page.html with the name of the page you want visitors to see.

2 - Display a Custom 404 Error Page

Your server displays a “404 File Not Found” error page whenever a visitor tries to access a page on your site that doesn’t exist.

You can replace the server’s default error page with one of your own that explains the error in plain language and links visitors to your home page. Here’s how to use your own page:

ErrorDocument 404 /404.html

Replace 404.html with the name of the page you want visitors to see.

3 - Handle Moved or Renamed Pages

You’ve moved or renamed a page on your site and you want visitors automatically sent to the new page when they try to access the old one. Use a 301 redirect:

Redirect 301 /old.html http://yoursite.com/new.html

Using a 301 redirect also ensures the page doesn’t lose its search engine ranking.

4 - Prevent Directory Browsing

When there’s no index page in a directory, visitors can look and see what’s inside. Some servers are configured to prevent directory browsing like this. If yours isn’t, here’s how to set it up:

Options All -Indexes

5 - Create User Friendly URLs

Which of the two URLs below looks friendlier?

http://yoursite.com/about
http://yoursite.com/pages/about.html

When it comes to URLs, as long as the meaning is clear, shorter is always better.

With htaccess and an Apache module called mod_rewrite, you can set up URLs however you want. Your server can show the contents of “/pages/about.html” whenever anyone visits “http://yoursite.com/about”. Here are a few examples:

RewriteEngine on
RewriteRule ^about/$ /pages/about.html [L]
RewriteRule ^features/$ /features.php [L]
RewriteRule ^buy/$ /buy.html [L]
RewriteRule ^contact/$ /pages/contact.htm [L]

Wednesday, July 11, 2007

25 years of smiley

What started as a joke on the Carnegie-Mellon University message boards became a fixture in email and instant messages.

Yahoo Messenger's Terrell Karlsten wrote up an interview he conducted with a special guest. Scott Fahlman of Carnegie-Mellon has long been credited with inventing the smiley.

That originated in a conversation posted to a CMU message thread dated September 16, 1982. Fahlman suggested the sequence :-) as a way to designate a post as one with humorous intent, presumably for the humor-impaired.

Fahlman's Yahoo interview noted how the concept quickly spread to other message board users. People began to create new smileys, like ones indicating surprise, or even renditions of people like the Pope or Abraham Lincoln.

"It was gratifying that my colleagues found the idea so amusing, but I figured that it would stop there and would gradually fade away as the novelty wore off," Fahlman said.

It didn't, instead becoming a feature on messaging clients like Yahoo's, AOL's, and others after the Internet began reaching a broader commercial audience in the 1990s.

Fahlman isn't really a fan of the heavily-animated smileys seen on rich messaging clients today. He would like to have one that truly captures emotion, like Munch's "The Scream," he said in the interview.

"When deadlines are looming and things are going wrong, I’d use that symbol about six times a day. The :-( symbol just doesn’t capture the full horror of discovering that your Internet connection just went down, an hour before the deadline for submitting a major funding proposal," he said.

Geez O Peez

A woman was shopping at her local supermarket where she had selected the following items:

* A half-gallon of 2% milk
* A half carton of eggs
* A quart of orange juice
* A small head of romaine lettuce
* A 2-pound can of coffee
* And a 1-pound package of bacon

As she was unloading her items on the conveyor belt to check out, a drunk standing behind her watched as she placed the items in front of the cashier.

While the cashier was ringing up her purchases, the drunk calmly stated, "You must be single."

The woman was a bit startled by this proclamation, but she was intrigued by the derelict's intuition, since she was indeed single. She looked at her six items on the belt and saw nothing particularly unusual about her selections that could have tipped off the drunk to her marital status.

Curiosity getting the better of her, she said "Well, you know what, you're absolutely correct. But how on earth did you know that?"

The drunk replied, "'Cause you're ugly."

Monday, July 9, 2007

convert Numbers / Currency to words.

Courtesy - Vinnie881

Here is a very useful script I found to convert Numbers / Currency to words.

For example if you were to do

select dbo.Currency_ToWords(1235.34)
the output would be

ONE THOUSAND THIRTY FIVE DOLLARS AND 34/100 CENTS

I figured I'd post this, because I spent 2 hours trying to get it, and could not find a function like this for sql anywhere. enjoy!




Create FUNCTION [dbo].[Currency_ToWords] (
@Input Numeric (38, 3) -- Input number with as many as 18 digits

) RETURNS VARCHAR(8000)

/*
* Converts a integer number as large as 34 digits into the
* equivalent words. The first letter is capitalized.
*
* Attribution: Based on NumberToWords by Srinivas Sampath
* as revised by Nick Barclay
*
* Example:
select dbo.udf_Num_ToWords (1234567890) + CHAR(10)
+ dbo.udf_Num_ToWords (0) + CHAR(10)
+ dbo.udf_Num_ToWords (123) + CHAR(10)
select dbo.udf_Num_ToWords(76543210987654321098765432109876543210)

DECLARE @i numeric (38,0)
SET @i = 0
WHILE @I <= 1000 BEGIN
PRINT convert (char(5), @i)
+ convert(varchar(255), dbo.udf_Num_ToWords(@i))
SET @I = @i + 1
END
*
* Published as the T-SQL UDF of the Week Vol 2 #9 2/17/03
****************************************************************/
AS BEGIN
Declare @Number Numeric(38,0)
set @Number = @Input
Declare @Cents as int
set @Cents = 100*Convert(money,(@Input - convert(Numeric(38,3),@Number)))
DECLARE @inputNumber VARCHAR(38)
DECLARE @NumbersTable TABLE (number CHAR(2), word VARCHAR(10))
DECLARE @outputString VARCHAR(8000)
DECLARE @length INT
DECLARE @counter INT
DECLARE @loops INT
DECLARE @position INT
DECLARE @chunk CHAR(3) -- for chunks of 3 numbers
DECLARE @tensones CHAR(2)
DECLARE @hundreds CHAR(1)
DECLARE @tens CHAR(1)
DECLARE @ones CHAR(1)

IF @Number = 0 Return 'Zero'

-- initialize the variables
SELECT @inputNumber = CONVERT(varchar(38), @Number)
, @outputString = ''
, @counter = 1
SELECT @length = LEN(@inputNumber)
, @position = LEN(@inputNumber) - 2
, @loops = LEN(@inputNumber)/3

-- make sure there is an extra loop added for the remaining numbers
IF LEN(@inputNumber) % 3 <> 0 SET @loops = @loops + 1

-- insert data for the numbers and words
INSERT INTO @NumbersTable SELECT '00', ''
UNION ALL SELECT '01', 'one' UNION ALL SELECT '02', 'two'
UNION ALL SELECT '03', 'three' UNION ALL SELECT '04', 'four'
UNION ALL SELECT '05', 'five' UNION ALL SELECT '06', 'six'
UNION ALL SELECT '07', 'seven' UNION ALL SELECT '08', 'eight'
UNION ALL SELECT '09', 'nine' UNION ALL SELECT '10', 'ten'
UNION ALL SELECT '11', 'eleven' UNION ALL SELECT '12', 'twelve'
UNION ALL SELECT '13', 'thirteen' UNION ALL SELECT '14', 'fourteen'
UNION ALL SELECT '15', 'fifteen' UNION ALL SELECT '16', 'sixteen'
UNION ALL SELECT '17', 'seventeen' UNION ALL SELECT '18', 'eighteen'
UNION ALL SELECT '19', 'nineteen' UNION ALL SELECT '20', 'twenty'
UNION ALL SELECT '30', 'thirty' UNION ALL SELECT '40', 'forty'
UNION ALL SELECT '50', 'fifty' UNION ALL SELECT '60', 'sixty'
UNION ALL SELECT '70', 'seventy' UNION ALL SELECT '80', 'eighty'
UNION ALL SELECT '90', 'ninety'

WHILE @counter <= @loops BEGIN

-- get chunks of 3 numbers at a time, padded with leading zeros
SET @chunk = RIGHT('000' + SUBSTRING(@inputNumber, @position, 3), 3)

IF @chunk <> '000' BEGIN
SELECT @tensones = SUBSTRING(@chunk, 2, 2)
, @hundreds = SUBSTRING(@chunk, 1, 1)
, @tens = SUBSTRING(@chunk, 2, 1)
, @ones = SUBSTRING(@chunk, 3, 1)

-- If twenty or less, use the word directly from @NumbersTable
IF CONVERT(INT, @tensones) <= 20 OR @Ones='0' BEGIN
SET @outputString = (SELECT word
FROM @NumbersTable
WHERE @tensones = number)
+ CASE @counter WHEN 1 THEN '' -- No name
WHEN 2 THEN ' thousand ' WHEN 3 THEN ' million '
WHEN 4 THEN ' billion ' WHEN 5 THEN ' trillion '
WHEN 6 THEN ' quadrillion ' WHEN 7 THEN ' quintillion '
WHEN 8 THEN ' sextillion ' WHEN 9 THEN ' septillion '
WHEN 10 THEN ' octillion ' WHEN 11 THEN ' nonillion '
WHEN 12 THEN ' decillion ' WHEN 13 THEN ' undecillion '
ELSE '' END
+ @outputString
END
ELSE BEGIN -- break down the ones and the tens separately

SET @outputString = ' '
+ (SELECT word
FROM @NumbersTable
WHERE @tens + '0' = number)
+ '-'
+ (SELECT word
FROM @NumbersTable
WHERE '0'+ @ones = number)
+ CASE @counter WHEN 1 THEN '' -- No name
WHEN 2 THEN ' thousand ' WHEN 3 THEN ' million '
WHEN 4 THEN ' billion ' WHEN 5 THEN ' trillion '
WHEN 6 THEN ' quadrillion ' WHEN 7 THEN ' quintillion '
WHEN 8 THEN ' sextillion ' WHEN 9 THEN ' septillion '
WHEN 10 THEN ' octillion ' WHEN 11 THEN ' nonillion '
WHEN 12 THEN ' decillion ' WHEN 13 THEN ' undecillion '
ELSE '' END
+ @outputString
END

-- now get the hundreds
IF @hundreds <> '0' BEGIN
SET @outputString = (SELECT word
FROM @NumbersTable
WHERE '0' + @hundreds = number)
+ ' hundred '
+ @outputString
END
END

SELECT @counter = @counter + 1
, @position = @position - 3

END

-- Remove any double spaces
SET @outputString = LTRIM(RTRIM(REPLACE(@outputString, ' ', ' ')))
SET @outputstring = UPPER(LEFT(@outputstring, 1)) + SUBSTRING(@outputstring, 2, 8000)


RETURN UPPER(@outputString) + ' DOLLARS & ' +convert(Varchar(20),@Cents) + '/100 CENTS'-- return the result
END

Tuesday, July 3, 2007

Had to repost it

Read this somewhere and had to repost...just for the sheer surrealness of the post..


What Would Happen if You Bought 25 Bottles of Nyquil?

May 28th, 2007

Ever since I was a little girl, I have periodically played a game I like to call ‘What would happen if…’

The very first time I played this game I was 5 years old and riding in the car with my Mother. She had allowed me to sit in the front seat, but the novelty of that wore off rather quickly and I got bored. Almost immediately after we merged onto the expressway, I spied the car door handle. I thought to myself, I wonder what would happen if I opened the car door right now?

Would the door fly open? Or would it stay closed since the car was in motion? If it flew open, would the wind rip the door completely off of the car? My seatbelt was secure, so I was pretty sure I wouldn’t fly out of the car, but would anything else fly out? What would my Mother do?

I looked over at my Mother who was paying careful attention to the road and vaguely singing along with the radio. Then I looked over at the gleaming car handle. I knew that opening the door while we were driving was a very stupid and potentially dangerous thing to do, but it was almost as if the handle was calling my name. It wanted me to open it. I tried to resist, but my curiosity overwhelmed me. Slowly, I reached over…and opened the door.

Turns out the only thing that happens when you open the car door on the expressway is your Mother screams, “OH MY GOD! HOW DID THAT HAPPEN?” pulls over, closes your door, and then goes homes and bitches to your Father about her vehicle being unsafe and demands he buy her a new one.

It wasn’t the most exciting outcome in the world, but at least I knew.

This past Friday evening, I found myself inadvertently playing another game of ‘What would happen if…’

My husband has been dealing with a particularly nasty summer cold and it’s making it difficult for him to fall asleep. Shortly after midnight one evening, he asked me to run to the store and pick him up some medicine. I agreed because I’m nice like that.

After selecting a bottle of Nyquil and my Husband’s favorite brand of ice cream, it was time to check-out. I elected to go through the self check-out lane because the group of kids who normally jockeyed the registers looked thoroughly engrossed in a conversation about their parents sucking or their jobs sucking or who de-friended them on myspace recently or whatever and I didn’t want to interrupt them. Besides, I have two fully functioning arms. I am capable of scanning and bagging my own ice cream.

However, after I scanned my items, the computer started beeping.

“You have selected an age restricted item. Please wait for a cashier,” it said.

“What the Hell?” I mused, “Ice cream and Nyquil is age restricted now?”

A teenager with a lip piercing and bad dye job came rushing over. “Can I see your ID?” she chirped.

“What did I order that needs ID?” I asked.

She looked over my purchases and shrugged. “I guess it’s the Nyquil.”

I sighed deeply and handed her my driver’s license. She glanced at it quickly, typed my birthday into the computer, handed it back, and scurried away. Even though I didn’t show it, I was all kinds of annoyed.

I mean, what kind of nanny state am I living in right now? I can’t even buy cold medicine anymore without the government all up in my shit? Why is my right to privacy being invaded in favor of incompetent police officers who lack the ability to catch drug dealers without spying on the average law abiding citizen?

Then, out of nowhere, I thought, I wonder what would happen if I tried to buy all the Nyquil on the shelf?

Would they laugh? Would they get angry? Would they sell it to me? Would they call the cops? Would they interrogate me until I told them what it was for?

No matter how many years pass, I remain easily seduced by my curiosity. The harder I try to shake the wondering thoughts from my head, the more they burrow into my brain and demand recognition. By the time I got home from the grocery store, I simply had to know what would happen if I tried to buy an entire shelf full of Nyquil.

The next morning, I woke up bright and early with the intent of carrying out my plan. Now I’m not really sure how the typical Meth Head dresses, so I took a guess. I clad myself in an old T-shirt and a ripped pair of pants that were covered in paint. I pulled my hair back in a ratty ponytail and slipped on a pair of dirty sandals. My goal was to look as shady as possible without overdoing it.

Upon entering the store, I grabbed one of those hand-held shopping baskets and walked with single minded purpose over to the drug isle. I then proceeded to fill my basket with every bottle of Nyquil sitting on the shelf. There weren’t that many and I really wanted to be obvious, so I decided to buy all the generic versions as well. Then I marched my ass right over to the cashier and emptied my basket onto the conveyor belt. At first she wasn’t really paying attention as she grabbed bottle after bottle and flipped them through the scanner. Then a little light must have gone off in her head because she suddenly paused.

“Are these on sale or something?” she asked.

“Nope.” I replied noncommittally.

“I’m going to need to see your ID,” she responded.

“Sure.” I said as I handed it over.

“I’ll be right back,” she told me as she scampered over to the customer service desk to show my ID to who I assumed was the manager.

The guy in line behind me asked, “Someone sick?”

“I’m having a yard sale,” I replied. Yeah, my answer didn’t make much sense. But it was none of his business, so fuck him.

After about 10 minutes, the cashier came back and gave me my ID. Then she finished ringing me up and handed over two bags of Nyquil. “Um, have a nice day,” she said.

I thanked her politely and headed out to my car thinking to myself that the whole scenario ended up being fairly anticlimactic. This time, bending to the will of my curiosity earned me nothing more than 10 minutes of inconvenience and 25 bottles of unneeded Nyquil. Fucking fantastic.

I went home, unloaded my spoils onto my kitchen table and decided to take a nap on my couch. Right before I fell asleep, I thought to myself, I really need to stop playing that game.

A couple of hours later, my brother and his girlfriend woke me up.

“What the hell is with all the Nyquil?” he asked.

I told him about my game and how nothing really exciting happened. Then, he said, “Probably because you bought the wrong shit.”

I said, “Huh?”

With a smirk on his face, my brother explained, “The ingredient in Nyquil that is used to make crystal meth is called pseudoephedrine. But these don’t have it in them. Look! It even says right here on the front, ‘Now Made without pseudoephedrine.’

“Then why did they card me for them?”

“How the hell am I supposed to know? All I know is that you can’t make meth out of these.”

“Son of a bitch!” I exclaimed.

“You are the worst fake drug dealer ever,” my brother admonished.

His girlfriend cut in, “You know what you should get? Sudafed. They sell it behind the counter at the pharmacy and they probably won’t give you more than one or two. But it might be funny if you asked to exchange your Nyquil for 25 boxes of Sudafed.”

For me, failure tends to make me more determined, so I decided that was exactly what I was going to do. But, this time, I wanted to start my adventure with a bit more planning. I decided to call the grocery store and ask if it was even possible to return Nyquil since it was technically a medicine. The manager I spoke to assured me that as long as I had the receipt and the seal wasn’t broken, they would take it back.

So the next day, I packed up my bags of Nyquil and headed back to the grocery store. I plopped the bags on the counter of the customer service desk and amicably said, “I’d like to return these, please.”

The cashier looked shocked. “All of these?”

“Yes please,” I answered mildly, “Here is the receipt.”

“How many bottles are in here?”

“25.”

“25? You bought 25 bottles of Nyquil? Why would you do that?” she asked.

“I wasn’t feeling well.” I answered.

“So why are you returning them now?” She countered.

I slightly hardened my voice. “I’m feeling better.”

“Normal people don’t buy 25 bottles of Nyquil!” she exclaimed.

“So?” I snapped.

She started stammering. “Well….its just that I don’t….I don’t know…if we can take this many back. We’d have to throw them away and….I….uh….”

“I called and spoke to a manager yesterday,” I informed her, “And he told me that as long as the seal wasn’t broken and I had the receipt, you would take them back.”

“Well I’m sure he didn’t know how many you bought!”

“Does it matter?” I questioned, “Is there some sort of store policy that states you can only return so many things at a time?”

“I’m going to get my manger,” she replied.

“Fine.”

The manger came over, obviously perturbed, and we argued back and forth for a few minutes. Finally she said, “I’ll take them back this time. But next time, I won’t.”

“That’s fine by me,” I agreed.

I filled out a form with my name, address, and phone number, got my cash back and walked directly over to the pharmacy.

An older lady walked over to wait on me. “Can I please buy some Sudafed?” I requested.

“Sure!” she said as she held out her hand, “I’m going to need some proof that you’re over 18, though.”

“That’s fine,” I told her, “But I’m going to need more than one.”

“How many do you need?”

“25.”

“25 tablets?”

“No, 25 boxes.”

I’m not sure if my answer extremely shocked her or extremely angered her, but her response was to shriek, “NO!”

Calmly, I asked, “Why not?”

“NO!” she bellowed again.

“But why not?” I repeated.

“BECAUSE OF THE METH!” she hollered.

I smiled a little and said, “I promise I won’t use it to make meth.”

Again: “NO!”

A concerned Pharmacist walked around the counter. “What seems to be the problem here?” he questioned.

“I’m just trying to by some Sudafed.” I answered.

The cashier squawked again, “NO! YOU CAN’T HAVE ANY!”

And I was supposed to be the crazy one!

The Pharmacist gave her a confused look and she said to him, “She wants 25 boxes!”

“Whoa, wait a minute, ma’am!” he said to me.

Just then, out of the corner of my eye, I realized that the manager who did my return and a couple of stock boys were walking up behind me. They were closing in on me!

I thought to myself what better time to walk away, all shifty, like I was a real drug dealer than now. So I abruptly did an about-face and briskly started striding towards the door.

The Pharmacist tried to stop me. “Ma’am!” he called after me, “Ma’am! I’m going to need you to come back here! Ma’am!”

Seriously, I couldn’t believe he actually thought I would fall for that. I mean, what am I? 12 years old? Did he actually think I would be naïve enough to believe that a goddamn Pharmacist had the legal right to forcibly detain me in a grocery store?

But the ridiculousness of the situation was only a fleeting thought in my mind. At that precise moment, I had more pressing matters to concern myself with. Namely, how I was going to shake the manager and the stock boy goons who were in the process of following me out of the store.

I increased my walking speed a little and made it outside. I paused for a second, thinking the chase was over, but I was wrong. The manager had tailed me into the parking lot. Frantically, she started waving the cart boys over to her and pointing in my direction. Before I knew it, I had a small army of grocery store employees following me around the parking lot. It was fucking surreal. I felt like I was starring in the deleted scenes of one of those Terminator movies.

My theory was that they were waiting until I got into my car so they could write down my license plate number. To me, this was odd, considering the fact that they had my name, address, and phone number written on a slip of paper behind the customer service desk.

Anyway, I finally thwarted them for good by electing to simply walk home. Because I live a couple of miles from the grocery store, I decided to call my brother.

“Hey, if the cops show up at my door, do not let them in without a warrant,” I told him, “That’s a violation of my 4th amendment rights!”

“No problem.” He said. He’s learned to quit asking questions.

The end result of my little escapade, however, produced no angry police officers ruthlessly pounding on my door. In fact, outside of a couple of grocery store employees who briefly pretended to be Rambo, nothing really exciting happened at all.

All in all, I ended up fairly disappointed with my most recent game of ‘What would happen if….’ You see, that’s the problem with letting yourself become randomly consumed by curiosity. Things rarely live up to your expectations.

Monday, July 2, 2007

Forgot the Administrator password - Alternate Method - The LOGON.SCR trick

Forgot the Administrator password - Alternate Method - The LOGON.SCR trick

Windows Server 2003 Domain Admin password

This tip will NOT work for Windows Server 2003. This is because of changes in the service account with which the process runs. In Windows 2000 it was run in the Local SYSTEM account (LSA) privileges, while in Windows Server 2003 it is run with the LOCAL SERVICE account, thus resulting in far less privileges than it used to have in W2K and NT 4.0. The reason 2 new account have been introduced in 2003 is that SYSTEM Account has way too many power over the system and the system could be compromised by exploiting almost any system service. The Microsoft's solution was to introduce 2 less powerful accounts (LOCAL SERVICE and NETWORK SERVICE) and make some services run in the context of those accounts instead of LSA.

To successfully reset the Domain Admin password on Windows Server 2003 Active Directory please read the Forgot the Administrator's Password? - Reset Domain Admin Password in Windows Server 2003 AD page.

Windows 2000 Domain Admin password

To successfully reset the Domain Admin password on Windows 2000 Active Directory please read the Forgot the Administrator's Password? - Reset Domain Admin Password in Windows 2000 AD page.

The LOGON.SCR trick

To successfully reset the local administrator's password on Windows NT and some versions of Windows 2000 follow these steps:

1.

Install an alternate copy of Windows NT or Windows 2000.

You must install this instance of NT/2000 on a different folder than WINNT, otherwise you'll end up with the same bad situation. Use ALTWINNT for example.

It is best that you install the alternate instance of the OS into a different partition than the one you have your original installation. You'll delete this folder anyway, and it's best that you just format that partition after you're done. Formatting the partition will be much easier than deleting individual files and folders.

Also, if you lost your password on NT - install a new instance of NT, not Windows 2000, as doing so will ruin your old NT installation (because of the difference between the NTFS versions). Same goes for W2K, XP and Windows Server 2003. Always install the same OS.

Note: On Windows NT 4.0 machines that were installed out-of-the-box you do not have to install a fresh copy if you still have access as a regular user to the system. E.g. if you can log-on as a regular, non-administrator user, you can still manipulate the file's permissions. This is simply because NT's default permissions are set for Everyone - Full Control. This is not true on W2K/XP/2003 machines.

Another note: In the article you mention installing the OS on top of the existing OS to do the logon screensaver manipulation.

I wanted to mention that this can also be accomplished by removing the hard drive, placing it as a slave on another computer (XP and W2K play nicely) and then accessing the file system. Of course you need a second computer, but for some folks it may be an easier solution.

That's correct, and it will work for you unless you converted the disk to a dynamic disk, on the original OS. In that case you will no longer be able to boot the old OS, even if you do manage to access the files from the other computer.

2.

Boot the alternate install.
3.

Use Control Panel/System/Startup (for NT) or Control Panel/System/Advanced/Startup and Recovery for W2K to change the default boot instance back to your original install.

Lamer note: If you don't do that you'll end up booting into the alternate installation next time you turn on your computer. You don't want that, do you?

4.

Open Explorer. Browse to your original Windows NT/2000 folder, navigate to the %systemroot%\System32 sub-folder.

Lamer note: %systemroot% is a system variable used to point to the folder where NT/2000 is installed, usually \WINNT in NT/2000, or \WINDOWS in XP/2003.

5.

Save a copy of LOGON.SCR, the default logon screen saver, anywhere you like. Just remember where you've placed it. You can also just rename the file to something you'll remember later, I user LOGON.SC1.

Lamer note: To rename a file use the REN command in the Command Prompt window, or just select the file in Windows Explorer and press F2.

6.

Delete the original LOGON.SCR from the %systemroot%\System32 sub-folder. It is not necessary to delete the file if you renamed it, you can leave it there.

Note: You might not be able to delete the LOGON.SCR file because of permission settings. Regular users can only read and execute the file, not delete it. If that is the case (and it is in W2K, XP and Windows Server 2003) then you need to take ownership of the file and give the EVERYONE group FULL CONTROL permissions.

Lamer note: In order to take ownership of a file right-click it, select Properties, select the Security tab, click Advanced, and then click on the Owner tab. Select one of the users found in the list, click ok all the way out.

In order to change the LOGON.SCR permissions follow the previous instructions, in the Security tab click Add and browse to the Everyone group. Add it and make sure you give it Full Control. Click Ok all the way out.

7.

Make a copy CMD.EXE in the %systemroot%\System32 sub-folder. CMD.EXE is located in %systemroot%\system32.

Lamer note: In order to copy a file via GUI, select the file, right-click and chose Copy, then go to the destination folder, right click the folder name and select Paste. You can also use the keyboard by typing CTRL-C to Copy, CTRL-V to Paste.

8.

Rename the copy of CMD.EXE to LOGON.SCR.

Lamer note: See step #5.

9.

Shutdown and restart your computer. Boot into the original install.
10.

Wait for the logon screen saver to initiate - around 15 minutes. Oh, and no, do NOT move your mouse while you wait, duh...

After the screensaver is initiated, instead of running the normal LOGON.SRC actual screensaver, it will run the renamed CMD.EXE file (which is now called LOGON.SCR), and will actually open a CMD prompt in the context of the local system account.

In step #7 you could have used EXPLORER.EXE instead of CMD.EXE, and in that case a My Computer window will pop up.

Note: As noted earlier on this page, there is a way to make the wait time shorter, but you'll need to dig into the Registry for that.

11.

Open the CMD.EXE prompt (it should already be opened if you've used CMD.EXE in step #7) and type:

net user administrator 123456

This will reset the local administrator (or domain admin if you are doing this trick on a DC) password to 123456.

Lamer note: You can, of course, use ANY password you want...

12.

Delete the LOGON.SCR from %systemroot%\System32.
13.

Rename the saved default screen saver from step 5 back to LOGON.SCR.
14.

If you wish to remove the alternate install:

*

Delete its' folder.
*

ATTRIB -R -S -H c:\BOOT.INI
*

Edit c:\BOOT.INI and remove the alternate install's entries.

If you've used a different partition to install the alternate install then now you can simply delete or format that partition if you don't need it anymore, plus edit c:\BOOT.INI and remove the alternate installation entries.

This trick has been tested a zillion times. Don't bother to tell me it doesn't work, it does (for Windows NT and some versions of Windows 2000), and that's a fact