from http://bl.ocks.org/magjac/b2bf6da945e725a605e0d077781457b2
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
add_zero_mtx<-function(df1,num,side=1){ | |
if(side==1){ | |
return(t(cbind(t(df1),data.frame(matrix(0,ncol=num))))) | |
}else{ | |
return(t(cbind(data.frame(matrix(0,ncol=num)),t(df1)))) | |
} | |
} | |
my_cbind<-function(df1,df2){ | |
num<-abs(nrow(df1)-nrow(df2)) |
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
<html> | |
<head> | |
<script src="http://d3js.org/d3.v3.min.js"></script> | |
</head> | |
<body> | |
<p>this is a test01.</p> | |
<p>this is a test02.</p> | |
<p>this is a test03.</p> | |
<script> | |
// var paragraphs = document.getElementsByTagName("p"); |
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
# prefix | |
unbind C-b | |
set -g prefix C-t | |
# hjklでpaneを移動 | |
bind h select-pane -L | |
bind j select-pane -D | |
bind k select-pane -U | |
bind l select-pane -R |
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
from airflow.operators.slack_operator import SlackAPIPostOperator | |
SLACK_TOKEN = "xoxb-XXXX-YYYY-ZZZ" | |
# refs. | |
# https://api.slack.com/docs/message-attachments#action_fields | |
if __name__ == "__main__": | |
op = SlackAPIPostOperator( |
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 Item { | |
String name; | |
Item(String name) { | |
this.name = name; | |
} | |
@override | |
toString() { | |
return "Item<$name>"; | |
} | |
} |
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
package main | |
import ( | |
"log" | |
// "runtime" | |
"sync" | |
"time" | |
) | |
func worker(jobs ...string) <-chan 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
package main | |
import ( | |
"log" | |
"time" | |
) | |
func main() { | |
log.Println("start.") | |
defer log.Println("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
package main | |
import ( | |
"fmt" | |
"math/rand" | |
"time" | |
) | |
func Swap(arr *[]int, i int, j int) { | |
(*arr)[i], (*arr)[j] = (*arr)[j], (*arr)[i] |
OlderNewer