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
function prompt | |
{ | |
$loc = Get-Location | |
$parts = $loc.Path.split("\") | |
$shortparts = @($parts[0]) | |
if ($parts.length -gt 2) | |
{ | |
$shortparts += $parts[1..($parts.length - 2)] | % { $_[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
import java.util.HashMap | |
object MapPerf { | |
def main(args: Array[String]) { | |
if ( args.length < 2 ) { | |
println("Usage: scala MapPerf <number of elements to insert> <num trials>") | |
return | |
} |
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
#test return -18 | |
//many tests catch special behaviour around tmin and tmax. this one tests for tpain. | |
int main() | |
{ | |
int b; int o; int a; int t; int _____; | |
b = 1; | |
o = 2; | |
a = 4; |
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
abstract class Status { | |
import java.util.Date | |
val id: Long | |
val text: String | |
val createdAt: Date | |
val user: User | |
val inReplyToStatusID: Option[Int] | |
val inReplyToUserID: Option[Int] |
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
function p75_jw_player_handler( $matches, $attr, $url, $rawattr ) | |
{ | |
static $counter = 1; | |
if ( !empty($rawattr['width']) && !empty($rawattr['height']) ) { | |
$width = (int) $rawattr['width']; | |
$height = (int) $rawattr['height']; | |
} else { | |
list( $width, $height ) = wp_expand_dimensions( | |
get_option('p75_default_player_width'), |