if (MSVC)
# warning level 4 and all warnings as errors
add_compile_options(/W4 /WX)
else()
# lots of warnings and all warnings as errors
add_compile_options(-Wall -Wextra -pedantic -Werror)
endif()
on Fedora 31
sudo dnf install boost-devel boost-static
build error
[388/391] Linking CXX executable app/sourcetrail_indexer
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 <boost/asio.hpp> | |
#include <boost/bind.hpp> | |
#include <iostream> | |
namespace asio = boost::asio; | |
void bind_handler(const boost::system::error_code& ec, asio::steady_timer& t, int count, int instance_tag) | |
{ | |
if (!ec) { | |
if (count > 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
--- | |
Language: Cpp | |
AccessModifierOffset: -2 | |
AlignAfterOpenBracket: false | |
AlignConsecutiveAssignments: false | |
AlignEscapedNewlinesLeft: false | |
AlignOperands: false | |
AlignTrailingComments: false | |
AllowAllParametersOfDeclarationOnNextLine: true | |
AllowShortBlocksOnASingleLine: false |
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
// Create a unique pointer | |
auto p1 = std::make_unique<int>(42); | |
// Error to copy | |
auto p2 = p1; | |
// Ok to move | |
auto p2 = std::move(p1); | |
// After being moved, p1 is guaranted be equal to nullptr | |
assert(p1 == nullptr); | |
// It's a runtime error to access p1 | |
int x = *p1; |
Chapter | Sections | Algorithms | Progress |
---|---|---|---|
1. Core Searches | 1.1 | Breath First Search | |
1.2 | Depth First Search | ||
1.3 | Undirected Depth First Search | ||
2. Other Core Algorithms | 2.1 | Topological Sort | |
2.2 | Transitive Closure | ||
2.3 | Lengauer-Tarjan Dominator Tree |
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
module gtkdemo.SpinnerDemo; | |
import std.random : randomSample; | |
import std.conv : to; | |
import gio.Application : GioApplication = Application; | |
import gtk.Application; | |
import gtk.ApplicationWindow; | |
import gtk.TreeView; | |
import gtk.ListStore; |
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
#!/usr/bin/env python3 | |
import random | |
import gi | |
gi.require_version('Gtk', '3.0') | |
from gi.repository import Gtk | |
from gi.repository import GObject | |
class TreeView(Gtk.TreeView): | |
def __init__(self): | |
# model |
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
import gi | |
gi.require_version('Gtk', '3.0') | |
from gi.repository import Gtk | |
from gi.repository import GObject | |
class Window(Gtk.Window): | |
def __init__(self): | |
Gtk.Window.__init__(self, title='CellRendererSpinner') | |
self.model = Gtk.ListStore.new([bool, int]) |
NewerOlder