Welcome to MSDN Blogs Sign in | Join | Help

January 2006 - Posts

Index creation performance issues

In this post: Index creation performance question I asked: Is it faster to fill a table with values, then index it or create the index on an empty table, then fill it? Why? After a record in a cursor is modified, any associated index must be updated.
Posted by Calvin_Hsia | 3 Comments
Filed under:

Find all statically linked libraries required before your process can start

There’s some code in this post What external code does your EXE depend on? that determines all the statically linked libraries and function calls of a particular EXE. VFP9.EXE links to about 18 modules. However, there are about 83 modules loaded when

Index creation performance question

Is it faster to fill a table with values, then index it or create the index on an empty table, then fill it? Why? Guess which one is faster before running the code below. (I attended a presentation by the MSN Search team a while ago where the architecture
Posted by Calvin_Hsia | 2 Comments
Filed under:

Why did we limit the command window history length?

In this post: You can hit enter anywhere on the line in the command window , I talked about the command window history. Daniel asked why the size of the history seems to have a limit of around 256K in VFP9, but no limit in VFP7 (or VFP8). It was limited
Posted by Calvin_Hsia | 2 Comments
Filed under:

What external code does your EXE depend on?

In the old days, when you wrote a program, you had full control over the CPU. The Instruction Pointer would always point to code that you wrote, and never anywhere else. That means if you wanted to do any kind of input/output, you had to write it yourself.

Is there a way in VFP to pass a DWORD to an API function from VFP?

A customer asked: Is there a way in VFP to pass a DWORD to an API function from VFP? The Beep API function used in Create your own typing tutor! uses DWORDs and is called via the DECLARE - DLL Command . A DWORD is just a 32 bit value. An integer in VFP
Posted by Calvin_Hsia | 10 Comments

Create your own typing tutor!

Here’s an idea to teach somebody the positions of the letters on the keyboard: letters fly in randomly from the right for 30 seconds. Hit the letter on the keyboard for points. Miss and lose points. As time goes on, the letters move faster and there are
Posted by Calvin_Hsia | 13 Comments
Filed under:

Change the default screen saver

After booting up Windows XP and before I’ve logged on, or when I connect via remote desktop to a machine, the machine’s screen saver settings for the Default User will determine what the screen saver is and how it is fired. However, after I log in, the
Posted by Calvin_Hsia | 0 Comments

Carburetor is a car part, but prosecutable is not

My wife and I like to listen to PuzzleMaster Will Shortz.on NPR. This week’s challenge is from one of my favorite puzzle makers Merl Reagle : Take the word carburetor, add two letters and rearrange the result to name another car part. And the answer is
Posted by Calvin_Hsia | 3 Comments
Filed under:

Digging through old code: Chess program

There is a lot of waiting for parents at a chess tournament (see Eliminating Fire Alarm sound at Chess Tournament Awards Ceremony ). I had my computer, and I was asked if I had a chess program on it. The answer is a little bit complicated: I wrote one
Posted by Calvin_Hsia | 2 Comments
Filed under:

Phone number and wife haven't changed in 11 years

There’s a sporting goods store that I’ve visited on occasion over the last 11 years. It’s a membership cooperative, which mails a percentage rebate check back to customers annually. I signed up as a member 11 years ago, which meant yet another card to
Posted by Calvin_Hsia | 10 Comments
Filed under: ,

A Discounter Introduces Reductions: Multiple Anagrams

Many moons ago, I was playing with spelling dictionaries (see What is an index anyway? ) and anagrams. After decoding a spelling dictionary for a word data base in the early 1980s, I wrote some word games, like scrabble and anagrams. APT, PAT, and TAP
Posted by Calvin_Hsia | 9 Comments
Filed under: ,

You can hit enter anywhere on the line in the command window

The Fox Command window maintains a history of prior commands. (A quick search of the source code logs shows I added this feature on June 19, 2000, then a quick look at my ShipIt Award (a little trophy/plaque from Microsoft which has stickers for each
Posted by Calvin_Hsia | 2 Comments
Filed under:

Remote Desktop and Offscreen Bitmaps

I read Raymond’s blog: Taxes: Remote Desktop Connection and painting , in which he describes offscreen bitmaps and why applications use them. My home web server sits on top of a bookcase and I never touch it, except for any maintenance. However, I use
Posted by Calvin_Hsia | 2 Comments

Detecting Workstation state changes

I read Raymond’s post about detecting workstation events: http://blogs.msdn.com/oldnewthing/archive/2006/01/04/509194.aspx To detect shell events, such as a new drive being added, see my blog: Run your code in response to a new drive being inserted To
Posted by Calvin_Hsia | 0 Comments

Create your own Word Search puzzles

I wrote a Word Search generating program in C++ (308 lines) years ago: my brother used it to generate a puzzle including all the girls in his 8 th grade class, which was 22 years ago: about 1984 (sounds Orwellian<g>). I wrote one in C# (456 lines)
Posted by Calvin_Hsia | 21 Comments
Filed under:

Grid Cell Alignment response

This post: Is this a bug in the Grid Cell alignment? discusses a grid cell alignment issue. When the grid is created and there is a cursor open in the current work area, a grid column will be created for each field in the cursor. The alignment for the
Posted by Calvin_Hsia | 0 Comments
Filed under:

Is this a bug in the Grid Cell alignment?

Run the code below. It creates a grid with 2 rows and 2 columns. Move your cursor between rows and you see “some data” bouncing around” Try it with the other IF condition to see the expected behavior. Is this a bug? PUBLIC oForm oForm= CREATEOBJECT ("MyForm")
Posted by Calvin_Hsia | 1 Comments
Filed under:

Publishing blog statistics horror story

I received an email from someone at Microsoft this morning about the availability of the Excel spreadsheet for internal Microsoft blogger December hit statistics. Last month I had written a program to show MS Bloggers hit statistics. So I ran the program
Posted by Calvin_Hsia | 3 Comments
Filed under: ,

Do you know this feature of the Document View Window?

Open a PRG file with several procedures, functions or methods in the VFP editor. Open the Document View window (Tools->Document View). Right click on the Document View window and select “Sort by Location” Activate the edit window and hit Ctrl-PgDn
Posted by Calvin_Hsia | 3 Comments
Filed under:

What's the difference between Vartype and Type

Happy New Year… I took some time off to spend with my family. To get the type of variable “MyVar”, you can use TYPE(“MyVar”) or VARTYPE(MyVar). Notice no quotes are used for VARTYPE. TYPE(cExp) scans and compiles the expression in the string parameter.
Posted by Calvin_Hsia | 8 Comments
Filed under:
 
Page view tracker