#! /bin/bash # 根据用户输入的PID,过滤出该PID所有的信息 read -p "请输入要查询的PID: " P n=`ps -aux| awk '$2~/^'$P'$/{print $11}'|wc -l` if [ $n -eq 0 ];then echo "该PID不存在!!" ...
分类:
其他好文 时间:
2020-04-27 13:18:17
阅读次数:
65
1、选择排序 1 public class SelectSort<T extends Comparable> { 2 3 public void sort(T[] arr) { 4 if (arr != null && arr.length > 1) { 5 for (int i = 0; i < ...
分类:
编程语言 时间:
2020-04-27 11:42:40
阅读次数:
54
package com.company;import java.util.Arrays;//冒泡排序public class dome { public static void main(String[] args) { int[] a ={1,7,2,4,3,6,8,5}; int[] sort ...
分类:
编程语言 时间:
2020-04-27 10:03:43
阅读次数:
59
之前写过一个文章。 利用python画出SJF调度图 动态高度优先权优先调度 动态优先权调度算法,以就绪队列中各个进程的优先权作为进程调度的依据。各个进程的优先权在创建进程时所赋予,随着进程的推进或其等待时间的增加而改变。进程的优先权利用某一范围内的整数来表示。有的系统数值越小优先权越高,如Unix ...
分类:
编程语言 时间:
2020-04-26 18:58:57
阅读次数:
77
马踏棋盘算法 马踏棋盘算法介绍和游戏演示: 马踏棋盘游戏代码实现: 对第一种实现方式的思路图解: 代码实现: ...
分类:
编程语言 时间:
2020-04-26 14:07:56
阅读次数:
85
Problem Suppose a sorted array is rotated at some pivot unknown to you beforehand. (i.e., 0 1 2 4 5 6 7 might become 4 5 6 7 0 1 2). Find the minimum ...
分类:
其他好文 时间:
2020-04-26 12:31:47
阅读次数:
51
(一)Stream 好用 @Overridepublic List<CategoryEntity> listWithTree() { //1 查出所有分类 List<CategoryEntity> categoryEntities = baseMapper.selectList(null); //2 ...
分类:
其他好文 时间:
2020-04-25 23:50:21
阅读次数:
151
```javascript // 对普通数组进行排序 let nums = [1, 3, 4, -4, 2, 5, 1]; nums.sort(function (a, b) { // 升序 // return a - b; //降序 return b - a; }); console.log(nu... ...
分类:
编程语言 时间:
2020-04-25 23:48:29
阅读次数:
80