| Shortcut | Description |
|---|---|
SPC f e d |
Open Configuration |
SPC f e R |
Reload Configuration |
SPC SPC |
Search Emacs |
SPC h SPC |
Search Spacemacs Layer |
SPC f s |
Save Buffer |
SPC q q |
Quit Emacs w/ Prompt |
SPC q Q |
Quit Emacs w/o Prompt |
| #![allow(unused)] | |
| fn main() { | |
| use std::collections::HashSet; | |
| let a: HashSet<_> = [1, 2, 3].iter().cloned().collect(); | |
| let b: HashSet<_> = [4, 2, 3, 4].iter().cloned().collect(); | |
| // Can be seen as `a - b`. | |
| for x in a.difference(&b) { | |
| println!("{}", x); // Print 1 | |
| } |
| #![allow(unused)] | |
| fn main() { | |
| use std::collections::HashSet; | |
| let a: HashSet<_> = [1, 2, 3].iter().cloned().collect(); | |
| let b: HashSet<_> = [4, 2, 3, 4].iter().cloned().collect(); | |
| // Can be seen as `a - b`. | |
| for x in a.difference(&b) { | |
| println!("{}", x); // Print 1 | |
| } |
| use std::collections::{HashMap, HashSet}; | |
| fn build_graph(classes: Vec<Vec<String>>) -> Vec<HashSet<usize>> { | |
| let mut animal_to_classes = HashMap::new(); | |
| let mut graph = vec![HashSet::new(); classes.len()]; | |
| for (i, cls) in classes.iter().enumerate() { | |
| for animal in cls.iter() { | |
| let set = animal_to_classes.entry(animal).or_insert(HashSet::new()); | |
| set.insert(i); | |
| } |
| # selenium for web driving | |
| import selenium | |
| from selenium import webdriver | |
| # time for pausing between navigation | |
| import time | |
| # Datetime for recording time of submission | |
| import datetime |
⚠️ 2019-2020: See more examples and updates on my article here!
For a brief user-level introduction to CMake, watch C++ Weekly, Episode 78, Intro to CMake by Jason Turner. LLVM’s CMake Primer provides a good high-level introduction to the CMake syntax. Go read it now.
After that, watch Mathieu Ropert’s CppCon 2017 talk Using Modern CMake Patterns to Enforce a Good Modular Design (slides). It provides a thorough explanation of what modern CMake is and why it is so much better than “old school” CMake. The modular design ideas in this talk are based on the book [Large-Scale C++ Software Design](https://www.amazon.de/Large-Scale-Soft
Crates ordered by the number of dependent crates that were newly added to crates.io since the begining of April
- serde 39
- clap 35
- serde_json 34
- serde_derive 34
- libc 32
- log 27
- rand 25
- lazy_static 25
FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.
- By Edmond Lau
- Highly Recommended 👍
- http://www.theeffectiveengineer.com/