Skip to content

Instantly share code, notes, and snippets.

View usagi's full-sized avatar
🍣
Sushi

USAGI/USAGI.NETWORK usagi

🍣
Sushi
View GitHub Profile
#include <stdexcept>
#include <thread>
#include <future>
#include <iostream>
#include <boost/asio.hpp>
int main()
try
{
auto future = std::async
# These settings were set by the catalyst build script that automatically
# built this stage.
# Please consult /usr/share/portage/config/make.conf.example for a more
# detailed example.
CFLAGS="-O3 -pipe -march=native"
CXXFLAGS="${CFLAGS}"
# WARNING: Changing your CHOST is not something that should be done lightly.
# Please consult http://www.gentoo.org/doc/en/change-chost.xml before changing.
CHOST="x86_64-pc-linux-gnu"
# These are the USE flags that were used in addition to what is provided by the
#include <StandardCplusplus.h>
#include <system_configuration.h>
#include <unwind-cxx.h>
#include <utility.h>
#include <iterator>
#include <vector>
#include <chrono>
static const int serial_speed = 115200;
#include <iostream>
#include <typeinfo>
struct Hoge {
int a;
};
void f(Hoge& hoge);
void g() {
import QtQuick 2.0
Rectangle
{
width: 100
height: 100
focus: true
Keys.onEscapePressed: Qt.quit()
}
#include "myitem.h"
MyItem::MyItem(QQuickItem *parent):
QQuickItem(parent)
{
// By default, QQuickItem does not draw anything. If you subclass
// QQuickItem to create a visual item, you will need to uncomment the
// following line and re-implement updatePaintNode()
// setFlag(ItemHasContents, true);
cmake_minimum_required(VERSION 2.8.10)
project("string-switch")
set(CMAKE_CXX_FLAGS "-std=c++11 ${CMAKE_CXX_FLAGS}")
add_executable("string-switch" "string-switch.cxx")
#include <unordered_map>
#include <map>
#include <vector>
#include <algorithm>
#include <type_traits>
#include <string>
#include <iostream>
int main()
{
#include <chrono>
#include <thread>
#include "print_time.hxx"
int main()
{
print_time
( []()
{
#pragma once
#include <string>
inline const std::string cvmat_depth_to_string(const cv::Mat& m)
{
const auto depth = m.depth();
switch(depth)
{
#define CASE(x) \
case x: return #x;