From 78505dcfd637f0071635522642d19163db8b344d Mon Sep 17 00:00:00 2001 From: June McEnroe Date: Thu, 14 Sep 2017 21:13:09 -0400 Subject: Count 5 letters as a word --- bin/typo.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/typo.c b/bin/typo.c index 934be50d..66b9e007 100644 --- a/bin/typo.c +++ b/bin/typo.c @@ -56,12 +56,12 @@ int main() { time_t start = time(NULL); if (start < 0) err(EX_OSERR, "time"); - int wordCount = 0; + int letterCount = 0; for (;;) { time_t now = time(NULL); if (now < 0) err(EX_OSERR, "time"); - double wpm = (double)wordCount / difftime(now, start) * 60; + double wpm = (double)letterCount / 5.0 / difftime(now, start) * 60.0; char *wpmDisplay; int len = asprintf(&wpmDisplay, "%.2f WPM ", wpm); @@ -79,7 +79,7 @@ int main() { for (size_t i = 0; i < targetsLen; ++i) { if (strcmp(word, targets[i])) continue; setTarget(i); - wordCount++; + letterCount += strlen(word); break; } } -- cgit 1.4.1 /src/refs/?id=55728948b94a17b99fabeb1c61d20c5ef18c7f73'>refs log tree commit diff
path: root/www/photo.causal.agency/2024-07-27/000025480012.txt (unfollow)
Commit message (Collapse)Author
2024-09-23Automatically select the last used lens for a bodyJune McEnroe
2024-09-19Add photos from September 5June McEnroe
Had to prefix the folder number onto these file names manually because they must have come out of a different scanner or something.
2024-09-15Add some more film stocks to the listJune McEnroe
2024-09-13Add photos from September 2June McEnroe
2024-09-13Add Fomapan 200 to films listJune McEnroe
2024-09-10Add August 29 picnic photosJune McEnroe
2024-09-08Apply some bold to trips renderingJune McEnroe
This seems easier to visually scan. The only other thing I'd like is a nicer date rendering but JavaScript is useless for that.
2024-09-08Render trips hopefully more efficientlyJune McEnroe
2024-09-08Allow removing bodies and lensesJune McEnroe
2024-09-08Limit body width so it looks less silly on desktopJune McEnroe
2024-09-07Handle no film being loadedJune McEnroe
2024-09-07Fancy up the text a littleJune McEnroe