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
public class Paul { | |
public static void printArray(int[] array) { | |
System.out.print("{"); | |
for (int i = 0; i < array.length; i++) { | |
System.out.print(array[i]); | |
if (i < array.length - 1) { | |
System.out.print(", "); | |
} |
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
public class randomCapitals { | |
public static String randomUpper(String sentence) { | |
StringBuilder output = new StringBuilder(); | |
for (int i = 0; i < sentence.length(); i++) { | |
char c = sentence.charAt(i); | |
if (Math.random() > .5) { | |
c = Character.toUpperCase(c); | |
} else { |
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
public class Chess960 { | |
public static void main(String[] args) { | |
char[] board = new char[8]; | |
for (int i = 0; i < 2; i++) { | |
int r = (int) (Math.random() * 4) * 2; | |
if (i == 1) { | |
r++; | |
} |
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
#!/usr/bin/env perl | |
use strict; | |
use warnings; | |
my %hash; | |
my $output = 0; | |
open FILE, "TWL06.txt" or die $!; | |
while (<FILE>) { |
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
#!/usr/bin/env python | |
import collections | |
d = collections.defaultdict(list) | |
output = 0 | |
f = open("TWL06.txt") | |
for line in f.readlines(): | |
line = line.strip().lower() |
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
#!/usr/bin/perl | |
use strict; | |
use warnings; | |
use feature qw(switch say); | |
use Getopt::Std; | |
use LWP::Simple; | |
sub help { | |
say "Usage: $0 [-cf] <zip code>"; | |
exit; |
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
#!/usr/bin/env perl | |
use strict; | |
use warnings; | |
use Getopt::Std; | |
use feature 'say'; | |
sub yesno { | |
my ($prompt) = @_; | |
print "$prompt [Y/n] "; |
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
#!/usr/bin/env perl | |
use strict; | |
use warnings; | |
use feature "say"; | |
use WWW::Mechanize; | |
my $dir = "yb"; | |
my $url = "http://www.cs.utexas.edu/users/peterson/yb/"; | |
my $mech = WWW::Mechanize->new(); |
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
--- src/procps-procps/top/top_nls.c 2012-05-19 23:39:52.000000000 -0500 | |
+++ tmp/top_nls.c 2013-02-25 21:37:50.625067795 -0600 | |
@@ -410,7 +410,7 @@ | |
" 'd' or <Space> toggles display, 's' sets sort. Use 'q' or <Esc> to end! "); | |
Uniq_nlstab[STATE_line_1_fmt] = _("%s:~3" | |
- " %3u ~2total,~3 %3u ~2running,~3 %3u ~2sleeping,~3 %3u ~2stopped,~3 %3u ~2zombie~3\n"); | |
+ " %3u ~2total,~3 %3u ~2running,~3 %3u ~2sleeping,~3 %3u ~2stopped,~3 %3u ~2zombie,~3 99 ~2problems,~3 0 ~2bitches\n"); | |
Uniq_nlstab[STATE_lin2x4_fmt] = _("%%%s~3" |
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
syntax on | |
set nocompatible | |
filetype on | |
filetype plugin on | |
filetype plugin indent on | |
set ignorecase | |
set smartcase |