This file contains hidden or 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
// source: https://github.com/serde-rs/json | |
let data = r#"{ | |
"name": "John Doe", | |
"age": 43, | |
"phones": [ | |
"+44 1234567", | |
"+44 2345678" | |
] | |
}"#; |
This file contains hidden or 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
//source: https://github.com/alexcrichton/toml-rs/blob/master/examples/decode.rs | |
let toml_str = r#" | |
global_string = "test" | |
global_integer = 5 | |
[server] | |
ip = "127.0.0.1" | |
port = 80 | |
[[peers]] | |
ip = "127.0.0.1" | |
port = 8080 |
This file contains hidden or 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
#![allow(unused)] | |
fn main() { | |
let string = r##"He said, "I want to include "# in the sentence"."##; // " He said, "I want to include "# in the sentence". | |
println!("{}", string); | |
} |
This file contains hidden or 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
#![allow(unused)] | |
fn main() { | |
let string1 = r#"""#; // " | |
let string2 = r#""""""""#; // """""" | |
let string3 = r#"He asked,"Is rust awesome?""#; // He asked,"Is rust awesome?" | |
println!("{}", string1); | |
println!("{}", string2); | |
println!("{}", string3); | |
} |
This file contains hidden or 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
#![allow(unused)] | |
fn main() { | |
let string1 = r""; // nothing | |
let string2 = r"#"; // # | |
let string3 = r" _ there are spaces here _ "; // _ there are spaces here _ | |
println!("{}", string1); | |
println!("{}", string2); | |
println!("{}", string3); | |
} |
This file contains hidden or 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 <ESP8266WiFi.h> | |
#include <WiFiClient.h> | |
#include <Thing.h> | |
#include <WebThingAdapter.h> | |
const char* ssid = <>; | |
const char* password = <>; | |
const int lampPin = 13; |
This file contains hidden or 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
/* | |
Firmata is a generic protocol for communicating with microcontrollers | |
from software on a host computer. It is intended to work with | |
any host computer software package. | |
To download a host software package, please click on the following link | |
to open the list of Firmata client libraries in your default browser. | |
https://github.com/firmata/arduino#firmata-client-libraries |
This file contains hidden or 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
/* | |
Firmata is a generic protocol for communicating with microcontrollers | |
from software on a host computer. It is intended to work with | |
any host computer software package. | |
To download a host software package, please click on the following link | |
to open the list of Firmata client libraries in your default browser. | |
https://github.com/firmata/arduino#firmata-client-libraries |