Sunday, September 28, 2008

Stop a Long-Running Query in MarkLogic Server

If you're like me, every once in awhile you'll be working on a query in cq, you'll do something stupid in XQuery, run the query, and it will run forever. MarkLogic Server has built-in timeouts, but you can stop a long-running query rather than waiting. Here's how you can do it using the default admin console in 3.2.
  1. In the left-hand column, click on Groups.
  2. Click on Default
  3. Click on App Servers
  4. Click on the app server cq is connected to.
  5. Click the Status tab.
  6. Click the Show More button.
  7. Scroll to the bottom and you should see a request with the the /cq/ path referenced.
  8. Click the cancel link.
  9. Confirm that you want to cancel the query.

The Last Game at old Yankee Stadium

I was at the last game at the old Yankee Stadium last Sunday, September 21 with my father. I'm not going to get sentimental. There's a tremendous amount of history in that stadium, but the physical structure was due to be replaced.  

Here are some things I'll enjoy remembering about the last game:
  1. During the pregame ceremonies, Yogi Berra standing behind home plate, looking very small and frail, but strangely looking like he belonged right here.
  2. The huge cheers given to Bernie Williams during the pregame ceremonies, his first time back to the stadium.
  3. The grass field well-worn with the season.
  4. Over 54,000 fans chanting "Der-ek Je-ter!" demanding that he take a bow at least 3 times during the game. Every time it was so loud that you could not hear the person next to you.
  5. Over 54,000 fans singing "God Bless America" along with Ronan Tynan. The guy behind us, who was being a Bronx-born tough guy all night, called his wife at the end to tell her he was enjoying the game, but ended the call abruptly while telling her Tynan just finished singing because he was getting choked up describing it.
  6. Derek Jeter, at the end of the game, leading the team around the field waving to the fans. His speech was great. The lap around the stadium was a nice tribute and appreciated. But what I noticed was how Jeter was leading, but about half-way around, a good part of the team wasn't following him that closely any more.  I thought that was an accurate visual comment on this season and the character of this year's team.
  7. Sitting in my seat, not wantint to leave, but being forced to because we had to rush to catch our Metro-North train home.
Here's the text of Derek Jeter's speech:
"Excuse me.  Excuse me. For all of us up here, it's a huge honor to put this uniform on everyday and come out here and play.
And every member of this organization, past and present, has been calling this place home for 85 years. There’s a lot of tradition, a lot of history and a lot of memories. Now the great thing about memories is you’re able to pass it along from generation to generation.
And although things are going to change next year, we’re going to move across the street, there are a few things with the New York Yankees that never change. That’s pride, that's tradition, and most of all we have the greatest fans in the world.
And we are relying on you to take the memories from this stadium, add them to the new memories that come at the new Yankee Stadium and continue to pass them on from generation to generation. So on behalf of the entire organization, we just want to take this moment to salute you, the greatest fans in the world."

Here's the new stadium as seen from the upper deck of the old stadium.

Here's bp for the last time.

This is the original 1922 pennant.  Very cool.

Saying thanks to the fans with Monument Park in the background.

The ump ringing up the last out ever at the old stadium.
Cody Ransom handing the ball to Mariano River.

The video tribute done by Yogi Berra was moving as well, especially for a diehard fan. Here's the YouTube link and the ESPN link.

Monday, September 15, 2008

Creating or Updating an htpasswd File

Don't laugh.

I do this maybe twice a year.

To create a new htpasswd file:
  1. Using the command line / terminal, go to the directory you want to protect then type:
    user$ htpasswd -c .htpasswd YourUsername
  2. Type the password twice
The tool you're using is htpasswd. The -c switch is the instruction to create a new file. The file name will be .htpasswd. Note that in most systems, a file that starts with a . is hidden by default.

To update an existing htpasswd file with a new password for an existing user:
  1. Using the command line / terminal, go to the directory you where the .htpasswd file exists then type:
    user$ htpasswd .htpasswd YourUsername
  2. Type the password twice
The difference here is the lack of the -c switch, which means the existing file will be updated.

Thursday, September 11, 2008

New XQuery Component for SyntaxHighlighter

I created an XQuery component for Alex Gorbatchev's SyntaxHighlighter, which you see in use with my XQuery snippets on this blog.

I've asked Alex to add it to the download package, but you can also download it from my site.

Tuesday, September 9, 2008

Add Syntax Highlighting to Your Blogger Blog

Here are a couple of good links to help you add syntax highlighting to your Blogger blog.
  1. The source in Google's code base.
  2. A "Yet Another Coding Blog" article.
  3. An alternate blog post in case one goes dark.