A "Best of the Best Practices" (BOBP) guide to developing in Python.
- "Build tools for others that you want to be built for you." - Kenneth Reitz
- "Simplicity is alway better than functionality." - Pieter Hintjens
The script in this gist will help you buid the Google Protobuf library for use with Mac OS X and iOS. Other methods (such as homebrew or direct compilation) have issues that prevent their use. The libraries built by this script are universal and support all iOS device architectures including the simluator.
The easiest way to use this script is to simply clone the gist onto your
#include <chaiscript/chaiscript.hpp> | |
#include <chaiscript/chaiscript_stdlib.hpp> | |
class BaseClass | |
{ | |
public: | |
BaseClass() | |
{ | |
} |
-- copy.lua | |
-- | |
-- Lua functions of varying complexity to deep copy tables. | |
-- | |
-- 1. The Problem. | |
-- | |
-- Here's an example to see why deep copies are useful. Let's | |
-- say function f receives a table parameter t, and it wants to |
// This software is provided 'as-is', without any express or implied | |
// warranty. In no event will the authors be held liable for any damages | |
// arising from the use of this software. | |
// Permission is granted to anyone to use this software for any purpose, | |
// including commercial applications, and to alter it and redistribute it | |
// freely, subject to the following restrictions: | |
// 1. The origin of this software must not be misrepresented; you must not | |
// claim that you wrote the original software. If you use this software | |
// in a product, an acknowledgment in the product documentation would be | |
// appreciated but is not required. |
//originally adopted from | |
//http://answers.unity3d.com/questions/447701/event-for-unity-editor-pause-and-playstop-events.html | |
//with a few modifications which makes the event firing nicer and cleaner | |
//Usage Example : | |
// | |
//using UnityEditor; | |
//using UnityEngine; | |
// | |
//[InitializeOnLoad] | |
//public class SingleEntryPoint |
VSync under Windows, revisited | |
http://www.virtualdub.org/blog/pivot/entry.php?id=157 | |
Windowed mode, vsync stutter, DWM (Vista+) | |
http://armageddongames.net/showthread.php?96793-Windowed-mode-vsync-stutter-DWM-(Vista-) | |
DwmFlush function | |
https://msdn.microsoft.com/en-us/library/windows/desktop/dd389405(v=vs.85).aspx | |
Bug 856427 - Add vsync support on windows |
/* | |
* edtaa3() | |
* | |
* Sweep-and-update Euclidean distance transform of an | |
* image. Positive pixels are treated as object pixels, | |
* zero or negative pixels are treated as background. | |
* An attempt is made to treat antialiased edges correctly. | |
* The input image must have pixels in the range [0,1], | |
* and the antialiased image should be a box-filter | |
* sampling of the ideal, crisp edge. |
For a brief user-level introduction to CMake, watch C++ Weekly, Episode 78, Intro to CMake by Jason Turner. LLVM’s CMake Primer provides a good high-level introduction to the CMake syntax. Go read it now.
After that, watch Mathieu Ropert’s CppCon 2017 talk Using Modern CMake Patterns to Enforce a Good Modular Design (slides). It provides a thorough explanation of what modern CMake is and why it is so much better than “old school” CMake. The modular design ideas in this talk are based on the book [Large-Scale C++ Software Design](https://www.amazon.de/Large-Scale-Soft
Download and Install Emscripten
/home/user
git clone https://github.com/emscripten-core/emsdk.git
cd emsdk
git checkout main
./emsdk install latest
./emsdk activate latest
source ./emsdk_env.sh