From a7074b64b80c53740cfa970f8e4f88b5b104351e Mon Sep 17 00:00:00 2001 From: dd28905525 <15160400526> Date: Mon, 13 Feb 2023 16:36:45 +0800 Subject: [PATCH 1/7] 'demo' --- demo.txt | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 demo.txt diff --git a/demo.txt b/demo.txt new file mode 100644 index 0000000..e69de29 -- Gitee From 33105dffd0738c285a35a1cde9fa7d8722962950 Mon Sep 17 00:00:00 2001 From: dd28905525 <15160400526> Date: Mon, 13 Feb 2023 16:43:36 +0800 Subject: [PATCH 2/7] 'xxx' --- xxx.txt/1111.txt | 1 + 1 file changed, 1 insertion(+) create mode 100644 xxx.txt/1111.txt diff --git a/xxx.txt/1111.txt b/xxx.txt/1111.txt new file mode 100644 index 0000000..f8ff68e --- /dev/null +++ b/xxx.txt/1111.txt @@ -0,0 +1 @@ +12123321132 -- Gitee From c12187f245cf730a1da01f012dcefc910daa520e Mon Sep 17 00:00:00 2001 From: unknown <15160400526> Date: Wed, 15 Feb 2023 10:58:08 +0800 Subject: [PATCH 3/7] 'x' --- "\346\235\234\347\202\234\345\230\211/use.js" | 6 +++++ "\346\235\234\347\202\234\345\230\211/ys.js" | 24 +++++++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 "\346\235\234\347\202\234\345\230\211/use.js" create mode 100644 "\346\235\234\347\202\234\345\230\211/ys.js" diff --git "a/\346\235\234\347\202\234\345\230\211/use.js" "b/\346\235\234\347\202\234\345\230\211/use.js" new file mode 100644 index 0000000..84733f3 --- /dev/null +++ "b/\346\235\234\347\202\234\345\230\211/use.js" @@ -0,0 +1,6 @@ +let obj=require("./ys.js"); +// 使用模块需要使用require +console.log(obj); +// 模块就是对象 +console.log(obj.jian(4,6)); +console.log(obj.chu(0,4)); diff --git "a/\346\235\234\347\202\234\345\230\211/ys.js" "b/\346\235\234\347\202\234\345\230\211/ys.js" new file mode 100644 index 0000000..c846799 --- /dev/null +++ "b/\346\235\234\347\202\234\345\230\211/ys.js" @@ -0,0 +1,24 @@ +// ### 作业:写个加减乘除的模块(尽量少写暴露,要考虑复用性) +// ,供外部使用. 作业每个分支要建一个目录(自己名字) +let obj={ + jia:function(a,b){ + return a+b; + }, + jian:function(a,b){ + return a-b; + + }, + cheng:function(a,b){ + return a*b; + }, + chu:function(a,b){ + if(a==0){ + return "错误"; + }else{ + return a/b; + } + } +} +module.exports = obj; +// 相当于对外暴露的空对象 + -- Gitee From 37e23cf8419d24041172c743d99f8b03364f1a76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=9C=E7=82=9C=E5=98=89d?= <1751124086@qq.com> Date: Wed, 15 Feb 2023 02:59:09 +0000 Subject: [PATCH 4/7] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=96=87=E4=BB=B6=20xxx.?= =?UTF-8?q?txt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- xxx.txt/1111.txt | 1 - 1 file changed, 1 deletion(-) delete mode 100644 xxx.txt/1111.txt diff --git a/xxx.txt/1111.txt b/xxx.txt/1111.txt deleted file mode 100644 index f8ff68e..0000000 --- a/xxx.txt/1111.txt +++ /dev/null @@ -1 +0,0 @@ -12123321132 -- Gitee From d909169eba1584facab2ea5ca635604bc7b0ac58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=9C=E7=82=9C=E5=98=89d?= <1751124086@qq.com> Date: Wed, 15 Feb 2023 02:59:14 +0000 Subject: [PATCH 5/7] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=96=87=E4=BB=B6=20demo?= =?UTF-8?q?.txt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- demo.txt | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 demo.txt diff --git a/demo.txt b/demo.txt deleted file mode 100644 index e69de29..0000000 -- Gitee From 5f93b2da86e3f3d1e4d2b98830d48f88a6a3e2a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=9C=E7=82=9C=E5=98=89d?= <1751124086@qq.com> Date: Thu, 16 Feb 2023 09:25:19 +0000 Subject: [PATCH 6/7] =?UTF-8?q?2=E6=9C=8816=E6=97=A5=E4=BD=9C=E4=B8=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 杜炜嘉d <1751124086@qq.com> --- "2\346\234\21016\344\275\234\344\270\232/1.txt" | 1 + "2\346\234\21016\344\275\234\344\270\232/10.txt" | 1 + "2\346\234\21016\344\275\234\344\270\232/100.txt" | 1 + "2\346\234\21016\344\275\234\344\270\232/11.txt" | 1 + "2\346\234\21016\344\275\234\344\270\232/12.txt" | 1 + "2\346\234\21016\344\275\234\344\270\232/13.txt" | 1 + "2\346\234\21016\344\275\234\344\270\232/14.txt" | 1 + "2\346\234\21016\344\275\234\344\270\232/15.txt" | 1 + "2\346\234\21016\344\275\234\344\270\232/16.txt" | 1 + "2\346\234\21016\344\275\234\344\270\232/17.txt" | 1 + "2\346\234\21016\344\275\234\344\270\232/18.txt" | 1 + "2\346\234\21016\344\275\234\344\270\232/19.txt" | 1 + "2\346\234\21016\344\275\234\344\270\232/2.txt" | 1 + "2\346\234\21016\344\275\234\344\270\232/20.txt" | 1 + "2\346\234\21016\344\275\234\344\270\232/21.txt" | 1 + "2\346\234\21016\344\275\234\344\270\232/22.txt" | 1 + "2\346\234\21016\344\275\234\344\270\232/23.txt" | 1 + "2\346\234\21016\344\275\234\344\270\232/24.txt" | 1 + "2\346\234\21016\344\275\234\344\270\232/25.txt" | 1 + "2\346\234\21016\344\275\234\344\270\232/26.txt" | 1 + 20 files changed, 20 insertions(+) create mode 100644 "2\346\234\21016\344\275\234\344\270\232/1.txt" create mode 100644 "2\346\234\21016\344\275\234\344\270\232/10.txt" create mode 100644 "2\346\234\21016\344\275\234\344\270\232/100.txt" create mode 100644 "2\346\234\21016\344\275\234\344\270\232/11.txt" create mode 100644 "2\346\234\21016\344\275\234\344\270\232/12.txt" create mode 100644 "2\346\234\21016\344\275\234\344\270\232/13.txt" create mode 100644 "2\346\234\21016\344\275\234\344\270\232/14.txt" create mode 100644 "2\346\234\21016\344\275\234\344\270\232/15.txt" create mode 100644 "2\346\234\21016\344\275\234\344\270\232/16.txt" create mode 100644 "2\346\234\21016\344\275\234\344\270\232/17.txt" create mode 100644 "2\346\234\21016\344\275\234\344\270\232/18.txt" create mode 100644 "2\346\234\21016\344\275\234\344\270\232/19.txt" create mode 100644 "2\346\234\21016\344\275\234\344\270\232/2.txt" create mode 100644 "2\346\234\21016\344\275\234\344\270\232/20.txt" create mode 100644 "2\346\234\21016\344\275\234\344\270\232/21.txt" create mode 100644 "2\346\234\21016\344\275\234\344\270\232/22.txt" create mode 100644 "2\346\234\21016\344\275\234\344\270\232/23.txt" create mode 100644 "2\346\234\21016\344\275\234\344\270\232/24.txt" create mode 100644 "2\346\234\21016\344\275\234\344\270\232/25.txt" create mode 100644 "2\346\234\21016\344\275\234\344\270\232/26.txt" diff --git "a/2\346\234\21016\344\275\234\344\270\232/1.txt" "b/2\346\234\21016\344\275\234\344\270\232/1.txt" new file mode 100644 index 0000000..06e8971 --- /dev/null +++ "b/2\346\234\21016\344\275\234\344\270\232/1.txt" @@ -0,0 +1 @@ +540 \ No newline at end of file diff --git "a/2\346\234\21016\344\275\234\344\270\232/10.txt" "b/2\346\234\21016\344\275\234\344\270\232/10.txt" new file mode 100644 index 0000000..f0b5c72 --- /dev/null +++ "b/2\346\234\21016\344\275\234\344\270\232/10.txt" @@ -0,0 +1 @@ +57 \ No newline at end of file diff --git "a/2\346\234\21016\344\275\234\344\270\232/100.txt" "b/2\346\234\21016\344\275\234\344\270\232/100.txt" new file mode 100644 index 0000000..84efa7e --- /dev/null +++ "b/2\346\234\21016\344\275\234\344\270\232/100.txt" @@ -0,0 +1 @@ +801 \ No newline at end of file diff --git "a/2\346\234\21016\344\275\234\344\270\232/11.txt" "b/2\346\234\21016\344\275\234\344\270\232/11.txt" new file mode 100644 index 0000000..f70d7bb --- /dev/null +++ "b/2\346\234\21016\344\275\234\344\270\232/11.txt" @@ -0,0 +1 @@ +42 \ No newline at end of file diff --git "a/2\346\234\21016\344\275\234\344\270\232/12.txt" "b/2\346\234\21016\344\275\234\344\270\232/12.txt" new file mode 100644 index 0000000..2ddfe0b --- /dev/null +++ "b/2\346\234\21016\344\275\234\344\270\232/12.txt" @@ -0,0 +1 @@ +897 \ No newline at end of file diff --git "a/2\346\234\21016\344\275\234\344\270\232/13.txt" "b/2\346\234\21016\344\275\234\344\270\232/13.txt" new file mode 100644 index 0000000..1fde752 --- /dev/null +++ "b/2\346\234\21016\344\275\234\344\270\232/13.txt" @@ -0,0 +1 @@ +434 \ No newline at end of file diff --git "a/2\346\234\21016\344\275\234\344\270\232/14.txt" "b/2\346\234\21016\344\275\234\344\270\232/14.txt" new file mode 100644 index 0000000..e3e1916 --- /dev/null +++ "b/2\346\234\21016\344\275\234\344\270\232/14.txt" @@ -0,0 +1 @@ +187 \ No newline at end of file diff --git "a/2\346\234\21016\344\275\234\344\270\232/15.txt" "b/2\346\234\21016\344\275\234\344\270\232/15.txt" new file mode 100644 index 0000000..f520b6e --- /dev/null +++ "b/2\346\234\21016\344\275\234\344\270\232/15.txt" @@ -0,0 +1 @@ +530 \ No newline at end of file diff --git "a/2\346\234\21016\344\275\234\344\270\232/16.txt" "b/2\346\234\21016\344\275\234\344\270\232/16.txt" new file mode 100644 index 0000000..2a095c4 --- /dev/null +++ "b/2\346\234\21016\344\275\234\344\270\232/16.txt" @@ -0,0 +1 @@ +271 \ No newline at end of file diff --git "a/2\346\234\21016\344\275\234\344\270\232/17.txt" "b/2\346\234\21016\344\275\234\344\270\232/17.txt" new file mode 100644 index 0000000..9754915 --- /dev/null +++ "b/2\346\234\21016\344\275\234\344\270\232/17.txt" @@ -0,0 +1 @@ +259 \ No newline at end of file diff --git "a/2\346\234\21016\344\275\234\344\270\232/18.txt" "b/2\346\234\21016\344\275\234\344\270\232/18.txt" new file mode 100644 index 0000000..8405587 --- /dev/null +++ "b/2\346\234\21016\344\275\234\344\270\232/18.txt" @@ -0,0 +1 @@ +767 \ No newline at end of file diff --git "a/2\346\234\21016\344\275\234\344\270\232/19.txt" "b/2\346\234\21016\344\275\234\344\270\232/19.txt" new file mode 100644 index 0000000..4701cc7 --- /dev/null +++ "b/2\346\234\21016\344\275\234\344\270\232/19.txt" @@ -0,0 +1 @@ +150 \ No newline at end of file diff --git "a/2\346\234\21016\344\275\234\344\270\232/2.txt" "b/2\346\234\21016\344\275\234\344\270\232/2.txt" new file mode 100644 index 0000000..2549360 --- /dev/null +++ "b/2\346\234\21016\344\275\234\344\270\232/2.txt" @@ -0,0 +1 @@ +395 \ No newline at end of file diff --git "a/2\346\234\21016\344\275\234\344\270\232/20.txt" "b/2\346\234\21016\344\275\234\344\270\232/20.txt" new file mode 100644 index 0000000..54a584d --- /dev/null +++ "b/2\346\234\21016\344\275\234\344\270\232/20.txt" @@ -0,0 +1 @@ +514 \ No newline at end of file diff --git "a/2\346\234\21016\344\275\234\344\270\232/21.txt" "b/2\346\234\21016\344\275\234\344\270\232/21.txt" new file mode 100644 index 0000000..9444b9b --- /dev/null +++ "b/2\346\234\21016\344\275\234\344\270\232/21.txt" @@ -0,0 +1 @@ +737 \ No newline at end of file diff --git "a/2\346\234\21016\344\275\234\344\270\232/22.txt" "b/2\346\234\21016\344\275\234\344\270\232/22.txt" new file mode 100644 index 0000000..6bd680a --- /dev/null +++ "b/2\346\234\21016\344\275\234\344\270\232/22.txt" @@ -0,0 +1 @@ +711 \ No newline at end of file diff --git "a/2\346\234\21016\344\275\234\344\270\232/23.txt" "b/2\346\234\21016\344\275\234\344\270\232/23.txt" new file mode 100644 index 0000000..c72784c --- /dev/null +++ "b/2\346\234\21016\344\275\234\344\270\232/23.txt" @@ -0,0 +1 @@ +235 \ No newline at end of file diff --git "a/2\346\234\21016\344\275\234\344\270\232/24.txt" "b/2\346\234\21016\344\275\234\344\270\232/24.txt" new file mode 100644 index 0000000..4800c7d --- /dev/null +++ "b/2\346\234\21016\344\275\234\344\270\232/24.txt" @@ -0,0 +1 @@ +58 \ No newline at end of file diff --git "a/2\346\234\21016\344\275\234\344\270\232/25.txt" "b/2\346\234\21016\344\275\234\344\270\232/25.txt" new file mode 100644 index 0000000..fa59ff2 --- /dev/null +++ "b/2\346\234\21016\344\275\234\344\270\232/25.txt" @@ -0,0 +1 @@ +134 \ No newline at end of file diff --git "a/2\346\234\21016\344\275\234\344\270\232/26.txt" "b/2\346\234\21016\344\275\234\344\270\232/26.txt" new file mode 100644 index 0000000..2da5673 --- /dev/null +++ "b/2\346\234\21016\344\275\234\344\270\232/26.txt" @@ -0,0 +1 @@ +418 \ No newline at end of file -- Gitee From b0758f4052edc6e29f5ebcb4881174bb0ef0d4f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=9C=E7=82=9C=E5=98=89d?= <1751124086@qq.com> Date: Sat, 18 Feb 2023 03:27:10 +0000 Subject: [PATCH 7/7] =?UTF-8?q?2=E6=9C=8818=E6=97=A5=E4=BD=9C=E4=B8=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 杜炜嘉d <1751124086@qq.com> --- zy.js | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 zy.js diff --git a/zy.js b/zy.js new file mode 100644 index 0000000..aac8b7b --- /dev/null +++ b/zy.js @@ -0,0 +1,21 @@ +let fs=require("fs"); +//同步写入 +var time1=new Date().getTime(); + +for(i=1;i<=1000;i++){ + fs.writeFileSync("./files"+i+".txt","中午吃啥"); + +} +var time2=new Date().getTime(); +console.log( "同步写入:"+(time2-time1)+"毫秒"); + +var time3=new Date().getTime(); +//异步写入 +for(i=1;i<=1000;i++){ + + fs.writeFile("./files2"+i+".txt","中午吃啥",function(err){ + + }); +} +var time4=new Date().getTime(); +console.log( "异步写入:"+(time4-time3)+"毫秒"); \ No newline at end of file -- Gitee