This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function sort(i,c) { | |
| var o = [], r = i.length; | |
| i.forEach(function(v) { | |
| setTimeout(function() { | |
| o.push(v); | |
| if(0 === --r) { | |
| c(o); | |
| } | |
| }, v); | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| license: mit |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| use std::{fmt, mem, slice, str}; | |
| use std::ops::Deref; | |
| const HEAP_STRING_FLAG: u8 = 1u8 << 7; | |
| const MAX_INLINE_LENGTH: usize = 15; | |
| #[repr(packed)] | |
| #[derive(Default)] | |
| pub struct CompactString { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- A percent of total calculation using a joined, aggregated subquery | |
| select state | |
| , county | |
| , 100 * population / state_population as pct_state_population | |
| from census | |
| join (select state, sum(population) state_population from census group by 1) using (state) | |
| ; | |
| -- A percent of total calculation using a windowed aggregate | |
| select state |
OlderNewer