网站首页 站内搜索

搜索结果

查询Tags标签: items,共有 198条记录
  • C#:List源码,使用注意,优化

    List内部是用数组实现的,而不是链表,并且当没有给予指定容量时,初始的容量为0 Add // Adds the given object to the end of this list. The size of the list is // increased by one. If required, the capacity of the list is doubled // before adding the new el…

    2022/1/8 1:05:10 人评论 次浏览
  • C#:List源码,使用注意,优化

    List内部是用数组实现的,而不是链表,并且当没有给予指定容量时,初始的容量为0 Add // Adds the given object to the end of this list. The size of the list is // increased by one. If required, the capacity of the list is doubled // before adding the new el…

    2022/1/8 1:05:10 人评论 次浏览
  • JavaWeb_jQuery

    1.练习 1.全选,全不选,反选<!DOCTYPE html> <html lang="en"> <head><meta charset="UTF-8"><title>Title</title><script src="https://cdn.staticfile.org/jquery/1.10.2/jquery.min.js">&l…

    2022/1/4 22:03:34 人评论 次浏览
  • JavaWeb_jQuery

    1.练习 1.全选,全不选,反选<!DOCTYPE html> <html lang="en"> <head><meta charset="UTF-8"><title>Title</title><script src="https://cdn.staticfile.org/jquery/1.10.2/jquery.min.js">&l…

    2022/1/4 22:03:34 人评论 次浏览
  • Python|练习1——词云

    Python|练习1——词云:从数据爬取到词云制作(以盗墓笔记为例) 需求分析 获取盗墓笔记全文并保存为.txt格式 目标资源网站分析资源获取策略制定代码编写及数据获取 对盗墓笔记全文进行词云制作 读取待处理对象词语划分、词频计算词云制作 爬虫源码分析 爬取策略 目标网…

    2021/12/28 22:08:23 人评论 次浏览
  • Python|练习1——词云

    Python|练习1——词云:从数据爬取到词云制作(以盗墓笔记为例) 需求分析 获取盗墓笔记全文并保存为.txt格式 目标资源网站分析资源获取策略制定代码编写及数据获取 对盗墓笔记全文进行词云制作 读取待处理对象词语划分、词频计算词云制作 爬虫源码分析 爬取策略 目标网…

    2021/12/28 22:08:23 人评论 次浏览
  • PHP实现无限级分类

    function getTree($data) {$items = [];foreach ($data as $v){$items[$v[id]] = $v; // $items[1] =}$tree = array(); //格式化好的树foreach ($items as $item)if (isset($items[$item[pid]]))$items[$item[pid]][son][] = &$items[$item[id]];else$tree[] = &…

    2021/12/26 14:07:03 人评论 次浏览
  • PHP实现无限级分类

    function getTree($data) {$items = [];foreach ($data as $v){$items[$v[id]] = $v; // $items[1] =}$tree = array(); //格式化好的树foreach ($items as $item)if (isset($items[$item[pid]]))$items[$item[pid]][son][] = &$items[$item[id]];else$tree[] = &…

    2021/12/26 14:07:03 人评论 次浏览
  • python脚本小技巧

    交换变量值 a, b = 5, 10 a, b = b, a将列表中所有元素组合成字符串(以空格分隔) a = ["Python", "is", "awesome"] print(" ".join(a))查找列表中频率最高的值 a = [1, 2, 3, 1, 2, 3, 2, 2, 4, 5, 1] print(max(set(a),key = a…

    2021/12/25 22:37:06 人评论 次浏览
  • python脚本小技巧

    交换变量值 a, b = 5, 10 a, b = b, a将列表中所有元素组合成字符串(以空格分隔) a = ["Python", "is", "awesome"] print(" ".join(a))查找列表中频率最高的值 a = [1, 2, 3, 1, 2, 3, 2, 2, 4, 5, 1] print(max(set(a),key = a…

    2021/12/25 22:37:06 人评论 次浏览
  • Java并发进阶:阻塞队列ArrayBlockingQueue源码解析,准备Java面试

    最后激活notEmpty的条件队列因调用take操作而被阻塞的一个线程。 出队dequeue ========= private E dequeue() { // assert lock.getHoldCount() == 1; // assert items[takeIndex] != null; final Object[] items = this.items; @SuppressWarnings(“unchecked”) // 获取…

    2021/12/20 14:21:05 人评论 次浏览
  • Java并发进阶:阻塞队列ArrayBlockingQueue源码解析,准备Java面试

    最后激活notEmpty的条件队列因调用take操作而被阻塞的一个线程。 出队dequeue ========= private E dequeue() { // assert lock.getHoldCount() == 1; // assert items[takeIndex] != null; final Object[] items = this.items; @SuppressWarnings(“unchecked”) // 获取…

    2021/12/20 14:21:05 人评论 次浏览
  • python文件

    s=input() s= s.lower() words =str(s) counts ={} for word in words:counts[word] = counts.get(word,0)+1 print(counts) n= int(input()) txt = for i in range(n):s=input()txt += stxt = txt + txt = txt.lower() for ch in !"#$%&()*+,-./:;<=>?@…

    2021/12/14 20:19:16 人评论 次浏览
  • python文件

    s=input() s= s.lower() words =str(s) counts ={} for word in words:counts[word] = counts.get(word,0)+1 print(counts) n= int(input()) txt = for i in range(n):s=input()txt += stxt = txt + txt = txt.lower() for ch in !"#$%&()*+,-./:;<=>?@…

    2021/12/14 20:19:16 人评论 次浏览
  • 十一、迭代器和生成器 2.自定义列表和迭代器

    自定义列表和迭代器 实现:创建并使用for遍历自定义列表MyList,自定义列表类1.__init__():初始化方法2.__iter__():对外提供迭代器3.addItem():添加元素MyIterator,自定义迭代器类1.__init__():初始化方法2.__iter__():迭代器方法3.__next__():取值# 自定义列表类 class…

    2021/12/14 6:19:08 人评论 次浏览
扫一扫关注最新编程教程