One problem, one weekend, eight languages
I have gotten quite complacent about using the same language for solving programming challenge problems such as those on HackerRank. I wanted to take a problem and write the solution in multiple languages to get a feel for them and see if there are any that I prefer to the one that I normally use (ignoring performance considerations for the time being).
How to retrive Outlook default signature
The Outlook signatures are stored in the %APPDATA%\Microsoft\Signatures\ folder in text, RTF and HTML formats.
In case of multiple signatures, the default can be found through Word automation. Tested in Outlook 2003 and later.
How to completely uninstall VFP 9.0
Uninstalling VFP 9.0 does not remove VFP settings stored in the registry or any files that have been added to installation after the fact.
To completely uninstall VFP 9.0
- Launch VFP and note directories returned by HOME() and HOME(7) functions
- Uninstall VFP
- Delete directories from step 1
- delete registry key HKEY_CURRENT_USER\Software\Microsoft\VisualFoxPro\9.0
Keep in mind that it will delete all previous VFP settings. You may want to make backup before doing that if you want to restore settings later.
Retrieving VFP runtime DLL name required by EXE or DLL
VFP stores in an EXE/DLL information about what runtime DLL is required to run it.
| This is sample code. Add error handling and adjust to your requirements as necessary. |
? VfpVersionFromExeOrDll("C:\Program Files\My Company\MyVfpApplication.exe") ? VfpVersionFromExeOrDll("X:\Somefolder\MyVfpDll.dll")
Send email via MSN email account
MSN SMTP server requires SSL connection on port 25.
Sample code below uses CDO 2000 class for sending emails
Send email via Yahoo mail account
Yahoo SMTP server requires SSL connection on port 465.
Sample code below uses CDO 2000 class for sending emails
Remove Structural CDX or Memo flag from a table
The VFP low level file functions (LLFF) can be used to open a table as a file and read/write its header. The Table Header Record Structure is documented in VFP help under Table File Structure.
Note 1 Removing Structural CDX flag will effectively disassociate CDX file from the table but not delete the CDX file.
Note 2 Removing Memo flag will allow to open a table and access all fields excluding memo fields. Attempt to access the memo fields will generate an error.
| This is sample code. Add error handling and adjust to your requirements as necessary. |
Deleting pages from PDF file through Acrobat automation
Detailed info on Acrobat automation can be found in Interapplication Communication API Reference from Acrobat 8.1 SDK or Acrobat 9.0 SDK at http://www.adobe.com/devnet/acrobat/?navID=downloads. Free registration may be required.
GDIPLUS.DLL security updates for VFP 8.0 and VFP 9.0
MS security bulletin Vulnerabilities in GDI+ Could Allow Remote Code Execution (957488) lists MS products affected including VFP 8.0 and VFP 9.0. It supersedes MS security bulletin MS08-052 - Vulnerabilities in GDI+ Could Allow Remote Code Execution (954593). I blogged about it at GDI+ security updates for VFP 8.0 and VFP 9.0
Powershell - Benchmark Command
Powershell comes with a cmdlet called "Measure-Command" that can execute a block of commands and measure how long it takes to run. It's analogous to the unix "time" command.
What if you want to run something a number of times and take the average?
Recent comments
2 weeks 1 day ago
2 weeks 6 days ago
3 weeks 2 days ago
6 weeks 2 days ago
7 weeks 1 day ago
7 weeks 3 days ago
12 weeks 2 hours ago
12 weeks 1 day ago
13 weeks 3 days ago
14 weeks 2 days ago