A small, portable GNU readline replacement for Linux, Windows and MacOS which is capable of handling UTF-8 characters. Unlike GNU readline, which is GPL, this library uses a BSD license and can be used in any kind of program.
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 <gtk/gtk.h> | |
static void activate_main (GtkApplication *app, gpointer user_data); | |
static void setup_tree_view (GtkWidget *treeview); | |
static void populate_tree_store (GtkTreeStore *store); | |
int | |
main (int argc, | |
char **argv) | |
{ |
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 <algorithm> | |
#include <fstream> | |
#include <iostream> | |
#include <iterator> | |
#include <string> | |
#include <unordered_set> | |
#include <vector> | |
namespace std { | |
template <> struct hash<std::vector<int>> { |
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]) |
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
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; |
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
// 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; |
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
#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) { |
OlderNewer