Transformer Question

Step Up/Down Voltage Transformer Converter, 750 Watts

Here’s a question for everyone:  does a transformer use electricity if there is no load on it?  If so, how much?  The max or whatever it is drawing?  Here’s why I’m asking:

We have a 220v to 110v transformer (rated at 500w I think).  I have my xbox plugged into it because I can’t find a goofy aftermarket power supply for my xbox here in the UK (well, I found one, but it eventually started going bad and making electric noise that tanked my internet speed when it was on).  If my xbox is off–assuming no load on the transformer–is any electricity being consumed.  I don’t see how, but I don’t know too much about transformers either…..

Image from Karmor via flickr

Amazon Cloud Pictures

AmazonCloudPictures

Cyndi and I use flickr to host our pictures.  I think it is a great deal:  $25 for a whole year and unlimited pictures.  But there is no automatic way to get pictures from our Android phones onto flickr.  Google has built this functionality into their google + app.  Western Digital has an app that will upload pictures to certain types of their hard drives.  The flickr app doesn’t support it.  Google used to provide unlimited space for full size pictures if you had a plus account; however, they changed that and now only provide 5GB space free for full-size images (unlimited for 2048×2048 size images).

Yesterday, Amazon sent an email about their new Cloud Photos app.  They’ll give you 5GB free; however, it links in with their Amazon Cloud Storage.  About a year ago, we started paying Amazon $20/year to let us upload our MP3 collection to their Cloud Music Player app.  Think flickr but for music.  And, along with that, we also get 20GB cloud storage.  They’ve changed the program slightly since then…Current prices should be here.  We weren’t using but 10MB of the space for a small truecrypt volume holding our passwords and had loads of space.

So, from using it for 12 hours, the app will auto upload pictures to your Amazon Cloud Drive (both on and off wifi).  You can also choose pictures to upload.  When you look at your cloud drive, you get some organization; however, I’ve yet to try it with multiple devices.

At this point in time, I would certainly recommend the Cloud Music service.  If you have a subscription to that service that includes space you aren’t using, why not?

ARG Apple!

Today's latte, Jython.

Yesterday, CERT issued a warning about a vulnerability in Java 7.10.  No problem.  I do all of my surfing on a Mac using Chrome and Java won’t run plugins in Chrome (Chrome is 32bit only while Java is 64bit only).  The ONE thing I have to use Java and Safari for is to connect to a VPN.

I try this morning…it doesn’t work.  So I go looking.  It turns out that Apple thinks it has to babysit me.  They have disabled Java on OSX.  STUPID APPLE!  I don’t need you to babysit me.  I don’t need you to big brother my computer like this.  This means if something goes wrong at the office until this gets fixed, I have to go in.  It also means I can’t do any sort of remote work to help people.  I can’t do jack squat.

Oh, this also means people who live in places where the government “watches” the internet and they use a VPN so the government can’t “watch”…thanks Apple…you’ve really messed over a whole scad of people.

[Update 2013-01-14 09:48:06] Oracle has released Java 7.11.  I’m not sure if it resolves the bug/hole or not…but it re-enables Java in Safari.  Go to java.com for the new version.

Image from yukop via flickr

Google Webmaster Tools and Stats

stats

Before the most recent update of this website, I hadn’t done much more than simply look at generic vistor stats.  But in it, I got some weird errors in the webstats so I dug deeper.  I found I had this wierd random number (13 digits specifically) showing up as a 404 in my google stats.  After some research, I found information here, here, and here.

The gist is that there was a problem with Google playing nice with some javasript.  In my case, I think it must be disquis.  I’ve updated everything and marked it as fixed.  I’ll update this post if the problem returns.

Well, the problem hasn’t returned, however, I have a screenshot of my webmaster stats showing the problem (and the results of work on my end in my htaccess file).

20121230_WebmasterStats

[Update 2012-12-30 19:15:24] Added graph showing the problem.

Image from Sean MacEntee via flckr

More on .htaccess

Beat out the old, beat in the new...

I’ve spent I don’t know how long trying to unravel the–very very cool–mystery of htaccess and mod_rewrite on Apache.  I thought I had a rule that would take old-stype URLs on my site and rewrite them to a new style.  And I thought I had it working.  This led me to spend about 3 hours going through some trace logs fixing 404 errors.  Don’t ask me why I didn’t see it sooner, but most of the URLs I was messing with were internal.

After enough of that, I decided I had messed up a rule so I started looking some more.  Finally, I found this page that was very helpful.  Specifically, I learned what the difference was between $N and %N and how they worked.  %N in a .htaccess file gives you a condition matched by regex in a RewriteCond line.  The $N in a .htaccess file gives you access to the regex match in the first part of the RewriteRule line.

What do I mean?  Here is an example for us to look at:

RewriteCond %{QUERY_STRING} &foo=([0-9]+) [NC]
RewriteCond %{QUERY_STRING} !foo= [NC]
RewriteCond %{QUERY_STRING} !bar=([0-9]+) [NC]
RewriteRule .* http://XYZedDomain.com/%1? [R=permanent]

This will look in the query string and the first test will match &foo= followed by a number.  The [0-9] means match digits and the + means match one or more instances.  So, &foo= must be followed by 1 digit or more.  The [NC] means case doesn’t matter so FOO and Foo and fOO all match.

The second test makes sure we are not matching things like barfoo=.  The ! means we NOT whatever comes after.

The third test checks that the string does not contain bar= followed by digits.  I had some cases where my query string contained both foo=1234 and bar=0987.  I had to handle the bar=0987 part separately (and it overrulled the foo part of the string).

But what about the %1?  Well, the first test has a regex (the part within the () ).  Whatever that matches gets put into the % variables.  In my case, the first test has a wild match and the third test has a wild match.  so %1 contains whatever was matched after &id= (in my example above it would be 1234).  %2 would get the numbers from the third line (0987).  There is no % variable prduced on the second test because there is no regex matching.

Unfortunately, I still don’t understand too much about plain old RewriteRule.  You can do the same sort of regex matching there and use the matched part when you actually do the rewrite.  However, instead of using %N you use $N.  You still have to match   with a regex though, as I understand it.

Why did I go through all this work?  Well, have a look at the following graph:

Google Webmaster Stats (Server Errors) 28 Dec 2012

Yep, that shows server errors from my site.  At the start of this process, I had none.  It then spiked.  And the reason it went back down was me using htaccess and modrewrite to take any old URLs that were erroring and redirect them to where they were supposed to go.  I expect a similar drop in page errors; however, I’ll have to wait a few days to see that graph as google doesn’t crawl all of my pages every day.

Here’s the graph of page errors.  The long gentle slope up is from these errors here that were a Google problem.  But, have a look at the page errors.  I’ve got almost all of them eliminated simply by analyzing what was going on and putting a bit of work into the problem to help you guys out.

20121230_WebmasterStats 

Don’t forget you can only have 1-9 in each case.

[Update 2012-12-27 07:17:13] I thought I would add an example…just in case.

[Update 2012-12-27 15:45:15] Added a graph and showed how my errors were eliminated.

[Update 2012-12-30 19:11:55] Added graph of page errors

Image from david anderson via flickr