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
// Example program | |
#include <array> | |
#include <cstdio> | |
int main() | |
{ | |
std::array<int, 6> a {1, 1, 1, 2, 2, 2}; | |
std::array<int, 10> b {}; | |
for (auto v : b) |
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 3.8.0 ) | |
project ( myproj ) | |
add_subdirectory( ./core core ) | |
add_library( mylib STATIC lib.cpp ) | |
target_include_directories( ) |
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
// vertex shader | |
#version 310 es | |
#extension GL_EXT_shader_io_blocks : enable | |
#extension GL_ARB_enhanced_layouts : enable | |
precision highp float; | |
precision highp int; | |
layout( std140, binding = 0 ) uniform viewProjectionUniformBuffer | |
{ | |
layout( offset = 0 ) mat4 u_viewMatrix; | |
layout( offset = 64 ) mat4 u_viewInverseMatrix; |
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
@echo off | |
SET st3Path=C:\Program Files\Sublime Text 3\sublime_text.exe | |
rem add it for all file types | |
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 3" /t REG_SZ /v "" /d "Open with Sublime Text 3" /f | |
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 3" /t REG_EXPAND_SZ /v "Icon" /d "%st3Path%,0" /f | |
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 3\command" /t REG_SZ /v "" /d "%st3Path% \"%%1\"" /f | |
rem add it for folders | |
@reg add "HKEY_CLASSES_ROOT\Folder\shell\Open with Sublime Text 3" /t REG_SZ /v "" /d "Open with Sublime Text 3" /f |
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 <stdio.h> | |
#include <stdbool.h> | |
int main(int argc, char const *argv[]) | |
{ | |
int times = 0; | |
bool odd = false; | |
while(1){ | |
int 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
template<int M, int K, int S> | |
struct Unit { // a unit in the MKS system | |
enum { m=M, kg=K, s=S }; | |
}; | |
template<typename Unit> // a magnitude with a unit | |
struct Value { | |
double val; // the magnitude | |
constexpr explicit Value(double d) : val(d) {} // construct a Value from a double | |
}; |
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
using UnityEngine; | |
using System; | |
public class HelloWorld : MonoBehaviour { | |
interface Interface { | |
int MethodOnInterface(string question); | |
} | |
private class Important: Interface { | |
public int Method(string question) { return 42; } |
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
use std::thread; | |
use std::sync::atomic::AtomicBool; | |
use std::sync::atomic::Ordering::SeqCst; | |
use std::rc::Rc; | |
use std::cell::RefCell; | |
struct Evil<'a> { | |
link: RefCell<Option<Rc<Rc<Evil<'a>>>>>, | |
arm: thread::JoinGuard<'a, ()> | |
} |
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
android { | |
// .. set up build flavors etc here | |
//instead of "app-release.apk" this method will rewrite the name to | |
// "MyCoolCompany-MyGreatProduct-v<defaultConfig.versionName>-RELEASE.apk which is much better suited for archiving and overall handling | |
// To restore the default behavior just delete the whole block below | |
applicationVariants.all { variant -> | |
def apk = variant.outputFile; |
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
<?xml version="1.0" encoding="utf-8"?> | |
<COLLADA version="1.4.1" xmlns="http://www.collada.org/2005/11/COLLADASchema"> | |
<asset> | |
<contributor> | |
<author>Jonas2</author> | |
<authoring_tool>3dsMax 11 - Feeling ColladaMax v3.05B.</authoring_tool> | |
<comments>ColladaMax Export Options: ExportNormals=1;ExportEPolyAsTriangles=1;ExportXRefs=1;ExportSelected=0;ExportTangents=0;ExportAnimations=1;SampleAnim=0;ExportAnimClip=0;BakeMatrices=1;ExportRelativePaths=1;AnimStart=0;AnimEnd=1.66667;</comments> | |
<source_data>file:///F:/Projects/Billions/max/BadBlueRig2.max</source_data> | |
</contributor> | |
<created>2010-02-26T15:43:05Z</created> |