贪心算法--活动选择问题

博客地址:https://www.cnblogs.com/zylyehuo/ # -*- coding: utf-8 -*- def activity_selection(a): res = [a[0]] for i in range(1, len(a)): if a[i][0] >= res[-1

统计文件个数

> 博客地址:https://www.cnblogs.com/zylyehuo/ # 完整版 ```python import os count = 0 # 遍历文件夹 def walkFile(file): for root, dirs, files in os.walk(file): # roo

[转帖]有用的脚本

https://github.com/oldratlee/useful-scripts#-java%E7%9B%B8%E5%85%B3%E8%84%9A%E6%9C%AC 🐌 useful scripts for making developer's everyday life easier an

[转帖]TIME_WAIT和CLOSE_WAIT状态区别

在服务器的日常维护过程中,会经常用到下面的命令: netstat -n | awk '/^tcp/ {++S[$NF]} END {for(a in S) print a, S[a]}' 它会显示例如下面的信息: TIME_WAIT 814 CLOSE_WAIT 1 FIN_WAIT1 1 ESTA

[转帖]perf-map-agent

https://github.com/jvm-profiling-tools/perf-map-agent A java agent to generate /tmp/perf-.map files for just-in-time(JIT)-compiled methods for us

[转帖]async-profiler

https://github.com/jvm-profiling-tools/async-profiler This project is a low overhead sampling profiler for Java that does not suffer from Safepoint bi

[转帖]CPU Flame Graphs

https://www.brendangregg.com/FlameGraphs/cpuflamegraphs.html#Java MySQL CPU Flame Graph Determining why CPUs are busy is a routine task for performanc

[转帖]Dump2PNG

https://github.com/brendangregg/Dump2PNG Visualize file data as a png. Intended for memory or core dumps. This tool is an experiment, intended to char

[转帖]perf-map-agent

https://github.com/brendangregg/perf-map-agent A java agent to generate /tmp/perf-.map files for just-in-time(JIT)-compiled methods for use with

awk的简单样例

shell awk求和 当第一列相同时,对应的第二列相加 awk'{sum[$1]+=$2}END{for(c in sum){print c,sum[c]}}'输入文件名 在Shell中,我们可以用awk实现按列求和的功能,非常简单 1. 简单的按列求和 cat num.txt | awk '{s

[转帖]关于大内存页面 transparent_hugepage

https://www.cnblogs.com/kevinlucky/p/9955486.html Transparent Huge Pages (THP) are enabled by default in RHEL 6 for all applications. The kernel attem

[转帖]Bash脚本编程学习笔记11:信号捕捉

首先我们先来看一段代码。 #!/bin/bash declare -i uphosts=0 declare -i downhosts=0 for i in 192.168.152.{98..102}; do if ping -W 2 -c 1 $i &>/dev/null; then echo "$

[转帖]Linux服务器安装 sqlcmd 和 bcp SQL Server 命令行工具

http://blog.itpub.net/30126024/viewspace-2851971/ https://docs.microsoft.com/zh-cn/sql/connect/odbc/linux-mac/installing-the-microsoft-odbc-driver-for

[转帖]linux 统计 TCP 网络连接状态

https://www.cnblogs.com/leffss/p/15471501.html 两种方法: awk 统计 $ ss -a|grep '^tcp'|awk '{ ++State[$2] } END { for (i in State) print i,State[i] }' LISTEN

[转帖]lua-book-控制语句

http://me.52fhy.com/lua-book/chapter4.html Lua 语言提供的控制结构有 if-else,while,repeat,for,并提供 break、return 关键字来满足更丰富的需求。不支持switch、continue。 Lua 提供的控制语句部分特征类似

[转帖]Java IO篇:什么是 Reactor 网络模型?

一、什么是 Reactor 模型: The reactor design pattern is an event handling pattern for handling service requests delivered concurrently to a service handler by

[转帖]Java IO篇:什么是 Reactor 网络模型?

一、什么是 Reactor 模型: The reactor design pattern is an event handling pattern for handling service requests delivered concurrently to a service handler by

[转帖]CPU Utilization is Wrong

Brendan Gregg's Blog home CPU Utilization is Wrong 09 May 2017 The metric we all use for CPU utilization is deeply misleading, and getting worse every

[转帖]银河麒麟服务器操作系统V10SP1-x86_64系统环境下部署aarch64虚拟机

文章目录 主机系统环境搭建aarch64虚拟机环境①安装“虚拟系统管理器”②编译安装Qemu for Aarch64③获取aarch64架构的qcow2镜像④使用qcow2镜像文件创建虚拟机⑤开始使用aarch64虚拟机 主机系统环境 OS版本:银河麒麟服务器操作系统V10SP1-x86_64 qe

Windows 磁盘部分性能数据获取

Windows 磁盘部分性能数据获取 摘要 每次晚上加班总有收获 这次发现了一个fio for windows版本的压测程序, 准备学习和使用一下. https://github.com/axboe/fio/releases 安装 exe 的正常安装不用都说直接使用就可以了. 注意我这变使用的是 x