22 May '12, 1pm

sidenum function

The sidenum function appends a sign to a number based on a side. The name sidenum was chosen due to it's similarities with signum in spelling and behavior (dealing with signs). Definition The sidenum function of a side x and a number y is defined as follows: note: 'bid' can be replaced with 'buy', and 'ask' can be replaced with 'sell' or 'offer'. The string representation or type of side varies by trading system. Usage The sidenum function appears in most trading applications, though not always named 'sidenum'. It can be helpful for both position related math and conserving screen real-estate by displaying 2 concepts (side & quantity) as 1 (a signed quantity). Examples Java public static int sidenum(String side, int quantity) { if (side.equals("ask")) return -quantity; return quantity; } Clojure (defn sidenum [side quantity] (if (= side "ask") (- quantity) quantity)) Ruby ...

Full article: http://blog.jayfields.com/2012/05/sidenum-function.html

Tweets

jQuery find function

blog.jayfields.com 17 May '12, 1pm

on a few different projects. At one point I ran into a situation where I wanted to change all of the visible rows as well ...

Federal-Mogul hybrid liner for cylinders reduce...

element14.com 19 May '12, 5pm

Federal-Mogul Corporation is increasingly using a dual-material cylinder liner technology to reduce bore distortion and im...