1 不仅可以统计list中元素的出现次数,也可以对str中的元素进行统计 # collections包中的Counter用于统计str list 中元素出现次数 from collections import Counter a = [1,1,2,3,4,5,6,6,6] b = Counter(a ...
分类:
其他好文 时间:
2019-12-05 12:57:17
阅读次数:
571
Problem Description The counter-terrorists found a time bomb in the dust. But this time the terrorists improve on the time bomb. The number sequence o ...
分类:
其他好文 时间:
2019-12-04 19:57:47
阅读次数:
81
setState是异步的方式 this.setState({ counter:this.state.counter+1 }) console.log(this.state.counter) setState是异步,执行最后一个setState 同步执行的方法,传递函数 1,this.setState ...
分类:
其他好文 时间:
2019-12-02 18:50:32
阅读次数:
101
1 from tkinter import * 2 counter = 30 3 def run_counter(digit): 4 def counting(): 5 global counter 6 counter -= 1 7 digit.config(text=str(counter)) 8 ...
分类:
其他好文 时间:
2019-12-02 13:13:31
阅读次数:
90
Export Receives The Errors ORA-1555 ORA-22924 ORA-1578 ORA-22922 (Doc ID 787004.1) APPLIES TO: Oracle Database - Enterprise Edition - Version 12.1.0.2 ...
分类:
其他好文 时间:
2019-12-01 12:11:30
阅读次数:
141
之前遇到过的问题,后来解决后再次遇到又忘记了, 这是keil 的bug 路径只要都是字母就可以了 ...
分类:
其他好文 时间:
2019-11-29 10:45:52
阅读次数:
91
原题链接在这里:https://leetcode.com/problems/increasing-subsequences/ 题目: Given an integer array, your task is to find all the different possible increasing ...
分类:
其他好文 时间:
2019-11-28 10:37:13
阅读次数:
63
[TOC] 模板语法 两种书写格式: 变量相关 {{ }} 逻辑相关 {% %} 模板传值 给html页面传值的两种方式 第一种方式 弊端就是:当要传的变量名很多的时候,就很麻烦 第二种 locals() locals() 会将当前所在的名称空间中所有的名字全部传递给html页面 传值 基本数据类型 ...
分类:
其他好文 时间:
2019-11-26 22:42:50
阅读次数:
91
官网中关于ReactorNotRestartable的错误描述(摘自:https://twistedmatrix.com/documents/16.1.0/api/twisted.internet.error.html),我们将从scrapy源码分析这个问题 重点要了解scrapy源码下的crawl ...
分类:
编程语言 时间:
2019-11-26 13:47:42
阅读次数:
81
一、程序计数器/PC寄存器 (Program Counter Registe) 用于保存当前正在执行的程序的内存地址(下一条jvm指令的执行地址),由于Java是支持多线程执行的,所以程序执行的轨迹不可能一直都是线性执行。当有多个线程交叉执行时,被中断的线程的程序当前执行到哪条内存地址必然要保存下来 ...
分类:
其他好文 时间:
2019-11-25 18:49:14
阅读次数:
73