This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void rsort(uint64_t *a, uint64_t n, uint64_t *b) | |
{ | |
uint32_t cnt[0x4001]={}; | |
for (size_t i=0;i<n;i++) cnt[(a[i]&0x1fff)+1]++; | |
for (size_t i=0;i<0x2000;i++) cnt[i+1]+=cnt[i]; | |
for (size_t i=0;i<n;i++) b[cnt[a[i]&0x1fff]++]=a[i]; | |
std::swap(a, b); | |
for (size_t i=0;i<0x2000;i++) cnt[i]=0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function pp(object, depth, embedded) { | |
typeof(depth) == "number" || (depth = 0) | |
typeof(embedded) == "boolean" || (embedded = false) | |
var newline = false | |
var spacer = function(depth) { var spaces = ""; for (var i=0;i<depth;i++) { spaces += " "}; return spaces } | |
var pretty = "" | |
if ( typeof(object) == "undefined" ) { pretty += "undefined" } | |
else if ( typeof(object) == "boolean" || | |
typeof(object) == "number" ) { pretty += object.toString() } | |
else if ( typeof(object) == "string" ) { pretty += "\"" + object + "\"" } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdint.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <stdio.h> | |
struct Stack { | |
uint32_t used; | |
int *array; | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdint.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <stdio.h> | |
struct Stack { | |
uint32_t used; | |
int *array; | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdint.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <signal.h> | |
#include <stdio.h> | |
#include <setjmp.h> | |
sigjmp_buf return_point; | |
/* 適切で無いハンドラ */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <thread> | |
#include <future> | |
#include <chrono> | |
#include <functional> | |
#include <deque> | |
struct task_queue { | |
task_queue() = default; | |
task_queue(const task_queue &) = delete; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# nvcc.jam Boost.Build Jam file for extended toolset. | |
# Copyright (c) 2010 - 2011 Kohei Takahashi (Flast). | |
# Distributed under the MIT license. for more detail see COPYING. | |
import "class" : new ; | |
import common ; | |
import feature : feature ; | |
import generators ; | |
import modules ; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* C11 <threads.h> emulation library | |
* | |
* (C) Copyright yohhoy 2012. | |
* Distributed under the Boost Software License, Version 1.0. | |
* (See copy at http://www.boost.org/LICENSE_1_0.txt) | |
*/ | |
#ifndef EMULATED_THREADS_H_INCLUDED_ | |
#define EMULATED_THREADS_H_INCLUDED_ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
import datetime | |
from threading import Thread | |
from Queue import Queue as queue | |
import SocketServer | |
import logging | |
import logging.handlers | |
class UTC(datetime.tzinfo): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
a,あ,ア,ア | |
bb,っ,ッ,ッ,b | |
ba,ば,バ,バ | |
bi,び,ビ,ビ | |
bu,ぶ,ブ,ブ | |
be,べ,ベ,ベ | |
bo,ぼ,ボ,ボ | |
# DvorakJP | |
# コンビネーションキー |
OlderNewer