- 博客(4)
- 收藏
- 关注
原创 scala中的for循环
object forDemo1 { def main(args: Array[String]): Unit = { val start = 1 val end = 10 //start表示从那个数开始循环,to是关键字,表示从哪到哪,end表示循环结束的值,start to end 表示前后闭合 for (i <- start to end){ println("hello , HXY" + i) } //使用until的情况下,
2021-01-23 17:51:10
4700
原创 爬取51job网站职位信息并保存在MySQL数据库当中
import pymysql import requests from lxml import html etree = html.etree import re URL = 'https://jobs.51job.com/' # 总站的url HEADERS = { 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.
2021-01-03 23:27:08
537
1
原创 集合Collection接口中的常用方法
add():将元素添加到集合中。 size():获取集合中添加的元素的个数。 @Test //add():将元素添加到集合中 public void test1(){ Collection coll = new ArrayList(); coll.add(123); coll.add("lc"); System.out.println(coll.size()); } addAll(Collection coll1):
2020-10-08 17:10:46
238
2
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人