Welcome to the Stevipedia section or Steven Mapes .com. This area of the web-site is basically a collection of help desk type articles based on problems and solutions I have come across primarily in my time working within IT. Primarily its a central resource for me to look at so I don't need to keep pieces of paper or typed up notes, but I thought it may be useful for some other people as well.
Every now and then a website that I work on has required a form
where by the user needs to select multple entries from a SELECT input
and submit them back to the server. The SELECT input which allows
multiple selections is ugly and not especially user-friendly. As such,
when developing version 8 of Transformers At The Moon, I wrote a JavaScript solution based on a input method proposed by my brother David Mapes.The
solution was to use a pair of SELECTs one as the original list and
another as a "holder" which would be dynamically populated by clicking
on an entry in the first list. We also wanted to the user to be able to
remove items from the "holder" list and to be able to easily see how
many entries there were in that list. To enable the solution a third
input field was required. This time a HIDDEN field. This field keep
track of each of the values which have been selected as a comma
separated string. This means that when a FORM is submitted, it is the
value of this HIDDEN
Continue to read the full Javascript Code: dynamically populating 2nd SELECT list entry. Created on Tuesday 8th of May 2007 06:29:12 PM.
The below steps are from my notes dated 17th Oct 2002, but are for an old version of TAS Books Accounting Plus, so they may not work with later versions such as TAS Books 3.
TAS Books Accounting Plus - Resetting SPV password1. Ring TAS Books
2. Get everyone out
3. Log in on one machine
4. Highlight company and press F12
5. They will ask for the two codes and wil tell you the keycode (it is valid for 40 mins), type the keycode in (eg 4734099)
6. On the next menu click INITILSE FILE ->Select filename -> type in MTAUPF1.B
7. Confirm and choices
8. Reboot Tas Books
This clears the password file for that company completely, this means
that ALL the passwords have gone, by default it will then create the
spv account, but you need to create the others again
Continue to read the full Resetting the Supervisor password on TAS Books Accounting Plus entry. Created on Tuesday 18th of July 2006 02:57:28 PM.
In this entry you will find several commands that you can use to configure a cisco router, retrieve configuration and log information etc etc. I'll be adding to this article and I remember and need more commands.Setup. You need to be able to connect to your router in some mannor. This could be via TELNET or something like MINICOMBasic CommandsTo switch to Priviledge Exec mode type enable at the > prompt.You can get away with just ena as that is unique enough to identify the enable commandExit will log you out completly from any mode, as will CTRL+ZTo quit Priviledge Exec mode and return to User exec mode, use the command disable.You can exit and terminate the session from Priviledge Exec mode with logout rather than exitTo exit Global Conf Mode and return to User Exec mode, you can use end.? is the help command. EG show ? or router ?Prompts and their Meaningsrotuer> This is User Mode. Limited accessrouter# Priviledge mode. Supervisior accessrouter(config)# Global
Continue to read the full Cisco Router Notes - Configuration, Logs, Backups entry. Created on Tuesday 18th of July 2006 11:01:18 AM.
In SQL Server there comes a time when you need to disconnect all other connections to the database. An example is when you wish detach the database for backup or other purposes. This article will show you the script for doing this. Simply follow the script changing database_nameto the name of the database that you wish to kill the connections to.
DECLARE @dbid tinyintDECLARE @spid smallintDECLARE @exec_str varchar(10)-- Get the ID of the Database you wish to kill the connections ofSET @dbid = DB_ID('database_name')-- Set a var to the first process ID connecting to that databaseSET @spid = (SELECT MIN(spid) FROM master..sysprocesses WHERE dbid = @dbid)WHILE @spid IS NOT NULLBEGIN IF @spid <> @@SPID -- Make sure you don't drop your own connection BEGIN SET @exec_str = 'KILL '+LTRIM(STR(@spid)) EXEC(@exec_str) -- Kill the connection END --Get next SPID SET @spid = (SELECT MIN(spid) FROM master..sysprocesses WHERE dbid = @dbid AND spid > @spid)END
Continue to read the full SQL Server Script For Killing all other connections entry. Created on Tuesday 13th of June 2006 02:54:00 PM.
To flush your BIND Server's cache, use the command
rndc flush (bind 9.2.0 and later)
rndc restart or rndc exec (older versions)
For Bind 9.3.0 and onward, you can flush based on a domain by using a command such as rndc flushname stevenmapes.com
Continue to read the full Flushing BIND DNS Cache entry. Created on Monday 12th of June 2006 10:35:34 AM.
As a DBA on both MSSQL (Microsoft SQL Server) and MySQL databases one of the tasks that I often have to do is to write adhoc reports. On ocasio, to complete the report you have to use CURSORS so that you can 'step through' a resultset (result of a query) and perform various tasks on evey row. Thankfull both SQL Server and MySQL include support for Cursors (though MySQL is currently limited to non-updateable cursors). This entry contains a very basic example of using a Cursor to step through a result set and append two columns (forename and surname) to a variable. At the end a result set is produced that contains one row of commar separated names.
IF EXISTS (SELECT * FROM sysobjects WHERE id = OBJECT_ID(N'[dbo].[p_testproc]') AND OBJECTPROPERTY(id, N'IsProcedure') = 1)DROP PROCEDURE [dbo].[p_testproc]GOSET QUOTED_IDENTIFIER OFF SET ANSI_NULLS ONGOCREATE PROCEDURE dbo.p_textprocASBEGIN -- Declare Vars DECLARE @Name VARCHAR(255) -- Declare Cursor DECLARE lookupCur CURSOR FOR
Continue to read the full Basic Example Of Using SQL Server Cursors entry. Created on Friday 5th of May 2006 02:24:08 PM.
As a DBA (Database Administrator) for both MySQL and MSSQL databases, I often find myself required to write queries and reports that need a Cross-Tab Query. Cross -Tab queries are something that MSAccess supports, but so little other database do. MySQL 5 saw the introduction of the wonderful GROUP_CONCAT function that allows you to do the job, but MSSQL still does not have support, at least not in a straightforward manner. In this article, I will show you a simple example of how to recreate a crosstab query in MSSQL using a CURSOR.
Cross tab queries are used when you have a table that has results like.
Person
Colour
Steve
Blue
Steve
Red
Dave
Red
Dave
Red
And you wish to create a result set looking like this
Person
Colours
Steve
Blue,Red
Dave
Red,Red
I.E: You wish to group the results by one column, with the 2nd column showing each of the results as a comma separated value.Here's how you can do it, using MSSQL
Continue to read the full Recreating MySQL GROUP_CONCAT In MSSQL (Cross Tab Query) entry. Created on Wednesday 22nd of March 2006 04:53:14 PM.
In my DBA roll at Journeys Insurance, I always found that the backup and restore process of SQLServer just takes far too long, especially when you have to make a 'quick restore' of certan data. The solution to this is to detach the database and then re-attach it when you need it under the same or different name. At Journeys this was often needed to fix problems with the data being corrupted through the Delphi front end, or users being idiots. Anyway, I thought I'd create a DTS Package that would run and take a copy of the databases over night after the normal SQLServer backups had run. It meant restoration from them was instant.
Here's how you can do it.
To detach the database run
-- Detach Database (explained below)
exec sp_detach_db 'databasename'
Then run the follow commands from the command prompt. I recommend creating a batch file
xcopy /Y/C [full-path-to-database_file].MDF [destination]
xcopy /Y/C [full-path-to-log^file].LDF [destination]
Then reattach the database.
Below you
Continue to read the full Guide: Detaching Database for a 'quick restore' on SQL Server 7+ entry. Created on Friday 10th of March 2006 07:20:56 PM.
This is a guide I wrote for the support staff at Journeys Travel Insurance on how to setup the Windows Remote Desktop.
Connecting to a Remote Desktop
To connect to a Windows XP machine running Remote Desktop follow either of these steps.-> means 'then'.
1. Start -> Programs -> Accessories -> Communication -> Remote Desktop Connection
2. Start -> Run -> type in "mstsc /console" (but without the quotes)
In the box that appears, enter the IP address or host name of the computer you wish to connect to.
Click connect and you will try to connect to the remote machine. If successful you will see the normal windows login prompt, from which you can login with your normal details.
Warning: If a user is currently using the computer, then only that user or an administrator can unlock the computer.
Which Port is used
Windows Remote Desktop uses port 3389
Granting access to Remote Users
By default, the user that is currently logged into the computer has access to connect
Continue to read the full Guide: Setting Up Windows XP Remote Desktop entry. Created on Friday 10th of March 2006 07:16:27 PM.
Phone System Model - unknown at this time, provided by Thorton Communications
What the user sees
The red light on their log-in / log-out button on the ericsson telephone will stay on. None
of the buttons will respond.
The Cause The cause is unknown. Thorton's report that it is down to the 'sheer volume of calls', though it has been proven this it not the case.
The Fixnote - when I refer to [enter] press 2nd #
1. From one of the management phones login to the admin screen by pressing *00# followed by the admin password. Press [enter]
2. Press the button directly below the word System that appears on the LCD screen
3. Enter the code 0301 [enter][enter]
4. Press the button below the c/i on the LCD once
5. Use the forward and backward buttons to navigate the phone extensions until you find the one you need. Press [enter]
6. Use the forward and backward buttons to navigate the command buttons looking for the code 29 which means log-in/log-out. When you find it, and it could be different per
Continue to read the full Ericsson Phone Systems - Handsets lock up entry. Created on Friday 10th of March 2006 07:07:58 PM.
What the User sees
The computer will hang, you will have to cold boot
Why does this happen?The most common cause is that the machine has run out of Disk Space. You will need to clear up the space to allow them to continue
What to do
1. Start Zetafax Server. It is vital you start this BEFORE continuing
2. Open the Zetafax client logging in as the appropriate user.
3. Delete as many historic records as you can from the Zetafax client.
What not to do
Do not try to delete the files manually from the hard disk, this will corrupt Zetafax and the program may fail to run
Continue to read the full Zetafax 7 Server - Computer running the program has frozen entry. Created on Friday 10th of March 2006 07:06:34 PM.
Tas Books V3.18
What the user sees
1. Tas Books kicks them out
2. When they try to re-open the company it displays an error telling them that the format of the file is not in the latest version. It shows the data as being in version 0.
3. If the user tries to refresh the file list they will loose the account
When does it happen?
Not sure, but in the "Event log", there was an entry showing that the computer had sent out an incorrectly formatted datapacket around the time of the failure.
How to fix
Close down Tas Books correctly, then terminate the process W32mkde.exe. This will fix the problem.
If the user can not log in you may need to ask a Tas Supervisor to login and clear the users log file.
Continue to read the full TAS Books Accounting Plus V3.15+ ->Format of File Not Latest Version entry. Created on Friday 10th of March 2006 06:58:30 PM.
Please read: The following script is free to use on any Proboards. Please keep the header information (the comment) intact at all times. Removal of the header information of re-production of the script in any other way other than in full is strictly prohibited.
The CodeCode:<script language="JavaScript" type="text/javascript"><!--
/*
Disable Karma Hack
@TermsOfUse This script is for use on the Proboards Message board system. Please keep this header intact at all times.
Visit the www.stevenmapes.com for the latest revision of this script.
@Copywrite Steven Mapes - 2005 - http://www.stevenmapes.com
@Author Steven Mapes <steve AT the above domain>
@Created 15th June 2005
@Version 1.3
@var Disable Symbol is §
*/
function replace(inString,oldText,newText) {
return (inString.split(oldText).join(newText));
}
var doit = document.getElementsByTagName('td');
for(a=0;a<doit.length;a++){
if (doit[a].innerHTML.match("§") &&
Continue to read the full Proboards Modification - Karma Opt-Out (Javascript) entry. Created on Friday 15th of July 2005 06:48:00 PM.
For use on the Proboards Message Boards.Written by myself for Transformers @ The Moon message board Saké Comments.It re-writes the area where your personal text appears to insert a new table in the format of the Transformers TechSpecs. The ratings are decoded from the details entered into your personal text field.
You just need to change path variable to point to where you are storing the image that you wish to stretch to form the bar. In the example below the image is called stat.jpg
Copy this into the footers of the pages that you wish to use the mod for.
Here is the guide to how to use it
The code decodes entries into the Personal Text field
There are two types of Table that is generated. One has a title row, I use to to put the name of the character the profile is about, but its optional.
The Stats work on a scale of 0 to 11. Here's what how they translate
0=0 ... up to 9=9
10=9.5, 11=10
Now what do you actually need to put in your personal text. Well here's a
Continue to read the full Proboards Mod - Transformers TechSpec Hack (Javascript) entry. Created on Monday 6th of June 2005 10:53:00 PM.
Eventually you will find lists of recent additions here as well as links to some of my other websites and other things of interest and/or importance