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
あああ | |
gistを使ってみるテスト。。 | |
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
// gcc -o test test.c | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <time.h> | |
#include <unistd.h> | |
int main(int argc, char *argv[]) | |
{ | |
int i; | |
time_t t; |
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
#!/usr/bin/ruby | |
# | |
# google-spreadsheet-checker.rb | |
# | |
# how to use | |
# | |
# 1. Add Google Account in ~/.netrc | |
# | |
# machine spreadsheet-checker | |
# login ******@gmail.com |
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
void SetWindowTransparent(HWND hWnd, unsigned char alpha) | |
{ | |
BOOL (*pSetLayeredWindowAttributes)(HWND, COLORREF, BYTE, DWORD) = NULL; | |
HMODULE hDll = LoadLibrary(_T("\\Windows\\coredll.dll")); | |
pSetLayeredWindowAttributes = (BOOL (*)(HWND, COLORREF, BYTE, DWORD))GetProcAddress(hDll, _T("SetLayeredWindowAttributes")); | |
LONG style = GetWindowLong(hWnd, GWL_EXSTYLE); | |
SetWindowLong(hWnd, GWL_EXSTYLE, style | WS_EX_LAYERED); | |
pSetLayeredWindowAttributes(hWnd, 0, alpha, LWA_ALPHA); |
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
void SetWindowTransparent(HWND hWnd, unsigned char alpha) | |
{ | |
BOOL (*pSetLayeredWindowAttributes)(HWND, COLORREF, BYTE, DWORD) = NULL; | |
HMODULE hDll = LoadLibrary(_T("\\Windows\\coredll.dll")); | |
pSetLayeredWindowAttributes = (BOOL (*)(HWND, COLORREF, BYTE, DWORD))GetProcAddress(hDll, _T("SetLayeredWindowAttributes")); | |
LONG style = GetWindowLong(hWnd, GWL_EXSTYLE); | |
SetWindowLong(hWnd, GWL_EXSTYLE, style | WS_EX_LAYERED); | |
pSetLayeredWindowAttributes(hWnd, 0, alpha, LWA_ALPHA); |
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
#!/usr/bin/ruby | |
# | |
# Rubyのclone,dupはshallow copyなのではまる例 | |
# 完全な複製を作るときはMarshal.load(Marshal.dump(コピー対象))を使う | |
# | |
# $ ruby copy_test.rb | |
# == case 1 == | |
# [[[200, 201, 202], [210, 211, 212], [220, 221, 222]], | |
# [[200, 201, 202], [210, 211, 212], [220, 221, 222]], | |
# [[200, 201, 202], [210, 211, 212], [220, 221, 222]]] |
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
// | |
// $ gcc -I/usr/local/opencv2.1/include/ -std=c99 -L/usr/local/opencv2.1/lib -lhighgui -lcv -lcxcore -o cvmattest cvmattest.c | |
// $ DYLD_LIBRARY_PATH=/usr/local/opencv2.1/lib ./cvmattest | |
// | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <opencv/cv.h> | |
#include <opencv/cxcore.h> | |
int |
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
// | |
// cvaddimage.c | |
// | |
// how to compile: | |
// | |
// $ gcc -I/usr/local/opencv2.1/include/ -std=c99 -L/usr/local/opencv2.1/lib -lhighgui -lcv -lcxcore -o cvaddimage cvaddimage.c | |
// $ DYLD_LIBRARY_PATH=/usr/local/opencv2.1/lib ./cvmattest | |
// | |
// how to run | |
// |
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
#!/usr/bin/ruby | |
require 'pp' | |
a = [ | |
[1,2,3], | |
[4,5,6], | |
[7,8,9] | |
] | |
b = { |
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
#!/usr/bin/ruby | |
require 'pp' | |
a = [ | |
[1,2,3], | |
[4,5,6], | |
[7,8,9] | |
] | |
b = { |
OlderNewer