Articles

iMessage 显示「尚未送达」但是对方已经收到信息?

iMessage Not Delivered but Read?
To fix this issue, open iMessage on you Mac and then click “Preferences – Accounts – Accounts Details… – Sign Out – Sign In again”. If it still not work,sign out all of iMessages on your devices.

这个问题困扰我好几天了,中文果然搜不到什么东西,用英文一搜就搜出了解决方案。iMessage 显示「尚未送达」但是实际上对方已经收到信息,有时候刚开始正常显示「已送达」,过了一小会马上出现红色感叹号提示「尚未送达」了,还有时候「已读」和「尚未送达」两种状态同时显示在一条信息后面,这个时候,只需要登出电脑端的 iMessage 账户然后重新登录就可以了这个还「真」是个 Beta 版本。

Posted in Life | 生活 | 11 Comments

Articles

歌に形はないけれど ピアノver.



ありがとう!私はこのギフトを好む!

Posted in Life | 生活 | 2 Comments

Quotes

为什么 CSS 选择器是从右往左的?

很多人可能都知道了 CSS 的选择器浏览器在解析的时候是从右往左的,和你所熟悉的从左往右的规则是不同的。但是这是为什么呢?这么做的性能是否更高?

Related Items:
为什么排版引擎解析 CSS 选择器时一定要从右往左解析?

Keep in mind that when a browser is doing selector matching it has one element (the one it's trying to determine style for) and all your rules and their selectors and it needs to find which rules match the element. This is different from the usual jQuery thing, say, where you only have one selector and you need to find all the elements that match that selector.

If you only had one selector and only one element to compare against that selector, then left-to-right makes more sense in some cases. But that's decidedly not the browser's situation. The browser is trying to render Gmail or whatever and has the one it's trying to style and the 10,000+ rules Gmail puts in its stylesheet (I'm not making that number up).

In particular, in the situation the browser is looking at most of the selectors it's considering don't match the element in question. So the problem becomes one of deciding that a selector doesn't match as fast as possible; if that requires a bit of extra work in the cases that do match you still win due to all the work you save in the cases that don't match.

If you start by just matching the rightmost part of the selector against your element, then chances are it won't match and you're done. If it does match, you have to do more work, but only proportional to your tree depth, which is not that big in most cases.

On the other hand, if you start by matching the leftmost part of the selector... what do you match it against? You have to start walking the DOM, looking for nodes that might match it. Just discovering that there's nothing matching that leftmost part might take a while.

So browsers match from the right; it gives an obvious starting point and lets you get rid of most of the candidate selectors very quickly. You can see some data at http://groups.google.com/group/mozilla.dev.tech.layout/browse_thread/thread/b185e455a0b3562a/7db34de545c17665 (though the notation is confusing), but the upshot is that for Gmail in particular two years ago, for 70% of the (rule, element) pairs you could decide that the rule does not match after just examining the tag/class/id parts of the rightmost selector for the rule. The corresponding number for Mozilla's pageload performance test suite was 72%. So it's really worth trying to get rid of those 2/3 of all rules as fast as you can and then only worry about matching the remaining 1/3.

Note also that there are other optimizations browsers already do to avoid even trying to match rules that definitely won't match. For example, if the rightmost selector has an id and that id doesn't match the element's id, then there will be no attempt to match that selector against that element at all in Gecko: the set of "selectors with IDs" that are attempted comes from a hashtable lookup on the element's ID. So this is 70% of the rules which have a pretty good chance of matching that still don't match after considering just the tag/class/id of the rightmost selector.
Boris Zbarsky
Posted in Skill | 技术 | 4 Comments

Articles

25岁

25岁

有人出生,有人死去。遇见一些人,错过一些人。高兴,悲伤。3/29,我,二十五岁。

Continue reading

Posted in Life | 生活 | 9 Comments

Articles

一键快速越狱并且更换你的 Kindle Touch 字体 (5.0.1 / 5.0.3 / 5.0.4 / 5.1.0)

继上篇文章里说的,我买了 Kindle Touch 也已经有一个礼拜了,由于工作很忙一直没怎么去折腾。但是只要你用过 Kindle Touch 看过中文书,你就会发现一个相当严重的问题,中文字体粗细不一,对于阅读来说真是一个灾难。当然有些人也可能会觉得没什么,但至少对于我来说真是完全没法接受。看英文电子书倒是无所谓,英文字体显示那是相当美观。

幸运的是在我拿到我的 Kindle Touch 的那天,Kindle Touch 已经顺利被破解越狱了。越狱也就意味着我可以随意对系统进行 Hack,当然也可以更换字体。破解的原理我就不仔细说了,你们可以去看 Yifan Lu 的文章。需要一提的是,越狱所使用的文件是 jailbreak.mp3 ,当然这是一个披着 MP3 外衣的伪装的破解脚本 :)

网上越狱的教程很多,为什么我又要啰嗦写一遍呢?因为大部分的教程所涉及到很多东西比如 SSH,比如安装 USBnet等等,这些可能你根本就不需要去做,你并不想去修改系统文件做一些 Hack,你仅仅只是想改个字体而已,那么,我下面所提供的方法将会是最简便且最适合你的。

需要注意的是写这篇文章的时候系统最新的版本是 5.0.1,所以你接下来看到的都是关于 5.0.1 的用 MP3 进行越狱的方法。如果想要了解最新版本系统的越狱方法请点击下方的几个链接进行跳转:

Kindle Touch 5.0.1 系统越狱以及字体更换

  1. 下载我所提供的 Kindle Touch 越狱字体一键包(分流下载地址一分流下载地址二)
  2. 解压刚才下载的文件。然后用数据线连接你的 Kindle Touch 和电脑。拷贝解压出来的一堆文件到连接电脑后出现的 Kindle 磁盘(注意不要直接把「Kindle Touch 越狱字体一键包」文件夹拷贝到根目录)。
  3. 退出U盘连接模式,断开连接。在 Kindle Touch 主画面依次点击 Menu – Experimental – MP3 Player,这时你会看到音乐播放界面出现了一个 Press to Jailbreak 的按钮,毫不犹豫地去点击吧。Press to Jailbreak!
  4. 机器在几次自动重启黑屏或者说是画面切换之后,当再次回到主界面的时候你会发现字体已经更换好了。当然你的 Kindle Touch 也已经是越狱状态(我的机器不会自动回到主界面,而是在点击越狱后重启并进入了锁屏屏保模式…)。
  5. 下次希望更换字体只需要修改fonts下的字体文件即可,用你希望替换的字体重命名为文件夹里的那些然后覆盖。

Continue reading

Posted in Life | 生活 | 139 Comments

第一次 Amazon 海外购物记

从来没有在海外的网站购物过,主要原因是收货的问题,在我不知道转运快递之前,我对此是束手无策。趁着前段时间 Amazon 刚发布了第四代 Kindle 之际,我准备尝试一下直接从海外购物,不找代购,也不去淘宝买现货,虽然我知道海外购可能需要花费较长的时间才能收到货,可是为了以后更多次的在海外购物,所以就这次练练手,纯粹长长经验。

在 Google 搜索「海外购 Kindle」或者「Kindle 转运」之类的关键词你会搜到很多的相关教程,如果你无从下手,搜索肯定是你最好的老师。这些教程大部分都是针对某个特定的转运快递的,比如天翼快递百通快递这些。这两个名气比较大用的人也比较多,百通的口碑似乎稍微差些,入库以及清关等都比较慢,你可以搜到很多别人对于百通的牢骚,我这里就不一一述说了。所以最终我准备选用天翼,因为据 sofish 同学说,他用了11天就收到货了。11天算短还是算长对于海外购经验为0的我来说还真是一个陌生的数字。不过至少是一个心理可接受的数字,而且被税的概率据说很低。不过…正当我准备注册一个天翼快递帐号的时候,被无情的告知「因年底货量增大,为确保服务质量,暂停新用户注册,具体开放日期将另行公布! 」我还真是赶上了一个「好」时候啊!作罢,换家转运公司呗,反正有那么多。

其实那时候我还没有决定好到底是买 Kindle 4 还是 Kindle Touch,外观角度来讲我比较喜欢 Kindle Touch,只有一个按键,十分简洁而且可以触屏操作,虽然并不是现在智能手机的那种电容屏触屏而是选用的红外触屏。于是去多看论坛看相关评测的时候发现了一个海外购物经验贴。帖子作者花费了 $99 的 Kindle Touch 费用加上 $3.5 的转运费用,以及10天的路程耗时,我觉得这个转运还挺靠谱的,并且运费还挺便宜,于是咨询了一下是哪家转运公司。估计一开始是担心用的人太多导致服务变成和百通那般烂帖子作者并没有透露是哪家,后来顶贴的人太热情,终于公开是使用的是瑞天快递

接下来我就简单说说我的购物过程吧。打开瑞天快递的官网,然后注册一个帐号。需要注意的是,瑞天快递这货注册时候的密码居然是明文保存的!!结合最近闹得这么凶的黑客爆库事件,所以我提醒大家注意不要使用自己的常用密码。
Continue reading

Posted in Life | 生活 | 58 Comments

Page 1 of 341234567...34