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
// These should be in pch.h | |
#include <winrt/Windows.Foundation.h> | |
#include <winrt/Windows.Foundation.Collections.h> | |
#include <winrt/Windows.Web.Http.h> | |
#include <winrt/Windows.Web.Http.Headers.h> | |
#include <winrt/Windows.Web.Http.Filters.h> | |
#include <winrt/Windows.Storage.Streams.h> | |
#include <iostream> | |
#include <Windows.h> |
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
#include <stdlib.h> | |
#include <stdio.h> | |
#include <assert.h> | |
/* | |
* | |
* 1: every node is either red or black | |
* 2: root is black | |
* 3: every leaf (NIL) is black | |
* 4: if a node is red then both its children are black |
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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <assert.h> | |
typedef struct Set { | |
struct Set* parent; | |
int value; | |
int rank; | |
} Set; |
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
#pragma once | |
#define WIN32_LEAN_AND_MEAN | |
#include <Windows.h> | |
#include <winrt/Windows.Foundation.h> | |
#include <unordered_map> | |
#include <functional> | |
#include <CommCtrl.h> |
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::{collections::HashSet, net::{SocketAddr, IpAddr, Ipv4Addr, Ipv6Addr, UdpSocket}}; | |
use std::thread; | |
use std::sync::Arc; | |
use std::time; | |
use std::error::Error; | |
use std::io; | |
use std::sync::mpsc; | |
use thread::sleep; | |
use std::sync::atomic::{AtomicBool, Ordering}; | |
use time::Duration; |
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
/* | |
Usage: | |
$ sqlite3 test.db | |
>.read test.sql -- Home - Recent Page | |
Get Concepts for a particular user | |
SELECT * FROM EntityConcept WHERE EntityID=0; | |
Get Users with a Particular Concept | |
SELECT * FROM EntityConcept WHERE ConceptID=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
// MusicBeep.cpp : music theory code to make scales and chords | |
// | |
#include "stdafx.h" | |
#include <Windows.h> | |
#include <cmath> | |
#include <iostream> | |
#include <vector> | |
#include <string> | |
#include <algorithm> |
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
/*! | |
This file contains code to convert unsigned integers to strings | |
at compile-time, and then modify those strings include more | |
information. | |
One use case is to convert library MAJOR, MINOR, and PATCH | |
numbers into a custom string (see below). | |
Other types like signed integers and floats can be added | |
with template specializition on the converter struct. |
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
/*! | |
A simple command-line application that provides word completion suggestions. | |
The application assumes that a list of words is provided by the system. | |
On Ubuntu, the application attempts to read from the /usr/share/dict/words | |
file installled by the wamerican package. | |
Once the trie is built, word completion suggestions is obtained via a | |
recursve method that collects words as the trie is traversed. | |
*/ |
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
#include <wx/app.h> | |
#include <wx/frame.h> | |
#include <wx/menu.h> | |
#include <wx/msgdlg.h> | |
#include <wx/log.h> | |
enum | |
{ | |
ID_Hello = 1 |
NewerOlder