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
<?xml version="1.0"?> | |
<root> | |
<item> | |
<name>Change Command-P to Up arrow</name> | |
<identifier>private.command_p_to_up_arrow</identifier> | |
<autogen> | |
__KeyToKey__ | |
KeyCode::P, ModifierFlag::COMMAND_L, | |
KeyCode::CURSOR_UP | |
</autogen> |
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
package com.example.helloworld.core; | |
public enum Color { | |
BLUE, | |
GREEN | |
} |
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.*; | |
public class TypeSafety { | |
public static void main(String[] args){ | |
List<Set<?>> listOfWildcardSet = new ArrayList<Set<?>>(); | |
listOfWildcardSet.add(new HashSet<String>()); | |
listOfWildcardSet.add(new HashSet<Integer>()); | |
listOfWildcardSet.set(0, listOfWildcardSet.get(0)); | |
listOfWildcardSet.set(1, listOfWildcardSet.get(1)); |
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
signature POSITIONAL_STREAM = | |
sig | |
type elem | |
type stream | |
val peek : stream -> (elem * stream) option | |
val getPos : stream -> pos | |
end | |
structure SubstringStream : STREAM = |
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.List; | |
import java.util.ArrayList; | |
/* | |
* Lexical analyzer for Scheme-like minilanguage: | |
* (define (foo x) (bar (baz x))) | |
*/ | |
public class Lexer { | |
public static enum Type { | |
// This Scheme-like language has three token types: |
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
type 'a monoid = {zero : 'a; plus : 'a -> 'a -> 'a} | |
let sum (m : 'a monoid) (l : 'a list) : 'a = List.fold_left m.plus m.zero l | |
let string_summer = sum {zero = ""; plus = (^)} | |
let int_summer = sum {zero = 0; plus = (+)} |
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
#lang eopl | |
;(module lang (lib "eopl.ss" "eopl") | |
(require "drscheme-init.scm") | |
(provide (all-defined)) | |
;;;;;;;;;;;;;;;; grammatical specification ;;;;;;;;;;;;;;;; | |
(define the-lexical-spec |
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
utahraptor:~ aki$ rlwrap ocaml | |
Objective Caml version 3.12.1 | |
# #use "topfind";; | |
- : unit = () | |
Findlib has been successfully loaded. Additional directives: | |
#require "package";; to load a package | |
#list;; to list the available packages | |
#camlp4o;; to load camlp4 (standard syntax) | |
#camlp4r;; to load camlp4 (revised syntax) |
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/emacs --script | |
(princ (format "batch mode: %s\n" noninteractive)) |
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
(defun ext (cmd args) | |
(with-temp-buffer | |
(let ((exit (funcall 'call-process cmd nil (current-buffer) nil args))) | |
(cons exit (buffer-substring (point-min) (point-max)))))) |
NewerOlder