Skip to content

Instantly share code, notes, and snippets.

View RyanBreaker's full-sized avatar

Ryan Breaker RyanBreaker

View GitHub Profile
package csci242.assignments.rsa;
import org.junit.rules.TemporaryFolder;
import java.io.File;
import java.io.IOException;
import java.io.PrintWriter;
/**
pairs = new char[arrSize][2];
for(int i = 0, a = 0; i < input.length() && a < arrSize; i++) {
if(i % 2 == 0)
pairs[a][0] = input.charAt(i);
else
pairs[a++][1] = input.charAt(i);
}
cOfI = new int[arrSize];
for(int i = 0; i < cOfI.length; i++) {
let (options, rest): ParseData
do {
(options, rest) = try optionParser.parse(Array(Process.arguments[1..<Process.arguments.count]))
} catch OptionKitError.InvalidOption(let description) {
print(description)
exit(1)
}
/*
* Copyright (c) 1999-2015 Apple Inc. All rights reserved.
*
* @APPLE_OSREFERENCE_LICENSE_HEADER_START@
*
* This file contains Original Code and/or Modifications of Original Code
* as defined in and that are subject to the Apple Public Source License
* Version 2.0 (the 'License'). You may not use this file except in
* compliance with the License. The rights granted to you under the License
* may not be used to create, or enable the creation or redistribution of,
package main
import "os"
func main() {
stdinStat, _ := os.Stdin.Stat()
stdinBytes := make([]byte, stdinStat.Size())
os.Stdin.Read(stdinBytes)
os.Stdout.Write(stdinBytes)
package main
import (
"fmt"
"flag"
)
func main() {
var noNewLine bool
flag.BoolVar(&noNewLine, "n", false, "Do not print the trailing newline character.")
@RyanBreaker
RyanBreaker / 0 - UNIX Fifth Edition.c
Created November 15, 2015 19:31
UNIX V5, OpenBSD, Plan 9, FreeBSD, and GNU coreutils implementations of echo.c
main(argc, argv)
int argc;
char *argv[];
{
int i;
argc--;
for(i=1; i<=argc; i++)
printf("%s%c", argv[i], i==argc? '\n': ' ');
}
import UIKit
class TableCell : UITableViewCell {
private(set) var textField: UITextField? = nil
override var textLabel: UILabel? { get {
return nil
}}
import UIKit
class AddToDoItemViewController: UIViewController {
@IBOutlet weak var saveButton: UIBarButtonItem!
@IBOutlet weak var textField: UITextField!
override func viewDidLoad() {
super.viewDidLoad()
}
package GameState;
import TileMap.Background;
import Audio.AudioPlayer;
import java.awt.*;
import java.awt.event.KeyEvent;
public class MenuState extends GameState {
private Background bg;