- 博客(430)
- 资源 (15)
- 收藏
- 关注
原创 C# 快速排序
/ Console.WriteLine("排序中:l.key:{0}, l.length:{1}", StrSqList(l), l.length);Console.WriteLine("排序后:l.key:{0}, l.length:{1}", StrSqList(l), l.length);Console.WriteLine("排序后:l.key:{0}, l.length:{1}", StrSqList(l), l.length);// l 按照增量dk 插入排序。// 希尔插入排序算法。
2023-11-20 21:27:21
402
原创 希尔排序C#
/ Console.WriteLine("排序中:l.key:{0}, l.length:{1}", StrSqList(l), l.length);Console.WriteLine("排序后:l.key:{0}, l.length:{1}", StrSqList(l), l.length);Console.WriteLine("排序后:l.key:{0}, l.length:{1}", StrSqList(l), l.length);// l 按照增量dk 插入排序。/* 我的第一个 C# 程序*/
2023-11-18 21:42:16
180
原创 折半插入排序
/ Console.WriteLine("排序中:l.key:{0}, l.length:{1}", StrSqList(l), l.length);Console.WriteLine("排序前:l.key:{0}, l.length:{1}", StrSqList(l), l.length);Console.WriteLine("排序后:l.key:{0}, l.length:{1}", StrSqList(l), l.length);/* 我的第一个 C# 程序*/
2023-11-18 20:29:35
109
原创 C# 插入排序
Console.WriteLine("排序中:l.key:{0}, l.length:{1}", StrSqList(l), l.length);Console.WriteLine("排序前:l.key:{0}, l.length:{1}", StrSqList(l), l.length);Console.WriteLine("排序后:l.key:{0}, l.length:{1}", StrSqList(l), l.length);/* 我的第一个 C# 程序*/{ // 快速排序。
2023-11-18 20:20:26
196
原创 golang 中位数
package mainimport ( "fmt")func findMedianSortedArrays(nums1 []int, nums2 []int) float64 { l1 := len(nums1) l2 := len(nums2) var l3 []int = make([]int, l1+l2) // 中位数 i := 0 j := 0 idx := 0 for { if i >= ...
2022-01-16 18:13:54
404
原创 最大无重复子串
package mainimport ( "fmt")func lengthOfLongestSubstring(s string) int { var maxLen int = 0 var repeat bool = false // maxLen = 0 // n * 3 复杂度 for idx, _ := range s { // idx 起点 for i := idx; i < len(s); i++ {...
2022-01-16 16:29:28
242
原创 golang 随机返回
/*** Definition for singly-linked list.* type ListNode struct {* Val int* Next *ListNode* }*/// type Solution struct {// }// func Constructor(head *ListNode) Solution {// }// func (this *Solution) GetRandom() int {// }..
2022-01-16 01:39:46
304
原创 两数相加golang 实现
package mainimport ( "fmt")type ListNode struct { Val int Next *ListNode}func addTwoNumbers(l1 *ListNode, l2 *ListNode) *ListNode { // 链表两数相加 var head *ListNode = nil var p *ListNode = nil var pre *ListNode = nil va...
2022-01-16 00:44:06
358
原创 xpool cpool(epool) apooll 四种网络模型分析
xpool多个线程操作1 多个线程重复以下操作(没有负载均衡 类似nginx worker工作原理)lockfd= acceptunlockepoll(fd)2 cpool/epool工作原理类似(只不过一个是select 另一个是epoll)一个主线程fd =accept(listenfd)select(..) //listenfd + fda...
2020-01-01 20:38:00
581
原创 Django 源码剖析
Django 运行原理理清三个类关系WSGIServerWSGIRequestHandler (__init__ 中负责调用 application(environ)WSGIHandler (内部定义__call__)1 WSGIServer listen, select, process_request WSGIServer.RequestHandler...
2020-01-01 20:35:37
569
转载 kombu消息框架理解
https://blog.csdn.net/weixin_37947156/article/details/76372427
2018-07-15 18:43:20
2608
1
原创 python tarjan算法实现
#coding:utf-8#tarjan 算法#https://blog.csdn.net/jeryjeryjery/article/details/52829142?locationNum=4&fps=1#求任意顶点开始的联通图 有且仅存在一个 且dfn[u] == low[u]from collections import OrderedDictmatric = [[0,1,...
2018-07-15 16:38:46
2918
1
转载 pycharm 升级pip 10 后无法安装问题
AttributeError: module 'pip' has no attribute 'main'如何解决?Try to run this command from the system terminal. Make sure that you use the correct version of 'pip' installed for your Python interpreter loc...
2018-07-12 13:07:28
8790
3
转载 expect 使用
一、概述 我们通过Shell可以实现简单的控制流功能,如:循环、判断等。但是对于需要交互的场合则必须通过人工来干预,有时候我们可能会需要实现和交互程序如telnet服务器等进行交互的功能。而expect就使用来实现这种功能的工具。 expect是一个免费的编程工具语言,用来实现自动和交互式任务进行通信,而无需人的干预。expect是不断发展的,随着时间的流逝,其功能越来越...
2018-06-07 15:56:36
2425
转载 nohup setsid区别
nohup执行完成之后 需要 exit 才能保证 不会退出,如果直接close session 进程依然会死掉https://www.ibm.com/developerworks/cn/linux/l-cn-nohup/index.htmlUnix/Linux下一般想让某个程序在后台运行,很多都是使用&在程序结尾来让程序自动运行;但如果要想在退出终端后,程序依然还在后台运行,则要用nohu...
2018-06-01 11:35:28
3468
转载 elasticsearch 相似度计算
https://www.cnblogs.com/didda/p/5283753.htmlhttp://lucene.apache.org/core/4_6_0/core/org/apache/lucene/search/similarities/TFIDFSimilarity.html
2018-04-15 18:59:56
9361
转载 process_template_responseprocess
https://www.cnblogs.com/zhaof/p/6281541.htmlhttps://www.cnblogs.com/sss4/p/7106033.html总结:中间件 process_request process_view 是从前往后执行process_exception process_response 是从后往前执行如果process_view返回的对象有render 则...
2018-04-01 20:35:41
1504
转载 python logging日志模块的使用
总结1 logging 可以记录异常回溯信息 traceback.format_exc() 通过loging.exception(msg, args) 或者logging.error(msg,exec_info=true,args)2 可以定义父类logger, logging.getLogger('main') 后续其他模块如果属于子模块例如main.sub logging.getLogger...
2018-04-01 13:45:36
12521
转载 kerberos
一,引言 Kerberos简单来说就是一个用于安全认证第三方协议,它采用了传统的共享密钥的方式,实现了在网络环境不一定保证安全的环境下,client和server之间的通信,适用于client/server模型,由MIT开发和实现。 Kerberos的神秘之处在于,它并不要求通信双方所在的网络环境是安全的,即使通信过程中数据被截取或者篡改依然不会影响它的正常工作,它提供的认证是双向的,不仅能保...
2018-03-31 19:43:11
14917
1
转载 python super 多重继承
Python的多重继承和super原创 2016年05月22日 00:10:35标签:python /继承 /super6253多重继承:super:不要一说到 super 就想到父类!super 指的是 MRO 表中的下一个类!super 其实干的是这件事:def super(cls, inst): mro = inst.__class__.mro() # Always the most...
2018-03-28 10:34:08
345
转载 django as_view listView detailView
https://blog.csdn.net/hackerain/article/details/40919789https://www.zmrenwu.com/post/33/
2018-03-28 10:14:20
308
css js 文件指纹批量替换 脚步
2017-12-21
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人