Skip to content

Instantly share code, notes, and snippets.

View peterlee0127's full-sized avatar

PeterLee peterlee0127

View GitHub Profile
@peterlee0127
peterlee0127 / OpenCV CortexA9
Last active December 15, 2015 03:19
opencv cortexA9
Test Image 320x240
################################
erode -->0 s, 8880615 ns, fps=112.60
erode -->0 s, 17456055 ns, fps=114.57
erode -->0 s, 25634766 ns, fps=117.03
erode -->0 s, 34027100 ns, fps=117.55
erode -->0 s, 42449951 ns, fps=117.79
erode -->0 s, 50842285 ns, fps=118.01
erode -->0 s, 59020996 ns, fps=118.60
erode -->0 s, 67382812 ns, fps=118.72
實習室機位 http://163.13.243.237/Data/xml/labs.xml
即時影像 http://163.13.240.180/cellphone/MainPage.html
課表
StuNo=學號
pKey=
Chksum=
pPass=密碼
@peterlee0127
peterlee0127 / gist:3887188
Created October 14, 2012 03:41
Stm32F4 DiscoveryBoard Simple Makefile
#ARCH
ARCH="`uname -s`"
LINUX="Linux"
Darwin="Darwin"
TARGET=demo.hex
EXECUTABLE=demo.elf
CC=arm-none-eabi-gcc
@peterlee0127
peterlee0127 / gist:3130541
Created July 17, 2012 16:48
Clean Mac Caches
#! /bin/sh
sudo rm -rf /Users/$USER/Library/Logs
sudo rm -rf /Library/Caches
sudo rm -rf /Users/$USER/Library/Caches
sudo rm -rf /var/folders/*
sudo rm -rf /System/Library/Caches
echo "Clean Done"
UIColor *buttonColorDefault = [UIColor colorWithRed:90.0f/255.0f green:90.0f/255.0f blue:90.0f/255.0f alpha:1.0];
UIColor *buttonColorHighlight = [UIColor colorWithRed:255.0f/255.0f green:255.0f/255.0f blue:255.0f/255.0f alpha:1.0];
UIImage *btn = [UIImage imageNamed:@"Button.png"];
UIImage *btnh = [UIImage imageNamed:@"ButtonHighlighted.png"] ;
// building the buttons
UIButton *aboutBtn = [UIButton buttonWithType:UIButtonTypeCustom];
[aboutBtn addTarget:self action:@selector(showAboutPage) forControlEvents:UIControlEventTouchUpInside];
[aboutBtn setTitle:@"登入" forState:UIControlStateNormal];
[aboutBtn setFrame:CGRectMake(80.0,320.0, 162.0, 42.0)];
[aboutBtn setBackgroundImage:btn forState:UIControlStateNormal];
@peterlee0127
peterlee0127 / gist:2843423
Created May 31, 2012 13:27
iOS getgetIPAddress
//This is xxx.h
/*
//#import <ifaddrs.h>
//#import <arpa/inet.h>
@interface TKUWiFiInformation : NSObject
- (NSString *)getIPAddress;
@end
#include <stdio.h>
#include <windows.h> //這裡面有定義BITMAPFILEHEADER BITMAPINFOHEADER RGBQUAD
#define WORD short int
#define DWORD long int
#define LONG long int
char *File1_Name = "0001.bmp";
BITMAPFILEHEADER File1_F; //BMP檔頭結構
BITMAPINFOHEADER File1_I; //BMP資料結構