Welcome to MSDN Blogs Sign in | Join | Help

Browse by Tags

All Tags » Programming   (RSS)

Examine .Net Memory Leaks

Writing programs using .Net is very productive. One reason is because much of memory management is “managed” for you. In C, C++ and other “native” languages, if you allocate memory, you’re responsible for freeing it. There were stopgap measures, like

Is this a Vista bug?

A customer reported a crash of a VFP application while running under the new version of Windows: Vista. The customer code attempted to automate the configuration of the web server (See Automating Web Site Administration Using IIS ). Specifically, there

Write your own hangman game

Many years ago (1985) I wrote a C program to play Hangman. I had decoded a word processor spelling dictionary for my word source. More recently, I have encoded 2 spelling dictionaries for general purpose use: 1 with 171201 words, the other with 53869.

Windows Security and how it affects running generated code

Here I described how VFP generates executable code and runs it for early and late binding COM clients and implementing COM interfaces. However, there is an important issue with generating and running executable code in the same process. A computer has

Do you know everything about Factorials?

When I was in 7 th grade at Amity Junior High School in Orange Connecticut , I gave a presentation on Factorial numbers. Here’s some interesting code: FOR i = 1 TO 80 ?i,Factorial(i), SQRT ( 2 * PI ()*i)*(i/ EXP ( 1 ))^i ENDFOR PROCEDURE Factorial(n)

What is taking up the space on your hard disk? TreeMap it!

Several years ago, I saw a presentation from Microsoft Research about online communication in communities . In particular, a group was studying online communities based on NewsGroup message traffic volume. One of the results was a graphical view of the
Posted by Calvin_Hsia | 20 Comments

Binding to Internet Explorer events: bug in Typelibrary

I was using the web browser control and getting some errors when binding to its events. This can be duplicated with the code below. To generate the event class, open the object browser (Tools->Object Browser) and select the Microsoft Web Browser Control.
Posted by Calvin_Hsia | 4 Comments
Filed under: ,

Third Party application does work as a COM+ application

A few months ago, I reported a problem that a customer was having with a particular 3 rd party product that seemed not to work with Visual FoxPro. It was a COM object that could be instantiated via CreateObject. I was quite surprised that Windows guru
Posted by Calvin_Hsia | 1 Comments
Filed under: ,

Very Old Program

I was doing some spring cleaning and came across a computer printout of a program I wrote in August 1974, or about 31 years ago! That brings back a lot of memories. Coincidentally, a couple coworkers were discussing the CaSing of computer languages. What

Floating Point calculations: comparing with zero

I was asked about floating point calculations. In particular, I can write code like this: x= 3.4 y= 10 Result=x*y ?Result,Result= 34 IF Result= 34 ?"This code will execute if result = 34" ENDIF *Output is 34.0 .T. If you add 3 zeros to x (change x to
Posted by Calvin_Hsia | 9 Comments
Filed under:

Calling the Windows APIs for Large Files

A customer was trying to use FoxPro to handle large files. The files that Fox handles natively (like tables, indexes) are limited to using 32 bit addressing, (2^32 = 4 gigs). Back in the old days (not that long ago), there were no hard disks > 2 gigs.

Relaxen und watchen das blinkenlights. What lights?

In the old days, computers had blinking lights. Indeed, old movies used to show computers working with blinking lights and tape reels moving back and forth. My school computer was a PDP-8/L with a whopping memory of 4K 12 bit words back in 1971. (Here’s
Posted by Calvin_Hsia | 12 Comments
Filed under: ,

Undocumented APIs and 16 bit DLLs

As a long time software company, Microsoft has certain procedures to follow when releasing software to the public. A change to the policy was instituted at Microsoft last year. A brand new tool would scan all released software to see if any “undocumented”

Heartbeat: Garbage collection in VFP and .NET are similar

VFP stores user defined names such as variable, field, property, class and procedure names in a table. When the name table runs out of space, the GC begins. All the entries are marked as unused. Then all the various name table clients are sent a message
Posted by Calvin_Hsia | 3 Comments

Permutations

I saw this post which shows some VFP code to permute a string. For example, there are 6 permutations of “abc”: abc, acb, bac, bca, cab, cba There are n! permutations of a string of length n. I dug up some old code that did the same thing in fewer lines.
Posted by Calvin_Hsia | 2 Comments
Filed under:
More Posts Next page »
 
Page view tracker