This file contains 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
- (void) layerPanZoom: (CCLayerPanZoom *) sender | |
clickedAtPoint: (CGPoint) point | |
tapCount: (NSUInteger) tapCount | |
{ | |
NSLog(@"CCLayerPanZoomTestLayer#layerPanZoom: %@ clickedAtPoint: { %f, %f }", sender, point.x, point.y); | |
if (tapCount == 2) { | |
// Toggle zooming all the way in and all the way out. | |
float midScale = (sender.minScale + sender.maxScale) / 2.0; |
This file contains 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 SQL can be used to calculate the rank of a given user in a game, | |
-- and the names/scores of those just above and below him. | |
-- This is useful in online games or citizen science projects where you | |
-- just want to see the 'proximity' of other users around you, not the entire global rank | |
-- I want to find the rank and score for user_3, and other users 3 above and 3 below. | |
WITH global_rank AS ( | |
SELECT name, score, rank() OVER (ORDER BY score DESC) FROM scores | |
) | |
SELECT * FROM global_rank |
This file contains 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
// | |
// SpriteLayer.h | |
// | |
// Created by Joseph C Osborn on 2011.01.12. | |
// Copyright 2011 Universal Happy-Maker. All rights reserved. | |
// This code is made available under the 3-clause BSD license: | |
// http://www.opensource.org/licenses/BSD-3-Clause | |
// | |
#import <Foundation/Foundation.h> |
This file contains 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
// | |
// BaseViewController.m | |
// | |
// Created by Peter Boctor on 5/4/11. | |
// | |
// Copyright (c) 2011 Peter Boctor | |
// | |
// 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 |
NewerOlder