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 java.awt.Graphics; | |
import javax.swing.JComponent; | |
import javax.swing.JFrame; | |
class rect extends JComponent { | |
public static void main(String[] args) { | |
JFrame window = new JFrame(); | |
window.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); |
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
#!/bin/bash | |
print=0 | |
while read line; do | |
echo "CERR: $line" 1>&2 | |
if [[ "$(echo $line | cut -d':' -f3)" == "opencyc_jac" ]]; then | |
echo "CERR: to cyc: $(echo "$line" | cut -d':' -f4-)" 1>&2 | |
echo "$line" | cut -d':' -f4- | |
fi | |
done | ./run-cyc.sh | while read oline; do |
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
/* index of po2 works as follows: | |
po2[0] is base ^ 2^0 | |
po2[1] is base ^ 2^1 | |
po2[2] is base ^ 2^2 | |
... | |
po[i] is base ^ 2^i | |
*/ | |
int power(int base, int exp) { | |
int n = (exp+1)/2; |
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
!push/azn/([b-df-hj-mp-tv-z])([^a-zA-Z]|$)/\1u\2/ | |
!push/azn/([B-DF-HJ-MP-TV-Z])([^A-Za-z]|$)/\1U\2/ | |
!push/desu/(\S+)/desu/ | |
!push/cthulhu/[oe]/f'th/ | |
!push/cthulhu/[ia]/gh/ | |
!push/2012/.+/HERP DERP, END OF THE WORLD! | |
!push/2109/(\S+)/sustainable | |
!push/2ref/.*(\S+)$/STOUT SHAKO FOR TWO \U\1! | |
!push/amperdesert/./&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& | |
!push/awyeah/(\S+)/*thrust* |
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
#!/usr/bin/perl | |
if("catdog" =~ "/catdog/") { | |
print "match\n"; | |
} else { | |
print "no match\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
#!/usr/bin/perl | |
use strict; | |
use warnings; | |
my @arr = ("<f><e><e>stuff</e></e></f>" =~ /<f>(<e>((?1)|[^<>]+)<\/e>)<\/f>/g); | |
print join("\n", @arr); | |
print "\n"; |