Skip to content

Instantly share code, notes, and snippets.

View sunghwan2789's full-sized avatar

Sunghwan Bang sunghwan2789

View GitHub Profile
@sunghwan2789
sunghwan2789 / map-perf.js
Last active October 15, 2022 00:14 — forked from jung-kim/map-perf.js
es6 map vs array vs obj performance test
"use strict";
let looper = (callback) => {
let n = 2000000;
while (n > 0) {
callback(n);
n--;
}
};
@sunghwan2789
sunghwan2789 / download_test.php
Last active August 27, 2018 06:38 — forked from sharapeco/download_test.php
Content-Disposition: attachment で日本語ファイル名をダウンロードさせるテスト
<?php
$t = isset($_GET['t']) ? $_GET['t'] : null;
$org = '此のファイル test.php';
$fn = array(
'A: UTF-8 Raw' => 'Content-Disposition: attachment; filename="' . $org . '"',
'B: UTF-8 URL Encoded' => 'Content-Disposition: attachment; filename="' . rawurlencode($org) . '"',
'C: RFC 2231' => 'Content-Disposition: attachment; filename*=UTF-8\'\'' . rawurlencode($org),
'D: UTF-8 Raw + RFC 2231' => 'Content-Disposition: attachment; filename="' . $org . '"; filename*=UTF-8\'\'' . rawurlencode($org),
//from http://pastebin.com/jftEbWrc
public class LimitedPool<T> : IDisposable where T : class
{
readonly Func<T> _valueFactory;
readonly Action<T> _valueDisposeAction;
readonly TimeSpan _valueLifetime;
readonly ConcurrentStack<LimitedPoolItem<T>> _pool;
bool _disposed;
public LimitedPool(Func<T> valueFactory, Action<T> valueDisposeAction, TimeSpan? valueLifetime = null)
INSERT INTO osu.osu_beatmaps (beatmap_id, beatmapset_id, user_id, filename, checksum, version, total_length, hit_length, countTotal, countNormal, countSlider, countSpinner, diff_drain, diff_size, diff_overall, diff_approach, playmode, approved, last_update, difficultyrating, playcount, passcount, orphaned, youtube_preview) VALUES (889318, 405053, 798668, 'Azusa Tadokoro - Junshin Always (Shad0w1and) [Advanced].osu', '000af61ac36f4478cadc53cf77045125', 'Advanced', 89, 87, 318, 60, 129, 0, 4, 3.5, 5.5, 6.5, 0, 1, '2016-02-08 02:56:08', 2.34034, 6715, 1955, 0, null);
INSERT INTO osu.osu_beatmaps (beatmap_id, beatmapset_id, user_id, filename, checksum, version, total_length, hit_length, countTotal, countNormal, countSlider, countSpinner, diff_drain, diff_size, diff_overall, diff_approach, playmode, approved, last_update, difficultyrating, playcount, passcount, orphaned, youtube_preview) VALUES (889319, 405053, 798668, 'Azusa Tadokoro - Junshin Always (Shad0w1and) [Lami''s Extra].osu', '17c8cc1753ea26a214e321cb296
INSERT INTO osu.osu_beatmapsets (beatmapset_id, user_id, thread_id, artist, artist_unicode, title, title_unicode, creator, source, tags, video, storyboard, epilepsy, bpm, versions_available, approved, approvedby_id, approved_date, submit_date, last_update, filename, active, rating, offset, displaytitle, genre_id, language_id, star_priority, filesize, filesize_novideo, body_hash, header_hash, osz2_hash, download_disabled, download_disabled_url, thread_icon_date, favourite_count, play_count, difficulty_names) VALUES (405053, 798668, 409296, 'Azusa Tadokoro', '田所あずさ', 'Junshin Always', '純真Always', 'Shad0w1and', '無彩限のファントム・ワールド', 'musaigen no phantom world myriad colors tv size anime opening ending cloudsplash16 little lami intoon zzhboy starrstyx aerous', 1, 0, 0, 180, 8, 1, 3621552, '2016-02-15 03:21:02', '2016-01-16 15:19:42', '2016-02-08 02:56:07', '405053.osz', 1, 9.45496, 0, '[bold:0,size:20]田所あずさ|純真Always', 3, 3, 20, 0, null, 0x7CCF1E3C52194C65DAF9F36A910F2347, 0xD159A700F97BF2DCFF2FB3A27F8E3BE7, 0x786953F