Two Assasinations

In 1975 John Fahey released an LP including the track “The Assassination of Stefan Grossman”:

Stefan Grossman responded in the only way possible, with the assassination of John Fahey:

Why John Fahey chose to assassinate Stefan Grossman in the first place, nobody knows, not even Stefan Grossman.

Posted in Bach | Tagged , , | Leave a comment

More powers of 3

Following the discovery of a question to which the answer is 42, the same team has now reported a sum of three cubes equal to 3.  As before, the result can be checked from Excel, linking to mpmath, via pyxll.

In the first example each of the three cubes is evaluated, and the resulting strings are concatenated into a single string function that is evaluated:

The mp-Eval function also allows values to be assigned to symbols, which can then be evaluated.  In this example the letters a to d are replaced with the values in the cells to the right, and substituted into the function in cell A41:

Using the same approach, a rather simpler solution to the problem can be found:

Further discussion of the background to this problem can be found at The Math Less Travelled, which has links to on-line calculators to solve the problem summing to 42, and it is also pointed out that that the formula can be evaluated directly in Python:

Also worth a read is the Wikipedia article on the sum of three cubes, which contains further examples and numerous links.

Posted in Computing - general, Excel, Link to Python, Maths, Newton, PyXLL | Tagged , , , , , | Leave a comment

Restoring sound on an HP computer.

Yesterday the sound on my HP Omen computer stopped working for no apparent reason.  I found the video below, which fixed the problem:

The video is short, easy to follow, and doesn’t need the sound working to understand it!

The procedure on my machine was pretty much as shown in the video except:

  1. The Device Manager was not listed when I clicked on the Windows Icon. Just start typing “Device Manager” and it appears.
  2. The Sound driver listed for my machine was “Realtek(R) Audio”
  3. I had to restart the computer after re-installing the driver.

 

Posted in Computing - general | Tagged , , , | Leave a comment

A problem with integers in VBA

A recent question at Quora asked: “Why am I getting an overflow error in Excel VBA when doing a simple arithmetic calculation like str1 = 24*60*30 where str1 is a variant or long or double?”

I hadn’t encountered that problem before, but a quick check confirmed that it does raise an error, whatever the data type of str1 (including Integer).

There is a detailed answer to this question at:
https://stackoverflow.com/questi…
In short, the problem is that the result data type defaults to the largest type of the values being operated on, so if they are all integers the result is an integer, and since the largest value for an integer is 32767 you get an overflow.

Alternatives ways to avoid the problem include:

  • Add a decimal point to at least one number, converting it to a double.
  • Convert at least one value to a Long: str1 = CLng(24) * 60 * 30
  • Declare at least one value as a Long constant:
    Const HrPerDay As Long = 24
    str1 = HrPerDay * 60 * 30

The variable used to receive the result of the calculation must of course also be at least a Long, since a value greater than 32767 cannot be assigned to an integer.

It might be expected that a similar problem would arise if one value was converted to a double, so that the result of the calculation was a double, and this was assigned to a Long, but in this case the data type is automatically converted by VBA to suit the variable receiving the value.

Posted in Excel, UDFs, VBA | Tagged , , , | Leave a comment

Indexing pdf files, yet again

Recent versions of Windows have provided indexing of file contents that allows for fast searches over the entire contents of your hard disk.  This includes pdf files, but the default filter file only works with 32 bit Windows.  It is  simple process to fix this problem by downloading an updated filter file.  for full details see:

Indexing pdf content

The indexing process takes time, but once completed it is updated in the background with no noticeable effect on performance.

Once indexing is complete, the Windows File Explorer provides very fast searches of all indexed folders, and fast preview of selected files:

Posted in Computing - general | Tagged , , , , , | Leave a comment