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
#!/bin/bash | |
#Heith Seewald 2012 | |
#Feel free to extend/modify to meet your needs. | |
#Maya on Ubuntu v.1 | |
#This is the base installer... I’ll add more features in later versions. | |
#if you have any issues, feel free email me at [email protected] | |
#### Lets run a few checks to make sure things work as expected. | |
#Make sure we’re running with root permissions. | |
if [ `whoami` != root ]; then |
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
#pragma comment(lib,"glew32.lib") | |
#include <GL/glew.h> | |
#include "textfile.h" | |
#include <GL/glut.h> | |
#include <iostream> | |
using namespace std; | |
GLuint vShader,fShader;//顶点着色器对象 |
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
\documentclass[$if(fontsize)$$fontsize$,$endif$$if(lang)$$lang$,$endif$$if(papersize)$$papersize$,$endif$]{$documentclass$} | |
\usepackage{geometry} % 設定邊界 | |
\geometry{ | |
top=1in, | |
inner=1in, | |
outer=1in, | |
bottom=1in, | |
headheight=3ex, | |
headsep=2ex | |
} |
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/property_tree/ptree.hpp> | |
#include <boost/property_tree/ini_parser.hpp> | |
... | |
boost::property_tree::ptree pt; | |
boost::property_tree::ini_parser::read_ini("config.ini", pt); | |
std::cout << pt.get<std::string>("Section1.Value1") << std::endl; | |
std::cout << pt.get<std::string>("Section1.Value2") << std::endl; |
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/thread.hpp> | |
#include <boost/thread/tss.hpp> | |
#include <boost/bind.hpp> | |
#include <iostream> | |
class del{ | |
public: | |
int dat; | |
del(int i):dat(i){} |
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
namespace bamthread | |
{ | |
typedef std::unique_ptr<boost::asio::io_service::work> asio_worker; | |
// the actual thread pool | |
struct ThreadPool { | |
ThreadPool(size_t threads) :service(), working(new asio_worker::element_type(service)) { | |
for ( std::size_t i = 0; i < threads; ++i ) { | |
auto worker = boost::bind(&boost::asio::io_service::run, &(this->service)); | |
g.add_thread(new boost::thread(worker)); | |
} |
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
on run {input, parameters} | |
if application "TextEdit" is not running then | |
tell application "TextEdit" | |
make new document at the front | |
end tell | |
end if | |
tell application "Google Chrome" to tell tab 1 of window 1 | |
select all | |
copy selection |
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
--- OpenMesh-3.3.org/CMakeLists.txt 2015-07-08 11:57:36.000000000 +0800 | |
+++ OpenMesh-3.3/CMakeLists.txt 2015-07-08 11:05:27.000000000 +0800 | |
@@ -60,6 +60,7 @@ | |
endif() | |
if (APPLE) | |
+ configure_file ("${CMAKE_SOURCE_DIR}/cmake/fixbundle.cmake.in" "${CMAKE_BINARY_DIR}/fixbundle.cmake" @ONLY IMMEDIATE) | |
add_custom_target (fixbundle ALL | |
COMMAND ${CMAKE_COMMAND} -P "${CMAKE_BINARY_DIR}/fixbundle.cmake" | |
) |
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
// I hate STL transform. | |
// I hate iteraters | |
namespace my{ | |
template<typename T, typename F> | |
auto map(F f, const std::vector<T> &a ) { | |
std::vector<std::result_of_t<F(T)>> result; | |
for(const T & t : a) | |
result.push_back(f(t)); |
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
--- openmesh-4.0.org/CMakeLists.txt 2015-07-26 16:27:49.000000000 +0800 | |
+++ openmesh-4.0/CMakeLists.txt 2015-07-26 16:37:59.000000000 +0800 | |
@@ -73,6 +73,7 @@ | |
endif() | |
if (APPLE) | |
+ configure_file ("${CMAKE_SOURCE_DIR}/cmake/fixbundle.cmake.in" "${CMAKE_BINARY_DIR}/fixbundle.cmake" @ONLY IMMEDIATE) | |
add_custom_target (fixbundle ALL | |
COMMAND ${CMAKE_COMMAND} -P "${CMAKE_BINARY_DIR}/fixbundle.cmake" | |
) |
OlderNewer