Quantcast

Ben McCann

Co-founder at Connectifier.
ex-Googler. CMU alum.

Ben McCann on LinkedIn Ben McCann on AngelList Ben McCann on Twitter

Ben

Helpful Bash Aliases

01/08/2009

Just a few to post for right now, but this entry may grow later. # change to the real directory if in a linked directory alias rd=’cd `pwd -P`’ # search for and open file in sublime function s { FILE=$1; test -f $FILE || FILE=`find . -name $FILE`; sublime $FILE; }

Using the GWT ClickListener on an Element

11/24/2008

GWT uses what it calls a ClickListener instead of the standard HTML onclick attribute.  The normal way to use a GWT CLickListener would be as follows: focusWidget.addClickListener(new ClickListener() { public void onClick(Widget sender) { // do something here } }); Unfortunately, this seems not to work on an HTML Element.  Luckily, you can use JSNI Read More

Free Copy of Frutiger Linotype Font

10/23/2008

Frutiger Linotype is a very cool premium font. You may recognize it as the font that the flickr logo was created with. In order to get a free copy, all you need to do is download Microsoft Reader.

Using a TV as a Monitor in Linux

10/22/2008

I’ve connected both a Syntax Olevia and an LG TV to my openSUSE desktop.  Neither have worked well because they caused the default font size to be unusably large.  I’m talking gigantically huge, like only a few letters on the screen at any one time.  The solution is to modify your /etc/X11/xorg.conf file. OpenSUSE 11.2 Read More

Struts 2 Tutorial – Validation and Error Handling

09/20/2008

Validation is an important part of any web framework because it is one of the most painfully repetitive things to have to continually recreate.  In Struts 2, validation is handled by creating an Action-validation.xml file.  So, if we have an AddUser Action then we would create an AddUser-validation.xml file: <!DOCTYPE validators PUBLIC “-//OpenSymphony Group//XWork Validator Read More

Struts 2 Tutorial – Struts Configuration

09/20/2008

The struts.xml file defines the relationship between actions and .jsp views, the inclusion of interceptors, and possible result types.  It’s essential that you be able to handle at least basic configuration changes, so we’ll demonstrate the most important and frequently used below. Packages: Extension, Namespaces, and More For more complex applications, you will likely want Read More

Struts 2 Tutorial – Interceptors

09/19/2008

Interceptors are my favorite aspect of Struts 2. They inspect and/or act on a user’s request. There are three main uses cases that I’ll discuss here: intercepting before the action, between the action and view, and after the view. At the end, I’ll show you how to add your brand spankin’ new interceptor to your Read More

Struts 2 Tutorial – Creating Views

09/09/2008

One of the first things you’ll want to do after getting started with Struts 2 is create more complex user interfaces. We call the UI a view because Struts2 makes use of the Model-View-Controller (MVC) design pattern.  For this example, let’s assume we have an action that returns a list of all the employees at Read More

Newer Posts
Older Posts