Node.js tutorial part 2; building a proper website

Your first fully functional Node.js application

In the first part of this tutorial we set up a development environment. As you have noticed there, the core of a Node.js application is a server side Javascript file. You will be editing this file a lot and along the while it will grow accordingly.

I think the first step you will take, is change your code so that node.js serves a proper website. This (more...)

Enforce the HTML5 max attribute of input items with JavaScript

The HTML5 max and min attribute on input items

The max attribute is introduced in HTML5 and specifies the maximum value for an <input> element. Unfortunately, it doesn’t enforce the maximum value entered when typing in numbers as you might expect.

The syntax for the HTML element is as follows:

<input max=”number|date“>

With a small JavaScript function it’s possible to make sure no value larger than the max value (or smaller (more...)

How to compare Mongo _id’s in Javascript

How to compare Mongo _id’s in Javascript

When comparing MongoDB generated _id fields in Javascript, you’ll soon or later find out that the following code will not give expected results:

var id1 = mongoose.Types.ObjectId('58a0625246cb87062919eb62');
var id2 = mongoose.Types.ObjectId('58a0625246cb87062919eb62');
if (id1===id2) {
 console.log('elements are equal but we dont get here!' );

Although this appears a valid comparison, the console.log will never be printed. ObjectId’s are objects, and although (more...)

using XPath functions in the BPEL Process manager

When using XPath expressions in XSLT, and you want to use one of the following functions:

  • getProperty(propertyName as string)
  • setCompositeInstanceTitle(titleElement)
  • getComponentInstanceID()
  • getComponentName()
  • getCompositeInstanceID()
  • getCompositeName()
  • getECID()

You can use these in the Oracle Mediator XSLT mapper only, and not Oracle BPEL Process Manager. For Oracle BPEL Process Manager, you have to  use an assign activity.