Apple Stuff For Sale

I am finally clearing out some of my older Apple stuff. I’d prefer to know they are going to a good home, so if you are interested in anything, please use the contact me page. I’d be happy to take the items down and deliver them to you for the prices specified below.

NOTE: All of these items are LIKE NEW!!! All original packaging.

iPad Air 2
64GB Wifi, 9.7in – Silver
Here is the eBay listing.
$350

iPad Air
32GB Wifi, 9.7in – Space Gray
Here is the eBay listing.
$225

Apple Watch Sport (1st generation)
42mm Space Gray Aluminum case
Black sport band
Here is the eBay listing.
$200

Fitbit (and other optical/LED-based devices’) HR Accuracy

Reposted here from Facebook for reference:

Not sure how many out there are Fitbiters but I believe this applies equally to all wrist/LED-based HR monitors (e.g. Apple Watch, Garmin devices, and other trackers). My own anecdotal testing corroborates this study as does DC Rainmaker’s review of the Garmin 235, i.e. they are good at low intensity but get less accurate as intensity increases.

NB: The study referenced was commissioned by the plaintiffs in a class action lawsuit agains Fitbit, so bias is a strong possibility. The descriptive language could be more neutral but it’s hard to deny the data.

NYT Article
Just How Accurate Are Fitbits? The Jury Is Out

Study
Validation of the Fitbit® SurgeTM and Charge HRTM Fitness Trackers

DC Rainmaker Review of Garmin 235 (HR Accuracy)
Garmin Forerunner 230 & 235 In-Depth Review

Setting a UIButton’s Image in Swift

yourButton.ImageView?.image is a READ-ONLY property!!!
yourButton.ImageView?.image is a READ-ONLY property!!!
yourButton.ImageView?.image is a READ-ONLY property!!!
yourButton.ImageView?.image is a READ-ONLY property!!!
yourButton.ImageView?.image is a READ-ONLY property!!!

yourButton.setImage(UIImage(named: “name_of_image”), forState: UIControlState.Normal)

OpenMP Clang in Xcode

I’ve been playing around with prime numbers recently, which (naturally?) extended into an investigation into parallel programming. I installed the latest version of GCC 5 (v5.3.0 at the time of writing) using these instructions and got OpenMP running (support is built-in). I’m fine with using Terminal but I thought it would be interesting to try this in Xcode.

I installed the OpenMP C/C++ language extensions for Clang using homebrew with instructions from here. Unfortunately, I received the following error:

can't exec '/usr/local/bin/clang++-omp' (No such file or directory)

It turns out those instructions were missing a symlink that needs to be created. It’s as follows:

sudo ln -s /usr/local/bin/clang-omp++ /usr/local/bin/clang++-omp

Thanks to Stack Overflow for the “full” instructions. I can now build and run C++ parallelized code directly inside Xcode. I am finding a performance difference running the same code via the Terminal vs inside Xcode (which is slower). Hmm…

NBA Playoff Bracket 2016

I just realized I forgot to post this. It’s not pretty, in that it doesn’t look nice. It was done through OfficePoolManager. I couldn’t find an online tool that allowed you to pick your teams like they have for March Madness and the NHL playoffs.NBA Playoff Bracket 2016

UITextView Padding

If you align a UITextView with another element, particularly a UILabel, using Auto Layout you will notice the text in the UITextView is slightly indented. The UITextView is actually implemented inside an NSTextContainer which has some padding around it. To remove this (left/right) padding, set the following property of the UITextView to zero:

textView.textContainer.lineFragmentPadding = 0