竟然一个月没更新blog了 05月 31st, 2010

edward

汗!!

From now on, Record everything

Continue reading...


 

glib中非常好用的字符串处理函数 04月 20th, 2010

edward

glib的确是个好用的函数库,它有好多设计精致的函数,为基于C的开发省去很多宝贵的时间和重复劳动。

下面介绍几个编程中常常用到的字符串处理函数

  1. gint g_strcmp0(str1,str2);
    • 这个函数和strcmp一摸一样,但为什么要用这个函数呢?其实理由很简单,也许还有点牵强。
    • 大家都知道判定两个字符串是否相等的函数strcmp返回0则相等,但是程序员往往把这个函数的返回值作为if语句的判定条件,而且往往忘记写”==0″的判定条件,这就导致程序的逻辑完全相反了。而g_strcmp0则可以再一定程度上避免这种错误,因为有一个0后缀,每次程序员写这个函数时都被提醒,如果相等则返回的是0,注意判断。
  2. gchar *g_strconcat(str1,str2,str3,….,strn,NULL);
    • 连接任意多个字符串,返回值为新字符串,用完后必须用g_free释放。
    • 这个函数超级爽,以前一直期待C中有个这样连接任意多个字符串的,这里终于遇到了,呵呵。
    • 函数参数必须以NULL结尾,而且需要注意的是,str1,str2,….均不能是NULL,除非你不想要它后面的字符串了。

Continue reading...


 

glib/gdk/gtk编程常见问题 04月 20th, 2010

edward

在写MusicMe播放器的时候(其实现在还在写),我遇到了一系列GTK和GLIB的问题。我觉得这些问题很有代表性,所以决定把他们分享出来。这篇帖子就做一个索引贴,方便大家查找。


GLIB:

  1. glib中非常好用的字符串处理函数
  2. glib中常用的数据结构及对应函数
  3. glib解析xml研究
  4. glib编码转换

Continue reading...


 

围脖测试~~ @4/12 Monday 04月 12th, 2010

edward

围脖测试~~

Continue reading...


 

今天签约了,e~~ 04月 3rd, 2010

edward

一个星期的紧张面试终于在今天下午画上了句号。

终于签约了,我的第一次面试,竟然奇迹般的成功了,公司就是传说中的中广核。

今天签约的地点是西藏饭店,五星级诶,从来没去过这么高档的地方。

写下名字的时候仿佛把自己卖了一样,一签就是至少5年,(我签的是联合培养班,要在明年毕业才开始算)。

现在起认真学习了,别大四毕业成为史上第一个被淘汰的人,那样就丢人丢大了。

好好学习,天天向上

Continue reading...


 

[转载自可能吧]Google退出中国成定局,抹黑行动开始 03月 25th, 2010

edward

转载自 可能吧,原文地址:http://www.kenengba.com/post/2821.html

感谢国家感谢党。

可能吧永远没有新闻通稿,没有红头文件下达,我们力撑Google

北京时间3月23日凌晨,Google在其官方博客宣布google.cn的搜索服务将跳转到google.com.hk,其它google.cn的服务暂时保留。也就是说,现在在google.cn上,你将能享受无审查的搜索。噢不,现在在google.cn上搜索中国政府认为的敏感词,google.cn马上就会与你断开连接。

不要相信五毛党的论调与新闻办下发的通稿,Google的退出对于中国互联网来说,是一种倒退,这种倒退不会立竿见影,慢慢地,那些审查机器会为以往的行为负上沉重的代价。

零、Google官方声明搜索业务退出中国

北京时间3月23日凌晨,Google在其英文官方博客宣布将其搜索业务退出中国。即日起,google.cn的文字搜索、图片搜索等会转跳到google.com.hk,Google对于中国政府的黑客行动表示愤慨,对于不透明的审查制度表示抵制。目前google.cn上的服务正在逐步迁移。

Google在其官方博客写道(来自谷奥的翻译):

做出停止 Google.cn 搜索服务审查的决定是艰难的,我们希望世界上包括在中国大陆人民在内的更多人可以使用我们的服务。但是中国政府在与我们的谈判中非常明确的表示,自我审查是没有任何回旋余地的法律要求。所以我们相信通过 Google.com.hk 来提供无审查的搜索是一个符合情理的选择——完全符合法律,并且可以使中国人民获得更多的信息。

我们衷心希望中国政府能尊重我们的决定,尽管我们知道通过这个方式提供的服务有可能随时被阻断。为此,我们建立了一个每天规律更新的页面来监控中国大陆访问各个 Google 服务的情况,这样所有人都可以随时看到哪个 Google 服务在中国可以访问。

这个页面截图如下所示:

可以看到,很多Google的服务在中国早已无法正常访问

一、为什么Google的退出让人感到遗憾?

Google退出中国对你会有什么影响?我在Twitter上提出了这个问题,瞬间得到了将近100个回复。

有人担心百度会一家独大,搜索结果里的虚假信息会日益增多;很多人担心,他们喜爱的Google服务,比如Gmail, Reader, Calendar将无法使用;有站长担心Adsense项目会被搁置;也有人认为,这将使得中国互联网倒退10年。

在这些草根网民的眼里,Google退出中国并不如政府的某些官员所说–“中国互联网照样健康发展”。Google为互联网带来的改变,绝不仅仅是创造了最好的搜索引擎。

Google是一家值得所有互联网从业者敬佩的公司,它总是无时无刻给互联网带来新的惊喜以及新的模式。在一定程度上,Google代表着免费互联网的趋势,代表着技术的前进方向,代表着网络中立的理念。这是Google的三个代表。

1、免费服务专家

当企业还在花钱购买或搭建自己的邮箱服务时,Google推出了面向企业服务的Google Apps,中小企业使用其免费版绰绰有余;当程序员需要花钱购买服务器来搭建网络程序时,Google推出了免费的App Engine,免费用户可以搭建10个程序。当人们还在为大容量邮箱付费时,Google推出了免费的G级邮箱-Gmail。

Google将很多本来需要收费的服务变成免费,让对手措手不及。虽然是免费,但这些服务的质量并没有让人担忧,相反,Google推出了很多既免费又实用的服务。比如阅读器、日程管理、邮箱、Google地球、网站统计分析工具、网络相册、建站空间……

Google推出这么多免费的服务,它不需要盈利么?Google不直接通过服务来收费,它为用户提供增值服务,为用户提供相关性高的广告,甚至和用户分享广告收入。Google信奉“关注使用者,则一切将水到渠成( Focus on the user and all else will follow.)”的理念。用户喜欢免费大邮箱,它就做大邮箱,用户喜欢免费,它就推出免费的服务。当用户彻底爱上了Google,盈利并不是一个难以思考的问题。

2、技术推动者

Google一直扮演着技术推动者的角色,在很多时候,当人们以为一项技术已经走到尽头的时候,Google会告诉你:错了,这才刚刚开始。

在Google未创立的时候,搜索引擎技术并没有为人们带来太多的便利,因为那时搜索引擎里垃圾信息泛滥,搜索“苹果电脑”可能第一个结果是某某男科医院的链接。后来,正如我们所知,Google带来了新的搜索技术,它能将垃圾信息抛到底部,让搜索者真正找到需要的信息。

在Gmail推出之前,很多人认为邮箱服务已经没有多少改进的空间了。然而,Gmail的推出打破了人们的想法。Gmail创新的会话机制让邮件更有条理;用户可以在Gmail里在线聊天,聊天记录会永久保存在Gmail里;以强大的搜索引擎为依托,Gmail能判断99%以上的垃圾邮件。

Google不但在互联网服务上革了旧技术的命,在软件、硬件上也如此。Google推出Chrome浏览器时,它是世界上最快的浏览器。Google还推出了开源的手机系统,让运营商能方便地打造自己的手机。

3、搜索中立的理念

Google认为,民主在不仅适用于真实社会,在互联网也适应。Google之所以要退出中国,原因不是它无法和百度竞争,也不是为了炒作自己提高知名度。实际上百度根本不是Google的对手,它也不需要再提高所谓的知名度。

真实的情况是,Google认为搜索引擎是中立的,审查应该是透明的。Google不愿意搜索引擎成为政治工具,它不愿意屏蔽某一方的观点,让事情变得不公正,不中立。中国政府表示拒绝政治化的Google,事实上Google今天拒绝的是一个政治化的互联网

Google会按照具体的法律规定,屏蔽证据充分的侵权信息。在美国,一切都是按照法律程序来走的。而在中国,政府对Google的要求显然超出了一个依法行事的企业的守则,因为在中国,审查是不透明的,没有法例明言的。所以它无法接受。

二、Google为什么要拖到现在退出?

在《宁为玉碎不为瓦全-为Google喝彩》的文章下面,有很多人留言说我傻、被Google欺骗了感情。也有人说Google欺骗他的感情,说了走又不走。

那篇文章发布于1月,距离现在已经2个月了。当时Google宣布打算退出中国,并希望与中国政府谈判。Google之所以没有马上退出,我认为有以下原因:

1、它希望能与中国政府达成协议,但政府拒绝没有审查机器的互联网,Google希望能更多地与中国沟通

2、Google中国不希望退出,极力反对这个决定

3、Google退出需要做很多善后工作,这需要一定的时间

我一直不屑于那些说我是白痴或傻逼的留言,因为我知道Google会给我们一个交待–这只是时间的问题。

事实上Google从来没说过要马上撤退,无论从商业角度考虑还是从员工的利益来考虑,Google有一万个不退出中国的理由。Google拖了这么久,最终决定退出,说明它已经尽了最大的努力,它希望留在中国,但中国政府容不下Google

Google在其官方声明里有这么一句:

最后,我们在此声明,所有关于本次事件的决定都来自于我们美国的管理团队,没有任何一个中国大陆员工可以或应该为此事承担责任。

Google希望它的决定不会让中国的员工受到政治打压。

三、Google的大多数服务依然能正常使用

很多用户担心Google退出中国后,很多服务将无法使用。实际上,Google是2006年正式进入中国的,在2006年之前,中国网民在大多数情况下都能正常使用Google的服务。google.com 是当时中国网民使用得最多的搜索引擎之一。

2006年,Google正式在中国设立分公司,并大力开展本地化工作。在06年-10年期间,Google中国推出了谷歌音乐、谷歌拼音输入法、谷歌导航、谷歌热榜等本地化服务,同时,Google中国优化了中文的搜索结果。最重要的是,Google中国推出了google.cn搜索服务,中国用户再也不需要担心在google.com上搜索某些关键词会导致网络被重置。

也就是说,Google退出中国,对用户带来较大影响的只是Google中国本地化团队推出的像谷歌音乐这样的服务。其它的,比如Gmail、Reader完全不受影响,因为这些服务本身并不是中国团队推出的,服务器也不在中国。搜索可以使用google.com,甚至可以使用google.co.uk和google.fr,不管是“哪个国家”的Google,都能完美地搜索各种语言,这其中当然包括中文。

对于倚靠Adsense作为主要收入的站长来说,他们依然可以投放Adsense广告,因为Google的广告团队没有退出,Google在中国依然有销售部门

而唯一让我担心的是,如果中国政府恼羞成怒,将”google.com”列为敏感词,屏蔽了所有Google的服务,那前面说的所有都不成立。我不能说中国政府不会走这一步,但我相信这不是说一说就能做的,这里要考虑的东西有很多。

四、中国政府口中的遵守法律根本毫无逻辑

Google一宣布退出,各大新闻网站就发布了通稿《国新办网络局就谷歌搜索退出中国内地发表谈话》,这篇通稿里重复了中国外交部、工信部、新闻办等多个部门一直一来倒背如流的话语:

外国公司在中国经营必须遵守中国法律。谷歌公司违背进入中国市场时作出的书面承诺,停止对搜索服务进行过滤,并就黑客攻击影射和指责中国,这是完全错误的。我们坚决反对将商业问题政治化,对谷歌公司的无理指责和做法表示不满和愤慨。

中国政府鼓励互联网发展和普及,促进互联网对外开放。中国互联网上的交流和言论十分活跃,电子商务等发展迅速。事实证明,中国互联网的投资环境、发展环境是好的。中国将坚定不移地坚持对外开放的方针,欢迎外国企业参与中国互联网发展,并为外商到中国经营发展提供良好服务。中国互联网依然会保持快速发展的势头。

事实上这段话看似逻辑严谨,但没有事实基础:

1、必须遵守的不是法律,是红头文件

我在《审查机器》里已经详细说明,中国没有那条法例规定哪些内容需要被过滤,审查是不透明的,网管办每天给Google下发审查的关键词名单。

2、中国首先将商业问题政治化

中国政府一直希望能将互联网“管”起来,并且将互联网开放视为“亡党亡国”的威胁。所以它很早就开始用各种政策来限制互联网的发展,比如备案制度、设立网管办,最为人所知的是建立中国网络防火墙。网络防火墙将所有中国政府“不喜欢”的言论全部屏蔽在外。

中国政府希望商业公司也能屏蔽它“不喜欢”的言论,如果商业公司不这样做,将无法在中国运营。是中国首先将商业问题政治化。

3、中国互联网并不开放

全球最大的3个web2.0网站:YoutubeTwitterFacebook,在中国均遭屏蔽,中国互联网的开放从何谈起?

4、中国互联网的言论十分活跃只是个传说

只要你搜索一下“该评论已关闭 site:news.163.com”就知道中国互联网的言论有多“十分活跃”了。

五、抹黑行动开始

接下来我们一定会看到这样的景象:

1、新华网、人民网、中国网等“官方新闻网站”会发布很多Google的负面社论

2、网易、新浪、搜狐等新闻网站关于Google的正面新闻一律不予刊登

3、网易、新浪、搜狐等新闻网站关于Google的新闻跟帖里肯定是一边倒支持政府的

事实上在Google宣布打算退出到今天正式退出期间,人民网发布了不少关于Google的社论:

又比如新华网,不少御用文人会发布抨击Google的社论,比如Google在全球演“闹”剧,这篇社论在新华网被删掉了,不知道为什么。

接下来的抹黑文章肯定会更多。Google从来都基于事实和数据说话,从来不抹黑中国,而中国却起用五毛党来捏造事实,轰击Google。是谁小气,是谁下流,一目了然。

我不是说所有说Google不好的都是五毛党,但要对对象进行抨击,首先要有事实依据,空口说大话只会带来国际笑话

光靠五毛党引导舆论是不行的,这种老掉牙的方式在网民智商比猪还高的时代已经行不通了。在人人网,网友自发给“小谷哥哥”送礼物:

六、中国互联网的倒退

Google在一定程度上代表着先进技术的前进方向,它的退出对中国互联网来说,是一种倒退。

中国互联网普遍缺乏创新,说是人的原因也好,国情的原因也好,事实就是那样摆在眼前。就经济和技术发展方面来看,中国不应该让Google离开。

Google离开中国,其在中文搜索上的改进力度必然会降低。另一方面,由于Google不接受审查,它可能在中国无法访问。可以想象,百度将有可能占有更高的市场份额。其它的本来份额就不大的搜索引擎其实不会有太大的机会来分享Google的份额,强者愈强的道理在哪个领域都适用。

我担心的是,假如百度失去了在中国市场上的唯一对手,它在技术上的改进是否会减缓、搜索质量是否会降低。对于一个运动员来说,没有对手是很可怕的,因为他将没有追求,没有目标。百度本身在技术上的创新并不多,Google的离去有可能让它将重点完全偏移到营销上,为了获取更多的利润而降低搜索质量,可能搜索结果里会出现更多的虚假广告

Facebook, Twitter, Google等一大批具有划时代意义的互联网企业,具备的是一种自上而下的创新精神,他们不是在固有模式下创新,而是打破旧的框架,创造一种新的模式–不管是商业模式还是运作模式。这正好是中国互联网企业所缺乏的。Facebook和Twitter均没有打入中国市场,Google打入了,却被赶走。创新被政策赶走,这不仅仅是中国互联网的损失

在中国,做站长是悲哀的

七、外企或远离中国

中国的市场看起来很吸引,但并不适合所有外企,尤其是互联网外企。

中国政府目前正加紧在互联网方面的国有投入,中国网络电视台的建立、个人建站需要办理烦琐的手续……都可以看作是中国互联网国进民退的标志。

在一个市场化不彻底,而且政策越来越收紧的领域,外企必定会慎重考虑进入中国互联网市场的可能性。Google的退出给了这些外企极大的警示。

而面对这样的局面,政府部门是否应该仔细考虑,无形的手是否毛手毛脚动作太多了点?

别以为中国有10多亿的市场就很了不起,不是所有人都愿意放下尊严来中国投资。

八、不仅仅是鼓掌

除了为Google喝彩,为Google鼓掌,我还能做什么?

在写这篇文章的时候,我一直在问自己这个问题。

我告诉我自己,要继续写博客,要继续输出价值观,要继续批判那些无理的政策,要继续揭露那些丑恶的谎言。

一家商业公司可以为了尊严,而放弃可能潜力无穷的市场,这种信仰深深地打动了我,这就是正义。

这篇文章有可能导致可能吧被封,但又有何足惜?我宁愿站在外面被雨淋,也不愿意蹲在只有我身体1/3高度的屋檐下。我热爱自由,我从来没说过要推翻什么,事实上我没有这个能力,我只是,热爱自由。

九、题外话:为什么google.cn一直没有登录入口?

很多人都留意到,以前google.cn的右上角是没有“登录”链接的,而google.com.hk或google.com等都有登录入口,为什么?

存放在google.cn下的谷歌音乐能保存用户的播放列表,但这些列表不能保存到用户的Google帐户下,只能使用人人网、MSN、Yahoo、蝌蚪网等帐号登录保存,为什么?

这是因为Google认为它在中国无法保护用户的隐私

因为它知道中国是一个按照领导想法运行的国家,用户的隐私无法得到实质性法律的保障。它不愿意存储用户的隐私数据。

所以我们能看到,以前的Google.cn上没有任何一个页面有登录入口,一旦google.cn保存用户的数据,政府就有权(不管是依法的,还是强行的)查看这些数据。

有人抱怨Gmail访问速度慢,为什么Google不在中国摆放邮件服务器呢?和不在google.cn设置登录入口一样,因为它不能确保用户的资料安全,它不能确保用户的资料只有在合法的情况下才被查看。你知道,公安们在机房搬走一台服务器几乎不需要任何法律文件的授权

Continue reading...


 

最近好烦~~ 03月 22nd, 2010

edward

事情怎么那么多!!!
简历,播放器项目,小车的项目,串口编程烦死了。还有ARM,e~~
播放器国际化和皮肤制作更烦人。
低版本的gtk竟然不支持透明窗体,e~~
阿!!!!
FUCK

Continue reading...


 

意大利语入门教程 CIAO! (第二课) 03月 12th, 2010

edward

此文转载自http://www.june29.com/Italian/
我会将此系列的文章翻译成中文,献给和我一样正在学习意大利语的朋友
转载请注明英文原文出处


意大利语课程2

欢迎来到我的网络意大利语课程的第二课。如果这是你第一次访问这门意大利语课程,请查看
第一课 以了解这门课程和意大利语的简介。

第二课 – La Casa (the house)

这星期的生词:

名词

  • la casa – 房子
  • la cucina – 厨房
  • la stanza – 房间
  • il bagno – 盥洗室
  • la tavola – 桌子,板子
  • il tavolo – 桌子
  • la parete – 墙
  • il muro – 墙
  • la porta – 们
  • la sedia – 椅子
  • il telefono – 电话
  • la televisione – 电视
  • la finestra – 窗子
  • 动词

  • stare – to stay (seldom, to be)
  • essere – to be
  • 介词

  • di – of (属于, 某些时候相当于英语中的 from)
  • da – from
  • in – in (something)
  • 形容词

  • antipatico(-a) – 不愉快的
  • carino(-a) – 可爱漂亮的
  • buono(-a) – 好的
  • comodo(-a) – 舒服的
  • contento(-a) – 高兴的/令人愉悦的
  • malato(-a) – 病的
  • brutto(-a) – 丑陋的
  • grande – 大的
  • pulito(-a) – 干净的
  • cattivo(-a) – 坏的、不好的
  • nervoso(-a) – 紧张的
  • simpatico(-a) – 有同情心的(人,情况)
  • sporco(-a) – 脏乱的
  • tranquillo(-a) – 冷静的,安静的
  • vecchio(-a) – 老的
  • 数字 11-99

  • 11 undici
  • 12 dodici
  • 13 tredici
  • 14 quattordici
  • 15 quindici
  • 16 sedici
  • 17 diciassette
  • 18 diciotto
  • 19 diciannove
  • 20 venti
  • 21 ventuno
  • 22 ventidue
  • 23 ventitre
  • 24 ventiquattro
  • 25 venticinque
  • 26 ventisei
  • 27 ventisette
  • 28 ventotto
  • 29 ventinove
  • 30 trenta
  • 40 quaranta
  • 50 cinquanta
  • 60 sessanta
  • 70 settanta
  • 80 ottanta
  • 90 novanta
  • 颜色

  •  bianco(-a) – white
  •  giallo(-a) – yellow
  •  arancione – orange
  •  rosa – pink
  •  rosso(-a) – red
  •  azzurro(-a) – blue
  •  verde – green
  •  marrone – brown
  •  grigio(-a) – grey
  •  nero(-a) – black
  • 发音

    大多数意大利语字母和英语字母发音很像。但这节课的生词中也有一些不规则的字母发音。

    c, ci, ch

    意大利语中 c 有2种可能的发音。 It can
    sound like the ch in chip, or like the k in
    kite
    . Unlike English, there are very strict rules about when
    the Italian c sounds like a ch or a k. If the c precedes (comes
    before) an e or an i, the c will have a ch sound. For example,

    undici.
    If the group ci precedes an a, o or u, it is also pronounced as
    ch AND the i is mute : ciao sounds as English chao.
    If the c precedes any other letter (a, o, u, or a
    consonant, although the latter is very rare), then it will have a k sound, as in comodo.

    If the group ch precedes an i, or an e, it is pronounced as
    k : chi sounds as English kee.
    The word cucina has both types of c in it – the first c
    makes the k sound, and the second c makes the ch

    sound.

    g, gi, gh

    The Italian g has 2 possible sounds. It can
    sound like the g in got, or like the j or dg in

    judge.
    The rules are similar to the ones described above for c. Thus getto is
    pronounced as English jet-toh, and gioia as English joy-ah.
    While gotto and ghetto are pronounced as English got-toh and

    get-toh.

    j y

    In Italian j and y are not used, and when they occur (in foreign or
    arcaic words), they are pronounced as an Italian i.

    w

    In Italian w is not used, and when it occurs (in foreign words),
    a native Italian would pronounce it as a v.

    rr and all other double consonants.

    All times a double consonant is written, it is actually pronounced twice. It takes practice to do it well.

    v

    Sounds exactly like in English.

    s

    The Italian s may have two pronounciations. One of them is like English z or
    s : rosa is pronounced similarly to English rose with a terminal ah. The
    other one is like English s e.g. in set : sette is pronounced like

    set-teh. There are no definite rules on two pronounciations (although some dictionaries
    report the “correct” one), and there are regional variations in the pronounciation of the same word.
    In general you will be understood, even if your pronounciation may sound strange. As a rule of thumb,
    s followed by vowel in the second or further syllable of a word, has the z sound
    (e.g. rosa, casa), while s followed by vowel or consonant (usually t or p)
    at the beginning of a word is an s sound : sette, stare.

    z

    The Italian z is pronounced much harder than an English, like sound ts, or
    tz, like in word tzar. There are actually two variant of the z sound
    in Italian, which are marked in dictionaries, but are subject to regional variations and make little
    difference for the everyday speaker.

    Two (not so) confusing verbs – essere and stare

    If you have already read the New Words section, you probably noticed that the
    two verbs introduced this week sometimes may mean both “to be”. In fact however
    essere is the proper verb corresponding to “to be”. Stare means “to stay”, and is
    used where an English speaker would expect to use “to be” only in two cases. Confusing the
    two verbs is proper of popular speech in Southern Italy but feels somewhat uncouth.

    Verb Conjugation

    As in English, verbs are conjugated, or take various forms, in Italian. In
    the present tense, there are 6 verb forms (“persons”), depending on who the subject
    of the verb is. Here are the conjugations for essere and stare:

    essere – to be

  • io sono (“I am”)
  • tu sei (“you are”)
  • Lei /egli (lui) /ella (lei) /esso(-a) è (“you (formal)/he/she/it is”)
  • noi siamo (“we are”)
  • voi siete (“you (plural) are”)
  • Loro/essi(-e)/loro sono (“you (old formal plural)/they (things and persons)/they (persons) are”)
  • stare – to stay

  • io sto (“I stay”)
  • tu stai (“you stay”)
  • Lei /egli (lui) /ella (lei) /esso(-a) sta (“you (formal)/he/she/it stays”)
  • noi stiamo (“we stay”)
  • voi state (“you (plural) stay”)
  • Loro/essi(-e)/loro stanno (“you (old formal plural)/they (things and persons)/they (persons) stay”)
  • Note that the conjugations for Lei (you), egli (he),

    ella/lei (she) and esso(-a) (it) use the same form of the verb. The same goes for their
    plurals (though the singular and the plural use different forms).

    * – You will note there are formal and familiar forms for the second person, unlike English where forms like
    “thou” are in disuse. It is important to use the proper one otherwise you’ll look uneducated.
    In the singular form you use tu when addressing to a relative, a friend, a colleague or a child.

    It is felt uneducated and unkind to use tu when addressing a person you do not know. In such cases
    the form now preferred in modern Italian is Lei (literally, she, and verbs are conjugated like
    in the third person singular). I’ll write this Lei with a capital L to make it clear. This is not
    necessary, although it is used e.g. in commercial letters. Note that the feminine form is used also when
    addressing to men : this is because “she” is “your Lordship” and the word Lordship in Italian is of feminine
    gender. In the popular speech in Northern Italy this is felt strange, and sometimes you’ll hear Lui
    (literally, he) as a courtesy form for “you” when addressing a man. This usage is not recommended.

    Another courtesy form used to address a person instead of tu is Voi (literally, “you”,
    i.e. the plural form, like in English, and using the same conjugation of the plural form). This form is
    felt somewhat archaic (it might be used in the South or in the countryside, and was favoured by the
    Fascist regime).

    In the plural, nowadays use goes for voi both as a familiar and as a formal form. You would sound
    unusually formal, if you’d use Loro (literally, they) when addressing more than one
    persons. However sometimes it is used.

    I will include
    with all verb conjugations all the 6 main forms.

    A further note regarding the third person. Egli and ella, for he and she, are literary
    forms, which in spoken Italian are usually replaced by lui and lei (literally him and
    her). These are the masculine and feminine forms for persons. Esso and essa are the
    forms for “it”, and have a masculine and feminine form according to grammatical gender of the noun of the
    thing to which they refer. In the plural, essi and esse are respectively the masculine
    and feminine form for “they” for persons and things. However nowadays spoken Italian prefers loro

    (literally, them) for persons.

    Now that you have this pretty little conjugation, what does one do with it?
    Make sentences, of course. The conjugation of a verb tells you which form of
    the verb to use depending on who is the subject of the verb. In English we
    conjugate without thinking about it – I am, you are, he
    is, etc. You don’t (normally) say “I are” or “you is”, because it’s
    gramatically incorrect. Likewise in Italian, you don’t say “io sei“,
    because it’s just plain wrong. Here are some examples of using essere
    and stare:

  • Io sono vecchio. (“I am old.”)
  • Tu sei carina. (“You are pretty.”)
  • Noi siamo nervosi. (“We are nervous.”)
  • Lei sta sulla sedia. (“She is on the chair.”) Note that
  • Lei e’ seduta. (literally “She is seated”) is the form for “She is in the chair.”
  • Essi sono sporchi. (“They (the males) are dirty.”)
  • Now it’s time to explain the differences between essere and stare,
    before we go any further. Essere means “to be” or “to exist”, while stare usually means
    “to stay” but can be used where English idiomatics use “to be”. The rules are
    summarized here:

    essere is used to indicate more permanent aspects of people or things, such as -

    1. Identity – Io sono Carla. (“I am Carla”)
    2. Profession – Egli è un professore. (“He is a professor.”)
    3. Origin – Noi siamo di Milano. (“We are from Milan.”)
    4. Religious or political affiliation – Tu sei cattolico?(“You are Catholic?”)
    5. Time of day or date – Sono le otto. (“It is 8 o’clock.”)
    6. Possession – La casa è di Giovanna. (“It is Giovanna’s house.”)
    7. Nationality – Sono Italiano. (“I am from Italy.”)
    8. Physical aspects or characteristics of something – Le sedie sono
      verdi.
      (“The chairs are green.”)
    9. Essential qualities of something or someone – Sono vecchio. Sei
      antipatico.
      (“I am old. You are unpleasant.”)
    10. Location – La sedia è in cucina. (“The chair is in
      the kitchen.”)
    11. but also, more rarely – La sedia sta in cucina. (“The chair is in
      the kitchen.”)
    12. Condition or emotion that is subject to change – Sono malato.(“I am sick.”)
    13. Personal observations or reactions, how something “seems” or “feels” -
      La cucina è pulita. (“The kitchen is (seems) clean.”)

    stare is used to indicate precise locations, in idioms and as auxiliary, such as -

    1. Idiomatic sentences – Sto bene.(“I am well.”)
    2. Idiomatic sentences – Sto male.(“I feel bad.”)
    3. Location – La sedia sta in cucina. (“The chair is in
      the kitchen.”)
    4. Continuous tense – Sto correndo.(“I am running.”)

    Notes: Notice that the verb form used for things like la sedia is
    the egli/ella/esso(-a) form. A chair is an “it” (below, you’ll see
    that it’s actually a “she”), which uses the egli/ella/esso(-a)

    form of the verb. Also notice that you can make sentences like Sono Italiano,
    without including the pronoun. To English speakers this may seem
    like saying “Am from Italy”, which we would never do, but in Italian, because
    the subject can be figured out by the form of the verb used (since
    the sentence used sono, the subject must be io, or I), there
    is no confusion about who the subject of the sentence is and the pronoun can
    be left out. If it would be unclear what the subject of the sentence is, then
    the pronoun has to be included.

    The above lists of when to use essere and stare have to be
    memorized – using them incorrectly means you will be less likely to be
    understood, and people will definitely know you are not a native speaker. The
    same goes for the conjugations of essere and stare. Every
    Italian verb has a conjugation, and memorizing them just goes along with
    learning the language.

    Il, lo, la, un, uno and una (definite and indefinite articles)

    In Italian, as well as all the other Romance languages (French, Spanish, etc),
    all nouns have a gender associated with them. “Chair” is feminine, “telephone”
    is masculine. The way to tell whether a noun is masculine or feminine is to
    look at the il/lo or la that precedes the noun in the New Words
    section of these lessons. Il is the definite article that
    corresponds to masculine nouns – il professore, il telefono.
    La is the definite article that corresponds to feminine nouns – la
    casa, la tavola, la finestra
    . Whether a noun is considered feminine or
    masculine is generally based on the last letter of the noun. If the noun ends
    with an “a”, as in sedia or cucina, then it is most probably
    a feminine noun. If it ends with an “o”, such as muro

    or orologio (wristwatch), then it is always a masculine noun. Exceptions
    do exist to this rule – poeta (poet) is masculine
    - but the majority of Italian nouns behave normally. Nouns ending with an “e”, can be masculine or
    feminine, usually according to the meaning (like padre (father) and madre
    (mother) – but e.g. parete is feminine). The
    exceptions just have to be memorized as you come across them.

    When using nouns, you must make sure that you use the correct gender and number
    when using an identifier. The identifiers are il, lo, la, i, gli, le, un, uno
    and una. Il, lo and la are
    singular definite articles, which means you are talking about a

    specific thing. La sedia means “the chair” – you
    are talking about a specific chair. Un, uno and una are

    singular indefinite articles, which means you are taking about
    any member of a group of things. Una sedia means “a
    chair” – you are talking about any chair in general. The use of these
    identifiers is identical to the way you would say it in English – if you want
    to say “a table”, use una, and if you want to say “the table”, use
    la. i and gli are the plural of il and lo, and le is
    the plural of la. You use these plural definite articles

    when you are talking about several specific members of a group – i
    tavoli
    means “the tables”. There are no
    plural forms of uno and una, and to translate
    “some” when used in sentences, one must use indeterminate pronouns -
    dei tavoli means “some tables”.

    Note however that for uncountables nouns, where English uses no article (“Wine is red”),
    Italian will use an article (Il vino e’ rosso).

    You may wonder why there are two forms for the masculine articles (il and lo,
    and their plurals i and gli, as well as un and uno). The
    first form is used when a noun begins with a consonant (il telefono), the second
    form is used when a noun begins with a vowel (un Italiano), or with s followed by a consonant,
    or with z, gn, ps or x.

    As a further complication, if a (masculine or feminine) noun begins with a vowel, the articles
    lo and la) are not written in full form (Lo Italiano, “the Italian man”, or
    “Italian language”) unless a new line
    starts across the two words, but in abbreviated form (L’Italiano) separated by an
    apostrophe. The apostrophe means something has been elided (left out). Even trickier (but this
    is how one recognizes who knows Italian !), with indefinite articles, the apostrophe is needed
    only for the feminine form (since for the masculine one REPLACES uno with un which
    is a valid existing form, thus : un Italiano (“an Italian man”) but un’Italiana

    (“an Italian woman”).

    Here are some examples using these articles:

  • Le stanze sono grandi. (“The rooms are big.”)
  • Delle sedie sono in cucina. (“Some chairs are in the kitchen.”)
  • Il telefono è verde. (“The telephone is green.”)
  • La parete è brutta. (“The wall is ugly.”)
  • Di, da and in

    Di is Italian for of (or from, in the way sometimes used in English).
    La casa di Teresa means
    “Teresa’s house” (literally, “the house of Teresa”). Sono di Milano
    means “I am from Milan”. Di is used most often to show posession or
    origin, as per the preceding examples. When di is followed by an

    il, as in la casa di il professore, the di and il
    are combined into del. So the only and correct way to say “The (male)
    professor’s house” would be la casa del professore.

    Da is Italian for from, in all cases this indicates a motion. Since we haven’t
    seen any verbs of motion, we can’t make examples yet.

    In is Italian for … in, as in inside something (not necessarily inside
    a physical object). It can be used to mean that something is inside something
    else, as in la sedia sta in cucina (“the chair is in the
    kitchen”), or that someone is somewhere, Marco è in
    Italia

    (“Mark is in Italy”).

    Adjectives

    Agreement

    Adjectives are words that describe things, words like “red”, “fast”, and
    “pretty”. In English, there isn’t much to using adjectives because they never
    change – “the fast car” or “the cars are fast”. In Italian, the adjective
    has to agree, in both gender and number, with whatever it is
    describing. If the adjective modifies a feminine noun, then the adjective uses
    a feminine ending. If the adjective modifies a masculine plural noun, then the
    adjective uses a masculine plural ending. Here are some adjectives with their
    various endings:

    carino – pretty

  • singular masculine – carino
  • singular feminine – carina
  • plural masculine – carini
  • plural feminine – carine
  • comodo – comfortable

    • singular masculine – comodo
    • singular feminine – comoda
    • plural masculine – comodi
    • plural feminine – comode
    brutto – ugly

    • singular masculine – brutto
    • singular feminine – brutta
    • plural masculine – brutti
    • plural feminine – brutte
    sporco – dirty

    • singular masculine – sporco
    • singular feminine – sporca
    • plural masculine – sporchi
    • plural feminine – sporche
    bianco – white

    • singular masculine – bianco
    • singular feminine – bianca
    • plural masculine – bianchi
    • plural feminine – bianche
    nero – black

    • singular masculine – nero
    • singular feminine – nera
    • plural masculine – neri
    • plural feminine – nere

    The above rules are good for any adjective that ends in an -o or -a. Adjectives
    like grande and verde, that end in -e, do not
    have separate masculine and
    feminine forms and make plural in -i. So, you would say la stanza e’ grande (“the room is
    big”), and il muro e’ grande (“the wall is big”), as well as le sedie
    sono grandi
    (“the chairs are big”). There are exceptions to this
    rule, but that will be addressed in another lesson.

    Placement of adjectives

    In Italian, adjectives generally (poetry is different !) go after the noun they are describing. For
    example, il telefono rosso (“the red telephone”), and le professoresse vecchie
    (“the old (female) professors”). If you want to say
    that “something is something”, then the sentence structure is the same
    as in English, using the correct forms of essere:
    il telefono è rosso (“the telephone is red”);

    le professoresse sono vecchie (“the (female) professors are old”).

    Numbers 11-99

    The numbers 11-16, like the numbers 1-10 in Lesson 1, have slightly irregular forms -
    however they follow some patterns,
    much like they do in English. 17-19 follow another pattern. Eleven is undici, which is
    actually a contraction (shortening) of uno e dieci, or “1 and 10″.
    Seventeen is Diciassette, or “10 and 7″, and so on. Much like the
    “teens” in English – fourteen, fifteen, sixteen,
    seventeen, etc.

    Twenty in Italian is venti. Twenty-one is ventuno
    (a contraction of venti e uno or “twenty and one”), 22 is
    ventidue (“twenty and two”), and so on. Thirty is trenta,
    31 is trentuno, 38 is trentotto (“thirty and 8″). This
    pattern holds for all of the numbers 11 through 99 – first learn the base
    (such as venti (“twenty”), quaranta (“forty”), or

    ottanta (“eighty”)), then to make numbers in-between the bases,
    add the word for the second number
    onto the end (ventidue (“twenty-two”), quarantacinque
    (“forty-five”), ottantanove (“eighty-nine”)). If two vowels meet, the first
    one is dropped like in vent(i)uno (“twenty-one”). Isn’t that easy?

    Examples

    Here are some examples of sentences you can now make, using the words and
    grammar from these 2 lessons:

    • Sono di Milano
    • Tino è in cucina.
    • La signorina è carina.
    • Tu sei antipatico.
    • La sedia è comoda.
    • Milano è in Italia.
    • Il professore vecchio è malato.
    • Il telefono verde è sporco.
    • Il bagno è in casa.
    • La casa di Maria è arancione. (what a funny colour ?)

    Here are the translations for these
    sentences.


    That’s the end of Lesson 2. As always, feel free to mail me questions,
    comments, or corrections on this or any of the Lessons. Believe me, I’m
    starting to get a new appreciation for teachers through my work with this.

    original Spanish lesson by Tyler Chambers, 6-27-94
    refurbished for Italian by Lucio Chiappetti, lucio@ifctr.mi.cnr.it,
    09-09-94

    Copyright Lucio Chiappetti 1994.

    Continue reading...


     

    一起来Hello World! 03月 4th, 2010

    edward

    几乎成了一个定式,学习每种语言的教程第一个例子都是hello world,今天突发奇想,搜集了各式各样的hello world,和大家一起重温快乐的学习时光。


    8086 Dos环境汇编:

    SSEG SEGMENT PARA STACK 'stack'
    SSEG ENDS
    
    DSEG SEGMENT
        message db 'Hello,World',13,10,'$'
    DSEG ENDS
    
    CSEG SEGMENT
        assume  cs:CSEG , ds:DSEG, es:DSEG, ss:SSEG
        INIT PROC
            mov ax ,dseg
            mov ds , ax
            mov es , ax
           ret
        INIT ENDP
    
        MAIN PROC
           call INIT
           mov dx,seg message
           mov ds,dx
           mov dx,offset message
           mov ah,9h
           int 21h
           mov ax, 4c00h
           int 21h
        MAIN ENDP
    CSEG ENDS
    
    END MAIN
    

    Basic:

    PRINT "hello world!"
    

    PASSICAL:

    program Hello;
    begin
        writeln('Hello, world!');
    end.
    

    C语言:

    #include<stdio.h>
    int main()
    {
        printf("%s\n","hello world!");
        return 0;
    }
    

    C++:

    #include<iostream>
    int main(void)
    {
        cout<<"hello world!"<<endl;
        return 0;
    }

    Java:

    class helloworld
    {
        public static void main(String[] args)
        {
             System.out.println("Hello World!");
        }
    }
    

    Bash:

    echo "hello world!"
    

    Perl&Python:

    #/usr/bin/python
    print "Hello World!";
    

    Ruby:

    #/usr/bin/ruby
    puts "Hello, world!"
    

    PHP:

    <?PHP
    echo "Hello World!";
    ?>
    

    HTML:

    <html>
    <head>
        <title>Hello World</title>
    </head>
    <body>
        <h1>Hello World!</h1>
    </body>
    </html>
    

    JavaScript:

    alert("Hello, World!");
    

    English:

    Hello World!
    

    Continue reading...


     

    手机坏了 03月 3rd, 2010

    edward

    前天手机莫名其妙的乎坏了,功能正常,屏幕无法显示,应该是排线断了。

    昨天下午就拿去手机店修了,那人说这个手机的排线很难找,有可能找不到。

    今天刚去,那人又没在,等了半个多小时,说排线买回来了,装的时候才发现,型号居然买错了,我的手机的是D636,他买了个D736,狂汗!!

    今天晚上打电话问问能不能修好,修不好的话就只有换手机了。。。

    杯具阿!!!!!!!!!!!!!!!!!


    更新(3月11日)
    不能修了,只有再买一个…

    Continue reading...


     
    BLOG.CD