code macname@localhost Desktop % cat test.sh while read line;do echo $line; done < a.txt macname@localhost Desktop % macname@localhost Desktop % cat a ...
分类:
系统相关 时间:
2020-11-30 16:14:46
阅读次数:
16
1.上升下降字符串 1 class Solution: 2 def sortString(self, s): 3 num = [0] * 26 4 for ch in s: 5 num[ord(ch) - ord('a')] += 1 6 7 ret = list() 8 while len(ret ...
分类:
其他好文 时间:
2020-11-30 15:46:10
阅读次数:
5
1 #include <bits/stdc++.h> 2 using namespace std; 3 int main() { 4 int t; 5 cin >> t; 6 while (t--) { 7 int a, b; 8 string a_line, b_line; 9 cin >> a ...
分类:
其他好文 时间:
2020-11-30 15:20:06
阅读次数:
5
while循环中使用输出语句停止死循环的原因 z1340954953 2018-11-05 16:23:16 3021 收藏 1 分类专栏: 多线程 文章标签: 输出语句中断死循环 直接看代码 public class WhileTest { private boolean flag = true; ...
分类:
其他好文 时间:
2020-11-27 11:13:18
阅读次数:
7
操作系统-操作系统-内核中的屏幕打印(下)接着之前的实现顺序来,对PrintString进行实现intPrintString(constchar*s)//需f要对参数进行判断,如果参数为空,返回-1{intret=0;if(s!=NULL){while(*s){ret+=PrintChar(*s++);//不为空时进行循环,直到遇见结束符结束}}else{ret=-1;}returnret;}//
分类:
其他好文 时间:
2020-11-26 14:25:31
阅读次数:
5
7-1 阅览室,感觉思路还好,但是写的太繁琐了,借鉴一下过的代码,又写了一遍;,代码: #include<bits/stdc++.h> using namespace std; int s[1010],w[1010]; int main() { int n; cin>>n; while(n--) { ...
分类:
其他好文 时间:
2020-11-26 14:11:33
阅读次数:
3
package com.spinlock.spinlock.juc; import java.util.concurrent.locks.Lock; import java.util.concurrent.locks.ReentrantLock; public class Demo3 { publi ...
分类:
其他好文 时间:
2020-11-25 12:40:31
阅读次数:
5
实现 strStr() 函数。 给定一个 haystack 字符串和一个 needle 字符串,在 haystack 字符串中找出 needle 字符串出现的第一个位置 (从0开始)。如果不存在,则返回 -1。 示例 1: 输入: haystack = "hello", needle = "ll" ...
分类:
其他好文 时间:
2020-11-25 12:19:34
阅读次数:
5
1.导入jar包 mysql-connector-java-5.1.7-bin.jar。并加入到环境中。 2.注册驱动,获取连接 //注册驱动 Class.forName("com.mysql.jdbc.Driver");//com.mysql.jdbc.Driver mysql驱动 //获取链接 ...
分类:
数据库 时间:
2020-11-25 12:17:02
阅读次数:
8
A.快速排序 1.算法逻辑 若要对 def quick_sort(alist,first,last): if first >= last: # 递归结束条件 return high = last low = first media_data = alist[first] while low < hi ...
分类:
编程语言 时间:
2020-11-25 12:12:17
阅读次数:
8