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 | |
^{:doc | |
"Simple Theorem Prover 'Programming Language Theory and its Implementation' Michael J.C. Gordon" | |
:author "Kenichi Kobayashi"} | |
prover | |
(:use [clojure.test]) | |
(:require [clojure.walk :as cw])) | |
(def constant #{'+ '- '< '<= '> '>= '* '= 'T 'F 'DIV 'not 'and 'or 'implies}) |
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
AppManager.module('${1:AppName}App.Views', function (Views, AppManager, Backbone, Marionette, \$, _) { | |
'use strict' | |
Views.${2:ViewName} = Marionette.ItemView.extend({ | |
tagName: '${3:div}', | |
template: '#forms-${1/./\L$&/g}-${2/./\L$&/g}-template', |
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
isis:cpp_vs_c alex$ gcc -O3 -std=c99 virt.c -o /tmp/v | |
isis:cpp_vs_c alex$ gcc -O3 virt.cpp -o /tmp/vpp | |
isis:cpp_vs_c alex$ /tmp/v | |
Ret = 100001000, Time: 0 sec 188086 000 msec | |
isis:cpp_vs_c alex$ /tmp/vpp | |
(C++) Ret = 100001000, Time: 0 sec 000001 000 msec |
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
var http = require("http"), | |
url = require("url"), | |
path = require("path"), | |
fs = require("fs") | |
port = process.argv[2] || 8888; | |
http.createServer(function(request, response) { | |
var uri = url.parse(request.url).pathname | |
, filename = path.join(process.cwd(), uri); |
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.truward.polymer.util; | |
import com.google.common.collect.ImmutableList; | |
import com.google.common.collect.ImmutableMap; | |
import com.google.common.collect.ImmutableSet; | |
import javax.annotation.Nonnull; | |
import java.util.*; | |
/** |
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
var http = require("http"), | |
url = require("url"); | |
var port = process.argv[2] || 8888; | |
// Sample redir link: http://docs.oracle.com/javase/7/docs/api/java/lang/String.html | |
http.createServer(function(request, response) { | |
var urlOptions = url.parse(request.url); | |
var pathname = urlOptions.pathname; |
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
var http = require("http"), | |
url = require("url"), | |
path = require("path"), | |
fs = require("fs") | |
port = process.argv[2] || 8888; | |
var guessContentType = (function () { | |
var CONTENT_TYPE_OCTET_STREAM = "application/octet-stream"; | |
var DEFAULT_CONTENT_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
#include <stdio.h> | |
#define N (100000000) | |
double arr[] = { 8, 0.125, 4, 0.25 }; | |
int main() { | |
double d = 1.0; | |
for (int i = 0; i < N; ++i) { | |
d *= arr[i % 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
package com.alexshabanov.kotwebdemo.service.radio | |
import java.util.Collections | |
import java.util.ArrayList | |
// prototype of non-AOP based approach to service exposure | |
// | |
// Public API | |
// |
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 Ratio(num : Int, denom : Int) { | |
val numerator: Int | |
val denominator: Int | |
{ | |
val theGcd = gcd(num, denom) | |
numerator = num / theGcd | |
denominator = denom / theGcd | |
} | |
} |
OlderNewer