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> | |
#include <time.h> | |
void swap(int *p_from, int *p_to) { | |
int tmp; | |
tmp = *p_from; | |
*p_from = *p_to; | |
*p_to = tmp; | |
} |
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
_mservice_nginx() { | |
case $1 in | |
"start" ) nginx -t && nginx;; | |
"stop" ) nginx -s stop;; | |
"reload" ) nginx -s reload;; | |
"restart" ) nginx -t && nginx -s stop && nginx;; | |
"check" ) nginx -t;; | |
* ) echo "Usage: mservice nginx {start|stop|reload|restart|check}" 1>&2;; | |
esac | |
} |
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
# Path to your oh-my-zsh installation. | |
export ZSH=/Users/k4zzk/.oh-my-zsh | |
# Set name of the theme to load. | |
# Look in ~/.oh-my-zsh/themes/ | |
# Optionally, if you set this to "random", it'll load a random theme each | |
# time that oh-my-zsh is loaded. | |
ZSH_THEME="lukerandall" | |
# Uncomment the following line to use case-sensitive completion. |
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
package main | |
/* | |
#include <stdlib.h> | |
typedef int (*compare_t)(const void* a, const void* b); | |
int compareInts(int*, int*); | |
static void qsortInts(int* data, int len) { | |
qsort(data, len, sizeof(int), (compare_t)compareInts); | |
} |
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> | |
extern char **environ; | |
int main(void){ | |
char **p; | |
for(p=environ; *p; p++){ | |
printf("%s\n", *p); |
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> | |
#include <unistd.h> | |
#include <errno.h> | |
#define INIT_BUFSIZE 1024 | |
/* | |
* return "/home/k4zzk/Desktop" | |
*/ |
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> | |
#include <stdarg.h> | |
#include <signal.h> | |
#include <string.h> | |
typedef void (*sighandler_t)(int); | |
/* | |
* 標準エラー出力にフォーマットしたものを出力して、プロセスを終了する。 | |
* @vars (char *fmt, ...) |
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
stock_code | name | |
---|---|---|
1605 | 国際石油開発帝石 | |
1878 | 大東建託 | |
1925 | 大和ハウス工業 | |
1928 | 積水ハウス | |
1963 | 日揮 | |
2502 | アサヒグループホールディングス | |
2503 | キリンホールディングス | |
2802 | 味の素 | |
2914 | 日本たばこ産業 |
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
require 'rubygems' | |
require 'sqlite3' | |
require 'twitter' | |
require 'pp' | |
# ログイン | |
client = Twitter::REST::Client.new do |config| | |
config.consumer_key = "" | |
config.consumer_secret = "" | |
config.access_token = "" |
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
package main | |
import "fmt" | |
func f1() (int, string, float32) { | |
return 0, "xyz", 3.14 | |
} | |
func f2(a int, b string, c interface{}) { | |
fmt.Println(a, b, c) |
OlderNewer