基于Controller层的注解 1、RequestMapper 加在方法上, 给处理用户请求的方法绑定一个url 属性: value/path: 绑定的url method: 默认就是get/post都能处理, 枚举类型, RequestMethod @RequestMapping(value=" ...
分类:
编程语言 时间:
2020-06-16 12:56:08
阅读次数:
63
1.读取 # 1.读取数据集 def read_dataset(): file_path = r'D:\SMSSpamCollection.txt' sms = open(file_path, encoding='utf-8') sms_data = [] sms_label = [] csv_re ...
分类:
其他好文 时间:
2020-06-16 12:50:49
阅读次数:
51
题目: Given a positive integer n, write a program to find out a nonzero multiple m of n whose decimal representation contains only the digits 0 and 1. Y ...
分类:
其他好文 时间:
2020-06-16 12:50:35
阅读次数:
58
1,安装wget命令 yum install wget 2,在/usr/local/src目录下载源码包 wget http://cn2.php.net/distributions/php-7.2.4.tar.gz 解压源码包 tar zxvf php-7.2.4.tar.gz 3,安装编译php需 ...
分类:
Web程序 时间:
2020-06-16 11:37:36
阅读次数:
72
用到模块 # pillow # 安装 # pip3 install pillow # from PIL import Image, ImageDraw, ImageFont, ImageFilter """ Image:生成图片 ImageDraw:能够在图片上乱涂乱画 ImageFont:控制字体 ...
分类:
其他好文 时间:
2020-06-16 00:50:52
阅读次数:
148
在猪师的手把手教导下体验了下爬虫, 首先是进入anaconda官网,选择一个版本下载 安装时候,记住要勾选带path的选项。 避免python版本混乱 然后初试request跟re模块的用法,直接import即可, 爬取百度,但是出现乱码 把.text改为.content.decode("utf-8 ...
分类:
其他好文 时间:
2020-06-16 00:49:46
阅读次数:
48
脚本 /** 自动重启gin框架文件 执行命令 go example.go -start main.go **/ package main import ( "flag" "fmt" "github.com/fsnotify/fsnotify" "log" "os" "os/exec" "path/ ...
分类:
其他好文 时间:
2020-06-15 23:14:32
阅读次数:
84
正课: 1. 原生DOM vs 函数库 vs 框架 2. 什么是Vue 3. 如何使用Vue 4. 绑定语法 5. 指令 6. 双向绑定 1. 原生DOM vs 函数库 vs 框架 原生DOM: 优点: 跨平台好 缺点: 繁琐 函数库jQuery: 优点: 对原生DOM的每个API进行了简化 缺点: ...
分类:
其他好文 时间:
2020-06-15 23:12:33
阅读次数:
141
1 """写入csv文件""" 2 3 4 import csv 5 6 # 方法一: 7 def write_csv_demo1(): 8 headers = ['username', 'age', 'height'] 9 values = [ 10 ('张三', 18, 180), 11 ('李 ...
分类:
其他好文 时间:
2020-06-15 23:09:20
阅读次数:
54
迭代方法实现: struct ListNode* reverseList(struct ListNode* head){ struct ListNode *temp , *new_head=NULL; while(head) { temp=head; head = head->next; temp- ...
分类:
编程语言 时间:
2020-06-15 22:48:42
阅读次数:
57