I hereby claim:
- I am jeffomatic on github.
- I am jeffomatic (https://keybase.io/jeffomatic) on keybase.
- I have a public key whose fingerprint is 1357 9DF7 C2F5 E0E0 ACC9 30D0 591F 7F89 D640 ACFD
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| require 'factual/query/crosswalk' | |
| unless Factual::Query::Crosswalk.instance_methods.include?(:namespace) | |
| class Factual | |
| module Query | |
| class CrosswalkNamespace < Base | |
| def initialize(api, params = {}) | |
| @path = "places/crosswalk" | |
| @action = :crosswalk |
| [ | |
| "performance", | |
| [ | |
| // Project-specific metadata | |
| [ "svn_revision", "s", "195388" ], | |
| [ "platform", "s", "ps3" ], | |
| [ "system_id", "s", "08EB4EEF3C76C468" ], | |
| [ "timestamp", "d", "__server_timestamp__" ], | |
| // Programmer-specified data |
| // Remove the overlay node from the DOM | |
| $('#overlay').parent().remove(); | |
| // Restore the scrollbars | |
| $('html').css( "overflow", "scroll" ); |
| [ | |
| "tableName", | |
| [ | |
| [ "field1", "type", "value" ], | |
| [ "field2", "type", "value" ], | |
| ... | |
| ] | |
| ] |
| void RecordLevelEndData() | |
| { | |
| // Grab in-game data | |
| float fHealth = GetPlayerHealth(); | |
| unsigned nScore = GetPlayerScore(); | |
| // Get an object that sends data to the | |
| // "performance" table | |
| wfStat* pStat = wfMetrics::Create( "performance" ); |
| # CAVEAT EMPTOR: This is excerpted code that I pulled out of context, | |
| # re-arranged, renamed the variables of, and otherwise dicked around with | |
| # a lot without having put it back into a Ruby interpreter, so it's | |
| # possible that there's some gnarly typo or bug in here. In short, don't | |
| # cut-and-paste this code. | |
| class AlreadyLockedException < Exception; end | |
| def redis_spinlock(redis, lock_handle, opts = {}, &critical_section) | |
| lock_set = opts[:lock_set] || 'named_locks' |
| # CAVEAT EMPTOR: This is excerpted code that I pulled out of context, | |
| # re-arranged, renamed the variables of, and otherwise dicked around with | |
| # a lot without having put it back into a Ruby interpreter, so it's | |
| # possible that there's some gnarly typo or bug in here. In short, don't | |
| # cut-and-paste this code. | |
| # In our example, "cache" is some resource accessible by all of our | |
| # processes and provides a run-time interface similar to Ruby's Hash | |
| # class. | |
| def cache_lookup(redis, resource_handle, cache, &run_on_cache_miss) |
| // Declare and instantiate a signal for functions that take a | |
| // single char arg. | |
| JL_SIGNAL( char ) oKeyPressSignal; | |
| // Two objects of unrelated type. | |
| Piano oPiano; // plays notes | |
| Transcriber oTranscriber; // generates text logs | |
| // Lets assume the following instance method declarations: | |
| // |
| // For the purposes of this example, let's assume our slots only accept | |
| // one parameter. | |
| template< typename TSlotParam > | |
| class Delegate | |
| { | |
| public: | |
| virtual ~Delegate() {} | |
| virtual void Invoke( TSlotParam v ) = 0; | |
| }; |