I bought an old Paceship P17 last summer and much to my dismay never managed to sail it. Having no sailing experience and trying to obtain all my knowledge from books led to me searching endlessly for the right parts to get it ready.
Well, Spring is here and I'm getting pretty pumped again. Most of the parts I needed last year I have, I've got folks willing to help me get it ready, and only a few questions remain. The main one is...
What the heck is this???
Specifically, the diagram on the left. Is this showing two blocks on the end of the boom, each one attached to a (not sure if this is the right term) deck block? How do you running the sheet through that? I'd love to use the original design, but I'd be willing to change it if this is incomprehensible.
I've looked at various sites and diagrams, such as this place: http://craig.backfire.ca/pages/sailing/mainsheet-systems, but none seem to illustrate this particular system.
nick's blog
Monday, April 4, 2011
Saturday, February 26, 2011
Wrap anything within Quartz
I had this idea while using Quartz at work that it rather than writing a lot of boilerplate code around libraries like Twitter4J and RestFB, it would be nice if I could just wrap any method into a Quartz Job, with scheduling, error handling, etc.; something like this:
FacebookService service = wrap(FacebookService.class);
queue(service.updateStatus(statusMessage)).schedule(nextMonday).after(new Callback {
@Override
public Object run() {
System.out.println("Posted the status, and it was: " + getResult().getMessage());
}
});
The syntax is (supposed to be) similar to Mockito's. I'm not sure how well this approach will stand up from a thread-safety perspective, but I've started a project on Github, very basic right now, that I think has some promise!
FacebookService service = wrap(FacebookService.class);
queue(service.updateStatus(statusMessage)).schedule(nextMonday).after(new Callback
@Override
public Object run() {
System.out.println("Posted the status, and it was: " + getResult().getMessage());
}
});
The syntax is (supposed to be) similar to Mockito's. I'm not sure how well this approach will stand up from a thread-safety perspective, but I've started a project on Github, very basic right now, that I think has some promise!
Monday, February 14, 2011
JAXB 2.1/2.2 and different Java 6 versions
Posting this just in case anyone else hits this issue. We run Java 1.6.0_23 in our local development environments, but deploy to Java 1.6.0_03 (I suppose ideally our development should match the deploy target). I've seen a couple of people encountering problems with this error:
javax.xml.bind.UnmarshalException: Unable to create an instance xmltype ...
I had an abstract JAXB class and some concrete ones that implemented it and were annotated with XmlType. This worked without problems in our local environment, using (I assume) JAXB 2.1. However, when deployed I was getting the above error. Our deploys include JAXB 2.2 in an endorsed folder because we don't want to use JAXB 2.0 (which is what Java versions previous to 1.6.0_04 include).
What a confusing mess! To summarize:
locally: JAXB 2.1
deployed: JAXB 2.2
In the end to fix the issue, I ended up modifying the code that created the JAXBContext to include all of my concrete classes as well (it is using the JAXBContext.newInstance(Class... classes) method). This appears to have fixed it; I'm not sure why 2.1 is able to unmarshal without the classes all listed there while 2.2 is not.
I had read previously that JAXB would use the XmlSeeAlso annotations to look up the additional classes, but it doesn't seem to be behaving as expected in this situation. My abstract class has an XmlSeeAlso annotation that points to all of the concrete implementations.
Hope this helps someone!
javax.xml.bind.UnmarshalException: Unable to create an instance xmltype ...
I had an abstract JAXB class and some concrete ones that implemented it and were annotated with XmlType. This worked without problems in our local environment, using (I assume) JAXB 2.1. However, when deployed I was getting the above error. Our deploys include JAXB 2.2 in an endorsed folder because we don't want to use JAXB 2.0 (which is what Java versions previous to 1.6.0_04 include).
What a confusing mess! To summarize:
locally: JAXB 2.1
deployed: JAXB 2.2
In the end to fix the issue, I ended up modifying the code that created the JAXBContext to include all of my concrete classes as well (it is using the JAXBContext.newInstance(Class... classes) method). This appears to have fixed it; I'm not sure why 2.1 is able to unmarshal without the classes all listed there while 2.2 is not.
I had read previously that JAXB would use the XmlSeeAlso annotations to look up the additional classes, but it doesn't seem to be behaving as expected in this situation. My abstract class has an XmlSeeAlso annotation that points to all of the concrete implementations.
Hope this helps someone!
Friday, February 11, 2011
Javascript trickery: direct links to Fredericton Sobeys/Superstore Flyers
I've been really hankering for a simple grocery shopping comparison tool, but haven't come across one yet.
At one point I started working on one without really getting very far, but after some investigation, I discovered that most of the handling for the Sobeys and (Atlantic) Superstore flyers is Javascript-based. This could probably lead to some easy-to-parse lists of sales and prices.
One useful feature in the meantime is the ability to get to the accessible flyers for my stores quickly by looking at the "publication.aspx" source code. If you open that file up in some developer tools, you can build your own links in this format:
My Superstore
My Sobeys
The links look like this:
http://director.flyerservices.com/{CUSTOMER_NAME}/PublicationDirector.ashx?OrganizationId={ORGANIZATION_ID}&BannerId={BANNER_ID}&BannerName={BANNED_NAME}&pubtype={PUBLICATION_TYPE}&Language=en&Version=Text&PostalCode=e3a2l4&SessionId=nkg4olv1s3brluuc2cntid45&StoreId={STORE_ID}
Hopefully that session ID won't let you guys exploit anything, I'm not sure if it's required.
At one point I started working on one without really getting very far, but after some investigation, I discovered that most of the handling for the Sobeys and (Atlantic) Superstore flyers is Javascript-based. This could probably lead to some easy-to-parse lists of sales and prices.
One useful feature in the meantime is the ability to get to the accessible flyers for my stores quickly by looking at the "publication.aspx" source code. If you open that file up in some developer tools, you can build your own links in this format:
My Superstore
My Sobeys
The links look like this:
http://director.flyerservices.com/{CUSTOMER_NAME}/PublicationDirector.ashx?OrganizationId={ORGANIZATION_ID}&BannerId={BANNER_ID}&BannerName={BANNED_NAME}&pubtype={PUBLICATION_TYPE}&Language=en&Version=Text&PostalCode=e3a2l4&SessionId=nkg4olv1s3brluuc2cntid45&StoreId={STORE_ID}
Hopefully that session ID won't let you guys exploit anything, I'm not sure if it's required.
Thursday, January 13, 2011
Chrome CSS3 bug when combining 3D effects with opacity transition
Ran into a bug in Chrome recently where the background color of a object disappears during an opacity transition. I reported the bug here: Chromium bug report
You can try the code out for yourself here: https://gist.github.com/778035
You can try the code out for yourself here: https://gist.github.com/778035
Thursday, February 4, 2010
jQuery PlacePicker
I just realized I haven't mentioned this plugin here, and in order to get some Google ranking I'd thought I'd add some info and links! :)
A while back I created a widget for doing geocoder lookups. It's meant to be fairly generic, I wrote a Google Maps V3 plugin. The plugin interface isn't the best, I'm open to suggestions. :)
You can find more info and samples on the github page. Feel free to add any suggestions, either on the github page or here.
jQuery PlacePicker on github
A while back I created a widget for doing geocoder lookups. It's meant to be fairly generic, I wrote a Google Maps V3 plugin. The plugin interface isn't the best, I'm open to suggestions. :)
You can find more info and samples on the github page. Feel free to add any suggestions, either on the github page or here.
jQuery PlacePicker on github
Tuesday, January 26, 2010
Google Calendar Advanced Printing
Hi folks,
So back a while ago I started a Google Calendar Gadget that was supposed to replace the bookmarklet. Unfortunately, there were problems with the Google OAuth stuff preventing it from working. Well, somewhere along the way they got them sorted out. If you'd like to give it a try, here's the link to click:
Advanced Printing for Google Calendar
Let me know how it works. Also, the bookmarklet and gadget are on GitHub, here:
Subscribe to:
Posts (Atom)