[TOC]
Generating a kind of virtual object for verifying the method reacting output which fits our expecting.
- Verifying the using status of a assignment object's method and how many times was executed, and what's the parameters, etc.
<!-- 允許應用訪問精確(如GPS)性的定位 --> | |
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> | |
<!-- 允許應訪問額外的提供定位的指令 --> | |
<uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS" /> | |
<!-- 允許應用創建用於測試的模擬定位提供者 --> | |
<uses-permission android:name="android.permission.ACCESS_MOCK_LOCATION" /> | |
<!-- 允許應用訪問網絡上的信息 --> | |
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> | |
<!-- 允許應用使用低版本視圖的特徵 --> | |
<uses-permission android:name="android.permission.ACCESS_SURFACE_FLINGER" /> |
In Javascript to create an array of number from 0 to n-1, we can use spread operator. It is part of ECMAScript (version 6). Currently IE does not have good support for it. It can be used in node scripts safely though.
We can use array of empty values and keys function. Note that Array(10) generates array of empty values of size 10.
var arr = [...Array(10).keys()]