- 博客(101)
- 资源 (44)
- 收藏
- 关注
原创 函数计算 Flask实现
1.安装插件pip intall -t . flaskpip install -t .flask-restful2.示例代码
2021-03-30 17:48:19 290
原创 koa2 微服务网关 服务发现实现
const Consul = require('consul')const { config } = require('../config')class Discovery { constructor() { this.consul = new Consul(config.consul) } async getValue(key) { return await this.consul.kv.get(key) } async s.
2021-03-30 17:43:52 745
原创 koa2配置文件设置
config/index.jsvar base={}var dev={}var pro={}module.exports=process.env.NODE_ENV=='dev'?Object.assign(dev,base):Object.assign(pro.base)
2021-03-30 17:32:48 641
原创 Go 生成手机验证码
import ( "fmt" "math/rand" "time")func captcha(n int) string{ code:="" rand.Seed(time.Now().Unix()) for i:=0;i<n;i++{ code=fmt.Sprintf("%s%d",code,rand.Intn(10)) } return code}func main() { code:= captcha(4) fmt.Println(code) /..
2020-07-07 17:30:59 1094
原创 Go实现1..100累加(递归算法实现)
func summary(a int) int{ if a==1{ return 1 } return a+summary(a-1)}func main() { m:=summary(100) fmt.Println(m)}
2020-07-05 19:42:43 2662
原创 Go 实现水仙花数
func itheima() { for i:=100;i<1000;i++{ d1:=i/100 //百位 d2:=i%100/10 // 十位 d3:=i%10 // 个位 d4:=int(math.Pow(float64(d1),3)) d5:=int(math.Pow(float64(d2),3)) d6:=int(math.Pow(float64(d3),3)) if d4+d5+d6 == i{ fmt.Printf("%v\.
2020-07-03 13:48:05 344
原创 vue-elment-admin 打包部署到oss存储桶
流水线打包和通过脚本上传到oss设置默认index.html即可访问如果后端采用函数计算则不需要ecs了,需要另购RDS 高并发都能扛得住
2020-06-28 18:12:13 488
原创 阿里云函数 访问Redis
阿里云函数是运行在容器中 只有触发器触发时才会创建容器云函数能正确访问redis,需要做以下配置vpc,vswitch 尽量放在杭州g h区中这样在云函数才能在配置选项中找到这些安全配置const redis= require('redis')const client=redis.createClient(port, host, { auth_pass: '...
2020-04-23 12:52:38 350 1
原创 阿里云函数 实现企业微信消息 回调地址验证
阿里云函数 实现企业微信消息 回调地址验证 getRawBody(req, async function (err, body) { // resp.send('Hello') // 企业微信消息回调地验证 if (req.method == 'GET') { var sVerifyMsgSig = req.queries.msg_signatur...
2020-04-22 16:55:08 508
原创 coding.net 自动化云部署
腾讯云的Coding.net提供了一整套开发平台工具scm,其中最适用的小团队开发利器自动化构建工具Jenkinsfile脚本。以下以一个H5网站为例实现代码自动构建和远程生产发布。业务流程说明:在Coding.net中创建一个项目并初始化一个空仓库 在线或本地IDE开发 创建一个构建脚本命名为 Jenkinsfile 在生产服务器上配置一个Flask应用(接收上传文件...
2019-11-29 18:45:12 1102
原创 Win10 通知显示自定义股票价格
工作时间查看股票价格不大方便,不停翻手机也存在问题该应用通过Powershell脚本实现自定义股票的通知显示在脚本中定义好股票代码就可以通过全局快捷方式启动查看$stocks = "sh600048","sh601225","sh600750"通过配置快捷方式加快捷键 如 CTRL+F12 就可以全局唤起通知显示效果如果所示10秒后自动关闭,方便上班族使用的利器如需...
2019-11-13 17:03:14 5455
原创 T440p黑苹果 BIOS设置
Bios Settings(开机按 F1)安装MacOS必须执行以下配置In Security menu, set the following settings:Security > Security Chip: must be Disabled, Memory Protection > Execution Prevention: must be Enabled, Vi...
2019-08-07 16:36:35 5979
原创 Spring Boot 开发优点
基于Spring开发Web应用更加容易采用基于注解方式的配置,避免了编写大量重复的XML配置轻松集成Spring家族的其他框架(Spring Boot Starter)Spring JDBCSpring Data提供嵌入式服务器,开发和部署...
2019-06-14 23:34:12 187
原创 Spring Cloud 模块介绍
Spring Cloud 模块介绍Eureka 服务注册中心Ribbon 基于客户端的负载均衡组件Hystrix 容错框架 防止服务的雪崩效应Feign Web服务客户端 简化Http接口的调用Zuul API网关,提供路由转发、请求过滤等功能Config 分布式配置管理Sleuth 服务跟踪Stream 构建消息驱动的微服务应用程序框架Bus 消息代理的集群消息总线...
2019-06-14 23:06:54 112
原创 SpringCloud与Dubbo
首先2者应是不同的东西Dubbo相当于SpringCloud的一个子集,与之对应的是gPRC,Thrift之类的框架从性能比较:Dubbo比Spring Cloud好,前者基于Netty的TCP及二进制的数据传输SpringCloud基于Http, 性能有些损耗从交互比较:REST API更容易测试从社区比较:SpringCloud有强大的社区支持,更新频率快Dubbo最近才...
2019-06-14 22:53:57 136
原创 Microservice 优劣势
1. 优势服务独立部署服务快速启动适合敏捷开发职责专一服务动态按需扩容代码复用2. 劣势分布式部署独立数据库测试难度提升运维难度提升 ...
2019-06-14 22:53:02 160
原创 重构
架构师对产品做一遍梳理出一个重构方案画一个架构图团队成员培训,提出会遇到的问题,会采用什么方式解决重构采用循序渐进的模式产品重构规划抽出业务服务抽出产品依赖的基础服务核心业务放在最后...
2019-06-14 22:52:17 86
原创 Spring Cloud框架
1. 服务注册2. 服务发现3. 配置中心4. 消息总线5. 负载均衡6. 断路器7. 数据监控主要贡献 Netflix OSS
2019-06-14 22:51:11 92
原创 10020 复制构造函数
以其他对象作为参数创建对象时# Student.hStudent(Student&);# Student.cpp// 复制构造函数Student::Student(Student& student){ strcpy(m_name,student.m_name); m_age=student.m_age; strcpy(m_addr,student...
2018-04-13 13:25:25 148
原创 20022 ES5变量提升
function foo():void{ if(true){ var bar:number=0; } console.log(bar);}foo();相当于function foo():void{ var bar:number; if(true){ bar=0; } console.log(bar);}所有变量声明都移到了函数的顶部ES6引入 let、const...
2018-04-12 15:15:35 139
原创 10200 类定义
#ifndef STUDENT_H#define STUDENT_Hclass Student{ public: Student(); void print(); protected: private: char name[128]; int age; char addr[128];...
2018-04-11 23:10:45 253
原创 20021 回调函数
export class HomeComponent implements OnInit { constructor() { let sum = this.testSum(1,2,this.testAdd); console.log(sum); } testAdd(a:number,b:number):number { return a+b; }...
2018-04-11 16:17:55 176
原创 20020 匿名函数
var foo = (name?:string):string =>{ return name?name:'John';}console.log(foo());
2018-04-11 16:03:47 157
原创 20010 流程控制语句 switch
export class HomeComponent implements OnInit { constructor() { enum AlertLevel { info, warn, error } var emails:Array<string> = new Array(); var level:Al...
2018-04-11 15:20:26 129
原创 20001 TS环境搭建
在线编辑器http://www.typescriptlang.org/playgroundnpm install -g typescripttest.tsvar t:number = 1;tsc test.ts 生成test.js文件
2018-04-11 14:08:34 119
原创 10007 函数返回引用类型
#include <iostream>using namespace std;// 函数返回引用类型const int& add(int a,int b,int& c){ c=a+b; return c;}int main(){ int a=23,b=44,c; int d = add(a,b,c); co...
2018-04-10 23:29:01 137
原创 10004 函数模板
#include <iostream>using namespace std;// 函数模板template <typename T>T add(T a,T b){ return a+b;}int main(){ cout<<add(22,24)<<","<<add(23.5,0.5)<<
2018-04-10 23:19:14 131
原创 10004 函数重载
#include <iostream>using namespace std;// 函数重载// 参数列表数据类型相同,返回类型不同,不属于函数重载int add(int a,int b){ return a+b;}double add(double a,double b){ return a+b;}int main(){ c...
2018-04-10 23:06:54 184
原创 10004 函数默认参数
#include <iostream>#include <string>using namespace std;// 函数默认参数void move(int step= 1,int delta= 100);int main(){ move(); return 0;}void move(int step,int delta){ ...
2018-04-10 22:43:15 137
原创 10007 函数参数引用
#include <iostream>using namespace std;// 引用的主要用于在函数参数传递中,解决大块数据或对象的传递效率和空间的问题void swap(int&,int&);int main(){ int a=23; int& b=a; cout<<a<<','<...
2018-04-10 22:06:44 141
原创 30010 Auglar开发环境搭建
npm install -g @angular/cling new ng-demong serve http://localhost:4200
2018-04-10 15:54:39 303
原创 10003 字符统计vector
#include <iostream>#include <vector>#include <string>#include <iomanip>using namespace std;// 字符统计vectorint main(){ vector<string> text; string rows;...
2018-04-10 14:10:34 127
原创 10200 容器vector操作
#include <iostream>#include <vector>#include <string>using namespace std;// 标准类库vector类型int main(){ vector<string> v(100); v.push_back("Hello"); v.push_bac...
2018-04-10 13:40:02 109
转载 20001 PHP CONENT_TYPE
CONTENT_TYPE = { .load':'text/html', .123':'application/vnd.lotus-1-2-3', .3ds':'image/x-3ds', .3g2':'video/3gpp', .3ga':'video/3gpp', .3gp':'video/3gpp', .3gpp':'video/3gpp', .602':'applicati...
2018-04-10 10:37:13 239
原创 10003 字符统计
#include <iostream>#include <string>using namespace std;// 字符串统计int main(){ string text; string line; int rows=0; while(getline(cin,line)){ if(line=="q"){ ...
2018-04-09 23:45:43 167
原创 10003 标准库string类型
#include <iostream>#include <string>using namespace std;// 标准库string类型int main(){ string key(10,'a'); string name = key + "bbb"; string password = string("123456"); ...
2018-04-09 23:40:27 150
原创 10003 字符串
#include <iostream>#include <string>using namespace std;// char[128]="This is a test";// char* s = "This is a test";// strcat()// strcmp()int main(){ string s1 ="This is ...
2018-04-09 23:37:26 203
原创 10102 循环输入字符串
#include <iostream>#include <string>using namespace std;// 循环输入字符串int main(){ string str; while(cin>>str){ if(str=="exit"){ break; } ...
2018-04-09 22:59:57 964
原创 10101 输出流
#include <iostream> using namespace std; // 空白字符(空格、制表符、回车) int main() { int a,b,c; cin>>a>>b>>c; // 1 2 3 >> 123 cout<<a<<b&
2018-04-09 22:55:47 162
rejson.so redisearch.so
2021-12-22
ml-data.rar
2020-11-02
StockNotify.rar
2019-11-13
WEL2304_Student_Lab_Guide_WiNG5_2_RA_10272011(1).pdf
2019-08-28
CDS_User_Guide.pdf
2019-07-08
PHP in Action.pdf
2019-06-25
php-7.3.6-nts-Win32-VC15-x64.zip
2019-06-25
php-7.3.6.tar.gz
2019-06-21
Learn PHP 7
2018-05-04
Design Patterns in PHP and Laravel
2018-05-03
Laravel框架关键技术解析
2018-05-03
GitHub入门与实践
2017-05-25
CI 3.1.1配置Jade模板引擎
2016-10-28
MyEclipse 2016 Stable 1.0 keygen&crack
2016-08-13
tfpdf-1.2.4
2016-07-11
编写PHPMSSQLProxy实现SQL Server 2014代理服务
2016-05-13
解析通达信代码表上传到数据库
2016-05-06
Postgesql服务器端编程
2015-09-01
ADO.NET 3.5经典实例
2012-07-29
Web 配色宝典(配色手册)
2012-05-11
SYMBIAN OS C++高效编程.part2.rar
2010-04-05
SYMBIAN OS C++高效编程.part1.rar
2010-04-05
OpenGL三维图形程序设计(CHM)
2009-05-06
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人