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
dynamic addOne(number) { | |
return 1 + number; | |
} | |
void main() { | |
print(addOne(1)); | |
// 以下は実行するとエラーが起きる(ビルドは通る) | |
// Uncaught Error: TypeError: "1": type 'JSString' is not a subtype of type 'num' | |
print(addOne("1")); | |
} |
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
# Setup ssh-agent | |
if [ -f ~/.ssh-agent ]; then | |
. ~/.ssh-agent | |
fi | |
if [ -z "$SSH_AGENT_PID" ] || ! kill -0 $SSH_AGENT_PID; then | |
ssh-agent > ~/.ssh-agent | |
. ~/.ssh-agent | |
fi | |
ssh-add -l >& /dev/null || ssh-add |
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> | |
using std::cin; | |
using std::cout; | |
/** | |
* g++ hash.cpp -o hash | |
*/ | |
int main(int argc, char const* argv[]){ | |
// こんなんが出来る |
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
window.onload = function() { | |
var viewModel = { | |
array : ko.observableArray( | |
[ | |
// 'hoge', | |
// 'huga', | |
'piyo' | |
] | |
), | |
canRemove : function(){ |
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
<html> | |
<head> | |
<script src="./knockout.js"></script> | |
</head> | |
<body> | |
<p> | |
<input type="checkbox" data-bind="checked: hasCellphone" /> | |
携帯電話をもっている | |
</p> | |
<p> |
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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
if __name__ == '__main__': | |
members = ['あだち','いいだ','くら','ふじた','うちだ','かきくぼ'] | |
for m in sorted(members): | |
print m |
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
(when (locate-library "cask") | |
(require 'cask) | |
(require 'cask "~/.cask/cask.el") | |
) | |
(cask-initialize) | |
(require 'pallet) | |
(require 'init-loader) | |
(setq init-loader-show-log-after-init nil) |
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
#! /usr/bin/env ruby | |
# coding: utf-8 | |
require 'securerandom' | |
HYPHEN = 0x2d | |
STR_LENGTH = 36 | |
# これテストケース | |
# str = "51120b12-a2bc-41bf-aa53-cd73daf330d0" |
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
#! /usr/bin/env ruby | |
# | |
# 以下のどちらかの条件を満たす数をカウントアップして出力する | |
# | |
# - 3の倍数 | |
# - 3がつく | |
puts 'hello' | |
c = 0 | |
(1..100).each do |i| |
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
#!/usr/bin/env sh | |
UUID=$(defaults read /Applications/Xcode.app/Contents/Info DVTPlugInCompatibilityUUID) | |
echo Xcode DVTPlugInCompatibilityUUID is $UUID | |
for MyPlugin in ~/Library/Application\ Support/Developer/Shared/Xcode/Plug-ins/* | |
do | |
UUIDs=$(defaults read "$MyPlugin"/Contents/Info DVTPlugInCompatibilityUUIDs) | |
echo $MyPlugin | |
if echo "${UUIDs[@]}" | grep -w "$UUID" &>/dev/null; then | |
echo "The plug-in's UUIDs has contained the Xcode's UUID." | |
else |
NewerOlder