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
日付 | 言語 | 特徴 | |
---|---|---|---|
01月01日 | C | ストイックで論理的、基礎を極めたいあなたへ | |
01月02日 | C++ | 強さと複雑さを併せ持つ、真面目で多才な人向け | |
01月03日 | C# | 現実的でスマート、バランス重視のあなたに | |
01月04日 | Java | 責任感が強く、組織的な設計が得意 | |
01月05日 | Kotlin | 保守と革新のバランスを取れる中庸タイプ | |
01月06日 | Swift | 新しいもの好き、UIやUXを重視するセンス派 | |
01月07日 | Python | 柔軟かつ実用主義、読みやすさを愛する人 | |
01月08日 | Ruby | 美しさと遊び心、感性でコードを書くタイプ | |
01月09日 | Go | シンプルで高速、合理主義のエンジニア |
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
<!DOCTYPE html> | |
<html lang="ja"> | |
<head> | |
<title>page.js の動き方</title> | |
<meta charset="UTF-8"> | |
</head> | |
<body> | |
<nav> | |
<ul> | |
<li><a href="/">メイン</a></li> |
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 myFunction() { | |
// 入力した名前を表示するプログラムです。 | |
var name = Browser.inputBox("名前を入れてください"); | |
var output_string = "ようこそ" + name + "さん"; | |
Browser.msgBox(output_string); | |
} |
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
require 'yaml' | |
# とりあえず bundle list の結果から、gem の名前だけを取得して配列に突っ込んでみます | |
gems = (`bundle list | awk '{print $2}'`).split("\n") | |
# 先頭2行は bundler の出力なので無視します | |
2.times{ gems.shift } | |
gems.each do |gem| | |
puts gem | |
# 具体的な情報は gem spec GEMFILE で取得します。結果は yaml でくるので、パースしてやります。 |
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
require 'rake' | |
Table = Struct.new(:name, :comment, :columns, :indexes) | |
Column = Struct.new(:name, :type, :not_null, :default, :primary_key, :comment) | |
Index = Struct.new(:name, :columns, :primary, :unique) | |
def get_schema_info(klass) | |
table = Table.new | |
table.name = klass.table_name | |
table.columns = [] |
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
source 'https://rubygems.org' | |
gem 'slim' |
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
TOKEN="your token via https://api.slack.com/web" | |
CHANNEL="slack channel to post" | |
MUSIC=`osascript <<'END' | |
tell application "iTunes" | |
set trackName to name of current track | |
set trackArtist to artist of current track | |
return trackName & " / " & trackArtist | |
end tell | |
END | |
` |
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 myPackage.* | |
class Main | |
{ | |
Type.resolveClass("myPackage.Hoge"); // return null | |
var instance:Hoge = new Hoge(); // OK | |
Type.resolveClass("myPackage.Hoge"); // return [class Hoge] | |
} |
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
<?php | |
class HogeController extend ParentController { | |
public function fuga() { | |
$filtered =SomeUtil::do_something($_GET["foo"]); | |
RefactoredUtil::refactored_func($filtered); | |
} | |
} | |
class RefactoredUtil { | |
public static function refactored_func($ary) { |
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 Hoge | |
attr_accessor :a | |
attr_accessor :b | |
def initialize(initialize_options = {}) | |
defaults = { | |
:a => "aaaa", | |
:b => "bbbb" | |
} | |
defaults.merge!(initialize_options) |
NewerOlder