安装 FFmpeg,直奔官网。
将 gif 转为 mp4
Twitter 宣布支持 gif
图片,它其实是将 gif
转为 mp4
再通过 <video>
标签展示的,这样的好处有:
- 不必等全部资源加载完成再进行展示
gif
文件转为mp4
格式后,文件大小差别相当大,gif
大小为 2MB,转为mp4
大小为 260KB- 可以对动画进行播放、暂停、拖曳控制
安装 FFmpeg,直奔官网。
Twitter 宣布支持 gif
图片,它其实是将 gif
转为 mp4
再通过 <video>
标签展示的,这样的好处有:
gif
文件转为 mp4
格式后,文件大小差别相当大,gif
大小为 2MB,转为 mp4
大小为 260KB本文包含的 ArrayList 用法可在上篇文章找到,先上代码:
先来一段代码:
XMLHttpRequest Level 2 adds support for the new FormData interface. FormData objects provide a way to easily construct a set of key/value pairs representing form fields and their values, which can then be easily sent using the XMLHttpRequest send() method.
按照 Android Studio 内置的例子做了个 actionbar 的 Demo,现在写下来做笔记,IDE 为 Android Studio v1.2。 完成的截图如下:
Transfer decimal number to its corresponding binary number in a quick way.
来一个直观的图解释插入排序(图来自 Insertion Sort):
今天下载了个字幕文件,不过里面的分行太多,明明只是简单的一个不长句子,硬是被分成两行,于是我决定把这些分行全部去掉,字幕文件部分片段如下:
1 | 2 |
What exactly is the Tower of Hanoi, here is the explanation from Tower of Hanoi:
The Tower of Hanoi is a mathematical game or puzzle. It consists of three rods, and a number of disks of different sizes which can slide onto any rod. The puzzle starts with the disks in a neat stack in ascending order of size on one rod, the smallest at the top, thus making a conical shape.
The objective of the puzzle is to move the entire stack to another rod, obeying the following simple rules:
- Only one disk can be moved at a time.
- Each move consists of taking the upper disk from one of the stacks and placing it on top of another stack i.e. a disk can only be moved if it is the uppermost disk on a stack.
- No disk may be placed on top of a smaller disk.
来自维基百科的定义:
斐波那契數的特點是每一個數都是前二個數的和。頭二項是0和1,此數列的前幾項如下: 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987…