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
fn escape_str<W: fmt::Write>(mut f: W, mut s: &str, replacements: &[(u8, &str)]) -> fmt::Result { | |
while !s.is_empty() { | |
let (idx, replacement) = s | |
.as_bytes() | |
.iter() | |
.enumerate() | |
.find_map(|(i, c)| { | |
replacements | |
.iter() | |
.find(|(r, _)| c == r) |
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 test::Bencher; | |
#[derive(Debug)] | |
pub struct Rate { | |
pub id: u8, | |
pub from: String, | |
pub to: String, | |
pub exchange: String, | |
pub rate: f64, | |
pub vol: f64, |
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
import java.util.*; | |
import java.util.stream.Collectors; | |
public class RelearnJava { | |
public static void main(String[] args) { | |
{ | |
Scanner scanner = new Scanner(System.in); | |
String s = scanner.next(); | |
int a = scanner.nextInt(); | |
long l = scanner.nextLong(); |
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
<template> | |
<pre><code :style="{ tabSize, fontSize: `${fontSize}px` }" :class="['hljs', lang]" v-html="formattedCode"></code></pre> | |
</template> | |
<script lang="ts"> | |
import { Component, Prop, Vue, Watch } from 'vue-property-decorator'; | |
import hljs from 'highlight.js'; | |
import highlightLines from './highlightLines'; | |
@Component |
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
format: | |
.Lfunc_begin63: | |
.loc 20 28 0 is_stmt 1 | |
.fnstart | |
.cfi_startproc | |
.save {r4, r5, r6, r7, r8, r9, r11, lr} | |
push {r4, r5, r6, r7, r8, r9, r11, lr} | |
.cfi_def_cfa_offset 32 | |
.cfi_offset lr, -4 | |
.cfi_offset r11, -8 |
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
const btSerial = new (require('bluetooth-serial-port')).BluetoothSerialPort(); | |
const readline = require('readline'); | |
const chalk = require('chalk'); | |
let start = new Date(); | |
let data = [['time', 'temp']]; | |
let go = false; | |
function log(...data){ | |
if(go) console.log(chalk.green(...data)); | |
else console.log(chalk.yellow(...data)); |
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
AccessModifierOffset: -4 | |
AlignEscapedNewlinesLeft: true | |
AlignTrailingComments: true | |
AllowAllParametersOfDeclarationOnNextLine: false | |
AllowShortFunctionsOnASingleLine: false | |
AllowShortIfStatementsOnASingleLine: true | |
AllowShortLoopsOnASingleLine: false | |
AlwaysBreakBeforeMultilineStrings: false | |
AlwaysBreakTemplateDeclarations: false |
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
################################################################################ | |
######################### User configurable parameters ######################### | |
# filename extensions | |
CEXTS:=c | |
ASMEXTS:=s S | |
CXXEXTS:=cpp c++ cc | |
# probably shouldn't modify these, but you may need them below | |
ROOT=. | |
FWDIR:=$(ROOT)/firmware |
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
{ | |
"bridge": { | |
"name": "Bridge", | |
"username": "08:E5:AE:7A:77:8F", | |
"port": 51826, | |
"pin": "031-45-154" | |
}, | |
"description": "A pumpkin that shoots Silly String!", | |
"platforms": [ |
NewerOlder