Skip to content

Instantly share code, notes, and snippets.

View augusteo's full-sized avatar

Vin Astralis augusteo

  • Zaibatsu Heavy Industries
  • Silicon Valley
View GitHub Profile
#include <cmath>
#include <cstdio>
#include <vector>
#include <iostream>
#include <algorithm>
using namespace std;
int number, result, i;
string text;
int main() {
scanf("%i", &number);
- (void)applicationWillResignActive:(UIApplication *)application {
// Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
// Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
UISplitViewController *splitView = (UISplitViewController*)self.window.rootViewController;
BMJSDetailViewController* controller = nil;
for(id vc in splitView.viewControllers) {
NSLog(@"This is for %@", vc);
if([vc isKindOfClass:[BMJSDetailViewController class]]) {
controller = (BMJSDetailViewController*)vc;
NSLog(@"Current active window: %@ and splitview %@", controller, splitView);
// Playground - noun: a place where people can play
import UIKit
import Foundation
var textArray:[String?] = ["first", nil, "third", nil]
var isBigThumb:[Bool] = [false, false, false, true]
class testClass: NSObject {
var text:String?
import UIKit
import QuartzCore
class SnowView: UIView {
override init(frame: CGRect) {
super.init(frame: frame)
let emitter = layer as CAEmitterLayer
emitter.emitterPosition = CGPoint(x: bounds.size.width / 2, y: 0)
/usr/local (master ✔) ᐅ brew install mongodb
Warning: You are using OS X 10.11.
We do not provide support for this pre-release version.
You may encounter build failures or other breakage.
==> Installing dependencies for mongodb: go, scons
==> Installing mongodb dependency: go
==> Downloading https://storage.googleapis.com/golang/go1.4.2.src.tar.gz
Already downloaded: /Library/Caches/Homebrew/go-1.4.2.tar.gz
==> Building go for -darwin
==> ./make.bash --no-clean
//: Playground - noun: a place where people can play
import UIKit
func firstNNumbersOf(base: Double, powerOf: Double, firstN: Double) -> Double {
let x = powerOf * log10(base)
print("log 10 of \(base) is \(log10(base))")
print("x is \(x)")
let p = x - floor(x) + firstN - 1
//
// ViewController.swift
// RegionIndustryCSV
//
// Created by vic on 15/07/2015.
// Copyright (c) 2015 augusteo. All rights reserved.
//
import UIKit
import CSwiftV
//
// ViewController.swift
// RegionIndustryCSV
//
// Created by vic on 15/07/2015.
// Copyright (c) 2015 augusteo. All rights reserved.
//
import UIKit
import CSwiftV
<script src="https://code.jquery.com/jquery-2.1.4.min.js"></script>
<!-- dropdown search -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.0.8/components/dropdown.min.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.0.8/components/dropdown.min.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.0.8/components/transition.min.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.0.8/components/transition.min.js"></script>
<script src="https://code.jquery.com/jquery-2.1.4.min.js"></script>
<!-- dropdown search -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.0.8/components/dropdown.min.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.0.8/components/dropdown.min.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.0.8/components/transition.min.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.0.8/components/transition.min.js"></script>