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
てすとですもひゃひゃひゃひゃひゃ | |
ひゃ |
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
#!/bin/bash | |
# 数値の昇順になにかしたいことあるよね | |
# seq が使えればこう書きますなぁ | |
for i in `seq 5 10` | |
do | |
echo i | |
done | |
# seq が使えない場合はこう書くこともできますよ、っと |
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
try_compiler_option: checking for -Wall option to compiler... -------------------- yes | |
"clang -o conftest -I/Users/mohya/.rbenv/versions/2.0.0-p247/include/ruby-2.0.0/x86_64-darwin12.4.0 -I/Users/mohya/.rbenv/versions/2.0.0-p247/include/ruby-2.0.0/ruby/backward -I/Users/mohya/.rbenv/versions/2.0.0-p247/include/ruby-2.0.0 -I. -I'/Users/mohya/.rbenv/versions/2.0.0-p247/include' -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -O3 -Wno-error=shorten-64-to-32 -pipe conftest.c -L. -L/Users/mohya/.rbenv/versions/2.0.0-p247/lib -L. -L'/Users/mohya/.rbenv/versions/2.0.0-p247/lib' -lruby-static -lpthread -ldl -lobjc " | |
checked program was: | |
/* begin */ | |
1: #include "ruby.h" | |
2: | |
3: int main(int argc, char **argv) | |
4: { | |
5: return 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
angular.module('ngFocusOnChange', []) | |
.directive('ngFocusOnChange', ['$timeout', function($timeout) { | |
return { | |
link: function(scope, element, attrs) { | |
scope.$watch(attrs.ngFocusOnChange, function(newValue, oldValue) { | |
// 以下のエラーを避けるために $timeout を使用 | |
// watch の最中に DOM イベントを発生させてはいけない | |
// "Error: [$rootScope: inprog]" | |
// https://docs.angularjs.org/error/$rootScope/inprog?p0=$digest | |
if (newValue !== oldValue) { |
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
angular.module('colorsOptionDirective').directive('colorsOption', ['$compile', function($compile) { | |
var colors = ["red", "yellow", "blue"]; | |
compile: function(element, attr) { | |
var optionTemplate = angular.element(document.createElement('option')); | |
for (var i = 0; i < colors.length; i++) { | |
$compile(optionTemplate.clone() | |
.val(colors[i]) | |
.text(colors[i]) | |
.appendTo(element)); | |
} |
OlderNewer