Tip Bank

DevX

Call a Java Method from XQuery

This tip shows you how to develop XQuery queries that may call any other method. The method called in this tip is java.lang.Math.random: declare namespace m=”java:java.lang.Math”;let $r:=m:random()return $r

DevX

Optimize C++ Code with Member Initializers

Calling constructors for the data members of the object of a class results in an overhead process which calls the constructor in the main function. You can reduce this overhead

DevX

Calculate the Angle Between Two Lines

This code shows you how to calculate the angle between two lines using vectors and an inverse cosine function: Public Function getAngleBetweenLinesVect(commonX As Single, commonY As Single, X1 As Single,