This file contains 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
fanrs=> explain analyze SELECT "creators"."id", "creators"."name", "creators"."slug", count(distinct episodes_by.episode_id), count(distinct covers_by.id), min(magic), max(magic) FROM (("creators" inner JOIN (((("creator_aliases" LEFT OUTER JOIN ("episodes_by" LEFT OUTER JOIN "episode_parts" ON "episodes_by"."episode_id" = "episode_parts"."episode") ON "episodes_by"."by_id" = "creator_aliases"."id") LEFT OUTER JOIN "articles_by" ON "articles_by"."by_id" = "creator_aliases"."id") LEFT OUTER JOIN "publications" ON ("publications"."episode_part" = "episode_parts"."id" OR "publications"."article_id" = "articles_by"."article_id")) LEFT OUTER JOIN "covers_by" ON "covers_by"."by_id" = "creator_aliases"."id") ON "creator_aliases"."creator_id" = "creators"."id") LEFT OUTER JOIN "issues" ON ("issues"."id" = "publications"."issue" OR "issues"."id" = "covers_by"."issue_id")) GROUP BY "creators"."id", "creators"."name", "creators"."slug" ORDER BY "creators"."name"; | |
This file contains 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; | |
use std::ops::{Index, IndexMut}; | |
struct NucleotideCounts { | |
counts: [u64; 4], | |
} | |
impl NucleotideCounts { | |
fn new() -> Self { | |
NucleotideCounts { counts: [0; 4] } |
This file contains 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::sync::mpsc::{Receiver, channel}; | |
use std::thread::spawn; | |
fn main() { | |
let (tx, rx) = channel(); | |
spawn(move || { | |
for i in 2..(<u32>::max_value()) { | |
tx.send(i).unwrap(); | |
} | |
}); |