“784fd823455deedf50ba8670bce488b97531c208”上不存在“paddle/math/git@gitcode.net:s920243400/PaddleDetection.git”
提交 414a4d58 编写于 作者: J Jiefeng Li

fix typo

Signed-off-by: NJiefeng Li <jiefeng_li@hust.edu.cn>
上级 1d69eb1c
...@@ -169,7 +169,7 @@ The following uses a single KV store as an example to describe the development p ...@@ -169,7 +169,7 @@ The following uses a single KV store as an example to describe the development p
console.log(`dataChange callback call data: ${data}`); console.log(`dataChange callback call data: ${data}`);
}); });
}catch(e){ }catch(e){
console.error(`An unexpected error occured. Code is ${e.code}, message is ${e.message}`); console.error(`An unexpected error occurred. Code is ${e.code}, message is ${e.message}`);
} }
``` ```
......
...@@ -147,7 +147,7 @@ async function example() { ...@@ -147,7 +147,7 @@ async function example() {
## Obtaining Images and Videos in an Album ## Obtaining Images and Videos in an Album
You can obtain media assets in an album in either of the following ways: You can obtain media assets in an album in either of the following ways:
- Call [MediaLibrary.getFileAssets](../reference/apis/js-apis-medialibrary.md#getfileassets7-1) with an album specified, as described in [Querying Media Assets with the Specfied Album Name](#querying-media-assets-with-the-specified-album-name). - Call [MediaLibrary.getFileAssets](../reference/apis/js-apis-medialibrary.md#getfileassets7-1) with an album specified, as described in [Querying Media Assets with the Specified Album Name](#querying-media-assets-with-the-specified-album-name).
- Call [Album.getFileAssets](../reference/apis/js-apis-medialibrary.md#getfileassets7-3) to obtain an **Album** instance, so as to obtain the media assets in it. - Call [Album.getFileAssets](../reference/apis/js-apis-medialibrary.md#getfileassets7-3) to obtain an **Album** instance, so as to obtain the media assets in it.
**Prerequisites** **Prerequisites**
......
...@@ -244,7 +244,7 @@ The development process of the Neural Network Runtime consists of three phases: ...@@ -244,7 +244,7 @@ The development process of the Neural Network Runtime consists of three phases:
// Create a compilation instance to pass the model to the underlying hardware for compilation. // Create a compilation instance to pass the model to the underlying hardware for compilation.
OH_NNCompilation* compilation = OH_NNCompilation_Construct(model); OH_NNCompilation* compilation = OH_NNCompilation_Construct(model);
if (compilation == nullptr) { if (compilation == nullptr) {
std::cout << "CreateCompilation failed, error happended when creating compilation." << std::endl; std::cout << "CreateCompilation failed, error happened when creating compilation." << std::endl;
return OH_NN_MEMORY_ERROR; return OH_NN_MEMORY_ERROR;
} }
......
...@@ -2736,7 +2736,7 @@ try { ...@@ -2736,7 +2736,7 @@ try {
console.error(`Fail to put Batch.code is ${err.code},message is ${err.message}`); console.error(`Fail to put Batch.code is ${err.code},message is ${err.message}`);
}); });
} catch (e) { } catch (e) {
console.error(`An unexpected error occured.code is ${e.code},message is ${e.message}`); console.error(`An unexpected error occurred.code is ${e.code},message is ${e.message}`);
} }
``` ```
...@@ -2785,7 +2785,7 @@ try { ...@@ -2785,7 +2785,7 @@ try {
}); });
}); });
} catch (e) { } catch (e) {
console.error(`An unexpected error occured.code is ${e.code},message is ${e.message}`) console.error(`An unexpected error occurred.code is ${e.code},message is ${e.message}`)
} }
``` ```
...@@ -2841,7 +2841,7 @@ try { ...@@ -2841,7 +2841,7 @@ try {
console.error(`Fail to get data.code is ${err.code},message is ${err.message} `); console.error(`Fail to get data.code is ${err.code},message is ${err.message} `);
}); });
} catch (e) { } catch (e) {
console.error(`An unexpected error occured.code is ${e.code},message is ${e.message}`) console.error(`An unexpected error occurred.code is ${e.code},message is ${e.message}`)
} }
``` ```
...@@ -3267,7 +3267,7 @@ try { ...@@ -3267,7 +3267,7 @@ try {
}); });
}); });
} catch (e) { } catch (e) {
console.error(`An unexpected error occured.code is ${e.code},message is ${e.message}`); console.error(`An unexpected error occurred.code is ${e.code},message is ${e.message}`);
} }
``` ```
...@@ -3335,7 +3335,7 @@ try { ...@@ -3335,7 +3335,7 @@ try {
console.error(`Fail to close resultset.code is ${err.code},message is ${err.message}`); console.error(`Fail to close resultset.code is ${err.code},message is ${err.message}`);
}); });
} catch (e) { } catch (e) {
console.error(`An unexpected error occured.code is ${e.code},message is ${e.code}`); console.error(`An unexpected error occurred.code is ${e.code},message is ${e.code}`);
} }
``` ```
...@@ -3398,7 +3398,7 @@ try { ...@@ -3398,7 +3398,7 @@ try {
}); });
}); });
} catch (e) { } catch (e) {
console.error(`An unexpected error occured.code is ${e.code},message is ${e.message}`); console.error(`An unexpected error occurred.code is ${e.code},message is ${e.message}`);
} }
``` ```
...@@ -3463,7 +3463,7 @@ try { ...@@ -3463,7 +3463,7 @@ try {
console.error(`Fail to get resultset.code is ${err.code},message is ${err.message}`); console.error(`Fail to get resultset.code is ${err.code},message is ${err.message}`);
}); });
} catch (e) { } catch (e) {
console.error(`An unexpected error occured.code is ${e.code},message is ${e.code}`); console.error(`An unexpected error occurred.code is ${e.code},message is ${e.code}`);
} }
``` ```
...@@ -3519,7 +3519,7 @@ try { ...@@ -3519,7 +3519,7 @@ try {
}) })
}); });
} catch (e) { } catch (e) {
console.error(`An unexpected error occured.code is ${e.code},message is ${e.code}`); console.error(`An unexpected error occurred.code is ${e.code},message is ${e.code}`);
} }
``` ```
...@@ -3576,7 +3576,7 @@ try { ...@@ -3576,7 +3576,7 @@ try {
console.error(`Fail to close resultset.code is ${err.code},message is ${err.message}`); console.error(`Fail to close resultset.code is ${err.code},message is ${err.message}`);
}); });
} catch (e) { } catch (e) {
console.error(`An unexpected error occured.code is ${e.code},message is ${e.code}`); console.error(`An unexpected error occurred.code is ${e.code},message is ${e.code}`);
} }
``` ```
...@@ -3609,7 +3609,7 @@ try { ...@@ -3609,7 +3609,7 @@ try {
} }
}); });
} catch (e) { } catch (e) {
console.error(`An unexpected error occured.code is ${e.code},message is ${e.code}`); console.error(`An unexpected error occurred.code is ${e.code},message is ${e.code}`);
} }
``` ```
...@@ -3645,7 +3645,7 @@ try { ...@@ -3645,7 +3645,7 @@ try {
console.error(`Fail to close resultset.code is ${err.code},message is ${err.message}`); console.error(`Fail to close resultset.code is ${err.code},message is ${err.message}`);
}); });
} catch (e) { } catch (e) {
console.error(`An unexpected error occured.code is ${e.code},message is ${e.code}`); console.error(`An unexpected error occurred.code is ${e.code},message is ${e.code}`);
} }
``` ```
...@@ -3703,7 +3703,7 @@ try { ...@@ -3703,7 +3703,7 @@ try {
}); });
}); });
} catch (e) { } catch (e) {
console.error(`An unexpected error occured.code is ${e.code},message is ${e.code}`); console.error(`An unexpected error occurred.code is ${e.code},message is ${e.code}`);
} }
``` ```
...@@ -3766,7 +3766,7 @@ try { ...@@ -3766,7 +3766,7 @@ try {
console.error(`Fail to get result size.code is ${err.code},message is ${err.message}`); console.error(`Fail to get result size.code is ${err.code},message is ${err.message}`);
}); });
} catch (e) { } catch (e) {
console.error(`An unexpected error occured.code is ${e.code},message is ${e.code}`); console.error(`An unexpected error occurred.code is ${e.code},message is ${e.code}`);
} }
``` ```
...@@ -4154,7 +4154,7 @@ try { ...@@ -4154,7 +4154,7 @@ try {
} }
}); });
} catch (e) { } catch (e) {
console.error(`An unexpected error occured.code is ${e.code},message is ${e.message}`); console.error(`An unexpected error occurred.code is ${e.code},message is ${e.message}`);
} }
``` ```
...@@ -4191,7 +4191,7 @@ try { ...@@ -4191,7 +4191,7 @@ try {
console.error(`Fail to commit.code is ${err.code},message is ${err.message}`); console.error(`Fail to commit.code is ${err.code},message is ${err.message}`);
}); });
} catch (e) { } catch (e) {
console.error(`An unexpected error occured.ode is ${e.code},message is ${e.message}`); console.error(`An unexpected error occurred.ode is ${e.code},message is ${e.message}`);
} }
``` ```
...@@ -4230,7 +4230,7 @@ try { ...@@ -4230,7 +4230,7 @@ try {
} }
}); });
}catch(e) { }catch(e) {
console.error(`An unexpected error occured.code is ${e.code},message is ${e.message}`); console.error(`An unexpected error occurred.code is ${e.code},message is ${e.message}`);
} }
``` ```
...@@ -4267,7 +4267,7 @@ try { ...@@ -4267,7 +4267,7 @@ try {
console.error(`Fail to rollback.code is ${err.code},message is ${err.message}`); console.error(`Fail to rollback.code is ${err.code},message is ${err.message}`);
}); });
} catch (e) { } catch (e) {
console.error(`An unexpected error occured.code is ${e.code},message is ${e.message}`); console.error(`An unexpected error occurred.code is ${e.code},message is ${e.message}`);
} }
``` ```
...@@ -4299,7 +4299,7 @@ try { ...@@ -4299,7 +4299,7 @@ try {
} }
}); });
} catch (e) { } catch (e) {
console.error(`An unexpected error occured.code is ${e.code},message is ${e.message}`); console.error(`An unexpected error occurred.code is ${e.code},message is ${e.message}`);
} }
``` ```
...@@ -4334,7 +4334,7 @@ try { ...@@ -4334,7 +4334,7 @@ try {
console.error(`Fail to enable sync.code is ${err.code},message is ${err.message}`); console.error(`Fail to enable sync.code is ${err.code},message is ${err.message}`);
}); });
} catch (e) { } catch (e) {
console.error(`An unexpected error occured.code is ${e.code},message is ${e.message}`); console.error(`An unexpected error occurred.code is ${e.code},message is ${e.message}`);
} }
``` ```
...@@ -4369,7 +4369,7 @@ try { ...@@ -4369,7 +4369,7 @@ try {
console.log('Succeeded in setting syncRange'); console.log('Succeeded in setting syncRange');
}); });
} catch (e) { } catch (e) {
console.error(`An unexpected error occured.code is ${e.code},message is ${e.message}`); console.error(`An unexpected error occurred.code is ${e.code},message is ${e.message}`);
} }
``` ```
...@@ -4407,7 +4407,7 @@ try { ...@@ -4407,7 +4407,7 @@ try {
console.error(`Fail to set syncRange.code is ${err.code},message is ${err.message}`); console.error(`Fail to set syncRange.code is ${err.code},message is ${err.message}`);
}); });
} catch (e) { } catch (e) {
console.error(`An unexpected error occured.code is ${e.code},message is ${e.message}`); console.error(`An unexpected error occurred.code is ${e.code},message is ${e.message}`);
} }
``` ```
...@@ -4440,7 +4440,7 @@ try { ...@@ -4440,7 +4440,7 @@ try {
console.log('Succeeded in setting syncParam'); console.log('Succeeded in setting syncParam');
}); });
} catch (e) { } catch (e) {
console.error(`An unexpected error occured.code is ${e.code},message is ${e.message}`); console.error(`An unexpected error occurred.code is ${e.code},message is ${e.message}`);
} }
``` ```
...@@ -4476,7 +4476,7 @@ try { ...@@ -4476,7 +4476,7 @@ try {
console.error(`Fail to set syncParam.code is ${err.code},message is ${err.message}`); console.error(`Fail to set syncParam.code is ${err.code},message is ${err.message}`);
}); });
} catch (e) { } catch (e) {
console.error(`An unexpected error occured.code is ${e.code},message is ${e.message}`); console.error(`An unexpected error occurred.code is ${e.code},message is ${e.message}`);
} }
``` ```
...@@ -4658,7 +4658,7 @@ try { ...@@ -4658,7 +4658,7 @@ try {
console.log(`dataChange callback call data: ${data}`); console.log(`dataChange callback call data: ${data}`);
}); });
} catch (e) { } catch (e) {
console.error(`An unexpected error occured.code is ${e.code},message is ${e.message}`); console.error(`An unexpected error occurred.code is ${e.code},message is ${e.message}`);
} }
``` ```
...@@ -4832,7 +4832,7 @@ try { ...@@ -4832,7 +4832,7 @@ try {
console.log('Succeeded in getting securityLevel'); console.log('Succeeded in getting securityLevel');
}); });
} catch (e) { } catch (e) {
console.error(`An unexpected error occured.code is ${e.code},message is ${e.message}`); console.error(`An unexpected error occurred.code is ${e.code},message is ${e.message}`);
} }
``` ```
...@@ -4869,7 +4869,7 @@ try { ...@@ -4869,7 +4869,7 @@ try {
console.error(`Fail to get SecurityLevel.code is ${err.code},message is ${err.message}`); console.error(`Fail to get SecurityLevel.code is ${err.code},message is ${err.message}`);
}); });
} catch (e) { } catch (e) {
console.error(`An unexpected error occured.code is ${e.code},message is ${e.message}`); console.error(`An unexpected error occurred.code is ${e.code},message is ${e.message}`);
} }
``` ```
...@@ -5678,7 +5678,7 @@ try { ...@@ -5678,7 +5678,7 @@ try {
}); });
}); });
} catch (e) { } catch (e) {
console.error(`An unexpected error occured.code is ${e.code},message is ${e.message}`); console.error(`An unexpected error occurred.code is ${e.code},message is ${e.message}`);
} }
``` ```
...@@ -5746,7 +5746,7 @@ try { ...@@ -5746,7 +5746,7 @@ try {
console.error(`Fail to close resultset.code is ${err.code},message is ${err.message}`); console.error(`Fail to close resultset.code is ${err.code},message is ${err.message}`);
}); });
} catch (e) { } catch (e) {
console.error(`An unexpected error occured.code is ${e.code},message is ${e.code}`); console.error(`An unexpected error occurred.code is ${e.code},message is ${e.code}`);
} }
``` ```
...@@ -6060,7 +6060,7 @@ try { ...@@ -6060,7 +6060,7 @@ try {
console.error(`Fail to get resultset.code is ${err.code},message is ${err.message}`); console.error(`Fail to get resultset.code is ${err.code},message is ${err.message}`);
}); });
} catch (e) { } catch (e) {
console.error(`An unexpected error occured.code is ${e.code},message is ${e.code}`); console.error(`An unexpected error occurred.code is ${e.code},message is ${e.code}`);
} }
``` ```
...@@ -6190,7 +6190,7 @@ try { ...@@ -6190,7 +6190,7 @@ try {
}) })
}); });
} catch (e) { } catch (e) {
console.error(`An unexpected error occured.code is ${e.code},message is ${e.code}`); console.error(`An unexpected error occurred.code is ${e.code},message is ${e.code}`);
} }
``` ```
...@@ -6247,7 +6247,7 @@ try { ...@@ -6247,7 +6247,7 @@ try {
console.error(`Fail to close resultset.code is ${err.code},message is ${err.message}`); console.error(`Fail to close resultset.code is ${err.code},message is ${err.message}`);
}); });
} catch (e) { } catch (e) {
console.error(`An unexpected error occured.code is ${e.code},message is ${e.code}`); console.error(`An unexpected error occurred.code is ${e.code},message is ${e.code}`);
} }
``` ```
...@@ -6304,7 +6304,7 @@ try { ...@@ -6304,7 +6304,7 @@ try {
}) })
}); });
} catch (e) { } catch (e) {
console.error(`An unexpected error occured.code is ${e.code},message is ${e.code}`); console.error(`An unexpected error occurred.code is ${e.code},message is ${e.code}`);
} }
``` ```
...@@ -6361,7 +6361,7 @@ try { ...@@ -6361,7 +6361,7 @@ try {
console.error(`Fail to close resultset.code is ${err.code},message is ${err.message}`); console.error(`Fail to close resultset.code is ${err.code},message is ${err.message}`);
}); });
} catch (e) { } catch (e) {
console.error(`An unexpected error occured.code is ${e.code},message is ${e.code}`); console.error(`An unexpected error occurred.code is ${e.code},message is ${e.code}`);
} }
``` ```
...@@ -6419,7 +6419,7 @@ try { ...@@ -6419,7 +6419,7 @@ try {
}); });
}); });
} catch (e) { } catch (e) {
console.error(`An unexpected error occured.code is ${e.code},message is ${e.code}`); console.error(`An unexpected error occurred.code is ${e.code},message is ${e.code}`);
} }
``` ```
...@@ -6482,7 +6482,7 @@ try { ...@@ -6482,7 +6482,7 @@ try {
console.error(`Fail to get result size.code is ${err.code},message is ${err.message}`); console.error(`Fail to get result size.code is ${err.code},message is ${err.message}`);
}); });
} catch (e) { } catch (e) {
console.error(`An unexpected error occured.code is ${e.code},message is ${e.code}`); console.error(`An unexpected error occurred.code is ${e.code},message is ${e.code}`);
} }
``` ```
......
...@@ -5664,7 +5664,7 @@ sensor.transformCoordinateSystem([1, 0, 0, 0, 1, 0, 0, 0, 1], {x:2, y:3}, functi ...@@ -5664,7 +5664,7 @@ sensor.transformCoordinateSystem([1, 0, 0, 0, 1, 0, 0, 0, 1], {x:2, y:3}, functi
console.error("Operation failed. Error code: " + err.code + ", message: " + err.message); console.error("Operation failed. Error code: " + err.code + ", message: " + err.message);
return; return;
} }
console.info("Operation successed. Data obtained: " + data); console.info("Operation succeeded. Data obtained: " + data);
for (var i=0; i < data.length; i++) { for (var i=0; i < data.length; i++) {
console.info("transformCoordinateSystem data[ " + i + "] = " + data[i]); console.info("transformCoordinateSystem data[ " + i + "] = " + data[i]);
} }
...@@ -5700,7 +5700,7 @@ This API is deprecated since API version 9. You are advised to use [sensor.trans ...@@ -5700,7 +5700,7 @@ This API is deprecated since API version 9. You are advised to use [sensor.trans
```js ```js
const promise = sensor.transformCoordinateSystem([1, 0, 0, 0, 1, 0, 0, 0, 1], {x:2, y:3}); const promise = sensor.transformCoordinateSystem([1, 0, 0, 0, 1, 0, 0, 0, 1], {x:2, y:3});
promise.then((data) => { promise.then((data) => {
console.info("Operation successed."); console.info("Operation succeeded.");
for (var i=0; i < data.length; i++) { for (var i=0; i < data.length; i++) {
console.info("transformCoordinateSystem data[ " + i + "] = " + data[i]); console.info("transformCoordinateSystem data[ " + i + "] = " + data[i]);
} }
...@@ -5807,7 +5807,7 @@ This API is deprecated since API version 9. You are advised to use [sensor.getDe ...@@ -5807,7 +5807,7 @@ This API is deprecated since API version 9. You are advised to use [sensor.getDe
"Operation failed. Error code: " + err.code + ", message: " + err.message); "Operation failed. Error code: " + err.code + ", message: " + err.message);
return; return;
} }
console.info("Successed to get getAltitude interface get data: " + data); console.info("Succeeded to get getAltitude interface get data: " + data);
}); });
``` ```
...@@ -5874,7 +5874,7 @@ This API is deprecated since API version 9. You are advised to use [sensor.getIn ...@@ -5874,7 +5874,7 @@ This API is deprecated since API version 9. You are advised to use [sensor.getIn
err.message); err.message);
return; return;
} }
console.info("Successed to get getGeomagneticDip interface get data: " + data); console.info("Succeeded to get getGeomagneticDip interface get data: " + data);
}) })
``` ```
...@@ -5906,7 +5906,7 @@ This API is deprecated since API version 9. You are advised to use [sensor.getIn ...@@ -5906,7 +5906,7 @@ This API is deprecated since API version 9. You are advised to use [sensor.getIn
```js ```js
const promise = sensor.getGeomagneticDip([1, 0, 0, 0, 1, 0, 0, 0, 1]); const promise = sensor.getGeomagneticDip([1, 0, 0, 0, 1, 0, 0, 0, 1]);
promise.then((data) => { promise.then((data) => {
console.info('getGeomagneticDip_promise successed', data); console.info('getGeomagneticDip_promise succeeded', data);
}).catch((err) => { }).catch((err) => {
console.error("Operation failed"); console.error("Operation failed");
}) })
...@@ -5976,7 +5976,7 @@ This API is deprecated since API version 9. You are advised to use [sensor.getAn ...@@ -5976,7 +5976,7 @@ This API is deprecated since API version 9. You are advised to use [sensor.getAn
```js ```js
const promise = sensor.getAngleModify([1,0,0,0,1,0,0,0,1], [1,0,0,0,0.87,-0.50,0,0.50,0.87]); const promise = sensor.getAngleModify([1,0,0,0,1,0,0,0,1], [1,0,0,0,0.87,-0.50,0,0.50,0.87]);
promise.then((data) => { promise.then((data) => {
console.info('getAngleModifiy_promise success'); console.info('getAngleModify_promise success');
for (var i=0; i < data.length; i++) { for (var i=0; i < data.length; i++) {
console.info("data[" + i + "]: " + data[i]); console.info("data[" + i + "]: " + data[i]);
} }
...@@ -6120,7 +6120,7 @@ This API is deprecated since API version 9. You are advised to use [sensor.getQu ...@@ -6120,7 +6120,7 @@ This API is deprecated since API version 9. You are advised to use [sensor.getQu
```js ```js
const promise = sensor.createQuaternion([0.20046076, 0.21907, 0.73978853, 0.60376877]); const promise = sensor.createQuaternion([0.20046076, 0.21907, 0.73978853, 0.60376877]);
promise.then((data) => { promise.then((data) => {
console.info('createQuaternion_promise successed'); console.info('createQuaternion_promise succeeded');
for (var i=0; i < data.length; i++) { for (var i=0; i < data.length; i++) {
console.info("data[" + i + "]: " + data[i]); console.info("data[" + i + "]: " + data[i]);
} }
...@@ -6157,7 +6157,7 @@ This API is deprecated since API version 9. You are advised to use [sensor.getOr ...@@ -6157,7 +6157,7 @@ This API is deprecated since API version 9. You are advised to use [sensor.getOr
err.message); err.message);
return; return;
} }
console.info("SensorJsAPI--->Successed to get getDirection interface get data: " + data); console.info("SensorJsAPI--->Succeeded to get getDirection interface get data: " + data);
for (var i = 1; i < data.length; i++) { for (var i = 1; i < data.length; i++) {
console.info("sensor_getDirection_callback" + data[i]); console.info("sensor_getDirection_callback" + data[i]);
} }
......
...@@ -457,7 +457,7 @@ function func(key, value){ ...@@ -457,7 +457,7 @@ function func(key, value){
arrTag[i] = 'key:'+key+' value:'+ value.getDepth(); arrTag[i] = 'key:'+key+' value:'+ value.getDepth();
str += arrTag[i]; str += arrTag[i];
i++; i++;
return true; // Determines whether to continuely parse, which is used to continue or terminate parsing. return true; // Determines whether to continually parse, which is used to continue or terminate parsing.
} }
let options = {supportDoctype:true, ignoreNameSpace:true, tokenValueCallbackFunction:func} let options = {supportDoctype:true, ignoreNameSpace:true, tokenValueCallbackFunction:func}
that.parse(options); that.parse(options);
...@@ -528,7 +528,7 @@ function func(key, value){ ...@@ -528,7 +528,7 @@ function func(key, value){
arrTag[i] = 'key:'+key+' value:'+ value.getColumnNumber(); arrTag[i] = 'key:'+key+' value:'+ value.getColumnNumber();
str += arrTag[i]; str += arrTag[i];
i++; i++;
return true; // Determines whether to continuely parse, which is used to continue or terminate parsing. return true; // Determines whether to continually parse, which is used to continue or terminate parsing.
} }
let options = {supportDoctype:true, ignoreNameSpace:true, tokenValueCallbackFunction:func} let options = {supportDoctype:true, ignoreNameSpace:true, tokenValueCallbackFunction:func}
that.parse(options); that.parse(options);
...@@ -575,7 +575,7 @@ function func(key, value){ ...@@ -575,7 +575,7 @@ function func(key, value){
arrTag[i] = 'key:'+key+' value:'+ value.getDepth(); arrTag[i] = 'key:'+key+' value:'+ value.getDepth();
str += arrTag[i]; str += arrTag[i];
i++; i++;
return true; // Determines whether to continuely parse, which is used to continue or terminate parsing. return true; // Determines whether to continually parse, which is used to continue or terminate parsing.
} }
let options = {supportDoctype:true, ignoreNameSpace:true, tokenValueCallbackFunction:func} let options = {supportDoctype:true, ignoreNameSpace:true, tokenValueCallbackFunction:func}
that.parse(options); that.parse(options);
...@@ -625,7 +625,7 @@ function func(key, value){ ...@@ -625,7 +625,7 @@ function func(key, value){
arrTag[i] = 'key:'+key+' value:'+ value.getLineNumber(); arrTag[i] = 'key:'+key+' value:'+ value.getLineNumber();
str += arrTag[i]; str += arrTag[i];
i++; i++;
return true; // Determines whether to continuely parse, which is used to continue or terminate parsing. return true; // Determines whether to continually parse, which is used to continue or terminate parsing.
} }
let options = {supportDoctype:true, ignoreNameSpace:true, tokenValueCallbackFunction:func} let options = {supportDoctype:true, ignoreNameSpace:true, tokenValueCallbackFunction:func}
that.parse(options); that.parse(options);
...@@ -672,7 +672,7 @@ function func(key, value){ ...@@ -672,7 +672,7 @@ function func(key, value){
arrTag[i] = 'key:'+key+' value:'+ value.getName(); arrTag[i] = 'key:'+key+' value:'+ value.getName();
str += arrTag[i]; str += arrTag[i];
i++; i++;
return true; // Determines whether to continuely parse, which is used to continue or terminate parsing. return true; // Determines whether to continually parse, which is used to continue or terminate parsing.
} }
let options = {supportDoctype:true, ignoreNameSpace:true, tokenValueCallbackFunction:func} let options = {supportDoctype:true, ignoreNameSpace:true, tokenValueCallbackFunction:func}
that.parse(options); that.parse(options);
...@@ -718,7 +718,7 @@ function func(key, value){ ...@@ -718,7 +718,7 @@ function func(key, value){
arrTag[i] = 'key:'+key+' value:'+ value.getNamespace(); arrTag[i] = 'key:'+key+' value:'+ value.getNamespace();
str += arrTag[i]; str += arrTag[i];
i++; i++;
return true; // Determines whether to continuely parse, which is used to continue or terminate parsing. return true; // Determines whether to continually parse, which is used to continue or terminate parsing.
} }
let options = {supportDoctype:true, ignoreNameSpace:true, tokenValueCallbackFunction:func} let options = {supportDoctype:true, ignoreNameSpace:true, tokenValueCallbackFunction:func}
that.parse(options); that.parse(options);
...@@ -764,7 +764,7 @@ function func(key, value){ ...@@ -764,7 +764,7 @@ function func(key, value){
arrTag[i] = 'key:'+key+' value:'+ value.getPrefix(); arrTag[i] = 'key:'+key+' value:'+ value.getPrefix();
str += arrTag[i]; str += arrTag[i];
i++; i++;
return true; // Determines whether to continuely parse, which is used to continue or terminate parsing. return true; // Determines whether to continually parse, which is used to continue or terminate parsing.
} }
let options = {supportDoctype:true, ignoreNameSpace:true, tokenValueCallbackFunction:func} let options = {supportDoctype:true, ignoreNameSpace:true, tokenValueCallbackFunction:func}
that.parse(options); that.parse(options);
...@@ -811,7 +811,7 @@ function func(key, value){ ...@@ -811,7 +811,7 @@ function func(key, value){
arrTag[i] = 'key:'+key+' value:'+ value.getText(); arrTag[i] = 'key:'+key+' value:'+ value.getText();
str += arrTag[i]; str += arrTag[i];
i++; i++;
return true; // Determines whether to continuely parse, which is used to continue or terminate parsing. return true; // Determines whether to continually parse, which is used to continue or terminate parsing.
} }
let options = {supportDoctype:true, ignoreNameSpace:true, tokenValueCallbackFunction:func} let options = {supportDoctype:true, ignoreNameSpace:true, tokenValueCallbackFunction:func}
that.parse(options); that.parse(options);
...@@ -857,7 +857,7 @@ function func(key, value){ ...@@ -857,7 +857,7 @@ function func(key, value){
arrTag[i] = 'key:'+key+' value:'+ value.isEmptyElementTag(); arrTag[i] = 'key:'+key+' value:'+ value.isEmptyElementTag();
str += arrTag[i]; str += arrTag[i];
i++; i++;
return true; // Determines whether to continuely parse, which is used to continue or terminate parsing. return true; // Determines whether to continually parse, which is used to continue or terminate parsing.
} }
let options = {supportDoctype:true, ignoreNameSpace:true, tokenValueCallbackFunction:func} let options = {supportDoctype:true, ignoreNameSpace:true, tokenValueCallbackFunction:func}
that.parse(options); that.parse(options);
...@@ -903,7 +903,7 @@ function func(key, value){ ...@@ -903,7 +903,7 @@ function func(key, value){
arrTag[i] = 'key:'+key+' value:'+ value.isWhitespace(); arrTag[i] = 'key:'+key+' value:'+ value.isWhitespace();
str += arrTag[i]; str += arrTag[i];
i++; i++;
return true; // Determines whether to continuely parse, which is used to continue or terminate parsing. return true; // Determines whether to continually parse, which is used to continue or terminate parsing.
} }
let options = {supportDoctype:true, ignoreNameSpace:true, tokenValueCallbackFunction:func} let options = {supportDoctype:true, ignoreNameSpace:true, tokenValueCallbackFunction:func}
that.parse(options); that.parse(options);
...@@ -948,7 +948,7 @@ function func(key, value){ ...@@ -948,7 +948,7 @@ function func(key, value){
arrTag[i] = 'key:'+key+' value:'+ value.getAttributeCount(); arrTag[i] = 'key:'+key+' value:'+ value.getAttributeCount();
str += arrTag[i]; str += arrTag[i];
i++; i++;
return true; // Determines whether to continuely parse, which is used to continue or terminate parsing. return true; // Determines whether to continually parse, which is used to continue or terminate parsing.
} }
let options = {supportDoctype:true, ignoreNameSpace:true, tokenValueCallbackFunction:func} let options = {supportDoctype:true, ignoreNameSpace:true, tokenValueCallbackFunction:func}
that.parse(options); that.parse(options);
......
...@@ -133,7 +133,7 @@ Adaptive scaling means that child components scale according to the preset ratio ...@@ -133,7 +133,7 @@ Adaptive scaling means that child components scale according to the preset ratio
## Positioning ## Positioning
- Relative layout - Relative layout
You can use the **[offset](../reference/arkui-ts/ts-universal-attributes-location.md)** attribute to set the offset of a component relative to itself, thereby implmenting relative layout. Setting this attribute does not affect the layout of the parent container. It only adjusts the component position during drawing. The linear layout and offset can work together to meet most layout development requirements. You can use the **[offset](../reference/arkui-ts/ts-universal-attributes-location.md)** attribute to set the offset of a component relative to itself, thereby implementing relative layout. Setting this attribute does not affect the layout of the parent container. It only adjusts the component position during drawing. The linear layout and offset can work together to meet most layout development requirements.
```ts ```ts
@Entry @Entry
......
...@@ -376,7 +376,7 @@ If an API implements too many features and cannot be named in a few words, it us ...@@ -376,7 +376,7 @@ If an API implements too many features and cannot be named in a few words, it us
Do not assume that developers have the same background information as you do. Do not assume that developers have the same background information as you do.
For example, you may name a field **language** and believe all the readers know that you are talking about the programming language. In fact, someone might wonder whether you are talking about the language of speech. Name it **programmingLanuage** will eliminate the misunderstanding. For example, you may name a field **language** and believe all the readers know that you are talking about the programming language. In fact, someone might wonder whether you are talking about the language of speech. Name it **programmingLanguage** will eliminate the misunderstanding.
However, do not go to another extreme. If the class name or namespace name contains a prefix, do not repeat it in the function. However, do not go to another extreme. If the class name or namespace name contains a prefix, do not repeat it in the function.
......
...@@ -185,7 +185,7 @@ ...@@ -185,7 +185,7 @@
console.info(`dataChange callback call data: ${data}`); console.info(`dataChange callback call data: ${data}`);
}); });
} catch (e) { } catch (e) {
console.error(`An unexpected error occured. code:${e.code},message:${e.message}`); console.error(`An unexpected error occurred. code:${e.code},message:${e.message}`);
} }
``` ```
......
...@@ -244,7 +244,7 @@ Neural Network Runtime的开发流程主要包含**模型构造**、**模型编 ...@@ -244,7 +244,7 @@ Neural Network Runtime的开发流程主要包含**模型构造**、**模型编
// 创建编译实例,用于将模型传递至底层硬件编译 // 创建编译实例,用于将模型传递至底层硬件编译
OH_NNCompilation* compilation = OH_NNCompilation_Construct(model); OH_NNCompilation* compilation = OH_NNCompilation_Construct(model);
if (compilation == nullptr) { if (compilation == nullptr) {
std::cout << "CreateCompilation failed, error happended when creating compilation." << std::endl; std::cout << "CreateCompilation failed, error happened when creating compilation." << std::endl;
return OH_NN_MEMORY_ERROR; return OH_NN_MEMORY_ERROR;
} }
......
...@@ -2808,7 +2808,7 @@ try { ...@@ -2808,7 +2808,7 @@ try {
console.error(`Fail to put Batch.code is ${err.code},message is ${err.message}`); console.error(`Fail to put Batch.code is ${err.code},message is ${err.message}`);
}); });
} catch (e) { } catch (e) {
console.error(`An unexpected error occured.code is ${e.code},message is ${e.message}`); console.error(`An unexpected error occurred.code is ${e.code},message is ${e.message}`);
} }
``` ```
...@@ -2857,7 +2857,7 @@ try { ...@@ -2857,7 +2857,7 @@ try {
}); });
}); });
} catch (e) { } catch (e) {
console.error(`An unexpected error occured.code is ${e.code},message is ${e.message}`) console.error(`An unexpected error occurred.code is ${e.code},message is ${e.message}`)
} }
``` ```
...@@ -2913,7 +2913,7 @@ try { ...@@ -2913,7 +2913,7 @@ try {
console.error(`Fail to get data.code is ${err.code},message is ${err.message} `); console.error(`Fail to get data.code is ${err.code},message is ${err.message} `);
}); });
} catch (e) { } catch (e) {
console.error(`An unexpected error occured.code is ${e.code},message is ${e.message}`) console.error(`An unexpected error occurred.code is ${e.code},message is ${e.message}`)
} }
``` ```
...@@ -3341,7 +3341,7 @@ try { ...@@ -3341,7 +3341,7 @@ try {
}); });
}); });
} catch (e) { } catch (e) {
console.error(`An unexpected error occured.code is ${e.code},message is ${e.message}`); console.error(`An unexpected error occurred.code is ${e.code},message is ${e.message}`);
} }
``` ```
...@@ -3410,7 +3410,7 @@ try { ...@@ -3410,7 +3410,7 @@ try {
console.error(`Fail to close resultset.code is ${err.code},message is ${err.message}`); console.error(`Fail to close resultset.code is ${err.code},message is ${err.message}`);
}); });
} catch (e) { } catch (e) {
console.error(`An unexpected error occured.code is ${e.code},message is ${e.code}`); console.error(`An unexpected error occurred.code is ${e.code},message is ${e.code}`);
} }
``` ```
...@@ -3474,7 +3474,7 @@ try { ...@@ -3474,7 +3474,7 @@ try {
}); });
}); });
} catch (e) { } catch (e) {
console.error(`An unexpected error occured.code is ${e.code},message is ${e.message}`); console.error(`An unexpected error occurred.code is ${e.code},message is ${e.message}`);
} }
``` ```
...@@ -3540,7 +3540,7 @@ try { ...@@ -3540,7 +3540,7 @@ try {
console.error(`Fail to get resultset.code is ${err.code},message is ${err.message}`); console.error(`Fail to get resultset.code is ${err.code},message is ${err.message}`);
}); });
} catch (e) { } catch (e) {
console.error(`An unexpected error occured.code is ${e.code},message is ${e.code}`); console.error(`An unexpected error occurred.code is ${e.code},message is ${e.code}`);
} }
``` ```
...@@ -3597,7 +3597,7 @@ try { ...@@ -3597,7 +3597,7 @@ try {
}) })
}); });
} catch (e) { } catch (e) {
console.error(`An unexpected error occured.code is ${e.code},message is ${e.code}`); console.error(`An unexpected error occurred.code is ${e.code},message is ${e.code}`);
} }
``` ```
...@@ -3655,7 +3655,7 @@ try { ...@@ -3655,7 +3655,7 @@ try {
console.error(`Fail to close resultset.code is ${err.code},message is ${err.message}`); console.error(`Fail to close resultset.code is ${err.code},message is ${err.message}`);
}); });
} catch (e) { } catch (e) {
console.error(`An unexpected error occured.code is ${e.code},message is ${e.code}`); console.error(`An unexpected error occurred.code is ${e.code},message is ${e.code}`);
} }
``` ```
...@@ -3688,7 +3688,7 @@ try { ...@@ -3688,7 +3688,7 @@ try {
} }
}); });
} catch (e) { } catch (e) {
console.error(`An unexpected error occured.code is ${e.code},message is ${e.code}`); console.error(`An unexpected error occurred.code is ${e.code},message is ${e.code}`);
} }
``` ```
...@@ -3724,7 +3724,7 @@ try { ...@@ -3724,7 +3724,7 @@ try {
console.error(`Fail to close resultset.code is ${err.code},message is ${err.message}`); console.error(`Fail to close resultset.code is ${err.code},message is ${err.message}`);
}); });
} catch (e) { } catch (e) {
console.error(`An unexpected error occured.code is ${e.code},message is ${e.code}`); console.error(`An unexpected error occurred.code is ${e.code},message is ${e.code}`);
} }
``` ```
...@@ -3782,7 +3782,7 @@ try { ...@@ -3782,7 +3782,7 @@ try {
}); });
}); });
} catch (e) { } catch (e) {
console.error(`An unexpected error occured.code is ${e.code},message is ${e.code}`); console.error(`An unexpected error occurred.code is ${e.code},message is ${e.code}`);
} }
``` ```
...@@ -3845,7 +3845,7 @@ try { ...@@ -3845,7 +3845,7 @@ try {
console.error(`Fail to get result size.code is ${err.code},message is ${err.message}`); console.error(`Fail to get result size.code is ${err.code},message is ${err.message}`);
}); });
} catch (e) { } catch (e) {
console.error(`An unexpected error occured.code is ${e.code},message is ${e.code}`); console.error(`An unexpected error occurred.code is ${e.code},message is ${e.code}`);
} }
``` ```
...@@ -4245,7 +4245,7 @@ try { ...@@ -4245,7 +4245,7 @@ try {
} }
}); });
} catch (e) { } catch (e) {
console.error(`An unexpected error occured.code is ${e.code},message is ${e.message}`); console.error(`An unexpected error occurred.code is ${e.code},message is ${e.message}`);
} }
``` ```
...@@ -4282,7 +4282,7 @@ try { ...@@ -4282,7 +4282,7 @@ try {
console.error(`Fail to commit.code is ${err.code},message is ${err.message}`); console.error(`Fail to commit.code is ${err.code},message is ${err.message}`);
}); });
} catch (e) { } catch (e) {
console.error(`An unexpected error occured.ode is ${e.code},message is ${e.message}`); console.error(`An unexpected error occurred.ode is ${e.code},message is ${e.message}`);
} }
``` ```
...@@ -4321,7 +4321,7 @@ try { ...@@ -4321,7 +4321,7 @@ try {
} }
}); });
}catch(e) { }catch(e) {
console.error(`An unexpected error occured.code is ${e.code},message is ${e.message}`); console.error(`An unexpected error occurred.code is ${e.code},message is ${e.message}`);
} }
``` ```
...@@ -4358,7 +4358,7 @@ try { ...@@ -4358,7 +4358,7 @@ try {
console.error(`Fail to rollback.code is ${err.code},message is ${err.message}`); console.error(`Fail to rollback.code is ${err.code},message is ${err.message}`);
}); });
} catch (e) { } catch (e) {
console.error(`An unexpected error occured.code is ${e.code},message is ${e.message}`); console.error(`An unexpected error occurred.code is ${e.code},message is ${e.message}`);
} }
``` ```
...@@ -4390,7 +4390,7 @@ try { ...@@ -4390,7 +4390,7 @@ try {
} }
}); });
} catch (e) { } catch (e) {
console.error(`An unexpected error occured.code is ${e.code},message is ${e.message}`); console.error(`An unexpected error occurred.code is ${e.code},message is ${e.message}`);
} }
``` ```
...@@ -4425,7 +4425,7 @@ try { ...@@ -4425,7 +4425,7 @@ try {
console.error(`Fail to enable sync.code is ${err.code},message is ${err.message}`); console.error(`Fail to enable sync.code is ${err.code},message is ${err.message}`);
}); });
} catch (e) { } catch (e) {
console.error(`An unexpected error occured.code is ${e.code},message is ${e.message}`); console.error(`An unexpected error occurred.code is ${e.code},message is ${e.message}`);
} }
``` ```
...@@ -4460,7 +4460,7 @@ try { ...@@ -4460,7 +4460,7 @@ try {
console.log('Succeeded in setting syncRange'); console.log('Succeeded in setting syncRange');
}); });
} catch (e) { } catch (e) {
console.error(`An unexpected error occured.code is ${e.code},message is ${e.message}`); console.error(`An unexpected error occurred.code is ${e.code},message is ${e.message}`);
} }
``` ```
...@@ -4498,7 +4498,7 @@ try { ...@@ -4498,7 +4498,7 @@ try {
console.error(`Fail to set syncRange.code is ${err.code},message is ${err.message}`); console.error(`Fail to set syncRange.code is ${err.code},message is ${err.message}`);
}); });
} catch (e) { } catch (e) {
console.error(`An unexpected error occured.code is ${e.code},message is ${e.message}`); console.error(`An unexpected error occurred.code is ${e.code},message is ${e.message}`);
} }
``` ```
...@@ -4531,7 +4531,7 @@ try { ...@@ -4531,7 +4531,7 @@ try {
console.log('Succeeded in setting syncParam'); console.log('Succeeded in setting syncParam');
}); });
} catch (e) { } catch (e) {
console.error(`An unexpected error occured.code is ${e.code},message is ${e.message}`); console.error(`An unexpected error occurred.code is ${e.code},message is ${e.message}`);
} }
``` ```
...@@ -4567,7 +4567,7 @@ try { ...@@ -4567,7 +4567,7 @@ try {
console.error(`Fail to set syncParam.code is ${err.code},message is ${err.message}`); console.error(`Fail to set syncParam.code is ${err.code},message is ${err.message}`);
}); });
} catch (e) { } catch (e) {
console.error(`An unexpected error occured.code is ${e.code},message is ${e.message}`); console.error(`An unexpected error occurred.code is ${e.code},message is ${e.message}`);
} }
``` ```
...@@ -4749,7 +4749,7 @@ try { ...@@ -4749,7 +4749,7 @@ try {
console.log(`dataChange callback call data: ${data}`); console.log(`dataChange callback call data: ${data}`);
}); });
} catch (e) { } catch (e) {
console.error(`An unexpected error occured.code is ${e.code},message is ${e.message}`); console.error(`An unexpected error occurred.code is ${e.code},message is ${e.message}`);
} }
``` ```
...@@ -4923,7 +4923,7 @@ try { ...@@ -4923,7 +4923,7 @@ try {
console.log('Succeeded in getting securityLevel'); console.log('Succeeded in getting securityLevel');
}); });
} catch (e) { } catch (e) {
console.error(`An unexpected error occured.code is ${e.code},message is ${e.message}`); console.error(`An unexpected error occurred.code is ${e.code},message is ${e.message}`);
} }
``` ```
...@@ -4960,7 +4960,7 @@ try { ...@@ -4960,7 +4960,7 @@ try {
console.error(`Fail to get SecurityLevel.code is ${err.code},message is ${err.message}`); console.error(`Fail to get SecurityLevel.code is ${err.code},message is ${err.message}`);
}); });
} catch (e) { } catch (e) {
console.error(`An unexpected error occured.code is ${e.code},message is ${e.message}`); console.error(`An unexpected error occurred.code is ${e.code},message is ${e.message}`);
} }
``` ```
...@@ -5770,7 +5770,7 @@ try { ...@@ -5770,7 +5770,7 @@ try {
}); });
}); });
} catch (e) { } catch (e) {
console.error(`An unexpected error occured.code is ${e.code},message is ${e.message}`); console.error(`An unexpected error occurred.code is ${e.code},message is ${e.message}`);
} }
``` ```
...@@ -5839,7 +5839,7 @@ try { ...@@ -5839,7 +5839,7 @@ try {
console.error(`Fail to close resultset.code is ${err.code},message is ${err.message}`); console.error(`Fail to close resultset.code is ${err.code},message is ${err.message}`);
}); });
} catch (e) { } catch (e) {
console.error(`An unexpected error occured.code is ${e.code},message is ${e.code}`); console.error(`An unexpected error occurred.code is ${e.code},message is ${e.code}`);
} }
``` ```
...@@ -6158,7 +6158,7 @@ try { ...@@ -6158,7 +6158,7 @@ try {
console.error(`Fail to get resultset.code is ${err.code},message is ${err.message}`); console.error(`Fail to get resultset.code is ${err.code},message is ${err.message}`);
}); });
} catch (e) { } catch (e) {
console.error(`An unexpected error occured.code is ${e.code},message is ${e.code}`); console.error(`An unexpected error occurred.code is ${e.code},message is ${e.code}`);
} }
``` ```
...@@ -6290,7 +6290,7 @@ try { ...@@ -6290,7 +6290,7 @@ try {
}) })
}); });
} catch (e) { } catch (e) {
console.error(`An unexpected error occured.code is ${e.code},message is ${e.code}`); console.error(`An unexpected error occurred.code is ${e.code},message is ${e.code}`);
} }
``` ```
...@@ -6348,7 +6348,7 @@ try { ...@@ -6348,7 +6348,7 @@ try {
console.error(`Fail to close resultset.code is ${err.code},message is ${err.message}`); console.error(`Fail to close resultset.code is ${err.code},message is ${err.message}`);
}); });
} catch (e) { } catch (e) {
console.error(`An unexpected error occured.code is ${e.code},message is ${e.code}`); console.error(`An unexpected error occurred.code is ${e.code},message is ${e.code}`);
} }
``` ```
...@@ -6406,7 +6406,7 @@ try { ...@@ -6406,7 +6406,7 @@ try {
}) })
}); });
} catch (e) { } catch (e) {
console.error(`An unexpected error occured.code is ${e.code},message is ${e.code}`); console.error(`An unexpected error occurred.code is ${e.code},message is ${e.code}`);
} }
``` ```
...@@ -6464,7 +6464,7 @@ try { ...@@ -6464,7 +6464,7 @@ try {
console.error(`Fail to close resultset.code is ${err.code},message is ${err.message}`); console.error(`Fail to close resultset.code is ${err.code},message is ${err.message}`);
}); });
} catch (e) { } catch (e) {
console.error(`An unexpected error occured.code is ${e.code},message is ${e.code}`); console.error(`An unexpected error occurred.code is ${e.code},message is ${e.code}`);
} }
``` ```
...@@ -6522,7 +6522,7 @@ try { ...@@ -6522,7 +6522,7 @@ try {
}); });
}); });
} catch (e) { } catch (e) {
console.error(`An unexpected error occured.code is ${e.code},message is ${e.code}`); console.error(`An unexpected error occurred.code is ${e.code},message is ${e.code}`);
} }
``` ```
...@@ -6585,7 +6585,7 @@ try { ...@@ -6585,7 +6585,7 @@ try {
console.error(`Fail to get result size.code is ${err.code},message is ${err.message}`); console.error(`Fail to get result size.code is ${err.code},message is ${err.message}`);
}); });
} catch (e) { } catch (e) {
console.error(`An unexpected error occured.code is ${e.code},message is ${e.code}`); console.error(`An unexpected error occurred.code is ${e.code},message is ${e.code}`);
} }
``` ```
......
...@@ -5584,7 +5584,7 @@ sensor.transformCoordinateSystem([1, 0, 0, 0, 1, 0, 0, 0, 1], {x:2, y:3}, functi ...@@ -5584,7 +5584,7 @@ sensor.transformCoordinateSystem([1, 0, 0, 0, 1, 0, 0, 0, 1], {x:2, y:3}, functi
console.error("Operation failed. Error code: " + err.code + ", message: " + err.message); console.error("Operation failed. Error code: " + err.code + ", message: " + err.message);
return; return;
} }
console.info("Operation successed. Data obtained: " + data); console.info("Operation succeeded. Data obtained: " + data);
for (var i=0; i < data.length; i++) { for (var i=0; i < data.length; i++) {
console.info("transformCoordinateSystem data[ " + i + "] = " + data[i]); console.info("transformCoordinateSystem data[ " + i + "] = " + data[i]);
} }
...@@ -5618,7 +5618,7 @@ transformCoordinateSystem(inRotationVector: Array&lt;number&gt;, coordinates: Co ...@@ -5618,7 +5618,7 @@ transformCoordinateSystem(inRotationVector: Array&lt;number&gt;, coordinates: Co
```js ```js
const promise = sensor.transformCoordinateSystem([1, 0, 0, 0, 1, 0, 0, 0, 1], {x:2, y:3}); const promise = sensor.transformCoordinateSystem([1, 0, 0, 0, 1, 0, 0, 0, 1], {x:2, y:3});
promise.then((data) => { promise.then((data) => {
console.info("Operation successed."); console.info("Operation succeeded.");
for (var i=0; i < data.length; i++) { for (var i=0; i < data.length; i++) {
console.info("transformCoordinateSystem data[ " + i + "] = " + data[i]); console.info("transformCoordinateSystem data[ " + i + "] = " + data[i]);
} }
...@@ -5718,7 +5718,7 @@ getAltitude(seaPressure: number, currentPressure: number, callback: AsyncCallbac ...@@ -5718,7 +5718,7 @@ getAltitude(seaPressure: number, currentPressure: number, callback: AsyncCallbac
"Operation failed. Error code: " + err.code + ", message: " + err.message); "Operation failed. Error code: " + err.code + ", message: " + err.message);
return; return;
} }
console.info("Successed to get getAltitude interface get data: " + data); console.info("Succeeded to get getAltitude interface get data: " + data);
}); });
``` ```
...@@ -5783,7 +5783,7 @@ getGeomagneticDip(inclinationMatrix: Array&lt;number&gt;, callback: AsyncCallbac ...@@ -5783,7 +5783,7 @@ getGeomagneticDip(inclinationMatrix: Array&lt;number&gt;, callback: AsyncCallbac
err.message); err.message);
return; return;
} }
console.info("Successed to get getGeomagneticDip interface get data: " + data); console.info("Succeeded to get getGeomagneticDip interface get data: " + data);
}) })
``` ```
...@@ -5814,7 +5814,7 @@ getGeomagneticDip(inclinationMatrix: Array&lt;number&gt;): Promise&lt;number&gt; ...@@ -5814,7 +5814,7 @@ getGeomagneticDip(inclinationMatrix: Array&lt;number&gt;): Promise&lt;number&gt;
```js ```js
const promise = sensor.getGeomagneticDip([1, 0, 0, 0, 1, 0, 0, 0, 1]); const promise = sensor.getGeomagneticDip([1, 0, 0, 0, 1, 0, 0, 0, 1]);
promise.then((data) => { promise.then((data) => {
console.info('getGeomagneticDip_promise successed', data); console.info('getGeomagneticDip_promise succeeded', data);
}).catch((err) => { }).catch((err) => {
console.error("Operation failed"); console.error("Operation failed");
}) })
...@@ -5882,7 +5882,7 @@ getAngleModify(currentRotationMatrix: Array&lt;number&gt;, preRotationMatrix: Ar ...@@ -5882,7 +5882,7 @@ getAngleModify(currentRotationMatrix: Array&lt;number&gt;, preRotationMatrix: Ar
```js ```js
const promise = sensor.getAngleModify([1,0,0,0,1,0,0,0,1], [1,0,0,0,0.87,-0.50,0,0.50,0.87]); const promise = sensor.getAngleModify([1,0,0,0,1,0,0,0,1], [1,0,0,0,0.87,-0.50,0,0.50,0.87]);
promise.then((data) => { promise.then((data) => {
console.info('getAngleModifiy_promise success'); console.info('getAngleModify_promise success');
for (var i=0; i < data.length; i++) { for (var i=0; i < data.length; i++) {
console.info("data[" + i + "]: " + data[i]); console.info("data[" + i + "]: " + data[i]);
} }
...@@ -6022,7 +6022,7 @@ createQuaternion(rotationVector: Array&lt;number&gt;): Promise&lt;Array&lt;numbe ...@@ -6022,7 +6022,7 @@ createQuaternion(rotationVector: Array&lt;number&gt;): Promise&lt;Array&lt;numbe
```js ```js
const promise = sensor.createQuaternion([0.20046076, 0.21907, 0.73978853, 0.60376877]); const promise = sensor.createQuaternion([0.20046076, 0.21907, 0.73978853, 0.60376877]);
promise.then((data) => { promise.then((data) => {
console.info('createQuaternion_promise successed'); console.info('createQuaternion_promise succeeded');
for (var i=0; i < data.length; i++) { for (var i=0; i < data.length; i++) {
console.info("data[" + i + "]: " + data[i]); console.info("data[" + i + "]: " + data[i]);
} }
...@@ -6058,7 +6058,7 @@ getDirection(rotationMatrix: Array&lt;number&gt;, callback: AsyncCallback&lt;Arr ...@@ -6058,7 +6058,7 @@ getDirection(rotationMatrix: Array&lt;number&gt;, callback: AsyncCallback&lt;Arr
err.message); err.message);
return; return;
} }
console.info("SensorJsAPI--->Successed to get getDirection interface get data: " + data); console.info("SensorJsAPI--->Succeeded to get getDirection interface get data: " + data);
for (var i = 1; i < data.length; i++) { for (var i = 1; i < data.length; i++) {
console.info("sensor_getDirection_callback" + data[i]); console.info("sensor_getDirection_callback" + data[i]);
} }
......
...@@ -456,7 +456,7 @@ function func(key, value){ ...@@ -456,7 +456,7 @@ function func(key, value){
arrTag[i] = 'key:'+key+' value:'+ value.getDepth(); arrTag[i] = 'key:'+key+' value:'+ value.getDepth();
str += arrTag[i]; str += arrTag[i];
i++; i++;
return true; // Determines whether to continuely parse, which is used to continue or terminate parsing. return true; // Determines whether to continually parse, which is used to continue or terminate parsing.
} }
let options = {supportDoctype:true, ignoreNameSpace:true, tokenValueCallbackFunction:func} let options = {supportDoctype:true, ignoreNameSpace:true, tokenValueCallbackFunction:func}
that.parse(options); that.parse(options);
...@@ -527,7 +527,7 @@ function func(key, value){ ...@@ -527,7 +527,7 @@ function func(key, value){
arrTag[i] = 'key:'+key+' value:'+ value.getColumnNumber(); arrTag[i] = 'key:'+key+' value:'+ value.getColumnNumber();
str += arrTag[i]; str += arrTag[i];
i++; i++;
return true; // Determines whether to continuely parse, which is used to continue or terminate parsing. return true; // Determines whether to continually parse, which is used to continue or terminate parsing.
} }
let options = {supportDoctype:true, ignoreNameSpace:true, tokenValueCallbackFunction:func} let options = {supportDoctype:true, ignoreNameSpace:true, tokenValueCallbackFunction:func}
that.parse(options); that.parse(options);
...@@ -574,7 +574,7 @@ function func(key, value){ ...@@ -574,7 +574,7 @@ function func(key, value){
arrTag[i] = 'key:'+key+' value:'+ value.getDepth(); arrTag[i] = 'key:'+key+' value:'+ value.getDepth();
str += arrTag[i]; str += arrTag[i];
i++; i++;
return true; // Determines whether to continuely parse, which is used to continue or terminate parsing. return true; // Determines whether to continually parse, which is used to continue or terminate parsing.
} }
let options = {supportDoctype:true, ignoreNameSpace:true, tokenValueCallbackFunction:func} let options = {supportDoctype:true, ignoreNameSpace:true, tokenValueCallbackFunction:func}
that.parse(options); that.parse(options);
...@@ -624,7 +624,7 @@ function func(key, value){ ...@@ -624,7 +624,7 @@ function func(key, value){
arrTag[i] = 'key:'+key+' value:'+ value.getLineNumber(); arrTag[i] = 'key:'+key+' value:'+ value.getLineNumber();
str += arrTag[i]; str += arrTag[i];
i++; i++;
return true; // Determines whether to continuely parse, which is used to continue or terminate parsing. return true; // Determines whether to continually parse, which is used to continue or terminate parsing.
} }
let options = {supportDoctype:true, ignoreNameSpace:true, tokenValueCallbackFunction:func} let options = {supportDoctype:true, ignoreNameSpace:true, tokenValueCallbackFunction:func}
that.parse(options); that.parse(options);
...@@ -671,7 +671,7 @@ function func(key, value){ ...@@ -671,7 +671,7 @@ function func(key, value){
arrTag[i] = 'key:'+key+' value:'+ value.getName(); arrTag[i] = 'key:'+key+' value:'+ value.getName();
str += arrTag[i]; str += arrTag[i];
i++; i++;
return true; // Determines whether to continuely parse, which is used to continue or terminate parsing. return true; // Determines whether to continually parse, which is used to continue or terminate parsing.
} }
let options = {supportDoctype:true, ignoreNameSpace:true, tokenValueCallbackFunction:func} let options = {supportDoctype:true, ignoreNameSpace:true, tokenValueCallbackFunction:func}
that.parse(options); that.parse(options);
...@@ -717,7 +717,7 @@ function func(key, value){ ...@@ -717,7 +717,7 @@ function func(key, value){
arrTag[i] = 'key:'+key+' value:'+ value.getNamespace(); arrTag[i] = 'key:'+key+' value:'+ value.getNamespace();
str += arrTag[i]; str += arrTag[i];
i++; i++;
return true; // Determines whether to continuely parse, which is used to continue or terminate parsing. return true; // Determines whether to continually parse, which is used to continue or terminate parsing.
} }
let options = {supportDoctype:true, ignoreNameSpace:true, tokenValueCallbackFunction:func} let options = {supportDoctype:true, ignoreNameSpace:true, tokenValueCallbackFunction:func}
that.parse(options); that.parse(options);
...@@ -763,7 +763,7 @@ function func(key, value){ ...@@ -763,7 +763,7 @@ function func(key, value){
arrTag[i] = 'key:'+key+' value:'+ value.getPrefix(); arrTag[i] = 'key:'+key+' value:'+ value.getPrefix();
str += arrTag[i]; str += arrTag[i];
i++; i++;
return true; // Determines whether to continuely parse, which is used to continue or terminate parsing. return true; // Determines whether to continually parse, which is used to continue or terminate parsing.
} }
let options = {supportDoctype:true, ignoreNameSpace:true, tokenValueCallbackFunction:func} let options = {supportDoctype:true, ignoreNameSpace:true, tokenValueCallbackFunction:func}
that.parse(options); that.parse(options);
...@@ -810,7 +810,7 @@ function func(key, value){ ...@@ -810,7 +810,7 @@ function func(key, value){
arrTag[i] = 'key:'+key+' value:'+ value.getText(); arrTag[i] = 'key:'+key+' value:'+ value.getText();
str += arrTag[i]; str += arrTag[i];
i++; i++;
return true; // Determines whether to continuely parse, which is used to continue or terminate parsing. return true; // Determines whether to continually parse, which is used to continue or terminate parsing.
} }
let options = {supportDoctype:true, ignoreNameSpace:true, tokenValueCallbackFunction:func} let options = {supportDoctype:true, ignoreNameSpace:true, tokenValueCallbackFunction:func}
that.parse(options); that.parse(options);
...@@ -856,7 +856,7 @@ function func(key, value){ ...@@ -856,7 +856,7 @@ function func(key, value){
arrTag[i] = 'key:'+key+' value:'+ value.isEmptyElementTag(); arrTag[i] = 'key:'+key+' value:'+ value.isEmptyElementTag();
str += arrTag[i]; str += arrTag[i];
i++; i++;
return true; // Determines whether to continuely parse, which is used to continue or terminate parsing. return true; // Determines whether to continually parse, which is used to continue or terminate parsing.
} }
let options = {supportDoctype:true, ignoreNameSpace:true, tokenValueCallbackFunction:func} let options = {supportDoctype:true, ignoreNameSpace:true, tokenValueCallbackFunction:func}
that.parse(options); that.parse(options);
...@@ -902,7 +902,7 @@ function func(key, value){ ...@@ -902,7 +902,7 @@ function func(key, value){
arrTag[i] = 'key:'+key+' value:'+ value.isWhitespace(); arrTag[i] = 'key:'+key+' value:'+ value.isWhitespace();
str += arrTag[i]; str += arrTag[i];
i++; i++;
return true; // Determines whether to continuely parse, which is used to continue or terminate parsing. return true; // Determines whether to continually parse, which is used to continue or terminate parsing.
} }
let options = {supportDoctype:true, ignoreNameSpace:true, tokenValueCallbackFunction:func} let options = {supportDoctype:true, ignoreNameSpace:true, tokenValueCallbackFunction:func}
that.parse(options); that.parse(options);
...@@ -947,7 +947,7 @@ function func(key, value){ ...@@ -947,7 +947,7 @@ function func(key, value){
arrTag[i] = 'key:'+key+' value:'+ value.getAttributeCount(); arrTag[i] = 'key:'+key+' value:'+ value.getAttributeCount();
str += arrTag[i]; str += arrTag[i];
i++; i++;
return true; // Determines whether to continuely parse, which is used to continue or terminate parsing. return true; // Determines whether to continually parse, which is used to continue or terminate parsing.
} }
let options = {supportDoctype:true, ignoreNameSpace:true, tokenValueCallbackFunction:func} let options = {supportDoctype:true, ignoreNameSpace:true, tokenValueCallbackFunction:func}
that.parse(options); that.parse(options);
......
...@@ -379,7 +379,7 @@ doSomethingThird() ...@@ -379,7 +379,7 @@ doSomethingThird()
还有一些情况下,大家在做某件事的时候,会本能的以为别人也有同样的背景认识。但事实往往并不是这样。在编程时也是一样。 还有一些情况下,大家在做某件事的时候,会本能的以为别人也有同样的背景认识。但事实往往并不是这样。在编程时也是一样。
例如,对于一个描述编程语言的字段,可能会将其命名为`language`。这是因为大家默认认为已经在讨论编程语言了,但是`language`到底是编程语言还是国际化语言?是不是叫做`programmingLanuage`更好一些呢? 例如,对于一个描述编程语言的字段,可能会将其命名为`language`。这是因为大家默认认为已经在讨论编程语言了,但是`language`到底是编程语言还是国际化语言?是不是叫做`programmingLanguage`更好一些呢?
当然,对于这一条还是要举一个反例,不要走到另外一个极端:如果类名或者namespace名称中已经明确带了一个前缀,在函数中就没必要再重复一遍了。毫无信息量的冗余是没有必要的。 当然,对于这一条还是要举一个反例,不要走到另外一个极端:如果类名或者namespace名称中已经明确带了一个前缀,在函数中就没必要再重复一遍了。毫无信息量的冗余是没有必要的。
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册