fix for or filter
This commit is contained in:
+2
-2
@@ -143,7 +143,7 @@ function private.median(list)
|
||||
if getn(list) == 0 then
|
||||
return
|
||||
end
|
||||
|
||||
|
||||
local middle = (getn(list) + 1) / 2
|
||||
return (list[floor(middle)] + list[ceil(middle)]) / 2
|
||||
end
|
||||
@@ -160,7 +160,7 @@ function private.push_data()
|
||||
|
||||
local daily_market_value = private.daily_market_value(item_record.histogram)
|
||||
|
||||
private.balanced_list_insert(item_record.balanced_list, daily_market_value, 7)
|
||||
private.balanced_list_insert(item_record.balanced_list, Aux.round(daily_market_value), 9)
|
||||
|
||||
item_record.day_count = item_record.day_count + 1
|
||||
item_record.histogram = {}
|
||||
|
||||
+4
-2
@@ -293,9 +293,11 @@ function m.validator(filter)
|
||||
for i=getn(filter.tooltip),1,-1 do
|
||||
local op = strupper(filter.tooltip[i])
|
||||
if op == 'AND' then
|
||||
tinsert(stack, tremove(stack) and tremove(stack))
|
||||
local a, b = tremove(stack), tremove(stack)
|
||||
tinsert(stack, a and b)
|
||||
elseif op == 'OR' then
|
||||
tinsert(stack, tremove(stack) or tremove(stack))
|
||||
local a, b = tremove(stack), tremove(stack)
|
||||
tinsert(stack, a or b)
|
||||
elseif op == 'NOT' then
|
||||
tinsert(stack, not tremove(stack))
|
||||
elseif op ~= 'TT' then
|
||||
|
||||
Reference in New Issue
Block a user