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
#!/bin/bash | |
TEMPFILE=/var/tmp/tmptxt | |
DIFF=diffmerge | |
if [ $# -ne 2 ]; then | |
echo "usage:"$0" <REVISION> <FILE>" 1>&2 | |
exit 1 | |
fi |
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
//!(C)tmiz.net | |
#include <stdio.h> | |
#define X86_VENDERNAME_ARRAY_LENGTH 13 | |
#define X86_BRANDNAME_ARRAY_LENGTH 49 | |
extern void GetX86CPUVenderName(char*outVendername); | |
extern void GetX86CPUBrandName(char*brandname); | |
int main() { | |
char vender[X86_VENDERNAME_ARRAY_LENGTH]; |
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
-- Sample Apple Script for SimplyRec + ChromeLauncherWithExtraAudio with Google Chrome | |
-- SimplyRec http://tg.tmiz.net/softwares/sr/index-e.html | |
-- ChromeLauncherWithExtraAudio http://tg.tmiz.net/softwares/clwea/ | |
-- Google Chrome for Mac http://www.google.co.jp/chrome/ | |
-- SoundFlower http://code.google.com/p/soundflower/ | |
-- This scirpt can be executed by iCal and Automator, Apple Script Editor | |
-- Please select input device "SoundFlower" on SimplyRec before executing. | |
tell application "ChromeLauncherWithExtraAudio" |
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> | |
int main() { | |
if ((int) -1 < (unsigned int) 5) { | |
printf("(A)\n"); | |
} else { | |
printf("(B)\n"); | |
} | |
return 0; | |
} | |
// Which is output? |
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> | |
#define ELEMENTSNUM (sizeof(array) / sizeof(array[0])) | |
int array[] = {10,20,30,40,50,60,70}; | |
int main() | |
{ | |
int d; | |
for(d=-1;d <= (ELEMENTSNUM-2);d++) | |
printf("%d\n",array[d+1]); | |
return 0; | |
} |
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 <time.h> | |
struct mydate { int year,month,day; }; | |
int addDay(struct mydate *d, int n) | |
{ | |
struct tm birthday = {0,0,0,d->day,d->month,d->year-1900,0,0,0,0,NULL}; | |
time_t birthday_sec = mktime(&birthday); | |
birthday_sec += (n*24*60*60); | |
struct tm *pHA = localtime( &birthday_sec ); |
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
svn co https://opencvlibrary.svn.sourceforge.net/svnroot/opencvlibrary/trunk/opencv opencv | |
cd opencv | |
curl -O http://tg.tmiz.net/test/opencv_mac_framework_i386_x86_64_only.patch | |
patch -p0 < opencv_mac_framework_i386_x86_64_only.patch | |
sh make_frameworks.sh |
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
# sleep sort | |
import threading | |
import time | |
class SleepAndAppend(threading.Thread): | |
def __init__(self, value, targetList): | |
threading.Thread.__init__(self) | |
self.value = value | |
self.targetList = targetList | |
def run(self): |
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/env python | |
import sys,os | |
""" | |
$ ./genEmbeddedFloatTable txtCopyFromExcel.txt aCertainCoefTable | |
const float aCertainCoefTable[24] = { | |
0.10f , 0.09f , 0.09f , 0.08f , 0.07f , 0.07f , 0.07f , 0.06f , 0.06f , 0.06f , | |
0.05f , 0.04f , 0.04f , 0.04f , 0.03f , 0.03f , 0.02f , 0.01f , 0.01f , 0.06f , | |
0.06f , 0.06f , 0.06f , 0.06f | |
}; |
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
tell application "Safari" | |
if not (exists front document) then return | |
set _title to name of front document | |
set _url to URL of front document | |
end tell | |
set the clipboard to _url & return & _title & return |
OlderNewer