failed to open stream: Too many open files in Unknown on line 0
http://macappstore.org/httperf/
mac httperf は homebrewでインストールできる
ただし、あまり接続数などに大きい数値を割り当てられない。 エラーになる
ulimit -n の上限も10000くらいが上限っぽい。 これの数値がFD_SETSIZEのようだ。
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<string> | |
#include<vector> | |
/* | |
“If developers want their applications to make it into Google’s app store, Google Play, they have to make sure they adhere to the company’s policies. Google has policies on restricted content, intellectual property, privacy, security, ads, promotion, age-appropriate content, and updates. Violating any one of those policies could cause an app to be suspended or rejected.” | |
This text is refered to SD Times.(http://sdtimes.com/) | |
上記の問題を単語ごとにわけて出力せよ。 | |
ただし、splitは仕様禁止 |
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<stdio.h> | |
#include<stdlib.h> | |
#define DATA_NUM 10 | |
void InsertSort(int data[], int data_num) | |
{ | |
for (int pos = 1; pos < data_num; ++pos) | |
{ | |
int ins_pos = pos; |
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> | |
int RecursiveFactorial(int number) | |
{ | |
if (number < 0) throw std::invalid_argument("Negative number is not allowed."); | |
if (number == 0) return 1; | |
return number * RecursiveFactorial(number - 1); | |
} | |
int LoopedFactorial(int number) |
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<vector> | |
#include<iostream> | |
#include<utility> // from C++11 | |
std::vector<int> bubble_sort(const std::vector<int>& input) | |
{ | |
std::vector<int> work(input); | |
for (int i = work.size() - 1; i >= 0; i--) { | |
for (int j = 0; j < i; j++) { |