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
#include <stdio.h> | |
#include <math.h> | |
#define LOWER 0 | |
#define UPPER 20 | |
#define RADIUS 1 | |
int factorial(int n) | |
{ | |
if (n == 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
// | |
// ViewController.h | |
// ScrewingAround | |
// | |
// Created by Michael Snowden on 3/9/14. | |
// Copyright (c) 2014 Michael Snowden. All rights reserved. | |
// | |
#import <UIKit/UIKit.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
#define CUBE_DIMENSION 4 | |
GLushort *indices; | |
GLuint numIndices; | |
int main() | |
{ | |
numIndices = 24 * 6; | |
indices = malloc(sizeof(GLushort) * numIndices); | |
int powers[CUBE_DIMENSION]; |
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
NSString *pattern = @"[A-Z][a-z]?\\d*|(?<!\\([^)]*)\\(.*\\)\\d+(?![^(]*\\))"; | |
NSRegularExpression *regex = [NSRegularExpression | |
regularExpressionWithPattern:pattern | |
options:0 | |
error:nil]; | |
NSArray *tests = [[NSArray alloc ] initWithObjects:@"Ca3(PO4)2", @"HCl", @"CaCO3", @"ZnCl2", @"C7H6O2", @"PtCl2(NH3)2", @"Co3(Fe(CN)6)2", nil]; | |
for (NSString *testString in tests) | |
{ | |
NSLog(@"Testing: %@", testString); | |
NSArray *myArray = [regex matchesInString:testString options:0 range:NSMakeRange(0, [testString length])] ; |
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 main(void) | |
{ | |
float currTime = u_time; | |
vec2 uv = v_tex_coord; | |
vec2 circleCenter = vec2(0.5, 0.5); | |
vec3 circleColor = vec3(0.8, 0.5, 0.7); | |
vec3 posColor = vec3(uv, 0.5 + 0.5 * sin(currTime)) * circleColor; | |
float illu = pow(1. - distance(uv, circleCenter), 4.) * 1.2; |
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
#ifndef Truth_Operator_h | |
#define Truth_Operator_h | |
#include <iostream> | |
#include <vector> | |
#include <string> | |
#include <map> | |
#include <functional> | |
using namespace std; |
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
#import <UIKit/UIKit.h> | |
@interface UITextField (Cursor) | |
- (void)offsetCursorBy:(int) n; | |
@end |
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
// | |
// Cube.h | |
// OpenGL | |
// | |
// Created by Michael Snowden on 11/15/14. | |
// Copyright (c) 2014 MichaelSnowden. All rights reserved. | |
// | |
#import <Foundation/Foundation.h> | |
#import <OpenGLES/ES1/glext.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
<?xml version="1.0" encoding="UTF-8"?> | |
<inspections version="1.0"> | |
<option name="myName" value="LoD" /> | |
<inspection_tool class="AbstractBeanReferencesInspection" enabled="false" level="ERROR" enabled_by_default="false" /> | |
<inspection_tool class="AccessStaticViaInstance" enabled="false" level="WARNING" enabled_by_default="false" /> | |
<inspection_tool class="AndroidDomInspection" enabled="false" level="ERROR" enabled_by_default="false" /> | |
<inspection_tool class="AndroidElementNotAllowed" enabled="false" level="WARNING" enabled_by_default="false" /> | |
<inspection_tool class="AndroidLintAaptCrash" enabled="false" level="ERROR" enabled_by_default="false" /> | |
<inspection_tool class="AndroidLintAccidentalOctal" enabled="false" level="ERROR" enabled_by_default="false" /> | |
<inspection_tool class="AndroidLintAdapterViewChildren" enabled="false" level="WARNING" enabled_by_default="false" /> |
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
package com.michaelsnowden.generated; | |
import com.google.common.base.Joiner; | |
import com.michaelsnowden.js2j.Javascript; | |
import com.michaelsnowden.js2j.JavascriptObject; | |
public class $ extends JavascriptObject { | |
protected String varName; |
OlderNewer