Setting Up Jupyter Notebook with JavaScript, Python2 and Python3 Support

Jupyter Notebook is an awesome web application that allows you to edit, run and share Python and Javascript in browsers. This post details the steps to install and configure Jupyter Notebook to support JavaScript, Python2 and Python3 at the same time.

阅读更多

Ways to Horizontally and Vertically Center Child Elements in Parent

The previous two posts have given different solutions to horizontally or vertically center child element in parent. Combining the tricks, we can achieve the two effects at the same times. In this post, I’ll introduce serveral recipes to horizontally and vertically center child elements at the same time.

阅读更多

Ways to Vertically Center Child Elements in Parent

The previous post introduces several ways for centering elements horizontally. In this post, several recipes will be given for centering child elements in parent element vertically.

阅读更多

Ways to Horizontally Center Child Elements in Parent

Centering child HTML elements in containing element is very common in web development. This post presents several methods to achieve it and discusses their pros and cons.

阅读更多

Working with Android System Permissions

An Android application (app, for short) runs in its own sandbox, and only has the authority to access its own resources. When it needs to use resources outside of its own sandbox, it must request the appropriate permissions. Before Android 5.1, all the permissions needed are requested when the app is installed. However, the user grants permissions at runtime after Android 6.0, which brings about some changes about the permission acquisition process. This post briefly introduces Android permission system and gives the solutions for different use cases.

阅读更多

React Template Project Using webpack

This post shows the steps to set up a React project using webpack from scratch.

阅读更多

滚到到页面顶端(Scroll To Top)的简单实现

当页面长度较长时,常常需要在页面的左侧或右侧放置一个按钮,让用户能方便地回到顶端去。单纯地使用<a>标签直接跳转到网页内部某个锚的方式过于激进,用户难以掌握当前内容与跳转目的内容间的关系。本文使用简短的JS代码,展示了如何平滑移动到目的位置。

阅读更多

简述CSS优先级

CSS的样式可以以多种方式指定,在最终渲染的时候,浏览器依照什么顺序应用样式一直是一个非常令人头疼的问题。本文尝试以最简单的例子来解释CSS的优先级。

阅读更多