上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 21 下一页
摘要: 预备知识: //箭头函数一个参数时可以去掉箭头,返回语句只有一行的话,可以省略return (x)=>{return x*2} 等价于 x => x*2 //catch((e)=>console.log(e)) //或者 //catch(failueCallBack) 等价于 then(null,f 阅读全文
posted @ 2021-06-30 17:42 留下成长的足迹 阅读(37) 评论(0) 推荐(0)
摘要: 1.exact为true或false的区别 exact:一般而言,react路由会匹配所有匹配到的路由组件,exact能够使得路由的匹配更严格一些。exact的值为bool型,为true是表示严格匹配,要求路径与location.pathname必须完全匹配,且会比较匹配过的路由是否和正匹配的路由一 阅读全文
posted @ 2021-06-28 14:19 留下成长的足迹 阅读(830) 评论(0) 推荐(0)
摘要: 1.Asp.net MVC 2.web页面展示(前端) 2.1 html (页面框架) 2.2 css (样式) 2.3 javascript,简称js (向后端发送请求,保存数据,或者从后端获取数据) 参考:https://www.w3school.com.cn/ 3.数据库存储(sqlserve 阅读全文
posted @ 2021-06-27 16:20 留下成长的足迹 阅读(458) 评论(0) 推荐(0)
摘要: 1.安装Microsoft.AspNetCore.Mvc.Cors; 2.在startup.cs中配置 3.然后localhost:3002就可以跨域请求了。如果想所有的网站都可以请求,把allowanyoriginas替换withorigins 阅读全文
posted @ 2021-06-25 18:13 留下成长的足迹 阅读(119) 评论(0) 推荐(0)
摘要: 1.安装axios npm install axios2.引用axiosimport axios from 'axios'3.发送get请求 参考地址 GitHub - axios/axios: Promise based HTTP client for the browser and node.j 阅读全文
posted @ 2021-06-25 18:09 留下成长的足迹 阅读(542) 评论(0) 推荐(0)
摘要: 1.下载程序包Swashbuckle.AspNetCore 2.在startup.cs中配置 注意:v1版本号和“swagger/v1/swagger.json”要对应上,否则报 “Not Found /swagger/v1/swagger.json” 3.在project property中勾选X 阅读全文
posted @ 2021-06-25 17:55 留下成长的足迹 阅读(231) 评论(0) 推荐(0)
摘要: 1.安装nodejs和npm (node -v 查看nodejs版本 npm -v 查看npm版本) 2.安装react脚手架包 npm install -g create-react-app 3.创建新项目 (npx) create-react-app my-app 4.启动 cd my-app 阅读全文
posted @ 2021-06-21 17:51 留下成长的足迹 阅读(156) 评论(0) 推荐(0)
摘要: 1.React.createElement(arg1, arg2, arg3) 前三个参数分别为类型,props,children 参考地址: Introducing JSX – React (reactjs.org) 2.继承React.Component的Class必须有render方法,每次调 阅读全文
posted @ 2021-06-15 16:54 留下成长的足迹 阅读(37) 评论(0) 推荐(0)
摘要: 1.缓存穿透:如果没有缓存,高并发会直接访问数据库。可以设置一个值为null的缓存。 2.缓存击穿:当高并发请求,而缓存过期或没有数据,需要从数据库读取数据。这时可以采用分布式锁,只有一个线程更新并写入。 3.自增: incr article:readcount:100 4.分布式锁: setnx 阅读全文
posted @ 2021-05-23 20:38 留下成长的足迹 阅读(100) 评论(0) 推荐(0)
摘要: 1.冒泡和快速排序 /// <summary> /// bubble sort /// </summary> /// <param name="arr">the array to sort</param> /// <returns></returns> public int[] BubbleSort 阅读全文
posted @ 2021-05-13 18:21 留下成长的足迹 阅读(57) 评论(0) 推荐(0)
上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 21 下一页