Installing an HP Wireless Printer on Linux Mint


, , , ,

I recently purchased an HP M127fw printer/scanner, largely because of its rumored excellent support for Linux. Indeed, installing and getting it working was super easy – but only once I stumbled onto the right method. (First I read page after page about the HPLIP printing system and possible necessary plugins, and saw many different sets of (relatively) complicated instructions for installation, each one a beautiful and unique snowflake.)

But here’s all you have to do: run hp-setup, preferably as root:

sudo hp-setup

aaaaand that’s pretty much it. If you have Linux Mint 17 (and I’m sure many other distros, but this is what I can verify), then you already have hp-setup installed on your system. If not, you’ll have to use your package manager to get it. I’ve included screenshots below so you can see what to expect.

sudo hp-setupHP Device Manager - Setup (Step 1 of 3)

Above was the only moment of confusion. I can’t tell you the difference between the middle two options, but the selected option gave me what I wanted: the printer is now a device on my wireless network.

HP Device Manager - Setup (Step 2 of 3)

HP Device Manager - Enter Username/Password

This annoyance is because I didn’t run it with sudo. :-/ Learn from my mistakes!

HP Device Manager - Plugin Installer (Step 1 of 2) HP Device Manager - Setup (Step 3 of 3)

Above is how this window appeared initially. The only changes I made were to the printer name and test page checkbox:

HP Device Manager - Setup (Step 3 of 3)

Below you can see some of the options the driver provides. Scanning works, as well (although my Mac got much better results from the ADF).

Print Dialogue Print Dialogue

Move Presets from Media Encoder CC 2013 to 2014


, , , , , ,

If you’ve installed Adobe Media Encoder CC 2014 and want to get your custom presets from 2013, it’s actually pretty easy. Do this:

  • Find your 2013 Presets directory. Mine was in /Users/jmatthewturner/Library/Preferences/Adobe/Common/AME/7.0/Presets
  • In Media Encoder 2014, in the Preset Browser panel (top right by default), click the Import Preset button.Import Preset Button
  • Navigate to your 2013 Preset directory, highlight all your presets, and click Import.

That’s it! You can use them immediately without even restarting.

8 Stories Tall, 1 Football Field Wide



This is only a test.

Tuesday night Clear Channel will light up its newest digital billboard in Times Square – 8 stories tall, running the entire length of the block between 45th and 46th streets.

“Nearly 24 million LED pixels, each containing tiny red, blue and green lights, make up the display, giving it higher resolution than even the best of today’s top-of-the-line television sets.”

Times Square’s Biggest and Most Expensive Digital Billboard Is Set to Shine

Google has an exclusive contract as the billboard’s first advertiser through the end of the year.

Project Euler #6: Sum Square Difference


, , ,


The sum of the squares of the first ten natural numbers is,
12 + 22 + ... + 102 = 385
The square of the sum of the first ten natural numbers is,
(1 + 2 + ... + 10)2 = 552 = 3025
Hence the difference between the sum of the squares of the first ten natural numbers and the square of the sum is 3025 − 385 = 2640.
Find the difference between the sum of the squares of the first one hundred natural numbers and the square of the sum.

C++ SolutionI’m just going to say it: I really don’t get why this one is even here. It has to be the easiest of all the first six problems. I usually feel like each ProjectEuler problem is cleverly designed to teach some new concept or syntax, or reveal a flaw in earlier code – but I don’t see it with this one.

Anyhoo, I used just a single loop, in which I summed all the squares, and also kept track of the sum. After that, I just squared the sum, subtracted, and there you are.

Project Euler #6 Solution

C++ Output


C++ code:

#include <iostream>

using namespace std;

int main()
    long sumOfSquares = 0;
    long sum = 0;
    long squareOfSums = 0;

    for (int i = 1; i < 101; i++){sumOfSquares += i*i; sum += i;}
    squareOfSums = sum*sum;
    cout << endl << "The difference between the sum of the squares and the square of the sums of the first 100 natural numbers is: " << abs(squareOfSums-sumOfSquares) << "." << endl;
    return 0;


import math

sumOfSquares = 0
sumz = 0
squareOfSumz = 0

for i in range(1, 101):
    sumOfSquares += i*i
    sumz += i

print "The difference between the sum of the squares and the square of the sums of the first 100 natural numbers is: " + str(abs(sumOfSquares-(sumz*sumz))) + "."

Premiere Pro Audio Synching Pitfall on Large Files


, , , , ,

"Could not synchronize one or more clips in the current selection because a match could not be found."

So impatient!

Just a quick tip: if you’re seeing the error message “Audio synchronization failure – Could not synchronize one or more clips in the current selection because a match could not be found” when trying to create a multicam clip synched via audio tracks on large files (inhale) – make sure you’ve waited long enough for the audio to conform.

This threw me off today after importing two hour-long clips that I needed to use for a multicam clip. When I checked each clip, Cam A was fine, but Cam B had no audio. Since I was using a rented camera for Cam B, I assumed something might have gone wrong with the on-board mic (Cam A had the real mics), before remembering to check if the audio had been conformed yet.

Since audio takes so long to conform in Premiere Pro, I had already googled the problem and read three different dead-ends before I opened the clip again and discovered the audio magically appeared.

Conforming Audio

Conforming Audio

An easy mistake to make, so I just thought I’d post this for anyone else impatiently googling that error and not finding the answer. Check the bottom right of your screen to see if it’s still conforming!

It Never Hurts to Ask (or How I Quintupled My Internet Speed with 1 Phone Call)


, , , results: 107.45Mb/sTime Warner Cable Internet subscribers, gather ’round.

I recently called TWC to downgrade my service. I was paying $75/mo for 20Mbps service – what they call their Turbo service – and I felt that was too much. ($75 is what happens after you exhaust the special 12 month rate, and include all the taxes, fees and modem rental charges.)

The best the rep could offer me was a savings of $10/mo to drop down to 15Mbps. BUT, she said, if I preferred, they could keep me at the same rate while upgrading my modem to a newer model that would increase my speed to 50Mbps, effectively giving me the Ultimate service for no extra charge. After a series questions designed to reveal any fine print or asterisk that she wasn’t mentioning (I found none), I agreed.

TWC's Advertised Internet-only Rates

TWC’s Advertised Internet-only Rates

When the new modem arrived, I was a little annoyed to discover that it was much larger than my current one and had a built-in wireless router. (I have a Linksys E3000 with DD-WRT firmware – I had no interest in replacing my router.) But now the only thing to do was test.

And the results? I started at 20Mbps, was promised 50Mbps – and tested at over 100Mbps. Seriously. My internet speed quintupled, at no additional charge, just because I told them I wanted to downgrade.

I tested the whole setup 6 ways from Sunday, and here’s what I got:

  • Hardwired into the modem: ~100Mbps
  • Connected to the built-in 5GHz wireless via 802.11n: ~100Mbps
  • Connected to the built-in 2.4GHz wireless via 802.11n: ~80Mbps
  • Connected to my DD-WRT 5GHz wireless via 802.11n: ~50Mbps 😦
  • Connected to the built-in 2.4GHz wireless via 802.11g: ~20Mbps

The TWC rep mentioned this offer had something to with them wanting to get everyone in my area on upgraded equipment, so this could be just a regional thing. But if you’re a TWC subscriber in the NYC metro area, you may want to make a quick phone call.

Project Euler #5: Smallest Multiple


, , , ,


2520 is the smallest number that can be divided by each of the numbers from 1 to 10 without any remainder.

What is the smallest positive number that is evenly divisible by all of the numbers from 1 to 20?

Image of C++ CodePretty straightforward: a nested loop that checks for divisibility inside another loop that counts up by 20 until the answer is found. Just a couple things I’ll say about this:

  • In constructing the inner loop, I counted down from 20 (instead of up from 1) because I figure fewer numbers are divisible by 20 and 19 than by 1 and 2. This way the first false condition is found sooner than later, and no time is wasted.
  • Further, every integer from 1 to 10 divides evenly into some integer from 11 to 20. Therefore it’s not necessary to check 1-10; 11-20 is enough.
  • I constructed my loop using a boolean flag, isDivisble, that is reset every time we increase the outer loop by 20. The flag allows me to break out of the inner loop as soon as I find a number that is not divisible, so no time is wasted.
  • Although my compiler allows me to use an int and still come up with the correct answer, the C++ standard only requires an int to hold 16 bits, or ~65,000 unique values (positive and negative). Since the answer is greater than 65,000/2, an int on some compilers may not produce the correct answer. A long is guaranteed to hold at least 32 bits, or over 4 billion unique values, so I used a long in my solution just as a best practice. With only that change, it takes twice as long to run. Efficiency is priority #1, people!
Project Euler #5 Solution

Project Euler #5 C++ Solution

C++ Code:

#include <iostream>

using namespace std;

bool isDivisible;

int main()
    for (long i = 2520; ; i += 20){
        isDivisible = true;
        for (int j = 20; j > 10; j--){
            if (!(i%j == 0)){isDivisible = false; break;}
        if (isDivisible){cout << endl << "The smallest number evenly divisible by all integers between 1 and 20 is: " << i << "." << endl << endl; break;}
    return 0;

Python won’t allow an indefinite range in a for loop, so I had to rewrite it to use a while loop. Same basic structure, though:

i = 2520

while True:
    isDivisible = True;
    for j in range(20, 10, -1):
        if i%j is not 0:
            isDivisible = False
    if isDivisible:
        print ""
        print "The smallest number that is evenly divisible by all integers between 1 and 20 is " + str(i) + "."
        i += 20