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
cmake_minimum_required(VERSION 2.6) | |
project(lua C) | |
if(MSVC) | |
set(CMAKE_BUILD_TYPE Release) | |
set(CMAKE_C_FLAGS_DEBUG "/D_DEBUG /MTd /Zi /Ob0 /Od /RTC1") | |
set(CMAKE_C_FLAGS_RELEASE "/MT /O2 /Ob2 /D NDEBUG") | |
set(CMAKE_C_FLAGS_MINSIZEREL "/MT /O1 /Ob1 /D NDEBUG") | |
set(CMAKE_C_FLAGS_RELWITHDEBINFO "/MT /Zi /O2 /Ob1 /D NDEBUG") |
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 <memory> | |
#include <iostream> | |
namespace bo { | |
template<typename T, typename Arg, typename Deleter = std::default_delete<T>> | |
std::unique_ptr<T, Deleter> make_unique(Arg&& a, Deleter&& d = std::default_delete<T>()) { | |
return std::unique_ptr<T, Deleter>(new T(std::forward<Arg>(a)), std::forward<Deleter>(d)); | |
} | |
} |
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
// !!! sketch, no constraint | |
var mongoose = require('mongoose'), | |
Schema = mongoose.Schema; | |
var WorkItemSchema = new Schema({ | |
description: String, | |
createdAt: Date, | |
lastModified: Date, | |
status: Number |
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
body { | |
margin: 0; | |
padding: 0; | |
font: 12px Tahoma, arial, sans-serif; | |
} | |
header { | |
font-family: 'Segoe UI Light', 'Segoe UI', 'Microsoft Jhenghei', '微软雅黑', sans-serif; | |
color: #666; | |
font-size: 50px; |
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
;;;; | |
;;;; 6.lisp | |
;;;; ProjectEuler | |
;;;; | |
;;;; Created by bitdewy on 4/10/13. | |
;;;; Copyright (c) 2013 bitdewy. All rights reserved. | |
;;;; | |
;; Project Euler #6 | |
(defun square (x) |
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
;;;; | |
;;;; 5.lisp | |
;;;; ProjectEuler | |
;;;; | |
;;;; Created by bitdewy on 4/10/13. | |
;;;; Copyright (c) 2013 bitdewy. All rights reserved. | |
;;;; | |
;; Project Euler #5 | |
(defun smallest_multiple1 (max) |
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
;;;; | |
;;;; 3.lisp | |
;;;; ProjectEuler | |
;;;; | |
;;;; Created by bitdewy on 4/9/13. | |
;;;; Copyright (c) 2013 bitdewy. All rights reserved. | |
;;;; | |
;; Project Euler #3 | |
(defun factorization (number) |
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
;;;; | |
;;;; 2.lisp | |
;;;; ProjectEuler | |
;;;; | |
;;;; Created by bitdewy on 4/8/13. | |
;;;; Copyright (c) 2013 bitdewy. All rights reserved. | |
;;;; | |
;; Project Euler #2 | |
(defun fibonacci (max) |
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 <iostream> | |
#include <map> | |
#include <vector> | |
#include <boost/bind.hpp> | |
#include <boost/function.hpp> | |
#include <boost/noncopyable.hpp> | |
#include <gl/glut.h> | |
#include <gl/SOIL.h> | |
class KeyboardManger : boost::noncopyable |
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
;;;; | |
;;;; 1.lisp | |
;;;; ProjectEuler | |
;;;; | |
;;;; Created by bitdewy on 4/7/13. | |
;;;; Copyright (c) 2013 bitdewy. All rights reserved. | |
;;;; | |
;; Project Euler #1 | |
(defun sum_of_values_multiples (max values) |
NewerOlder