Wednesday, December 21, 2005

Compiles that go to the client

No comments:
Whenever a version goes to a client, we NEED to

1) do a checkin
2) Build a release version to send to the client
2) tag the state of the program (and any satellite programs) with the version number of the release version sent to the client (and program name, if a satellite version).

Example: you change SupplierChecker for SNR. When everything is working, you check in the code, build a release version (noting the version number), and send it to SNR. Immediately afterwards, you tag SupplierChecker and AmexCommon (which is also used by SupplierChecker) with the tag "SupplierChecker 1.0.xxxx.yyyy (where xxxx and yyyy are the other parts of the version number of the release version sent to SNR).


Why do we do this? When e.g. SNR calls and says he has a bug, we can check the EXACT code that he was using. Also, if you've started new changes, you can always go back to a version WITHOUT the new changes to quickly correct a bug.

Monday, December 05, 2005

Install 24U Simple Dialog Freeware Plugin

1 comment:
The freeware installer can be found on \\server2003\Permanent\Software Depot\Plug-ins. Drop the AutoInstaller folder and the 24uPlugInInstall.fp5 DB into C:\Program Files\FileMaker\FileMaker Developer 6\ folder, and run the auto installer. Unclick all but the "W" (Windows) version of the 24U SimpleDialog plug in, and hit the Update All button. That's it.

20060806 ED: New Instructions at \\server2003\Permanent\Software Depot\Plug-ins\24U Simple Dialog FM Plugin\readme.txt:
I BELIEVE that the only thing you need to do is copy the file 24uSimpleDialog.fmx to your \Program Files\FileMaker\FileMaker Developer 6\System folder. Either that, or run the install process in the "\\server2003\Permanent\Software Depot\Plug-ins\24U Simple Dialog FM Plugin\Old Contents and Instructions (not working)" folder and THEN copy in the fmx file.

I NEVER get this working on the first try. Please update these instructions if my first suggestion DOES work. Thanks.

Wednesday, November 30, 2005

Move Putty's stored data to a new Windows computer

No comments:
To move putty's setting from one machine to another, use regedit to export a reg file of HKEY_CURRENT_USER\Software\SimonTatham\PuTTY, and install it on a new machine.

FileMaker via ODBC Performance Problems

No comments:
When Cristóbal was updating fields in Batch Line Items.fp5 (a FileMaker DB) via ODBC, each field update was taking about 30 seconds. A small part of the problem was the calculated fields, and if you ever need to maximize performance, you might want to look to see if it’s possible to remove them.
However, the big performance culprits were 2x summary fields, which accounted for about 93% of the slowdown. He was able to remove one field, since SNR indicated that it was totally unused. The other he converted to a global field, and introduced a “recalculate” button on the layout where the field was used – the button called a script to recalculate the field in accordance with the old summary field definition.
With around a half a dozen calculated fields, the updates took about 2 seconds, which is too slow, but fast enough for our needs.

Direct Link to Blogger Article

No comments:
If you need to link to a particular article in Blogger, surf to the blog in FireFox, right click, select “Web Developer” (this assumes you have it installed), “Information”, and “View Link Info”. There, you will be able to see all the direct links on the page.

Friday, November 25, 2005

ActiveSync - "Combine or Replace" Dialog

Just had a case (after a power outage) where we got a strange dialog from the Desktop PC running active sync:

The following information type on your mobile device has items that have not been syncronized with this computer before. "combine or replace" information type: files

Combine the items on my device with the items on this computer.
Replace the items on my device with the items on this computer.
Do not syncronize this information type at this time

Not really sure what happened, but it appears as if the file that coordinates the sync got messed up. Best article I read on it was at, reproduced here in case the link eventually disappears:

ActiveSync - "Combine or Replace" Dialog
By Raj Pillai, Copyright 2003-2004
Version 1.24 Revised 5/11/2004

Click to Visit Pocket PC Talk


Every Pocket PC user encounters the Combine or Replace dialog box as shown below at some point of time although the Information Type might differ. The information below tries to explain why this dialog box is prompted and the scenario's when this dialog box can appear.

Why Does This Dialog Appear?

When you connect your Pocket PC for synchronization purpose ActiveSync compares the data on the Desktop and the device using something called as "store identifiers" along with time-stamps to determine if the information type has changed. If the identifiers do not match, then it tries to re-establish the mapping between the Desktop and the Pocket PC by displaying the above dialog box.

What Do The Options Indicate?

The "Information Type:" will list the type of information that ActiveSync has not mapped. The three options are self explanatory.


The 1st option will simply combine all the information (Pocket PC + Computer) on both the devices.

The 2nd option will copy all the information from the Computer to the Pocket PC. It will replace all the information stored on the Pocket PC.

The 3rd option does not synchronize the listed information types.

There is no option which will replace the data on your computer with the Pocket PC data. The closest way of doing it would be to use the 1st option and combine the data.

Why Did The Dialog Appear?

Lets take a look at the scenarios where this dialog box will appear:


When you synchronize your Pocket PC with data for the first time.

When you delete a partnership on the Desktop without deleting the information on the device, and then reconnects the device to create a new partnership.

When you try to synchronize with a different Outlook profile for the first time.

When you move the location of the default Outlook ".pst" file after establishing a partnership.

When you synchronize with two computers and perform a replace operation on one computer, and then synchronizes the device with a second computer.

When you synchronize after restoring the Pocket PC data from a backup file.

When you delete the repl.dat file, which stores the partnership information. This file can be found in the ActiveSync Profiles directory. The default path in Windows XP would be:

C:\Documents and Settings\<>>\Application Data\Microsoft\ActiveSync\Profiles\<<>>

The Combine or Replace Dialog Appears Every Time I Synchronize:

If you are synchronizing with only "one computer" and this dialog appears everytime you synchronize, then you might need to recreate the partnership. Due to some kind of corruption the store identifiers might getting affected at every synchronization and therefore are not able to map themselves correctly.

To delete a partnership:

1. Disconnect the Pocket PC from the computer.
2. In ActiveSync -> File -> Delete Partnership. Select whether you want to delete your synchronization folder as well.
3. Connect the device and follow the onscreen instructions to setup a new partnership.

If you are synchronizing with "two computers" and the dialog appears on a regular basis, then it appears that for some reason, the store identifiers for the selected information types is getting affected when you synchronize with the second desktop PC and therefore the first computer is unable to match the identifiers when it compares and pops up the Combine or Replace dialog.

Although the Combine option creates duplicates, as far as I know ActiveSync version 3.7.1 checks for duplicate entries as well and prompts you whether you would like to remove or keep them. But in some scenarios it is unable to identify the duplicates since the identifiers are different. If you have a lot of duplicate entries, then I recommend you use the free Outlook Duplicate Remover utility, written by Fr. Simon Rundell. It is available for download at the following site:

You could verify if the problem is caused due to synchronization with a secondary PC by first synchronizing with either of your computer and then before synchronizing with the second computer, create a new Contact/ Appointment on your device and another set on your Desktop (all having different name or else a conflict will occur) and see if you are displayed the dialog. In this scenario the information will get updated automatically on both the devices without the C/R dialog since the store identifiers have not been affected.

In such a scenario, delete both the partnerships on the computer and form a new partnership. You could try the following approach:

Before you leave work, synchronize your Pocket PC and after synchronization is successful delete the partnership. Go to your home PC. Delete the partnership on the home PC as well before connecting. Now connect and then create a new partnership and you might be prompted with the Combine or Replace dialog once select combine since you want the data on your Pocket PC to reflect on your home computer as well. Once this is done, repeat the steps to create a new partnership on your work PC.

This information should help you understand the possible causes and how you could go about solving the recurring Combine or Replace dialog that appears whenever you try to synchronize with your computer.

Thursday, November 10, 2005

Getting CVS Commit emails from ModWest

No comments:
- Download CVS spam from
- Upload the file to your CVS folder
- With the shell, decompress the tarball with tar -zxvf cvsspam???.tar.gz
- Rename the resulting folder "cvsspam"
- cd /cvs/CVSROOT
- chmod 777 commitinfo
- vi commitinfo, and add the line
ALL /usr/bin/ruby /cvs/cvsspam/record_lastdir.rb
- save the change
- chmod 444 commitinfo
- chmod 777 loginfo
- vi loginfo, and add the line
ALL /usr/bin/ruby /cvs/cvsspam/collect_diffs.rb --to %{sVv}
- save the loginfo
- chmod 444 loginfo
- make the directory /cvs/cvsspam/
- mv /cvs/cvsspam/cvsspam.conf /cvs/cvsspam
- ModWest's sendmail does not accept the -io option (see used by cvsspam. Remove the option from /cvs/cvsspam/cvsspam.rb
- To add more people to the send list, check the /cvs/cvsspam/cvsspam.conf file

Monday, November 07, 2005

phpMyAdmin Direct Link

While searching for something faster than phpMyAdmin for my daily MySQL work, I found a documented trick for going directly to a specific db /table.

If your usual phpMyAdmin URL is e.g., and you want to go directly to table "hours", you would type If you want to go to the table "bob" in "hours", then

Now, anyone have any suggestions for free, fast alternatives to phpMyAdmin for working with local DBs in Windows?

Thursday, October 20, 2005

Blocking JShop while making changes

No comments:
When you want to work on a web site, you can DISABLE JShop for the outside world but ENABLE it for yourself and your tests by doing this:
- Create an .htaccess file on the top level of the JShop folder with the below lines (if an .htaccess file already exists, simply add these lines at the beginning).

ErrorDocument 403
deny from all
allow from {yourIPnumber}

Make sure points to an HTML file on a DIFFERENT web site (since you're denying from the installed JShop site) which shows some "we're working on the site" text.

Friday, October 07, 2005

BU JShop via Script

Drop the following code in a PHP file, upload it to the top level of a JShop running on Linux, and execute it via the browser. It will create a tarball including the JShop files and MySQL data for downloading:

//Code to BU a JShop in place - all shop files and MySQL data
//Drop this file into the top level of a JShop installation on Linux and call
//it via the web
//This file itself will be deleted at the end as a security measure
//The names of the backup file to download will be output to your browser
echo "

Script to BU a JShop in place


//Let the script run as long as necessary

//Get the info about the DB, file system, etc.
include ("static/config.php");
global $jssShopFileSystem, $jssStoreWebDirHTTP, $databaseUsername,
$databasePassword, $databaseName, $databaseHost;

//Some variables
$date = date ("Ymd");
$name = str_replace("\\", "", str_replace("/", "", str_replace("http://",
"", $jssStoreWebDirHTTP)));
$siteTarball = "{$jssShopFileSystem}{$date}{$name}.tar.gz";
$sqlDumpName = "{$jssShopFileSystem}{$date}{$name}.sql";
$thisScriptFile = $jssShopFileSystem.substr($_SERVER['PHP_SELF'], 1);

//Do a MySQL dump
// "Q" option quotes the column names - very important in case you have a column name that
// is also a keyword
// "n" Do NOT add a "create DB" command - since a lot of our clients have the same name
// for the JSS DB, we don't want to import this on our local setup and overwrite existing
// data
// "no-create-info" do not create the tables. This is done with the first mysqldump. We do
// the creation separate from the dumping so that the tables that we don't want the data
// for (big, unneeded tables for local development) still have their tables created.
// "--add-locks" Surround each table dump with LOCK TABLES and UNLOCK TABLES statements.
// This results in faster inserts when the dump file is reloaded.

// "--create-options" - Include all MySQL-specific table options in the CREATE TABLE statements.
// Cristóbal - In some sites not works!!!

// "K" - For each table, surround the INSERT statements with
// /*!40000 ALTER TABLE tbl_name DISABLE KEYS */; and
// /*!40000 ALTER TABLE tbl_name ENABLE KEYS */; statements.
// This makes loading the dump file faster because the indexes are created after all rows
// are inserted. This option is effective for MyISAM tables only.
// "e" Extended Insert: Use multiple-row INSERT syntax that include several VALUES lists. This
// results in a smaller dump file and speeds up inserts when the file is reloaded.
// "l" Lock all tables before starting the dump. The tables are locked with READ LOCAL to allow
// concurrent inserts in the case of MyISAM tables. For transactional tables such as InnoDB and
// BDB, --single-transaction is a much better option, because it does not need to lock the tables
// at all.
// "q" Quick: This option is useful for dumping large tables. It forces mysqldump to retrieve
// rows for a table from the server a row at a time rather than retrieving the entire row set
// and buffering it in memory before writing it out.

// "--set-charset" Add SET NAMES default_character_set to the output. This option is enabled by
// default. To suppress the SET NAMES statement, use --skip-set-charset.
// Cristóbal - In some sites not works!!!

// "u" is user name, -p is password (no space between the command and the password - see docs), and
// "h" is host.

//runCmd ("mysqldump -Q -n --add-locks --create-options -K -e -l -q --set-charset -u $databaseUsername -p$databasePassword -h "."$databaseHost $databaseName > $sqlDumpName");
runCmd ("mysqldump -d -Q -n --add-locks -K -e -l -q -u $databaseUsername -p$databasePassword -h "."$databaseHost $databaseName > $sqlDumpName");
runCmd ("mysqldump -Q -n --no-create-info --add-locks -K -e -l -q -u $databaseUsername -p$databasePassword -h "."$databaseHost $databaseName --ignore-table=$databaseName.jss_logs --ignore-table=$databaseName.jss_carts --ignore-table=$databaseName.jss_carts_contents --ignore-table=$databaseName.jss_logs --ignore-table=$databaseName.amex_clickthroughs >> $sqlDumpName");
//runCmd ("mysqldump -Q -n --add-locks -K -e -l -q -u $databaseUsername -p$databasePassword -h "."$databaseHost $databaseName > $sqlDumpName");
//Make a tarball of the site files, including the sql dump, excluding the tarball itself
runCmd ("tar czvpf $siteTarball $sqlDumpName");
//Remove the MySQL dump
runCmd ("rm $sqlDumpName");
//Remove this script for security reasons
runCmd ("rm $thisScriptFile");

echo "
echo "

You can now download '$siteTarball', which includes the MySQL dump:

echo "

To save space, be sure to delete the file ".
"from the server after downloading them!!


function runCmd ($cmd) {
echo "------------
echo "About to exec: $cmd
//info on how to get the output of a command comes from the comments on
exec("$cmd 2>&1", $output);
echo "Output is: ";
//Use print_r in case there are multiple lines in the output. Can happen
//if you e.g. add the "v" (verbose) argument to tar
echo "


Tuesday, September 27, 2005

Using pub/priv key w/ Modwest

I was never able to get the instructions from to work. Here is the method I used to get things going...
NOTE: If you move to a new machine, and your old keys do not work, then simply follow the instructions below. Name of the public key file does not matter, since the CONTENTS of the file are the things that have to be added to the auth_keys files. Just make sure you don't overwrite the orginal contents of auth_keys, so you do not disturb existing users.

- download all putty tools from
- Unzip the contents into C:\bin (creating the folder if necessary)
- Create a C:\home folder
- Create a C:\home\.ssh folder. NOTE: You need to drop into the DOS command shell to create a folder starting with a period. (C:\> md C:\home\.ssh)
- Create a system enviornment variable HOME set to C:\home
- add C:\bin to you PATH system enviornment variable
- Launch C:\bin\PUTTYGEN.EXE
- Create a SSH2 DSA key, 1023 bits
- Do NOT add a passphrase
- Save the private key to C:\home\.ssh, giving it the name of the user account on the server where you're connecting (e.g. C:\home\.ssh\ctello2.ppk)
- Save the public key to C:\home\Public Keys\
- Open C:\home\Public Keys\, and modify it as follows...
* Remove the first two lines and the last line - leave only raw "goblygook" data
* Remove all the line feeds
* Add "ssh-dss " (Without quotes - NOTICE THE SPACE!!!) BEFORE the "goblygook" data
* Add " dsa-key-20050627" (Without quotes - NOTICE THE SPACE!!! - adjust the date) AFTER the "goblygook" data
- Now login to the remote system here and make sure in your home directory there is a subdirectory named: /.ssh (include the period '.' before the 'ssh'). You may need to create this directory. To see the file, you will need to type: ls -al
The .ssh directory should be chmod 700, which looks like this in the first column of a detailed file listing: -rwx------
If those are not the permissions on the .ssh dir, then set them by typing: chmod 700 .ssh
- If there are "/.ssh/authorized_keys" and "/.ssh/authorized_keys2" files, then just copy the contents of your "C:\home\Public Keys\" file to BOTH "/.ssh/authorized_keys" and "/.ssh/authorized_keys2".
- If the files do not exist, copy your "authorized_keys" file 2x to the server, naming one "/.ssh/authorized_keys2" and the other "/.ssh/authorized_keys". Once the files are uploaded to the remote system, chmod 600 the two files (e.g. chmod 600 /.ssh/authorized_keys), which looks like this in the first column of a detailed file listing: -rw-------
- Run Putty
- Create a new connection with IP "", port 22, SSH
- Run C:\bin\PAGEANT.EXE - it will show up as an icon in the system tray
- Right click on the icon and select "add key"
- Select your private key (e.g. C:\home\.ssh\ctello2.ppk)
- Connect to the server - you should NOT be asked for the password
- Try using CVS - you should NOT be asked for a password

Checkout from CVS to web folder

No comments:
- CVS kind of forces us to check out to /htdocs/{projectname}/index.php instead of /htdocs/www/index.php. There might be a way around this (I'm sure there is), but we did not find it.
To work around that, we remove the symbolic link at Modwest that send everything to www, and put in a symbolic link pointing to {projectname}, so that takes index.php from /htdocs/{projectname}/index.php. The commands we used to do this, using the {projectname} of e.g. myproj, were...
rm -f _
ln -s myproj _

- the cvs checkout command needs the -d option to specify where the CVSROOT dir is

- the cvs command needs to have the current directory set to the directory where checkout should occur.

- We wanted to force the checkout by calling a URL, therefore our first attempt was to write a PHP script like this...
passthru ("cd /htdocs");
passthru ("cvs -d /cvs myproj");
...and put this in the /htdocs/myproj directory and call it via This failed, however, since the cvs command always used the php script directory instead of the directory specified in the cd command. Therefore, we wrote a shell script, checkoutCmd, and call the script.
passthru ("./checkoutCmd");

- To make the checkoutCmd script, we did the following...
cd /htdocs/myproj
vi checkoutCmd
...and the script you create with vi is...
cd /htdocs
cvs -d /cvs myproj the file, and do...
chmod 755 checkoutCmd
...and run it as follows...

Checkout to the web serve folder can now be done via

Saturday, September 10, 2005

New Machine Install

No comments:
Some of this software can be found on \\SERVER2003\Permanent\Software Depot
  • Araxis Merge (Software Depot - use serial number NOT reserved for Ed)
  • Allnetic time tracker
  • VS.NET 2003 (all options)
  • Visual Assist (\\server2003\Permanent\Software Depot\Utils\Visual Assist) - see the read me.
  • EasyPHP ( set up the files to be servered from a folder called "CVSData" in your "My Documents" folder.
  • TortoiseCVS (
  • Office (the version that you DON'T have to register)
  • 7Zip ( Winzip is also fine, but 7zip needed for shared Linux stuff
  • FileMaker Developer (Ed has CD)
  • Seagull FTP (look in internet)
  • WinSCP
  • Zend client & server (IMPORTANT!!! EasyPHP first. trial version to start)
  • Dreamweaver (trial version to start)
  • Putty and associated tools. See
  • Install “Send To Tools” from If it’s not available there, there’s a version on \\server2003\Permanent\Software Depot\Utils
  • Cropper (screen dump utility)
  • UltraVNC
  • K-FTP (needed to build AmexImportExport) on Software Depot / utils / K-FTP
  • MySQL Connector/Net (formerly ByteFX - C# ADO.NET for MySQL)
  • Create a "FileMaker" DNS for ODBC (from the control panel). See FileMaker help for details. Increase max size setting to 1024.
  • Set up an FTP server for IIS. Also, make sure that the IIS server, if running, is NOT on Port 80 (80 needed for EasyPHP).
  • "Install" the 24U Simple Dialog plug in by following the instructions at \\server2003\Permanent\Software Depot\Plug-ins\24U Simple Dialog FM Plugin\readme.txt

Tuesday, August 23, 2005

PocketPC Sync Folder

No comments:
After doing a hard reset on the PocketPC, it can be difficult to get ActiveSync to use the SAME sharing name that was used before when creating a new Partnership. Here are some things that can help:
- Make sure you rename the old folder (e.g. {FOLDERNAME}BU) before the "create a new partnership" dialog comes up
- Delete the old partnership (since the desktop will recognize it as a new machine)
- To control the name of the folder, you have to control the name of the PocketPC. This can be set ON THE POCKET PC in settings / system / devide / about / DeviceID / Device Name
- Check the values in RegEdit of My Computer\HKEY_CURRENT_USER\Software\Microsoft\Windows CE Services\Partners
- Check the profiles which are stored in the folder specified by My Computer\HKEY_CURRENT_USER\Software\Microsoft\Windows CE Services\Partners\xxx\DataFolder

Wednesday, July 20, 2005

Inconsistent jss_combinations data

No comments:
"Bug" report sent to JShop on this date:

Client XXX uses attribute combinations to set the product code (i.e. code A1000 Black size 12 becomes A1000BLAC12). When they run out of a size, what they do is go into the admin area, go to "Extra Fields", "Size", and delete e.g. 12. However, the A1000BLAC12 stays in jss_combinations, and the e.g. extrafield1 now points to an extra field value which no longer exists.

In a perfect world, you could protect the data integrity by disallowing the deletion of an extra field if there are combinations (or other places) that refer to that extra field. Of course, there is always the point of view that the user would never understand what you were telling them if you STOPPED the action ;-<

Wednesday, July 06, 2005

Script Finding Empty Dates in FM

No comments:
- go to a layout where the field is available
- Insert Calculated Result [Select, "DateFieldName", "="]

Symbol Stuff

No comments:
- C# form size: 246x320
- Turn control box off on the form, otherwise closing with the "x" in the upper right will not allow Symbol to release all components, forcing a soft reboot between debugging sessions.

Monday, April 25, 2005

Apache Crashing

No comments:
I had a problem with Apache crashing on WinXP (using EasyPHP 1.7). It turns out that the "mail" function, if called without a message (i.e. passing an empty string as the message) crashes. I'm not sure if this is an apache problem, an IIS problem, or whatever - but it's a good thing to rememeber.

Thursday, April 14, 2005

CVS On Modwest

No comments:
ModWest documents CVS setup here. That works fine. They also tell you how to authenticate via public/private keypairs
here, but I was not able (so far) to get that to work.

No worries: I was able to use the latest TortoiseCVS to do a checkin, getting a lot of extra messsages and having to type my password a few times - nothing backbreaking for the current time. Settings are:

Wednesday, April 13, 2005

Simple Tar

No comments:
tarball on Linux
Create: tar cvzpf /tmp/destination.tar.gz /home/source
- using the mv command, put the tarball in the folder where you want the new file or folder created (i.e. if you tarballed /home/source, and you now want a "source" folder in tmp, put the tarball on the top level of /tmp)
- tar -zxvf tarball.tar.gz

tarball on Windows

Create: use 7-zip. First create the tar file, and then gzip the result.

Monday, March 28, 2005

HTML/CSS: Eliminating Extra IE Form Space

No comments:
Using forms in IE adds spacing, which is normally not desired. To eliminate this, use the CSS "margin" style, like this:
<form name="bob" style="margin-bottom:0;margin-top:0" method="POST" action="whatever">

Sunday, March 20, 2005

FxCop on the Compact Framework

No comments:
To check the PocketPC barcode scanning applications I just wrote, I downloaded FxCop.

The first issue reported, the missing strong name, I addressed with the help of this article (actually, there are a lot of articles - but this one got me started quick). Also I needed to move the generated files into the same directory as my executables.

Some FxCop rules are not applicable in the compact framework. This article has more info, as does searching the related forums.

ToString generates a SpecifyIFormatProvider FxCop error. A good discussion of why can be found here. Quick solution: use ToString(CultureInfo.CurrentCulture) for things that users will see, and ToString(CultureInfo.InvariantCulture) for things that the need to be parsed by the computer in a cultural independent way.

Ha! After inventing Hungarian notation, Microsoft now has a rule against it! Since they don't provide justification for this change, and it seems like more of a style thing, I added my "hungies" to the FxCop "custom dictionary" - see their docs for details. This allows me to keep the GENERAL rule (no misspellings in the name) without having to stop using Hungarian notation.

Friday, February 25, 2005

EasyPHP Solution

No comments:
To run extensions from easyphp, you need to move all the dlls from the C:\PROGRA~1\EASYPH~2\php directory to the windows\system32 directory. You MAY also need to copy the files from C:\PROGRA~1\EASYPH~2\php\extensions to the same place. Symptom: starting EasyPHP says that the extension could not be found.

Of course, changing your path variable MAY also solve the problem, but I didn't try that.