So you think you know JavaScript, hum?

Here is a list of JavaScript quizzes that test advanced features and capabilities of JavaScript. Take them if you think you’re good! 37 Questions about the strangest behaviour or JavaScript: http://javascript-puzzlers.herokuapp.com/ 5 Trick questions for JavaScript developer: http://dmitry.baranovskiy.com/post/91403200 14 Questions for practical JavaScript: http://perfectionkills.com/javascript-quiz/ And here is a list of sites I’ve collected for programming…
Read more

Beware of “inline-block”

As a front-end web developer, knowing how to use inline-block is essential. Not just because it’s an essential CSS property value, it’s also one of those Swiss army knives that you can pull out of your magic little drawer. But the question is, do you know to avoid the traps of “inline-block”? Cross Browser Support…
Read more

Reviewing network – comnetworks-003

Recently Coursera is offering a course on Computer Network, which allow me to refresh some of my memory over this very interesting subject that I used to work on. Here is the link to the class, https://class.coursera.org/comnetworks-003/. I’ll update the blog with new things I’ve learnt as I go~ Show your appreciation. No one has…
Read more

Gist of the week: Find Type of Variable

In JavaScript, the typeof and instanceof keyword doesn’t always reliably tell you what type the variable really is. The only reliable way is to get the constructor. I whipped up a short function for it. Enjoy! var checkType = function(item) { var type = Object.prototype.toString.call(item); return type.substring(“[object ".length, type.length - 1); }; checkType({}); //Object checkType([]);…
Read more

JavaScript Object: Dot Vs. Bracket

JavaScript object properties can normally be accessed using one of two methods: dot notation. e.g newPerson.name; bracket notation. e.g newPerson['name']; Most of the time, they are identical. However, there are two conditions where you can not use the dot notation to specify the object property. This is because JavaScript engine expects property name accessed using…
Read more

Gist Of The Week: Shortcode Everywhere

Gist of this week come from a great post from Stephanie Leary, see original post here. So sometimes, you want to run shortcode in places where WordPress doesn’t allow you to, like in text widgets and comments. Here is how to overcome that. Shortcode in text widget add_filter( ‘widget_text’, ‘shortcode_unautop’); add_filter( ‘widget_text’, ‘do_shortcode’); Shortcode in…
Read more

CoffeeScript: To be or Not to be

So recently I had my little encounter with the young and lovely CoffeeScript, a more appealing version of JavaScript that get compiles back to JavaScript. It is being said that many favor CoffeeScript over JavaScript, even the creator of JavaScript himself, Brendan Eich, has officially “liked” CoffeeScript and recommend people to use it. JavaScript came…
Read more

微信的那些事儿

微信最近很火. 3亿用户现在是越滚越多, 再加上微信5.0的诞生(拖了一个月, 安卓版才正式上线) 支付与语音的双结合, 微信这势头真是有点不可抵抗呢. 但是呢, 今天我主要是想写一写微信公众号 微信本身的目的就是一个营销平台, 有些人把它当做主要的营销平台, 有些就是作为现有平台的延伸线. 微信公众号最大的差异就是在于它有接口. 企业微博和QQ做的再好也只能利用这些应用本身的功能点, 而不能在上面进行更多的开发, 但是微信可以. 用微信公众号提供的服务多的数不胜数 (当然我们这里没有讲自媒体什么的, 这种公众号主要就是发博文所以也没啥好写的), 但是大致分为以下几种 自助/在线客服: 通过现有通道直接可以接触到售前/售后服务对于很多公司/企业来说都是极好的. 用户信息: 与现有的用户数据库绑定, 让用户可以查询自身的信息. 深度结合 预定/订购: 很多商家现在利用微信来管理活动注册信息. 通过回复关键词来注册, 以及当支付文档出来的时候, 那么预定+支付整个流程就完成了 查询: 通过关键词/事件判断需要的信息以及获取这些信息. 之前都是通过文字信息, 现在可以使用微信的语音引擎来转成文字进行查询, 对于用户来说更上一层楼. 当然啦, 语音这方面的文档也是没有出来的 互动: 例如微信机器人. 但是这种的服务一般需要维护后台的数据库进行通话的记录等. 商城: 想利用微信做电子商城的人也是不为少数. 但是到现在为止, 做的很成功的很少. Show your appreciation. Already liked by 3 lickers.

Gist Of The Week: Web Scraping With Node.js

One way or the other as a web developer, you will not escape the fate of having to write a webpage scraper. Whether it’s to save the world or harvesting your evil agenda. In this post, I will talk about how to use Node.js to write a simple web scraper service that you can run…
Read more