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 <sys/socket.h> | |
#include <thread> | |
#include <iostream> | |
#include <unistd.h> | |
#include <netinet/in.h> | |
#include <arpa/inet.h> | |
int main() { | |
sockaddr_in addr; | |
addr.sin_family = AF_INET; | |
addr.sin_port = htons(12345); |
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
0 is empty! so first insert to 0 | |
1 is empty! so first insert to 1 | |
extend to 4 ! | |
rehash key:0 into slot:0 | |
rehash key:1 into slot:1 | |
2 is empty! so first insert to 2 | |
3 is empty! so first insert to 3 | |
extend to 8 ! | |
rehash key:0 into slot:0 | |
rehash key:1 into slot:1 |
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
(require 'cl) | |
(require 'compile) | |
(defun upward-find-file (filename &optional startdir) | |
(let | |
((dirname (expand-file-name | |
(if startdir startdir "."))) | |
(found nil) | |
(top nil)) | |
(while (not (or found top)) |
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
// Configuration: Obtain Slack web API token at https://api.slack.com/web | |
var API_TOKEN = PropertiesService.getScriptProperties().getProperty('slack_api_token'); | |
if (!API_TOKEN) { | |
throw 'You should set "slack_api_token" property from [File] > [Project properties] > [Script properties]'; | |
} | |
Logger.log("API_" + API_TOKEN); | |
var FOLDER_NAME = 'Slack Logs'; | |
/**** Do not edit below unless you know what you are doing ****/ | |
var COL_LOG_RAW_JSON = 1; | |
var COL_MAX = COL_LOG_RAW_JSON; |
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 <fstream> | |
#include <chrono> | |
#include <iostream> | |
#include <vector> | |
#include <cmath> | |
#include <unistd.h> | |
int main(void) { | |
constexpr int size = 8192; | |
constexpr int tries = 1024; |
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
lld/build$ cmake -G Ninja .. | |
CMake Error at CMakeLists.txt:6 (string): | |
string sub-command REGEX, mode MATCH needs at least 5 arguments total to | |
command. | |
-- LLD version: | |
CMake Error at CMakeLists.txt:10 (string): | |
string sub-command REGEX, mode REPLACE needs at least 6 arguments total to | |
command. |
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> | |
#include <pthread.h> | |
#include <sys/eventfd.h> | |
#include <unistd.h> | |
struct workset { | |
int tid_; | |
int efd_; | |
}; |
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> | |
#include <stddef.h> | |
#include <stdlib.h> | |
#include <stdint.h> | |
#include <sys/time.h> | |
#include <assert.h> | |
int main(void) { | |
size_t a = 2; | |
int b = 10; |
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
import subprocess | |
import sys | |
import os | |
import signal | |
import time | |
import re | |
class JubatusCluster(object): | |
def __init__(self): | |
self.procs = {} |
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
require 'selenium-webdriver' | |
class KensakuOuen | |
def initialize() | |
@driver = Selenium::WebDriver.for :firefox | |
end | |
def search(keyword) | |
begin | |
@driver.manage.delete_all_cookies | |
@driver.get "http://www.yahoo.co.jp" |