diff --git a/en/application-dev/ability/ability-brief.md b/en/application-dev/ability/ability-brief.md index 283037aedc8c219bee48511898dd300a0c05dc3b..187064a1c67d7bd21c823a945cca79366428d3f8 100644 --- a/en/application-dev/ability/ability-brief.md +++ b/en/application-dev/ability/ability-brief.md @@ -29,6 +29,3 @@ In addition, the following differences exist in the development process: For details about the two models, see [FA Model Overview](fa-brief.md) and [Stage Model Overview](stage-brief.md). -## Samples -The following sample is provided to help you better understand how to develop abilities: -- [Intra- and Inter-page Navigation](https://gitee.com/openharmony/codelabs/tree/master/Ability/PageAbility) diff --git a/en/application-dev/ability/fa-brief.md b/en/application-dev/ability/fa-brief.md index cca353bb06253a17bbc7cfec2b823c67b8568ad0..dac1a3277b9bfeecefc7f341d63073a3b9ed35fd 100644 --- a/en/application-dev/ability/fa-brief.md +++ b/en/application-dev/ability/fa-brief.md @@ -34,17 +34,3 @@ Currently, the **app.js** file provides only the **onCreate** and **onDestroy** An application exclusively uses an independent process, and an ability exclusively uses an independent thread. When an ability is started for the first time, an application process as well as a thread for this ability is created. After the application is started, other abilities in the application are started, and a thread is created for every of these started abilities. Each ability is bound to an independent JSRuntime instance. In this way, abilities are isolated from each other. ![fa-threading-model](figures/fa-threading-model.png) -## Samples -The following sample is provided to help you better understand how to develop abilities: - -- [`DistributeCalc`: Distributed Calculator (eTS, API version 8)](https://gitee.com/openharmony/app_samples/tree/master/Preset/DistributeCalc) -- [`DistributeGraffiti`: Distributed Graffiti (eTS, API version 8)](https://gitee.com/openharmony/app_samples/tree/master/ability/DistributedGraffiti) - -- [Remote FA Startup](https://gitee.com/openharmony/codelabs/tree/master/Distributed/RemoteStartFA) -- [Distributed News App](https://gitee.com/openharmony/codelabs/tree/master/Distributed/NewsDemo) -- [Synced Sketchpad (eTS)](https://gitee.com/openharmony/codelabs/tree/master/Distributed/DistributeDatabaseDrawEts) -- [Distributed Authentication (JS)](https://gitee.com/openharmony/codelabs/tree/master/Distributed/GameAuthOpenH) -- [Distributed Game Controller (eTS)](https://gitee.com/openharmony/codelabs/tree/master/Distributed/HandleGameApplication) -- [Distributed Mail System (eTS)](https://gitee.com/openharmony/codelabs/tree/master/Distributed/OHMailETS) -- [Distributed Jigsaw Puzzle (eTS)](https://gitee.com/openharmony/codelabs/tree/master/Distributed/OpenHarmonyPictureGame) -- [Distributed Control (eTS)](https://gitee.com/openharmony/codelabs/tree/master/Distributed/RemoteControllerETS) diff --git a/en/application-dev/ability/fa-dataability.md b/en/application-dev/ability/fa-dataability.md index c2a72cef31d5416c5a062689bac28af2d7e41c5b..81e67af18e17fb12682a2f21decd80d10ac79a9c 100644 --- a/en/application-dev/ability/fa-dataability.md +++ b/en/application-dev/ability/fa-dataability.md @@ -129,7 +129,7 @@ The basic dependency packages include: import featureAbility from '@ohos.ability.featureAbility' import ohos_data_ability from '@ohos.data.dataAbility' import ohos_data_rdb from '@ohos.data.rdb' - + var urivar = "dataability:///com.ix.DataAbility" var DAHelper = featureAbility.acquireDataAbilityHelper( urivar @@ -283,9 +283,3 @@ The basic dependency packages include: ] ); ``` - -## Samples - -The following sample is provided to help you better understand how to develop Data abilities: - -- [`DataAbility`: Creation and Access of Data Abilities (eTS, API version 8)](https://gitee.com/openharmony/app_samples/tree/master/ability/DataAbility) diff --git a/en/application-dev/ability/fa-formability.md b/en/application-dev/ability/fa-formability.md index 8a790318cf11494e519496096993bee63d567ce8..df433bbf7f7e9d9ff8c24ef389e965bc74ece74c 100644 --- a/en/application-dev/ability/fa-formability.md +++ b/en/application-dev/ability/fa-formability.md @@ -348,9 +348,3 @@ You can use HML, CSS, and JSON to develop the UI page for a JavaScript-programme Now you've got a widget shown below. ![fa-form-example](figures/fa-form-example.png) - -## Samples - -The following samples are provided to help you better understand how to develop a widget on the FA model: -- [`FormAbility`: FA Model Widget (JS, API version 8)](https://gitee.com/openharmony/app_samples/tree/master/ability/FormAbility) -- [`FormLauncher`: Widget Host (eTS, API version 8)](https://gitee.com/openharmony/app_samples/tree/master/ability/FormLauncher) diff --git a/en/application-dev/ability/fa-pageability.md b/en/application-dev/ability/fa-pageability.md index 296ca6b1afa2e3e3fdc05da9a3489dfd234ee991..5700907bccb27931f1f8f39f9bf2884391ab1609 100644 --- a/en/application-dev/ability/fa-pageability.md +++ b/en/application-dev/ability/fa-pageability.md @@ -261,7 +261,3 @@ export default { }, } ``` -## Samples -The following sample is provided to help you better understand how to develop a Page ability: - -- [`DMS`: Distributed Demo (eTS, API version 8)](https://gitee.com/openharmony/app_samples/tree/master/ability/DMS) diff --git a/en/application-dev/ability/fa-serviceability.md b/en/application-dev/ability/fa-serviceability.md index 86e863eddf5bb5ab8f550e32a2e90fa45022143d..60961112f9084872f53efbe53cea62d2c8513365 100644 --- a/en/application-dev/ability/fa-serviceability.md +++ b/en/application-dev/ability/fa-serviceability.md @@ -399,9 +399,3 @@ export default { } }; ``` - -## Samples - -The following samples are provided to help you better understand how to develop a Service ability: -- [`ServiceAbility`: Service Ability Creation and Use (eTS, API version 8)](https://gitee.com/openharmony/app_samples/tree/master/ability/ServiceAbility) -- [`DMS`: Distributed Demo (eTS, API version 8)](https://gitee.com/openharmony/app_samples/tree/master/ability/DMS) diff --git a/en/application-dev/ability/stage-ability.md b/en/application-dev/ability/stage-ability.md index 4b05e88f1ccdb990a454a538a001aadb7bc45a80..936e1c1b8942f52ec0b470ae851a10cdf0e82011 100644 --- a/en/application-dev/ability/stage-ability.md +++ b/en/application-dev/ability/stage-ability.md @@ -78,29 +78,29 @@ To create Page abilities for an application in the stage model, you must impleme onCreate(want, launchParam) { console.log("MainAbility onCreate") } - + onDestroy() { console.log("MainAbility onDestroy") } - + onWindowStageCreate(windowStage) { console.log("MainAbility onWindowStageCreate") - + windowStage.loadContent("pages/index").then((data) => { console.log("MainAbility load content succeed with data: " + JSON.stringify(data)) }).catch((error) => { console.error("MainAbility load content failed with error: "+ JSON.stringify(error)) }) } - + onWindowStageDestroy() { console.log("MainAbility onWindowStageDestroy") } - + onForeground() { console.log("MainAbility onForeground") } - + onBackground() { console.log("MainAbility onBackground") } @@ -318,7 +318,3 @@ struct Index { } } ``` - -## Samples -The following sample is provided to help you better understand how to develop an ability on the stage model: -- [`StageCallAbility`: Stage Call Ability Creation and Usage (eTS, API version 9)](https://gitee.com/openharmony/app_samples/tree/master/ability/StageCallAbility) diff --git a/en/application-dev/ability/stage-call.md b/en/application-dev/ability/stage-call.md index e402454ddf6afd1b1aab71601e52b19d8010b425..aaa9a9918345c52015969245c3bbba3efbb81048 100644 --- a/en/application-dev/ability/stage-call.md +++ b/en/application-dev/ability/stage-call.md @@ -247,7 +247,3 @@ try { Logger.error(TAG, `caller release failed with ${error}`) } ``` - -## Samples -The following sample is provided to help you better understand how to develop an ability call in the stage model: -- [`StageCallAbility`: Stage Call Ability Creation and Usage (eTS, API version 9)](https://gitee.com/openharmony/app_samples/tree/master/ability/StageCallAbility) diff --git a/en/application-dev/ability/stage-formextension.md b/en/application-dev/ability/stage-formextension.md index c54ae466d615b05da05ebbde0faf2ff8e97f7c7b..5fa0f92eea67dc6b90a69c7ad32a9ec97a62b540 100644 --- a/en/application-dev/ability/stage-formextension.md +++ b/en/application-dev/ability/stage-formextension.md @@ -358,8 +358,3 @@ You can use HML, CSS, and JSON to develop the UI page for a JavaScript-programme Now you've got a widget shown below. ![fa-form-example](figures/fa-form-example.png) - -## Samples - -The following sample is provided to help you better understand how to develop a widget on the stage model: -- [`FormExtAbility`: Stage Model Widget (eTS, JS, API version 9)](https://gitee.com/openharmony/app_samples/tree/master/ability/FormExtAbility) diff --git a/en/application-dev/ability/stage-serviceextension.md b/en/application-dev/ability/stage-serviceextension.md index 3438462d05164099ce3e9c258ef05c8e3668f6fb..a41526e05223b4f944f0977b715a548aa994bb12 100644 --- a/en/application-dev/ability/stage-serviceextension.md +++ b/en/application-dev/ability/stage-serviceextension.md @@ -75,8 +75,3 @@ OpenHarmony does not support creation of a Service Extension ability for third-p "srcEntrance": "./ets/ServiceExtAbility/ServiceExtAbility.ts" }] ``` - -## Samples - -The following sample is provided to help you better understand how to develop Service Extension abilities: -- [`ServiceExtAbility`: Stage Extension Ability Creation and Usage (eTS, API version 9)](https://gitee.com/openharmony/app_samples/tree/master/ability/StageCallAbility) diff --git a/en/application-dev/connectivity/http-request.md b/en/application-dev/connectivity/http-request.md index 0a69a2e0f79a874def98d2be58d26d6dec0c3874..b43d1961722f6e6265f0a8b649208c1737f05726 100644 --- a/en/application-dev/connectivity/http-request.md +++ b/en/application-dev/connectivity/http-request.md @@ -71,7 +71,3 @@ httpRequest.request( } ); ``` - -## Samples -The following sample is provided to help you better understand how to develop the HTTP data request feature: -- [`Http`: HTTP Data Request (eTS) (API 8)](https://gitee.com/openharmony/app_samples/tree/master/Network/Http) diff --git a/en/application-dev/connectivity/socket-connection.md b/en/application-dev/connectivity/socket-connection.md index 9444946bda64eadb546cfd282e8d5e4e2f670256..15f38e97a75585520cf60534d03a4c1812001716 100644 --- a/en/application-dev/connectivity/socket-connection.md +++ b/en/application-dev/connectivity/socket-connection.md @@ -122,7 +122,3 @@ The implementation is similar for UDPSocket and TCPSocket. The following uses th tcp.off('close'); }, 30 * 1000); ``` - -## Samples -The following sample is provided to help you better understand how to develop the socket connection feature: -- [`Socket`: Socket Connection (eTS) (API 8)](https://gitee.com/openharmony/app_samples/tree/master/Network/Socket) diff --git a/en/application-dev/device/sensor-guidelines.md b/en/application-dev/device/sensor-guidelines.md index ca434c9639e064dda463873dee8fdf701271181b..f47656b4d744f1303356fd3ee601b43becfadec6 100644 --- a/en/application-dev/device/sensor-guidelines.md +++ b/en/application-dev/device/sensor-guidelines.md @@ -123,8 +123,3 @@ console.error(error); } ``` -## Samples - -The following sample is provided to help you better understand how to develop sensors: - -- [`Sensor`: sensor (eTS, API 8)](https://gitee.com/openharmony/app_samples/tree/master/device/Sensor) diff --git a/en/application-dev/device/vibrator-guidelines.md b/en/application-dev/device/vibrator-guidelines.md index 528787208a9f6f2fe08178b6106db8aaf5b746ee..9731fa6cec8da388719b61cf7cf7b0e542f87ca4 100644 --- a/en/application-dev/device/vibrator-guidelines.md +++ b/en/application-dev/device/vibrator-guidelines.md @@ -84,9 +84,3 @@ For details about the APIs, see [Vibrator](../reference/apis/js-apis-vibrator.md }; }) ``` - -## Samples - -The following sample is provided to help you better understand how to develop vibrators: - -- [`Vibrator`: vibrator (eTS, API version 8)](https://gitee.com/openharmony/app_samples/tree/master/device/Vibrator) diff --git a/en/application-dev/dfx/hiappevent-guidelines.md b/en/application-dev/dfx/hiappevent-guidelines.md index ee553b735fb510d78ee6531e0a8a71fa99fc53bb..e1d4cddeb2ff96c8a07a6df84382ad0b8d22464c 100644 --- a/en/application-dev/dfx/hiappevent-guidelines.md +++ b/en/application-dev/dfx/hiappevent-guidelines.md @@ -88,9 +88,3 @@ In this example, an application event is logged after the application startup ex ``` 2. Tap the run button on the application UI to run the project. - -## Samples - -The following sample is provided to help you better understand how to develop the application event logging feature: - -- [`JsDotTest`: Event Logging Test (JavaScript) (API 8)](https://gitee.com/openharmony/app_samples/tree/master/DFX/JsDotTest) diff --git a/en/application-dev/internationalization/intl-guidelines.md b/en/application-dev/internationalization/intl-guidelines.md index 76c00eb557816681efb54e9e7ec5d0a3754471b6..184d3b6150d9729d4008caa2455fb9126b3f1906 100644 --- a/en/application-dev/internationalization/intl-guidelines.md +++ b/en/application-dev/internationalization/intl-guidelines.md @@ -301,9 +301,3 @@ According to grammars in certain languages, the singular or plural form of a nou ``` var options = numberFormat.resolvedOptions(); ``` - -## Samples - -The following sample is provided to help you better understand how to develop internationalization capabilities: - --[`International`: Internationalization (JS) (API7)](https://gitee.com/openharmony/app_samples/tree/master/UI/International) diff --git a/en/application-dev/media/audio-playback.md b/en/application-dev/media/audio-playback.md index b425aa8618b7a9d40f23bcc6de622ab30f03d0b1..cb0510742bacf95611c0ecc7e7fb648db75bb7fa 100644 --- a/en/application-dev/media/audio-playback.md +++ b/en/application-dev/media/audio-playback.md @@ -251,12 +251,3 @@ export class AudioDemo { } } ``` - -## Samples - -The following samples are provided to help you better understand how to develop audio playback: - -- [`JsDistributedMusicPlayer`: Distributed Music Player (JS, API version 7)](https://gitee.com/openharmony/app_samples/tree/master/ability/JsDistributedMusicPlayer) -- [`JsAudioPlayer`: Audio Playback and Management (JS, API version 7)](https://gitee.com/openharmony/app_samples/tree/master/media/JsAudioPlayer) -- [`eTsAudioPlayer`: Audio Player (eTS)](https://gitee.com/openharmony/app_samples/blob/master/media/Recorder/entry/src/main/ets/MainAbility/pages/Play.ets) -- [Audio Player](https://gitee.com/openharmony/codelabs/tree/master/Media/Audio_OH_ETS) diff --git a/en/application-dev/media/audio-recorder.md b/en/application-dev/media/audio-recorder.md index ee93e267eb4a12fcdc7facf044e16248a938f266..b2686af80980cad565ab65fd1166217baba23154 100644 --- a/en/application-dev/media/audio-recorder.md +++ b/en/application-dev/media/audio-recorder.md @@ -185,11 +185,3 @@ export class AudioRecorderDemo { } } ``` - -## Samples - -The following samples are provided to help you better understand how to develop audio recording: - -- [`Recorder`: Recorder (eTS, API version 8)](https://gitee.com/openharmony/app_samples/tree/master/media/Recorder) -- [`eTsAudioPlayer`: Audio Player (eTS)](https://gitee.com/openharmony/app_samples/blob/master/media/Recorder/entry/src/main/ets/MainAbility/pages/Play.ets) -- [Audio Player](https://gitee.com/openharmony/codelabs/tree/master/Media/Audio_OH_ETS) diff --git a/en/application-dev/media/video-playback.md b/en/application-dev/media/video-playback.md index 3aab853a699f7ac9b2d9fe2a6f7da9bf03d994cd..5b98b99e44b336ae54edfa4ba0edb4a70087c368 100644 --- a/en/application-dev/media/video-playback.md +++ b/en/application-dev/media/video-playback.md @@ -445,8 +445,3 @@ export class VideoPlayerDemo { } } ``` - -## Samples -The following samples are provided to help you better understand how to develop video playback: - -- [`VideoPlayer`: Video Playback (eTS, API version 9)](https://gitee.com/openharmony/app_samples/tree/master/media/VideoPlayer) diff --git a/en/application-dev/napi/drawing-guidelines.md b/en/application-dev/napi/drawing-guidelines.md index e813f84d92d4155e78c9ca651af6a3e3cd010232..7cbf0e3d9e10bb6d8d346e8f6a9910771c523434 100644 --- a/en/application-dev/napi/drawing-guidelines.md +++ b/en/application-dev/napi/drawing-guidelines.md @@ -200,9 +200,3 @@ The following steps describe how to use the text drawing and display feature of double position[2] = {10.0, 15.0}; OH_Drawing_TypographyPaint(typography, cCanvas, position[0], position[1]); ``` - -## Samples - -The following samples are provided to help you better understand how to use the Native Drawing module: -* [2D Graphics Drawing Using Native Drawing](https://gitee.com/openharmony/graphic_graphic_2d/blob/master/rosen/samples/2d_graphics/drawing_c_sample.cpp) -* [Text Drawing and Painting Using Native Drawing](https://gitee.com/openharmony/graphic_graphic_2d/blob/master/rosen/samples/text/renderservice/drawing_text_c_sample.cpp) diff --git a/en/application-dev/notification/common-event.md b/en/application-dev/notification/common-event.md index f46e565f2a9d203a056e6f9ceed055b81e8dcf08..3884cf1c364b7d2e92e11a4560ad46e6997eade7 100644 --- a/en/application-dev/notification/common-event.md +++ b/en/application-dev/notification/common-event.md @@ -169,9 +169,3 @@ if (this.subscriber != null) { }) } ``` - -## Samples - -The following sample is provided to help you better understand how to use the common event functionality: - -- [`CommonEvent`: eTS Common Event (API 8)](https://gitee.com/openharmony/app_samples/tree/master/Notification/CommonEvent) diff --git a/en/application-dev/notification/notification-guidelines.md b/en/application-dev/notification/notification-guidelines.md index 107346659df11ffa808dc8701c9c971721a13282..9d4ce8d3b78bc59c3b92ac43b85c6415d67b03d6 100644 --- a/en/application-dev/notification/notification-guidelines.md +++ b/en/application-dev/notification/notification-guidelines.md @@ -256,10 +256,3 @@ function cancelCallback(err) { Notification.cancel(1, "label", cancelCallback) ``` - - -## Samples - -The following sample is provided to help you better understand how to develop notification functions: - -[`Notification`: Notification (eTS, API 8)](https://gitee.com/openharmony/app_samples/tree/master/common/Notification) \ No newline at end of file diff --git a/en/application-dev/reference/apis/js-apis-distributed-data.md b/en/application-dev/reference/apis/js-apis-distributed-data.md index 91401eaf796ee5aca8ac30c05bf0c2a238932b89..5e0ec0a1573bb239d3c71d06ee04e7d5151bd146 100644 --- a/en/application-dev/reference/apis/js-apis-distributed-data.md +++ b/en/application-dev/reference/apis/js-apis-distributed-data.md @@ -1817,10 +1817,12 @@ Creates a **Query** object to specify the number of results and where to start. **Example** ```js +let total = 10; +let offset = 1; try { let query = new distributedData.Query(); query.notEqualTo("field", "value"); - query.limit("total", "offset"); + query.limit(total, offset); console.log("query is " + query.getSqlLike()); query = null; } catch (e) { diff --git a/en/application-dev/task-management/background-task-dev-guide.md b/en/application-dev/task-management/background-task-dev-guide.md index 772a47b86cdf8cdc14d00cf077154344dc58d726..a672953162ab6f9366f3f8682dd7c43983b35c20 100644 --- a/en/application-dev/task-management/background-task-dev-guide.md +++ b/en/application-dev/task-management/background-task-dev-guide.md @@ -284,9 +284,3 @@ export default { } }; ``` - -## Samples - -The following sample is provided to help you better understand how to develop background task management: - -- [`BackgroundTaskManager`: Background Task Management (eTS, API version 8)](https://gitee.com/openharmony/app_samples/tree/master/ResourcesSchedule/BackgroundTaskManager) diff --git a/zh-cn/application-dev/reference/apis/js-apis-distributed-data.md b/zh-cn/application-dev/reference/apis/js-apis-distributed-data.md index 6936567d78e44a36a5c2deac7b7b1f68661677dc..3d10105016acd3641e8e186df8c54989aecae338 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-distributed-data.md +++ b/zh-cn/application-dev/reference/apis/js-apis-distributed-data.md @@ -1827,10 +1827,12 @@ limit(total: number, offset: number): Query **示例:** ```js +let total = 10; +let offset = 1; try { let query = new distributedData.Query(); query.notEqualTo("field", "value"); - query.limit("total", "offset"); + query.limit(total, offset); console.log("query is " + query.getSqlLike()); query = null; } catch (e) {