Skip to content

Instantly share code, notes, and snippets.

View RyanBreaker's full-sized avatar

Ryan Breaker RyanBreaker

View GitHub Profile
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
String inputString;
Stack stack = new Stack();
while(true) {
import XCTest
class WordCountTest: XCTestCase {
func XCTAssertEqualDictionaries(first: [String: Int], second: [String: Int]) {
XCTAssertEqual(first, second)
}
func testCountOneWord() {
let words = WordCount(words: "word")
- (IBAction)displayDay:(id)sender {
NSDate *chosen = [self.datePicker date];
NSDateFormatter *formatter = [[NSDateFormatter alloc]init];
[formatter setDateFormat:@"EEEE"];
NSString *day = [formatter stringFromDate:chosen];
NSString *msg = [[NSString alloc] initWithFormat:@"That's a %@.", day];
@IBOutlet weak var datePicker: UIDatePicker!
@IBAction func displayDay(sender: AnyObject) {
let formatter = NSDateFormatter()
formatter.dateFormat = "EEEE"
let day = formatter.stringFromDate(datePicker.date)
let msg = "Thats a \(day)."
let alert = UIAlertView(title: "What day is that?", message: msg, delegate: nil, cancelButtonTitle: "Okay")
SELECT
isbn,
title,
price,
imageFilename,
compositeName
FROM tblbooks books
JOIN tblauthors authors
ON tblbooksauthorsxref.isbn = books.isbn AND
tblbooksauthorsxref.authorId = authors.authorId
-- MySQL dump 10.13 Distrib 5.5.42, for osx10.6 (i386)
--
-- Host: localhost Database: volga
-- ------------------------------------------------------
-- Server version 5.5.42
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
var koa = require('koa');
var app = koa();
// x-response-time
app.use(function *(next){
var start = new Date;
yield next;
var ms = new Date - start;
this.set('X-Response-Time', ms + 'ms');
namespace ConsoleApplication
{
public class Program
{
public static void Main(string[] args)
{
var chicken = new Animal<Egg>();
}
}
namespace FizzBuzz
{
public class Program
{
public static void Main(string[] args)
{
string s;
for(int i = 1; i <= 100; i++)
{
if(window.scrollMaxY === null) {
Object.defineProperty(window, 'scrollMaxY', {
get: function() { return document.documentElement.scrollHeight - document.documentElement.clientHeight; }
});
}