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
def recsort(i, ll, list0): | |
if len(list0) == 0: | |
return list0 | |
list2[i] = min(list0) | |
list2[ll-i-1] = max(list0) | |
del list0[list0.index(min(list0))] | |
del list0[list0.index(max(list0))] | |
print(list0) | |
print(list2) | |
i += 1 |
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
"Header Guard": { | |
"prefix": "#ifndef", | |
"body": [ | |
"#ifndef $0${2:MACRO} // header guard", | |
"#define ${2:MACRO}", | |
"", | |
"", | |
"", | |
"#endif", | |
], |
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
// Dehan Lamprecht, 2020 | |
// Allows changing the settings of the HC-05 module | |
// Adapted from https://www.instructables.com/id/Program-an-Arduino-Wireless-Over-Bluetooth/ | |
#include <SoftwareSerial.h> | |
SoftwareSerial BTSerial(2, 3); // RX | TX | |
void setup() { | |
// Set PIN 9 to HIGH for getting HC-05 into AT mode | |
// Check Step 4 of link for instructions |
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
// Dehan Lamprecht, 2020 | |
// Allows changing the settings of the HM-10 (or MLT-BT05) module | |
// Adapted from http://www.martyncurrey.com/hm-10-bluetooth-4ble-modules/ | |
#include <SoftwareSerial.h> | |
SoftwareSerial BTSerial(2, 3); // RX | TX | |
char c=' '; | |
boolean NL = true; | |
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
use std::env; | |
fn main() { | |
let var = env::var("SOME_VAR"); | |
println!("SOME_VAR: {var:?}"); | |
} | |
// When SOME_VAR is define in .zshrc: | |
/* | |
~/Developer/envtest |