SQL Data Type Matrix

At my job I frequently have to translate SQL scripts between Oracle and PostgreSQL. I started making a table a while ago to help me remember how the various vendor-specific data types map to each other. It’s still in a very early state but it’s been very useful to me so far so I thought I’d put it online:

datatypematrix.org

Some planned additions:

  • MySQL
  • Search / filter
  • More detailed info

Flash Builder 4.7 and m2e

The latest version of m2e that works with Flash Builder 4.7 is 1.4.1.20140328-1905 available at this update site: http://download.eclipse.org/technology/m2e/releases-for-indigo/1.4/

Flash Builder 4.7 is based on Eclipse Indigo and, while m2e no longer officially supports Indigo, the m2e team has created an additional update site to resolve some install issues and make 1.4 work. (ref)

To upgrade:

  • Add the above update site in Install New Software.
  • Select both m2e - Maven Integration for Eclipse AND m2e - slf4j over logback logging (Optional). Flash Builder 4.7 comes with an older version of the optional logging feature and the only way to upgrade m2e is to also upgrade that.
  • Click Next and Finish

Debugging Unit Tests without Flash Builder Premium

If you have a Flash Builder Standard license, chances are good that you’re lamenting the lack of FlexUnit support. You can run your tests from the command line but then you lose debugging and an integrated results display. You could add a second Application to your project to embed a test runner but due to an annoying bug in Flash Builder, this application file needs to be in your main source folder or else it can’t be added as a run configuration. I set out to find a new solution with the following in mind:

  • I want all test-related code to stay in the test sources folder. (src/test/flex since I’m using Maven)
  • I want a visual test runner to display which tests/failed passed, give timing information, stack traces, etc.
  • The tests must work as-is when committed and run through flexmojos on a CI machine (e.g. Jenkins)
  • Debugging support through Flash Builder must be available when running the tests locally.

Continue reading

Actionscript: Determining if a Class object is a superclass or superinterface of another Class

Anyone who uses actionscript reflection in non-trivial cases will eventually run into this problem: The is operator only works on instances. For example:

var obj:Object = new Panel();
trace(obj is Panel);         //true
trace(obj is UIComponent);   //true
trace(obj is Object);        //true
trace(obj is IInvalidating); //true
trace(obj is CheckBox);      //false

var cls:Class = Panel;
trace(cls is Panel);         //false
trace(cls is UIComponent);   //false
trace(cls is Object);        //true
trace(cls is IInvalidating); //false
trace(cls is CheckBox);      //false

This behavior is expected, but not very useful. Since cls is actually an instance of the Class class, we are actually checking whether the Class class inherits from each of those 5 things. Since Class only extends Object, that’s the only one that’s true.

What happens if you only have a Class object and you need to check if it’s the subclass of another Class?

Continue reading

JBoss Maven Seam Integration dependency issue in eclipse

Today I was trying to install the JBoss Maven Seam Integration plug-in for eclipse but I kept getting this message about a missing dependency:

Cannot complete the install because one or more required items could not be found.
Software being installed: JBoss Maven Seam Integration 1.1.0.v20100720-0040-H162-M1 (org.jboss.tools.maven.seam.feature.feature.group 1.1.0.v20100720-0040-H162-M1)
Missing requirement: JBoss Maven Seam Integration 1.1.0.v20100720-0040-H162-M1 (org.jboss.tools.maven.seam.feature.feature.group 1.1.0.v20100720-0040-H162-M1) requires 'org.maven.ide.eclipse.wtp.feature.feature.group 0.10.0' but it could not be found

It turns out that the Maven/Seam plugin is dependent on Maven Integration for WTP. m2eclipse keeps this plugin on a separate update site for extra plugins which I hadn’t added. Eclipse only searches update sites added in the preferences when resolving dependencies.

Just add http://m2eclipse.sonatype.org/sites/m2e-extras to your update sites to fix this error.

Flex: Customizing data tip location and behavior in a LineChart

The Flex LineChart control has a feature to display pop-up “data tips” when the user hovers near a data point in the chart. These are basically just tooltips with information about the x and y values at the given point. Unfortunately, Flex offers little in the way of customizing when and how these data tips display. For example, the following is a LineChart using the horizontal-step style:

LineChart with circled data points

In a horizontal step chart, a line is drawn horizontally to the right of each data point, and vertically at each change in value. The circles around each data point indicate the area where hovering the mouse would produce a data tip. No other areas on the chart produce a data tip and this can be slightly confusing. The user might wonder why they can’t hover at other bends in the line to see the current value. Other users might want to simply hover anywhere along the line.

Continue reading