jrclem Blog
Why So Serious?
by jrclem on Comments
It is absolutely worth it. There are actually a surprising number of scenes that were shot using IMAX cameras, and it is without a doubt the most immersive film I have ever seen.
Heath Ledger is pretty much a lock for Best Supporting Actor at this year's Academy Awards. Granted, there are still about 6 months until Oscar season, but if you look at what's come and gone, and what's in the pipe, there isn't exactly a lot of competition. Not to mention that his portrayal of the Joker is absolutely amazing... I honestly couldn't have imagined a better version of the character if I tried.

Go see it. And I hope you enjoy it as much as I did.
Doing It Programmatically...
by jrclem on Comments
ob_start(); $ch = curl_init(URL_BASE.'/'.$this->sitemapFile); curl_exec($ch); curl_close($ch); $response = ob_get_contents(); ob_end_clean(); $begin = strpos($response, $this->sitemapBegin)So... I remember now how much I dislike using this editor, it cripples usage of quite a few html tags and keywords... Anyway, my solution initializes php's output buffering, uses curl to execute the page and generate the dynamic sitemap links (which are written to the buffer instead of the browser), saves the output buffer's contents to a string, and then cleans and closes the buffer. Next, I define the beginning and ending point of the sitemap. I made this decision because I figured that 99% of the time, the sitemap links will be inside of a div defining their sty|e (beginning point) and immediately followed by some other div like the page footer (ending point). Using this convention, I could strip out just the html containing the sitemap links and throw away the rest. Eg,
+ strlen($this->sitemapBegin);
$end = strpos($response, $this->sitemapEnd)
- strlen($this->sitemapEnd);
$response = substr($response, $begin, $end - $begin); preg_match_all('regexp for matching all html link tags',
$response,$links,PREG_PATTERN_ORDER); foreach ($links[1] as $link) {
test conditions for generating xml }
...blah,blah,blah [div id="sitemap"] (aka the beginning string)Finally, I find any matches to a regular expression defining the contents of href link tags and store them to an array. And the last step, and really the only one that should require modification in the future, is defining the cases that determine what sort of flags to use in the xml for each link. In this particular situation, there were 5 cases out of over 120 links. It might have taken a couple of hours of thought and coding time, but I think this algorithm will prove to be very reusable for subsequent xml sitemap generation, so long as the page conforms to the convention of surrounding the html/php sitemap links with unique html tags. At the very least, I know I am glad I spent my time trying to improve upon the status quo, and I hope it turns out that I've helped to save a lot of time in the future.
STUFF I NEED [/div] [div id="something_else"] (aka the ending string) blah,blah,blah...
Rearmed
by jrclem on Comments
Nothing endures but change
by jrclem on Comments
Destructoid
by jrclem on Comments
Has a pretty scathing satire of this situation with Gerstmann getting canned from GameSpot. Pretty harsh, but still. Changing the locks to a dude's office in the middle of the week. That's clas(s)y.
I can't say that Jeff is my favorite critic, and I can see how his personality could rub management the wrong way. But I've always respected his opinion. There have been times that I disagreed, and others where I thought he just came across as jaded. But he has always been intellectually honest. I can only imagine what it must be like for his former co-workers and friends that are left behind. They'll have some tough decisions to make. And right here at Christmas time... Nice.
I've actually had a similar shock these last few weeks, as I learned that my employer is about to be purchased by a much larger corporation. We've been told that it's just business as usual and our jobs are safe for at least the next 6 months. Basically, I'm just looking forward to my interview with the Bobs. I'm actually already looking for another job, hopefully something in software. IT has been everything I thought it would be and so much more.
HL2 Episode 2 Review
by jrclem on Comments
Turning a Frown Upside-Down
by jrclem on Comments

Log in to comment