While it wasn’t quite what I’d expected, that is very much a good thing. I enjoyed it.
If you’re looking for something a little science-fiction-y and a little adventure-y you might enjoy this one, especially if you take to the writing styles of Gene Wolfe (which I tend to). I would recommend it.
Harry Potter (all seven)
Apparently after they made the sixth movie, somone decided to write some books! At least that’s how it seemed to me, as I read all seven within this last month. There’s a good chance you’ve read these and that’s now true of me as well!
It did take me about three books to get into the series, but in the end I enjoyed it and even now miss my friends Ron and Hermoine a little (not so much Harry, I never truly considered him a friend).
There are things I liked and things I didn’t, though that is true of all books but the truly and completely terrible. I would recommend them, though with some qualifications.
The Sorcerer’s House by Gene Wolfe
More fantastic than future-set, I’d recommend it for anyone looking for that set in present-day. It features the same sort of protagonist I’ve become familiar with from some of his other works.
Rant: An Oral Biography of Buster Casey by Chuck Palahniuk
A friend and I agreed to read each other’s recommendations, and this was one of hers. It was interesting, and I might recommend it (though with more than a few qualifications).
Lightning by Dean Koontz
Another book that she recommended; though fine, it really wasn’t my style.
I was setting up for some code today. Code which would use, among other things, Smarty 3 since that’s a thing now apparently. (It used to be Smarty 2, but I guess times change and numbers change.)
There’s an __autoload function that I wrote a while ago and often use to, you know, automatically include files when instantiating classes. But it didn’t work at all.
The file itself with the __autoload function included fine, but autoload function was not being called. It was pretty confusing, to be honest.
Jeff and I eventually traced this back to one line in my code — the line including the Smarty source file.
So I had a look in there and found this:
/**
* register the class autoloader
*/if(!defined('SMARTY_SPL_AUTOLOAD')){define('SMARTY_SPL_AUTOLOAD',0);}if(SMARTY_SPL_AUTOLOAD &&set_include_path(get_include_path(). PATH_SEPARATOR . SMARTY_SYSPLUGINS_DIR)!==false){$registeredAutoLoadFunctions=spl_autoload_functions();if(!isset($registeredAutoLoadFunctions['spl_autoload'])){spl_autoload_register();}}else{spl_autoload_register('smartyAutoload');}
Which looked suspiciously culpable. So I added this line to my code:
Just throw the Youtube URLs into a list and add the classes video and library to it, and that’s all there is to the HTML! (Well, there’s some minor javascript to include).
I included the Javascript file for you know doing stuff, as well as CSS file for some basic formatting. It makes use of JQuery, which i’ve included by way of Google’s JsAPI (out of laziness). And then when everything has loaded, there’s the one call to videofy().
After that, the list gets converted into the video gallery you should see above!
But I did run into an issue. Most things, when deJSONed, turned into stdClass objects. One property I needed to access was named “$t“, which as you may imagine I had some trouble accessing. I tried single quotes and escaping the $ character, but nothing seemed to work.
There’s almost definitely a better way, but I ended up casting to Array:
function getT($obj){$t=(Array)$obj;return$t['$t'];}