Skip to content

Instantly share code, notes, and snippets.

View gegagome's full-sized avatar

German Garces gegagome

  • Santa Barbara, CA
View GitHub Profile
class Bob
{
func hey(prompt: String) -> String {
let shouting = "Woah, chill out!"
let question = "Sure"
let touchy = "Fine. Be that way!"
let apathy = "Whatever."
if (isLowerCase(prompt: prompt)) {
return shouting
import UIKit
class Bob {
class func hey(prompt: String) -> String {
let shouting = "Woah, chill out!"
let question = "Sure."
let touchy = "Fine, be that way."
let apathy = "Whatever."
if loopForMatch(type: NSCharacterSet.uppercaseLetterCharacterSet(), stringToEvaluate: prompt) {
return shouting
#import "Hamming.h"
@implementation Hamming
+ (NSUInteger) compute:(NSString *)firstString against:(NSString *)secondString {
int hammingDistance = 0;
if ([firstString length] <= [secondString length]) {
hammingDistance = (int)[self loopForStringBeginningWithShort:firstString withLong:secondString];
} else {
hammingDistance = (int)[self loopForStringBeginningWithShort:secondString withLong:firstString];
#import <UIKit/UIKit.h>
#import "BBHHistoryTableView.h"
#import "SingletonClass.h"
@interface BBHHistoryViewController : UIViewController <UITableViewDelegate, UITableViewDataSource>
{
BBHHistoryTableView *historyTableView;
@gegagome
gegagome / DiamondShapeProgram.c
Last active September 7, 2015 22:39
Diamond Printing Program in C
#include <stdio.h>
#include <stdlib.h>
#define MAX_BUFFER 3 // Set > 4 if need a diamond taller than 99.
#define CHARACTER '*'
#define SPACER ' '
int main(void) {
int centerOfDiamond;
int loopCycles;
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define URL_PROMPT "URL:"
#define MAX_BUFFER 256000
char *addressFinder(const char *sPtr, const char *word);
int instanceCounter(const char *ptr, const char *w);
void printPointerDifference(const char *p1, const char *p2, int diff);
using UnityEngine;
using UnityEngine.EventSystems;
using System.Collections;
using System.Collections.Generic;
using UnityEngine.UI;
public delegate void LetterDelegate (int letterInt);
public class BigLettersController : MonoBehaviour {
public List<GenericMenuOptions> _sceneButtons;
public bool _isMenuExposed = false;
public const float MENU_ICON_HEIGHT = 81.7f;
public const float GEAR_ROTATION_AMOUNT = -120f;
public const float GEAR_ROTATION_LENGTH = 0.5f;
Vector2 _gearIconPos = new Vector2(45f, -50.85f);
Vector2 _iconSize = new Vector2(70f, 81.7f);
Vector2 _pivot = new Vector2(0.5f, 0.5f);
Sequence _menuExposer;
using UnityEngine;
using UnityEngine.EventSystems;
public class GraphicForLetters : MonoBehaviour, IPointerClickHandler, IPointerDownHandler, IPointerUpHandler {
void Awake () {
SpriteRenderer spriteRenderer = GetComponent<SpriteRenderer>();
spriteRenderer.sortingOrder = 3;
}
#include <iostream>
#include <string>
#include <vector>
using namespace std;
#include "IceCream.h"
iceCream::iceCream() {