Orthodox C++ (sometimes referred as C+) is minimal subset of C++ that improves C, but avoids all unnecessary things from so called Modern C++. It's exactly opposite of what Modern C++ suppose to be.
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
import cPickle as pickle | |
import io | |
lst = range(16) | |
with io.open('list.p', 'wb') as f : | |
pickler = pickle.Pickler(f) | |
for l in lst : | |
pickler.dump(l) |
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
// A compile-time method for checking the existence of a class member | |
// @see https://general-purpose.io/2017/03/10/checking-the-existence-of-a-cpp-class-member-at-compile-time/ | |
// This code uses "decltype" which, according to http://en.cppreference.com/w/cpp/compiler_support | |
// should be supported by Clang 2.9+, GCC 4.3+ and MSVC 2010+ (if you have an older compiler, please upgrade :) | |
// As of "constexpr", if not supported by your compiler, you could try "const" | |
// or use the value as an inner enum value e.g. enum { value = ... } | |
// check "test_has_member.cpp" for a usage example |
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 "imguitabwindow.h" | |
#include <imgui_internal.h> | |
#include <imgui.h> // intellisense | |
// TODO: Clean this code, it's a mess! | |
namespace ImGui { |
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 once | |
#include <imgui.h> | |
// USAGE EXAMPLE | |
/* | |
ImGui::Text("Tabs (based on the code by krys-spectralpixel):"); | |
static const char* tabNames[] = {"Render","Layers","Scene","World","Object","Constraints","Modifiers","Data","Material","Texture","Particle","Physics"}; | |
static const int numTabs = sizeof(tabNames)/sizeof(tabNames[0]); | |
static const char* tabTooltips[numTabs] = {"Render Tab Tooltip","","","","Object Type Tooltip","","","","","Tired to add tooltips...",""}; | |
static int tabItemOrdering[numTabs] = {0,1,2,3,4,5,6,7,8,9,10,11}; |
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
imguifilesystem dialogs for imgui v.1.17 wip (https://github.com/ocornut/imgui). | |
See also: https://github.com/ocornut/imgui/issues/88 | |
It's composed by three files: | |
- imguifilesystem.h (usage instructions are here) | |
- imguifilesystem.cpp | |
- dirent_portable.h | |
It needs testing and feedback (expecially for Windows/VisualC++ and MacOS). |
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 <stdlib.h> | |
#include <stdio.h> | |
#include <math.h> | |
typedef int i; //Save space by using 'i' instead of 'int' | |
typedef float f; //Save even more space by using 'f' instead of 'float' | |
//Define a vector class with constructor and operator: 'v' | |
struct v { | |
f x,y,z; // Vector has three float attributes. |
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
# coding=utf-8 | |
""" | |
affine: provides 2d and 3d rotation and translation library | |
""" | |
from __future__ import division | |
import math | |
import numpy as np | |
class SE2(object): | |
""" |
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
#!BPY | |
""" | |
Name: 'FaceGen TRI (.tri)...' | |
Blender: 249 | |
Group: 'Import' | |
Tooltip: 'Load a FaceGen TRI file.' | |
""" | |
__author__= "himika" |
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
/* | |
12306 Auto Submit => A javascript snippet to help you auto submit. | |
Copyright (C) 2011 Kevintop | |
Includes jQuery | |
Copyright 2011, John Resig | |
Dual licensed under the MIT or GPL Version 2 licenses. | |
http://jquery.org/license | |
Includes 12306.user.js |
NewerOlder