Set Windows 10 to release Caps Lock by pressing the shift key

1.  Press the Windows key on the keyboard and click on the gear
wheel icon to bring up “Settings”.

2.  Click on “Time & Language”.

3  Click on “Date, time & regional formatting”  (on the right).

4.  Click on “Language” on the left sidebar.

5.  Click on “Spelling, typing & keyboard settings”  (on the right).

6 .  Scroll to the bottom and click on “Advanced keyboard settings”.

7.  Click on “language bar options”.

8.  Click on the “Advanced Key Settings” tab.

9.  Fill in the “Press the SHIFT key” circle.


How to use VLC Mobile to transfer videos from a computer to an iPad

I'm writing this post because the procedure to transfer videos to VLC
for Mobile does not seem to be very well documented on the internet.

There are several ways to transfer videos from a computer to an iPad, 
but the VLC for Mobile iPad app has several advantages.

1) The rate of speaking can be slowed down or speeded without changing
the pitch of the speakers voices.

2) The frequency spectrum of the sound can be adjusted.  You can raise or
lower the treble or the bass.

3) The location within the video you are watching can be advanced or set
back, so you can easily replay a scene or skip over parts of the video.

Follow the steps below to use VLC for Mobile to transfer videos
to your iPad.

1) From the App Store on your iPad, download "VLC for Mobile" (it's free).

2) On your computer, bring up iTunes.

3) With a USB cable, connect your computer to your iPad.

4) In the iTunes window, after about 30 seconds, under the "Account" tab 
a small light grey image of an iPad will appear.  Click on that image.

5) In the iTunes window, under the listing for your iPad, under "Settings" 
at the end of the list, click on "File Sharing".

6) Then, to the right under "Apps", click on the VLC image.

7) Now, on the right you will see "VLC Documents".  Click on the
"Add File…" button at the bottom right.

8) Select the video on your computer that you want to transfer and
include its accompanying subtitle (.srt) file if it exists.  Click on the "Open" 
button in the iTunes window.  The file will then be added to VLC for Mobile
on your iPad.


Vitamins for the Mind – Solutions

The 4:00 Meeting – Solution

Let Tt be time it takes Tom to walk half the distance between their
original places.

Let Tb be time it takes Bill to walk half the distance between their
original places.

A) Bill leaves at 4:00 – 3Tb.
     Tom arrives 11 minutes later. That’s 4:00 -3Tb +11.
     Tom walks back to the center: 4:00 -3Tb +11 + Tt.
     At which time it’s 4:00: 4:00 -3Tb +11 + Tt = 4:00.
     The 4 o’clock’s cancel:

                                                  Tt -3Tb + 11 = 0.

B) Similarly,                           Tb -3Tt + 15 = 0.

C) Solving, we get Tt = 7 minutes, and Tb = 6 minutes.
     So Tom leaves at 3:39 and Bill leaves at 3:42.



Alice Forgets Her Purse – Solution

Let Ve be the rate of the down-moving escalator in steps per second.
Let Va be the rate of Alice in steps per second as she goes down the escalator.
Let L be the number of steps on the surface of the escalator.

A) Alice takes 50 steps going down and 125 steps going up, so because her rate
     going up is five times as fast, the ratio of her down and up times is

50     125         50    25          50     Va         2
—- / ——   =   –/ —-   =   –— x —-   =   —-
Va     5Va         Va    Va         Va     25         1        

So if Alice takes 50 steps going down, she takes 25 steps going up.

B) As Alice goes down, 50Va steps disappear go over the bottom, so the
     difference, L – 50Va, must be 50 because she arrived at the bottom in 50 steps.

     We have L – 50Va = 50,  so:
                                                            50Va = L – 50.

As Alice goes up, 25Va steps come over the top, so the sum, L + 25Va, must be
125 because she arrived at the top in 125 steps. We have L + 25Va = 125, so:

                                                            25Va = 125 – L.

C) Dividing the equations in A) and B), we have:

50Va             2         L – 50
———-   =   —-    = ———   
25Va             1        125 – L

Solving:   250 – 2L = L – 50;    L = 300;    and, finally,

                                      L = 100 steps on the surface of the escalator.

How to copy videos and live video streams from the internet

How to copy videos, live video streams, or live news reports
(like from CNN) to your Windows computer

by Bob Day

September 15, 2018

1. What you will need:
   a) The VideoCacheView app from NirSoft.  Here's a link:
        Near the bottom of the page, there's a link to
        download the app.

   b) Another useful app is MediaInfo, which is able to
        determine the format of a video file.
        A link to it is:

   c) Another app is the VideoSolo Free Video Converter, which
        can convert FLV format video files to MP4 format video files.  
        Here's a link:

2. Copying a video using the Firefox browser:
   a) Play the entire video or live video stream until the end.  
        Then close the browser.

   b) Run VideoCacheView.exe, and locate your video.  You can  
        recognize it by the browser you used (in this case Firefox),
        the very recent date and time, and probably its large file
        size.  Also, note the format under "Content Type".  

   c) Make a copy of the file on your computer desktop and change
        its file name to an appropriate name.  (If you want to post
        it on YouTube, give it a very unique name so you will be
        able to find it easily.  (Note: YouTube allows you to slow
        down the speaking rate of speaker without changing the pitch
        of his or her voice — a very nice feature.))

   d) If the file's Content Type is MP4, add the extension ".mp4"
        to the filename and you're done.  If the Content Type is
        MP2T, the file is an flv format file.  In that case, add the
        extension ".flv" to the filename and run the VideoSolo app
        to convert the file to the MP4 format.  (Also see Appendix 2,

   e) Post the video on YouTube if you'd like.

Appendix 1
   The default size of Firefox's cache buffer for temporary files
   is 50 MB (megabytes) The cache is where Firefox stores all of
   its temporary files, including video files.  If you want to
   copy videos that are longer than, say, 10 minutes, you'll
   need to increase the size of the cache (so the cache will have
   plenty of room for all the files it needs to temporarily store).  
   Here's how to do it with the Firefox browser:
   a) Enter "about:config" (without the quotes) into the address
        bar (where "http://" URLs go).  

   b) After you "accept the risk", Firefox's internal settings will
        be displayed, and starting at the top left will be a search
        window.  Enter "browser.cache.disk" (without the quotes) into
        the search window and press Enter.

   c) Then right click on "browser.cache.disk.capacity" and click on
        "Modify" and enter the value you wish.  The units are in
         kilobytes (KB).  So, for example, 50000 is fifty megabytes (MB).

   d) On the next line, if necessary, modify the value of
        "browser.cache.disk.enable" to "true".  Exit the window and
        you're done.  

Appendix 2
Often a video will be composed of a sequence of several MP2T (flv)
files, and to get the complete video, this sequence of MP2T fles must
be strung together, from earliest to latest.  To do this, first
download and install the Avidemux app.  Here's a link to the download:

Then, do the following steps:
   a) Use Video Cache View to find the video you want.  Then copy the
        MP2T files in the sequence to a folder you've created (They'll be
        very close together in time, spaced just a few seconds apart.).  
        Rename the files with names that indicate their order in time,
        and tack onto each the extension ".flv".

   b) Bring up the Avidemux app, and drag the files in the folder, in
        time sequence, into the area next to the column of option
        selections on the left. (Note: the first file will create an
        image in this area — just copy the succeeding files onto the
        top of the image.)  Make sure that a little window saying
        "Checking if timestamp…" pops up when you drag an MP2T file
        onto the area.  If it doesn't, the file hasn't actually been
        copied.  In that case, drag the file again.

   c) Under "Output Format", select the option "MP4 Muxer".  Then click
        on the save icon (looks like a floppy disk) in the toolbar at the
        top of the window.  Give the file a name and click on "Save".  
        The output MP4 file will be saved in the folder you created for
        the MP2T files.  Exit Avidemux and you're done.


App to convert raw data to 23andMe format

        App to convert raw data to 23andMe format

On the internet I found other apps that claim to convert Ancestry raw data to
23andMe format, but the ones I found have flaws.  Among others, none of them
handled the PAR1 and PAR2 regions of the X and Y chromosomes correctly. 
Depending on what SNPs one counts as being in PAR1 and PAR2, most of them
are heterozygotic or homozygotic.   In the app I wrote, I used the limits that

23andMe uses to define the heterozygotic or homozygotic ranges.

Here's how to use the app:

1. Down load the Ancestry to file. 
    Heres a link to it:

2. Unpack the Zip file into a folder.  

3. Copy your AncestryDNA.txt file into the same folder.  
   Make sure it is called AncestryDNA.txt.  

4. Double click on the Ancestry to 23andMe.exe file to run
   the program.  The program creates a file named
   "23andMe format file.txt" in the same folder.

5. Done!

Landline phone conversation recorder for Windows 10

Phone Recorder is an application for Windows 10
that allows you to join and record an ongoing telephone
conversation.  It runs under either 64-bit or 32-bit Windows.  
Phone Recorder doesn't have much of a user interface — just
two buttons: "Start recording/Stop recording" and "Exit".  
When you click on "Start recording", Phone Recorder will join
an ongoing phone conversation on the same line as that of the
modem, and the button label will change to "Stop recording".  
The conversation is stored as a .wav file in the same folder
as the Phone Recorder executable (.exe) file.  To run Phone
Recorder, you need to have a dial-up modem that has voice
capability installed on your computer.  Phone Recorder uses
only the voice feature of the modem — there's no need to
"dial-up" anywhere.  Be sure to tell the other party or
parties on the line that you are recording the conversation
if it is legally required to do so.

Here's a link to the Phone Recorder app kit:

Easy to Build 40 Hz Gamma Wave Flashing LED Lamp

According to an artcle in the December 8, 2016 issue of the journal Nature, an
LED light that fashes at 40 Hz, which is the frequency of Gamma wave in the
brain, may alleviate the symptoms of Alzheimer's disease. Also, a 40 Hz
fashing LED light is said to be an aid to meditaton.

In this artcle, I will describe an easy way to build a 40 Hz fashing LED foor
lamp. About all you need to know is a litle bit about electricity that you probably
learned as a kid, and a litle bit about household wiring, such as how to replace
an electrical outlet in the wall of your home.

The parts you will need
1. A DROK LCD Display Square Wave Generator,

Price on Amazon: $11.20.

2. A DC solid state relay,
Digi-Key part number CC1126-ND. Price on Digi-Key: $20.20.

3. A 12 volt DC power supply, such as this one on Amazon:

Price on Amazon: $13.99.

4. Two 12 volt LED light bulbs, such as this one on Amazon:
Price on Amazon: $15.98.

5. Dual light bulb socket, such as this on Amazon:
Price on Amazon: 6.99.

6. Two to six foot extension cord. Available at a local hardware store.

7. Twist-on wire connectors, such as these on Amazon:
Price on Amazon: $2.07.

8. A standard foor lamp.

9. #22 gauge hook-up wire, such as this on Amazon:
Price on Amazon: $18.95.

10. Soldering iron and solder. Soldering the connectons to the DROK Square Wave Generator is preferable but not absolutely nessesary. If you don’t solder the connectons, strip about V/8ths of an inch of insulaton of the ends of hook-up wires and loop them through the connectng holes in the DROK in twist-tie fashion, and twist tghtly.

Putting it together
1. Connect the negatve wire from the power supply to “VIN –” (the negatve input) on the DROK square wave generator.
VIN -” is internally connected to GND on the output terminal screw #1 (the positve output) on the solid state relay.

2. Cut the extension cord at a convenient length, measured from its socket end.

3. Connect terminal screw #4 (the negatve input) on the solid state relay both to the Neutral (wide slot) side of the extension cord socket AND to GND on the output side of the output side of the DROK square wave generator.

4. Connect the positve wire from the power supply both to “VIN +” (the positve input) on the DROK square wave generator AND to terminal screw #1 (the positve output) on the solid state relay.

5. Connect terminal screw #2 (the positve input) on the solid state relay to PWM on the output side of the DROK square wave generator.

6. Connect terminal screw #2 (the negatve output) on the solid state relay to the HOT (narrow slot) side of the extension cord socket.

7. Turn the foor lamp off, unplug it, and screw the dual light bulb socket into its socket. Screw in the two 12 volt LED light bulbs.

8. Read the instructons that came with the DROK square wave generator.

9. Plug the power supply into the wall and set the DROK to 40Hz and the duty cycle to 50%.

10. Plug the lamp into the socket of the extension cord.

11. Turn the foor lamp on and it should now be fashing at 40 Hz! If you like, you can experiment with other frequencies and duty cycles.

Linear Regression: Least Squares Fit of a Straight Line to a Set of Points. Includes a Proof that the Total Variance can be Divided into Component Parts, and also Includes a Derivation of the Correlation Coefficient, Explaining its Meaning

We want to fit a straight line of the form:

(Eq. 1) or, alternatively,

(Eq. 2) to a set of data points.

Using the least squares method, we want to minimize the function:

(Eq. 3).

Taking partial derivatives and setting them to zero, we get:

(Eq. 4).

(Eq. 5).

Solving these equations, we get:

(Eq. 6), and

(Eq. 7),

or, (Eq. 8). 

In the following, we will assume that the number of points, n, in our data set is
quite large, say, >= 100. 
So to calculate variances we will simply divide sums
by n (rather than n-1 or n-2 to take into account degrees of freedom). 
Consequently, the variances we will calculate are only close approximations.

Using the values of a and b that we calculated above to minimize the F function,
we have:

(Eq. 9),

where is the part of the total variance, that is left unexplained by the regression. 

The other part of the total variance is variance explained by the regression,
The explained and unexplained variances should add up to the total variance, i.e., that

(Eq. 10), and we will now prove that. 

Equation 10 can also be written as:


We start the proof with:


Squaring both sides and summing, we get:


So the theorem is true if: 

Or equivalently if:

(Eq. 11).

            (A)                       (B)

From Equation 4, since we are using the optimum values for a and b, we know that:

, and, substituting for , that means that

is zero. So (B) above is true. 
From equation 5, we know that . Substituting , we get:

Simplifying, we get: ,



. Since (B) , above, is zero, that means that (D) is zero,

           (C)                            (D)


which in turn means that (C) is zero. And (C) is the same as (A), so (A) is zero. 
Then, because (A) and (B) are both zero, equation 11 is zero. This proves
equation 10, that:

, i.e., that the total variance can be separated into two
non-overlapping components, the variance explained and the variance
unexplained by the regression, that added together are equal to the total variance.

Now we will look at the relationship between the total variance and the unexplained variance and define a correlation coefficient, r.

Squaring equation 1, , we get: .

Summing over n yields: , which means that


Substituting for in Equation 10, we have

, or

A standard equation for the variance of a sample is:

And since, from equation 6,
, then


, or

The rightmost term on the right hand side of this equation is the square of the correlation coefficient, r.

So, (Eq. 12). 

From equation 10, we know that , or .

Substituting into equation 12, . 


In words, is the ratio of the variance explained by the regression of Y on X to the total variance. This, in my opinion provides a better definition of the correlation coefficient than its usual definition as .



Cow Grazing in a Circular Pasture Problem: Solution by Calculus

"A cow is attached by a rope to a point on the perimeter 
of a circular field. How long should the rope be in terms 
of the radius of the field so that the cow can graze in 
exactly half of the field?"

This problem has been around in one form or another 
for a long time.  You can find many solutions to it 
on on the internet.  But all of the solutions I've seen 
are geometric solutions, using plane geometry.  They 
all chop up the pasture into various shapes and add up 
the area of each one.

I have found a solution using calculus that I think is 
a lot simpler and more elegant.  This solution defines 
a differential of area that is centered around the point 
on the perimeter of the pasture where one end of the 
rope is tied.  Then it integrates from the origin (zero) 
until the rope is long enough to allow the cow to graze 
on half the area of the circular pasture.  
Here's the derivation:

Let R be the radius of the cow pasture.
Let r be the length of the rope.
Let Θ be the angle between a line from the point where 
the rope is tied on the perimeter of the pasture to the 
center of the pasture, and a line of length r from where
the rope is tied on the perimeter to the edge of the 
pasture.  See diagram: 


1. BC is a circular arc of radius r centered at point A.  
   The length L of BC is 2Θr.
2. Cos(Θ) = AB/AD = r/(2R), so Θ = cos-1(r/(2R)).
   (Note: Angle ABD is a right angle because it intercepts
   a 180 degree arc.)
3. So L = 2Θr = 2r * cos-1(r/(2R)).
4. Consequently, one form of a differential of area of
   the pasture is dArea = 2r * cos-1(r/(2R))dr.

We want to integrate this differential along AD starting 
at point A until r is long enough so that half the area
of the pasture is enclosed, so we need to solve for x:

Wolfram’s online integrator,, easily solves 
the integral portion of this equation if you substitute K for R 
in the integral.  Then you can let R = 1 and use WolframAlpha to 
solve for the ratio of r to R that will result in half of the 
area of the pasture.  The answer, to 4 decimal places is 
r = R * 1.1587

About Butterscotch and How to Make Butterscotch Flavor Powder

About Butterscotch
      My sources for this are many Google searches about butterscotch on the internet.
First, there is no such thing as “true butterscotch”.  The many recipes I found have various
ratios of sugar to butter, and there is a variation in the ingredients.  So there is only
“version A” of butterscotch, “version B”, “version C” and so on.  The commonality
among most of them is that they contain sugar, butter, salt, and molasses.  The sugar
can be light brown sugar, dark brown sugar, or just plain sugar.  If it’s just plain sugar,
molasses is added to the recipe; otherwise, molasses is optional.  If molasses is added
it can be plain molasses or, occasionally, blackstrap molasses.  The sugar to butter
ratio varies greatly — anywhere from 4:3 to 16:1 by weight, I’ve read.

The sugar, butter, salt, and molasses are mixed together and cooked until the temperature
is raised to anywhere between 245 degrees F to 310 degrees F. 

One question I asked myself is why, if molasses is just mostly caramelized sugar (as many
sources on the internet say), why, if it’s added separately, is it always cooked along with the
other ingredients and not added later?  After further research on the internet, I found the
answer: Molasses is NOT caramelized sugar!  Why?  To refine sugar, sugar cane is boiled in
a vacuum at 160 degrees F.  160 degrees F is well below the caramelization temperature of
sugar, which begins at about 320 degrees F.  Also at 160 degrees F the Maillard reaction
(which I’ll get to shortly) is very slow, so molasses has undergone very little Maillard reaction.

Caramelization is not important for butterscotch because butterscotch is not caramelized, but
the Maillard reaction is very important since it is what develops the butterscotch flavor.  The
Maillard reaction takes place at an optimal rate between 270 and 310 degrees F.  To avoid

caramelization from occurring, among all but one of the recipes  I’ve seen for butterscotch,
the maximum cooking temperature is 300 degrees F.

How to Make Butterscotch Flavor Powder
      I like the flavor of butterscotch a lot, and after some experimenting, I figured out how to
make a butterscotch flavor powder that I could add to other things, such as yogurt.  The
following recipe is based on recipes for butterscotch I’ve found on the internet, plus a
couple of my own ideas, which seem to be original.

60 grams      dark brown sugar

30 grams      unsalted butter
1/8 tsp          salt (not sea salt)

1 1/2 Tbsp    blackstrap molasses (optional, to make the flavor “extra butterscotchy”)
2 tsp             water (approximately)

Mix the ingredients together in a pan, adding just enough water to wet down the
other ingredients, set a stovetop burner in the medium heat range, and, stirring
constantly, cook slowly until the temperature of the mixture is a carefully measured
300 to 310 degrees F.  Cooking slowly is important for giving the Maillard reaction time
to take place. (The Maillard reaction is what develops the butterscotch flavor.)  For
measuring the temperature, I use an infrared surface temperature thermometer.
There are many brands of these infrared thermometers on Amazon.

When the mixture is cooked, pour it immediately (not letting it harden) onto a flat
surface that has been covered with a sheet of parchment paper, and let the mixture
cool for, say, 20 minutes, until it is rock solid.  Then crack it up with your food-gloved
hands, transfer it to a blade type coffee grinder, and grind it into a fine powder.  This
may require several “transfer-grind” operations.  Store the powder in a refrigerator,
and use it as desired.  When using the powder, also add some vanilla flavor or extract.

Serving size 1 Tbsp.  Makes about 7 servings.