
Cog Created 10 February 2004, last updated 27 February 2012 An older version of this document is also available in Russian. Cog is a code generation tool. It lets you use pieces of Python code as generators in your source files to generate whatever code you need. The sections below are: Cog transforms files in a very simple way: it finds chunks of Python code embedded in them, executes the Python code, and inserts its output back into the original file. For example, if you run this file through cog: // This is my C++ file.... it will come out like this: // This is my C++ file.... Lines with triple square brackets are delimiter lines. When cog runs, it discards the last generated Python output, executes the generator Python code, and writes its generated output into the file. The cog marker lines can contain any text in addition to the triple square bracket tokens. Cog is designed to be easy to run. Cog requires Python 2.6, 2.7, 3.2, or Jython 2.5. Download Cog from the Python Package Index. License
WebGL Water Loading... Made by Evan Wallace This demo requires a decent graphics card and up-to-date drivers. If you can't run the demo, you can still see it on YouTube. Interactions: Draw on the water to make ripples Drag the background to rotate the camera Press SPACEBAR to pause and unpause Drag the sphere to move it around Press the L key to set the light direction Press the G key to toggle gravity Features: Raytraced reflections and refractions Analytic ambient occlusion Heightfield water simulation * Soft shadows Caustics (see this for details) ** * requires the OES_texture_float extension** requires the OES_standard_derivatives extension Tile texture from zooboing on Flickr
C++ Inline Functions In this C++ tutorial, you will learn about the Inline function, what is an inline function, reason for the need of inline functions, what happens when an inline function is written, general format of inline function explained with example. What is Inline Function? Inline functions are functions where the call is made to inline functions. The actual code then gets placed in the calling program. Reason for the need of Inline Function: Normally, a function call transfers the control from the calling program to the function and after the execution of the program returns the control back to the calling program after the function call. The extra time needed and the process of saving is valid for larger functions. What happens when an inline function is written? The inline function takes the format as a normal function but when it is compiled it is compiled as inline code. General Format of inline Function: The general format of inline function is as follows: inline datatype function_name(arguments)
Monad (functional programming) Formally, a monad consists of a type constructor M and two operations, bind and return (where return is often also called unit). The operations must fulfill several properties to allow the correct composition of monadic functions (i.e. functions that use values from the monad as their arguments or return value). The return operation takes a value from a plain type and puts it into a monadic container using the constructor, creating a monadic value. The bind operation performs the reverse process, extracting the original value from the container and passing it to the associated next function in the pipeline, possibly with additional checks and transformations. The concept of monad programming appeared in the 1980s in the programming language Opal even though it was called "commands" and never formally specified. We demonstrate two common examples given when introducing monads: the Maybe monad and the I/O monad. data Maybe t = Just t | Nothing return :: a -> Maybe a return x = Just x
haXe Features This is a non-exhaustive list of haXe features - use it as a quick overview of the kind of things you can do with haXe. On the client-side, many platforms are supported. Can compile to JavaScript by generating a single .js fileinteractive debugging directly in Haxe source files with JS Source-Mapping (-debug with Haxe 2.09+)reduce the script output size with --dead-code-eliminationCan compile to C++ source code, which can be compiled to native binariestarget iOS, Android, and other mobile targetssee NME for a good exampleCan compile to Flash by generating a .swf file - haXe compiled swf files usually run faster than AS3 due to advanced optimizationsuse interactive debugger if your IDE supports it with -debug -D fdbcan compile to SWC and import SWF libraries (produced by IDE or 3rd party libraries)can compile to AS3 source code On the server-side, you can use Haxe as well, enabling code-sharing and better team communication : Here's a list of some of the Haxe language features.
Functional Reactive Programming Functional Reactive Programming (FRP) integrates time flow and compositional events into functional programming. This provides an elegant way to express computation in domains such as interactive animations, robotics, computer vision, user interfaces, and simulation. 1 Introduction The original formulation of Functional Reactive Programming can be found in the ICFP 97 paper Functional Reactive Animation by Conal Elliott and Paul Hudak. 1.1 Behaviors Traditionally a widget-based user interface is created by a series of imperative actions. A better way to represent an edit widget's content is a time-varying value, called a behavior. This is only a theoretical model, because a time-varying value can represent something impure like the content of an edit widget, the current value of a database entry as well as the system clock's current time. myEditWidget :: Behavior Text In most frameworks there is an applicative interface for behaviors, such that you can combine them easily: 1.2 Events To do
Choosing between Java and Python A Vector Type for C# Download source - 10.8 KB Introduction For years I have seen people struggle with vector mathematics. This guide should walk you through the creation of a reusable Vector3 type and the mathematics behind it all. The post-fixed 3 simply refers to the vector being in 3-dimensions (x,y,z). The code is not designed to be fast or efficient but is to be as simple and understandable as possible. I have used the Cartesian coordinate system in three-dimensions (i.e. three perpendicular axis of x, y and z) and Euclidian geometry. You may have guessed that computers are quite slow with this type of math. Unless stated otherwise I assume that the vector is positional, originating at point (0,0,0). Please note that this guide is extremely verbose and may seem patronising to experienced C# programmers. A quick glossary: Operator, this is the symbol used to define an operation such as plus (+) in (a+b) Operand, these are the variables used in an operation such as (a) and (b) in (a+b). Using the code
"LOS BUCHONES" La narcocultura a influido de tal forma en la sociedad sinaloense que ya se han adoptado nuevas modas que dejan relucir y enaltecer al narco, creando en los portadores múltiples comportamientos en prejuicio de su persona y de la sociedad misma, como conductas agresivas, narco delincuencia, consumismo e inclusive hasta la muerte. Mazatlán, Sinaloa, 02 de junio (apro).- ¡Péinate bien! ¡Quítate esos pantalones flojos! Recuerdo las palabras de mi padre con las que con una voz rezongadora me decía que me quitara esos “trapos cholos”… antes como cualquier otro joven solía vestir “a la moda” tratando de imitar a mis cantantes o artistas mas famosos, hoy gran parte de los jóvenes y en especial los sinaloenses tratan de vestir a la moda tratando de imitar a los mas famosos… narcotraficantes; Ellos son los denominados “Buchones”. Buchón, en la jerga sinaloense, es aquel habitante de la sierra que se hace millonario por sembrar, empaquetar y traficar mariguana y goma de opio. Y opcionalmente:
Gui Toolkits - Mono Picking the Right Toolkit One of the hardest and most important decision to make when starting a new desktop application is which GUI "toolkit" to choose. The toolkit is the set of API's that produce the graphical user interface your users will interact with. There are a number of factors to consider when choosing the toolkit. The two main toolkits offered by Mono are GTK# and Winforms, however there are several other toolkits offered by the community which may suit your needs. Both GTK# and Winforms, while being cross-platform, have clear roots in their original platforms. Gtk# Homepage: GtkSharp GTK# is a .NET binding for the Gtk+ toolkit. In general, GTK# applications are written using MonoDevelop, which provides a visual designer for creating GTK# GUIs. Platforms: Unix, Windows, OSX Pros: Good support for accessibility through its Gtk+ heritage. Cons: Gtk+ apps run like foreign applications on MacOS X. MonoMac Homepage: MonoMac Platforms: OSX Native look and feel on MacOS X. Windows.Forms
wiki: Lua Module Lua Sdl luaSDL description A Lua binary module, for accessing SDL from Lua scripts. SDL stands for "Simple DirectMedia? Layer", and is a comprehensive, open-source, cross-platform multimedia API that can be used to produce professional-quality games. [1] VersionNotice: This page largely pertains to an earlier version of Lua (4.0 and 5.0beta) using a loadmodule extension. luaSDL was built using the SDL header files and the tool tolua [2]. luaSDL is designed to be used with a Lua40 interpreter, with loadmodule support. maintainer ThatcherUlrich Downloads source [luaSDL.src.tar.gz] This source code is also maintained in CVS as a subset of the tu-testbed project on sourceforge [3] There is a sample game, "Meteor Shower", in the source archive (in the samples/ subdirectory). binaries [GNU/Linux-i386] | [Win32] users of other platforms: please contribute ports! I had problems building luaSDL with linux, gcc3.3, lua5.0 and tolua5.0alpha.
CSharpPlugin Xcode Plugin and supporting files for Mono C# integration This page is no longer maintained. Please use the latest version at Susan Mackay Abstract This document describes the installation, use and some of the background details of an Xcode plugin that allows the use of the Mono C# development environment. If you just want to get the code installed and running, then please start at the “Installation” section. Quick Start If you just want to get started, then follow these instructions. View the source code from Get the source code from Compile code in XCode. Starting Xcode should now show executable, library and Cocoa# New Project templates under a ‘C Sharp’ heading, executable and library target templates also under a ‘C Sharp’ heading, and a ‘C Sharp’ new file type. Preface Approach Scope and Exclusions
Boxer Boxer is designed to support and encourage open development of resources and tools. We want to empower educators at any level of technical expertise to modify, extend, or build from scratch. To this end, we very much want to see wide-spread grassroots creation of "materials the live and grow" as they are improved, extended and adapted to local circumstances. As a matter of principle, all materials developed at UC Berkeley are completely open and free of copyright restrictions. The largest collection of Boxer materials is that which comes with the standard Boxer distribution.