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
;; Assumes D3 is provided as foreign lib. Add following to :compiler section of build. | |
;; :foreign-libs [{:file "lib/d3.v5.js" | |
;; :provides ["d3"] | |
;; :requires ["d3"]}] | |
;; Then (require [d3]) in the code namespace. | |
(def performance-data [{:group 0 | |
:name "Update()" | |
:start 200 | |
:end 240} | |
{:group 0 |
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::str::from_utf8; | |
fn main() { | |
println!( | |
"{}", | |
read_proto_raw(&[0x12, 0x07, 0x74, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67]).unwrap() | |
); | |
println!( | |
"{}", | |
read_proto_raw(&[0x1a, 0x03, 0x08, 0x96, 0x01]).unwrap() |
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
#include <iostream> | |
#include <map> | |
#include <memory> | |
using Formula = std::map<std::string, int>; | |
class ParseContext { | |
public: | |
ParseContext(const std::string& string, int position): | |
string_(string), position_(position) {} |
OlderNewer