Skip to content

Instantly share code, notes, and snippets.

#include <iostream>
using namespace std;
template<class ArgType>
void func(int val, ArgType arg) {
cout << "In func, val is " << val << " and arg is " << arg << endl;
}
int main() {
import flash.system.Security;
...
Security.loadPolicyFile("xmlsocket://" + securityServiceHost + ":" + securityServicePort);
#!/usr/bin/perl -w
#
# Simple Flash Socket Policy Server
# http://www.lightsphere.com/dev/articles/flash_socket_policy.html
#
# Copyright (C) 2008 Jacqueline Kira Hamilton
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
roelofs@trillian ~ $ multiruby -e "puts({}.hash == {}.hash)"
VERSION = 1.8.6-p368
CMD = ~/.multiruby/install/1.8.6-p368/bin/ruby -e puts({}.hash == {}.hash)
false
RESULT = 0
VERSION = 1.8.7-p72
# david_koontz hkhalid: here's a practice Ruby problem,
# given the Array [4, 53, 27, 81, 90]
# return all elements that are odd
puts [4, 53, 27, 81, 90].select {|n| n.odd? }
class A
def method_missing(*args)
puts "Missing in A"
end
end
class B < A
def method_missing(*args)
puts "Missing in B"
end
%%
%% Ad-hoc hot-code swap upgrade definitions file. Unlike .appup and .relup,
%% this is a pure Erlang file. Use this module to define how an upgrade is supposed
%% to take place for this system.
%%
%% Usage of this module is simple. You need to define up() and down() methods for
%% each version of the application. On an upgrade, the upgrade_manager will call
%% up(NewVsn) for upgrades. If you need to roll back, it will call down(NewVsn)
%% (with NewVsn being the version defined in your .app file).
%%
require 'benchmark'
require 'rubygems'
require 'publisher'
COUNT = 10_000_000
class Eventer
extend Publisher
def initialize
>> "#1123:somethinghere" =~ /(#[\d.]+)(?:\(.+?\))?/
=> 0
>> $1
=> "#1123"
diff --git a/lib/gamebox/template_app/crate_boot.c b/lib/gamebox/template_app/crate_boot.c
index ebb0c76..0126574 100644
--- a/lib/gamebox/template_app/crate_boot.c
+++ b/lib/gamebox/template_app/crate_boot.c
@@ -173,6 +173,9 @@ int main( int argc, char** argv )
/* initialize all extensions */
Init_ext();
+ /* Force setup of amalgamite */
+ Init_amalgalite3();