@chrisyipw

Crunch - LESS editor and compiler that based on Adobe Air

Crunch is the first app for writing and compiling LESS that I’ve ever saw.

Its advantages:

  • Better syntax highlight
  • Better indentation
  • More friendly error message
  • Basic functions for project, e.g. open folder, folder tree
  • Cross-platform

Coz it’s still under development (current is 1.1 beta), be ware of:

  • No real-time compilation
  • Worse performance than others
  • No code completion

Crunch

The built-in debugger in Firefox 10.0

I tried the built-in debugger in Firefox 10.0, it looks not bad, but it can’t be used in development right now.

  • It only support inspecting HTML & CSS
  • It only support editing CSS
  • It can display multiple colors for IDs, tags and classes while inspecting
  • NO JavaScript debugger
  • NO CSS autocomplete
  • After inspect element, you only can use ESC or close button to close inspector layer

It’s still under development, let’s look forward what the Firefox team will bring to us.

Firefox Inspector

MHP3G 体验版试玩

卡普空在 12 月 7 日发布了 MHP3G 的体验版供猎人们试玩。

分别用大剑讨伐了一次白兔兽、太刀打了一次水龙,还有把 3D 效果开到最大、双刀讨伐了一次白兔兽。

画面感觉比起 PSP 上的 MHP 稍微差了一点,颜色比较亮、白,不知道是不是和设置有关(NDS 游戏没这问题,我也不是很熟悉 3DS)。

开满 3D 效果后,战斗画面很带感,但是可视范围是个问题,角度偏了一点的话,画面的变动可能会引起失误。

至于下部的触摸屏附件倒是蛮贴心,放置了地图,道具和踢的按键还有 BOSS 的标示。

只是地图倒没有 PSP 版那么好了,因为视线要往下移,而且地图的清晰度不如 PSP 版,视线离开了画面,可能会造成危险。

最重要也最让人关心的视角调整功能做得差强人意。

首先 3DS 的摇杆是在十字键的上方,不知道是不是任地狱想和骚尼对着干才故意放反的,总之,这样放置的结果是,任何一个正常的地球人都不可能在摇着摇杆的时候按到操作下方的十字键。

卡普空的做法是:在触摸屏的右上角放置一个虚拟十字键。

听上去很美,但现实很残酷。

众所周知,3DS 的触摸屏是电阻屏,意味着你必须按下去,因此:

  • 力度过大可能会造成视角旋转过快
  • 根据施加的力度,可能会影响右手操作别的按键
  • 电阻屏精确的优点在这反而成为缺点,十字键可接受的范围相对电容屏要小,很有可能按在有效范围外

希望卡普空会在正式版改进一下虚拟十字键。

Although iTunes provides mini mode for just playing music, but the memory usage is still very high. It really sucks!

Although iTunes provides mini mode for just playing music, but the memory usage is still very high. It really sucks!

classList - manipulating element’s classes with pure JavaScript

In the past, if we wanna manipulate an element’s classes, we have to use class attribute and className property.

Because of they’re strings, which means less efficiency and performance.

Although we have third-part libraries to work around it, e.g. jQuery.hasClass or jQuery.addClass, but it’s still less efficiency.

But now, element.classList comes:

element.classList

This property provides the following methods:

  • add
  • contains
  • item
  • remove
  • toggle

Notice that all of them are only accept one valid class name in one invocation, otherwise you will get “INVALID_CHARACTER_ERR” exception.

Notes:

  • if class is already exist, add method will ignore it
  • classList is similar with arguments: you can access one class by classList[0], but can’t use array methods directly, e.g. classList.forEach(fn);

All the modern browsers are support it, but not IE9 or below. Yes, IE8- must die.

View demo

JavaScript shim

Virushuo: 为什么我不会再更新twitter了

virushuo:

我不是一个胆怯的人,也并不需要别人支持我做什么。但我不喜欢人们不愿表达自己的看法,不喜欢人们的沉默。我在互联网活动的历史,就是表达自己思想的历史,从fido到blog到twitter,都是如此。互联网生来就是为了人们的表达,如果不表达,这一切都毫无意义。

当年初到twitter,为之欣喜。历史上前所未有的快速交流工具,没有审查,人们可以尽情表达自己的看法。没有比这更重要的事情了。几年过来,到今天我发现错了。最近的几次争吵中,愿意表达自己看法的人少之又少。就说我和花落去这场争吵,只有 @xiaolai 和 @liumiao…

Source: virushuo