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
#! /usr/bin/env python | |
# -*- coding: utf-8 -*- | |
class SinglyLinkedList(object): | |
''' | |
Singly-linked list such that each node is the instance of ListElement class | |
''' | |
def __init__(self, init_elems=[]): | |
''' | |
init_elemsが空でない時,init_elemsに与えられたリストに対応する連結リストを返す |
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 java.util.HashMap; | |
import java.util.Scanner; | |
public class Main { | |
public static void main(String args[]) { | |
Scanner sc = new Scanner(System.in); | |
String str = sc.next(); | |
HashMap<String, Boolean> count = new HashMap<String, Boolean>(); | |
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 java.util.HashMap; | |
import java.util.Map; | |
import java.util.Scanner; | |
public class Main { | |
public static void main(String args[]) { | |
Scanner sc = new Scanner(System.in); | |
String str1 = sc.next(); | |
String str2 = sc.next(); |
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
# -*- coding: utf-8 -*- | |
def func(): | |
m = int(raw_input()) | |
n = int(raw_input()) | |
q = [] | |
r = [] | |
for i in range(n): | |
tmp_q, tmp_r = map(int, raw_input().split()) |
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
lethe@target$ sudo /etc/init.d/ssh restart |
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 generated configuration file | |
# See the sshd_config(5) manpage for details | |
# Waht ports, IPs and protocols we listen for | |
Port 22 | |
Port 22222 # 書き足す | |
# (略) |
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
lethe@target$ emacs /etc/ssh/sshd_config |
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
# -*- coding: utf-8 -*- | |
require 'json' | |
require 'fileutils' | |
=begin | |
JSONファイルを用いたファイルキャッシュ | |
=end | |
class JsonCache | |
def initialize(dir: "cache/") |
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
Search::Application.routes.draw do | |
get "static_pages/search" | |
get "static_pages/result" | |
get "static_pages/get_citation" | |
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
$(document).ready(function(){ | |
// 省略 // | |
// JSONの読み込み(static_pages/get_citationを呼び出すことで,変数dataにJSONが返ってくる) | |
var data = $.getJSON('get_citation',function(data){ | |
sys.graft({nodes:data.nodes, edges:data.edges}) | |
}); | |
// 省略 // |