Showing results for March 2014 - Page 3 of 3 - The Old New Thing

Mar 10, 2014
0
0

Programmatically uploading a file to an FTP site

Raymond Chen
Raymond Chen

Today's Little Program uploads a file to an FTP site in binary mode with the assistance of the Wininet library. This program has sat in my bag of tools for years. The program accepts five command line arguments: site (no "ftp://" in front) userid password path for the file to upload location to place the uploaded file For example, I might s...

Code
Mar 7, 2014
0
0

Converting from a UTC-based SYSTEMTIME directly to a local-time-based SYSTEMTIME

Raymond Chen
Raymond Chen

Last year, I presented this commutative diagram A 2-by-2 grid of boxes. The top row is labeled FILE­TIME; the bottom row is labeled SYSTEM­TIME. The first column is labeled UTC; the second column is labeled Local. The upper left box is labeled Get­System­Time­As­File­Time. There is an outgoing arrow to th...

CodeTime
Mar 3, 2014
0
0

What two-year-olds think about when they are placed in time-out

Raymond Chen
Raymond Chen

My niece (two years old at the time) was put in the corner as punishment for some sort of misdeed. At the expiration of her punishment, her grandfather returned and asked her, "你乖唔乖?" (Are you going to be nice?) She cheerfully replied, "仲未乖!" (Still naughty!) In an unrelated incident, one of my ho...

Non-Computer
Mar 3, 2014
0
0

Adventures in automation: Dismissing all message boxes from a particular application but only if they say that the operation succeeded

Raymond Chen
Raymond Chen

Suppose you have a program that is part of your workflow, and it has the annoying habit of showing a message box when it is finished. You want to automate this workflow, and part of that automation is dismissing the message box. Let's start by writing the annoying program: This annoying program pretends to do work for a little while, and then...

Code