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
<?php | |
// This is largely stolen from test.php in the Inline_C repo (https://github.com/pear/Inline_C/blob/master/test.php) | |
require_once("C.php"); | |
$function1 = <<<EOF | |
PHP_FUNCTION(times) | |
{ | |
long i,j; | |
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ll", &i,&j) == FAILURE) { |
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
module SegmenterHelper | |
def sentences(num_sentences, text) | |
@tactful_tokenizer ||= TactfulTokenizer::Model.new | |
result = @tactful_tokenizer.tokenize_text text | |
output = "" | |
0.upto([num_sentences, result.length].min - 1) do |i| | |
output << "#{result[i]} " | |
end |
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
class You < Person | |
include Transportation | |
state_machine :wednesday_night, :initial => :no_plans do | |
before_transition :no_plans => :making_anthony_happy, :do => :come_to_dukegen_pitch_at_rocketspace! | |
end | |
def come_to_dukegen_pitch_at_rocketspace! |
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
<script type="text/javascript"> | |
var __RouteCurry = function(route){ | |
return function(options){ | |
var routeMod = route; | |
if (typeof options == "string" || typeof options == "number"){ | |
routeMod = routeMod.replace(/:[a-zA-Z0-9\_]+/,options); | |
} | |
else{ | |
for(key in options){ | |
routeMod = routeMod.replace(":"+key, options[key]); |
NewerOlder