from pyspark.sql import SparkSession,Rowfrom pyspark.sql.types import StructField, StructType, StringType, IntegerType, LongType data = [('Alex','male ...
分类:
其他好文 时间:
2020-07-07 15:40:28
阅读次数:
55
public struct Complex { public double real; public double imaginary; public Complex(double real, double imaginary) { this.real = real; this.imaginary ...
分类:
其他好文 时间:
2020-07-07 13:25:18
阅读次数:
57
#Reverse ##内涵 0707 直接拖进IDA看到疑似flag,按A可以转中文 A ASCII解析成ASCII ##[BJDCTF 2nd]guessgame 拖进IDA 发现flag ##xor 拖进IDA int __cdecl main(int argc, const char **ar ...
分类:
其他好文 时间:
2020-07-07 11:39:50
阅读次数:
87
方法1:递归 /** * Definition for a binary tree node. * struct TreeNode { * int val; * struct TreeNode *left; * struct TreeNode *right; * }; */ bool hasPath ...
分类:
其他好文 时间:
2020-07-07 10:22:49
阅读次数:
60
题目来源:leetcode104 二叉树的最大深度 题目描述: 给定一个二叉树,找出其最大深度。 二叉树的深度为根节点到最远叶子节点的最长路径上的节点数。 说明: 叶子节点是指没有子节点的节点。 示例: 给定二叉树 [3,9,20,null,null,15,7] 返回它的最大深度 3 。 解题思路: ...
分类:
其他好文 时间:
2020-07-07 10:18:52
阅读次数:
80
题目来源:leetcode226 翻转二叉树 题目描述: 翻转一棵二叉树。 解题思路 递归 /** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *ri ...
分类:
其他好文 时间:
2020-07-07 10:00:25
阅读次数:
51
最近复习了线性表,对链表这一部分遗忘最大,所以手动实现一下加深理解,附上C++代码: #include <iostream> using namespace std; typedef struct LNode //定义一个结构体作为链表结构,有指针域和数据 { int data; struct LN ...
分类:
编程语言 时间:
2020-07-07 09:54:52
阅读次数:
88
Token bucket 令牌桶限流机制: 在长连接时,当一个http请求来临,我们需要进行GetConn,放入一个令牌进桶中,当我们的连接释放,于是可以释放连接。 我们控制桶的大小即可控制http的流量。 令牌桶算法,最近在学Golang,而对于HTTP的限流,Golang的令牌桶实现更为简洁,G ...
分类:
其他好文 时间:
2020-07-07 09:41:39
阅读次数:
84
利用sort函数对平均数进行排序 C++ 1 #include <iostream> 2 #include <algorithm> 3 4 using namespace std; 5 6 struct Goods { //货物结构体(库存,总售价,单价) 7 float mass, price, ...
分类:
编程语言 时间:
2020-07-06 22:45:01
阅读次数:
98
我差点就行信了,咳咳咳咳 A.精灵魔法 题目描述 输入格式 输出格式 样例 样例输入 3 1 2 3 2 1 3 样例输出 1 数据范围与提示 分析 Code #include<bits/stdc++.h> using namespace std; typedef long long ll; con ...
分类:
其他好文 时间:
2020-07-06 20:26:00
阅读次数:
80