上一页 1 ··· 62 63 64 65 66 67 68 69 70 ··· 106 下一页
摘要: 计数排序有局限性,最小值和最大值决定着数组的长度,如果分配均匀的话可以用 # @File: count_sort import random def count_sort(li, max_num=100): count = [0 for i in range(max_num + 1)] for val in li: count[val] += 1 l... 阅读全文
posted @ 2018-12-24 09:48 小学弟- 阅读(275) 评论(0) 推荐(0)
摘要: 与插入排序的思想一致,插入排序是一个,希尔排序是多个插入排序! # @File: shell_sort import random def insert_sort_gap(li, d): for i in range(d, len(li)): j = i - d temp = li[i] while j >= 0 and li[j] ... 阅读全文
posted @ 2018-12-24 09:34 小学弟- 阅读(142) 评论(0) 推荐(0)
摘要: 目录结构: app.py # -*- coding: utf-8 -*- # __author: ward # data: 2018/12/21 # @File: app from flask import Flask, request, render_template, send_file, js 阅读全文
posted @ 2018-12-21 20:44 小学弟- 阅读(574) 评论(0) 推荐(0)
摘要: 解密 加密 阅读全文
posted @ 2018-12-21 18:53 小学弟- 阅读(456) 评论(0) 推荐(0)
摘要: Websocket原理 一、websocket与http WebSocket是HTML5出的东西(协议),也就是说HTTP协议没有变化,或者说没关系,但HTTP是不支持持久连接的(长连接,循环连接的不算) 首先HTTP有 1.1 和 1.0 之说,也就是所谓的 keep-alive ,把多个HTTP 阅读全文
posted @ 2018-12-21 18:28 小学弟- 阅读(202) 评论(0) 推荐(0)
摘要: server# @File: ws from flask import Flask, request, render_template from geventwebsocket.handler import WebSocketHandler from geventwebsocket.websocket import WebSocket # 我用来做语法提示 from gevent.pywsg... 阅读全文
posted @ 2018-12-21 18:26 小学弟- 阅读(397) 评论(0) 推荐(0)
摘要: server # @File: 群聊 from flask import Flask, render_template, request from geventwebsocket.handler import WebSocketHandler from gevent.pywsgi import WSGIServer from geventwebsocket.websocket import... 阅读全文
posted @ 2018-12-21 17:57 小学弟- 阅读(268) 评论(0) 推荐(0)
摘要: # server- # pip install geventwebsocket# pip install flask from flask import Flask, render_template, request from geventwebsocket.handler import WebSocketHandler from gevent.pywsgi import WSGIServer... 阅读全文
posted @ 2018-12-21 17:24 小学弟- 阅读(554) 评论(0) 推荐(0)
摘要: 1. Linux-(C/C++)动态链接库生成以及使用(libxxx.so) 2. C++文件如何在linux下生成动态库So,以及如何使用这个动态库 3. c++ 发布动态.so 简记1. 编译生成so库 g++ src.cpp -fPIC -shared -o libxxx.so //使用源文件 阅读全文
posted @ 2018-12-21 11:04 小学弟- 阅读(9875) 评论(0) 推荐(0)
摘要: import math def is_prime_1(n): if n n: return True if n % i == 0: return False def is_prime_4(n): if n <= 1: return False if n == 2: r... 阅读全文
posted @ 2018-12-20 21:09 小学弟- 阅读(1387) 评论(0) 推荐(0)
上一页 1 ··· 62 63 64 65 66 67 68 69 70 ··· 106 下一页