Click here to Skip to main content
15,898,987 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: Justice for a Coffee Thief Pin
Brady Kelly2-Oct-13 19:53
Brady Kelly2-Oct-13 19:53 
GeneralRe: Justice for a Coffee Thief Pin
jschell2-Oct-13 9:08
jschell2-Oct-13 9:08 
GeneralChickens and Eggs Pin
Nagy Vilmos2-Oct-13 0:32
professionalNagy Vilmos2-Oct-13 0:32 
GeneralRe: Chickens and Eggs Pin
OriginalGriff2-Oct-13 0:44
mveOriginalGriff2-Oct-13 0:44 
GeneralRe: Chickens and Eggs Pin
Keith Barrow2-Oct-13 1:00
professionalKeith Barrow2-Oct-13 1:00 
GeneralRe: Chickens and Eggs Pin
Nagy Vilmos2-Oct-13 2:39
professionalNagy Vilmos2-Oct-13 2:39 
GeneralRe: Chickens and Eggs Pin
Keith Barrow2-Oct-13 3:06
professionalKeith Barrow2-Oct-13 3:06 
GeneralRe: Chickens and Eggs Pin
Nagy Vilmos2-Oct-13 3:47
professionalNagy Vilmos2-Oct-13 3:47 
This is a fun project. Even though I am using it in several bits of work I'm doing, the idea is a flexible framework. The evaluator is used mostly in the server but going forward I will be using it to provide customisable functionality to the user as well.

As an example, to set the colour of a row depending on if it has a positive or negative amount, something like:
background = (balance < 0) ? "#FF0000" : ((balance > 0) ? "#0000FF" : "#00FF00"))

Simples!

The functions provide parametrised evaluations, so the above could use a function like:

background = [colorByValue balance "#FF0000" "#0000FF" "#00FF00"]

#Function:
colorByValue {
    description - return the colour depending on if the value is negative, positive or zero
    arguments - value negative positive zero
    expression - (value < 0) ? negative : ((value > 0) ? positive : zero))
}


Added onto that, it allows for functions to be defined that don't use expressions but call out to standard java classes added into the function library. Hence I've plugged in maths support for sine, cosine, tangents and pi as well as a few other bobs and bits. Loops are next Big Grin | :-D
speramus in juniperus

GeneralRe: Chickens and Eggs Pin
vonb2-Oct-13 1:10
vonb2-Oct-13 1:10 
GeneralRe: Chickens and Eggs Pin
Brady Kelly2-Oct-13 1:47
Brady Kelly2-Oct-13 1:47 
GeneralRe: Chickens and Eggs Pin
Nagy Vilmos2-Oct-13 2:54
professionalNagy Vilmos2-Oct-13 2:54 
GeneralRe: Chickens and Eggs Pin
Brady Kelly2-Oct-13 3:08
Brady Kelly2-Oct-13 3:08 
JokeRe: Chickens and Eggs Pin
Richard Deeming2-Oct-13 2:14
mveRichard Deeming2-Oct-13 2:14 
GeneralRe: Chickens and Eggs Pin
PIEBALDconsult2-Oct-13 3:23
mvePIEBALDconsult2-Oct-13 3:23 
GeneralRe: Chickens and Eggs Pin
Nagy Vilmos2-Oct-13 3:55
professionalNagy Vilmos2-Oct-13 3:55 
GeneralRe: Chickens and Eggs Pin
Roger Wright2-Oct-13 6:27
professionalRoger Wright2-Oct-13 6:27 
GeneralRe: Chickens and Eggs Pin
jschell2-Oct-13 9:11
jschell2-Oct-13 9:11 
GeneralReboot Warning PinPopular
Dalek Dave1-Oct-13 23:50
professionalDalek Dave1-Oct-13 23:50 
GeneralRe: Reboot Warning Pin
grralph11-Oct-13 23:54
grralph11-Oct-13 23:54 
GeneralRe: Reboot Warning Pin
BillWoodruff2-Oct-13 0:26
professionalBillWoodruff2-Oct-13 0:26 
GeneralRe: Reboot Warning Pin
Nagy Vilmos2-Oct-13 0:26
professionalNagy Vilmos2-Oct-13 0:26 
GeneralRe: Reboot Warning Pin
charlieg2-Oct-13 0:46
charlieg2-Oct-13 0:46 
GeneralRe: Reboot Warning PinPopular
OriginalGriff2-Oct-13 0:57
mveOriginalGriff2-Oct-13 0:57 
GeneralRe: Reboot Warning PinPopular
Mark_Wallace2-Oct-13 1:01
Mark_Wallace2-Oct-13 1:01 
GeneralRe: Reboot Warning Pin
vonb2-Oct-13 1:13
vonb2-Oct-13 1:13 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Straw Poll

Were you affected by the geomagnetic storms this past weekend?
Communication disruptions, electrified pipes, random unexplained blue-screens in Windows - the list of effects is terrifying.
  Results   441 votes