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
module MA; end | |
module MB; end | |
module MC; end | |
module MD; end | |
module ME; end | |
class A; end | |
class B < A | |
include MA |
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
all: rust-for-rubyists.epub site | |
rust-for-rubyists.epub: | |
pandoc --toc -S -s --epub-metadata=book/metadata.xml -o rust-for-rubyists.epub book/title.txt book/preamble.md book/chapter-*.md | |
site: | |
pandoc -S -s book/preamble.md book/chapter-*.md -o book/book.html --include-before-body=book/header.html --include-after-body=book/footer.html | |
pandoc -S -s book/chapter-01.md -o book/chapter-01.html --include-before-body=book/header.html --include-after-body=book/footer.html | |
pandoc -S -s book/chapter-02.md -o book/chapter-02.html --include-before-body=book/header.html --include-after-body=book/footer.html | |
pandoc -S -s book/chapter-03.md -o book/chapter-03.html --include-before-body=book/header.html --include-after-body=book/footer.html |
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
module Kernel | |
def int(mid) | |
meth = instance_method(mid) | |
define_method(mid) { |*args, &bk| | |
val = meth.bind(self).call(*args, &bk) | |
raise TypeError, "#{mid} did not return an Integer" unless val.is_a? Integer | |
val | |
} | |
mid | |
end |
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
require 'formula' | |
class Sphinx < Formula | |
url 'http://sphinxsearch.com/downloads/sphinx-0.9.9.tar.gz' | |
homepage 'http://www.sphinxsearch.com' | |
md5 '7b9b618cb9b378f949bb1b91ddcc4f54' | |
head 'http://sphinxsearch.googlecode.com/svn/trunk/' | |
fails_with_llvm "fails with: ld: rel32 out of range in _GetPrivateProfileString from /usr/lib/libodbc.a(SQLGetPrivateProfileString.o)" |
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
<?php | |
require_once("../CoreSection/database.inc.php"); | |
require_once("RequireFunctions.php"); | |
function UpdateTimeStamp($TimeStamp, $TableName, $idCompany, $DatabaseObject) | |
{ | |
$QueryCondition = "idCompany = " . $idCompany ." and TableName = " . $TableName; | |
$SelectStatus = $DatabaseObject->select("tablestimestamp", "TimeStamp", $QueryCondition); | |
/* | |
$Error = $DatabaseObject->getError(); | |
if(isset($Error) && !empty($Error))//if(!$SelectStatus) |
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
document = cookie: "hello=world;this=that;what=which" | |
getCookie = (name) -> | |
if document.cookie | |
for [_, k, v] in (/^(.*?)=(.*)$/.exec kv for kv in document.cookie.split ";") | |
if k is name | |
return decodeURIComponent v | |
console.log getCookie "this" |
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
monthWeight m = do | |
putStr $ "input weight for month #" ++ show m ++ ": " | |
readLn | |
main = do | |
weights <- mapM monthWeight [1..12] | |
putStrLn $ "average weight is: " ++ (show $ sum weights `div` length weights) |
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
class Animal | |
def walk(distance, unit) | |
sleep 0.1 | |
puts "walked #{distance} #{unit}" | |
end | |
end | |
class Dog < Animal | |
end |
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
Harbour.prototype.parseTargets = function(callback) { | |
var longestIP, longestHost; | |
var newTargets = []; | |
var oldTargets = this.options.targets.split(','); | |
var remaining = oldTargets.length; | |
oldTargets.forEach(function(target){ | |
if(net.isIP(target)){ | |
dns.reverse(target, function(err, domains){ | |
newTargets.push([(domains ? domains[0] : ''), target]); |
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
Harbour.registerPlugin({ | |
name: "Harbour HTTP", | |
foo: function(...) { ... }, | |
.... | |
}); |
NewerOlder