background preloader

Reference

Facebook Twitter

Collecting all the cheat sheets. Lazy Foo' Productions. Huffman coding. Huffman tree generated from the exact frequencies of the text "this is an example of a huffman tree".

Huffman coding

The frequencies and codes of each character are below. Encoding the sentence with this code requires 135 bits, as opposed to 288 bits if 36 characters of 8 bits were used. (This assumes that the code tree structure is known to the decoder and thus does not need to be counted as part of the transmitted information.) In computer science and information theory, Huffman coding is an entropy encoding algorithm used for lossless data compression. The term refers to the use of a variable-length code table for encoding a source symbol (such as a character in a file) where the variable-length code table has been derived in a particular way based on the estimated probability of occurrence for each possible value of the source symbol.

Operations to construct it. History[edit] In 1951, David A. Problem definition[edit] Informal description[edit] Given Find Formalized description[edit] Input. Computer Programming Algorithms Directory. Adding Console I/O to a Win32 GUI App. DirectInput. This section provides information about the Microsoft DirectInput component of the Microsoft DirectX application programming interface (API).

DirectInput

The DirectInput API is used to process data from a joystick, or other game controller. The use of DirectInput for keyboard and mouse input is not recommended. You should use Windows messages instead . Getting Started With XInput. XInput is an API that allows applications to receive input from the Xbox 360 Controller for Windows.

Getting Started With XInput

Controller rumble effects and voice input and output are supported. DirectX Tutorial.com - DirectInput Lesson 1: Using the Keyboard. Regular Expression Library. The Brainfuck Programming Language. Brainfuck is the ungodly creation of Urban Müller, whose goal was apparently to create a Turing-complete language for which he could write the smallest compiler ever, for the Amiga OS 2.0.

The Brainfuck Programming Language

His compiler was 240 bytes in size. (Though he improved upon this later -- he informed me at one point that he had managed to bring it under 200 bytes.) I originally started playing around with Brainfuck because of my own interest in writing very small programs for x86 Linux. I also used it as a vehicle for writing a program that created ELF files.

Filesystem V3 Reference. Table of Contents Introduction This reference documentation describes components that C++ programs may use to perform operations involving file systems, including paths, regular files, and directories.

Filesystem V3 Reference

Definitions The following definitions shall apply throughout this reference documentation: Invent Your Own Computer Games with Python - Chapters. Chapter 1 Read online: Chapter 1 - Installing Python.

Invent Your Own Computer Games with Python - Chapters

C++ Reference. This website uses cookies.

C++ Reference

By continuing, you give permission to deploy cookies, as detailed in our privacy policy. ok Search: Reference Not logged in Reference Standard C++ Library reference C Library. [36] Serialization and Unserialization  Updated!  C++ Operator Precedence. The following table lists the precedence and associativity of C++ operators.

C++ Operator Precedence

Operators are listed top to bottom, in descending precedence. [1]The expression in the middle of the conditional operator (between ? Operators in C and C++ When not overloaded, for the operators &&, ||, and , (the comma operator), there is a sequence point after the evaluation of the first operand.

Operators in C and C++

C++ also contains the type conversion operators const_cast, static_cast, dynamic_cast, and reinterpret_cast. The formatting of these operators means that their precedence level is unimportant. Table[edit] For the purposes of this table, a, b, and c represent valid values (literals, values from variables, or return value), object names, or lvalues, as appropriate. R, S and T stand for any type(s), and K for a class type or enumerated type.

Native Client. Bringing Regal OpenGL to Native Client. Porting your game to Native Client and Android just got a lot easier.

Bringing Regal OpenGL to Native Client

The new OpenGL portability library ‘Regal’ emulates legacy GL features such as immediate mode and fixed function pipeline. Regal is the ‘Write Once, Run Everywhere’ GL library. Read on for more details on Regal and how it got ported to Native Client. At the end of July I joined Google to help game developers make amazing games for the web using open technologies like Native Client, Dart, and HTML5. The first project I picked was to port Regal to NaCl. Consistent OpenGL API that runs on all major platforms: Windows, Linux, Mac, iOS, Chrome (Native Client), and Android.Emulation of deprecated OpenGL functionality.

Native Client. External Resource Directory. This page provides a directory of useful resources related or relevant to the Google Native Client project. Keeping this page up-to-date is hard! If you find bugs or would like to suggest additions please contact native-client-discuss@googlegroups.com. Open-Source Projects These projects have active Native Client support or porting efforts. Mono ( a cross-platform, open source .NET development framework.naclports ( A repository of example programs and library patches. Create iPhone and Android apps with JavaScript and C++ Become a Programmer, Motherfucker.

If you don't know how to code, then you can learn even if you think you can't. Thousands of people have learned programming from these fine books: Learn Python The Hard Way Learn Ruby The Hard Way Learn Code The Hard Way I'm also working on a whole series of programming education books at learncodethehardway.org. Learn C The Hard Way Learn SQL The Hard Way Learn Regex The Hard Way Graphics Programming Language Agnostic NerdDinner Walkthrough Assembly Language. Labs.