Setting the To value: cell in Excel’s Goal Seek to a Cell Reference

Sadly, it took awhile to “figure” this out. I was trying to solve a set of equations in Excel. I had one equation in one cell, say B1, that had a dependency on the value in A1. I had the second equation in cell C1 that also has a dependency on A1. I wanted to set cell B1 equal to CELL C1 by changing cell A1. You can’t do this with Excel’s Goal Seek feature, the To value: has to be a number.

The solution of course, was to create a third cell, D1, with the formula “= B1 – C1”. When those two cells are equal, as I wanted, D1 = 0. So now you can ask Goal Seek to solve the set of equations by setting cell D1 to value 0 by changing cell A1.

Yay!

pydotplus on macOS

I’ve been playing around with SciKit-Learn’s decision tree regression function. In one of the examples I was working on, they provided a demo script to print out a jpg of the decision tree. Cool! Unfortunately, my system didn’t have pydotplus installed. I’m using Anaconda, so issuing the following command took care of that issue:

conda install -c conda-forge pydotplus

However, when attempting to run again, this produced and error stating that the GraphViz executable could not be found. Ugh. Luckily, a quick trip to Homebrew took care of that issue:

brew install graphviz

Voila!

Move to Trash Deletes Immediately

I had this issue when I first updated to macOS Mojave. To solve it, I performed the following command in Terminal:

sudo rm -Ri ~/.Trash
[enter your password]

Then, Log out. Log back in. Move to Trash now works as expected.
Note: You can implement Delete Immediately… by holding down Option-Command-Delete.

NBA 2018 Bracket

Okay, the NBA bracket challenge has a horrible interface! As a reminder for future years, don’t use this! Go with ESPN or someone else. Having said that, here’s my NBA bracket. I think it shows my picks except for the Blazers, who got their asses swept by the Pelicans, so zero points there! Amazing that was the series with a sweep.

Go Warriors!

NHL 2018 Playoff Bracket

Here it is. Haven’t followed much hockey this year but going with the heart!

P.S. I do have a second bracket with Tampa Bay taking the east and the Preds winning it all but I’m not posting that one 🙂

Sending email with PHPMailer

It appears most of the examples out there relate to version 5.2. The current version is 6 and I had to make the following change in order to get it to work. Everything else from the examples worked.

Change:

$mail = new PHPMailer();

To:

$mail = new PHPMailer\PHPMailer\PHPMailer();

I’ll post (or edit this post) a full example shortly.

FTP on macOS High Sierra

As you may have noticed, FTP is no longer a part of macOS High Sierra. If you are in the Terminal, you’ll get something like this:

Norms-iMac-Pro:~ norm$ ftp
-bash: ftp: command not found

An Apple Forum’s post has this reasoning.

Fortunately, there is Homebrew to the rescue. As pointed out in that post, you can install the `inetutils`, which includes FTP. All you need to do is:

brew install inetutils

Unfortunately, for me, this resulted in a linking error, as the directory `/usr/local/share/man/man8` is not writeable. You can solve this by by issuing the following command:

sudo chown -R $(whoami) /usr/local/share/man/man8

Then run the link command again:

brew link inetutils

I hope this is helpful and happy FTPing!

Installing GCC-7.3.0 on macOS High Sierra

I talked about getting GCC-5.3.0 running in a previous post. As part of some benchmark testing I’m doing for a new computer build, which I hope to write about in a future post, I ventured back into the world of parallel programming. I used the excellent instructions from Solarian Programmer found here to get GCC-7.3.0 running on macOS High Sierra 10.13.3.

Strictly speaking, the link above points to instructions for compiling GCC-7.1.0. While it’s not a big deal to modify these instructions for 7.3.0, here’s a text document with just the command line instructions to get 7.3.0 up.

Note: I did have to make one small deviation from the instructions provided in the link (as noted in the text document attached). I tried to “make” GCC7.3.0 with “make -j 4” but it failed, stating it couldn’t fine “<ctime>”. I retried the make using “make -j 1”, which took a LONG time but worked. I would try 4 first and only if it doesn’t work, try 1.

My previous post also talked about getting OpenMP/Clang running in Xcode and the link provided there works. I did try the steps but couldn’t get it to work. Maybe I’ll try again later but for now, I’m using the command line to compile the OpenMP code.

Allowing different orientations by device (iPad vs iPhone)

I’ve been watching the Developing iOS 11 Apps with Swift podcast (yes, iTunes U content is now available as podcasts, which is cool because you can view them on your Mac) and playing around the Concentration app. This app really wants to be Portrait on an iPhone but Portrait or Landscape on an iPad, given the whole master/detail thing.

I searched for ways to do this and while apparently you can do this in code, this method is super simple. You can add another Custom iOS Target Property to your Info.plist under the Info tab of your project’s target, specifically for iPad. The main one is:

Supported interface orientations

The iPad specific one is:

Supported interface orientations (iPad)

Here’s a screen shot to show it in action.

Hope this helps!