Skip to content

Instantly share code, notes, and snippets.

View making's full-sized avatar

Toshiaki Maki making

View GitHub Profile
xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.demo</groupId>
<artifactId>demo</artifactId>
<version>0.0.1-SNAPSHOT</version>
<parent>
package demo.foo;
import demo.todo.Todo;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.CommandLineRunner;
import org.springframework.core.ParameterizedTypeReference;
import org.springframework.http.HttpMethod;
import org.springframework.http.ResponseEntity;
import org.springframework.util.concurrent.ListenableFuture;
@making
making / gist:8591669
Last active January 4, 2016 07:49
Chatシステム案
  • WebSocket
  • Markdown mode
  • 通知(http://www.w3.org/TR/notifications/)
  • ファイルのD&D
  • 画像のコピペ
  • キーワードハイライト
  • グループモード
  • 認証
  • ローカルファイルシステムへのログ書き出し
  • サーバー立ち上げでWebブラウザでつなぎに行く中央集権モードが基本
@making
making / gist:8777362
Last active August 29, 2015 13:55
aのk乗をmで割った余り = p(a, k, m)
(xy % z) = ((x % z) * (y % z)) % z

k = 2tの場合 a^k = a^t * a^t

p(a, k, m) = (p(a, k/2, m) * p(a, k/2, m)) % m

k = 2t + 1の場合

@making
making / gist:8777551
Created February 3, 2014 01:13
二分探索

vはleft以上、right未満の範囲に存在する

va[left] <= v < va[right]

function contaions(int v, int[] va) {
  if (va.length == 0) {
    return false;
  }
  int left = 0, int right = va.length;
@making
making / Tree.js
Last active August 29, 2015 13:56
javascriptで2分木
// http://jsfiddle.net/L6bfa
var TreeNode = function (value, left, right) {
this.value = value;
this.left = left;
this.right = right;
};
var Tree = function (root) {
this.root = root;
@making
making / tree.go
Created February 5, 2014 05:23
golangで2分木
// http://play.golang.org/p/dB_zEZf_Rz
package main
import "fmt"
type TreeNode struct {
value int
left *TreeNode
right *TreeNode
public interface A {
default int hoge() {
return 100;
}
}
#!/bin/sh
#
# SUSE system statup script for GitBucket
# Copyright (C) 2014 Toshiaki Maki
# Copyright (C) 2007 Pascal Bleser
#
# This library is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2.1 of the License, or (at
# your option) any later version.