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
using System; | |
namespace CSharpLearning | |
{ | |
class MainClass | |
{ | |
struct Point | |
{ | |
public int x; | |
public int y; |
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
create table corpus( | |
id integer primary key, | |
word1 text, | |
word2 text, | |
word3 text, | |
create_at, | |
updated_at | |
); |
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
import java.util.Scanner; | |
public class Main { | |
public static void main(String[] args) throws Exception{ | |
Scanner sc = new Scanner(System.in); | |
String str; | |
for (;;) { | |
str = sc.next(); | |
for (char c : str.toCharArray()) { | |
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/sh | |
# 古い演算結果が残ってたら削除 | |
# -e で存在するか否かを返してくれる | |
if [ -e result.csv ]; then | |
rm result.csv | |
fi | |
# ls -t でタイムスタンプ順に新しいものからソートしてくれる | |
# set -- <hoge>でタブor空白ごとにsplitして$n(n=1,2,...)に格納してくれる |
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 <stdio.h> | |
#include <string.h> | |
int main(void){ | |
char str[] = "01234567890"; | |
char t[64]; | |
strncpy(t, str+3, 5); //str[3]の位置から5文字取り出す | |
t[5] = '\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
mkdir hoge | |
ls | grep -v -E '\Ahoge\z' | xargs -I{} mv {} hoge/{} |
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
# encoding: utf-8 | |
require 'watir' | |
target = "http://hogehoge.com" | |
browser = Watir::Browser.new(:chrome) | |
browser.goto(target) | |
element = browser.hidden(:id => 'hogePass') |
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
import java.util.*; | |
public class Main { | |
public static void main(String[] args) { | |
Scanner sc = new Scanner(System.in); | |
int A = sc.nextInt(); | |
int B = sc.nextInt(); | |
int v[] = {1, -1, 5, -5, 10, -10}; //操作 | |
//幅優先探索 |