摘要: 一、udp 1 from socket import * 2 3 4 def send_msg(udp_socket): 5 send_data = input("请输入发送数据:") 6 udp_socket.sendto(send_data.encode("utf-8"),("192.168.4 阅读全文
posted @ 2020-07-13 22:22 喻解 阅读(174) 评论(0) 推荐(0) 编辑
摘要: 一、启动 mysql -hlocalhost -uroot -p 80版本sql需要修改加密形式才能用navicat连接 alter user 'root'@localhost identified with mysql _native_password by '123456'; 创建数据库-创建表 阅读全文
posted @ 2020-07-13 18:43 喻解 阅读(270) 评论(0) 推荐(0) 编辑
摘要: 运行环境 RStudio 一、设置类 library()加载; getwd()当前目录; setwd()设置默认目录; history()记录; ctrl+l清空; alt+-赋值;save.image()保存工作空间; install.package("vcd")安装包; update.packa 阅读全文
posted @ 2020-06-18 15:55 喻解 阅读(277) 评论(0) 推荐(0) 编辑
摘要: 51. N-Queens Input: 4 Output: [ [".Q..", // Solution 1 "...Q", "Q...", "..Q."], ["..Q.", // Solution 2 "Q...", "...Q", ".Q.."] ] Explanation: There ex 阅读全文
posted @ 2020-05-22 22:23 喻解 阅读(166) 评论(0) 推荐(0) 编辑
摘要: 208. Implement Trie (Prefix Tree) Implement a trie with insert, search, and startsWith methods. Example: Trie trie = new Trie(); trie.insert("apple"); 阅读全文
posted @ 2020-05-19 17:54 喻解 阅读(140) 评论(0) 推荐(0) 编辑
摘要: 232. Implement Queue using Stacks FILO to FIFO MyQueue queue = new MyQueue(); queue.push(1); queue.push(2); queue.peek(); // returns 1 queue.pop(); // 阅读全文
posted @ 2020-04-23 20:27 喻解 阅读(148) 评论(0) 推荐(0) 编辑
摘要: 206.逆转链表Input: 1->2->3->4->5->NULL Output: 5->4->3->2->1->NULL方法一:迭代 # Definition for singly-linked list. # class ListNode: # def __init__(self, x): # 阅读全文
posted @ 2020-04-18 11:17 喻解 阅读(103) 评论(0) 推荐(0) 编辑
摘要: 一、基本操作 建立仓库 git init 添加文件 git add file. 提交版本 git commit -m '版本号' 查看版本号 git log 返回前一个版本 git reset --hard HEAD^/版本编号 查看记录 git reflog 当前树状态 git status 撤销 阅读全文
posted @ 2020-03-31 22:33 喻解 阅读(115) 评论(0) 推荐(0) 编辑
摘要: 1.使用正则来匹配文件作为装饰器参数 @route(r"/add/(\d+)\html") def f(ret): s = ret.group(1) 2.防止sql注入 connect = cs = connect.cursor() sql="select * from info as i inne 阅读全文
posted @ 2020-03-26 23:23 喻解 阅读(124) 评论(0) 推荐(0) 编辑
摘要: 1、拆包、*args、**kwargs *args是可变参数,接收的是一个tuple; **kwargs是关键字参数,接收的是一个dict。 def test(a,b,*args,**kwargs): print(a) print(b) print(args) print(*args) print( 阅读全文
posted @ 2020-03-25 10:51 喻解 阅读(113) 评论(0) 推荐(0) 编辑