From 4ebbd1576d604bf4d2ca224e747790517d4be8d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=88=B4=E4=BD=B3=E8=BE=895?= <1197986048@qq.com> Date: Mon, 13 Feb 2023 16:31:32 +0800 Subject: [PATCH 01/34] Djh --- .../\346\210\264\344\275\263\350\276\211.txt" | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename cxy.txt => "\346\210\264\344\275\263\350\276\211/\346\210\264\344\275\263\350\276\211.txt" (100%) diff --git a/cxy.txt "b/\346\210\264\344\275\263\350\276\211/\346\210\264\344\275\263\350\276\211.txt" similarity index 100% rename from cxy.txt rename to "\346\210\264\344\275\263\350\276\211/\346\210\264\344\275\263\350\276\211.txt" -- Gitee From 9c6f3dc12d45a5da4fd1b48596b8e7a5bc8aa3e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=88=B4=E4=BD=B3=E8=BE=895?= <1197986048@qq.com> Date: Wed, 15 Feb 2023 11:20:52 +0800 Subject: [PATCH 02/34] 20230215 --- .../20230215/module.js" | 23 +++++++++++++++++++ .../20230215/\344\275\234\344\270\232.js" | 9 ++++++++ .../\346\210\264\344\275\263\350\276\211.txt" | 0 3 files changed, 32 insertions(+) create mode 100644 "\346\210\264\344\275\263\350\276\211/20230215/module.js" create mode 100644 "\346\210\264\344\275\263\350\276\211/20230215/\344\275\234\344\270\232.js" delete mode 100644 "\346\210\264\344\275\263\350\276\211/\346\210\264\344\275\263\350\276\211.txt" diff --git "a/\346\210\264\344\275\263\350\276\211/20230215/module.js" "b/\346\210\264\344\275\263\350\276\211/20230215/module.js" new file mode 100644 index 0000000..bfe359d --- /dev/null +++ "b/\346\210\264\344\275\263\350\276\211/20230215/module.js" @@ -0,0 +1,23 @@ +//作业:写个加减乘除的模块(尽量少写暴露,要考虑复用性),供外部使用. 作业每个分支要建一个目录(自己名字) +class method { + constructor(a,b){ + this.a = a; + this.b = b; + } + add(){ + return this.a + this.b; + } + subtract(){ + return this.a - this.b; + } + multiply(){ + return this.a * this.b; + } + divide(){ + if(this.b==0){ + return "除数不能为零"; + } + return this.a / this.b; + } +} +module.exports = method; \ No newline at end of file diff --git "a/\346\210\264\344\275\263\350\276\211/20230215/\344\275\234\344\270\232.js" "b/\346\210\264\344\275\263\350\276\211/20230215/\344\275\234\344\270\232.js" new file mode 100644 index 0000000..43611eb --- /dev/null +++ "b/\346\210\264\344\275\263\350\276\211/20230215/\344\275\234\344\270\232.js" @@ -0,0 +1,9 @@ +//作业:写个加减乘除的模块(尽量少写暴露,要考虑复用性),供外部使用. 作业每个分支要建一个目录(自己名字) +let obj = require("./module"); + +var add = new obj(10,5); + +console.log('加法结果为:'+add.add()); +console.log('减法结果为:'+add.subtract()); +console.log('乘法结果为:'+add.multiply()); +console.log('除法结果为:'+add.divide()); \ No newline at end of file diff --git "a/\346\210\264\344\275\263\350\276\211/\346\210\264\344\275\263\350\276\211.txt" "b/\346\210\264\344\275\263\350\276\211/\346\210\264\344\275\263\350\276\211.txt" deleted file mode 100644 index e69de29..0000000 -- Gitee From 4eb23fea9b7a6ddfff410503498ac10058176995 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=88=B4=E4=BD=B3=E8=BE=895?= <1197986048@qq.com> Date: Thu, 16 Feb 2023 07:43:26 +0000 Subject: [PATCH 03/34] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=96=87=E4=BB=B6=20?= =?UTF-8?q?=E6=88=B4=E4=BD=B3=E8=BE=89/20230215?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../20230215/module.js" | 23 ------------------- .../20230215/\344\275\234\344\270\232.js" | 9 -------- 2 files changed, 32 deletions(-) delete mode 100644 "\346\210\264\344\275\263\350\276\211/20230215/module.js" delete mode 100644 "\346\210\264\344\275\263\350\276\211/20230215/\344\275\234\344\270\232.js" diff --git "a/\346\210\264\344\275\263\350\276\211/20230215/module.js" "b/\346\210\264\344\275\263\350\276\211/20230215/module.js" deleted file mode 100644 index bfe359d..0000000 --- "a/\346\210\264\344\275\263\350\276\211/20230215/module.js" +++ /dev/null @@ -1,23 +0,0 @@ -//作业:写个加减乘除的模块(尽量少写暴露,要考虑复用性),供外部使用. 作业每个分支要建一个目录(自己名字) -class method { - constructor(a,b){ - this.a = a; - this.b = b; - } - add(){ - return this.a + this.b; - } - subtract(){ - return this.a - this.b; - } - multiply(){ - return this.a * this.b; - } - divide(){ - if(this.b==0){ - return "除数不能为零"; - } - return this.a / this.b; - } -} -module.exports = method; \ No newline at end of file diff --git "a/\346\210\264\344\275\263\350\276\211/20230215/\344\275\234\344\270\232.js" "b/\346\210\264\344\275\263\350\276\211/20230215/\344\275\234\344\270\232.js" deleted file mode 100644 index 43611eb..0000000 --- "a/\346\210\264\344\275\263\350\276\211/20230215/\344\275\234\344\270\232.js" +++ /dev/null @@ -1,9 +0,0 @@ -//作业:写个加减乘除的模块(尽量少写暴露,要考虑复用性),供外部使用. 作业每个分支要建一个目录(自己名字) -let obj = require("./module"); - -var add = new obj(10,5); - -console.log('加法结果为:'+add.add()); -console.log('减法结果为:'+add.subtract()); -console.log('乘法结果为:'+add.multiply()); -console.log('除法结果为:'+add.divide()); \ No newline at end of file -- Gitee From da6bedfa1912accd7dc0850c3d3b71ff41cb6f89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=88=B4=E4=BD=B3=E8=BE=895?= <1197986048@qq.com> Date: Thu, 16 Feb 2023 07:47:34 +0000 Subject: [PATCH 04/34] =?UTF-8?q?=E6=96=B0=E5=BB=BA=20=E6=88=B4=E4=BD=B3?= =?UTF-8?q?=E8=BE=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- "\346\210\264\344\275\263\350\276\211/.keep" | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 "\346\210\264\344\275\263\350\276\211/.keep" diff --git "a/\346\210\264\344\275\263\350\276\211/.keep" "b/\346\210\264\344\275\263\350\276\211/.keep" new file mode 100644 index 0000000..e69de29 -- Gitee From 8153089ca25167a042a4271344c8472fec011414 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=88=B4=E4=BD=B3=E8=BE=895?= <1197986048@qq.com> Date: Thu, 16 Feb 2023 07:48:06 +0000 Subject: [PATCH 05/34] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=96=87=E4=BB=B6=20?= =?UTF-8?q?=E6=88=B4=E4=BD=B3=E8=BE=89/.keep?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- "\346\210\264\344\275\263\350\276\211/.keep" | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 "\346\210\264\344\275\263\350\276\211/.keep" diff --git "a/\346\210\264\344\275\263\350\276\211/.keep" "b/\346\210\264\344\275\263\350\276\211/.keep" deleted file mode 100644 index e69de29..0000000 -- Gitee From 401cadfb8dee9bd1f9de749553841d4aae819651 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=88=B4=E4=BD=B3=E8=BE=895?= <1197986048@qq.com> Date: Thu, 16 Feb 2023 07:48:38 +0000 Subject: [PATCH 06/34] =?UTF-8?q?=E6=96=B0=E5=BB=BA=20=E6=88=B4=E4=BD=B3?= =?UTF-8?q?=E8=BE=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- "\346\210\264\344\275\263\350\276\211/.keep" | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 "\346\210\264\344\275\263\350\276\211/.keep" diff --git "a/\346\210\264\344\275\263\350\276\211/.keep" "b/\346\210\264\344\275\263\350\276\211/.keep" new file mode 100644 index 0000000..e69de29 -- Gitee From e6ae7a2b2003a7f8fffe43033f21a40128ff65b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=88=B4=E4=BD=B3=E8=BE=895?= <1197986048@qq.com> Date: Thu, 16 Feb 2023 07:49:00 +0000 Subject: [PATCH 07/34] =?UTF-8?q?=E6=A8=A1=E5=9D=97=E4=BD=9C=E4=B8=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 戴佳辉5 <1197986048@qq.com> --- .../20230215/module.js" | 23 +++++++++++++++++++ .../20230215/\344\275\234\344\270\232.js" | 9 ++++++++ 2 files changed, 32 insertions(+) create mode 100644 "\346\210\264\344\275\263\350\276\211/20230215/module.js" create mode 100644 "\346\210\264\344\275\263\350\276\211/20230215/\344\275\234\344\270\232.js" diff --git "a/\346\210\264\344\275\263\350\276\211/20230215/module.js" "b/\346\210\264\344\275\263\350\276\211/20230215/module.js" new file mode 100644 index 0000000..9d9aed9 --- /dev/null +++ "b/\346\210\264\344\275\263\350\276\211/20230215/module.js" @@ -0,0 +1,23 @@ +//作业:写个加减乘除的模块(尽量少写暴露,要考虑复用性),供外部使用. 作业每个分支要建一个目录(自己名字) +class method { + constructor(a,b){ + this.a = a; + this.b = b; + } + add(){ + return this.a + this.b; + } + subtract(){ + return this.a - this.b; + } + multiply(){ + return this.a * this.b; + } + divide(){ + if(this.b==0){ + return "除数不能为零"; + } + return this.a / this.b; + } +} +module.exports = method; \ No newline at end of file diff --git "a/\346\210\264\344\275\263\350\276\211/20230215/\344\275\234\344\270\232.js" "b/\346\210\264\344\275\263\350\276\211/20230215/\344\275\234\344\270\232.js" new file mode 100644 index 0000000..54a99b5 --- /dev/null +++ "b/\346\210\264\344\275\263\350\276\211/20230215/\344\275\234\344\270\232.js" @@ -0,0 +1,9 @@ +//作业:写个加减乘除的模块(尽量少写暴露,要考虑复用性),供外部使用. 作业每个分支要建一个目录(自己名字) +let obj = require("./module"); + +var add = new obj(10,5); + +console.log('加法结果为:'+add.add()); +console.log('减法结果为:'+add.subtract()); +console.log('乘法结果为:'+add.multiply()); +console.log('除法结果为:'+add.divide()); \ No newline at end of file -- Gitee From 84deb15ae56aaf7212f96b624997c445330d9347 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=88=B4=E4=BD=B3=E8=BE=895?= <1197986048@qq.com> Date: Thu, 16 Feb 2023 08:01:10 +0000 Subject: [PATCH 08/34] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=96=87=E4=BB=B6=20?= =?UTF-8?q?=E6=88=B4=E4=BD=B3=E8=BE=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- "\346\210\264\344\275\263\350\276\211/.keep" | 0 .../20230215/module.js" | 23 ------------------- .../20230215/\344\275\234\344\270\232.js" | 9 -------- 3 files changed, 32 deletions(-) delete mode 100644 "\346\210\264\344\275\263\350\276\211/.keep" delete mode 100644 "\346\210\264\344\275\263\350\276\211/20230215/module.js" delete mode 100644 "\346\210\264\344\275\263\350\276\211/20230215/\344\275\234\344\270\232.js" diff --git "a/\346\210\264\344\275\263\350\276\211/.keep" "b/\346\210\264\344\275\263\350\276\211/.keep" deleted file mode 100644 index e69de29..0000000 diff --git "a/\346\210\264\344\275\263\350\276\211/20230215/module.js" "b/\346\210\264\344\275\263\350\276\211/20230215/module.js" deleted file mode 100644 index 9d9aed9..0000000 --- "a/\346\210\264\344\275\263\350\276\211/20230215/module.js" +++ /dev/null @@ -1,23 +0,0 @@ -//作业:写个加减乘除的模块(尽量少写暴露,要考虑复用性),供外部使用. 作业每个分支要建一个目录(自己名字) -class method { - constructor(a,b){ - this.a = a; - this.b = b; - } - add(){ - return this.a + this.b; - } - subtract(){ - return this.a - this.b; - } - multiply(){ - return this.a * this.b; - } - divide(){ - if(this.b==0){ - return "除数不能为零"; - } - return this.a / this.b; - } -} -module.exports = method; \ No newline at end of file diff --git "a/\346\210\264\344\275\263\350\276\211/20230215/\344\275\234\344\270\232.js" "b/\346\210\264\344\275\263\350\276\211/20230215/\344\275\234\344\270\232.js" deleted file mode 100644 index 54a99b5..0000000 --- "a/\346\210\264\344\275\263\350\276\211/20230215/\344\275\234\344\270\232.js" +++ /dev/null @@ -1,9 +0,0 @@ -//作业:写个加减乘除的模块(尽量少写暴露,要考虑复用性),供外部使用. 作业每个分支要建一个目录(自己名字) -let obj = require("./module"); - -var add = new obj(10,5); - -console.log('加法结果为:'+add.add()); -console.log('减法结果为:'+add.subtract()); -console.log('乘法结果为:'+add.multiply()); -console.log('除法结果为:'+add.divide()); \ No newline at end of file -- Gitee From f22121f99c38d5d1e5c91b5e2ef8bcc6d21e38cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=88=B4=E4=BD=B3=E8=BE=895?= <1197986048@qq.com> Date: Thu, 16 Feb 2023 08:13:24 +0000 Subject: [PATCH 09/34] =?UTF-8?q?=E6=96=B0=E5=BB=BA=20=E6=88=B4=E4=BD=B3?= =?UTF-8?q?=E8=BE=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- "\346\210\264\344\275\263\350\276\211/.keep" | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 "\346\210\264\344\275\263\350\276\211/.keep" diff --git "a/\346\210\264\344\275\263\350\276\211/.keep" "b/\346\210\264\344\275\263\350\276\211/.keep" new file mode 100644 index 0000000..e69de29 -- Gitee From 170546a139142783da086f683180a927a01da327 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=88=B4=E4=BD=B3=E8=BE=895?= <1197986048@qq.com> Date: Thu, 16 Feb 2023 16:22:34 +0800 Subject: [PATCH 10/34] 20230215 --- "\346\210\264\344\275\263\350\276\211/.keep" | 0 .../20230215/module.js" | 23 +++++++++++++++++++ .../20230215/\344\275\234\344\270\232.js" | 9 ++++++++ 3 files changed, 32 insertions(+) delete mode 100644 "\346\210\264\344\275\263\350\276\211/.keep" create mode 100644 "\346\210\264\344\275\263\350\276\211/20230215/module.js" create mode 100644 "\346\210\264\344\275\263\350\276\211/20230215/\344\275\234\344\270\232.js" diff --git "a/\346\210\264\344\275\263\350\276\211/.keep" "b/\346\210\264\344\275\263\350\276\211/.keep" deleted file mode 100644 index e69de29..0000000 diff --git "a/\346\210\264\344\275\263\350\276\211/20230215/module.js" "b/\346\210\264\344\275\263\350\276\211/20230215/module.js" new file mode 100644 index 0000000..bfe359d --- /dev/null +++ "b/\346\210\264\344\275\263\350\276\211/20230215/module.js" @@ -0,0 +1,23 @@ +//作业:写个加减乘除的模块(尽量少写暴露,要考虑复用性),供外部使用. 作业每个分支要建一个目录(自己名字) +class method { + constructor(a,b){ + this.a = a; + this.b = b; + } + add(){ + return this.a + this.b; + } + subtract(){ + return this.a - this.b; + } + multiply(){ + return this.a * this.b; + } + divide(){ + if(this.b==0){ + return "除数不能为零"; + } + return this.a / this.b; + } +} +module.exports = method; \ No newline at end of file diff --git "a/\346\210\264\344\275\263\350\276\211/20230215/\344\275\234\344\270\232.js" "b/\346\210\264\344\275\263\350\276\211/20230215/\344\275\234\344\270\232.js" new file mode 100644 index 0000000..43611eb --- /dev/null +++ "b/\346\210\264\344\275\263\350\276\211/20230215/\344\275\234\344\270\232.js" @@ -0,0 +1,9 @@ +//作业:写个加减乘除的模块(尽量少写暴露,要考虑复用性),供外部使用. 作业每个分支要建一个目录(自己名字) +let obj = require("./module"); + +var add = new obj(10,5); + +console.log('加法结果为:'+add.add()); +console.log('减法结果为:'+add.subtract()); +console.log('乘法结果为:'+add.multiply()); +console.log('除法结果为:'+add.divide()); \ No newline at end of file -- Gitee From 6ac9cf836ae874c838a1cf20c1132977d870a817 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=88=B4=E4=BD=B3=E8=BE=895?= <1197986048@qq.com> Date: Thu, 16 Feb 2023 08:55:25 +0000 Subject: [PATCH 11/34] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=96=87=E4=BB=B6=20?= =?UTF-8?q?=E6=A2=85=E6=A2=A6=E7=94=9C/=E6=A2=85=E6=A2=A6=E7=94=9C0215?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../0215.js" | 25 ------------------- .../result.js" | 7 ------ 2 files changed, 32 deletions(-) delete mode 100644 "\346\242\205\346\242\246\347\224\234/\346\242\205\346\242\246\347\224\2340215/0215.js" delete mode 100644 "\346\242\205\346\242\246\347\224\234/\346\242\205\346\242\246\347\224\2340215/result.js" diff --git "a/\346\242\205\346\242\246\347\224\234/\346\242\205\346\242\246\347\224\2340215/0215.js" "b/\346\242\205\346\242\246\347\224\234/\346\242\205\346\242\246\347\224\2340215/0215.js" deleted file mode 100644 index ca326f0..0000000 --- "a/\346\242\205\346\242\246\347\224\234/\346\242\205\346\242\246\347\224\2340215/0215.js" +++ /dev/null @@ -1,25 +0,0 @@ -//作业:写个加减乘除的模块(尽量少写暴露,要考虑复用性),供外部使用. 作业每个分支要建一个目录(自己名字) - -var num1; -var num2; -let obj={ - change:function(num11,num22){ - num1=num11 - num2=num22; - }, - jia:function(){ - return num1+num2; - }, - jian:function(){ - return num1-num2 - }, - cheng:function(){ - return num1*num2 - }, - chu:function(){ - return num1/num2 - } -} -module.exports.obj=obj; - - diff --git "a/\346\242\205\346\242\246\347\224\234/\346\242\205\346\242\246\347\224\2340215/result.js" "b/\346\242\205\346\242\246\347\224\234/\346\242\205\346\242\246\347\224\2340215/result.js" deleted file mode 100644 index be3d653..0000000 --- "a/\346\242\205\346\242\246\347\224\234/\346\242\205\346\242\246\347\224\2340215/result.js" +++ /dev/null @@ -1,7 +0,0 @@ -let obj=require("./0215.js"); -obj.obj.change(5,5); -console.log(obj.obj.jia()); -console.log(obj.obj.jian()); -console.log(obj.obj.cheng()); -console.log(obj.obj.chu()); - -- Gitee From 79be1f51bc1c165e5a0d6bf1cf45ff24a4de12d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=88=B4=E4=BD=B3=E8=BE=895?= <1197986048@qq.com> Date: Thu, 16 Feb 2023 08:55:33 +0000 Subject: [PATCH 12/34] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=96=87=E4=BB=B6=20?= =?UTF-8?q?=E7=8E=8B=E9=80=B8=E6=B0=91/=E6=A8=A1=E5=9D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../\346\250\241\345\235\227/index.html" | 14 -------------- .../\346\250\241\345\235\227/jsq.js" | 8 -------- .../\346\250\241\345\235\227/shuzhi.js" | 3 --- 3 files changed, 25 deletions(-) delete mode 100644 "\347\216\213\351\200\270\346\260\221/\346\250\241\345\235\227/index.html" delete mode 100644 "\347\216\213\351\200\270\346\260\221/\346\250\241\345\235\227/jsq.js" delete mode 100644 "\347\216\213\351\200\270\346\260\221/\346\250\241\345\235\227/shuzhi.js" diff --git "a/\347\216\213\351\200\270\346\260\221/\346\250\241\345\235\227/index.html" "b/\347\216\213\351\200\270\346\260\221/\346\250\241\345\235\227/index.html" deleted file mode 100644 index b2ec421..0000000 --- "a/\347\216\213\351\200\270\346\260\221/\346\250\241\345\235\227/index.html" +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - Document - - - - - - - \ No newline at end of file diff --git "a/\347\216\213\351\200\270\346\260\221/\346\250\241\345\235\227/jsq.js" "b/\347\216\213\351\200\270\346\260\221/\346\250\241\345\235\227/jsq.js" deleted file mode 100644 index 9304e33..0000000 --- "a/\347\216\213\351\200\270\346\260\221/\346\250\241\345\235\227/jsq.js" +++ /dev/null @@ -1,8 +0,0 @@ -let obj={ - jia :function jia(shu1,shu2){ - return shu1+shu2; - } -} - - -module.exports = obj; \ No newline at end of file diff --git "a/\347\216\213\351\200\270\346\260\221/\346\250\241\345\235\227/shuzhi.js" "b/\347\216\213\351\200\270\346\260\221/\346\250\241\345\235\227/shuzhi.js" deleted file mode 100644 index b45016a..0000000 --- "a/\347\216\213\351\200\270\346\260\221/\346\250\241\345\235\227/shuzhi.js" +++ /dev/null @@ -1,3 +0,0 @@ -let obj= require("./jsq.js"); - -console.log(obj.jia(10,20)); \ No newline at end of file -- Gitee From f4d0d7921d1fcaffd7e5c76524b1d71c23e0353b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=88=B4=E4=BD=B3=E8=BE=895?= <1197986048@qq.com> Date: Thu, 16 Feb 2023 08:55:38 +0000 Subject: [PATCH 13/34] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=96=87=E4=BB=B6=20?= =?UTF-8?q?=E9=9F=A6=E7=BB=8D=E4=B8=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../index.js" | 35 ------------------- .../\346\250\241\345\235\227-23.02.15/use.js" | 5 --- .../\351\237\246\347\273\215\344\270\245.txt" | 0 3 files changed, 40 deletions(-) delete mode 100644 "\351\237\246\347\273\215\344\270\245/\346\250\241\345\235\227-23.02.15/index.js" delete mode 100644 "\351\237\246\347\273\215\344\270\245/\346\250\241\345\235\227-23.02.15/use.js" delete mode 100644 "\351\237\246\347\273\215\344\270\245/\351\237\246\347\273\215\344\270\245.txt" diff --git "a/\351\237\246\347\273\215\344\270\245/\346\250\241\345\235\227-23.02.15/index.js" "b/\351\237\246\347\273\215\344\270\245/\346\250\241\345\235\227-23.02.15/index.js" deleted file mode 100644 index fd32dfd..0000000 --- "a/\351\237\246\347\273\215\344\270\245/\346\250\241\345\235\227-23.02.15/index.js" +++ /dev/null @@ -1,35 +0,0 @@ -module.exports={ - add:function(a,b){ - if(typeof(a)=="number" && typeof(b)=="number"){ - return a+b; - }else{ - return "非数值" - } - }, - sub:function(a,b){ - if(typeof(a)=="number" && typeof(b)=="number"){ - return a-b; - }else{ - return "非数值" - } - }, - mul:function(a,b){ - if(typeof(a)=="number" && typeof(b)=="number"){ - return a*b; - }else{ - return "非数值" - } - }, - div:function(a,b){ - if(typeof(a)=="number" && typeof(b)=="number"){ - if(b==0){ - return "除数不能为0" - }else{ - return a/b; - } - - }else{ - return "非数值" - } - } -} \ No newline at end of file diff --git "a/\351\237\246\347\273\215\344\270\245/\346\250\241\345\235\227-23.02.15/use.js" "b/\351\237\246\347\273\215\344\270\245/\346\250\241\345\235\227-23.02.15/use.js" deleted file mode 100644 index c93774a..0000000 --- "a/\351\237\246\347\273\215\344\270\245/\346\250\241\345\235\227-23.02.15/use.js" +++ /dev/null @@ -1,5 +0,0 @@ -let use = require("./index.js") -console.log(use.add(0,2)); -console.log(use.sub('p',2)); -console.log(use.mul(2,2)); -console.log(use.div(2,0)); \ No newline at end of file diff --git "a/\351\237\246\347\273\215\344\270\245/\351\237\246\347\273\215\344\270\245.txt" "b/\351\237\246\347\273\215\344\270\245/\351\237\246\347\273\215\344\270\245.txt" deleted file mode 100644 index e69de29..0000000 -- Gitee From b9236bb76cb42f9a8fbd04e1669d7cb89f50871f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=88=B4=E4=BD=B3=E8=BE=895?= <1197986048@qq.com> Date: Thu, 16 Feb 2023 08:55:44 +0000 Subject: [PATCH 14/34] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=96=87=E4=BB=B6=20k.?= =?UTF-8?q?txt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- k.txt | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 k.txt diff --git a/k.txt b/k.txt deleted file mode 100644 index e69de29..0000000 -- Gitee From db77b838081a524f125f8fbc276f3ad61a6b2f43 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=88=B4=E4=BD=B3=E8=BE=895?= <1197986048@qq.com> Date: Thu, 16 Feb 2023 14:33:13 +0000 Subject: [PATCH 15/34] =?UTF-8?q?=E6=88=B4=E4=BD=B3=E8=BE=8948?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 戴佳辉5 <1197986048@qq.com> --- .../file.js" | 52 +++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 "\346\210\264\344\275\263\350\276\211/file.js" diff --git "a/\346\210\264\344\275\263\350\276\211/file.js" "b/\346\210\264\344\275\263\350\276\211/file.js" new file mode 100644 index 0000000..8c93aaf --- /dev/null +++ "b/\346\210\264\344\275\263\350\276\211/file.js" @@ -0,0 +1,52 @@ +//文件读取需要使用fs模块,fs node自带的 +let fs = require("fs"); +//异步读取文件 +// fs.readFile('./weekend.txt', (error, data) => { +// console.log(error); +// console.log(data);//data 是 Buffer 类型 +// console.log(data.toString());//1 +// }); +// console.log("我在前面还是后面输出");// + +//同步读取文件 +// let data = fs.readFileSync("./sports.txt"); +// console.log(data.toString()); +// console.log("会不会先输出"); + +//假设读取文件 100毫秒,一个函数执行5毫秒,异步方式执行这个代码,总的耗时是多少 100毫秒,同步方式 105毫秒 + +//文件写入 + +//同步文件写入,有这个Sync就是同步 + +// 作业:生成100个文件,每个文件存入一个1到1000的随机数字,再取出最大值的那个文件,值也要取出来,再取出最小的那个. +var arr=[]; +for(let i=1;i<=10;i++){ + var a = Math.floor(Math.random()*1001); + fs.writeFileSync("./D"+i,""+a); + arr.push(a); + fs.readFile("./D"+i,(error,data)=>{ + var num = data.toString(); + console.log("该文件夹后缀为:"+i+",数值为:"+num); + }) +} +var max=arr[0]; +var maxhz=1; +for(let ii=0;iimax){ + max=arr[ii]; + maxhz=ii+1; + } +} + +var min=arr[0]; +var minhz=1; +for(let iii=0;iii Date: Thu, 16 Feb 2023 14:33:23 +0000 Subject: [PATCH 16/34] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=96=87=E4=BB=B6=20?= =?UTF-8?q?=E6=88=B4=E4=BD=B3=E8=BE=89/file.js?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../file.js" | 52 ------------------- 1 file changed, 52 deletions(-) delete mode 100644 "\346\210\264\344\275\263\350\276\211/file.js" diff --git "a/\346\210\264\344\275\263\350\276\211/file.js" "b/\346\210\264\344\275\263\350\276\211/file.js" deleted file mode 100644 index 8c93aaf..0000000 --- "a/\346\210\264\344\275\263\350\276\211/file.js" +++ /dev/null @@ -1,52 +0,0 @@ -//文件读取需要使用fs模块,fs node自带的 -let fs = require("fs"); -//异步读取文件 -// fs.readFile('./weekend.txt', (error, data) => { -// console.log(error); -// console.log(data);//data 是 Buffer 类型 -// console.log(data.toString());//1 -// }); -// console.log("我在前面还是后面输出");// - -//同步读取文件 -// let data = fs.readFileSync("./sports.txt"); -// console.log(data.toString()); -// console.log("会不会先输出"); - -//假设读取文件 100毫秒,一个函数执行5毫秒,异步方式执行这个代码,总的耗时是多少 100毫秒,同步方式 105毫秒 - -//文件写入 - -//同步文件写入,有这个Sync就是同步 - -// 作业:生成100个文件,每个文件存入一个1到1000的随机数字,再取出最大值的那个文件,值也要取出来,再取出最小的那个. -var arr=[]; -for(let i=1;i<=10;i++){ - var a = Math.floor(Math.random()*1001); - fs.writeFileSync("./D"+i,""+a); - arr.push(a); - fs.readFile("./D"+i,(error,data)=>{ - var num = data.toString(); - console.log("该文件夹后缀为:"+i+",数值为:"+num); - }) -} -var max=arr[0]; -var maxhz=1; -for(let ii=0;iimax){ - max=arr[ii]; - maxhz=ii+1; - } -} - -var min=arr[0]; -var minhz=1; -for(let iii=0;iii Date: Thu, 16 Feb 2023 14:33:47 +0000 Subject: [PATCH 17/34] =?UTF-8?q?=E6=88=B4=E4=BD=B3=E8=BE=8948?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 戴佳辉5 <1197986048@qq.com> --- .../20230216/file.js" | 52 +++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 "\346\210\264\344\275\263\350\276\211/20230216/file.js" diff --git "a/\346\210\264\344\275\263\350\276\211/20230216/file.js" "b/\346\210\264\344\275\263\350\276\211/20230216/file.js" new file mode 100644 index 0000000..8c93aaf --- /dev/null +++ "b/\346\210\264\344\275\263\350\276\211/20230216/file.js" @@ -0,0 +1,52 @@ +//文件读取需要使用fs模块,fs node自带的 +let fs = require("fs"); +//异步读取文件 +// fs.readFile('./weekend.txt', (error, data) => { +// console.log(error); +// console.log(data);//data 是 Buffer 类型 +// console.log(data.toString());//1 +// }); +// console.log("我在前面还是后面输出");// + +//同步读取文件 +// let data = fs.readFileSync("./sports.txt"); +// console.log(data.toString()); +// console.log("会不会先输出"); + +//假设读取文件 100毫秒,一个函数执行5毫秒,异步方式执行这个代码,总的耗时是多少 100毫秒,同步方式 105毫秒 + +//文件写入 + +//同步文件写入,有这个Sync就是同步 + +// 作业:生成100个文件,每个文件存入一个1到1000的随机数字,再取出最大值的那个文件,值也要取出来,再取出最小的那个. +var arr=[]; +for(let i=1;i<=10;i++){ + var a = Math.floor(Math.random()*1001); + fs.writeFileSync("./D"+i,""+a); + arr.push(a); + fs.readFile("./D"+i,(error,data)=>{ + var num = data.toString(); + console.log("该文件夹后缀为:"+i+",数值为:"+num); + }) +} +var max=arr[0]; +var maxhz=1; +for(let ii=0;iimax){ + max=arr[ii]; + maxhz=ii+1; + } +} + +var min=arr[0]; +var minhz=1; +for(let iii=0;iii Date: Thu, 16 Feb 2023 14:34:07 +0000 Subject: [PATCH 18/34] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=96=87=E4=BB=B6=20?= =?UTF-8?q?=E6=88=B4=E4=BD=B3=E8=BE=89/20230216?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../20230216/file.js" | 52 ------------------- 1 file changed, 52 deletions(-) delete mode 100644 "\346\210\264\344\275\263\350\276\211/20230216/file.js" diff --git "a/\346\210\264\344\275\263\350\276\211/20230216/file.js" "b/\346\210\264\344\275\263\350\276\211/20230216/file.js" deleted file mode 100644 index 8c93aaf..0000000 --- "a/\346\210\264\344\275\263\350\276\211/20230216/file.js" +++ /dev/null @@ -1,52 +0,0 @@ -//文件读取需要使用fs模块,fs node自带的 -let fs = require("fs"); -//异步读取文件 -// fs.readFile('./weekend.txt', (error, data) => { -// console.log(error); -// console.log(data);//data 是 Buffer 类型 -// console.log(data.toString());//1 -// }); -// console.log("我在前面还是后面输出");// - -//同步读取文件 -// let data = fs.readFileSync("./sports.txt"); -// console.log(data.toString()); -// console.log("会不会先输出"); - -//假设读取文件 100毫秒,一个函数执行5毫秒,异步方式执行这个代码,总的耗时是多少 100毫秒,同步方式 105毫秒 - -//文件写入 - -//同步文件写入,有这个Sync就是同步 - -// 作业:生成100个文件,每个文件存入一个1到1000的随机数字,再取出最大值的那个文件,值也要取出来,再取出最小的那个. -var arr=[]; -for(let i=1;i<=10;i++){ - var a = Math.floor(Math.random()*1001); - fs.writeFileSync("./D"+i,""+a); - arr.push(a); - fs.readFile("./D"+i,(error,data)=>{ - var num = data.toString(); - console.log("该文件夹后缀为:"+i+",数值为:"+num); - }) -} -var max=arr[0]; -var maxhz=1; -for(let ii=0;iimax){ - max=arr[ii]; - maxhz=ii+1; - } -} - -var min=arr[0]; -var minhz=1; -for(let iii=0;iii Date: Thu, 16 Feb 2023 14:34:19 +0000 Subject: [PATCH 19/34] 20230216 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 戴佳辉5 <1197986048@qq.com> --- .../20230216/file.js" | 52 +++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 "\346\210\264\344\275\263\350\276\211/20230216/file.js" diff --git "a/\346\210\264\344\275\263\350\276\211/20230216/file.js" "b/\346\210\264\344\275\263\350\276\211/20230216/file.js" new file mode 100644 index 0000000..8c93aaf --- /dev/null +++ "b/\346\210\264\344\275\263\350\276\211/20230216/file.js" @@ -0,0 +1,52 @@ +//文件读取需要使用fs模块,fs node自带的 +let fs = require("fs"); +//异步读取文件 +// fs.readFile('./weekend.txt', (error, data) => { +// console.log(error); +// console.log(data);//data 是 Buffer 类型 +// console.log(data.toString());//1 +// }); +// console.log("我在前面还是后面输出");// + +//同步读取文件 +// let data = fs.readFileSync("./sports.txt"); +// console.log(data.toString()); +// console.log("会不会先输出"); + +//假设读取文件 100毫秒,一个函数执行5毫秒,异步方式执行这个代码,总的耗时是多少 100毫秒,同步方式 105毫秒 + +//文件写入 + +//同步文件写入,有这个Sync就是同步 + +// 作业:生成100个文件,每个文件存入一个1到1000的随机数字,再取出最大值的那个文件,值也要取出来,再取出最小的那个. +var arr=[]; +for(let i=1;i<=10;i++){ + var a = Math.floor(Math.random()*1001); + fs.writeFileSync("./D"+i,""+a); + arr.push(a); + fs.readFile("./D"+i,(error,data)=>{ + var num = data.toString(); + console.log("该文件夹后缀为:"+i+",数值为:"+num); + }) +} +var max=arr[0]; +var maxhz=1; +for(let ii=0;iimax){ + max=arr[ii]; + maxhz=ii+1; + } +} + +var min=arr[0]; +var minhz=1; +for(let iii=0;iii Date: Fri, 17 Feb 2023 23:53:17 +0000 Subject: [PATCH 20/34] =?UTF-8?q?=E9=87=8D=E5=91=BD=E5=90=8D=20=E6=88=B4?= =?UTF-8?q?=E4=BD=B3=E8=BE=89/20230215=20=E4=B8=BA=20=E6=88=B4=E4=BD=B3?= =?UTF-8?q?=E8=BE=89/20230215-=E6=A8=A1=E5=9D=97=E7=9A=84=E4=BD=BF?= =?UTF-8?q?=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../module.js" | 0 .../\344\275\234\344\270\232.js" | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename "\346\210\264\344\275\263\350\276\211/20230215/module.js" => "\346\210\264\344\275\263\350\276\211/20230215-\346\250\241\345\235\227\347\232\204\344\275\277\347\224\250/module.js" (100%) rename "\346\210\264\344\275\263\350\276\211/20230215/\344\275\234\344\270\232.js" => "\346\210\264\344\275\263\350\276\211/20230215-\346\250\241\345\235\227\347\232\204\344\275\277\347\224\250/\344\275\234\344\270\232.js" (100%) diff --git "a/\346\210\264\344\275\263\350\276\211/20230215/module.js" "b/\346\210\264\344\275\263\350\276\211/20230215-\346\250\241\345\235\227\347\232\204\344\275\277\347\224\250/module.js" similarity index 100% rename from "\346\210\264\344\275\263\350\276\211/20230215/module.js" rename to "\346\210\264\344\275\263\350\276\211/20230215-\346\250\241\345\235\227\347\232\204\344\275\277\347\224\250/module.js" diff --git "a/\346\210\264\344\275\263\350\276\211/20230215/\344\275\234\344\270\232.js" "b/\346\210\264\344\275\263\350\276\211/20230215-\346\250\241\345\235\227\347\232\204\344\275\277\347\224\250/\344\275\234\344\270\232.js" similarity index 100% rename from "\346\210\264\344\275\263\350\276\211/20230215/\344\275\234\344\270\232.js" rename to "\346\210\264\344\275\263\350\276\211/20230215-\346\250\241\345\235\227\347\232\204\344\275\277\347\224\250/\344\275\234\344\270\232.js" -- Gitee From a2f9c25324d4827549c4bb10dcd2af6c02f62004 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=88=B4=E4=BD=B3=E8=BE=895?= <1197986048@qq.com> Date: Fri, 17 Feb 2023 23:53:37 +0000 Subject: [PATCH 21/34] =?UTF-8?q?=E9=87=8D=E5=91=BD=E5=90=8D=20=E6=88=B4?= =?UTF-8?q?=E4=BD=B3=E8=BE=89/20230216=20=E4=B8=BA=20=E6=88=B4=E4=BD=B3?= =?UTF-8?q?=E8=BE=89/20230216-=E6=96=87=E4=BB=B6=E7=9A=84=E5=86=99?= =?UTF-8?q?=E5=85=A5=E4=BB=A5=E5=8F=8A=E8=AF=BB=E5=8F=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../file.js" | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename "\346\210\264\344\275\263\350\276\211/20230216/file.js" => "\346\210\264\344\275\263\350\276\211/20230216-\346\226\207\344\273\266\347\232\204\345\206\231\345\205\245\344\273\245\345\217\212\350\257\273\345\217\226/file.js" (100%) diff --git "a/\346\210\264\344\275\263\350\276\211/20230216/file.js" "b/\346\210\264\344\275\263\350\276\211/20230216-\346\226\207\344\273\266\347\232\204\345\206\231\345\205\245\344\273\245\345\217\212\350\257\273\345\217\226/file.js" similarity index 100% rename from "\346\210\264\344\275\263\350\276\211/20230216/file.js" rename to "\346\210\264\344\275\263\350\276\211/20230216-\346\226\207\344\273\266\347\232\204\345\206\231\345\205\245\344\273\245\345\217\212\350\257\273\345\217\226/file.js" -- Gitee From e16c68c0939fde2c2275d5378472fcecbd326e94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=88=B4=E4=BD=B3=E8=BE=895?= <1197986048@qq.com> Date: Sat, 18 Feb 2023 02:16:38 +0000 Subject: [PATCH 22/34] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=96=87=E4=BB=B6=2002?= =?UTF-8?q?.15-=E6=A8=A1=E5=9D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- "02.15-\346\250\241\345\235\227/moduleObj.js" | 22 ------------------- "02.15-\346\250\241\345\235\227/use.js" | 2 -- 2 files changed, 24 deletions(-) delete mode 100644 "02.15-\346\250\241\345\235\227/moduleObj.js" delete mode 100644 "02.15-\346\250\241\345\235\227/use.js" diff --git "a/02.15-\346\250\241\345\235\227/moduleObj.js" "b/02.15-\346\250\241\345\235\227/moduleObj.js" deleted file mode 100644 index e0cdbed..0000000 --- "a/02.15-\346\250\241\345\235\227/moduleObj.js" +++ /dev/null @@ -1,22 +0,0 @@ -//作业:写个加减乘除的模块(尽量少写暴露,要考虑复用性),供外部使用. 作业每个分支要建一个目录(自己名字) -//加法 - - var x = 6; - var y = 3; - let obj={ - "add":function () { - return x+y; - }, - "jian":function () { - return x-y; - }, - "cheng":function () { - return x*y; - }, - "chu":function () { - return x/y; - } - }; - - -module.exports = obj; \ No newline at end of file diff --git "a/02.15-\346\250\241\345\235\227/use.js" "b/02.15-\346\250\241\345\235\227/use.js" deleted file mode 100644 index 3e06d4e..0000000 --- "a/02.15-\346\250\241\345\235\227/use.js" +++ /dev/null @@ -1,2 +0,0 @@ -var module1 = require('./moduleObj'); -console.log(module1.add()); \ No newline at end of file -- Gitee From 0610a6b71a97529cb6d4908b91ccfda9ce323a5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=88=B4=E4=BD=B3=E8=BE=895?= <1197986048@qq.com> Date: Sat, 18 Feb 2023 02:16:46 +0000 Subject: [PATCH 23/34] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=96=87=E4=BB=B6=20?= =?UTF-8?q?=E6=9C=B1=E7=AB=A0=E5=BD=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- "\346\234\261\347\253\240\345\275\254/.keep" | 0 .../\344\275\234\344\270\232/.keep" | 0 .../.keep" | 0 .../demo.js" | 20 ------------ .../\346\250\241\345\235\227/.keep" | 0 .../\346\250\241\345\235\227/module.js" | 31 ------------------- .../\346\250\241\345\235\227/use.js" | 9 ------ 7 files changed, 60 deletions(-) delete mode 100644 "\346\234\261\347\253\240\345\275\254/.keep" delete mode 100644 "\346\234\261\347\253\240\345\275\254/\344\275\234\344\270\232/.keep" delete mode 100644 "\346\234\261\347\253\240\345\275\254/\344\275\234\344\270\232/\346\226\207\344\273\266\350\257\273\345\217\226/.keep" delete mode 100644 "\346\234\261\347\253\240\345\275\254/\344\275\234\344\270\232/\346\226\207\344\273\266\350\257\273\345\217\226/demo.js" delete mode 100644 "\346\234\261\347\253\240\345\275\254/\344\275\234\344\270\232/\346\250\241\345\235\227/.keep" delete mode 100644 "\346\234\261\347\253\240\345\275\254/\344\275\234\344\270\232/\346\250\241\345\235\227/module.js" delete mode 100644 "\346\234\261\347\253\240\345\275\254/\344\275\234\344\270\232/\346\250\241\345\235\227/use.js" diff --git "a/\346\234\261\347\253\240\345\275\254/.keep" "b/\346\234\261\347\253\240\345\275\254/.keep" deleted file mode 100644 index e69de29..0000000 diff --git "a/\346\234\261\347\253\240\345\275\254/\344\275\234\344\270\232/.keep" "b/\346\234\261\347\253\240\345\275\254/\344\275\234\344\270\232/.keep" deleted file mode 100644 index e69de29..0000000 diff --git "a/\346\234\261\347\253\240\345\275\254/\344\275\234\344\270\232/\346\226\207\344\273\266\350\257\273\345\217\226/.keep" "b/\346\234\261\347\253\240\345\275\254/\344\275\234\344\270\232/\346\226\207\344\273\266\350\257\273\345\217\226/.keep" deleted file mode 100644 index e69de29..0000000 diff --git "a/\346\234\261\347\253\240\345\275\254/\344\275\234\344\270\232/\346\226\207\344\273\266\350\257\273\345\217\226/demo.js" "b/\346\234\261\347\253\240\345\275\254/\344\275\234\344\270\232/\346\226\207\344\273\266\350\257\273\345\217\226/demo.js" deleted file mode 100644 index d64e6a8..0000000 --- "a/\346\234\261\347\253\240\345\275\254/\344\275\234\344\270\232/\346\226\207\344\273\266\350\257\273\345\217\226/demo.js" +++ /dev/null @@ -1,20 +0,0 @@ -let fs = require("fs"); -for (let i = 1; i <=100; i++) { - fs.writeFileSync("./"+i+".txt",String( Math.floor(Math.random() * 1001))); -} - -let max=0; -for (let i = 1; i <=100; i++) { - - - let data = fs.readFileSync("./"+i+".txt"); - - - console.log(Number(data.toString())); - if(Number(data.toString())>=max){ - max=Number(data.toString()); - } - - -} -console.log("最大值为"+max); diff --git "a/\346\234\261\347\253\240\345\275\254/\344\275\234\344\270\232/\346\250\241\345\235\227/.keep" "b/\346\234\261\347\253\240\345\275\254/\344\275\234\344\270\232/\346\250\241\345\235\227/.keep" deleted file mode 100644 index e69de29..0000000 diff --git "a/\346\234\261\347\253\240\345\275\254/\344\275\234\344\270\232/\346\250\241\345\235\227/module.js" "b/\346\234\261\347\253\240\345\275\254/\344\275\234\344\270\232/\346\250\241\345\235\227/module.js" deleted file mode 100644 index 1a5d833..0000000 --- "a/\346\234\261\347\253\240\345\275\254/\344\275\234\344\270\232/\346\250\241\345\235\227/module.js" +++ /dev/null @@ -1,31 +0,0 @@ -function jia(a,b) { - if(a!=/^\d+$/ ||b!=/^\d+$/){ - return "请输入数字" ; - }else{ - return a+b; -}} - - -function jian(a,b) { - if(a!=/^\d+$/ ||b!=/^\d+$/){ - return "请输入数字" ; - }else{ - return a-b; -}} -function cheng(a,b) { - if(a!=/^\d+$/ ||b!=/^\d+$/){ - return "请输入数字" ; - }else{ - return a*b; -}} -function chu(a,b) { - if(a!=/^\d+$/ ||b!=/^\d+$/){ - return "请输入数字" ; - }else{ - return a/b; -}} - -module.exports.jia =jia; -module.exports.jian =jian; -module.exports.cheng =cheng; -module.exports.chu =chu; \ No newline at end of file diff --git "a/\346\234\261\347\253\240\345\275\254/\344\275\234\344\270\232/\346\250\241\345\235\227/use.js" "b/\346\234\261\347\253\240\345\275\254/\344\275\234\344\270\232/\346\250\241\345\235\227/use.js" deleted file mode 100644 index 526c847..0000000 --- "a/\346\234\261\347\253\240\345\275\254/\344\275\234\344\270\232/\346\250\241\345\235\227/use.js" +++ /dev/null @@ -1,9 +0,0 @@ -let result=require("./module"); -console.log(result); - - -console.log(result.jia("x",2)); -console.log(result.jia(2,2)); -console.log(result.jian(50,2)); -console.log(result.cheng(50,2)); -console.log(result.chu(50,2)); \ No newline at end of file -- Gitee From 3cf90b123aa5aa78f47890f6c1397cec99d19b56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=88=B4=E4=BD=B3=E8=BE=895?= <1197986048@qq.com> Date: Sat, 18 Feb 2023 02:16:52 +0000 Subject: [PATCH 24/34] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=96=87=E4=BB=B6=20?= =?UTF-8?q?=E6=9D=8E=E5=AD=90=E4=BA=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../2-13/\347\254\224\350\256\260.txt" | 7 --- .../jie.js" | 5 --- .../zy.js" | 43 ------------------- .../2-16\344\275\234\344\270\232/zy.js" | 30 ------------- 4 files changed, 85 deletions(-) delete mode 100644 "\346\235\216\345\255\220\344\272\221/2-13/\347\254\224\350\256\260.txt" delete mode 100644 "\346\235\216\345\255\220\344\272\221/2-15 \345\205\250\345\261\200\345\222\214\346\250\241\345\235\227/jie.js" delete mode 100644 "\346\235\216\345\255\220\344\272\221/2-15 \345\205\250\345\261\200\345\222\214\346\250\241\345\235\227/zy.js" delete mode 100644 "\346\235\216\345\255\220\344\272\221/2-16\344\275\234\344\270\232/zy.js" diff --git "a/\346\235\216\345\255\220\344\272\221/2-13/\347\254\224\350\256\260.txt" "b/\346\235\216\345\255\220\344\272\221/2-13/\347\254\224\350\256\260.txt" deleted file mode 100644 index 87f962f..0000000 --- "a/\346\235\216\345\255\220\344\272\221/2-13/\347\254\224\350\256\260.txt" +++ /dev/null @@ -1,7 +0,0 @@ -git branch 显示分支 -git branch 分支名 创建分支 -git add 添加文件 -git status 添加到当前分支 -git checkout 分支名 切换分支 -commit -m '内容' 上传 -push 提交 diff --git "a/\346\235\216\345\255\220\344\272\221/2-15 \345\205\250\345\261\200\345\222\214\346\250\241\345\235\227/jie.js" "b/\346\235\216\345\255\220\344\272\221/2-15 \345\205\250\345\261\200\345\222\214\346\250\241\345\235\227/jie.js" deleted file mode 100644 index bf2b645..0000000 --- "a/\346\235\216\345\255\220\344\272\221/2-15 \345\205\250\345\261\200\345\222\214\346\250\241\345\235\227/jie.js" +++ /dev/null @@ -1,5 +0,0 @@ -let obj=require('./zy') -console.log(obj.jia(3,1)) -console.log(obj.jian(6,1)) -console.log(obj.cheng(2,1)) -console.log(obj.chu(2,1)) \ No newline at end of file diff --git "a/\346\235\216\345\255\220\344\272\221/2-15 \345\205\250\345\261\200\345\222\214\346\250\241\345\235\227/zy.js" "b/\346\235\216\345\255\220\344\272\221/2-15 \345\205\250\345\261\200\345\222\214\346\250\241\345\235\227/zy.js" deleted file mode 100644 index e796b7a..0000000 --- "a/\346\235\216\345\255\220\344\272\221/2-15 \345\205\250\345\261\200\345\222\214\346\250\241\345\235\227/zy.js" +++ /dev/null @@ -1,43 +0,0 @@ -// ### 作业:写个加减乘除的模块(尽量少写暴露,要考虑复用性),供外部使用. 作业每个分支要建一个目录(自己名字) -let jieguo; -let obj={ - jia:function(a,b){ - if(Number(a) && Number(b)){ - jieguo=Number(a)+Number(b) - }else{ - jieguo="输入的必须为数字" - } - - return jieguo; - }, - jian:function(a,b){ - if(Number(a) && Number(b)){ - jieguo=Number(a)-Number(b) - }else{ - jieguo="输入的必须为数字" - } - - return jieguo; - }, - cheng:function(a,b){ - if(Number(a) && Number(b)){ - jieguo=Number(a)*Number(b) - }else{ - jieguo="输入的必须为数字" - } - - return jieguo; - }, - chu:function(a,b){ - if(Number(a) && Number(b)){ - jieguo=Number(a)/Number(b) - }else{ - jieguo="输入的必须为数字" - } - - return jieguo; - }, - - -} -module.exports=obj \ No newline at end of file diff --git "a/\346\235\216\345\255\220\344\272\221/2-16\344\275\234\344\270\232/zy.js" "b/\346\235\216\345\255\220\344\272\221/2-16\344\275\234\344\270\232/zy.js" deleted file mode 100644 index c2401f2..0000000 --- "a/\346\235\216\345\255\220\344\272\221/2-16\344\275\234\344\270\232/zy.js" +++ /dev/null @@ -1,30 +0,0 @@ -// ## 作业:生成100个文件,每个文件存入一个1到1000的随机数字,再取出最大值的那个文件,值也要取出来,再取出最小的那个. -let fs=require("fs"); -let shu=[] -let max=0 -let maxwj=0; - -let min=1001; -let minwj=0; -for(let i=1;i<101;i++){ - //创建随机数 - let num=Math.ceil(Math.random()*1000); - //创建一百个文件并且赋值随机数 - fs.writeFileSync("./"+i+".txt",""+num+""); - //读取一百个文件内容并且存入数组 - shu[i]=(fs.readFileSync("./"+i+".txt").toString()); - //最大值 - if(Number(shu[i])>max){ - max=Number(shu[i]) - maxwj=i; - } - //找最小 - if(Number(shu[i]) Date: Sat, 18 Feb 2023 02:17:01 +0000 Subject: [PATCH 25/34] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=96=87=E4=BB=B6=20?= =?UTF-8?q?=E7=8E=8B=E8=90=83/=E6=A8=A1=E5=9D=97=E4=BD=9C=E4=B8=9A2.15?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../use.js" | 5 ---- .../zy.js" | 24 ------------------- 2 files changed, 29 deletions(-) delete mode 100644 "\347\216\213\350\220\203/\346\250\241\345\235\227\344\275\234\344\270\2322.15/use.js" delete mode 100644 "\347\216\213\350\220\203/\346\250\241\345\235\227\344\275\234\344\270\2322.15/zy.js" diff --git "a/\347\216\213\350\220\203/\346\250\241\345\235\227\344\275\234\344\270\2322.15/use.js" "b/\347\216\213\350\220\203/\346\250\241\345\235\227\344\275\234\344\270\2322.15/use.js" deleted file mode 100644 index 9c3cc5c..0000000 --- "a/\347\216\213\350\220\203/\346\250\241\345\235\227\344\275\234\344\270\2322.15/use.js" +++ /dev/null @@ -1,5 +0,0 @@ -let obj = require('./zy'); -console.log(obj.jia(3,4)); -console.log(obj.jian(10,5)); -console.log(obj.cheng(3,4)); -console.log(obj.chu(3,4)); \ No newline at end of file diff --git "a/\347\216\213\350\220\203/\346\250\241\345\235\227\344\275\234\344\270\2322.15/zy.js" "b/\347\216\213\350\220\203/\346\250\241\345\235\227\344\275\234\344\270\2322.15/zy.js" deleted file mode 100644 index 6b17034..0000000 --- "a/\347\216\213\350\220\203/\346\250\241\345\235\227\344\275\234\344\270\2322.15/zy.js" +++ /dev/null @@ -1,24 +0,0 @@ -// 作业:写个加减乘除的模块(尽量少写暴露,要考虑复用性),供外部使用. 作业每个分支要建一个目录(自己名字) -var num ; -let obj = { - 'jia':function(a,b) { - num=a+b; - return num; - }, - 'jian':function(a,b) { - num=a-b; - return num; - }, - 'cheng':function(a,b) { - num=a*b; - return num; - }, - 'chu':function(a,b) { - num=a/b; - return num; - }, - - - -} -module.exports=obj \ No newline at end of file -- Gitee From 6c484bb4609b2766bf7fbf767ff0e0a98de17ae7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=88=B4=E4=BD=B3=E8=BE=895?= <1197986048@qq.com> Date: Sat, 18 Feb 2023 02:17:08 +0000 Subject: [PATCH 26/34] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=96=87=E4=BB=B6=20?= =?UTF-8?q?=E8=8B=8F=E6=BD=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- "\350\213\217\346\275\207/\350\213\217\346\275\207.txt" | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 "\350\213\217\346\275\207/\350\213\217\346\275\207.txt" diff --git "a/\350\213\217\346\275\207/\350\213\217\346\275\207.txt" "b/\350\213\217\346\275\207/\350\213\217\346\275\207.txt" deleted file mode 100644 index e69de29..0000000 -- Gitee From 4c3c48753323902e02d2030b7fdaf2b9fd7a5135 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=88=B4=E4=BD=B3=E8=BE=895?= <1197986048@qq.com> Date: Sat, 18 Feb 2023 02:17:13 +0000 Subject: [PATCH 27/34] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=96=87=E4=BB=B6=20?= =?UTF-8?q?=E9=99=88=E8=B6=8A=E8=B6=8A/02.15?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../02.15/module.js" | 24 ------------------- .../02.15/use.js" | 6 ----- 2 files changed, 30 deletions(-) delete mode 100644 "\351\231\210\350\266\212\350\266\212/02.15/module.js" delete mode 100644 "\351\231\210\350\266\212\350\266\212/02.15/use.js" diff --git "a/\351\231\210\350\266\212\350\266\212/02.15/module.js" "b/\351\231\210\350\266\212\350\266\212/02.15/module.js" deleted file mode 100644 index 9b96a05..0000000 --- "a/\351\231\210\350\266\212\350\266\212/02.15/module.js" +++ /dev/null @@ -1,24 +0,0 @@ -// 写个加减乘除的模块(尽量少写暴露,要考虑复用性),供外部使用. 作业每个分支要建一个目录(自己名字) -var a=20; -function jia(b){ - var c=a+b; - return c; -} -function jian(b){ - var c=a-b; - return c; -} -function cheng(b){ - var c=a*b; - return c; -} -function chu(b){ - var c=a/b; - return c; - -} -module.exports.a=a; -module.exports.jia=jia; -module.exports.jian=jian; -module.exports.cheng=cheng; -module.exports.chu=chu; diff --git "a/\351\231\210\350\266\212\350\266\212/02.15/use.js" "b/\351\231\210\350\266\212\350\266\212/02.15/use.js" deleted file mode 100644 index ffda4c4..0000000 --- "a/\351\231\210\350\266\212\350\266\212/02.15/use.js" +++ /dev/null @@ -1,6 +0,0 @@ -let Obj=require("./module"); -console.log(Obj.a); -console.log(Obj.jia(10)); -console.log(Obj.jian(10)); -console.log(Obj.cheng(10)); -console.log(Obj.chu(10)); -- Gitee From 9c4989cdcdb5aa922bdc26bce933d54f4889931b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=88=B4=E4=BD=B3=E8=BE=895?= <1197986048@qq.com> Date: Sat, 18 Feb 2023 02:17:18 +0000 Subject: [PATCH 28/34] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=96=87=E4=BB=B6=20?= =?UTF-8?q?=E9=9F=A6=E7=BB=8D=E4=B8=A5/=E6=96=87=E4=BB=B6=E7=B3=BB?= =?UTF-8?q?=E7=BB=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../p.js" | 24 ------------------- 1 file changed, 24 deletions(-) delete mode 100644 "\351\237\246\347\273\215\344\270\245/\346\226\207\344\273\266\347\263\273\347\273\237/p.js" diff --git "a/\351\237\246\347\273\215\344\270\245/\346\226\207\344\273\266\347\263\273\347\273\237/p.js" "b/\351\237\246\347\273\215\344\270\245/\346\226\207\344\273\266\347\263\273\347\273\237/p.js" deleted file mode 100644 index 6f6f845..0000000 --- "a/\351\237\246\347\273\215\344\270\245/\346\226\207\344\273\266\347\263\273\347\273\237/p.js" +++ /dev/null @@ -1,24 +0,0 @@ -let fs = require("fs"); - -var max = 0; -var min = 1000; - - -for (var i = 0; i < 100; i++) { - var num = Math.floor(Math.random() * 1001); - fs.writeFileSync("./" + i + ".txt", "" + num + ""); - - var Max_fileName; - var Min_fileName; - - if (num > max) { - max = num; - Max_fileName = i + ".txt"; - } - if (num < min) { - min = num; - Min_fileName = i + ".txt"; - } -} - -console.log("最大的文件"+Max_fileName,"最大值"+max,"最小的文件"+Min_fileName,"最小值"+min); -- Gitee From 0cf534e7efa8486659b9d949e3fd5bcc988b5ba5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=88=B4=E4=BD=B3=E8=BE=895?= <1197986048@qq.com> Date: Sat, 18 Feb 2023 02:17:23 +0000 Subject: [PATCH 29/34] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=96=87=E4=BB=B6=20RE?= =?UTF-8?q?ADME.en.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.en.md | 36 ------------------------------------ 1 file changed, 36 deletions(-) delete mode 100644 README.en.md diff --git a/README.en.md b/README.en.md deleted file mode 100644 index 5cd8805..0000000 --- a/README.en.md +++ /dev/null @@ -1,36 +0,0 @@ -# 21届7班node作业 - -#### Description -{**When you're done, you can delete the content in this README and update the file with details for others getting started with your repository**} - -#### Software Architecture -Software architecture description - -#### Installation - -1. xxxx -2. xxxx -3. xxxx - -#### Instructions - -1. xxxx -2. xxxx -3. xxxx - -#### Contribution - -1. Fork the repository -2. Create Feat_xxx branch -3. Commit your code -4. Create Pull Request - - -#### Gitee Feature - -1. You can use Readme\_XXX.md to support different languages, such as Readme\_en.md, Readme\_zh.md -2. Gitee blog [blog.gitee.com](https://blog.gitee.com) -3. Explore open source project [https://gitee.com/explore](https://gitee.com/explore) -4. The most valuable open source project [GVP](https://gitee.com/gvp) -5. The manual of Gitee [https://gitee.com/help](https://gitee.com/help) -6. The most popular members [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/) -- Gitee From d2eb94e2d58749d1d09732a9fb4084c32b9816ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=88=B4=E4=BD=B3=E8=BE=895?= <1197986048@qq.com> Date: Sat, 18 Feb 2023 02:18:09 +0000 Subject: [PATCH 30/34] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=96=87=E4=BB=B6=20wi?= =?UTF-8?q?sh.html?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- wish.html | 12 ------------ 1 file changed, 12 deletions(-) delete mode 100644 wish.html diff --git a/wish.html b/wish.html deleted file mode 100644 index 8fd0b0f..0000000 --- a/wish.html +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - 要工作了 - - -

好好学习,努力挣钱,养自己/养女朋友/养男朋友

- - \ No newline at end of file -- Gitee From 5045a9a2d063fef92fd0ba28809ddd25d89a44ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=88=B4=E4=BD=B3=E8=BE=895?= <1197986048@qq.com> Date: Sat, 18 Feb 2023 06:14:35 +0000 Subject: [PATCH 31/34] 20230218 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 戴佳辉5 <1197986048@qq.com> --- .../file.js" | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 "\346\210\264\344\275\263\350\276\211/20230218-\345\274\202\345\220\214\346\255\245\346\226\207\344\273\266\345\206\231\345\205\245/file.js" diff --git "a/\346\210\264\344\275\263\350\276\211/20230218-\345\274\202\345\220\214\346\255\245\346\226\207\344\273\266\345\206\231\345\205\245/file.js" "b/\346\210\264\344\275\263\350\276\211/20230218-\345\274\202\345\220\214\346\255\245\346\226\207\344\273\266\345\206\231\345\205\245/file.js" new file mode 100644 index 0000000..0739e98 --- /dev/null +++ "b/\346\210\264\344\275\263\350\276\211/20230218-\345\274\202\345\220\214\346\255\245\346\226\207\344\273\266\345\206\231\345\205\245/file.js" @@ -0,0 +1,35 @@ +// 作业2:生成1000个文件,用同步异步分别计算生成文件的时间. +let fs = require("fs"); + +// 同步写入,异步读取(等待两秒后读取) +for(let i=0;i<1000;i++){ + var nowDate = new Date(); + var fileName = "./files/"+i; + fs.writeFileSync(fileName,"写入文件的时间戳为:"+nowDate.getTime()+"ms,写入文件的时间为:"+nowDate.toLocaleString()); +} +var startTime = null ; +var endTime = null; +fs.readFile("./files/0",(error,data)=>{ + startTime = data.toString().substring(10,23); + console.log("同步文件写入的开始时间戳为:"+startTime); +}); +fs.readFile("./files/999",(error,data)=>{ + endTime = data.toString().substring(10,23); + console.log("同步文件写入的结束时间戳为:"+endTime); +}); +setTimeout(() => { + console.log("同步创建1000个文件消耗的的时间为:"+(endTime-startTime)+"ms") +}, 2000); + +// 异步写入 +setTimeout(() => { + var t1=new Date().getTime(); + for(let j=0;j<1000;j++){ + var nowDate = new Date(); + var fileName = "./files/D"+j; + fs.writeFile(fileName,"写入文件的时间戳为:"+nowDate.getTime()+"ms,写入文件的时间为:"+nowDate.toLocaleString(),(error,data)=>{}); + } + var t2=new Date().getTime(); + console.log("异步创建1000个文件消耗的时间为:"+(t2-t1)+"ms"); +}, 2500); + -- Gitee From df3dea9f40eae0c0ab6dd57f8262424442ecc7ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=88=B4=E4=BD=B3=E8=BE=895?= <1197986048@qq.com> Date: Sat, 18 Feb 2023 06:14:59 +0000 Subject: [PATCH 32/34] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=96=87=E4=BB=B6=20RE?= =?UTF-8?q?ADME.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 39 --------------------------------------- 1 file changed, 39 deletions(-) delete mode 100644 README.md diff --git a/README.md b/README.md deleted file mode 100644 index 2354532..0000000 --- a/README.md +++ /dev/null @@ -1,39 +0,0 @@ -# 21届7班node作业 - -#### 介绍 -{**以下是 Gitee 平台说明,您可以替换此简介** -Gitee 是 OSCHINA 推出的基于 Git 的代码托管平台(同时支持 SVN)。专为开发者提供稳定、高效、安全的云端软件开发协作平台 -无论是个人、团队、或是企业,都能够用 Gitee 实现代码托管、项目管理、协作开发。企业项目请看 [https://gitee.com/enterprises](https://gitee.com/enterprises)} - -#### 软件架构 -软件架构说明 - - -#### 安装教程 - -1. xxxx -2. xxxx -3. xxxx - -#### 使用说明 - -1. xxxx -2. xxxx -3. xxxx - -#### 参与贡献 - -1. Fork 本仓库 -2. 新建 Feat_xxx 分支 -3. 提交代码 -4. 新建 Pull Request - - -#### 特技 - -1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md -2. Gitee 官方博客 [blog.gitee.com](https://blog.gitee.com) -3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解 Gitee 上的优秀开源项目 -4. [GVP](https://gitee.com/gvp) 全称是 Gitee 最有价值开源项目,是综合评定出的优秀开源项目 -5. Gitee 官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help) -6. Gitee 封面人物是一档用来展示 Gitee 会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/) -- Gitee From 19f99cd1a6fafe1d7ccc293ea2b217b3f32dcbba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=88=B4=E4=BD=B3=E8=BE=895?= <1197986048@qq.com> Date: Sat, 18 Feb 2023 07:28:25 +0000 Subject: [PATCH 33/34] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=96=87=E4=BB=B6=20?= =?UTF-8?q?=E6=88=B4=E4=BD=B3=E8=BE=89/20230218-=E5=BC=82=E5=90=8C?= =?UTF-8?q?=E6=AD=A5=E6=96=87=E4=BB=B6=E5=86=99=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../file.js" | 35 ------------------- 1 file changed, 35 deletions(-) delete mode 100644 "\346\210\264\344\275\263\350\276\211/20230218-\345\274\202\345\220\214\346\255\245\346\226\207\344\273\266\345\206\231\345\205\245/file.js" diff --git "a/\346\210\264\344\275\263\350\276\211/20230218-\345\274\202\345\220\214\346\255\245\346\226\207\344\273\266\345\206\231\345\205\245/file.js" "b/\346\210\264\344\275\263\350\276\211/20230218-\345\274\202\345\220\214\346\255\245\346\226\207\344\273\266\345\206\231\345\205\245/file.js" deleted file mode 100644 index 0739e98..0000000 --- "a/\346\210\264\344\275\263\350\276\211/20230218-\345\274\202\345\220\214\346\255\245\346\226\207\344\273\266\345\206\231\345\205\245/file.js" +++ /dev/null @@ -1,35 +0,0 @@ -// 作业2:生成1000个文件,用同步异步分别计算生成文件的时间. -let fs = require("fs"); - -// 同步写入,异步读取(等待两秒后读取) -for(let i=0;i<1000;i++){ - var nowDate = new Date(); - var fileName = "./files/"+i; - fs.writeFileSync(fileName,"写入文件的时间戳为:"+nowDate.getTime()+"ms,写入文件的时间为:"+nowDate.toLocaleString()); -} -var startTime = null ; -var endTime = null; -fs.readFile("./files/0",(error,data)=>{ - startTime = data.toString().substring(10,23); - console.log("同步文件写入的开始时间戳为:"+startTime); -}); -fs.readFile("./files/999",(error,data)=>{ - endTime = data.toString().substring(10,23); - console.log("同步文件写入的结束时间戳为:"+endTime); -}); -setTimeout(() => { - console.log("同步创建1000个文件消耗的的时间为:"+(endTime-startTime)+"ms") -}, 2000); - -// 异步写入 -setTimeout(() => { - var t1=new Date().getTime(); - for(let j=0;j<1000;j++){ - var nowDate = new Date(); - var fileName = "./files/D"+j; - fs.writeFile(fileName,"写入文件的时间戳为:"+nowDate.getTime()+"ms,写入文件的时间为:"+nowDate.toLocaleString(),(error,data)=>{}); - } - var t2=new Date().getTime(); - console.log("异步创建1000个文件消耗的时间为:"+(t2-t1)+"ms"); -}, 2500); - -- Gitee From 12bd19c27434eaee1b9fecc56311a2145dcec460 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=88=B4=E4=BD=B3=E8=BE=895?= <1197986048@qq.com> Date: Sat, 18 Feb 2023 07:28:40 +0000 Subject: [PATCH 34/34] 20230218 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 戴佳辉5 <1197986048@qq.com> --- .../file.js" | 46 +++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 "\346\210\264\344\275\263\350\276\211/20230218-\345\274\202\345\220\214\346\255\245\346\226\207\344\273\266\345\206\231\345\205\245/file.js" diff --git "a/\346\210\264\344\275\263\350\276\211/20230218-\345\274\202\345\220\214\346\255\245\346\226\207\344\273\266\345\206\231\345\205\245/file.js" "b/\346\210\264\344\275\263\350\276\211/20230218-\345\274\202\345\220\214\346\255\245\346\226\207\344\273\266\345\206\231\345\205\245/file.js" new file mode 100644 index 0000000..cd2536e --- /dev/null +++ "b/\346\210\264\344\275\263\350\276\211/20230218-\345\274\202\345\220\214\346\255\245\346\226\207\344\273\266\345\206\231\345\205\245/file.js" @@ -0,0 +1,46 @@ +// 作业2:生成1000个文件,用同步异步分别计算生成文件的时间. +let fs = require("fs"); + +// 同步写入 +//方法一: +var T1=new Date().getTime(); +for(let i=0;i<1000;i++){ + var nowDate = new Date(); + var fileName = "./files/"+i; + fs.writeFileSync(fileName,"写入文件的时间戳为:"+nowDate.getTime()+"ms,写入文件的时间为:"+nowDate.toLocaleString()); +} +var T2=new Date().getTime(); +console.log("方法一同步创建1000个文件消耗的时间为:"+(T2-T1)+"ms"); + +// 方法二:同步写入异步读取(等待两秒后读取) +for(let i=0;i<1000;i++){ + var nowDate = new Date(); + var fileName = "./files/"+i; + fs.writeFileSync(fileName,"写入文件的时间戳为:"+nowDate.getTime()+"ms,写入文件的时间为:"+nowDate.toLocaleString()); +} +var startTime = null ; +var endTime = null; +fs.readFile("./files/0",(error,data)=>{ + startTime = data.toString().substring(10,23); + console.log("同步文件写入的开始时间戳为:"+startTime); +}); +fs.readFile("./files/999",(error,data)=>{ + endTime = data.toString().substring(10,23); + console.log("同步文件写入的结束时间戳为:"+endTime); +}); +setTimeout(() => { + console.log("方法二同步创建1000个文件消耗的的时间为:"+(endTime-startTime)+"ms") +}, 2000); + +// 异步写入 +setTimeout(() => { + var t1=new Date().getTime(); + for(let j=0;j<1000;j++){ + var nowDate = new Date(); + var fileName = "./files/D"+j; + fs.writeFile(fileName,"写入文件的时间戳为:"+nowDate.getTime()+"ms,写入文件的时间为:"+nowDate.toLocaleString(),(error,data)=>{}); + } + var t2=new Date().getTime(); + console.log("异步创建1000个文件消耗的时间为:"+(t2-t1)+"ms"); +}, 2500); + -- Gitee