Reference - Data handling - shuffle


App: manual - Page: miscellaneous/handling


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/shuffle_keeps_the_keys_of_keyed_rows
PHP
HTML
options/shuffle_keeps_the_keys_of_keyed_rows.pad
Result
{data 'prices'}{"pear":3,"apple":1,"fig":2}{/data}{prices shuffle, sort}{&key},{/prices}


App: regression/framework - Page: options/shuffle_keeps_them_all_in_some_order
PHP
HTML
options/shuffle_keeps_them_all_in_some_order.pad
Result
{data 'n'}
[1,2,3]
{/data}
{n shuffle}
x
{/n}


App: regression/pages - Page: catalog/handling
PHP
HTML
catalog/handling.pad
Result
dedup:   {data 'hN'}[1,1,2,2,3]{/data}{hN dedup}{$hN},{/hN}
reverse: {data 'hR'}[1,2,3]{/data}{hR reverse}{$hR},{/hR}
shuffle: {data 'hS'}[5]{/data}{hS shuffle}{$hS},{/hS}
slice: {data 'hL'}[1,2,3,4,5,6]{/data}{hL slice=2}{$hL},{/hL}
sort: {data 'hO'}[3,1,2]{/data}{hO sort}{$hO},{/hO}
splice: {data 'hP'}[1,2,3,4,5,6]{/data}{hP splice=2}{$hP},{/hP}
trim: {data 'hT'}[1,2,3,4]{/data}{hT trim=1}[{$hT}]{/hT}