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 <string_view> | |
#include <algorithm> | |
struct StringRange { | |
char const* begin; | |
char const* end; | |
}; | |
// uses string::find_first_of | |
std::vector<std::string> |
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
==13438== Memcheck, a memory error detector | |
==13438== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al. | |
==13438== Using Valgrind-3.14.0 and LibVEX; rerun with -h for copyright info | |
==13438== Command: include-what-you-use -Dlibledger_EXPORTS -I ../lib/utfcpp/v2_0/source/ -I ../build -DNDEBUG -fPIC -std=c++11 -o CMakeFiles/libledger.dir/filters.cc.o -c ../src/filters.cc | |
==13438== | |
==13438== Invalid read of size 8 | |
==13438== at 0x99A71DB: clang::Sema::PushOnScopeChains(clang::NamedDecl*, clang::Scope*, bool) (in /usr/lib/libclangSema.so.8) | |
==13438== by 0x99C9359: clang::Sema::LazilyCreateBuiltin(clang::IdentifierInfo*, unsigned int, clang::Scope*, bool, clang::SourceLocation) (in /usr/lib/libclangSema.so.8) | |
==13438== by 0x9CC6406: ??? (in /usr/lib/libclangSema.so.8) | |
==13438== by 0x9CDE4BA: clang::Sema::LookupName(clang::LookupResult&, clang::Scope*, bool) (in /usr/lib/libclangSema.so.8) |
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
; This is a simple method of maintaining a budget using | |
; double-entry accounting software. | |
; Usually, double-entry accounting keeps track of | |
; assets, liabilities, income, and expenses. However, | |
; income/expense categories are different than budget | |
; categories. For one thing, income/expense categories | |
; continually grow, where budget categories tend to rise | |
; and fall. I decided to replace tracking my income/ | |
; expenses with tracking my budget. |
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::num::{ zero, one }; | |
struct Mean { | |
mean: f64, | |
count: u64, | |
} | |
impl Mean { | |
fn consider(&mut self, other: f64) { | |
self.count = self.count + one(); |