Google Drive server rejected files uploaded in Windows

Google Drive server rejected file uploaded in Windows
Google Drive server rejects file uploaded in Windows

我发现在 Windows 下我无法上传文件到 Google Drive。我用的是 FireFox,提示的错误信息是 “Server rejected”。一开始我以为是 Google Server 停摆了,但转用 Fedora 下的 FireFox,一切正常。我不信邪,又在 Windows 下尝试上传各种后缀的文件,.jpg, .doc, .pdf 都试过了,全部失败。

我很少在 Windows 下操作,也不知道这个问题存在多久了。难道是 Google 跟 Microsoft 叫劲,给 Windows 用户一点颜色看看?我觉得 Google 不至于干损人不利己的事,但我不确定。于是我试图改变 Windows 下 FireFox 的 User Agent,在 about:config 里新建了一个名为 general.useragent.override 的字串,值为 Mozilla/5.0 (X11; Linux x86_64; rv:20.0) Gecko/20100101 Firefox/20.0。

Custom FireFox user agent
Custom FireFox user agent

这样 FireFox for Windows 看上去象 FireFox for Linux 了。

Forged user agent
Forged user agent

可是,Google Drive 依然是 “Server rejected”。证实 Google 并没有区别对待 Windows 用户。

接着,我继续研究了一下 FireFox 无法上传文件的原因,看来是多账户登录 Google 后的偶然结果。有人说是无法上传至默认账户以外的账户,但我亲自试了一下,这个说法也不准确。看来不要在这个问题上过于纠结,清空一下浏览器历史,一切都正常了。

Why does screen scroll for no reason?

近段时间用电脑上网,网页自动滚屏。我以为是无意中打开了 Firefox 自动滚屏的选项,找了一圈,发现 Firefox 确实有此类选项,不过我的 autoscrolling 并未选中,smooth scrolling 倒是选中的。我不清楚它们的区别,不过即使把两个 scrolling 都去除,网页仍在滚屏。后来发现,不光 Firefox 在滚屏,Chrome 也滚屏;LibreOffice 是来回跳屏,PDF Document Viewer 却是正常;打开地址栏下拉列表,立马自动关闭;打开菜单,却是正常。

Firefox preference for autoscrolling
Firefox preference for autoscrolling

我转而搜索电脑无故滚屏或跳动的原因。网上有微弱的线索指向“鼠标滚轮出问题了”。我握在手中的是 Microsoft Wireless Mobile Mouse 3500,我以为是电力不足了。关闭了鼠标电源,问题依旧。

我再仔细一看,这个电脑上还插着一个 PS2 鼠标,只不过搁置着,把它拔了,一切正常了。

Feed ThemeRoller with current theme parameters

If you are working on jQuery UI site to roll your own theme, you can always load your theme parameters by copying and pasting a long string into address bar, such as:

http://jqueryui.com/themeroller/#ffDefault=Lucida+Grande,+Lucida+Sans,+Arial,+sans-serif&fwDefault=bold&fsDefault=1.1em&cornerRadius=5px&bgColorHeader=5c9ccc&bgTextureHeader=12_gloss_wave.png&bgImgOpacityHeader=55&borderColorHeader=4297d7&fcHeader=ffffff&iconColorHeader=d8e7f3&bgColorContent=fcfdfd&bgTextureContent=06_inset_hard.png&bgImgOpacityContent=100&borderColorContent=a6c9e2&fcContent=222222&iconColorContent=469bdd&bgColorDefault=dfeffc&bgTextureDefault=02_glass.png&bgImgOpacityDefault=85&borderColorDefault=c5dbec&fcDefault=2e6e9e&iconColorDefault=6da8d5&bgColorHover=d0e5f5&bgTextureHover=02_glass.png&bgImgOpacityHover=75&borderColorHover=79b7e7&fcHover=1d5987&iconColorHover=217bc0&bgColorActive=f5f8f9&bgTextureActive=06_inset_hard.png&bgImgOpacityActive=100&borderColorActive=79b7e7&fcActive=e17009&iconColorActive=f9bd01&bgColorHighlight=fbec88&bgTextureHighlight=01_flat.png&bgImgOpacityHighlight=55&borderColorHighlight=fad42e&fcHighlight=363636&iconColorHighlight=2e83ff&bgColorError=fef1ec&bgTextureError=02_glass.png&bgImgOpacityError=95&borderColorError=cd0a0a&fcError=cd0a0a&iconColorError=cd0a0a&bgColorOverlay=aaaaaa&bgTextureOverlay=01_flat.png&bgImgOpacityOverlay=0&opacityOverlay=30&bgColorShadow=aaaaaa&bgTextureShadow=01_flat.png&bgImgOpacityShadow=0&opacityShadow=30&thicknessShadow=8px&offsetTopShadow=-8px&offsetLeftShadow=-8px&cornerRadiusShadow=8px

But, when you are working on your own site, using ThemeRoller Dev Tool for FireFox, you can not load the current page’s theme parameters into ThemeRoller easily. I find two workarounds. I must admit the workarounds are not easy either. There must be some easy “click-to-load” method, but I did not figure it out.

My solutions require FireBug.

Solution One.
1. Copy your theme parameters string to clipboard. The string is as you see before:

ffDefault=Lucida+Grande,+Lucida+Sans,+Arial,+sans-serif&fwDefault=bold&fsDefault=1.1em&cornerRadius=5px&bgColorHeader=5c9ccc&bgTextureHeader=12_gloss_wave.png&bgImgOpacityHeader=55&borderColorHeader=4297d7&fcHeader=ffffff&iconColorHeader=d8e7f3&bgColorContent=fcfdfd&bgTextureContent=06_inset_hard.png&bgImgOpacityContent=100&borderColorContent=a6c9e2&fcContent=222222&iconColorContent=469bdd&bgColorDefault=dfeffc&bgTextureDefault=02_glass.png&bgImgOpacityDefault=85&borderColorDefault=c5dbec&fcDefault=2e6e9e&iconColorDefault=6da8d5&bgColorHover=d0e5f5&bgTextureHover=02_glass.png&bgImgOpacityHover=75&borderColorHover=79b7e7&fcHover=1d5987&iconColorHover=217bc0&bgColorActive=f5f8f9&bgTextureActive=06_inset_hard.png&bgImgOpacityActive=100&borderColorActive=79b7e7&fcActive=e17009&iconColorActive=f9bd01&bgColorHighlight=fbec88&bgTextureHighlight=01_flat.png&bgImgOpacityHighlight=55&borderColorHighlight=fad42e&fcHighlight=363636&iconColorHighlight=2e83ff&bgColorError=fef1ec&bgTextureError=02_glass.png&bgImgOpacityError=95&borderColorError=cd0a0a&fcError=cd0a0a&iconColorError=cd0a0a&bgColorOverlay=aaaaaa&bgTextureOverlay=01_flat.png&bgImgOpacityOverlay=0&opacityOverlay=30&bgColorShadow=aaaaaa&bgTextureShadow=01_flat.png&bgImgOpacityShadow=0&opacityShadow=30&thicknessShadow=8px&offsetTopShadow=-8px&offsetLeftShadow=-8px&cornerRadiusShadow=8px

Please do not include “#” or “?” at the beginning, because when you paste, sometimes it requires a hash separator, sometimes a question mark separator. You’d better enter the separator separately at the time it requires.

2. Launch FireFox, Go to the web page to custom a theme for, Launch ThemeRoller, Launch FireBug

3. Find ThemeRoller <iframe> element, which is inside <div id=”inline_themeroller”> element, change <iframe> src by appending a hash and pasting theme parameters string. In another words, change src from

http://jqueryui.com/themeroller/developertool/appinterface.php

to

http://jqueryui.com/themeroller/developertool/appinterface.php#ffDefault=Verdana%2CArial%2Csans-serif&fwDefault=normal&fsDefault=1.1em&cornerRadius=6px&bgColorHeader=138b14&bgTextureHeader=01_flat.png&bgImgOpacityHeader=75&borderColorHeader=138b14&fcHeader=222222&iconColorHeader=222222&bgColorContent=ffffff&bgTextureContent=01_flat.png&bgImgOpacityContent=75&borderColorContent=138b14&fcContent=138b14&iconColorContent=222222&bgColorDefault=138b14&bgTextureDefault=03_highlight_soft.png&bgImgOpacityDefault=7…=02_glass.png&bgImgOpacityHighlight=55&borderColorHighlight=ffffff&fcHighlight=363636&iconColorHighlight=2e83ff&bgColorError=fef1ec&bgTextureError=05_inset_soft.png&bgImgOpacityError=95&borderColorError=cd0a0a&fcError=cd0a0a&iconColorError=cd0a0a&bgColorOverlay=aaaaaa&bgTextureOverlay=01_flat.png&bgImgOpacityOverlay=0&opacityOverlay=30&bgColorShadow=aaaaaa&bgTextureShadow=01_flat.png&bgImgOpacityShadow=0&opacityShadow=30&thicknessShadow=8px&offsetTopShadow=-8px&offsetLeftShadow=-8px&cornerRadiusShadow=8px

4. By now, you will see ThemeRoller “Roll your own” tab has loaded your custom values. However, the page appearance does not change until you enter any value box and hit Enter out.

Solution Two. It enables you to add your customised theme to ThemeRoller Gallery (temporarily), so you can switch and compare.

1. Same as Solution One

2. Same as Solution One

3. Find an <a> element of a Gallery theme and change its href. For example, the first theme in Gallery, its href is

http://jqueryui.com/themeroller/css/parseTheme.css.php?ffDefault=Trebuchet+MS,+Tahoma,+Verdana,+Arial,+sans-serif&fwDefault=bold&fsDefault=1.1em&cornerRadius=4px&bgColorHeader=f6a828&bgTextureHeader=12_gloss_wave.png&bgImgOpacityHeader=35&borderColorHeader=e78f08&fcHeader=ffffff&iconColorHeader=ffffff&bgColorContent=eeeeee&bgTextureContent=03_highlight_soft.png&bgImgOpacityContent=100&borderColorContent=dddddd&fcContent=333333&iconColorContent=222222&bgColorDefault=f6f6f6&bgTextureDefault=02_glass.png&bgI…gOpacityHighlight=75&borderColorHighlight=fed22f&fcHighlight=363636&iconColorHighlight=228ef1&bgColorError=b81900&bgTextureError=08_diagonals_thick.png&bgImgOpacityError=18&borderColorError=cd0a0a&fcError=ffffff&iconColorError=ffd27a&bgColorOverlay=666666&bgTextureOverlay=08_diagonals_thick.png&bgImgOpacityOverlay=20&opacityOverlay=50&bgColorShadow=000000&bgTextureShadow=01_flat.png&bgImgOpacityShadow=10&opacityShadow=20&thicknessShadow=5px&offsetTopShadow=-5px&offsetLeftShadow=-5px&cornerRadiusShadow=5px

Change to

http://jqueryui.com/themeroller/css/parseTheme.css.php?ffDefault=Lucida+Grande,+Lucida+Sans,+Arial,+sans-serif&fwDefault=bold&fsDefault=1.1em&cornerRadius=5px&bgColorHeader=5c9ccc&bgTextureHeader=12_gloss_wave.png&bgImgOpacityHeader=55&borderColorHeader=4297d7&fcHeader=ffffff&iconColorHeader=d8e7f3&bgColorContent=fcfdfd&bgTextureContent=06_inset_hard.png&bgImgOpacityContent=100&borderColorContent=a6c9e2&fcContent=222222&iconColorContent=469bdd&bgColorDefault=dfeffc&bgTextureDefault=02_glass.png&bgImgOpacityDefault=85&borderColorDefault=c5dbec&fcDefault=2e6e9e&iconColorDefault=6da8d5&bgColorHover=d0e5f5&bgTextureHover=02_glass.png&bgImgOpacityHover=75&borderColorHover=79b7e7&fcHover=1d5987&iconColorHover=217bc0&bgColorActive=f5f8f9&bgTextureActive=06_inset_hard.png&bgImgOpacityActive=100&borderColorActive=79b7e7&fcActive=e17009&iconColorActive=f9bd01&bgColorHighlight=fbec88&bgTextureHighlight=01_flat.png&bgImgOpacityHighlight=55&borderColorHighlight=fad42e&fcHighlight=363636&iconColorHighlight=2e83ff&bgColorError=fef1ec&bgTextureError=02_glass.png&bgImgOpacityError=95&borderColorError=cd0a0a&fcError=cd0a0a&iconColorError=cd0a0a&bgColorOverlay=aaaaaa&bgTextureOverlay=01_flat.png&bgImgOpacityOverlay=0&opacityOverlay=30&bgColorShadow=aaaaaa&bgTextureShadow=01_flat.png&bgImgOpacityShadow=0&opacityShadow=30&thicknessShadow=8px&offsetTopShadow=-8px&offsetLeftShadow=-8px&cornerRadiusShadow=8px

The thumbnail of the theme won’t change unless you change the src of <img> inside <a>. I assume you won’t bother about changing the thumbnail as long as you know which thumbnail represents your theme.

You can change more than one theme in Gallery to various versions of your theme, so you can click and switch between them quickly.

Dolphin does not work with HTML5 drag and drop

I use Dolphin in the office, and Nautilus at home. I feel managing files in Dolphin is a little more efficient than in Nautilus, but only a marginal better.

Today I find Dolphin does not support files drag and drop into browser for browser to upload. Drag and drop is an exciting feature of HTML5 and Google has implemented it to Chrome. I quite enjoy using it uploading files to Google Documents.

I would like to use this feature as much as possible but at moment I have to use Nautilus to drag and drop to Chrome. I believe soon I can also use Dolphin to drag and drop to Firefox.

Firefox 3.5 is released

Fedora 11 发布时,搭载的 Firefox 3.5 还是测试版。我对测试版还是有点敬而远之,怕驾驭不好。Fedora 11 强行灌给我一个测试版,我心里总有个疙瘩。

还好,没过多久,Firefox 3.5 正式版发布了,刚升级了一下,终于去掉了 firefox rc 字样,没觉察其他变化,但心里舒服了。顺便看了一段 Firefox 3.5 40秒的宣传短片,是多国语言反复说一句 Thank you for downloading firefox,轮到中文上场了,只有“谢谢”两个字,觉得镜头太少,不知是否跟中国 Firefox 用户偏少互为因果。

Obama and firefox

我很难理解某位编辑的逻辑。他的一篇文章,介绍 Firefox 的新功能,却从奥巴马任命 Vivek Kundra 为 CTO of US goverment 开始说起,然后又用奥巴马结尾。

奥巴马成为美国历史上首位黑人总统,这次惊动了整个世界的美国总统竞选,已经在长达一年多的时间里给人们的观念带来了冲击和改变!而给你的电脑换装,使用开源浏览器Firefox(火狐),这一点点改变不仅意味着你已经采取了支持开源软件的行动,更意味着你开始接受开源的观念!

奥巴马和 Firefox 有联系吗?太牵强了。

favicon.ico in IE

IE is a nightmare – 我对此体会越来越深刻。

想让自己的网站容易识别,就得从很多方面下功夫。个性化的,或与logo相配的favicon.ico就是要做的一件事情。如何让自己制作的favicon.ico在地址栏里显示出来,这点小事在Firefox下就是a piece of cake,在IE里我一直是忽视的,当我想起要重视的时候,为此整整折腾了一个晚上。所以我说IE is a nightmare。

首先,favicon.ico必须是标准的icon文件。之所以这么说,是因为有人说把favicon.bmp,或favicon.gif,或favicon.jpg格式保存的文件改名成favicon.ico就可以了,其实这样改名来的favicon.ico在Firefox下是能显示的,如果有人喜欢看重结果,不追求过程的话,Firefox下让favicon.ico出现的结果已经达到。但改名来的favicon.ico并不是真正的ico格式,IE是不认可的。对于这一点,错不在IE。我是追求完美的,要做就做一个正宗格式的favicon.ico,32 x 32 或 16 x 16都可以,我喜欢32 x 32,因为我没有ebay那么高水平,16 x 16还能尽显细节。

尽管有了标准格式的favicon.ico,能否在IE下显示还受很多因素制约。总的来说,我的感觉是,我按W3C标准出牌,但IE不按标准接牌,为兼顾到IE用户,我要付出成倍的时间。当然,我以外还有很多人,IE浪费了很多人宝贵的时间。好了,不发牢骚,让我总结一下IE下的制约因素。

  1. 虽说把favicon.ico放在网站的document root下就可以,但html里要有
    <link rel=“shortcut icon” type=“image/x-icon” href=“/favicon.ico” />
    更保险。我发现google等几个站点都没有这一条语句,但它们的favicon.ico在IE里的显示成功率还是很高,对此我百思不得其解。
  2. href绝对不能带域名,例如,不能写成
    <link rel=“shortcut icon” type=“image/x-icon” href=“http://example.com/favicon.ico” />
  3. 如果更新了favicon.ico,一定要清除cache才能看到更新,否则,无论怎么刷新都是不会更新的favicon.ico。
  4. 清除了cache,还得关闭IE,否则,你还是看不到更新。
  5. IE在清空cache后第一次运行,访问任何网站,你都无法看到它们的favicon.ico。
  6. 清空cache后,让IE运行一次,随便访问一个网站,让cache里留下点东西,关闭IE,再打开IE,然后你才可以看到更新后的favicon.ico。

复杂吧,我搞得头都大了,才总结出这么点经验,不保证在你的机子上IE也是按这个“规律”运行的。因为,你知道的,IE是反常规出牌的。

以上说的还是较新版本IE7,至于IE6,我劝你还是断了让favicon.ico在IE6的地址栏出现的念头。因为,你不光要符合以上条件,你还得让你的用户把你的网站收藏为favorite,IE6在访问被收藏的网站时,才会显示favicon.ico (这大概是favicon的由来?)。我很少收藏别人的网站,所以我就没指望别人来收藏我的网站。