Reference - Data handling - negative


App: manual - Page: miscellaneous/handling


App: regression/framework - Page: options/a_bare_row_is_the_first_row
PHP
HTML
options/a_bare_row_is_the_first_row.pad
Result
{data 'n'}
[1,2,3]
{/data}
[{n row}
{$n},
{/n}][{n row=2}
{$n},
{/n}][{n row, negative}
{$n},
{/n}]


App: regression/framework - Page: options/an_at_start_level_negative_and_first_left_without_rows_renders_nothing
PHP
HTML
options/an_at_start_level_negative_and_first_left_without_rows_renders_nothing.pad
Result
{data 'd'}[{"n":"a"},{"n":"b"},{"n":"c"}]{/data}<{d negative, first=3}pre @start@x@end@ post{/d}>


App: regression/framework - Page: options/dedup_turned_negative_keeps_the_repeats
PHP
HTML
options/dedup_turned_negative_keeps_the_repeats.pad
Result
{data 'n'}
[1,1,2,3,2,1]
{/data}
[{n dedup}
{$n},
{/n}][{n dedup, negative}
{$n},
{/n}]


App: regression/framework - Page: options/group_runs_in_order_with_sort_and_first
PHP
options/group_runs_in_order_with_sort_and_first.php
HTML
options/group_runs_in_order_with_sort_and_first.pad
Result
<?php

$orders
= [
[
"number" => 1, "customer" => "bob", "total" => "10.10" ],
[
"number" => 2, "customer" => "alice", "total" => 20 ],
[
"number" => 3, "customer" => "bob", "total" => "20.20" ],
[
"number" => 4, "customer" => "alice", "total" => 7 ],
[
"number" => 5, "customer" => "carol", "total" => 1 ]
];

?>
{orders sort='total', group='customer'}[{$customer}:{rows}{$number}{/rows}]{/orders}|{orders group='customer', sum='total', sort='total DESC', first=2}[{$customer} {$total}]{/orders}|{orders group='customer', where='$count gt 1', negative}{$customer}{/orders}


App: regression/framework - Page: options/last_zero_keeps_no_row_as_first_zero_does
PHP
HTML
options/last_zero_keeps_no_row_as_first_zero_does.pad
Result
{data 'u'}[1,2,3]{/data}[{u first=0}{$u}{/u}][{u last=0}{$u}{/u}][{u last=0, negative}{$u}{/u}][{u last=2}{$u}{/u}]


App: regression/framework - Page: options/negative_inverts_the_selection_and_leaves_the_order_alone
PHP
HTML
options/negative_inverts_the_selection_and_leaves_the_order_alone.pad
Result
{data 'xs'}
[3,1,4,2]
{/data}
[{xs where='$xs gt 2', sort='xs', negative}{$xs}{/xs}]
[{xs first=2, reverse, negative}{$xs}{/xs}]


App: regression/framework - Page: options/negative_inverts_the_window_page_or_start_cut_with_rows_or_end
PHP
HTML
options/negative_inverts_the_window_page_or_start_cut_with_rows_or_end.pad
Result
{data 'n'}
[1,2,3,4,5]
{/data}
[{n page=2, rows=2, negative}
{$n},
{/n}][{n rows=2, page=2, negative}
{$n},
{/n}][{n start=2, end=3, negative}
{$n},
{/n}][{n start=2, rows=2, negative}
{$n},
{/n}][{n end=-1, rows=2, negative}
{$n},
{/n}][{n rows=2, negative}
{$n},
{/n}]


App: regression/framework - Page: options/negative_keeps_the_rows_outside_a_window_sized_beside_it
PHP
HTML
options/negative_keeps_the_rows_outside_a_window_sized_beside_it.pad
Result
{data 'xs'}
[1,2,3,4,5,6]
{/data}
[{xs page=2, rows=2, negative}{$xs}{/xs}]
[{xs start=2, end=4, negative}{$xs}{/xs}]
[{xs end=3, rows=2, negative}{$xs}{/xs}]


App: regression/framework - Page: options/negative_keeps_what_the_option_would_have_dropped
PHP
HTML
options/negative_keeps_what_the_option_would_have_dropped.pad
Result
{data 'n'}
[1,2,3,4,5,6]
{/data}
{n first=2, negative}
{$n},
{/n}


App: regression/framework - Page: options/negative_leaves_sort_reverse_and_shuffle_their_rows
PHP
HTML
options/negative_leaves_sort_reverse_and_shuffle_their_rows.pad
Result
{data 'n'}
[3,1,5,2,4]
{/data}
[{n where='$n gt 2', sort, negative}
{$n},
{/n}][{n first=2, reverse, negative}
{$n},
{/n}][{n sort, last=2, negative}
{$n},
{/n}][{n first=3, shuffle, negative}
x
{/n}]


App: regression/framework - Page: options/where_turned_negative_keeps_the_rest
PHP
HTML
options/where_turned_negative_keeps_the_rest.pad
Result
{staff where='$salary gt 2500', negative}{$name} {/staff}


App: regression/framework - Page: properties/where_sees_each_row_with_its_key_and_its_place
PHP
HTML
properties/where_sees_each_row_with_its_key_and_its_place.pad
Result
{data 'xs'}[{"n":1},{"n":2},{"n":3},{"n":4}]{/data}{data 'ks'}{"a":{"v":1},"b":{"v":2},"c":{"v":3}}{/data}
even:[{xs where='even@xs'}{$n}{/xs}] first:[{xs where='first@xs'}{$n}{/xs}] last:[{xs where='last@xs'}{$n}{/xs}] current:[{xs where='current@xs gt 2'}{$n}{/xs}] count:[{xs where='$n gt 2 and count@xs eq 4'}{$n}{/xs}] key:[{ks where='key@ks ne "b"'}{$v}{/ks}] negative:[{ks where='key@ks eq "b"', negative}{$v}{/ks}] after:[{xs where='even@xs'}{current@xs}:{$n},{/xs}]


App: regression/framework - Page: sequence/element_with_negative_keeps_every_entry_but_the_nth
PHP
HTML
sequence/element_with_negative_keeps_every_entry_but_the_nth.pad
Result
{sequence '1..6', element=2, negative}{$sequence} {/sequence}|{sequence '1..6', reverse, element=2}{$sequence} {/sequence}


App: regression/framework - Page: sequence/first_with_negative_inverts_it
PHP
HTML
sequence/first_with_negative_inverts_it.pad
Result
{sequence '1..10', push='nums'/}
{pull:nums first=3, negative}
{$sequence},
{/pull:nums}