Tag, Image, Shadow, Link Card, その他
個人用ミニCSSフレームワーク(16)Markdownで使える簡易な自分CSSフレームワーク。Tag, Image, Shadow, あとFlexBoxを応用して Link Card をつくってみる.
Markdownで使える簡易な自分CSSフレームワーク。Tag, Image, Shadow, あとFlexBoxを応用して Link Card をつくってみる.
Markdownのデフォルトの設定を変えて、HTMLの中に書かれたmarkdown記述を処理する方法です.
Jekyllで使ってみるための小さなスタイル設定を作る。仕組みと規定値を決めてクラスを指定するとデザインが決まるという程度のもの。
退避用
Rubyは、手軽なオブジェクト指向プログラミングを実現するための種々の機能を持つオブジェクト指向スクリプト言語です。
[gist 5598133]
[person.rb]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
class Person
def initialize(name)
@name = name
end
def hello
"Hello, friend!\nMy name is #{@name}!"
end
end
charlie = Person.new("Charlie")
puts charlie.hello
#=> Hello, friend!
#=> My name is Charlie!
You’ll find this post in your _posts
directory. Go ahead and edit it and re-build the site to see your changes. You can rebuild the site in many different ways, but the most common way is to run jekyll serve
, which launches a web server and auto-regenerates your site when a file is updated.
To add new posts, simply add a file in the _posts
directory that follows the convention YYYY-MM-DD-name-of-post.ext
and includes the necessary front matter. Take a look at the source for this post to get an idea about how it works.
Jekyll also offers powerful support for code snippets:
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
You’ll find this post in your _posts
directory. Go ahead and edit it and re-build
the site to see your changes. You can rebuild the site in many different ways, but
the most common way is to run jekyll serve
, which launches a web server and
auto-regenerates your site when a file is updated.
開発者のまつもとゆきひろは、「Rubyの言語仕様策定において最も重視しているのはストレスなくプログラミングを楽しむこと (Enjoy programming) である」と述べている(ただし...
プログラミング言語において、クロージャ (クロージャー、Closure) は関数の一種である。引数以外の変数を 実行時の環境ではなく、自身が定義された環境(静的スコープ)において解決する。関数とそれを評価する環境 のペアであるともいえる。
Ruby(ルビー)は、まつもとゆきひろ(通称Matz)により開発されたオブジェクト指向スクリプト言語であり、 従来Perlなどのスクリプト言語が用いられてきた領域でのオブジェクト指向プログラミングを実現する。Rubyは 当初1993年2月24日に生まれ、1995年12月にfj上で発表された。名称のRubyは、プログラミング言語Perlが6月の 誕生石であるPearl(真珠)とほぼ同じ発音をすることから、まつもとの同僚の誕生石(7月)のルビーを取って 名付けられた。
機能として、クラス定義、ガベージコレクション、強力な正規表現処理、マルチスレッド、例外処理、イテレー タ・クロージャ、Mixin、演算子オーバーロードなどがある。Perlの代替となることができることが初期の段階 から重視されている。Perlと同様にグルー言語としての使い方が可能で、Cプログラムやライブラリを呼び出す 拡張モジュールを組み込むことができる。
Ruby処理系は、主にインタプリタとして実装されている(詳しくは[[実装]]を参照)。
構文は、ALGOL系を継承しながら、可読性を重視している。Rubyにおいては整数や文字列なども含めデータ型は すべてがオブジェクトであり、純粋なオブジェクト指向言語といえる。
今度は入力ストリームを見ていきます。これは標準入力 (通常はキーボード)からの入力を受け取ります。具体的には......
C++では、cout を使って出力処理を行えます。例えば、次のようにコードを書けば、画面に"Test"と......