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
// | |
// ViewController.swift | |
// KeyboardTransitionBug | |
// | |
// Created by Sid on 07/12/2017. | |
// Copyright © 2017 Picnic. All rights reserved. | |
// | |
import UIKit |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>DVTConsoleDebuggerInputTextColor</key> | |
<string>0 0 0 1</string> | |
<key>DVTConsoleDebuggerInputTextFont</key> | |
<string>Menlo-Bold - 11.0</string> | |
<key>DVTConsoleDebuggerOutputTextColor</key> | |
<string>0 0 0 1</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
/* | |
* Hedgewars-iOS, a Hedgewars port for iOS devices | |
* Copyright (c) 2009-2011 Vittorio Giovara <[email protected]> | |
* | |
* 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; version 2 of the License | |
* | |
* This program is distributed in the hope that it will be useful, | |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
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
import UIKit | |
struct Album { | |
let title: String | |
} | |
class SwiftAlbumsTableViewController: UITableViewController { | |
@IBOutlet weak private var activityIndicator: UIActivityIndicatorView! |
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
// | |
// QuadTree.h | |
// | |
// Created by Sid on 24/01/14. | |
// Copyright (c) 2014 whackylabs. All rights reserved. | |
// | |
#ifndef QuadTree_h | |
#define QuadTree_h |
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
import UIKit | |
func clamp<T:Comparable>(value:T, lowerBound:T, upperBound:T) -> T { | |
return min(max(lowerBound, value), upperBound) | |
} | |
func clamp(value:Vector2, lowerBound:Vector2, upperBound:Vector2) -> Vector2 { | |
return min(max(lowerBound, value), upperBound) | |
} |
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 <iostream> | |
struct Vector2 { | |
float x; | |
float y; | |
Vector2(float x = 0, float y = 0) { | |
this->x = x; |
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
// | |
// AsyncLoading.cpp | |
// | |
// Created by Sid on 11/10/14. | |
// Copyright (c) 2014 whackylabs. All rights reserved. | |
// | |
// Context: http://www.reddit.com/r/gamedev/comments/2ivsp6/async_loading_and_syncing_threads_with_your/ | |
/** Output: |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<TextureAtlas> | |
<meta> | |
<textureName>{{ metadata.target.textureFileName }}</textureName> | |
<textureExtension>{{ metadata.target.textureFileExtension }}</textureExtension> | |
<textureSize>{{ metadata.size }}</textureSize> | |
</meta> | |
<SubTextures> | |
{% for sprite in spritesAndAliases %} | |
<SubTexture> |
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
/** Log execution time of a block of code in nanoseconds and milliseconds | |
* Just add a Timer object at the start of the code block. | |
* Provide a prefix string about some context | |
* | |
* Example: | |
* long LargestPrimeFactor(const long num) | |
* { | |
* Timer t("LargestPrimeFactor:(" + std::to_string(num) + ") "); | |
* //stuff here.. | |
* } |