One Paragraph of project description goes here
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
/* | |
* Copyright (c) 2013 Calvin Rien | |
* | |
* Based on the JSON parser by Patrick van Bergen | |
* http://techblog.procurios.nl/k/618/news/view/14605/14863/How-do-I-write-my-own-parser-for-JSON.html | |
* | |
* Simplified it so that it doesn't throw exceptions | |
* and can be used in Unity iPhone with maximum code stripping. | |
* | |
* Permission is hereby granted, free of charge, to any person obtaining |
Shader "Unlit/Transparent Colored" { | |
Properties { | |
_Color ("Main Color", Color) = (1,1,1,1) | |
_MainTex ("Base (RGB) Trans (A)", 2D) = "white" {} | |
} | |
SubShader { | |
Tags {"Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent"} | |
ZWrite Off |
// Smooth Follow from Standard Assets | |
// Converted to C# because I fucking hate UnityScript and it's inexistant C# interoperability | |
// If you have C# code and you want to edit SmoothFollow's vars ingame, use this instead. | |
using UnityEngine; | |
using System.Collections; | |
public class SmoothFollow : MonoBehaviour { | |
// The target we are following | |
public Transform target; |
self.$inputFilter.on('keyup', function (event) { | |
text = $(this).val(); | |
event.stopImmediatePropagation(); | |
// data | |
return false; | |
}).click(function () { | |
return false; | |
}); |
using Microsoft.CSharp; | |
using System.CodeDom; | |
using System.CodeDom.Compiler; | |
using System.Collections.Generic; | |
using System.Collections.ObjectModel; | |
using System.Collections.Specialized; | |
using System.IO; | |
using System.Linq; | |
using System.Reflection; | |
using System.Text; |
// Intel(R) Core(TM) i7-2600 CPU @ 3.40 GHz 3.40 GHz | |
// 16 GB RAM, Windows 7, 64 bit | |
// | |
//No cast:0.854751600000001 +- 0.182965645566156ms | |
//Cast:0.724137 +- 0.148216330378943ms | |
// Conclusion: Cast is indeed faster, but remember that we are talking here about _miliseconds_ | |
// for 1000 enumerations of an enum with 1000 elements. First verify whether this is really significant in your code, before | |
// proceeding with micro-optimizations. | |
// Context: http://stackoverflow.com/a/105402/2642204 |
using UnityEngine; | |
using UnityEditor; | |
using System; | |
using System.Collections; | |
using System.Collections.Generic; | |
using System.IO; | |
[InitializeOnLoad] | |
public class AssetDefinePostprocessor : AssetPostprocessor | |
{ |
The following will guide you through the process of enabling SSL on a Apache webserver
Create a directory within /etc/apache2/
using Terminal.app: sudo mkdir /etc/apache2/ssl
Next, generate two host keys:
Various 'features' of C++ that show the hacky / inconsistent way in which the language was constructed. This is a work in progress, and currently contains some of the reasons I can remember why I've given up on C++. If you want to contribute, leave your favourite "hack" in the comments.
(in)Visibility: C++ allows changing the access modifier of a virtual function in the derived class. Not only does C++ have no notion of interfaces, it actually allows subclasses to hide methods declared public in the superclass.
Operator over-overloading: One of the increment operators takes a dummy int parameter in order to allow overloading. Can you tell which without googling? (hint: its postfix).
Exception unspecifiers: C++ has two types of exception specifiers: throw() and nothrow. The first is deprecated (because 'we screwed up, sorry, let's forget about this terrible mess'). The second one guarantees it's contract by terminating the application when violated. That's because functions declared