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
#include "marching-squares.hh" | |
#include "point.hh" | |
#include "polygon.hh" | |
#include "douglas-peucker.hh" | |
#include <ps/canvas/canvas.hh> | |
#include <cstring> | |
#include <vector> |
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
module Opal | |
module Nodes | |
module SexpNode | |
def self.from_sexp(*) # Imagine the extend(ClassMethods) dance. | |
end | |
end | |
end | |
end | |
class Opal::Nodes::BaseNode |
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
module Dirt | |
# This is the simplest inflector that would be useful. It doesn't have a list | |
# of any preloaded irregulars (e.g., Person -> People). | |
# | |
# Use Dirt::Inflector::irregular! to add your special cases. | |
# | |
# You can create an Inflector with #new, as expected, but the system has | |
# a default inflector, which is accessed via .instance. Calling methods | |
# on the class delegates to the default instance. | |
# |
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
# Implement automatic output escaping for ERB. It works a lot like Rails | |
# | |
# Check out this article by Yehuda Katz to get the idea: | |
# http://yehudakatz.com/2010/02/01/safebuffers-and-rails-3-0/ | |
# | |
# Effectively any generated output is escaped unless it is html_safe? | |
# | |
# Nothing is safe except a few built-in classes, and Dirt::SafeString. | |
# | |
# You can generate a Dirt::SafeString from any object by calling #html_safe. |
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
def f | |
yield "trol" | |
yield "olol" | |
yield "lolo" | |
end | |
var f = function() { | |
continuation = {}; | |
continuation = { | |
next: 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
opal_filter "Enumerator" do | |
fails "Enumerator#each yields each element of self to the given block" | |
fails "Enumerator#each calls #each on the object given in the constructor by default" | |
fails "Enumerator#each calls #each on the underlying object until it's exhausted" | |
fails "Enumerator#each calls the method given in the constructor instead of #each" | |
fails "Enumerator#each calls the method given in the constructor until it's exhausted" | |
fails "Enumerator#each raises a NoMethodError if the object doesn't respond to #each" | |
fails "Enumerator#each returns self if not given arguments and not given a block" | |
fails "Enumerator#each returns the same value from receiver.each if block is given" | |
fails "Enumerator#each passes given arguments at initialized to receiver.each" |
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
describe "The raise method" do | |
it "should clear $! and $@ if no exception is active" do | |
$!.should be_nil | |
[email protected] be_nil | |
end | |
it "sets $! and $@ during the body of each rescue clause" do | |
begin | |
raise "ERROR" | |
rescue |
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
# This implementation replaces rails-ujs's :confirm behavior, from a | |
# browser-provided, window.confirm() to a nice bootstrap dialog. | |
# This is based upon the technique and code described here: | |
# | |
# http://rors.org/demos/custom-confirm-in-rails | |
# | |
# Special handling of delete actions, better tab behavior, | |
# and DOM cleanup was added. |
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
#!/bin/bash | |
# Modification of https://github.com/brunodecarvalho/curl-ios-build-scripts | |
VERSION="7.27.0" | |
LIBNAME="libcurl" | |
LIBDOWNLOAD="http://curl.haxx.se/download/curl-${VERSION}.tar.gz" | |
ARCHIVE="${LIBNAME}-${VERSION}.tar.gz" | |
# Enabled/disabled protocols (the fewer, the smaller the final binary size) | |
PROTOCOLS="--enable-http --disable-rtsp --disable-ftp --disable-file --disable-ldap --disable-ldaps \ |
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
/**************************************************************************** | |
Copyright (c) 2012 cocos2d-x.org | |
Copyright (c) 2012 Mike Owens <mike@filespanker> | |
Copyright (c) 2010 Sangwoo Im | |
http://www.cocos2d-x.org | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights |