Skip to content

Instantly share code, notes, and snippets.

あああ
gistを使ってみるテスト。。
// 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;
#!/usr/bin/ruby
#
# google-spreadsheet-checker.rb
#
# how to use
#
# 1. Add Google Account in ~/.netrc
#
# machine spreadsheet-checker
# login ******@gmail.com
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);
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);
@yoggy
yoggy / opy_test.rb
Created November 4, 2010 17:31
Rubyのclone,dupはshallow copyなのではまる例
#!/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]]]
//
// $ 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
//
// 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
//
#!/usr/bin/ruby
require 'pp'
a = [
[1,2,3],
[4,5,6],
[7,8,9]
]
b = {
#!/usr/bin/ruby
require 'pp'
a = [
[1,2,3],
[4,5,6],
[7,8,9]
]
b = {