2009/5/9
from http://ubuntuforums.org/showthread.php?t=1064045
1. Install the GNU Objective-C Runtime.
Code:
sudo apt-get install gobjc
2. Write some source. Here's a very small example.
Code:
// hello.m
#import <objc/Object.h>
#import <stdio.h>
@interface Number: Object
{
@public
int number;
}
- (void)printNum;
@end
@implementation Number: Object
- (void)printNum
{
printf("%d\n", number);
}
@end
int main(void)
{
Number *myNumber = [Number new]; // equal to [[Number alloc] init]
myNumber->number = 6;
[myNumber printNum];
return 0;
}
As you see, there are some differences with Apple Objective-C.
The base object class is called Object, not NSObject. The Object
class's interface is at objc/Object.h, as you see it #import'ed.
3. Compile:
Code:
gcc -o hello hello.m -Wall -lobjc
2009/3/5
我一直yy的把3D搬到web browser
看来正在变成现实.
--
Yours sincerely Yang, Cheng
2009/2/13
我bs的后路也不安全了..
http://news.in.msn.com/international/article.aspx?cp-documentid=1814237Washington: An ongoing US federal probe into an H-1B visa fraud
has led to the arrest of 11 people in seven states and the indictment
of IT services firm Vision Systems Group founded by an Indian-American. 文中只说了Indian and Pakistani computer engineers and programmers.似乎这次还没有同胞倒霉
2009/2/5
身在异乡为异客,就是这个意思吧.
--
Yours sincerely Yang, Cheng
2009/2/1
钢铁的意志~
--
Yours sincerely Yang, Cheng
2009/1/31
纯粹就是骗钱. 有功夫折腾女权前还是好好练练技术吧..
--
Yours sincerely Yang, Cheng
2009/1/19
向原创者致敬.
--
Yours sincerely Yang, Cheng
2008/12/3
google reader的更新出奇的多.. 原来是订阅的space的相册都被算成新的了
界面显得很水晶.. 有待习惯.
2008/11/19
一共被5个人面过, 面玩第二人就感觉基本黄了
周5面试, 周2被拒, 拒的还挺快的,还避开了我周一的生日 赞一下.
- integer to english, e.g: 111 one hundred eleven. 英语就是麻烦啊. 汉语多简单
- copy a linked list with 2 pointers struct node {int val; node* next; node* other}; next points to next and other points to arbitrary node in the list or NULL. copy the list in linear time with constant extra spaces. 没想出来
- max substring
- evaluate an arithmitic expression like 10+5-2