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
| (in-package :cl-user) | |
| (defpackage forth | |
| (:use :cl) | |
| (:export :run | |
| :clear | |
| :create-context)) | |
| (in-package :forth) | |
| (defstruct context | |
| (dictionary (make-hash-table :test 'equal)) |
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
| (defconst if3 (* 2 3)) | |
| (defconst if5 (* if3 4 5)) | |
| (defconst if7 (* if5 6 7)) | |
| (defconst if9 (* if7 8 9)) | |
| (defconst if11 (* if9 10 11)) | |
| (defun simple-sine (x) | |
| (unless (eq 'float (type-of x)) | |
| (setf x (float x))) | |
| (let* ((x2 (* x x)) |
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
| #include <iostream> | |
| #include <list> | |
| #include <thread> | |
| namespace ya { | |
| template<class item_t> | |
| class channel { | |
| private: |
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
| package com.arakitech.kotlisp | |
| import java.util.HashMap | |
| fun StringBuilder.clear() { | |
| this.setLength(0) | |
| } | |
| class Tokenizer(val input: String) { | |
| private var position = 0 |
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
| // clang++ -o minitest minitest.cpp -std=c++1y -stdlib=libc++ | |
| #include <iostream> | |
| #define TEST_PREDICATE(expr, oper) \ | |
| do { \ | |
| auto expr__ = (expr); \ | |
| if (!(expr__ oper)) { \ | |
| std::cout << __FILE__ << ":" << __LINE__ << " " \ | |
| << "FAILED " << #expr << " " << #oper \ |
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
| #include <stdio.h> | |
| #include <string.h> | |
| #include <dirent.h> | |
| void list(const char *path) | |
| { | |
| DIR *dir; | |
| struct dirent *entry; | |
| char entry_path[PATH_MAX]; | |
| char *entry_name = entry_path; |
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
| #include <iostream> | |
| #include <sstream> | |
| namespace ya { | |
| void each_token(std::istream& input, void (*proc)(const std::string& token)) | |
| { | |
| std::stringstream buffer; | |
| auto send = [&buffer, &proc]() { | |
| if (0 < buffer.tellp()) { |
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
| 35.6611302 | 139.7286663 | ハートランド | |
|---|---|---|---|
| 35.6615196 | 139.7295036 | メトロハット | |
| 35.6623 | 139.729618 | サイゼ | |
| 35.6608595 | 139.728279 | マクドナルド | |
| 36.951095 | 140.853685 | いわきCC | |
| 36.951344 | 140.854934 | 泉神社 | |
| 36.9526041 | 140.8543881 | 郵便局 | |
| 36.950052 | 140.852266 | 幼稚園 | |
| 38.259210 | 140.893322 | NAViS | |
| 38.431639 | 141.309444 | 石巻道場 |
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
| package yaraki.dialogdemo.app; | |
| import android.app.AlertDialog; | |
| import android.app.Dialog; | |
| import android.content.DialogInterface; | |
| import android.support.v4.app.DialogFragment; | |
| import android.support.v4.app.Fragment; | |
| import android.support.v7.app.ActionBarActivity; | |
| import android.os.Bundle; | |
| import android.view.LayoutInflater; |
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
| package main | |
| import ( | |
| "fmt" | |
| "math/rand" | |
| ) | |
| const doors = 3 | |
| const trials = 10000 | |
| const seed = 15 |