摘要: 冒泡排序↓ def swap(L,a,b): L[a],L[b] = L[b], L[a] def bubboSort1(array): for i in range(0, len(array)): for j in range(i+1, len(array)): if array[i] > arr 阅读全文
posted @ 2019-06-30 20:27 lilied 阅读(210) 评论(0) 推荐(0) 编辑
摘要: 1.构建一个节点类 2.构建一个单链表类(也可以叫做视图) 3.从左边添加元素 4.从右边添加元素 5.删除某个元素 6.查找元素值是否存在 7.在指定位置插入元素 全部代码 阅读全文
posted @ 2019-03-12 21:29 lilied 阅读(197) 评论(0) 推荐(0) 编辑
摘要: ``` python #注意 以下字段 均默认text类型 # match查询 GET article2/info/_search { "query":{ "match":{ "title":"MySQL-MMM" } }, "from": 0, "size": 3 } # term查询 (属于精确查找) GET article2/info... 阅读全文
posted @ 2018-05-29 18:02 lilied 阅读(138) 评论(0) 推荐(0) 编辑
摘要: 1.验证码生成器 # -*- coding: utf-8 -*- # @Author: Lai import random from PIL import Image, ImageDraw, ImageFont, ImageFilter from io import BytesIO from fla 阅读全文
posted @ 2018-05-19 19:49 lilied 阅读(838) 评论(0) 推荐(0) 编辑
摘要: ``` import os from threading import Thread # abstract_class class InputData(object): def read(self): raise NotImplementedError # abstract_class class Worker(object): def map(self): ... 阅读全文
posted @ 2018-03-26 20:47 lilied 阅读(155) 评论(0) 推荐(0) 编辑