diff --git a/AnalysisKit/entry/src/main/ets/entryability/EntryAbility.ets b/AnalysisKit/entry/src/main/ets/entryability/EntryAbility.ets index 05607603bb65b57510b7fc2eeab19ff5f1c0a14c..e8762bf4820d7dcd4f22b345a9bf0eb98b8e074f 100644 --- a/AnalysisKit/entry/src/main/ets/entryability/EntryAbility.ets +++ b/AnalysisKit/entry/src/main/ets/entryability/EntryAbility.ets @@ -23,10 +23,10 @@ import { window } from '@kit.ArkUI'; let callback: errorManager.ErrorObserver = { onUnhandledException: (errMsg) => { - console.log('Callback when an uncaught exception occurs,onUnhandledException:', errMsg); + console.log('Callback when an uncaught exception occurs,onUnhandledException:', errMsg); }, onException: (errorObj) => { - console.log('The callback when an exception is reported to the JS layer,onException'); + console.log('The callback when an exception is reported to the JS layer,onException'); console.log('onException, name: ', errorObj.name); console.log('onException, message: ', errorObj.message); if (typeof (errorObj.stack) === 'string') { diff --git a/ArkTS/entry/src/main/ets/pages/Worker2.ets b/ArkTS/entry/src/main/ets/pages/Worker2.ets index 0e092223fcaa539e6015fd2153f6776124cb1b72..0e35b7e86a2935184b8e4846c6b84659d97ea0be 100644 --- a/ArkTS/entry/src/main/ets/pages/Worker2.ets +++ b/ArkTS/entry/src/main/ets/pages/Worker2.ets @@ -20,7 +20,7 @@ // [Start MultipleWorkerInstances4] import { ErrorEvent, MessageEvents, ThreadWorkerGlobalScope, worker, process } from '@kit.ArkTS'; -const worker2: string = 'worker2='; +const worker2: string = 'worker2'; const workerPort: ThreadWorkerGlobalScope = worker.workerPort; workerPort.onmessage = (e: MessageEvents) => { diff --git a/Ndk/Ndk2/ArkTSCallNativeNapiCreateBuffer/src/main/cpp/CreatBuffer.h b/Ndk/Ndk2/ArkTSCallNativeNapiCreateBuffer/src/main/cpp/CreateBuffer.h similarity index 94% rename from Ndk/Ndk2/ArkTSCallNativeNapiCreateBuffer/src/main/cpp/CreatBuffer.h rename to Ndk/Ndk2/ArkTSCallNativeNapiCreateBuffer/src/main/cpp/CreateBuffer.h index aa59d8ad118c5ba2c0165e1b450d81dcdd8727c6..53e1202ccff8026fbf01c2e22ad91ddcd260aec0 100644 --- a/Ndk/Ndk2/ArkTSCallNativeNapiCreateBuffer/src/main/cpp/CreatBuffer.h +++ b/Ndk/Ndk2/ArkTSCallNativeNapiCreateBuffer/src/main/cpp/CreateBuffer.h @@ -8,7 +8,7 @@ #define NDK5_CREATBUFFER_H #include -class CreatBuffer { +class CreateBuffer { public: static napi_value TestBuffer(napi_env env, napi_callback_info info); }; diff --git a/Ndk/Ndk2/ArkTSCallNativeNapiCreateBuffer/src/main/cpp/napi_init.cpp b/Ndk/Ndk2/ArkTSCallNativeNapiCreateBuffer/src/main/cpp/napi_init.cpp index 7914494ce17fceb3f476768cd1ccd426343b1352..cee9878572608266984856f9a1bbfbde920cd527 100644 --- a/Ndk/Ndk2/ArkTSCallNativeNapiCreateBuffer/src/main/cpp/napi_init.cpp +++ b/Ndk/Ndk2/ArkTSCallNativeNapiCreateBuffer/src/main/cpp/napi_init.cpp @@ -19,8 +19,8 @@ #include "napi/native_api.h" // [Start ark_ts_call_native_napi_create_buffer_cpp] -#include "CreatBuffer.h" -napi_value CreatBuffer::TestBuffer(napi_env env, napi_callback_info) { +#include "CreateBuffer.h" +napi_value CreateBuffer::TestBuffer(napi_env env, napi_callback_info) { size_t length = 100; char *data = nullptr; napi_value result = nullptr; diff --git a/Ndk/Ndk2/CallCustomMethod/src/main/cpp/napi_init.cpp b/Ndk/Ndk2/CallCustomMethod/src/main/cpp/napi_init.cpp index 2177b462d5e55a5987708c6a2493011daa24951e..250e47da8bf8146e413c433f62e878101e730451 100644 --- a/Ndk/Ndk2/CallCustomMethod/src/main/cpp/napi_init.cpp +++ b/Ndk/Ndk2/CallCustomMethod/src/main/cpp/napi_init.cpp @@ -32,7 +32,7 @@ static napi_value LoadModule(napi_env env, napi_callback_info info) { napi_value key; std::string keyStr = "value"; napi_create_string_utf8(env, keyStr.c_str(), keyStr.size(), &key); - // 4. Get variable value using napi_get_propey + // 4. Get variable value using napi_get_property napi_get_property(env, result, key, &value); return value; } diff --git a/Ndk/Ndk2/entry/src/main/ets/pages/HashMap.ets b/Ndk/Ndk2/entry/src/main/ets/pages/HashMap.ets index 1aa8747f469235659b6ca896d6c876255cd4cf9c..9fd59fa0b6e4d65194cfd114f474dc41e15fc31e 100644 --- a/Ndk/Ndk2/entry/src/main/ets/pages/HashMap.ets +++ b/Ndk/Ndk2/entry/src/main/ets/pages/HashMap.ets @@ -49,7 +49,7 @@ struct Index { // [Start hash_map_one_ets] let hashMap: HashMap = new HashMap(); hashMap.set("Abc", 123); - hashMap.set("Bcd", 234) + hashMap.set("Bcd", 234); hashMap.set("Cde", 345); let keysArray: Array = Array.from(hashMap.keys()); diff --git a/Ndk/ndk1/demoso/src/main/cpp/a.cpp b/Ndk/ndk1/demoso/src/main/cpp/a.cpp index fb5d3751f7d0624e3c2909d09b17059d2ba6990b..eb93ee49e5ebb658065932bc9ab8d31c442cd565 100644 --- a/Ndk/ndk1/demoso/src/main/cpp/a.cpp +++ b/Ndk/ndk1/demoso/src/main/cpp/a.cpp @@ -14,7 +14,7 @@ extern "C" { // Be sure to enclose it with extern 'C' {} #include "stdio.h" typedef int (*FUNC_SUB)(int, int); int add(int a, int b) { return a + b; } -int getb(char *path, int a, int b) { // Path: The sandbox path for passing So files from ArkTS side (note that the path should be passed from ArkTS side, otherwise it may not be found, and the specific code will be listed later) +int getb(char *path, int a, int b) { // Path:The sandbox path for passing So files from ArkTS side (note that the path should be passed from ArkTS side, otherwise it may not be found, and the specific code will be listed later) void *handle = dlopen(path, RTLD_LAZY); // Open the dynamic link library with path as path if (!handle) { return 0; diff --git a/NetworkKit/entry/src/main/ets/pages/SetTcpSocket.ets b/NetworkKit/entry/src/main/ets/pages/SetTcpSocket.ets index 5999468421fde4291068fa7cf617df5c563dd0e8..4df61dcab327b12c4f6c252745cea0a7bb502d3a 100644 --- a/NetworkKit/entry/src/main/ets/pages/SetTcpSocket.ets +++ b/NetworkKit/entry/src/main/ets/pages/SetTcpSocket.ets @@ -31,7 +31,7 @@ interface ObjData2 { @Entry @Component export struct ObjectToArrayBuffer { - @State message: string = 'Object转ArrayBuffe'; + @State message: string = 'Object转ArrayBuffer'; strToArrayBuffer(str: string) { let buf = new ArrayBuffer(str.length * 2);