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
cmake_minimum_required(VERSION 3.0.0) | |
project(main VERSION 0.1.0) | |
enable_testing() | |
file(GLOB_RECURSE SOURCES RELATIVE ${CMAKE_SOURCE_DIR} "src/*.cpp") | |
add_executable(main ${SOURCES}) | |
set(CPACK_PROJECT_NAME ${PROJECT_NAME}) | |
set(CPACK_PROJECT_VERSION ${PROJECT_VERSION}) |
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
@echo off | |
echo Make sure you had run "bootstrap.bat gcc" before | |
echo ________________________________________________ | |
b2 address-model=32 architecture=x86 --with-test threading=multi -j 8 install | |
echo ______________________________________________ | |
echo You got your built Boost in "c:/Boost"! Enjoy! |
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
python | |
import sys | |
sys.path.insert(0, "d:\\MinGW\\share\\gcc-8.2.0\\python") | |
from libstdcxx.v6.printers import register_libstdcxx_printers | |
register_libstdcxx_printers (None) | |
end |
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 "StrVec.h" | |
StrVec::StrVec(const string &s) : StrVec::StrVec() | |
{ | |
push_back(s); | |
} | |
StrVec::~StrVec() { free(); }; | |
StrVec::StrVec(const StrVec &rhs) : elements(rhs.elements), first_free(rhs.first_free), cap(rhs.cap) | |
{ |
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 "TreeNode.h" | |
int TreeNode::num = 0; | |
TreeNode::TreeNode(const string s, | |
TreeNode *l, TreeNode *r) : value(s), count(num++), left(l), right(r) | |
{ | |
if (l) | |
l->right = this; | |
}; |
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
CC = g++ | |
CFLAGS = -Wall | |
LDFLAGS = | |
SRC_PATH = src/ | |
MAIN_OBJ = main.o # to filter out it from test objs | |
SRCS = $(wildcard $(SRC_PATH)*.cpp) # get all .cpp in src dir | |
# for tests | |
TEST_CFLAGS = $(CFLAGS) -Id:/libs/boost_1_69_0/stage/include/boost-1_69 | |
TEST_LDFLAGS = $(LDFLAGS) -Ld:/libs/boost_1_69_0/stage/lib -lboost_unit_test_framework-mgw82-mt-s-x32-1_69 | |
TEST_PATH = tests/ |
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
package main | |
import ( | |
"encoding/xml" | |
"fmt" | |
"io/ioutil" | |
"os" | |
) | |
type CadastralBlock 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
pub enum Content { | |
Post(String), | |
DraftPost(String), | |
PendingReviewPost(String), | |
} | |
pub struct Post { | |
approved: i32, | |
content: Content, | |
} |
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
from PyQt5 import QtCore | |
import traceback, sys | |
# https://stackoverflow.com/questions/44447674/traceback-missing-when-exception-encountered-in-pyqt5-code-in-eclipsepydev | |
if QtCore.QT_VERSION >= 0x50501: | |
def excepthook(type_, value, traceback_): | |
traceback.print_exception(type_, value, traceback_) | |
QtCore.qFatal('') | |
sys.excepthook = excepthook |
NewerOlder