PostgreSQL Type | PostgreSQL Size | Description | Range | Diesel Type | Rust Type |
---|---|---|---|---|---|
Nullable Types | nullable | Nullable `` |
pub fn quick_sort<T: Clone + PartialOrd>(arr: &[T]) -> Vec<T> { | |
if arr.len() <= 1 { | |
return arr.to_vec(); | |
} | |
if arr.len() == 2 { | |
let a = arr[0].clone(); | |
let b = arr[1].clone(); | |
return if a < b { vec![a, b] } else { vec![b, a] }; |
use std::collections::HashMap; | |
const TOP_COUNT: usize = 3; | |
type CountMap<'a> = HashMap<&'a str, usize>; | |
fn worlds_count<'a>(query: &'a str, keys: &mut CountMap<'a>) { | |
let words = query.split(" ").map(|c| c.trim()).collect::<Vec<_>>(); | |
for w in words { |
#!/bin/bash | |
if [[ -z $1 ]]; then | |
echo 'Set ./target/debug/<programm_name> as argument' | |
else | |
sudo rr record -n $1 | |
sudo rr replay -d rust-gdb ~/.local/share/rr/latest-trace | |
fi |
IMAGE node:argon | |
RUN mkdir -p /usr/app | |
COPY . /usr/app | |
WORKDIR /usr/app | |
RUN npm install |
extern crate hyper; | |
extern crate core; | |
use std::io::Read; | |
use hyper::Client; | |
use hyper::header::Connection; | |
use hyper::header::Basic; | |
use hyper::header::Headers; | |
use core::str::FromStr; |
⇐ back to the gist-blog at jrw.fi
Or, 16 cool things you may not have known your stylesheets could do. I'd rather have kept it to a nice round number like 10, but they just kept coming. Sorry.
I've been using SCSS/SASS for most of my styling work since 2009, and I'm a huge fan of Compass (by the great @chriseppstein). It really helped many of us through the darkest cross-browser crap. Even though browsers are increasingly playing nice with CSS, another problem has become very topical: managing the complexity in stylesheets as our in-browser apps get larger and larger. SCSS is an indispensable tool for dealing with this.
This isn't an introduction to the language by a long shot; many things probably won't make sense unless you have some SCSS under your belt already. That said, if you're not yet comfy with the basics, check out the aweso