Sign in
Calvin Hsia's WebLog
thoughts from a professional developer
Translate This Page
Translate this page
Powered by
Microsoft® Translator
Options
Email Blog Author
RSS for posts
Atom
RSS for comments
OK
Search
Tags
64bit
C++
CSharp
Debugging
FunGames
History
LINQ
Memory
Mesh
Miscellaneous
Pictures
Programming
SmartPhone
Testing
VB
Vista
Visual FoxPro
Visual Studio
Web
Windows API
WPF
Archive
Archives
May 2013
(1)
April 2013
(2)
March 2013
(1)
February 2013
(1)
January 2013
(1)
December 2012
(1)
November 2012
(1)
October 2012
(1)
September 2012
(1)
August 2012
(1)
July 2012
(1)
June 2012
(1)
May 2012
(2)
March 2012
(1)
February 2012
(1)
January 2012
(1)
December 2011
(1)
November 2011
(1)
October 2011
(1)
September 2011
(1)
August 2011
(1)
July 2011
(1)
June 2011
(1)
May 2011
(1)
April 2011
(1)
March 2011
(1)
February 2011
(1)
January 2011
(1)
December 2010
(2)
November 2010
(1)
October 2010
(1)
September 2010
(1)
August 2010
(1)
July 2010
(1)
June 2010
(1)
May 2010
(1)
April 2010
(1)
March 2010
(2)
February 2010
(1)
January 2010
(1)
December 2009
(1)
November 2009
(1)
October 2009
(1)
September 2009
(1)
August 2009
(1)
July 2009
(1)
June 2009
(1)
May 2009
(1)
April 2009
(1)
March 2009
(2)
February 2009
(1)
January 2009
(2)
December 2008
(1)
November 2008
(1)
October 2008
(1)
September 2008
(1)
August 2008
(1)
July 2008
(3)
June 2008
(2)
May 2008
(2)
April 2008
(2)
March 2008
(2)
February 2008
(2)
January 2008
(2)
December 2007
(3)
November 2007
(8)
October 2007
(6)
September 2007
(4)
August 2007
(9)
July 2007
(2)
June 2007
(2)
May 2007
(11)
April 2007
(5)
March 2007
(2)
February 2007
(2)
January 2007
(1)
December 2006
(2)
November 2006
(1)
October 2006
(4)
September 2006
(6)
August 2006
(10)
July 2006
(13)
June 2006
(11)
May 2006
(7)
April 2006
(8)
March 2006
(14)
February 2006
(5)
January 2006
(21)
December 2005
(9)
November 2005
(19)
October 2005
(20)
September 2005
(12)
August 2005
(23)
July 2005
(12)
June 2005
(8)
May 2005
(7)
April 2005
(4)
March 2005
(1)
February 2005
(2)
January 2005
(13)
December 2004
(9)
November 2004
(4)
October 2004
(10)
September 2004
(4)
August 2004
(8)
July 2004
(1)
June 2004
(10)
Posts
Subscribe via RSS
Sort by:
Most Recent
|
Most Views
|
Most Comments
Excerpt View
|
Full Post View
Calvin Hsia's WebLog
Strongly typed methods and properties
Posted
over 8 years ago
by
CalvinH
12
Comments
VFP allows you to generate COM servers using the OLEPUBLIC keyword. These objects can have custom properties. For example, a Customer object can have an Address property of type string. Other client applications (VFP, Excel, VB.Net, VB Script) can...
Calvin Hsia's WebLog
The Fast Fourier Transform
Posted
over 8 years ago
by
CalvinH
8
Comments
A long time ago in college, I learned a lot about signal processing. A microphone produces a signal, and a speaker processes that signal back into sound. Why is CD quality sound sampled at 44 Khz ? Because human hearing ranges from 20-20 Khz and the Nyquist...
Calvin Hsia's WebLog
Binding to Internet Explorer Instances
Posted
over 8 years ago
by
CalvinH
7
Comments
A customer wanted to run code whenever a user started Internet Explorer. A possible solution is to use a timer to check the Running Object Table periodically: ox= CREATEOBJECT ("monitor") ox. show DEFINE CLASS monitor as Form AllowOutput...
Calvin Hsia's WebLog
Quiz: String performance optimization
Posted
over 8 years ago
by
CalvinH
7
Comments
This code takes .03 seconds to run on my computer Try running it on yours. ns= SECONDS () x="" FOR i = 1 TO 30000 x=x+"OneTwoThree" ENDFOR ? SECONDS ()-ns ? LEN (x) Modified slightly, it takes 15 seconds. That's 500 times...
Calvin Hsia's WebLog
How to filter out unwanted sounds via Fourier Transform
Posted
over 8 years ago
by
CalvinH
6
Comments
In this post about The Fast Fourier Transform , I described how simple it was to create a filter to remove unwanted sound from a WAV file. In order to do that, I needed some code to read and write a WAV file. Then I used the FFT to convert to the frequency...
Calvin Hsia's WebLog
GetLastError: how does it work with DECLARE DLL ?
Posted
over 8 years ago
by
CalvinH
6
Comments
Many Windows APIs can fail for various reasons. For example FormatMessage indicates failure by returning 0. (see GetLastError is a number. What does it mean? ) To get further information about the failure, call the GetLastErrror API, which queries the...
Calvin Hsia's WebLog
Get the available paper bins from a printer
Posted
over 8 years ago
by
CalvinH
5
Comments
Sometimes you might want to find out how many paper bins a printer has. (Thanks to Barbara P for original question, code.) lcPrinterName = GETPRINTER () nPrinters= APRINTERS (laAvailPrinters) FOR i = 1 TO nPrinters IF UPPER (laAvailPrinters...
Calvin Hsia's WebLog
GetLastError is a number. What does it mean?
Posted
over 8 years ago
by
CalvinH
5
Comments
A customer asked I'm getting an error 12 back from a GetLastError call, and I've seen a number of sites that tell me I can figure out what that error is by sending it to SysErrorMessage. But nothing I've seen shows how to declare SysErrorMessage...
Calvin Hsia's WebLog
String Optimization. How does it work?
Posted
over 8 years ago
by
CalvinH
5
Comments
In this post: Quiz: String performance optimization , I showed some very similar code with drastically different performance. When VFP sees an assignment statement like this: var = <something> here’s what happens. The variable on the...
Calvin Hsia's WebLog
A difficult debugging scenario
Posted
over 8 years ago
by
CalvinH
2
Comments
A customer had a problem with printing. I don’t know all the details about the setup. Trevor had a repro scenario in his office in North Carolina, and I used Remote Desktop to access it. It was composed of 3 virtual machines. One was a Citrix domain controller...
Calvin Hsia's WebLog
Creating a quick report from any cursor
Posted
over 8 years ago
by
CalvinH
1
Comments
For probably more than a decade, Fox can create a “quick report” from any table or cursor. CREATE CURSOR TEST ( name c( 10 )) CREATE REPORT dummy FROM test This will create a default quick report that can be used for any purpose. It...
Calvin Hsia's WebLog
Getting parameters from inherited classes
Posted
over 8 years ago
by
CalvinH
0
Comments
Visual Foxpro allows you to create a class that inherits behavior from another class. This includes properties, events and methods. The base class could have a method like this: PROCEDURE FooBar LPARAMETERS strParm as string , nParm2 as Integer...
Page 1 of 1 (12 items)