This file contains hidden or 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 csci242.assignments.rsa; | |
import org.junit.rules.TemporaryFolder; | |
import java.io.File; | |
import java.io.IOException; | |
import java.io.PrintWriter; | |
/** |
This file contains hidden or 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
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++) { |
This file contains hidden or 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
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) | |
} |
This file contains hidden or 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
/* | |
* 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, |
This file contains hidden or 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 main | |
import "os" | |
func main() { | |
stdinStat, _ := os.Stdin.Stat() | |
stdinBytes := make([]byte, stdinStat.Size()) | |
os.Stdin.Read(stdinBytes) | |
os.Stdout.Write(stdinBytes) |
This file contains hidden or 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 main | |
import ( | |
"fmt" | |
"flag" | |
) | |
func main() { | |
var noNewLine bool | |
flag.BoolVar(&noNewLine, "n", false, "Do not print the trailing newline character.") |
This file contains hidden or 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
main(argc, argv) | |
int argc; | |
char *argv[]; | |
{ | |
int i; | |
argc--; | |
for(i=1; i<=argc; i++) | |
printf("%s%c", argv[i], i==argc? '\n': ' '); | |
} |
This file contains hidden or 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 | |
class TableCell : UITableViewCell { | |
private(set) var textField: UITextField? = nil | |
override var textLabel: UILabel? { get { | |
return nil | |
}} |
This file contains hidden or 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 | |
class AddToDoItemViewController: UIViewController { | |
@IBOutlet weak var saveButton: UIBarButtonItem! | |
@IBOutlet weak var textField: UITextField! | |
override func viewDidLoad() { | |
super.viewDidLoad() | |
} |