def sum(): sum = 0 for n in range(1, 101): sum = sum + n return sum print(sum()) ...
分类:
编程语言 时间:
2020-12-23 11:34:21
阅读次数:
0
以生成斐波拉契数列为例 #!/usr/bin/python # -*- coding: UTF-8 -*- def fab(max): n, a, b = 0, 0, 1 while n < max: print b a, b = b, a + b n = n + 1 fab(5) 上面这种方法通过 ...
分类:
其他好文 时间:
2020-12-22 12:34:43
阅读次数:
0
修改主库以及从库的postgresql.conf wal_level = logical max_wal_senders = 10 max_replication_slots = 8 参数简要说明如下 wal_level:设置成logical才支持逻辑复制 max_wal_senders:由于每个订 ...
分类:
数据库 时间:
2020-12-22 12:14:33
阅读次数:
0
<body> <style> #container { width: 100%; max-width: 700px; margin: 2em auto; } .cols { -moz-column-count: 3; -moz-column-gap: 3%; -moz-column-width: 3 ...
分类:
Web程序 时间:
2020-12-21 12:13:04
阅读次数:
0
1、首先下载mysql安装文件,下载地址:https://dev.mysql.com/downloads/mysql/ 2、将下载下来的压缩包解压到本地一个文件夹中 3、在文件根目录下新增my.ini文件,配置以下信息: [mysql]# 设置mysql客户端默认字符集default-charact ...
分类:
数据库 时间:
2020-12-21 12:07:17
阅读次数:
0
复习bfs 这题我们用bfs 做 class Solution { public: int numSquares(int n) { queue <int> q; vector <int> dist(n+1,INT_MAX); q.push(0); dist[0] = 0; while(q.size( ...
分类:
其他好文 时间:
2020-12-21 12:01:05
阅读次数:
0
单链表实现栈结构->使用环状双链表重构,增加了对链表操作的灵活程度。我相信只要有一点能够优化就值得去做。 “栈”的单链表实现 1 typedef int stack_element; 2 typedef struct stack_node { 3 stack_element element; 4 s ...
分类:
其他好文 时间:
2020-12-21 11:57:13
阅读次数:
0
此博客链接: 三数之和 题目链接:https://leetcode-cn.com/problems/3sum/ 。 题目 给你一个包含 n 个整数的数组 nums,判断 nums 中是否存在三个元素 a,b,c ,使得 a + b + c = 0 ?请你找出所有满足条件且不重复的三元组。 注意:答案 ...
分类:
其他好文 时间:
2020-12-21 11:29:26
阅读次数:
0
hadoop Shuffle Error: Exceeded MAX_FAILED_UNIQUE_FETCHES; bailing-out 程序里面需要打开多个文件,进行分析,系统一般默认数量是1024,(用ulimit -a可以看到)对于正常使用是够了,但是对于程序来讲,就太少了。修改办法:修改2 ...
分类:
其他好文 时间:
2020-12-19 13:37:26
阅读次数:
3
电脑硬件 电脑型号 Default string 台式电脑 (扫描时间:2020年08月25日) 操作系统 Windows 10 Enterprise 64位 ( DirectX 12 ) 处理器 英特尔 Core i9-9900K @ 3.60GHz 八核 主板 华硕 TUF Z390-PLUS ...
分类:
其他好文 时间:
2020-12-19 13:12:18
阅读次数:
2