Saturday, October 30, 2010

How to download embedded flash .swf files from a web site

The easiest way to download flash .swf files is to use Firefox's built in Page Info / Media function.

You will need to be using Firefox for this tutorial.  If you do not yet have Firefox, you can download it for free from http://www.mozilla.com/

When you are at the page of the flash file you would like to download right click anywhere on the page and select View Page Info .  Alternatively, on the Menu Bar, select Tools and then Page Info .

When the Page Info box opens, click on the Media Tab  Select (highlight) the file you want to save and then click the Save As... button and save the file in the location of your choice.

.

Thursday, October 28, 2010

Random Computer freezes ( BSOD )

When my HP Pavilion desktop computer was new in 2005, I installed a wireless card and hooked it up to my home network.  Everything seemed to work well except every 2-3 days, the computer froze with a Blue Screen Of Death (BSOD)  Nothing showed in the error logs.  Sometimes it took 4-5 days before it would freeze and sometimes it would freeze in 1-2 days.  Randome length of time before it would freeze.

It took me quite awhile to troubleshoot the problem because I sometimes had to wait a week to see if the computer would freeze again or not (I could not force it to happen) 

The culprit was the wireless card - the driver.  While it worked, it would freeze when, I assume, it was refreshing the IP address.  Once I updated the driver for the wireless card, no more BSOD .  After four years, I can safely say the wireless driver solved the problem of the random BSOD problem.

Tuesday, October 26, 2010

Adding A Twitter Tweet button and/or a Facebook button to your blog or web page

Adding a tweet button or a Facebook button is very easy to do.  Here is the following codes.  The only change you need to make is in red for the name of your web page or blog for the Twitter button.  You do not need either a Facebook or Twitter account to use them.  To add them into a blog, paste them into a HTML / Javascript gadget.

Twitter Button:

<a href="http://twitter.com/share" class="twitter-share-button" text="Computer Tech Blog :" count="vertical">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>

Facebook Button:


<a name="fb_share" type="button_count" href="http://www.facebook.com/sharer.php">Share</a><script src="http://static.ak.fbcdn.net/connect.php/js/FB.Share" type="text/javascript"></script>

.

Tuesday, October 19, 2010

Creating a web site with HTML : The very basics

HTML is Hyper Text markup Language and is the language web sites are created in.

You will need to save this image file as smiley.gif :

HTML A Beginner's Guide (Beginner's Guide (Osborne Mcgraw Hill))


HTML A Beginner's Guide (Beginner's Guide (Osborne Mcgraw Hill))
All you need to create a basic web page is a text editor such as Microsoft Notepad.  If you are unfamiliar with Notepad, you can open it by going to the start menu and typing Notepad and then`clicking OK.  You can also create a shortcut to Notepad on your desktop using Notepad for the location of the shortcut.

When you save your file, you will use the .htm extension instead of  using.txt   If you want your web page to open when a directory (folder) is selected the name of the file will be index (so it will be index.htm)  You can also use .html instead of .htm and it will work the same.  When you save the .htm file, a web browser should open it when you click on it. If you want to edit the file, right click on it and select either edit or open with and select Notepad.  When practicing, it is best to keep both of them open so you can view the web page as you are creating it.  Remember to save the file to see the current changes before reloading the web browser.

Most modern web browsers will open the web page without many of the tags although it is best to get into the practice of including all of them to prevent any problems.

All HTML tags are enclosed in the <> brackets.  To end a tag, such as bold, you use the forward slash ( / ) in front of the same tag.

Example:  <b>This is Bold</b> and this is normal

The opening tag for HTML web pages is <html> so start by typing the <html> tag at the top of your page in Notepad.  It is a good idea to save your work at the start and continue to save it regularly in case of power outages so save it now (remember, it's .htm)  go ahead and click on it and open it in your web browser as you work on it.

Next tag is the head tag.  This is where your title tag.

So under your <html> tag, you will want your head tag.  also go ahead and type in your closing head tag a few lines beneath it.  This is what you should have so far:

__________________________________________________
<html>
<head>

</head>



</html>
________________________________________________


Next you will want to use the title tag so the title of your web page will appear at the top.  The title tag goes in between the opening <head> and the closing </head> tags.  Use the <title> and the </title> to create your title.

<title>My First Web Page</title>

After the closing head tag (</head>) you will need the body tag.  This is where you will set the background color or picture.  It is <body> and the closing body tag will go right above the closing </html> tag.

With the body tag, you can also include a background color or image.

To change the background color include the bgcolor in the tag and type in the color you ant the page to be.

Example:   <body bgcolor = "yellow">  HTML only recognizes a few color names so you can also look online for hex codes and use them instead of the color name #FFFF00 is yellow and that would look like this:   <body bgcolor = "#FFFF00">  Font color can be changes using <font color = "red"> or use hex codes.  Remember to close the font tag before starting a new font color when you wish to change colors.  Remember to type some text text in your practice so you can see it.

If you want to use a background image, use the background = instead of bgcolor.  The background image tag would look like this:  <body background ="smiley.gif">

  So here is what you should have now:

__________________________________________________




<html>
<head>
<title>My First Web Page</title>
</head>
<body bgcolor ="yellow">

<font color = "red"> test text </font>  <p>

<font color = "blue">test text </font> <p>

<img src="smiley.gif" height=80 width=80 alt = "smiley face" >

</body>
</html>


____________________________________________

When you save it and reload the web page in the browser, you will notice the red and blue text is next to each other.  The page break tag is <br> and the paragraph tag is <p>  Neither of these need closing tags. If you want the text or image to be centered, use the <center> tag (making sure to use the close center, </center> to end centering)

To include an image, you use the img src tag.  Make sure in your example you are using a background color and not the smiley image.

To include the smiley as an image, you would use the following tag:  <img src="smiley.gif">  That is the basic tag that will work although you will also want to include the height and with as well as alternate text (in case the image can't be loaded)  The smiley picture I included is 80 pixels wide and 80 pixels high.

<img src="smiley.gif" height=80 width=80 alt = "smiley face" >

To see the alt tag in action, misspell smiley.gif, save the file, and reload the page.  The height and width help the page load faster since the browser knows the size of the image before fetching it from the web server.

To make a link clickable, you will need to use the a href tag.  This is a "two part" tag.  The a href is used to tell the browser where the link is going and the closing </a> ends the clickable text.

Example: <a href'="http://computertech123.blogspot.com/">Click this text here</a>

You can also make an image clickable by placing the image tag in place of the click this text here.


More tags you will want to experiment with:

<b>bold</b>
<i>italic</i>
<u> underline</u>
<del>Strikethrough</del>
<sup>super 1 script</sup>
<sub>sub 2 script</sub>

Headers automatically give a page break.  The tags for them are <h1> <h2> <h3>  Make sure you also close the appropriate tag ( </h1> </h2> </h3> )  Use the center tag to center the headers.

header 1

header 2

header 3






HTML BASICS, Third Edition

.

Using WindowsTask Manager to schedule starting / ending a live stream

If you are like me, you listen to online streaming on a regular basis.  Maybe there is a certain live program you want to listen to but always forget about it until it's over.  Or maybe you want the live stream to start playing before you get home.  Here is a quick and easy way to set it up on your PC.  I'll also include instructions on how to stop the stream if you desire to end it after a certain amount of time.

You will need to create a start batch (.bat) file.  It is very simple to create and is only two lines long.  Open Notepad  and include the following: 


@echo off
 
 start   realplay.exe   http://kbaq.org:8080/livestream/connect_high.ram

Replace the URL with the URL of the stream you want to play.  Substitute realplay.exe with whatever player you are using (IE: winamp.exe)  You can use the example URL for testing purposes if you are using real audio as your player (it is a classical station real audio stream)  You will need another URL for testing with another player.  Save the file as .bat in a permanent location.  Name it something like start including the call letters of the radio station if you wish (IE:  KBAQ start.bat
Double clicking on the file will open real player and start playing the stream. 

I'll first give you the code for the .bat file to close down the player before I show you how to schedule the playing and the stopping of the stream.

To stop / end the player, place the following two lines in Notepad:

 @echo off

taskkill /im      realplay.exe



Save the file in a permanent location (best to keep it in the same folder as your start .bat file but not necessary)  You can name it something like real audio kill.bat.  Make sure if you use another player that it is in the stop file instead of realplay.exe.

 Next we will want to schedule the starting / stopping of the live stream.

Open Task Scheduler by clicking  Windows Start button, select All Programs, then AccessoriesSystem Tools and then Task Scheduler

I suggest you create a new folder for your streaming tasks.  It makes them easier to find for editing or disabling.

When the new folder is open (if you choose to use it) then click on Create Basic Task (this is for windows Vista.  May be slightly different in other versions) Give the task a new name.  I use a descriptive name such as KBAQ start.  Go through the steps making sure you change the time to when you want the stream to start and the days you want it to run.  If it is weekdays, choose weekly and then click on the days you want it to run (M-F)   You will want to select Start A Program for the action.  Browse to where the start .bat file is.  Click through to finish.  Simple as that!  Do the same thing to close the player if you desire to stop it at a certain time.  Make sure you select the stop file.

You can create test start and end tasks and make sure everything is working properly which you can delete or disable after testing.  if your computer stays on all the time, this is a handy substitute for an alarm clock.

Microsoft Windows Command-Line Administrator's Pocket Consultant (Pro - Administrator's PC)
Microsoft Windows Command-Line Administrator's Pocket Consultant (Pro - Administrator's PC)

.

Duke Nukem Batch menu using SET command

Duke Nukem game 1 (1991) and 2 (1993) registered version  Batch (.bat) menu using DosBox.

CHOICE is not standard in  Windows XP although it as put back in Vista.  As a work around, you can make a menu using the SET command.  The previous post has the menu using CHOICE.  This is the SET version.

This creates two temporary files stdout.txt and stderr.txt in the directory where the .bat menu is located.  They are removed by this .bat file when closing.

of course this depends on standard installations.  If your installation paths are different, you will need to change the menu appropriately.

copy and paste the following and save it as a batch (.bat) file.  Edit it as needed for your own use.

=======================================================

@echo off

 title Duke Nukem
color 17
:LOOP
cls

echo.
echo.
echo.
echo.
echo            ============================================
echo                         Duke Nukem Main Menu                                            
echo            ============================================
echo.
echo                1.  Duke Nukem 1, Episode 1
echo                2.  Duke Nukem 1, Episode 2
echo                3.  Duke Nukem 1, Episode 3
echo.
echo                4.  Duke Nukem 2 (Episodes 1-4)
echo.
echo                5.  Exit
echo.
echo.
echo.

set INPUT=
set /p INPUT=Enter choice : 

if "%input%"=="5"  goto exit
if "%input%"=="4"  goto nukem2
if "%input%"=="3"  goto dn3
if "%input%"=="2"  goto dn2
if "%input%"=="1"  goto dn1

goto :LOOP

:dn1
cls
"C:\Program Files\DOSBox-0.73\dosbox.exe"  -conf dosbox.conf  -noconsole    -c "mount k:  c:\duke1"    -c k:  -c  dn1
goto :exit

:dn2
cls
"C:\Program Files\DOSBox-0.73\dosbox.exe"  -conf dosbox.conf  -noconsole    -c "mount k:  c:\duke1"    -c k:  -c  dn2
goto :exit

:dn3
cls
"C:\Program Files\DOSBox-0.73\dosbox.exe"  -conf dosbox.conf  -noconsole    -c "mount k:  c:\duke1"    -c k:  -c  dn3
goto :exit

:nukem2
cls
"C:\Program Files\DOSBox-0.73\dosbox.exe"  -conf dosbox.conf  -noconsole    -c "mount k:  c:\duke2"    -c k:  -c  nukem2
goto :exit

:exit
del stderr.txt
del stdout.txt
exit


.

Duke Nukem Batch menu using CHOICE command

Duke Nukem game 1 (1991) and 2 (1993) registered version  Batch (.bat) menu using DosBox.

CHOICE is not standard in  Windows XP although it as put back in Vista.  You can either download CHOICE or use a non-choice (SET) BATCH menu which will be posted immediately after this one.

This creates two temporary files stdout.txt and stderr.txt in the directory where the .bat menu is located.  They are removed by this .bat file when closing.

of course this depends on standard installations.  If your installation paths are different, you will need to change the menu appropriately.

copy and paste the following and save it as a batch (.bat) file.  Edit it as needed for your own use.

========================================================================

@echo off
:menu
 title Duke Nukem
color 17

cls

echo.
echo.
echo.
echo.
echo            ============================================
echo                        Duke Nukem Main Menu                                            
echo            ============================================
echo.
echo                1. Duke Nukem 1, Episode 1
echo                2. Duke Nukem 1, Episode 2
echo                3. Duke Nukem 1, Episode 3
echo.
echo                4. Duke Nukem 2 (Episodes 1-4)
echo.
echo                5. Exit
echo.
echo.
echo.
                   CHOICE   /C 12345  /M "Your Choice:  "

if errorlevel 5 goto exit
if errorlevel 4 goto nukem2
if errorlevel 3 goto dn3
if errorlevel 2 goto dn2
if errorlevel 1 goto dn1

:dn1
cls
"C:\Program Files\DOSBox-0.73\dosbox.exe"  -conf dosbox.conf  -noconsole    -c "mount k:  c:\duke1"    -c k:  -c  dn1
goto :exit

:dn2
cls
"C:\Program Files\DOSBox-0.73\dosbox.exe"  -conf dosbox.conf  -noconsole    -c "mount k:  c:\duke1"    -c k:  -c  dn2
goto :exit

:dn3
cls
"C:\Program Files\DOSBox-0.73\dosbox.exe"  -conf dosbox.conf  -noconsole    -c "mount k:  c:\duke1"    -c k:  -c  dn3
goto :exit

:nukem2
cls
 "C:\Program Files\DOSBox-0.73\dosbox.exe"    -conf dosbox.conf   -noconsole    -c "mount k:  c:\duke2"    -c k:  -c  nukem2 
goto :exit

:exit
del stderr.txt
del stdout.txt
exit


.