This file contains hidden or 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
require 'rubygems' | |
require 'dm-core' | |
require 'dm-migrations/migration_runner' | |
DataMapper::Logger.new("log/db.log", :debug) | |
DataMapper.setup(:default, ENV['DATABASE_URL'] || "sqlite3://#{Dir.pwd}/telenor.db") | |
DataMapper.logger.debug( "Starting Migration" ) | |
migration 1, :change_integer_to_string do | |
up do |
This file contains hidden or 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
require 'rubygems' | |
require 'dm-core' | |
class Event | |
include DataMapper::Resource | |
default_scope.update( :order => [ :start_time.desc ] ) | |
property :id, Serial | |
property :eid, String |
This file contains hidden or 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
class User | |
include DataMapper::Resource | |
has 1, :event | |
default_scope.update( :order => [ :priority.desc ] ) | |
property :username, String, :key => true, :unique => true | |
property :name, String, :length => 255 |
This file contains hidden or 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
// Proposed syntax: | |
var a,b,c = function() { return [1,2,3]; }; | |
// Equivalent to: | |
var r = function() { return [1,2,3]; }; | |
var a = r[0]; | |
var b = r[1]; | |
var c = r[2]; |
This file contains hidden or 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
require "rubygems" | |
require "dm-core" | |
class Store | |
include DataMapper::Resource | |
property :id, Serial | |
property :key, String, :length => 255 | |
property :val, String, :length => 65535 | |
This file contains hidden or 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
gcc -O2 -Imikmod -DOGG_MUSIC -DHAVE_LIBC=1 -DMID_MUSIC -DCMD_MUSIC -DWAV_MUSIC -DUSE_NATIVE_MIDI -DMOD_MUSIC -DMP3_MUSIC -D__STDC__ -I../../include -Inative_midi -I../../include/SDL13 native_midi/native_midi_mac.c -c -onative_midi/native_midi_mac.o | |
<command-line>: warning: "__STDC__" redefined | |
<built-in>: warning: this is the location of the previous definition | |
native_midi/native_midi_mac.c:51: error: ‘NoteRequest’ undeclared here (not in a function) | |
native_midi/native_midi_mac.c:79: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘gTunePlayer’ | |
native_midi/native_midi_mac.c: In function ‘native_midi_loadsong’: | |
native_midi/native_midi_mac.c:134: error: ‘gTunePlayer’ undeclared (first use in this function) | |
native_midi/native_midi_mac.c:134: error: (Each undeclared identifier is reported only once | |
native_midi/native_midi_mac.c:134: error: for each function it appears in.) | |
native_midi/native_midi_mac.c:135: error: ‘kTunePlayerComponentType’ undeclared (first use in this function) |
This file contains hidden or 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
g++ -o ../ndll/Mac/nme.ndll -fpic -fPIC -dynamiclib -framework Cocoa -fvisibility=hidden -framework IOKit -framework CoreAudio -framework Carbon -framework AudioToolbox -framework AudioUnit -framework ForceFeedback -framework Cocoa -framework OpenGL -framework QuickTime obj/darwin//BitmapFilters.o obj/darwin//BlendSurface.o obj/darwin//ByteArray.o obj/darwin//Gradient.o obj/darwin//Matrix.o obj/darwin//collision.o obj/darwin//draw_object.o obj/darwin//gl_helpers.o obj/darwin//net.o obj/darwin//nme.o obj/darwin//sound.o obj/darwin//sprite.o obj/darwin//Joystick.o obj/darwin//text.o obj/darwin//text_texture.o obj/darwin//texture_buffer.o obj/darwin//timer.o obj/darwin//MacBoot.o obj/darwin//renderer/Polygon.o obj/darwin//renderer/PolygonMask.o obj/darwin//renderer/RenderBitmap.o obj/darwin//renderer/RenderGradient.o obj/darwin//renderer/RenderSolid.o obj/darwin//renderer/Utils.o ../../sdl-static/lib/Mac/libSDL_image.a ../../sdl-static/lib/Mac/libSDL_mixer.a ../../sdl-static/lib/Mac/libSDL_ttf.a ../../sdl-static |
This file contains hidden or 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
class Home extends Controller { | |
public function index() { | |
return "view/Home.ehx"; | |
} | |
} |
This file contains hidden or 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
--- Makefile.original 2009-09-16 19:29:16.000000000 +0200 | |
+++ Makefile 2009-09-16 22:37:28.000000000 +0200 | |
@@ -1,99 +1,60 @@ | |
-## CONFIG | |
+prefix ?= /usr/local | |
+DESTDIR ?= /usr/local | |
-INSTALL_PREFIX = /usr/local | |
- | |
-CFLAGS = -Wall -O3 -fPIC -fomit-frame-pointer -I vm -D_GNU_SOURCE |
This file contains hidden or 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
var maxTilesPerRow = Math.floor( MAX_TILE_MAP_WIDTH / _maxRect.width ); | |
var totalTiles = 0; | |
for( e in _effects ) | |
totalTiles += e.frames; | |
if( totalTiles < maxTilesPerRow ) { | |
// Simplify for few frames. | |
_tileMapWidth = Std.int( totalTiles * _maxRect.width ); | |
_tileMapHeight = Std.int( _maxRect.height ); |