python3 setup.py build
Output: build/lib.macosx-10.11-x86_64-3.5/hello.cpython-35m-darwin.so
| #include <stdio.h> | |
| #include <termios.h> | |
| int getch(void) { | |
| int ch; | |
| struct termios oldt; | |
| struct termios newt; | |
| tcgetattr(STDIN_FILENO, &oldt); /*store old settings */ | |
| newt = oldt; /* copy old settings to new settings */ |
| #include <iostream> | |
| #include <limits> | |
| template <typename T> | |
| void test_limits() { | |
| T min = std::numeric_limits<T>::min(); | |
| T max = std::numeric_limits<T>::max(); | |
| std::cout << "min: " << min << std::endl; | |
| std::cout << "max: " << max << std::endl; | |
| } |
| CMAKE_MINIMUM_REQUIRED(VERSION 2.8.2) | |
| PROJECT(msgpack_test) | |
| SET(CMAKE_CXX_FLAGS_DEBUG "-g -std=c++11") | |
| SET(EXECUTABLES test_vector test_stream test_class test_array test_map1 test_map2) | |
| FOREACH(EXE ${EXECUTABLES}) | |
| ADD_EXECUTABLE(${EXE} "${EXE}.cpp") | |
| TARGET_LINK_LIBRARIES(${EXE} msgpack) |
| CMAKE_MINIMUM_REQUIRED(VERSION 2.8.2) | |
| PROJECT(hello) | |
| SET(PROJECT_ROOT_PATH "${CMAKE_SOURCE_DIR}") | |
| SET(EXECUTABLE_OUTPUT_PATH "${PROJECT_BINARY_DIR}/bin") | |
| SET(LIBRARY_OUTPUT_PATH "${PROJECT_BINARY_DIR}/lib") | |
| ADD_EXECUTABLE(hello hello.cpp) |
| #!/bin/bash | |
| osascript -e 'tell application "Google Chrome"' -e 'set bounds of front window to {1, 1, 1280, 640}' -e 'end tell' |
| import std.stdio; | |
| long factorial(int n) { | |
| long fac = 1; | |
| foreach (i; 1..n+1) { | |
| fac *= i; | |
| } | |
| return fac; | |
| } |
| x=1;1.upto(gets.to_i){|i|x*=i};p x |
| import os | |
| import re | |
| import sys | |
| import optparse | |
| from PIL import Image | |
| IMAGE_EXT_PATTERN = re.compile(r'\.(jpe?g|png|gif|bmp)', re.IGNORECASE) | |
| def safe_int(string): | |
| try: |
| mcs -target:library -out:MyAssembly.dll -r:/Applications/Unity/Unity.app/Contents/Frameworks/UnityEngine.dll MyAssembly.cs |