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
# scoping in ruby 1.8.7 | |
x = 0 | |
[1,2,3].each{|x| puts x} | |
puts x |
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
;; Directory Conversion Functions | |
(defun list-to-directory (list) | |
(let (value) | |
(dolist (element list value) | |
(setq value (file-name-as-directory (concat value element)))))) | |
(defun path-to-file (path filename) | |
(concat (list-to-directory path) filename)) |
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/perl | |
use strict; | |
use warnings; | |
use File::Find; | |
use File::Copy; | |
use Getopt::Long; | |
my $smix_directory = ""; |
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/perl | |
use strict; | |
use warnings; | |
use File::Monitor; | |
use File::Path::Expand; | |
use File::Copy; | |
use File::Remove; | |
use App::Rad; |
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 CuckooHash | |
where | |
import Data.Array | |
import Data.Maybe | |
data Cell a b = EmptyCell | Cell a b | |
deriving Show | |
type HashArray a b = Array Int (Cell a b) |
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 KataRomanCalculator | |
where | |
import Test.HUnit | |
import qualified Data.String.Utils as StringUtils | |
data RomanNumeral = RomanNumeral String | |
deriving (Show, Eq) | |
strip n (RomanNumeral s) = (RomanNumeral (drop n s)) |
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 A | |
{ | |
function foo() | |
{ | |
if (isset($this)) { | |
echo '$this is defined ('; | |
echo get_class($this); | |
echo ")\n"; | |
} else { | |
echo "\$this is not defined.\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
(ns mock-restful.core | |
(:use net.cgrand.moustache | |
ring.util.response | |
ring.middleware.params | |
clojure.contrib.logging | |
[ring.adapter.jetty :only [run-jetty]])) | |
(defn remember-request [request] | |
(do | |
(log :info (format "%s %s" (:request-method request) (:uri request))) |
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
private static T IsResult<T>(ActionResult result) where T : ActionResult | |
{ | |
Assert.IsInstanceOf<T>(result); | |
return (T)result; | |
} |
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
protected Map<JLiftVarLabel, Node> variableToNodeMap; | |
protected MultiMap<JLiftVarLabel, JLiftVarLabel> directVariableAffectMap; | |
protected MultiMap<JLiftVarLabel, JLiftVarLabel> directVariableAffectingMap; | |
protected MultiMap<Node, Label> specialSinks; | |
protected Map<Node, JLiftVarLabel> nodeToVariableMap; | |
protected Map<JLiftVarLabel, Collection<JLiftVarLabel>> cacheVarLabelAffectMap; | |
protected Map<JLiftVarLabel, Collection<JLiftVarLabel>> cacheVarLabelAffectingMap; |
OlderNewer