Title | Authors |
---|---|
60分でハングルが読める! | 「ハングル大好き!」編集部 |
A smarter way to learn JavaScript | Mark Myers |
Angular JS Up & Running | Shyam Seshadri & Brad Green |
Apache実践運用/管理 | 鶴長鎮一 |
Async & Performance | Kyle Simpson |
Data visualization with JavaScript | Stephen A. Thomas |
Gitによるバージョン管理 | 岩松信洋 |
Interactive Data Visualization for the Web | Scott Murray |
This file contains 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
'use strict'; | |
// 与えられた配列を昇順にマージソートでソートした配列を返す. | |
function mergeSort(array) { | |
if (array.length <= 1) { | |
return array; | |
} | |
const mid = Math.floor(array.length / 2); | |
const a = array.slice(0, mid); // array[0:mid] | |
const b = array.slice(mid); // array[mid:] |
This file contains 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
'use strict'; | |
// 自然数nを素因数分解して、素因数の配列を返す. | |
function calcPrimeFactor(n) { | |
const result = []; | |
let x = n; | |
for (let i = 2; i * i <= x; i++) { | |
while (x % i === 0) { | |
result.push(i); | |
x /= i; |
This file contains 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
#pragma once | |
#include <ctype.h> | |
#include <cstdio> | |
#include <cstdlib> | |
#include <cstring> | |
#include <string_view> | |
#include <type_traits> |
This file contains 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
/* | |
* Copyright (c) 2007 Russ Cox. | |
* | |
* Permission is hereby granted, free of charge, to any person | |
* obtaining a copy of this software and associated | |
* documentation files (the "Software"), to deal in the | |
* Software without restriction, including without limitation | |
* the rights to use, copy, modify, merge, publish, distribute, | |
* sublicense, and/or sell copies of the Software, and to | |
* permit persons to whom the Software is furnished to do so, |
This file contains 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
static void escape(void *p) { | |
asm volatile("" : : "g"(p) : "memory"); | |
} | |
static void clobber() { | |
asm volatile("" : : : "memory"); | |
} |
This file contains 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
// g++ -std=c++11 auto.cc | |
#include <vector> | |
#include <string> | |
#include <iostream> | |
static std::vector<std::string> Foo() { | |
decltype(Foo()) v; | |
v.push_back("aii"); | |
return v; | |
} |
This file contains 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 <vector> | |
#include <stdio.h> | |
using namespace std; | |
class Test { | |
public: | |
Test(int) { printf("ctor\n"); } | |
Test(const Test&) { printf("copy ctor\n"); } | |
}; |
This file contains 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 <stdio.h> | |
class A { | |
public: | |
virtual ~A() {} | |
virtual void f(int) {} | |
}; | |
class B : public A { | |
public: | |
void f(size_t) override {} // error |
This file contains 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> | |
class A { | |
public: | |
A() {} | |
~A() { std::cout << "destructed" << std::endl; } | |
A(const A&) { | |
std::cout << "copy" << std::endl; | |
} |
NewerOlder