1 <?xml version="1.0" encoding="utf-8"?> 2 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 3 android:layout_width="match_pare ...
分类:
其他好文 时间:
2020-12-02 12:21:59
阅读次数:
4
现象 日常工作通过Mac自带Terminal远程ssh到linux服务器完成,制表符显示总是不正常,例如htop运行效果如下图 而用PC的gitbash正常ssh的显示是这样的 可以看出command列中正常的制表符└─变成了`-- 原因 通常乱码问题是语言环境变量错误,通过locale命令将有关当 ...
分类:
系统相关 时间:
2020-12-01 12:07:15
阅读次数:
11
写一个脚本计算一下linux系统所有进程占用内存大小的和。 实现代码: #!/bin/bash count=0; for i in `ps aux | awk '{print $6}' | grep -v 'RSS'` do count=$[$count+$i] done echo "$count/ ...
分类:
系统相关 时间:
2020-11-30 15:38:30
阅读次数:
13
importjava.util.Arrays;importjava.util.Random;publicclassCountSort{staticclassItem{intindex;intnum;}privatestaticvoidsort(Item[]items,intbound){intn=items.length;int[]count=newint[bound];int[]sum=newi
分类:
编程语言 时间:
2020-11-27 11:52:06
阅读次数:
22
int countGoodTriplets(int* arr, int arrSize, int a, int b, int c){ int i, j, k, cnt=0; for(i=0; i<arrSize-2; i++){ for(j=i+1; j<arrSize-1; j++){ if(ab ...
分类:
其他好文 时间:
2020-11-27 11:50:07
阅读次数:
24
一、配置 1.添加依赖 在 springboot 启动器中直接添加依赖,或者创建后添加 Maven 依赖: <!--spring-boot-starter-data-redis--> <dependency> <groupId>org.springframework.boot</groupId> < ...
分类:
编程语言 时间:
2020-11-27 11:49:48
阅读次数:
20
闭包是什么? <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Title</title> </head> <body> <div> <button id="father" onclick="add()">计数 ...
分类:
其他好文 时间:
2020-11-27 11:18:25
阅读次数:
9
link /** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NUL ...
分类:
其他好文 时间:
2020-11-27 11:14:59
阅读次数:
5
1.任务: 列出HBase所有的表的相关信息,例如表名 describe 在终端打印出指定的表的所有记录数据 scan 向已经创建好的表添加和删除指定的列族或列 put 清空指定的表的所有记录数据 delete 统计表的行数 count 2.关系型数据库中的表和数据(教材P92上),要求将其转换为适 ...
分类:
其他好文 时间:
2020-11-26 14:35:57
阅读次数:
4
如下 SELECT i.name AS [索引名称], SUM(s.used_page_count) * 8 AS [索引大小KB] FROM sys.dm_db_partition_stats AS s JOIN sys.indexes AS i ON s.[object_id] = i.[obj ...
分类:
数据库 时间:
2020-11-25 12:21:37
阅读次数:
11