英语单词辨析 - "above" and "over"

背景

发现了一个英文单词辨析的网站,写得挺清楚的,搬运过来,同时翻译一下,加深印象。

“above” and “over”

ref:原文

共用情况:

当我们将above用作介词时,它表示“高于”。它的意思与介词over接近。在下面的句子中,可以用over代替above:

The waves came up above her head and she started screaming. (or … came up over her head …)

She is a nervous flier. But once the plane got above the clouds, she started to relax. (or … got over the clouds …)

区别1:

我们使用above而不是over来指代处于较高水平或高处的东西:

A ‘chalet’ is a small wooden building usually found in mountainous areas

Do they live in that chalet above the village?
Not: Do they live in that chalet over the village?

区别2:

当所指的事物之间没有接触时,我们通常使用above而不是over。over或on top of有着更加普遍的意义,可以用于一个事物接触或覆盖另一个事物的情况:

They made her comfortable and put a blanket over her.
Not: They made her comfortable and put a blanket above her.

区别3:

我们通常使用over而不是above来表示数字:

I get over sixty emails a day.
Not: I get above sixty emails a day.

If you weigh over 100 kilograms, then you may need to start a diet.
Not: If you weigh above 100 kilograms

特例:

当我们谈论与零或平均值相关的温度时,我们使用above而不是over:

It was three degrees above zero.
Not: It was three degrees over zero.

当我们谈论其他温度(非0或者平均值)时,我们可以使用above或over:

The temperature is already above 30 degrees. (or … over 30 degrees.)

典型错误:

  • 我们不使用over来表示“更高的水平”。(区别1)

Most of the race is 500 metres above sea level.
Not: Most of the race is 500 metres over sea level.

  • 当一样东西接触或覆盖另一样东西时,我们不使用above。(区别2)

Pour some cream over the tart and serve it warm.
Not: Pour some cream above the tart

  • 我们不使用above与数字搭配。(区别3)

Over 100 people complained about the programme.
Not: Above 100 people complained about the programme.

Fail2Ban - 网络入侵防御软件

Fail2Ban 是一款入侵防御软件,可以保护服务器免受暴力攻击,开源在 GitHub

介绍

简单来说,Fail2Ban 的功能就是可以记录登录失败(例如SSH,MySQL等服务)的次数,如果失败太多次就禁用登录的 IP,还可以邮件通知;这样可以防止短时间内有大量暴力破解。

注意:Fail2Ban 能够降低错误认证尝试的速度,但是它不能消除弱认证带来的风险。假如一款服务使用了弱密码,那么别人一猜就对了,那么 Fail2Ban 也无能为力。

安装Fail2Ban

1
2
3
# Ubuntu
sudo apt update && apt upgrade
sudo apt install fail2ban
More...

在线编程网站收集

背景

有时想测试一下一些代码,手边没有IDE,就需要在线编程网站,尝试了以下几个,还不错:

1. Repl.it

Repl.it: 是一个强大的在线编码平台,支持多种编程语言,包括 JavaScript。它提供了一个集成开发环境 (IDE),您可以在其中在线编写、运行和调试 JavaScript 代码。测试了一下,现在还支持AI补全代码,和IDE体验相当:

More...

Vue中实现动态样式的几种方式

1. 三元运算符判断

1
2
3
4
5
6
7
8
9
10
<text :style="{color:state?'#ff9933':'#ff0000'}">hello world </text>
<script>
export default {
data() {
return {
state: true
}
}
}
</script>

2. 动态设置class

2.1 主要运用于:实现循环列表中点击时,相应的元素高亮;(默认首个元素高亮)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<template>
<div class="wrapper" v-for="(item,index) in houseList" :key="index" @click="rightTap(index)">
<div class="houseTitle" :class="{'active' : index === rightIndex}">
{{item.name}}
</div>
</div>
</template>
<script>
export default {
data() {
return {
rightIndex:0,
houseList:[]
};
},
methods:{
rightTap(index){
this.rightIndex = index
}
}
}
</script>
<style lang="scss" scoped>
.wrapper{
width: 118px;
height: 60px;
margin: 6px auto 0 auto;
.houseTitle{
font-size: 22px;
text-align: center;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.active{
color:#2a7ffa;
background-color: pink;
}
}
</style>

2.2 主要运用于:为特定数值设置相应样式;

1
2
3
4
<div :class="activeId === item.id?'activeStyle':'machineBar'" 
v-for="(item,index) in List" :key="index" @click="clickEvent">
<p>{{item.name}}</p>
</div>

3. 方法判断

3.1 主要运用于:为不同的数据值设置相应的样式;

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<template>
<div v-for="(item,index) in houseList" :key="index">
<div :style="getStyle(item.status)">{{item.name}}</div>
</div>
</template>
<script>
export default {
data(){
return{
houseList:[
{
id:1,
name:1,
status:'a'
},{
id:2,
name:2,
status:'b'
},{
id:3,
name:3,
status:'c'
}
]
}
},
methods:{
getStyle(e){
console.log('值',e)
if(e === 'a'){
return {
width:'60px',
height:'60px',
background:'yellow',
margin: '10px auto'
}
}else if(e === 'b'){
return {
width:'60px',
height:'60px',
background:'red',
margin: '10px auto'
}
}else if(e === 'c'){
return {
width:'60px',
height:'60px',
background:'pink',
margin: '10px auto'
}
}
}
}
}
</script>

3.2 主要运用于:在元素多从事件下,显示相应的样式;

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<template>
<div
class="homeWrap" :class="{'select': selected === 1,'click': clicked === 1}"
@click="handleClick(1)" @mousedown="menuOnSelect(1)">
主页
</div>
</template>
<script>
export default {
return {
selected: 0,
clicked: 0
}
methods:{
menuOnSelect(value){
this.selected = value;
},
handleClick(value){
this.selected = 0
this.clicked = value
}
}
}
</script>
<style lang="stylus" scoped>
.homeWrap.select
background red
.homeWrap.click
background yellow
</style>

4. 数组绑定

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<div :class="[isActive,isSort]"></div>
// 数组与三元运算符结合判断选择需要的class
<div class="item" :class="[item.name? 'lg':'sm']"></div>
<div class="item" :class="[item.age<18? 'gray':'']"></div>
// 数组对象结合
<div :class="[{ active: isActive }, 'sort']"></div>

data() {
return{
isActive:'active',
isSort:'sort'
}
}
// css
.active{
/*这里写需要设置的第一种样式*/
}
.sort{
/*这里写需要设置的第二种样式*/
}

5. computed结合es6对象的计算属性名方法

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<div :class="classObject"></div>
<script>
export default {
data(){
return{
isActive:true
}
},
computed:{
classObject() {
return{
class_a:this.isActive,
class_b:!this.isActive
// 这里要结合自身项目情况修改填写
}
}
}
}
</script>
// css
.class_a{
/*这里写需要设置的第一种样式*/
}

.class_b{
/*这里写需要设置的第二种样式*/
}

卫哲:创业公司发展该如何提高效率?

背景

看到一篇卫哲的演讲稿,很有启发,转载学习一下。

原文

我每年会出席各种各样的场合,但从来没有像“效率”这个题目这么令我兴奋的。为什么?

做投资五年多来,收到无数的BP计划(商业计划书),永远是讲“我规模有多大”、“我今天有多大”、“我未来会做得有多大”,还有“我有多快”。

但从来没有没有人在BP当中说:我效率有多高——我今天效率有多高;未来随着我多快、多大以后,我的效率有多高。

互联网最大的作用就是提升效率。**一个互联网公司没有人均10万美元的利润贡献,就不是真正的互联网公司。**大和快的背后,是效率。

不要被互联网这层外衣给迷惑了。商业的本质,除了增长以外还有效率。没有效率的增长,不是慢性自杀,而是加速自杀。

如何提高效率,我们今天会分五个环节来讲。

More...

Https网站不能访问问题排查

背景

我有一个https的网站,最近折腾了一下,发现不能访问了,用各种办法测试,逐步找到问题,这里记录一下。

检查证书是否正常

首先怀疑证书,好久不检查,不知道是否过期,用下面的语句检查一下:

1
openssl x509 -noout -text -in xxx.com.crt

可以看到以下结果:

1
2
3
4
5
6
7
8
9
10
Certificate:
Data:
Version: 3 (0x2)
Serial Number:
xxxxxxx
Signature Algorithm: sha384WithRSAEncryption
Issuer: C = CN, O = "TrustAsia Technologies, Inc.", CN = TrustAsia RSA DV TLS CA G2
Validity
Not Before: Jan 29 00:00:00 2024 GMT
Not After : Jan 28 23:59:59 2025 GMT

证书没问题,25年才过期

检查证书是否可以被访问

用以下语句:

1
openssl s_client -connect xxx.com:443 -showcerts

这时报错了:

1
4087E3AE1B7F0000:error:0A00010B:SSL routines:ssl3_get_record:wrong version number:../ssl/record/ssl3_record.c:354:

查到这基本可以确认是网络问题,仔细排查了一下,原来是frp的配置忘改为https协议,导致网络转发不通。改完重启frp,问题解决。

查看SSL详细信息

问题解决后,可以再用 [https://www.ssllabs.com/ssltest/](https://www.ssllabs.com/ssltest/) 这个网站测试一下,结果非常丰富。

查看Linux用户登录日志

1. lastlog

使用lastlog可以查看所有用户最近登录的信息:

1
2
3
4
5
6
(base) root@VM-16-4-debian:~# lastlog
Username Port From Latest
root pts/0 10.10.75.10 Sun Mar 24 17:13:34 +0800 2024
daemon **Never logged in**
bin **Never logged in**
sys **Never logged in**

2. last

列出当前和曾经登入系统的用户信息

1
2
3
4
5
(base) root@VM-16-4-debian:~# last
root pts/0 10.10.75.10 Sun Mar 24 17:13 still logged in
root pts/0 10.10.75.10 Fri Mar 22 22:31 - 01:21 (02:49)
root pts/0 10.10.75.10 Fri Mar 22 20:07 - 22:31 (02:24)
root pts/1 10.10.75.10 Fri Mar 22 18:28 - 20:53 (02:25)

3. lastb

列出失败尝试的登录信息

1
2
3
4
5
6
7
(base) root@VM-16-4-debian:~# lastb -50
root ssh:notty 106.55.187.66 Sun Mar 24 17:28 - 17:28 (00:00)
root ssh:notty 183.15.207.112 Sun Mar 24 17:28 - 17:28 (00:00)
root ssh:notty 101.43.137.100 Sun Mar 24 17:28 - 17:28 (00:00)
root ssh:notty 43.156.133.218 Sun Mar 24 17:28 - 17:28 (00:00)
test1 ssh:notty 170.64.190.204 Sun Mar 24 17:28 - 17:28 (00:00)
test1 ssh:notty 170.64.190.204 Sun Mar 24 17:28 - 17:28 (00:00)

Data Warehouse Construction Standards - Data Modeling Standards

3.1 Data Modeling Standards

a. Horizontal Layering:

  • Explanation

    Our layered design approach is an essential byproduct of our data architecture strategy, adhering to strict standards during the modeling phase for optimal results.

  • Layer Standards

    • The Operational Data Store (ODS)
      • Design Methodology:
        • Store raw data with minimal processing in the data warehouse system, maintaining a structure that is similar to the source system.
      • Main Functions:
        • Synchronize and store foundational data in the data warehouse to address data silo issues and ensure the integrity of data integration .
        • To ensure data persistence, keeping tables and data in perfect sync.
        • Perform regular synchronization and add synchronization timestamps to the tables to capture their temporal variability.
      • Data Processing:
        • Handling of anomalies and erroneous data.
      • Naming Convention:
        • Layer abbreviation_Source System_Source System Table Name
        • Example: ods_oms_order
More...

Data Warehouse Construction Standards - What

3.What are the key components of data warehouse standards?

a. Data Modeling Standards:

These standards define the guidelines for designing and structuring the data models used in the data warehouse. They include naming conventions, entity-relationship diagrams, data type definitions, and relationships between tables.

b. Data Integration Standards:

These standards focus on the processes and methods used to extract, transform, and load (ETL) data into the data warehouse. They cover data extraction techniques, data cleansing procedures, transformation rules, and data loading strategies.

c. Data Quality Standards:

These standards ensure the accuracy, consistency, completeness, and validity of data within the data warehouse. They include data profiling, data validation rules, data cleansing methodologies, and data quality metrics.

d. Metadata Standards:

Metadata standards define the structure and format of metadata stored in the data warehouse. They cover metadata definitions, metadata repositories, metadata integration, and metadata management processes.

e. Security and Access Control Standards:

These standards focus on protecting the data warehouse from unauthorized access, ensuring data privacy, and enforcing data security policies. They include user authentication, authorization mechanisms, encryption techniques, and data masking methods.

f. Performance and Scalability Standards:

These standards address the performance optimization and scalability aspects of the data warehouse. They cover query optimization techniques, indexing strategies, partitioning schemes, and data archiving processes.

g. Data Governance Standards:

Data governance standards define the overall framework and processes for managing and governing data within the data warehouse. They include data stewardship, data ownership, data lifecycle management, and data governance policies.

h. Documentation Standards:

These standards ensure the documentation of all aspects of the data warehouse, including data models, ETL processes, data dictionaries, and data lineage. They promote understanding, maintainability, and ease of future enhancements.

请我喝杯咖啡吧~

支付宝
微信