Skip to content

Instantly share code, notes, and snippets.

View hakatashi's full-sized avatar
🈚
idgaf

Koki Takahashi hakatashi

🈚
idgaf
View GitHub Profile
anonymous
anonymous / test.py
Created May 26, 2013 14:27
python 理解度チェーック 各出力を頭で考えた後に実行して答え合わせしてみてね!
##Q.1
print "trats"[::-1]
##Q.2
print 8 not in range(7,8)
##Q.3
print 0.0 is 0
##Q.4
@catupper
catupper / ctest
Last active December 17, 2015 18:59
GCCの理解度チェーック main関数で呼び出してる各関数の返り値を予想してから、 実際にコンパイルして解答を確認してみてね!
#include<stdio.h>
int q1();
int q2();
int q3();
int q4();
int q5();
int q6();
int q7();
char* q8();
@yingtai
yingtai / peano.markdown
Last active December 19, 2015 21:29
ペアノの公理のとらえ方について cc/ @potetisensei

自然数の定義


ペアノの公理:

以下を満たすような集合 N の要素を自然数とする.

  1. O ∈ N

>2. 任意の x ∈ N について s(x) ∈ N このとき s(x) を x の後者と呼ぶ.

@tondol
tondol / nicovideo_rtmpe.md
Last active June 9, 2018 02:50
ニコニコ公式アニメポータルのrtmpeプロトコル動画をダウンロードする覚え書き

はじめに

http://www.nicovideo.jp/watch/1380872606

上記の動画を例にDL方法を解説する。

パラメータの取得

@branneman
branneman / better-nodejs-require-paths.md
Last active April 27, 2024 04:16
Better local require() paths for Node.js

Better local require() paths for Node.js

Problem

When the directory structure of your Node.js application (not library!) has some depth, you end up with a lot of annoying relative paths in your require calls like:

const Article = require('../../../../app/models/article');

Those suck for maintenance and they're ugly.

Possible solutions

@huonw
huonw / blackmagic.rs
Created January 15, 2014 12:42
do-while loops in Rust
while {
let x = foo();
bar(x);
x != 0
} {}
@gakuzzzz
gakuzzzz / 1_.md
Last active August 2, 2023 01:59
Scala の省略ルール早覚え

Scala の省略ルール早覚え

このルールさえ押さえておけば、読んでいるコードが省略記法を使っていてもほぼ読めるようになります。

メソッド定義

def concatAsString(a: Int, b: Int): String = {
  val a_ = a.toString();
  val b_ = b.toString();
anonymous
anonymous / untrusted-lvl12-solution.js
Created April 24, 2014 14:21
Solution to level 12 in Untrusted: http://alex.nisnevich.com/untrusted/
/*
* robotNav.js
*
* The green key is located in a slightly more
* complicated room. You'll need to get the robot
* past these obstacles.
*/
function startLevel(map) {
// Hint: you can press R or 5 to "rest" and not move the
anonymous
anonymous / untrusted-lvl13-solution.js
Created April 24, 2014 14:43
Solution to level 13 in Untrusted: http://alex.nisnevich.com/untrusted/
/*
* robotMaze.js
*
* The blue key is inside a labyrinth, and extracting
* it will not be easy.
*
* It's a good thing that you're a AI expert, or
* we would have to leave empty-handed.
*/
anonymous
anonymous / untrusted-lvl15-solution.js
Created April 24, 2014 15:07
Solution to level 15 in Untrusted: http://alex.nisnevich.com/untrusted/
/**************************
* exceptionalCrossing.js *
**************************
*
* Sorry, old friend, but I'm afraid I can't share
* co-authorship on this paper. You've done a very
* good job getting this Algorithm for me. The bit
* with the keys was especially clever! I wouldn't
* have thought of it myself. But then, of course,
* that's why you were here in the first place.