GeoNB Mobile

I was messing around with GeoNB, checking out what it was built on top of with the hope that maybe there was a way to get some data out of it programmatically. The underlying data is very open, with the government of New Brunswick releasing it in a number of different formats. Before going that route too far, I thought it would be neat to try using OpenLayers to display the data if possible. It ended up being very easy to modify one of the existing examples to work with the ArcGIS APIs that are supporting the GeoNB site. You can check out the result below: ...

September 26, 2016 · 1 min

Hangouts Screen Share in Full Screen

Edit: I came across this extension which I assume accomplishes something similar, nice. So I was messing around in a Hangouts session today trying to increase the other user’s screen share size, and I noticed a few HTML elements that controlled the size. I discovered that you can easily resize the video feed. The best approach would be an extension to handle finding the proper elements and also hooking into some events, but a simple PoC can be seen below: ...

March 20, 2015 · 1 min

Spring Boot web application

{% include JB/setup %} So I tried out Spring Boot in a new project. I have to say that I like the idea of making Spring more accessible to a broader audience. I did come across a few things that really sucked up some time. Serving up JSPs In Spring MVC it’s pretty standard to have your View based on JSPs. There are other engines you can plug in to display your views of course, but most people are used to JSPs. Support is standard in JEE/Servlet land anyways. Plus they don’t really require any unexpected dependencies or much configuration at all. Usually. ...

December 15, 2013 · 2 min

Remove JSESSION ID cookie

{% include JB/setup %} I made a simple little bookmarklet that will remove the JSESSIONID cookie (for testing purposes). We are using it to test behavior of AJAX updates when the session expires. Here it is, drag to your bookmarks: -JSESSIONID This makes use of Peter-Paul Koch’s code from quirksmode.com

December 3, 2013 · 1 min

HSQLDB with Hibernate: addScalar

{% include JB/setup %} To continue this series, I just have another little cautionary bit of advice regarding using addScalar with your createSQLQuery(...) operations. In MySQL, a query like this: SELECT obj.name, other.name, third.name FROM obj, other, third Will give the full name of those columns in the “result set metadata” that Hibernate accesses. So when you use addScalar, you can just say: .addScalar("obj.name") .addScalar("other.name") .addScalar("third.name") However, in other database engines the columns might come back in the metadata as [ name, name, name ]; when you try to use addScalar with the full path, you will get an error. (I don’t believe that just calling addScalar once with “name” will apply to each of the three occurrences either, but I haven’t checked). ...

September 18, 2013 · 1 min

HSQLDB with Hibernate: User lacks privilege or object not found

{% include JB/setup %} I’m currently working to add unit tests to a project which currently has no tests for its database query layer. Normally I wouldn’t worry too much, but there are some nasty queries that have cropped up over the years that could benefit from some testing. This project uses Hibernate and the custom queries are written mainly in some MySQL-specific language. Part of the problem with adding tests has been that the hbm2ddl tool hasn’t been able to reliably generate the database schema due to some strange approaches to ID generation and other MySQL-specific code. ...

September 18, 2013 · 1 min

Another reason for 406 in Spring 3.2 and Jackson 2

{% include JB/setup %} Just as a quick note, make sure your POJO actually has some fields. I was racking my brain, examining my config, and Googling fiercely when I discovered that the reason I kept getting a 406 in my Spring MVC 3.2 project was because I had just created a placeholder POJO with no fields. Arg.

September 6, 2013 · 1 min

Google Cast: cast-receiver-list

{% include JB/setup %} Introducing cast-receiver-list https://github.com/nickspacek/cast-receiver-list I’ve been playing around with the Google Cast API a little bit, specifically the Chrome Sender API. One thing any application will have in common is retrieving the list of available senders and displaying them for the user to select from. As I was playing with the API I decided to extract the code out into a module and make it available for others to use. ...

August 16, 2013 · 1 min