# fix logs into memory instead of /var/log/messages. and the log size is 512 KB
syslogd -C 512
# to read the logs
logread
2012年6月28日 星期四
2012年6月26日 星期二
2012年6月23日 星期六
[iOS] Link new xib to File's Owner
The correct answer was given by user763308:
To link a .xib to a class under Xcode4:
- Open your .xib.
- In placeholder: select File's Owner.
- In the third thumbnail:"Identity Inspector" of the right panel, edit the "Custom Class" field and enter the name of your class.
I also then had to:
- Click the root view under Objects.
- Click the last tab: "Show Connections".
- Drag "New referencing outlet" to "File's Owner" and select "view".
2012年6月21日 星期四
2012年6月19日 星期二
2012年6月18日 星期一
[iOS] Hide Status Bar
[[UIApplication sharedApplication] setStatusBarHidden:YES animated:NO];
or
[application setStatusBarHidden:YES withAnimation:UIStatusBarAnimationNone];
plist:
UIStatusBarHidden, value boolean
2012年6月7日 星期四
[Technology] 3G-4G 理論速度
Downstream | Upstream | |||
3G | WCDMA | 384kbps | 384kbps | 中華電信, 台灣大, 遠傳, 威寶 |
CDMA2000 | 3.1Mbps | 1.8Mbps | 亞太 | |
3.5G | HSDPA | 14.4Mbps | 384kbps | |
3.75G | HSUPA | 14.4Mbps | 5.76Mbps | |
---- | HSPA+ | 21.6Mbps | 5.76Mbps | |
3.9G | HSDPA+ | 42Mbps | 5.76Mbps | 威寶 |
4G | LTE | 326.4Mbps | 86.4Mbps |
2012年6月6日 星期三
[TOOL] CVS add directories recursively
First, add all the directories, but not any named "CVS":
find . -type d \! -name CVS -exec cvs add '{}' \;
Then add all the files, excluding anything in a CVS directory:
find . \( -type d -name CVS -prune \) -o \( -type f -exec cvs add '{}' \; \)
find . -type f -print0| xargs -0 cvs add
Reference
2012年6月5日 星期二
[Linux] DNS Relay
1. Download BIND
http://www.bind9.net/download
2. Cross compile
3. to fix gen issue (bind-tools-BJA-gen-HOSTCC.diff) : modify configure
to
4. to fix epoll issue (or compile it with "--disable-epoll" in step 2.)
bind-tools-BJA-epoll-AC_TRY_RUN-cross.diff
5. /var/named.conf
6. run named
7. messages and logs
References:
DNS BIND - Operations Statements
DNS HOWTO
bind - DNS 設定
example 1
example 2
http://www.bind9.net/download
2. Cross compile
./configure --host=mips --disable-static --prefix=$(TOOLCHAIN) --includedir=$(INC_GPL_HEADER_PATH) --libdir=$(INC_GPL_LIB_PATH) --with-openssl=no --with-pkcs11=no --with-gssapi=no --with-randomdev=no --without-iconv --without-libiconv --without-docbook-xsl --with-libxml2=no --with-purify=no --with-docbook-xsl=no --with-libiconv=no --with-iconv=no --with-idnlib=no --with-atf=no --with-dlopen=no --with-dlz-mysql=no --with-dlz-postgres=no --with-dlz-bdb=no --with-dlz-filesystem=no --with-dlz-ldap=no --with-dlz-odbc=no --with-dlz-stub=no --disable-developer --disable-devpoll --disable-epoll --disable-largefile --disable-backtrace --disable-isc-spnego --disable-chroot
3. to fix gen issue (bind-tools-BJA-gen-HOSTCC.diff) : modify configure
if test "$cross_compiling" = "yes"; then
if test -z "$BUILD_CC"; then
as_fn_error $? "BUILD_CC not set" "$LINENO" 5
fi
BUILD_CFLAGS="$BUILD_CFLAGS"
BUILD_CPPFLAGS="$BUILD_CPPFLAGS"
BUILD_LDFLAGS="$BUILD_LDFLAGS"
BUILD_LIBS="$BUILD_LIBS"
else
to
if test "$cross_compiling" = "yes"; then
#if test -z "$BUILD_CC"; then
# as_fn_error $? "BUILD_CC not set" "$LINENO" 5
#fi
BUILD_CC="$CC"
BUILD_CFLAGS="$BUILD_CFLAGS"
BUILD_CPPFLAGS="$BUILD_CPPFLAGS"
BUILD_LDFLAGS="$BUILD_LDFLAGS"
BUILD_LIBS="$BUILD_LIBS"
else
4. to fix epoll issue (or compile it with "--disable-epoll" in step 2.)
bind-tools-BJA-epoll-AC_TRY_RUN-cross.diff
5. /var/named.conf
#Disable query logging
logging {
category default { null; };
category lame-servers { null; };
category edns-disabled { null; };
}
options {
directory "/var/named";
version "not currently available";
listen-on { 192.168.0.1; };
avoid-v4-udp-ports { range 1 32767; };
avoid-v6-udp-ports { range 1 32767; };
forwarders { 168.95.1.1;168.95.192.1; };
forward only;
max-ncache-ttl 3;
allow-transfer { none; };
allow-update-forwarding { none; };
allow-notify { none; };
};
6. run named
mkdir /var/named
named -c /var/named.conf -d 10 -p 53
7. messages and logs
/var/log/messages (if syslogd exists.)
/var/log/named.run
References:
DNS BIND - Operations Statements
DNS HOWTO
bind - DNS 設定
example 1
example 2
2012年6月4日 星期一
[iOS] Redirect to App store
http://stackoverflow.com/questions/5638563/link-to-app-store-with-no-redirects
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"
itms-apps://itunes.apple.com/us/app/easygroup-full/id513988942"]]
[iOS] Game Center
Game Center for Developers
Game Kit Programming Guide
iOS SDK: Game Center Achievements and Leaderboards - Part1
iOS SDK: Game Center Achievements and Leaderboards - Part2
How To Make A Simple Multiplayer Game with Game Center Tutorial: Part 1/2
How To Make A Simple Multiplayer Game with Game Center Tutorial: Part 2/2
Game Center memory deallocation (with Cocos2D)
Game Center memory leak
Game Kit Programming Guide
iOS SDK: Game Center Achievements and Leaderboards - Part1
iOS SDK: Game Center Achievements and Leaderboards - Part2
How To Make A Simple Multiplayer Game with Game Center Tutorial: Part 1/2
How To Make A Simple Multiplayer Game with Game Center Tutorial: Part 2/2
Game Center memory deallocation (with Cocos2D)
Game Center memory leak
訂閱:
文章 (Atom)