Wednesday, December 30, 2009

Testing Web Applications With a Real URL on local system on Windows

Testing web applications with a real URL on local on windows. Sometimes web apps need to parse the URL and since all real URLS have at least one '.' localhost might not be suitable for testing.



To get around this :



Open the file called hosts its default location is c:\WINDOWS\system32\drivers\etc\hosts or more accurately



%windir%\system32\drivers\etc\hosts

{To get the full path on your system you could type

echo %windir%\system32\drivers\etc\hosts

on a command prompt}



Open it in notepad and add the line at end

127.0.0.1 www.a.com



This is how my file looks


---- start hosts ----

# Copyright (c) 1993-1999 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
#      102.54.94.97     rhino.acme.com          # source server
#       38.25.63.10     x.acme.com              # x client host

 

127.0.0.1       localhost
127.0.0.1       a.com
127.0.0.1       www.a.com

 

 

---- end hosts ----

Now in any browser goto http://a.com/ use this with my XAMPP-PHP-MYSQL set up on local

It maps to local host. Use it as you would use localhost. If your web server is running on a different IP then you can specify that as in

http://a.com:8080



Comments welcome. thank you

Regards

Tushar Kapila

http://sel2in.com

Java, PHP, VB6 Apps. Fight Back pain: Exercise timer application

http://ksoft7.tripod.com/g3.html search page that allows you to search within any website uses google works best in Internet explorer and opera

http://minutes-alarm.sourceforge.net freeware minute alarm, easy reminder for back ache - stand up or meeting ...


Volunteer computer Cancer cures www.worldcommunitygrid.org

Click: www.thehungersite.com , and www.bhookh.com feed hungry , its free. www.ecologyfund.com

Please add these to your start-up how to: http://tusharkapila.blogspot.com/2008/05/s.html 

Wednesday, December 9, 2009

a list of selected files

You have a few files selected in Windows explorer and now you want the names or paths in a file or in your clipboard.




This utility does that in a jiffy.


Select files, right click and choose to send to this App : CmdLineToDirTxt.exe

It can either save the file names to a file or copy to the clibboard. Either way it looks like this:



just copy it to your send to folder (or open it and make it copy it self)

Download it here: http://code.google.com/p/win-utils/ it is freeware, open source (code is available) Its just an exe but it depends on the Microsoft VB 6 Runtime http://www.microsoft.com/downloads/details.aspx?FamilyID=bf9a24f9-b5c5-48f4-8edd-cdf2d29a79d5&displaylang=en

Tuesday, December 8, 2009

IE Default Print AND I love Java , PHP, VBA, mysql, J2ME, VB6, oracle, linux win 2000+

HEADER
&w&bPage &p of &P
FOOTER
&u&b&d





HEADER


&w&bPage &p of &P




FOOTER

&u&b&d




--------------------------



i love Java. Solve near every problem. Even UI with applets, J2ME and swing.



Java , J2ME mysql, apache web server - with them can solve most business problemns.



VBA - great tool - have delivered more than 10 projects using this language and it has helped with data and analysis with nearly all my other projects (in conjunction with Excel and Word).



VB6 - the full programming part of VBA



Windows 2000 was when windows OS got on par with unix and beat it in usability.



Oracle for showing all that a database can be.
MySql for being free and now powerful too.



J2ME for being easy to put apps on mobile devices



Linux for great performance ++ and all free. I use Ubuntu, burnt it on a CD from windows and made my system dual boot. instructions search



thank you all the folks behind these technologies!



Regards

Tushar Kapila


santaletternow.com   http://sel2in.com

http://stephenbrooks.org/muon1/ Volunteer computer idle time to science
www.thehungersite.com , and www.bhookh.com feed hungry , its free. www.ecologyfund.com
Please add these to your start-up how to: click here

http://www.worldcommunitygrid.org/ Volunteer computer idle time to help find cures for disease and other big world issues supported by IBM and other big corporates

start firefox with a new profile - 2nd session, different set of cookies

you can start firefox in with a new profile

with the option

--no-remote -p tushar



To do this make a new short cut to firefox.exe



then right click the short cut, choose properties



at the end of the Target you will see



\firefox.exe



to this add a space and --no-remote -p tushar



tushar can be your name or any string like profile2



The complete shortcut target in windows XP or Vista will be :

E:\ProgramFiles\Mozilla\Firefox\firefox.exe -p t

(IMPORTANT for the main window which should be started first )



then another short cut to the other firefox exe and with the no remote and other profile name:

E:\ProgramFiles\Mozilla\Firefox\firefox_prod.exe -p prod --no-remote



You can make a copy of your current default profile folder to copy all the settings and change the folder location (make the folder first then select it when you make a new profile) can even have more than two profiles on the same computer



can search in google for more



if you use XP or windows 2000 and do not want both the windows to group, bunch together can makea copy of firefox.exe name it

firefox2.exe and then have the 2nd sortcut point to this exe



REMEMBER

* Making a new profile makes a seperate cookie/ settings folder also will not have old profiles history, saved passwords etc unless you copy the existing profile folder to a new one and choose that new folder as the new profiles folder.



this can be done in the Create Profile step see images:






You this screen by starting firefox with the profile option -p as in :

E:\ProgramFiles\Mozilla\Firefox\firefox_prod.exe -p

















Choose folder

Sunday, October 11, 2009

love, fast love

pretty sad to hear about Prithum and his wife. they got married, had 2 kids and now cant stand one another. more sad is how they fought and dragged their families in, the police and friends. if you cannot get along go to a councilor, definitely do not fight like dogs. or just end it clean and in court.

Windows add a Program to your start-up : how to


When i think all of the 100000s of computers running with their CPUs being utilized 5-20% of their capacity most of the time ... then i see this great free thingy that can help in such a profound way (help find a cancer/ other fatal disease cure) i think its a no-brainer to use





Help with research, genitics, history. Volunteer your computer http://www.worldcommunitygrid.org/

today! It only uses free time on your pc. does not intefere with your work





Click: hunger site http://www.thehungersite.com/ , and http://www.bhookh.com/ , feed a hungry soul, its free.





Please add these to your start-up .



How to add to your start up?





I assume you have a windows xp or 2000 or vista?





Assuming you do , one way would be to right click on your computers windows START button.


click explore



2nd one from top Explore not "Explore ALl Users"

Now you should see a folder similar to:



"D:\Documents and Settings\tushar\Start Menu"


replace tushar with your user name (Sruthi, Joe or user1 ...)

now look for an open a folder called


Programs , then another folder called Start up




This folder has things that are done everytime you start up


Now you should be at a folder like



"D:\Documents and Settings\tushar\Start Menu\Programs\Startup"





Here right click

in the context menu that appears choose (click)New and then choose Shortcut





Enter the web site address/ command :
http://www.thehungersite.com/ or http://www.ecologyfund.com/ hit next . name it like ecologyfund.com


click finsh


Leave me a thank you note :)


your done. More images click here




Another way is to add the browser to the start up folder (by copying a short cut to the start up folder) and then adding the pages you want opened as the home page, but then this will happen everytime you open the browser not only when you restart your browser. So the first method is better.


I hope this helps some of you put programs on your start up, especially the cancer cure one. also you can find programs you do not want and move them from your start up folder.



Note: Some other programs reside in the registry's start up folder and others are services (control panel / Administrative Tools)


Windows add a Program to your start-up : how to


When i think all of the 100000s of computers running with their CPUs being utilized 5-20% of their capacity most of the time ... then i see this great free thingy that can help in such a profound way (help find a cancer/ other fatal disease cure) i think its a no-brainer to use





Help with research, genitics, history. Volunteer your computer http://www.worldcommunitygrid.org/

today! It only uses free time on your pc. does not intefere with your work





Click: hunger site http://www.thehungersite.com/ , and http://www.bhookh.com/ , feed a hungry soul, its free.





Please add these to your start-up .



How to add to your start up?





I assume you have a windows xp or 2000 or vista?





Assuming you do , one way would be to right click on your computers windows START button.


click explore



2nd one from top Explore not "Explore ALl Users"

Now you should see a folder similar to:



"D:\Documents and Settings\tushar\Start Menu"


replace tushar with your user name (Sruthi, Joe or user1 ...)

now look for an open a folder called


Programs , then another folder called Start up




This folder has things that are done everytime you start up


Now you should be at a folder like



"D:\Documents and Settings\tushar\Start Menu\Programs\Startup"





Here right click

in the context menu that appears choose (click)New and then choose Shortcut





Enter the web site address/ command :
http://www.thehungersite.com/ or http://www.ecologyfund.com/ hit next . name it like ecologyfund.com


click finsh


Leave me a thank you note :)


your done. More images click here




Another way is to add the browser to the start up folder (by copying a short cut to the start up folder) and then adding the pages you want opened as the home page, but then this will happen everytime you open the browser not only when you restart your browser. So the first method is better.


I hope this helps some of you put programs on your start up, especially the cancer cure one. also you can find programs you do not want and move them from your start up folder.



Note: Some other programs reside in the registry's start up folder and others are services (control panel / Administrative Tools)


Followers