Skip to content

Instantly share code, notes, and snippets.

# Add libm to your Cargo dependencies for floating-point operations.
#![no_main]
#![no_std]
extern crate panic_halt as _;
use core::{f32::consts::PI, fmt::Write, primitive};
use cortex_m_rt::entry;
use libm;
#!/usr/bin/env python
# graph https://en.wikipedia.org/wiki/Dijkstra%27s_algorithm#/media/File:Dijkstra_Animation.gif
# for example, graph[1][2] is the distance from node 1 to 2
graph = {
1: {2:7, 3:9, 6:14},
2: {1:7, 3:10, 4:15},
3: {1:9, 2:10, 4:11, 6:2},
4: {2:15, 3:11, 5:6},
#include <iostream>
using namespace std;
int main() {
int *p = new int(5);
delete p;
int *q = new int(7);
cout << *p;
cout << "p == q: " << p == q ? "true" : "false";

Keybase proof

I hereby claim:

  • I am ericye16 on github.
  • I am ericye16 (https://keybase.io/ericye16) on keybase.
  • I have a public key whose fingerprint is 2281 D386 1ECA A1FF 907F F50A 075F 5148 04A4 E711

To claim this, I am signing this object: