Skip to content

Commit

Permalink
no message
Browse files Browse the repository at this point in the history
  • Loading branch information
Echo authored and Echo committed Dec 4, 2023
1 parent aa7e57d commit f209fa6
Show file tree
Hide file tree
Showing 149 changed files with 86,045 additions and 86,019 deletions.
26 changes: 26 additions & 0 deletions golang/defer.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
package main
import "fmt"

func deferUtil() func(int) int {
i :=0
return func(n int) int {
// t :=0
fmt.Printf("本次调用接收到n=%v\n", 3 / n)
i++
fmt.Printf("匿名工具函数第%v次被调用\n", i)
return i
}
}
func Defer() int {
f := deferUtil()
//f(1)
defer f(1)
//defer f(f(3))
// return f(2)}
fmt.Printf("本次调用接收到n=%v\n", 132435)
return 2546
}
func main() {
ccc := Defer()
fmt.Printf("main", ccc)
}
4 changes: 2 additions & 2 deletions golang/go.mod
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module Main
module echo

go 1.19
go 1.20
14 changes: 7 additions & 7 deletions golang/main.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package main

import "fmt"

func main() {
fmt.Println("HELLO")
}
package main

import "fmt"

func main() {
fmt.Println("HELLO")
}
4,554 changes: 2,277 additions & 2,277 deletions vue2.0-taopiaopiao-master/server/database/sh_hot.json

Large diffs are not rendered by default.

144 changes: 72 additions & 72 deletions vue2.0-taopiaopiao-master/server/database/swiper.json
Original file line number Diff line number Diff line change
@@ -1,73 +1,73 @@
{
"api": "mtop.film.MtopAdvertiseAPI.queryAdvertise",
"data": {
"returnCode": "0",
"returnValue": [{
"actionUrl": "https://www.taobao.com/markets/TaoBaoMovie/1212?actSharpId=14608&actAllId=14608&s=tb&spm=dianying.tb.1.1&cityCode=110100",
"advertiseContainer": "INDEX_BANNER",
"advertiseType": "1",
"extActions": [],
"gmtModified": "1481179955000",
"hasBannerTag": "false",
"id": "3842",
"priority": "15",
"smallPicUrl": "tfs/TB1.Zy6OFXXXXbhXpXXXXXXXXXX-1280-520.jpg",
"smallPicUrl2": "tfs/TB1.Zy6OFXXXXbhXpXXXXXXXXXX-1280-520.jpg",
"title": "手淘-大盘双十二12.9"
}, {
"actionTitle": "1",
"actionUrl": "https://market.m.taobao.com/markets/TaoBaoMovie/28age?s=tb&spm=dianying.tb.1.1&cityCode=110100",
"advertiseContainer": "INDEX_BANNER",
"advertiseType": "1",
"bigPicUrl": "tps/TB1YTkBOpXXXXbLaXXXXXXXXXXX-1280-520.jpg",
"extActions": [],
"gmtModified": "1481248904000",
"hasBannerTag": "false",
"id": "3787",
"priority": "14",
"smallPicUrl": "tps/TB1YTkBOpXXXXbLaXXXXXXXXXXX-1280-520.jpg",
"smallPicUrl2": "tps/TB1YTkBOpXXXXbLaXXXXXXXXXXX-1280-520.jpg",
"title": "三平台集合-28岁未成年"
},{
"actionTitle": "1",
"actionUrl": "https://market.m.taobao.com/markets/TaoBaoMovie/xinrenshy?s=tb&spm=dianying.tb.1.1&cityCode=110100",
"advertiseContainer": "INDEX_BANNER",
"advertiseType": "1",
"bigPicUrl": "tps/TB1TikAOpXXXXaWXFXXXXXXXXXX-1280-520.jpg",
"extActions": [],
"gmtModified": "1480561472000",
"id": "3733",
"priority": "20",
"smallPicUrl": "tps/TB1TikAOpXXXXaWXFXXXXXXXXXX-1280-520.jpg",
"smallPicUrl2": "tps/TB1TikAOpXXXXaWXFXXXXXXXXXX-1280-520.jpg",
"title": "三平台集合-新人活动banner12.1-12.15"
}, {
"actionUrl": "https://h5.m.taobao.com/app/movie/pages/index/movie-detail.html?showid=205256&s=tb&spm=dianying.tb.1.1&cityCode=110100",
"advertiseContainer": "INDEX_BANNER",
"advertiseType": "1",
"extActions": [],
"gmtModified": "1480932506000",
"id": "3786",
"priority": "12",
"smallPicUrl": "tps/TB1qex6OFXXXXcbXXXXXXXXXXXX-1280-520.jpg",
"smallPicUrl2": "tps/TB1qex6OFXXXXcbXXXXXXXXXXXX-1280-520.jpg",
"title": "手淘-萨利机长"
}, {
"actionTitle": "1",
"actionUrl": "https://market.m.taobao.com/markets/TaoBaoMovie/xzgjl?s=tb&spm=dianying.tb.1.1&cityCode=110100",
"advertiseContainer": "INDEX_BANNER",
"advertiseType": "1",
"bigPicUrl": "tps/TB1pre1OFXXXXaGXXXXXXXXXXXX-1280-520.jpg",
"extActions": [],
"gmtModified": "1481248953000",
"hasBannerTag": "false",
"id": "3755",
"priority": "11",
"smallPicUrl": "tps/TB1pre1OFXXXXaGXXXXXXXXXXXX-1280-520.jpg",
"smallPicUrl2": "tps/TB1pre1OFXXXXaGXXXXXXXXXXXX-1280-520.jpg",
"title": "三平台集合-血战钢锯岭"
}]
},
"ret": ["SUCCESS::调用成功"],
"v": "5.0"
{
"api": "mtop.film.MtopAdvertiseAPI.queryAdvertise",
"data": {
"returnCode": "0",
"returnValue": [{
"actionUrl": "https://www.taobao.com/markets/TaoBaoMovie/1212?actSharpId=14608&actAllId=14608&s=tb&spm=dianying.tb.1.1&cityCode=110100",
"advertiseContainer": "INDEX_BANNER",
"advertiseType": "1",
"extActions": [],
"gmtModified": "1481179955000",
"hasBannerTag": "false",
"id": "3842",
"priority": "15",
"smallPicUrl": "tfs/TB1.Zy6OFXXXXbhXpXXXXXXXXXX-1280-520.jpg",
"smallPicUrl2": "tfs/TB1.Zy6OFXXXXbhXpXXXXXXXXXX-1280-520.jpg",
"title": "手淘-大盘双十二12.9"
}, {
"actionTitle": "1",
"actionUrl": "https://market.m.taobao.com/markets/TaoBaoMovie/28age?s=tb&spm=dianying.tb.1.1&cityCode=110100",
"advertiseContainer": "INDEX_BANNER",
"advertiseType": "1",
"bigPicUrl": "tps/TB1YTkBOpXXXXbLaXXXXXXXXXXX-1280-520.jpg",
"extActions": [],
"gmtModified": "1481248904000",
"hasBannerTag": "false",
"id": "3787",
"priority": "14",
"smallPicUrl": "tps/TB1YTkBOpXXXXbLaXXXXXXXXXXX-1280-520.jpg",
"smallPicUrl2": "tps/TB1YTkBOpXXXXbLaXXXXXXXXXXX-1280-520.jpg",
"title": "三平台集合-28岁未成年"
},{
"actionTitle": "1",
"actionUrl": "https://market.m.taobao.com/markets/TaoBaoMovie/xinrenshy?s=tb&spm=dianying.tb.1.1&cityCode=110100",
"advertiseContainer": "INDEX_BANNER",
"advertiseType": "1",
"bigPicUrl": "tps/TB1TikAOpXXXXaWXFXXXXXXXXXX-1280-520.jpg",
"extActions": [],
"gmtModified": "1480561472000",
"id": "3733",
"priority": "20",
"smallPicUrl": "tps/TB1TikAOpXXXXaWXFXXXXXXXXXX-1280-520.jpg",
"smallPicUrl2": "tps/TB1TikAOpXXXXaWXFXXXXXXXXXX-1280-520.jpg",
"title": "三平台集合-新人活动banner12.1-12.15"
}, {
"actionUrl": "https://h5.m.taobao.com/app/movie/pages/index/movie-detail.html?showid=205256&s=tb&spm=dianying.tb.1.1&cityCode=110100",
"advertiseContainer": "INDEX_BANNER",
"advertiseType": "1",
"extActions": [],
"gmtModified": "1480932506000",
"id": "3786",
"priority": "12",
"smallPicUrl": "tps/TB1qex6OFXXXXcbXXXXXXXXXXXX-1280-520.jpg",
"smallPicUrl2": "tps/TB1qex6OFXXXXcbXXXXXXXXXXXX-1280-520.jpg",
"title": "手淘-萨利机长"
}, {
"actionTitle": "1",
"actionUrl": "https://market.m.taobao.com/markets/TaoBaoMovie/xzgjl?s=tb&spm=dianying.tb.1.1&cityCode=110100",
"advertiseContainer": "INDEX_BANNER",
"advertiseType": "1",
"bigPicUrl": "tps/TB1pre1OFXXXXaGXXXXXXXXXXXX-1280-520.jpg",
"extActions": [],
"gmtModified": "1481248953000",
"hasBannerTag": "false",
"id": "3755",
"priority": "11",
"smallPicUrl": "tps/TB1pre1OFXXXXaGXXXXXXXXXXXX-1280-520.jpg",
"smallPicUrl2": "tps/TB1pre1OFXXXXaGXXXXXXXXXXXX-1280-520.jpg",
"title": "三平台集合-血战钢锯岭"
}]
},
"ret": ["SUCCESS::调用成功"],
"v": "5.0"
}
38 changes: 19 additions & 19 deletions vue2.0-taopiaopiao-master/server/package.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
{
"name": "taopiaopiao-server",
"version": "0.0.0",
"private": true,
"scripts": {
"start": "node ./bin/www",
"start:strict": "node --use-strict ./bin/www"
},
"dependencies": {
"body-parser": "~1.13.2",
"cookie-parser": "~1.3.5",
"debug": "~2.2.0",
"ejs": "~2.3.3",
"express": "~4.13.1",
"iconv-lite": "^0.4.13",
"morgan": "~1.6.1",
"serve-favicon": "~2.3.0"
}
}
{
"name": "taopiaopiao-server",
"version": "0.0.0",
"private": true,
"scripts": {
"start": "node ./bin/www",
"start:strict": "node --use-strict ./bin/www"
},
"dependencies": {
"body-parser": "~1.13.2",
"cookie-parser": "~1.3.5",
"debug": "~2.2.0",
"ejs": "~2.3.3",
"express": "~4.13.1",
"iconv-lite": "^0.4.13",
"morgan": "~1.6.1",
"serve-favicon": "~2.3.0"
}
}

Large diffs are not rendered by default.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

92 changes: 46 additions & 46 deletions vue2.0-taopiaopiao-master/server/routes/dealfn.js
Original file line number Diff line number Diff line change
@@ -1,46 +1,46 @@
let fs = require('fs');

let dealFn = {
/**
* [通过Promise写入数据]
* @param {String} file [文件名]
* @param {Object} obj [写入的数据(对象)]
* @return {Object} [Promise对象]
*/
writeFileData: (file, obj) => {
let promise = new Promise((resolve, reject) => {
obj = JSON.stringify(obj);
fs.writeFile("./database/" + file, obj, function(err){
if(err) {
reject("fail " + err)
}
else {
resolve("write success!");
}
});
})
return promise;
},

/**
* [通过Promise读取存储的数据]
* @param {String} file [文件名]
* @return {Object} [Promise对象]
*/
readFileData: (file) => {
let promise = new Promise((resolve, reject) => {
fs.readFile("./database/" + file, "utf-8", (err, data) => {
if(err) {
console.log(err);
reject("read filedata error!");
}else {
data = JSON.parse(data);
resolve(data);
}
})
});
return promise;
}
}

module.exports = dealFn;
let fs = require('fs');

let dealFn = {
/**
* [通过Promise写入数据]
* @param {String} file [文件名]
* @param {Object} obj [写入的数据(对象)]
* @return {Object} [Promise对象]
*/
writeFileData: (file, obj) => {
let promise = new Promise((resolve, reject) => {
obj = JSON.stringify(obj);
fs.writeFile("./database/" + file, obj, function(err){
if(err) {
reject("fail " + err)
}
else {
resolve("write success!");
}
});
})
return promise;
},

/**
* [通过Promise读取存储的数据]
* @param {String} file [文件名]
* @return {Object} [Promise对象]
*/
readFileData: (file) => {
let promise = new Promise((resolve, reject) => {
fs.readFile("./database/" + file, "utf-8", (err, data) => {
if(err) {
console.log(err);
reject("read filedata error!");
}else {
data = JSON.parse(data);
resolve(data);
}
})
});
return promise;
}
}

module.exports = dealFn;
Loading

0 comments on commit f209fa6

Please sign in to comment.