[UPDATED: Thursday, February 21, 2008 at 10:55:31 AM]
Jenn took some pictures last night of Nikki. I wish we would have taken a few pictures over the weekend when he leg was really swollen. The swelling has gone way down and her energy level has gone way up. She's acting more and more normal. This is both good and bad. We're elated that she's feeling better, but she's a very high energy dog and trying to curtail her enthusiasm is going to be tough task for the next 5 weeks.
The leg with the red blotches is that leg that was really swollen over the weekend. It was at least twice as big as it is now.
UPDATE: I added a lightbox effect to the gallery to make it easier to view.
A few weeks ago I posted a blog entry on my jQuery Calculation Plug-in. However, I never think I do an adequate job of describing what it does so I thought a little video might be more useful. Since I just installed Jing a few days ago, I thought this plug-in made a perfect candidate for my first Jing post!
Something I forgot to specifically mention in my demo, but which I think is really significant, is that the dynamic calculation code would work regardless of how many rows were in your table. If you only had 1 item in your basket or 20 items, the exact same code is used. The key is to use a naming convention that is consistent and easy for jQuery to parse.
My original post goes into the technical details behind the demo above, so make sure to read the post for the detailed information on what's going on.
Well, the last week has been pretty hectic. Nikki had infections in both legs, so we didn't get much sleep over the weekend as we were using hot compresses to try to draw the infection out. She was getting a lot of seepage out of her right hind leg (which is pretty normal) but her left leg swelled up to probably 3-4 times its normal size by Friday night.
We were worried about it enough to take her back to MedVet's ER on Saturday to have it checked out. They ended up changing her antibiotic prescription. Since the ER visit, the swelling and infection looks to be decrease each day. She barely had any seepage out of her right hind leg yesterday and the swelling in her left hind leg has reduced by probably 50%.
As far as her attitude, she's been a real trooper. Everyday she's acting more and more like herself. She's definitely getting bored being crated all day, but she's being much better about it than I thought she would. She typically heads right back to her crate all on her own after we go out for our walk/potty break.
The one thing we've had trouble getting done is her leg stretching routines. Since we spent so much time using hot compresses to get the swelling down, we had trouble getting her to lay still long enough for us to also do the stretching. We usually only get one leg in at a time—when we're supposed to do both legs. However, I talked to the Dr. Barnhart (the surgeon) and he told me that while the exercise are designed to help the recovery, their not crucial to the process and it won't cause the procedure to fail in the long run.
I still want to step up that bit of therapy though. I'm sure the stretching exercises will only help the recovery period, so hopefully we can get her on a better schedule for that part of the therapy.
Overall I think the biggest issue Jenn & I are both battling with is lack of sleep. I've got to stay up for her late night pills, but the dogs are getting me up by 6am each morning. Somehow the 5 to 5½ hours of sleep I'm getting just isn't cutting it. I'm scheduled to go back for my second sleep study next week—in which they'll get me fitted for a CPAP machine to try to fix my sleep apnea issues. Hopefully that will increase the restfulness of my sleep.
Anyway, I'll try to get some pictures of Nikki online. I've gotten really bad of taken pictures of late. I really wish I would have snapped a few pictures when her leg was all swelled up.
Good service oftens goes unnoticed, so I wanted to public thank Bob Meighan, the VP of TurboTax, for helping me get some older .tax files in which I could locate either the PDFs or the original documents I had printed.
I tried tracking down my old TurboTax installations, but I couldn't find the files for the years I was missing. They've either been thrown out or were lost in our robbery last year.
My guess is this isn't an uncommon request, but Bob got me the PDFs I needed ASAP. Anyway, I always like to recognize when a company goes the extra mile to help me out quickly.
I've been working on a Java applet that can get images from the user's clipboard or take screenshots of the user's desktop and upload them to a server via HTTP. The last piece of the puzzle was to make sure I could access the task methods via JavaScript, as the interface will most likely be driven by HTML.
I've been using a self-signed cert to sign the Java Applet so that I can access the user's clipboard and take the screenshot. All of this was tested and working extremely well from if I used the Applet UI. However, as soon as I would try to invoke one of the sandboxed functions from JavaScript the applet started throwing the error:
AccessControlException is thrown: access denied (java.awt.AWTPermission accessClipboard)
I tried a number of things to get around this problem. I thought it was something I was doing wrong when I was signing the applet (since it was working fine from within the Applet's built-in UI controls.) After playing around with the cert signing process and getting no where, I finally came across the post JavaScripting in Applets - Getting Out of the Sandbox where a comment from Stéphane Bury pointed me to a solution.
public static void doSpecialWork(String param1){ final String fParam1 = param1; java.security.AccessController.doPrivileged(new java.security.PrivilegedAction() { public Object run() { // put the code of your method here ... ... return ""; } }); }
My final solution was to write a command() method which I can use to trigger off the internal privileged methods:
/** * The method to invoke from JS to perform the privileged methods--which throw * security errors if you try to access them directly. * * @param command - the command you want to perform (clipboard, screenshot, upload) */ public void command(String command){ final String cmd = command; java.security.AccessController.doPrivileged( new java.security.PrivilegedAction(){ public Object run() { // execute the privileged command executeCommand(cmd); // we must return an object, so we'll return an empty string return ""; } } ); }
As you can see the method is very basic, it just passes the command it received to a private method which actually executes the command. Now I can access any of the privileged methods in my applet with this little helper method.
[UPDATED: Saturday, March 08, 2008 at 10:26:56 AM]
I've been playing around with e - TextEditor this weekend to see if maybe it'll replace Textpad for me. I've always liked the speed of Textpad and it does a really good job on large files. I use Eclipse as my main IDE, so when it comes to a Notepad replacement my two main requirements are fast load times and the ability to handle large text files (for reading logs.)
However I keep seeing some of the really cool things that TextMate can do, so I've been keeping an eye out on e - TextEditor. It has a couple of features that would make quick editing of HTML files extremely easy. I really like the ability to selected a bunch of words or tags in a document and easily replace them.
One of the key features of e is it's TextMate bundle support—which really allows you to extend the functionality of the program. While surfing the e forums, I came across a Bundle command which allows you to open the file you have selected in the document (or the file where the caret is positioned.) This script makes it really easy to open files being loading from <script />, <style /> or any other tag you may use for loading files.
The original script, posted by tanguyr, I found either needed you to add e.exe to the Windows PATH environment or you needed to hard code the path to e.exe. I fixed the problem by using one of e's environmental variables. The $TM_SUPPORT_PATH variable points to a sub-directory above where the e.exe file exists, so I just use a relative path to get to the e.exe executable.
To add this command to e, go to the Bundles > Edit Bundles > Show Bundle Editor. I added this script to the Source bundle, as it seemed to make the most sense to me. Select the Source folder and click the + button and select the "New Command" option. I decided to call the command "Open Target Document", if you don't like the name choice something you like better.
Paste the following Bash script into the source area.
Someone asked me this morning how they could determine distinct relationships. They wanted to be able to retrieve all the distinct rows where someone had defined another user as a friend or any users who had defined them as a friend. The table schema looked like this:
| friend_user1 | friend_user2 |
| 1 | 10 |
| 2 | 6 |
| 10 | 1 |
| 6 | 1 |
| 2 | 1 |
| 10 | 2 |
As you can see friend 1 is pretty popular amongst other users. However, he only has 1 person defined as friend of his—friend 10. What we need to do is to find all distinct cross-column relationships in the table—which means only one row should be returned for the relationship between friend 1 and friend 10.
Phill Nacelli blogged about a great tool for monitoring SVN repositories called CommitMonitor from Stefan's Tools. Just last week I set up a post-commit script to e-mail me when updates were commited to a few of my SVN repositories. When you do all your work via telecommuting, staying in touch with updates to your repositories can be somewhat problematic—especially when you have lots of repositories.
I like being proactive and knowing when other developers are adding new committing new code. Some of our repositories aren't frequently updated, so proactive monitoring really helps me stay up-to-date. Up to now my choices were to either configure a post-commit script to e-mail changes or to check the repository logs for changes.
That's all changed with CommitMonitor. It's basically an RSS reader for your SVN repositories.
You can set it up to monitor any number of repositories and you can configure how frequently updates are checked for. When CommitMonitor checks the repository any changes will be shown to you via a small pop-up window in the lower right hand corner.
CommitMonitor is a single executable that you can download in a zip file. I've always favored applications that allow you to just unzip and run—it makes it very easy to remove the application if don't like it.
From my brief experience with CommitMonitor I see this tool as being extremely helpful to my workflow. Go download it now and see how it helps you!
I've been using Windows Live Writer for posting all my blogs. Overall it's a terrific program. It's got a very simple, easy to use interface and it drastically eases the process of blogging.
However, the one complaint I've had with the program is there's no easy way to "add" common HTML tags that you commonly use to the interface. I use the <samp> tag quite frequently when showing inline sample code and for variable names (although I suppose I should use the <var> tag instead.) To use these tags I've had to drop to the HTML Code view and manually add the tags. This is a pain to do—especially on longer posts where I need to add the tag frequently.
To solve my dilemma, I've been periodically searching for a Live Writer Plug-in that might allow me to add some custom HTML snippets. Well today I just happened to stumble on a great little plug-in called Dynamic Template Plugin for Windows Live Writer.
You can use this plug-in for doing something as inserting static text or for modifying the selected text. The real power comes from the fact that the plug-in allows you to use C# code snippets. You can even have the template prompt you for input.
To get you started, here are a couple of templates I just wrote to help me out with a few tasks:
[UPDATED: Friday, February 15, 2008 at 9:24:01 AM]
My black Lab, Nikki, has been suffering from rear knee problems since she was about 18 months old (she just turned 4 last month.) She's ruptured the canine cruciate ligaments in both her hind leg. That's like us having torn ACLs in both knees. While she's had the problems for a while, she normally gets by without too much problem—most people would have no clue she had problems with both her rear legs. For the most part, we had been able to manage the
discomfort using Deramaxx (which is a joint supplement.)
Last Thursday I noticed she was having a bad day, I could tell her knees were bothering her because she was limping and trying to avoid putting weight on them. She just progressively started getting worse over the weekend. She was barely moving and was no where near her normal energetic self.
On Sunday my wife noticed she was also not putting weight on her front left leg—which she was also having uncontrollable spasms that lasted for over 24 hours (massaging the leg would give temporary relief.)
On Monday morning I took her to the vet to see what we could do to relief her of the pain a little and to get a diagnoses on the front leg. The vet determined she either has a muscle or ligament injury that's either a sprain or a strain (without an MRI it would be impossible to know.) The vet also felt that Nikki has probably ruptured her MCL as well as her CaCL.
We've known that the knee problems would degenerate over time, but we were hoping it wouldn't get this bad. No one wants to see their dog in constant pain. It was quite clear to us that Nikki needed surgery if she was to have any type of quality of life.
One thing I rarely ever do in Java is program anything that requires a desktop UI. If I'm doing any Java programming, it's generally server-side related. Recently that changed when I began working on a Java applet that allows users to upload images (screenshots) in their clipboards directly to the server.
Building the basic applet was pretty straightforward. Even signing the applet (so you can actually query the operating systems clipboard) is pretty straightforward—made even easier once I created an ANT build script.
The applet was progressing nicely, well that's until I tested things on the Mac.
Karl Swedberg posted this 3 line nugget to the jQuery mailing list this morning and I thought it was worth of blogging. It uses a technique I was previously unaware and that's the animate() method allows for toggling of opacity. This might be a commonly known feature, but I rarely use the animate() method directly—which is probably why I wasn't aware of the feature.
Anyway, here's Karl's code:
This creates a simple jQuery plug-in that you can now use like:
You can also pass in arguments to control the speed, easing effect or the callback to run after the fading is complete. If you want to use the callback argument without using the speed or easing arguments, just pass those arguments a value of null.
As I mentioned early I've been working on a SVN post-commit script. We've got a SVN repository that will be modified by several remote developers and I really need to keep an eye on this repository and I need to closely monitor changes to this repository.
There are two major functions that I needed in my post-commit script:
There are an abundant of examples showing off how to do this in various *nix flavors, but I couldn't find any good Windows-based solutions that didn't require Perl to be installed on the server. That led me to create the following post-commit.bat script.
I've been working on a Subversion post-commit hook that will send me an e-mail when a user checks in some code to a repository. In order to send an e-mail from the post-commit script I needed a command line tool that would let me send an SMTP message from my batch file.
Fortunately for me, I stumbled upon SendEmail by Brandon Zehm.
This program is chock-full of features and is the perfect companion for Subversion for Windows installations. I can also see this being an extremely useful general debugging tool as it as you can create some really complex e-mail scripts.
SendEmail is actually a Perl program but has been compiled into a native Windows executable. You can download the Windows executable in two flavors—with or without TLS support.