People in Mars represent the colors in their computers in a similar way as the Earth people. That is, a color is represented by a 6-digit number, wher ...
分类:
其他好文 时间:
2021-01-28 12:14:24
阅读次数:
0
一. 在当前文件目录下,有文件file1 查询file1里面空行的所在行号 查询file2以五行结尾的行 打印出file1文件第一行到第3行 [root@ecs-c13b ~]# cat file1 我是高胜寒第一行 我是高胜寒第二行 我是高胜寒第三行 我是高胜寒第四行 我是高胜寒第五行 1 2 3 ...
分类:
其他好文 时间:
2021-01-28 12:06:25
阅读次数:
0
1. 安装n管理包 终端使用npm install -g n命令全局安装, 安装成功后在终端输入n --version或n查看。 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 ~ npm install -g n /usr/local/bin/n - ...
分类:
其他好文 时间:
2021-01-27 14:02:06
阅读次数:
0
1。导入mongoose的js const Koa = require('koa') const app = new Koa() const Router = require('koa-router') let router = new Router() const mongoose = requi ...
分类:
Web程序 时间:
2021-01-27 13:24:09
阅读次数:
0
阴间代码 有时候会觉得自己写代码,有一股整活的味道,但是一看也挺有意思的。于是就记录下来,有些比较奇思妙想,当然更多的时候我会觉得自己写的比较阴间。 多用三目 单一取值字典比switch强,单一状态判断三目比if强,三目,永远的神! 我们来看这么一段代码 let msg = '' if(code 2 ...
分类:
其他好文 时间:
2021-01-27 12:54:03
阅读次数:
0
1002 写出这个数 读入一个正整数 n,计算其各位数字之和,用汉语拼音写出和的每一位数字。 输入格式: 每个测试输入包含 1 个测试用例,即给出自然数 n 的值。这里保证 n 小于 10^100。 输出格式: 在一行内输出 n 的各位数字之和的每一位,拼音数字间有 1 空格,但一行中最后一个拼音数 ...
分类:
编程语言 时间:
2021-01-26 12:09:32
阅读次数:
0
Problem LeetCode Given the root of a binary tree, return the sum of every tree node's tilt. The tilt of a tree node is the absolute difference between ...
分类:
编程语言 时间:
2021-01-25 11:29:21
阅读次数:
0
感谢作者> https://www.cnblogs.com/botoo/p/11762045.html CentOS7中自带的python版本是python-2.7.5,由于新开的虚拟机需要使用python3,于是便升级一下版本。 安装Python3.7.3 官网下载地址:https://www.p ...
分类:
编程语言 时间:
2021-01-25 11:22:41
阅读次数:
0
今天在写程序的时候看见一个以前没有见过的注解(@Component),在网上查找过后,经过实践,决定把它记录下来。 1、@controller 控制器(注入服务) 用于标注控制层,相当于struts中的action层 2、@service 服务(注入dao) 用于标注服务层,主要用来进行业务的逻辑处 ...
分类:
其他好文 时间:
2021-01-22 12:31:16
阅读次数:
0
相比起暴力解法,前缀树可以实现空间换时间。将多个 small 构建为一棵前缀树,在树上遍历一次 big 。可替代用每个 small 与 big 比对。 JAVA: private class Trie { boolean isEnd; Trie[] childs; int num; int flag ...
分类:
其他好文 时间:
2021-01-22 12:17:01
阅读次数:
0