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
// | |
// TestCrashSpikeTests.swift | |
// TestCrashSpikeTests | |
// | |
// Created by Brad Heintz on 7/28/15. | |
// Copyright (c) 2015 Brad Heintz, but you can do any damn thing | |
// you please with this code. | |
// | |
import UIKit |
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 jruby | |
require 'java' | |
require '/Users/bradheintz/project/hadoop/current/lib/commons-logging-1.0.4.jar' | |
import org.apache.commons.logging.LogFactory | |
require '/Users/bradheintz/project/hadoop/current/hadoop-0.18.1-core.jar' | |
import org.apache.hadoop.io.IntWritable | |
import 'org.apache.hadoop.io.Text' |
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
java.lang.ExceptionInInitializerError | |
at java.lang.Class.forName0(Native Method) | |
at java.lang.Class.forName(Class.java:242) | |
at org.jruby.javasupport.JavaSupport.loadJavaClass(JavaSupport.java:151) | |
at org.jruby.javasupport.JavaSupport.loadJavaClassVerbose(JavaSupport.java:160) | |
at org.jruby.javasupport.JavaClass.forNameVerbose(JavaClass.java:922) | |
at org.jruby.javasupport.Java.getProxyOrPackageUnderPackage(Java.java:886) | |
at org.jruby.javasupport.Java.get_proxy_or_package_under_package(Java.java:914) | |
at org.jruby.javasupport.Java$JavaUtilities.get_proxy_or_package_under_package(Java.java:327) | |
at org.jruby.javasupport.Java$JavaUtilities$s_method_2_0$RUBYINVOKER$get_proxy_or_package_under_package.call(org/jruby/javasupport/Java$JavaUtilities$s_method_2_0$RUBYINVOKER$get_proxy_or_package_under_package.gen) |
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
# Inheritance Weirdness: I can get a couple of different errors, but no correct behavior out of the following code: | |
#!/usr/bin/env jruby -d | |
require 'java' | |
require '/Users/bradheintz/project/hadoop/current/lib/commons-logging-1.0.4.jar' | |
require '/Users/bradheintz/project/hadoop/current/lib/log4j-1.2.15.jar' | |
require '/Users/bradheintz/project/hadoop/current/hadoop-0.18.1-core.jar' | |
class MyMapper < org.apache.hadoop.mapred.MapReduceBase |
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
<html> | |
<head> | |
<title>Date to Day Converter</title> | |
</head> | |
<body> | |
<p><b>Instructions:</b> Enter a date in MM/DD/YYYY format, get back a day number from 1 to 366.</p> | |
<?php | |
if (isset($_POST['fromdate'])) { | |
$dt = new DateTime($_POST['fromdate']); | |
echo $_POST['fromdate']." is ".(date_format($dt, 'z') + 1)."<br/>\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
+ (void)paramRadixSort:(int*)input length:(int)l radix:(int)r { | |
int max = [self findMax:input length:l]; | |
int partiallySorted[l]; | |
int i; | |
int sigDig = 1; | |
int bin[r]; | |
while (sigDig < max) { | |
for (int i = 0; i < r; i++) bin[i] = 0; | |
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
+ (void)hexadecimalRadixSort2:(int[])input length:(int)l { | |
int max = [self findMax:input length:l]; | |
int partiallySorted[l]; | |
int i; | |
int powerOf16 = 0; | |
int bin[16]; | |
while ((1 << (powerOf16 << 2)) < max) { | |
for (int i = 0; i < 16; i++) bin[i] = 0; | |
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
$ pod install HowAboutWeHD.xcodeproj --verbose | |
Updating spec repo `master' | |
/usr/local/bin/git pull | |
Already up-to-date. | |
Installing dependencies of: /Users/fitz/workspace/HowAboutWeHD/Podfile | |
Using A2DynamicDelegate (1.0.8) | |
Using BlocksKit (1.0.6) | |
Generating support files | |
* Generating xcconfig file at `/Users/fitz/workspace/HowAboutWeHD/Pods/Pods.xcconfig' | |
* Generating prefix header at `/Users/fitz/workspace/HowAboutWeHD/Pods/Pods-prefix.pch' |
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
# __gitdir accepts 0 or 1 arguments (i.e., location) | |
# returns location of .git repo | |
__gitdir () | |
{ | |
if [ -z "${1-}" ]; then | |
if [ -n "${__git_dir-}" ]; then | |
echo "$__git_dir" | |
elif [ -d .git ]; then | |
echo .git | |
else |