选择排序注意点(假设第一层循环变量为:i;第二层循环变量为:j): [0,i-1]是已经排序好的元素。 定义一个变量,用来记录本次循环下找到的最小元素的下标。 第二层循环是从[i,length -1]中找到最小元素的下标,用来与i元素交换。 s = [3, 4, 1, 6, 2, 9, 7, 0, ...
分类:
编程语言 时间:
2020-01-11 20:48:47
阅读次数:
151
FileInfo fileInfo = new FileInfo(@"C:\test.txt"); FileSecurity fileSecurity = fileInfo.GetAccessControl(); IdentityReference identityReference = fileS ...
分类:
其他好文 时间:
2020-01-11 15:28:52
阅读次数:
76
大于号:(>> 是追加内容, > 是覆盖原有内容 ) 将一条命令执行结果(标准输出,或者错误输出,本来都要打印到屏幕上面的)重定向其它输出设备(文件,打开文件操作符,或打印机等等) 小于号:命令默认从键盘获得的输入,改成从文件,或者其它打开文件以及设备输入 应用场景: bogon:Desktop w ...
分类:
系统相关 时间:
2020-01-10 15:36:57
阅读次数:
113
django的model字段在保存的时候做预处理怎么办? 比如这个model: class Book(Model): publish_date = DateField() 但是在保存时,用户输入数据是: book1 = Book(publish_date='20171001') 我希望这个publi ...
分类:
其他好文 时间:
2020-01-09 22:56:47
阅读次数:
95
简单写一下多对多查询model 不是多对多的字段我就没写上来的 class Tag(models.Model): name = models.CharField(max_length=20,verbose_name='标签') add_time = models.DateField(default= ...
分类:
其他好文 时间:
2020-01-09 22:56:33
阅读次数:
95
python+Selenium自动识别验证码Fg.save_screenshot('D:\HuaYu\image\image.png')ce = Fg.find_element_by_id("ensure") # 具体的id要用F12自行查看print(ce.location)im = Image. ...
分类:
编程语言 时间:
2020-01-08 14:21:38
阅读次数:
152
google it http://www.swig.org/Doc3.0/CSharp.html http://samanbarghi.com/blog/2016/12/06/generate-c-interface-from-c-source-code-using-clang-libtooling ...
分类:
编程语言 时间:
2020-01-06 00:45:53
阅读次数:
147
vector的定义:vector<typename> name;//可变长的数组 vector<int> array_int; vector<double> array_double等等 struct node { ................... } vector <node> array_ ...
分类:
编程语言 时间:
2020-01-06 00:16:57
阅读次数:
106
前言 ASP.NET Core 中 HTTP 管道使用中间件组合处理的方式, 换句人话来说, 对于写代码的人而言,一切皆中间件. 业务逻辑/数据访问/等等一切都需要以中间件的方式来呈现. 那么我们必须学会如何实现 自定义中间件 ~~这里划重点,必考~~ 这里我们介绍下中间件的几种实现方式... 匿名 ...
分类:
Web程序 时间:
2020-01-04 14:11:44
阅读次数:
135
方法一 //求解最大连续子序列和问题 #include<stdio.h> long maxSubSum(int a[],int n){ int i,j,k; long maxSum=a[0],thisSum; for(i=0;i<n;i++){ for(j=i;j<n;j++){ thisSum=0 ...
分类:
其他好文 时间:
2020-01-03 23:32:36
阅读次数:
192