draftです。
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
struct Parser<'a> { | |
pub str: String, | |
pub current_token: Option<&'a str>, | |
} | |
impl<'a> Parser<'a> { | |
pub fn lex(&'a mut self) { | |
let tmp: &'a str = &self.str[0..1]; | |
self.current_token = Some(tmp); | |
} |
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
struct Parser<'a> { | |
pub str: String, | |
pub current_token: Option<&'a str>, | |
} | |
impl<'a> Parser<'a> { | |
pub fn lex(&mut self) { | |
self.current_token = Some(&self.str[0..1]); | |
} | |
} |
This file has been truncated, but you can view the full file.
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
(function(undefined){var global_object=this,console;if(typeof global!=="undefined"){global_object=global}if(typeof window!=="undefined"){global_object=window}if(typeof global_object.console==="object"){console=global_object.console}else if(global_object.console==null){console=global_object.console={}}else{console={}}if(!("log"in console)){console.log=function(){}}if(!("warn"in console)){console.warn=console.log}if(typeof this.Opal!=="undefined"){console.warn("Opal already loaded. Loading twice can cause troubles, please fix your setup.");return this.Opal}var nil;var BasicObject;var _Object;var Module;var Class;function BasicObject_alloc(){}function Object_alloc(){}function Class_alloc(){}function Module_alloc(){}function NilClass_alloc(){}var Opal=this.Opal={};var BridgedClasses={};Opal.global=global_object;global_object.Opal=Opal;Opal.config={missing_require_severity:"error",unsupported_features_severity:"warning",enable_stack_trace:true};var $hasOwn=Object.hasOwnProperty;var $slice=Opal.slice=Array.prototyp |
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 "ergodox.h" | |
#include "debug.h" | |
#include "action_layer.h" | |
#define BASE 0 // default layer | |
#define SYMB 1 // symbols | |
#define MDIA 2 // media keys | |
#define LOWER 3 | |
#define RAISE 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
# Copyright (c) 2008 Michael Fellinger m.fellinger@gmail.com | |
# All files in this distribution are subject to the terms of the Ruby license. | |
__DIR__ | |
=> File.dirname(__FILE__) | |
File.dirname | |
__DIR__("../foo") | |
=> File.expand_path("../foo", File.dirname(__FILE__)) |
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
............................... | |
Finished in 17.36 seconds (files took 8.86 seconds to load) | |
31 examples, 0 failures | |
--- Called Methods --- | |
ActionView::LogSubscriber#initialize | |
ActionView::LogSubscriber.add_event_subscriber | |
ActionView::LogSubscriber.attach_to | |
ActionView::LogSubscriber.method_added |
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
# | |
# 以下のコードを読み込むと、Brickクラスのメソッドが追加されます。 | |
# | |
# LEDを光らせる | |
# @brick.set_led(色) | |
# 色は0〜9の数値 | |
# 例: @brick.set_led(6) | |
# | |
# 音を鳴らす | |
# @brick.play_tone(音量, 周波数, 長さ) |
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
extern i32 putchar(i32); | |
extern double sqrt(double); | |
def clamp(t: Float, min: Float, max: Float) -> Float | |
if t < min | |
min | |
elsif t > max | |
max | |
else | |
t |