Skip to content

Instantly share code, notes, and snippets.

View Hunachi's full-sized avatar
👻

Hunachi Hunachi

👻
View GitHub Profile
@Hunachi
Hunachi / SortPanel.java
Created April 17, 2018 01:03
情報工学実験(第一講)
package step01;
//import java.awt.Graphics;
import java.awt.Graphics;
//import java.util.Random;
import java.util.Random;
/**************************************************
* SortPanel.java
* ------------------------------
@Hunachi
Hunachi / constant.kt
Last active March 10, 2018 16:14
Kodeinから始めるDI [1] ( for Android ) ref: https://qiita.com/Hunachi/items/4ab0de34ff9fad6b4481
val kodein = Kodein{
constant("koya") with 10
constant("shujin") with "Hunachi marunosuke"
}
~:google-home-notifier hunachi$ node main.js
Endpoints:
https://c3e9c750.ngrok.io/google-home-notifier
GET example:
curl -X GET https://c3e9c750.ngrok.io/google-home-notifier?text=Hello+Google+Home
POST example:
curl -X POST -d "text=Hello Google Home" https://c3e9c750.ngrok.io/google-home-notifier
@Hunachi
Hunachi / main.js
Last active January 17, 2018 14:59
main.js for google home notifer in first-dream .
/*
* $ node main.js
* */
const express = require('express');
const googlehome = require('./google-home-notifier');
const schedule = require("node-schedule");
const ngrok = require('ngrok');
const bodyParser = require('body-parser');
const app = express();
const serverPort = 8091; // default port
🐝bug発見
🐣bug取った
🍊機能追加
🍎函数追加
🍏ちょっとした改善
🦁大きな改善
🍩classやinterfaceの追加
✏️xmlの変更
❤️modelの追加,変更
@Hunachi
Hunachi / hoge.kt
Last active April 18, 2018 11:49
パソコンを触り始めて2年目になった(Android 入門を振り返る ) ref: https://qiita.com/Hunachi/items/3d768f6979b15d19964d
Glide.with(activity).load(url).into(view)
#include<bits/stdc++.h>
#define int long long
#define rep(a,b,c) for(int a=b;a<c;a++)
#define repm(a,b,c) for(int a=(b-1);a>=c;a--)
#define pb push_back
#define str string
#define sf(a) scanfs("%d",&a)
#define pf(a) printf("%d\n",a)
#define pb push_back
static const int MAX_N = 200002;
struct Seg{
int n;
int dat[MAX_N * 2];
void init(int n_){
init(n_ , INF);
}
struct{
void dijkstra(int s){
priority_queue<pii, vector<pii>, greater<pii> > que;
fill(d,d+V,INF);
d[s] = 0;
que.push(pii(0,s));
while(!que.empty()){
pii p = que.top(); que.pop();
int v = p.second;
if (d[v] < p.first) continue;
void Main()
{
Image image(Window::Size(), Palette::White);
DynamicTexture texture(image);
while (System::Update())
{
if (Input::MouseL.pressed)
{