Kwebble : Blog

Programming

  • A trim() method for the JavaScript String class

    Gepubliceerd op 25 juni 2010 in Programming.

    Just rediscovered that IE still doesn’t include the trim() method on the String class. Here’s a snippet of code, based on an answer on StackOverflow, to make sure there’s a trim method available:

    if (typeof String.prototype.trim !== 'function') {
        String.prototype.trim = function() {
            return this.replace(/^\s\s*/, '').replace(/\s\s*$/, '');
        }
    }
    

    On the positive side I also found out about the debugger included in IE 8. Just like Firebug, available via F12!

    • javascript
  • Tip: use the axis:axis:1.4 Maven artifact if you need Axis 1.4 support

    Gepubliceerd op 29 december 2009 in Programming.

    For a Java program that can be run from the command line I used the Maven Assembly plugin to generate a JAR file with all dependencies included.

    Although the build was successful, running the software generated a NoClassDefFoundError, caused somewhere in Axis. After a lot of time I finally found some information about the existence of two Axis artifacts in the central Maven repository. Axis 1.4 is available under groupid axis and org.apache.axis.

    The POM file of the axis:axis:1.4 artifact includes a number of runtime dependencies, which are not included in the other. Since I used the incomplete version the resulting JAR missed some necessary classes.

    So if you use Axis 1.4, define a dependency on the axis:axis:1.4 artifact, not org.apache.axis:axis:1.4.

    • axis
    • java
    • maven
    • maven assembly
  • Google Closure tools

    Gepubliceerd op 6 november 2009 in Programming.

    Google announced the availability of Google Closure Tools, a set of JavaScript tools to help development of web applications. The set contains:

    • Closure Compiler: a JavaScript optimizer
    • Closure Library: a JavaScript library with reusable UI widgets and controls, utilities for the DOM, server communication, animation, data structures, unit testing, rich-text editing etc.
    • Closure Templates: a client- and server-side templating system that helps you dynamically build reusable HTML and UI elements.
    • javascript
  • Simple Cloud API

    Gepubliceerd op 23 september 2009 in Programming.

    A new initiative called Simple Cloud API aims to give PHP developers easier access to cloud technologies. The project will produce a new Zend_Cloud component for the Zend Framework.

    From the FAQ:

    The Simple Cloud API is an open source project that makes it easier for developers to use cloud application services by abstracting insignificant API differences. One of the design goals of the project is to encourage innovation. To this end, the Simple Cloud API can be used for common operations while users can easily drop down to vendor libraries to access value-add features.

    • api
    • cloud
    • php
    • zend framework
  • Showing related articles in a WordPress blog

    Gepubliceerd op 16 juli 2009 in Programming.

    A few days ago I made a small change to the site. On pages showing a single article, the sidebar now shows a list of related articles on the site. By exposing these articles I hope visitors will find other interesting stuff to explore on this site.

    The WordPress plugins to add related articles I found seemed a bit to complex to me, so I was glad I found some PHP code to do the same. This code looks for other articles with the same tags as the displayed article. I changed it a bit into a separate part that retrieves the articles and a part to display them.

    The only thing I need to do now is to tag all the older articles, since I only started tagging recently.

    • php
    • wordpress
  • GMarker title deactivates mouseover event

    Gepubliceerd op 8 juli 2009 in Programming.

    Quick tip for Google Maps developers: the mouseover event of a GMarker doesn’t fire when the marker has a title. This isn’t mentioned in the mouseover documentation.

    • googlemaps
    • javascript
  • NoSQL

    Gepubliceerd op 2 juli 2009 in Programming.

    SQL isn’t always the best solution for data storage. The NoSQL movement is getting more attention, with a Meetup held not long ago.

    • architecture
    • data
    • nosql
    • storage
    • trends
  • Microsoft as OpenId provider, but when as a consumer?

    Gepubliceerd op 28 oktober 2008 in Programming.

    Microsoft announced the public availability of a preview of the Windows Live ID OpenID Provider. For users, having more providers is nice, but you only need 1. To make the system work you want all sites you use to accept that ID. So it’s not only the availability of more providers, more important is getting sites to be OpenID consumers and letting users log in with their portable ID.

    • openid
  • Ramsay Millar on trends in software process improvement

    Gepubliceerd op 23 oktober 2008 in Programming.

    An interesting read is this DDJ article by Ramsay Millar in which he describes these trends he sees happening in software process improvement:

    • A shift towards more collaborative, role-based teamwork and away from the “lone wolf” IT culture of code-and-fix.
    • A wish to close the gap between business requirements and software delivery by applying an agile process and best-of-breed automation to the entire software development life cycle.
    • An increasing acceptance and sophistication of the Unified Modeling Language (UML) standard.
    • software development
    • trends
  • Stack Overflow

    Gepubliceerd op 26 september 2008 in Programming.

    Forgot to mention this, but recently the new programmers community Stack Overflow came out of beta and now is available to everyone. This collaboratively edited question and answer site for programmers could grow into a valuable resource for connecting programmers worldwide.

    • community
    • faq
    • Programming
    • social network
  • « Oudere artikelen
  • Rubrieken

    • Artikelen
    • Foto's
    • Links
    • Media
    • Overheid
    • Programming
  • Recente Berichten

    • A trim() method for the JavaScript String class
    • Is u iets opgevallen?
    • Tip: use the axis:axis:1.4 Maven artifact if you need Axis 1.4 support
    • Google Closure tools
    • Google en Microsoft indexeren tweets
  • Abonneren

    • Atom feed Artikelen
    • Atom feed Reacties
  • Archief

© Rob Schlüter - Contact