Archive for the ‘Uncategorized’ Category

JpegDeux updated for OSX 10.8

Sunday, April 14th, 2013

JPEGDeux logo
It’s been a long time since I’ve wanted to show a simple photo slideshow on OSX. Back in the day I feel like i had to do this more often. I remembered that I used to either use Graphic Converter or a simpler program called JPEGDeux.

I had to do a photo slideshow today, so I went to download one of these programs to do it. Graphic Converter was a 150MB download and I was on LTE so it wasn’t downloading quick enough. JPEGDeux, unfortunately, downloaded but wouldn’t work on my version of OSX. In fact it looks like they only have binaries for PPC versions of OSX less than 10.3.

JPEGDeux logo
Well, I had to fix this. I downloaded the source for JPEGDeux and spent the afternoon updating it and getting it to compile again. It used an old XCode project format and a lot of out-dated carbon APIs that aren’t supported anymore. After more time than I hoped I would have spent, it is now working again. I disabled the Quicktime option because that would have required re-writing large amounts of code to work with CoreImage, but it works just fine without the Quicktime option on modern hardware.

I uploaded the code to GitHub because Sourceforge makes me sad.

Please report any issues you have running this. I have only tried it on my mac so far. And if you have the means, please fork and help out with the code.


 Download a compiled Binary
Download source at Github

Normalizing faces with OpenCV

Tuesday, January 8th, 2013

One of the things that comes up when doing facial recognition is that you have to build a profile for each face being recognized. If we simply use a cascade to detect the face and then throw it into the profile set things usually work, but I have found that you get much better results by normalizing the faces as much as possible before processing.

I have been playing with is attempting to correct for face rotation by detecting the eyes and then rotating and zooming the face so the eyes always appear at as close to the same place in the training image as possible.

This example uses OpenCV. It uses one haar cascade to detect the face then uses two more cascades to detect the two eyes. It averages all of the eye detection results which will “often” give you an estimate of where the pupil is. Once you have that the rotating and scaling is pretty easy.

This technique only works really well on head-on faces with a rotation of less than 15 degrees in either direction. It could probably be expanded to rotate the image while doing the eye detection to get a better angle range but faces rotated more than 15 degrees is somewhat rare.

Here are some examples of this normalization:

 Download source code at GitHub

(this code is very sloppy, sorry)

Haar cascade logo detection

Tuesday, November 8th, 2011

This is a proof of concept I did for a client earlier in the year for detecting a logo in a live video feed. We trained a haar cascade with about 100 shots of a coke can and it was able to pretty accurately track the logo in the vertical position. With more compute power and more training images we could get it to track even tighter and in more lighting conditions.

This demo was done entirely in OpenCV but later in the project were able to port it to ActionScript to work in a browser with a user’s webcam.

Well here’s an email that sucks to get

Tuesday, April 13th, 2010

You are receiving this email because you have a login, ‘terrencecurran’, on the Apache JIRA installation,

On April 6 the server was hacked. The attackers were able to install a trojan JIRA login screen and later get full root access:

We are assuming that the attackers have a copy of the JIRA database, which includes a hash (SHA-512 unsalted) of the password
you set when signing up as ‘terrencecurran’ to JIRA. If the password you set was not of great quality (eg. based on a dictionary word), it
should be assumed that the attackers can guess your password from the password hash via brute force.

The upshot is that someone malicious may know both your email address and a password of yours.

This is a problem because many people reuse passwords across online services. If you reuse passwords across systems, we urge you to change
your passwords on ALL SYSTEMS that might be using the compromised JIRA password. Prime examples might be gmail or hotmail accounts, online
banking sites, or sites known to be related to your email’s domain,

Naturally we would also like you to reset your JIRA password. That can be done at:!default.jspa?username=terrencecurran

We (the Apache JIRA administrators) sincerely apologize for this security breach. If you have any questions, please let us know by email.
We are also available on the #asfinfra IRC channel on


The Apache Infrastructure Team

I can’t remember my password! doh!

IE Javascript not working

Friday, January 29th, 2010

I had some javascript that I couldn’t get to run in IE. It was driving me nuts. I spent a few hours slowly reading every line to make sure there were no stray commas or anything else IE doesn’t like.

After two wasted hours, I went to, and it kindly informed me that javascript was disabled.

Except it wasn’t.

Another half an hour of google searching and I find out that I need to re-register the javascript dll.

Run this command from the start menu or command dialog if this happens to you:
regsvr32.exe jscript.dll

Windows is so dumb.

My First Domain name

Wednesday, January 13th, 2010

The very first domain name I ever bought was I accidentally let it expire and it was registered within days by a link farm company and then later sold to BuyDomains. man I hated them so much. Five years later I did some work for BuyDomains. I probably could have gotten it back cheaply, but I realized it was a stupid site anyway.

A few weeks after tacoland, I registered, a site I still like but haven’t updated in like 9 years. Ah well.

0x80070005 error when trying to create Scheduled Task in Windows 2003

Monday, October 12th, 2009

When I was trying to set up a scheduled take in windows 2003, I kept getting this error: 80070005 access is denied

A lot of googling and I found the following things to try if you are having a similar issue:

Local Security policy Settings

1. Open your local security policy control panel:
Start -> Control Panel -> Administrative Tools -> Local Security Policy
2. go to the folder:
Security\Local Policies\Security Options
3. check the following permissions:
Interactive logon: Require Domain Controller authentication to unlock – set to Disabled
Network Access: Let everyone permissions apply to anonymous users – set to Enabled
Interactive Login: Message text for users attempting to log in – clear this setting

That last one creates a popup message that appears when users log into the computer. I found that this causes problems with some but not all of scheduled tasks.

File Permissiosn

Check the file and folder permissions of whatever script you are tying to execute. Make sure that the user you are trying to run the scheduled task as has Read and Execute permissions for the script.

If your script is a .bat file, make sure the user has Read and Execute permissions for cmd.exe

If your script is a .vbs. file, make sure that the user has Read and Execute permissions for cscript.exe

Too many permissions, try an unprivileged user

With older copies of windows it was fairly common practice to run all scheduled tasks as Administrator or some other type of super user. Security policies tend to be tighter now and are often set to restrict users with too much power as logging on in batch mode.

Create a new user who is a member of only the default Users group. Grant this user permissions on the folders you need to run your scheduled tasks. Keeping this user out of the Administrators group will make your server more secure and might clear up the Access Denied error.

Technoloy Update

Thursday, November 20th, 2008

reposted from my lj.

Making lists sure helps me put things in perspective, so I thought I should make a list of technologies I’ve been working or playing with lately so I can sort of make a stamp in the sand for the end of the year. I doubt many people will care, but here is what I’ve been doing technology wise:


JBoss Seam: It’s a bit of a shift going from request based applications to conversation based applications, and bijection is tough to wrap your head around mentally, but I’ve been liking Seam a lot. I am able to get the robustness and enterprise features of J2EE with the speed of development frameworks like Ruby on Rails offer.

GlassFish: As much as I’ve been liking Seam, I still sort of hate JBoss — it is hard to configure and the default settings aren’t what I think they should be. GlassFish works the first time out of the box and is a dream to configure.

JPA: I can’t say JPA is any better than Hibernate Annotations (I think it is a little lacking compared to HA), but it seems to be where the industry is going and I think it is still way better than most persistence frameworks that have come out and it is nice to finally have a good standard.

Hudson: Hudson is a very nice easy to use continuous integration server. that is all you need to know.

Maven: Hate it. I spend more time trying to configure maven than actually writing code.


YUI: There are a ton of javascript libraries out there and I have traditionally gone the prototype/scriptalicious route, but lately I’ve been using the Yahoo User Interface. It is very easy to use, looks nice, and has a ton of widgets.

Cappuccino: this is very new and somewhat limited right now. What I like about this framework is: first that they made it look and act a lot like Objective-C. For someone who has done any Objective-C work it is very easy to get up and running writing code. The second thing that they have done, and I think this is more important, is to build a front end framework that starts and stops a browser application in a similar way to how a desktop application is started and stopped. Cappuccino works a lot like GWT or Flex and frees you a lot from thinking about web apps in terms of request and response. It lets you just get down and write an application. I think it’s still a little lacking in features and widgets, but I’m sure those will come soon.

Rich Faces: Ships with Seam but is developed independently and not required to go with seam. Their widget library is robust and works very smooth. Still missing a few widgets and doesn’t integrate well with other frameworks but it seems promising.


MDM Zinc: I started working with Zinc because Adobe AIR can’t be bundled with a distributed application. I’ve been very into it and done a few very cool simple applications. The brick walls I have been hitting that prevent me from using this a ton more are mostly Flash limitations, most noticeably the inability to build a multi-threaded application. With a heavy networked app, I can get it to run 20 times faster with a threaded Java application than with straight actionscript. MDM allows you to thread through custom extenstions but the extensions have to be written in C++, easy in Windows but annoyingly difficult in OSX.

Five 3D: I’ve been playing around with a lot of 3D frameworks. I like Five 3d the most for the type of stuff I’ve been doing because it treats all text as vector, rather than raterising like Sandy or PaperVision do. I have some disagreements the the way the core of the framework is written and changed a few things to be more Object Oriented and streamlined, but performance is still killing me. Supposedly Adobe is adding similar 3d stuff to Flash 10, but I haven’t tried it yet to see.


IPhone – Cocoa Touch: I started a few demo applications that I was very excited about for a few weeks. Since then I have been waiting for Apple for approval (permission) to test my applications on my phone. It’s totally annoying that I can’t even check the status of my application or have an expectation as to when I will get approved.

Android: I like android’s platform and SDK slightly better than IPhone but there are a few things that I think will keep me from being serious about it for a while:
1. I don’t own an android phone and am not anxious to shell out for another new phone
2. The G1 sucks hardware wise compared to an iPhone, it looks similar on paper but needs a hard drive, better form factor, and generally a bump in the numbers.
3. MultiTouch missing and probably not coming anytime soon.


Nagios: I set up Nagios for monitoring the 10+ servers I am responsible for. I was resisting for a long time because I don’t like that it has a single point of failure — it assumes the server running nagios has 100% uptime — but I finally gave in and it has been working fairly well.

Komodo Edit: After 10 years, Komodo edit is finally slowly replacing my default general text editor on Windows. I still like textmate on OSX better, but Komodo is working pretty awesome and performs identical on all platforms.

Enterprise Architect: I’ve struggled for years with a mix of modeling software. I’ve used everything including Rational Rose, Visio, AggroUML, and OmniGraffle; often times using more than one program for a single project. I dove in early this year and tried using Enterprise Architect for everything and for once I have a tool that I feel is 90% of the way there. The other 10% is probably just me being stubborn. At just over $200, it is a total bargain and offers a very similar feature set to Rational Rose. If you do any UML, system, or database design, it is worth a try.


MySQL: I bought all marketing over the past few years and thought MySQL was totally up to speed with SQL Server and Oracle in terms of speed and reliability. For the most part MySQL has performed very well for me and any new projects I do in MySQL. My beef lately is that the engine still isn’t nearly as awesome as Sql Server or Oracle in terms of parallelism, online indexing, and preventing locks. Once you get up to 100,000,000 rows or so you start to have to do all sorts of hacks to operate on large sets of rows within a single query – otherwise it locks the entire database. I am not that far into my first major MySQL project and maybe I will learn some easy tricks to get past the limitations, but I haven’t seen any magic bullets yet.

Stuff to hopefully try soon:

Cocoa Touch on Actual Hardware: Hopefully I will get approval from apple soon and be able to finally test some apps on my phone.

Granite Data Services: JBoss Seam + Adobe Flex = Free alternative to Adobe LifeCycle Data Services. looks pretty rad.

JMaki: More Ajax stuff with some interesting demos.

Django: This shit is all the hype so I gotta see what it is about. Looks like RoR without the annoying community. Plus you can deploy to Google AppEngine.

Vista praise

Monday, December 10th, 2007

Since I am trying to commit to writing to this blog more, I am trying to find it’s voice and figure out what direction I am going to go with writing. After that last post I realized it could easily go towards a Microsoft/Vista hate blog since I find myself complaining about vista to someone almost daily. To balance it out early on, here I will post the one thing I have been loving about Windows Vista.

Earlier this summer, I purchased two identical PCs from BestBuy.
Both computers were:

Intel® Core™2 Duo E6400
Intel® Viiv™ technology
Intel® EM64T enhancement
400GB hard drive
Windows Vista Ultimate
TV tuner

Not super great machines, but BB had them for $599 which seemed to me to be a pretty low price.

The first desktop I have been using around the office. It sucks shit and I want it to die. But I will write more about that some other time. This post is for praise.

The second desktop went home with my business partner to replace an older dell she had been using. The goal was to replace her home desktop and have something she could use as a primary means of watching television and DVD’s. She has a small apartment and a 23 inch monitor is the perfect size tv for it.

The at home, in the living room, experience of this desktop is totally top notch.

I’ll say it right now: Windows vista media center is really well done.

Right out of the box, this PC:

  • Set up with her cable connection in about 10 minutes
  • Came with a remote that replaced the cable box remote (it has this weird computer cable box ir transfer cable)
  • Pulls down television listings off the net
  • Easily and intuitively schedules and records live television
  • Has excellent, stutter-free playback of both television and DVDs even when applications are running in the background

We did replace the keyboard and mouse. Gateway: these things are not comfortable at all. A $10 MS mouse and $15 no-name keyboard beat these things in comfort by a wide margin.

I have always used TiVos in the past, but I am seriously considering getting a machine like this for my apartment. It can’t be hacked like a TiVo and you can’t really save the video or transfer it to other machines, but I never did that anyway. For a device that is just going to be connected to your Television for entertainment and occasional business productivity related stuff, this is a great way to go. At $600 it isn’t that much more than any other DVR and really I think it was a great value.

I’ll try to write this week about the other desktop I am using at the office, it is like the exact opposite of this review.

Still Testing

Saturday, January 27th, 2007

I’m still testing out b2evolution. I have to say that I like the UI a lot better than my old blog but some things still seem a little wonky. I feel like there should be plugins out there for things like tagging and digg linkers, but I can’t find anything. Maybe if I feel ambitious I will look into contributing rather than just whining about it.

The actual reason for this post is I wanted to test out the cGeshi plugin for syntax highlighting. Making sure I can post code that looks nice is going to be essential to this blog working for me.

Here Goes:

import javax.servlet.ServletContext;
import javax.servlet.ServletContextEvent;
* User: Tea Curran
* Date: Jan 26, 2007
* Time: 1:37:53 AM
* Desc:

Word. works well and was super painless. I just had to adjust a little CSS to make the code not word wrap and we are in business. I may make the whole site wider so I can post cleaner code and bigger images.

In fact, this worked so well I think I might edit my WebSVN installation later on to use geshi instead of enscript. The enscript highlighting is great but seems to be lacking a lot of languages, is hard to add languages, and I can’t find a definitive page where new releases are hosted.

I ended up ditching b2evolution. I don’t remember why, but this site is now wordpress and using the GeShi wordpress plugin. It doesn’t seem to play nice with the wp visual editor, but that thing was dumb anyhow.