Skip to content

Instantly share code, notes, and snippets.

@jumboly
jumboly / WebMercator.cs
Created June 19, 2021 05:44 — forked from nagasudhirpulla/WebMercator.cs
C# Web Mercator utility class
/// <summary>
/// Conversion routines for Google, TMS, and Microsoft Quadtree tile representations, derived from
/// http://www.maptiler.org/google-maps-coordinates-tile-bounds-projection/
/// </summary>
public class WebMercator
{
private const int TileSize = 256;
private const int EarthRadius = 6378137;
private const double InitialResolution = 2 * Math.PI * EarthRadius / TileSize;
private const double OriginShift = 2 * Math.PI * EarthRadius / 2;
@jumboly
jumboly / readme.md
Last active April 9, 2020 16:36
暗号の話
  • ハッシュ
  • 共通鍵暗号
  • 公開鍵暗号
@jumboly
jumboly / .dot
Created February 19, 2020 14:14
digraph graph_name {
graph [
charset = "UTF-8";
label = "sample graph",
labelloc = "t",
labeljust = "c",
bgcolor = "#343434",
fontcolor = white,
fontsize = 18,
style = "filled",
@jumboly
jumboly / .md
Last active February 14, 2020 08:55
地図
  • 座標系
    • 地理座標、直交座標
    • 測地系、投影法、空間参照系(SRID)
    • 旧測地系(日本測地系)、新測地系(世界測地系)、JGD2011
    • Webメルカトル、平面直角座標系
    • 座標系を変換
    • epgs.io、WKT、pro.j
  • 地図の描画
    • ベクトル地図、ラスタ地図
    • Webメルカトル、平面直角座標系
@jumboly
jumboly / .md
Last active January 21, 2020 23:39
スタック・ヒープ・スレッド
  • CPU・レジスタ・キャッシュ・メモリ
  • メモリレイアウト
  • スタックポインタとプログラムカウンタ
  • スタックとヒープ
  • 実メモリと仮想メモリ
  • 値型と参照型
  • コンテキストスイッチ
  • スレッド

番外

Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jumboly
jumboly / gist:2395029
Last active October 3, 2015 04:58
FizzBuzz 2012/04/16
(use srfi-1)
(define (fz n)
(cond
((= 0 (mod n 15)) 'FizzBuzz)
((= 0 (mod n 3)) 'Fizz)
((= 0 (mod n 5)) 'Buzz)
(else n)))
(define (fizzbuzz n)
@jumboly
jumboly / gist:2367375
Created April 12, 2012 13:42
FizzBuzz 2012/4/12
(define (range s c)
(cond
((<= c 0) '())
(else (cons s (range (+ s 1) (- c 1))))))
(define (map f l)
(cond
((null? l) '())
(else (cons (f (car l)) (map f (cdr l))))))
@jumboly
jumboly / gist:2343760
Created April 9, 2012 14:21
FizzBuzz 2012/04/09
(define range
(lambda (start count)
(cond
((<= count 0) '())
(else (cons start (range (+ start 1) (- count 1)))))))
(define map
(lambda (f l)
(cond
((null? l) '())
@jumboly
jumboly / gist:2324555
Created April 7, 2012 02:21
FizzBuzz 2012/04/07
(define fizzbuzz
(lambda (i n)
(cond
((> i n) ())
((and (eq? 0 (modulo i 3)) (eq? 0 (modulo i 5))) (cons 'FizzBuzz (fizzbuzz (+ 1 i) n)))
((eq? 0 (modulo i 3)) (cons 'Fizz (fizzbuzz (+ 1 i) n)))
((eq? 0 (modulo i 5)) (cons 'Buzz (fizzbuzz (+ 1 i) n)))
(else (cons i (fizzbuzz (+ 1 i) n))))))
(fizzbuzz 1 100)