命令行参数真是很神奇的,因为我们使用命令行接收各类参数去启动程序。 各类语言都有类似的包去处理命令行参数 例如java的org.apache.commons.cli.CommandLine,go的flag包和cobra,或者boost的boost/program_options.hpp 1 基本的工 ...
分类:
其他 时间:
2021-01-10 22:51:12
收藏:
0 评论:
0 赞:
0 阅读:
23
1 遍历数组通常用for循环 ES5的话也可以使用forEach,ES5具有遍历数组功能的还有map、filter、some、every、reduce、reduceRight等,只不过他们的返回结果不一样。但是使用foreach遍历数组的话,使用break不能中断循环,使用return也不能返回到外 ...
分类:
其他 时间:
2021-01-10 22:50:57
收藏:
0 评论:
0 赞:
0 阅读:
28
配置站点 修改hosts文件 """ hosts文件涉及的dns解析 1.找到hosts文件 windows: C:\Windows\System32\drivers\etc\hosts mac|linux:/etc/hosts 2.在host文件中新增下面两句话,文件修改权限自己解决 127.0. ...
分类:
其他 时间:
2021-01-10 22:50:33
收藏:
0 评论:
0 赞:
0 阅读:
24
使用场景: 有时我们会遇到这样的情况,多个功能模块都希望得到完整的消息数据。例如一个log的消息,一个我们希望输出在屏幕上实时监控,另外一个用户持久化日志。这时就可以使用fanout模式。fanout模式模式不像direct模式通过routingkey来进行匹配,而是会把消息发送到所以的已经绑定的队 ...
分类:
其他 时间:
2021-01-10 22:50:20
收藏:
0 评论:
0 赞:
0 阅读:
66
先导包,pip install torchsummary 然后 from torchsummary import summary model = FPN() y = summary(model, (3, 224, 224), device="cpu") print(y) ...
分类:
其他 时间:
2021-01-10 22:49:43
收藏:
0 评论:
0 赞:
0 阅读:
113
后台:Django项目创建 环境 """ 为luffy项目创建一个虚拟环境 >: mkvirtualenv luffy """ """ 按照基础环境依赖 >: pip install django >: pip install djangorestframework >: pip install p ...
分类:
其他 时间:
2021-01-10 22:49:29
收藏:
0 评论:
0 赞:
0 阅读:
32
题目 1 class Solution { 2 public: 3 vector<int>ans; 4 vector<int> postorder(Node* root) { 5 dfs(root); 6 return ans; 7 } 8 void dfs(Node* root){ 9 if(ro ...
分类:
其他 时间:
2021-01-10 22:48:53
收藏:
0 评论:
0 赞:
0 阅读:
26
一、Kafka扮演的角色 消息系统,Kafka与传统的消息列队中间件(RabbitMQ、RocketMQ、ActiveMQ)等都具备系统解耦、冗余存储、流量削峰、缓存、异步通信、扩展性、恢复性等功能。与此同时,还能实现其他大多数消息队列难以实现的消息顺序性保障和消费回溯功能。 存储系统,Kafka能 ...
分类:
其他 时间:
2021-01-10 22:48:39
收藏:
0 评论:
0 赞:
0 阅读:
24
一、概述 1、网络中面临的威胁 截获:从网络上窃听他人的通信内容。==》CAIN应用(ARP欺骗) ? 将路由器的MAC地址篡改为自己的MAC地址,以达到让数据到自己计算机中,从而实现获取用户账号和密码等数据 中断:有意中断他人在网络上的通信。 篡改:故意篡改网络上传送的报文。可应用于域名重定向,即 ...
分类:
其他 时间:
2021-01-10 22:48:29
收藏:
0 评论:
0 赞:
0 阅读:
28
同构的定义:给定两棵树T1和T2。如果T1可以通过若干次左右孩子互换就变成T2,则我们称两棵树是“同构”的。 更加具体的理解为:两棵树中的每两个对应结点的孩子必须相同,左右位置可不一样。 树的存储结构:结构数组。链表在对输入进行存储时没有数组方便。 如:输入如下样例后结构数组内容 8 A 1 2 B ...
分类:
其他 时间:
2021-01-10 22:47:17
收藏:
0 评论:
0 赞:
0 阅读:
30
一、步骤: ①、打开 文件 首选项 设置 用户 扩展 live server config setting: use browser preview(勾选)。 ②、安装扩展 :browser preview插件。 ③、在编辑页面右击 open with live server。 ...
分类:
其他 时间:
2021-01-10 22:46:01
收藏:
0 评论:
0 赞:
0 阅读:
679
题目 本题目一开始想要通过二叉树遍历KMP匹配,但看来实现比较复杂 不如直接暴力匹配,本题和LeetCode100.相同的树有共通之处 1 class Solution { 2 public: 3 bool isSubtree(TreeNode* s, TreeNode* t) { 4 if(!s ...
分类:
其他 时间:
2021-01-10 22:45:46
收藏:
0 评论:
0 赞:
0 阅读:
29
Source Using O(1) time to check whether an integer n is a power of 2. Example For n=4, return true; For n=5, return false; Challenge O(1) time 题解 咋看起来 ...
分类:
其他 时间:
2021-01-10 22:45:11
收藏:
0 评论:
0 赞:
0 阅读:
29
前端主页 准备 """ 1.按照下图将该删除的删除,在增加的增加,图片资源在课件的资源中 """ 各文件修改内容 vue.config.js 项目配置文件 module.exports = { devServer: { host: 'www.luffy.cn', port: 8080 } } mai ...
分类:
其他 时间:
2021-01-10 22:45:00
收藏:
0 评论:
0 赞:
0 阅读:
40
下载链接:https://www.jetbrains.com/zh-cn/pycharm/download/download-thanks.html?platform=windows ...
分类:
其他 时间:
2021-01-10 22:44:37
收藏:
0 评论:
0 赞:
0 阅读:
30
https://codeforces.ml/contest/1391/problem/D 位运算,绝妙的一个题 #include <iostream> #include <cstring> #include <cstdio> #include <vector> using namespace std ...
分类:
其他 时间:
2021-01-10 22:44:22
收藏:
0 评论:
0 赞:
0 阅读:
30
1.拆包 def func(): return 1,2,3,4 result = func() print(result) n1,n2,n3,n4 = func() #拆包 print(n1)print(n2)print(n3)print(n4) 2.浅拷贝 import copy li = [1, ...
分类:
其他 时间:
2021-01-10 22:43:33
收藏:
0 评论:
0 赞:
0 阅读:
24
准备4台服务器 安装的环境 IP/主机名 ansible 192.168.220.10/apache apache 192.168.220.20/apache mysql 192.168.220.30/mysql php 192.168.220.40/php 关闭关闭防火墙和selinux: sys ...
分类:
其他 时间:
2021-01-10 22:43:22
收藏:
0 评论:
0 赞:
0 阅读:
23
前言: 最近在写项目的时候,深感设计模式的重要性。一个人的代码写的好不好,别人看的舒不舒服,和会不会设计模式紧密关联的。之前看过四人帮的设计模式。但当时仅限于看,包括现在也仅限于看。有的时候项目中,你都不知道有没有运用到了设计模式。也许用到了单例模式,但你并不知道如何用的,不知不觉就用到了。 《武林 ...
分类:
其他 时间:
2021-01-10 22:42:44
收藏:
0 评论:
0 赞:
0 阅读:
28
kubernetes-dashboard安装yaml # Copyright 2017 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not ...
分类:
其他 时间:
2021-01-10 22:42:33
收藏:
0 评论:
0 赞:
0 阅读:
29