ES查询语句
记录常用的es 查询 聚合
GET _cat / indices
GET / p_ext_develop / _mapping / g
GET / p_ext_develop / _analyze {
"field": "other_name_en",
"text": "(3S)-N-Boc-2-azabicyclo[2.2.1]heptane-3-carboxylicacid;"
}
GET / hs2840 / _analyze {
"query": {
"term": {
"cas": {
"value": "29173500"
}
},
"range": {
"exportmonth": {
"from": "2018-01",
"to": "2018-12"
}
}
}
}
GET / p_ext_develop / g / _search {
"query": {
"constant_score": {
"filter": {
"term": {
"products_name_en.text": "Benzoic Acid"
}
},
"boost": 1.2
}
}
}
GET / p_ext_develop / g / _search {
"query": {
"filtered": {
"filter": {
"bool": {
"should": [{
"term": {
"other_name_en": "acid"
}
}]
}
}
}
}
}
#
DELETE / p_ext_develop
GET / p_ext_develop / g / _search {
"size": 300,
"query": {
"function_score": {
"query": {
"bool": {
"should": [{
"query_string": {
"fields": ["products_name_en", "other_name_en"],
"query": "Benzoic acid"
}
},
{
"term": {
"delflag": "0"
}
}
]
}
},
"functions": [{
"filter": {
"term": {
"products_name_en": "Benzoic acid"
}
},
"weight": 15
},
{
"filter": {
"regexp": {
"products_name_en": "[Bb]enzoic [Aa]cid"
}
},
"weight": 13
},
{
"filter": {
"regexp": {
"products_name_en": "[Bb]enzoic [Aa]cid.*"
}
},
"weight": 12
},
{
"filter": {
"term": {
"other_name_en": "Benzoic acid"
}
},
"weight": 10
},
{
"filter": {
"regexp": {
"other_name_en": "[Bb]enzoic [Aa]cid"
}
},
"weight": 8
},
{
"filter": {
"regexp": {
"other_name_en": "[Bb]enzoic [Aa]cid.*"
}
},
"weight": 7
},
{
"filter": {
"query_string": {
"fields": ["products_name_en"],
"query": "Benzoic acid"
}
},
"weight": 2
}
]
}
},
"sort": [{
"_score": {
"order": "desc"
}
},
{
"supplier_count": {
"order": "desc"
}
}
]
}
GET / p_ext_develop / g / _search {
"query": {
"function_score": {
"query": {
"match_all": {}
},
"functions": [{
"filter": {
"term": {
"products_name_en.text": "[Bb]enzoic [Aa]cid"
}
},
"weight": 30
},
{
"filter": {
"prefix": {
"products_name_en.text": "Benzoic Acid"
}
},
"weight": 29
},
{
"filter": {
"query": {
"wildcard": {
"products_name_en.text": {
"value": "Benzoic Acid"
}
}
}
},
"weight": 28
},
{
"filter": {
"term": {
"other_name_en.text": "Benzoic Acid"
}
},
"weight": 27
},
{
"filter": {
"prefix": {
"other_name_en.text": "Benzoic Acid"
}
},
"weight": 26
},
{
"filter": {
"query": {
"wildcard": {
"other_name_en.text": {
"value": "Benzoic Acid"
}
}
}
},
"weight": 25
}
]
}
}
}
GET / p_ext_develop / g / _search {
"size": 300,
"query": {
"function_score": {
"query": {
"bool": {
"must": [{
"query_string": {
"fields": ["products_name_en", "other_name_en"],
"query": "Benzoic acid"
}
},
{
"term": {
"delflag": "0"
}
}
]
}
},
"functions": [{
"filter": {
"term": {
"products_name_en.text": "Benzoic acid"
}
},
"weight": 15
},
{
"filter": {
"regexp": {
"products_name_en.text": "[Bb]enzoic [Aa]cid"
}
},
"weight": 13
},
{
"filter": {
"regexp": {
"products_name_en.text": "[Bb]enzoic [Aa]cid.*"
}
},
"weight": 12
},
{
"filter": {
"term": {
"other_name_en.text": "Benzoic acid"
}
},
"weight": 10
},
{
"filter": {
"regexp": {
"other_name_en.text": "[Bb]enzoic [Aa]cid"
}
},
"weight": 8
},
{
"filter": {
"regexp": {
"other_name_en.text": "[Bb]enzoic [Aa]cid.*"
}
},
"weight": 7
},
{
"filter": {
"query_string": {
"fields": ["products_name_en"],
"query": "Benzoic acid"
}
},
"weight": 2
}
]
}
},
"sort": [{
"_score": {
"order": "desc"
}
},
{
"supplier_count": {
"order": "desc"
}
}
]
}
PUT / p_ext_develop {
"mappings": {
"g": {
"properties": {
"application": {
"type": "string"
},
"cas_no": {
"type": "string",
"index": "not_analyzed"
},
"delflag": {
"type": "string"
},
"other_name_en": {
"type": "string",
"fields": {
"text": {
"type": "string",
"index": "not_analyzed"
}
}
},
"other_name_zh": {
"type": "string",
"fields": {
"text": {
"type": "string",
"index": "not_analyzed"
}
},
"analyzer": "ik"
},
"pid": {
"type": "string"
},
"products_name_en": {
"type": "string",
"fields": {
"text": {
"type": "string",
"index": "not_analyzed"
}
}
},
"products_name_zh": {
"type": "string",
"fields": {
"text": {
"type": "string",
"index": "not_analyzed"
}
},
"analyzer": "ik"
},
"supplier_count": {
"type": "string"
}
}
}
}
}
GET / p_ext_develop / g / _mapping
GET / p_ext_develop / g / _search {
"query": {
"match_all": {}
}
}
GET / p_ext_develop / g / _search {
"query": {
"match": {
"pid": "pd18051825563"
}
}
}
GET / p_ext_develop / g / _search {
"size": 300,
"query": {
"constant_score": {
"filter": {
"bool": {
"must": [{
"term": {
"delflag": "0"
}
},
{
"term": {
"cas_no": {
"value": "75-05-8"
}
}
}
]
}
}
}
},
"sort": [{
"supplier_count": {
"order": "desc"
}
}]
}
#
country_short country_name city_name city_short external post_code
DELETE / jerry_data
GET jerry_data / index / _mapping
#7261, 2231 3741 1425
GET /jerry_data/index/_search
{
"size": 10000,
"query": {
"constant_score": {
"filter": {
"bool": {
"must": [{
"match": {
"country_short": "CA"
}
},
{
"bool": {
"should": [{
"prefix": {
"city_name": {
"value": "AIR"
}
}
}, {
"prefix": {
"post_code": {
"value": "AIR"
}
}
}]
}
}
]
}
}
}
},
"sort": [{ "city_name": { "order": "desc" }},
{ "post_code": { "order": "asc" }}
]
}
GET /jerry_data/index/_search
{
"size": 10000,
"query": {
"constant_score": {
"filter": {
"bool": {
"should": [{
"regexp": {
"country_short": "AIR.*"
}
}, {
"regexp": {
"city_name": "AIR.*"
}
},
{
"regexp": {
"city_short": "AIR.*"
}
}
]
}
}
}
}
}
PUT /jerry_data
{
"mappings": {
"index":{
"properties": {
"country_short": {
"type": "string",
"index": "not_analyzed"
},
"country_name": {
"index": "not_analyzed",
"type": "string"
},
"city_name": {
"type": "string",
"index": "not_analyzed"
},
"city_short": {
"type": "string",
"index": "not_analyzed"
},
"external": {
"type": "string",
"index": "not_analyzed"
},
"post_code": {
"type": "string",
"index": "not_analyzed"
}
}
}
}
}
GET /hs2840/index/_search
{
"query": {
"term": {
"country_code": {
"value": "tt"
}
}
}
}
GET /hs2840/index/_search
{
"query": {
"match_all": {}
}
}
GET /cars/transactions/_search
{
"size": 0,
"query": {
"match_all": {}
},
"aggs": {
"colors": {
"terms": {
"field": "color"
}
}
}
}
# 查询统计
GET / cars / transactions / _search {
"query": {
"match": {
"make": "ford"
}
},
"aggs": {
"colors": {
"terms": {
"field": "color"
}
}
}
}
GET / cars / transactions / _search {
"size": 0,
"query": {
"match": {
"make": "ford"
}
},
"aggs": {
"single_avg_price": {
"avg": {
"field": "price"
}
},
"all": {
"global": {},
"aggs": {
"avg_price": {
"avg": {
"field": "price"
}
}
}
}
}
}
GET / cars / transactions / _search {
"size": 0,
"query": {
"constant_score": {
"filter": {
"range": {
"price": {
"gte": 10000
}
}
}
}
},
"aggs": {
"single_avg_price": {
"avg": {
"field": "price"
}
}
}
}
GET / cars / transactions / _search {
"size": 0,
"query": {
"match": {
"make": "ford"
}
},
"aggs": {
"recent_sales": {
"filter": {
"range": {
"sold": {
"from": "now-1M"
}
}
},
"aggs": {
"average_price": {
"avg": {
"field": "price"
}
}
}
}
}
}
GET / cars / transactions / _search {
"size": 0,
"aggs": {
"distinct_colors": {
"cardinality": {
"field": "color"
}
}
}
}
GET / cars / transactions / _search {
"size": 0,
"aggs": {
"months": {
"date_histogram": {
"field": "sold",
"format": "yyyy-MM-dd",
"interval": "month",
"min_doc_count": 0,
"extended_bounds": {
"min": "2014-01-01",
"max": "2015-12-31"
}
},
"aggs": {
"distinct_colors": {
"cardinality": {
"field": "color"
}
}
}
}
}
}
GET / cars / transactions / _search {
"size": 0,
"query": {
"match": {
"make": "ford"
}
},
"post_filter": {
"term": {
"color": "green"
}
},
"aggs": {
"all_colors": {
"terms": {
"field": "color"
}
}
}
}
#
尝试尝试尝试juhe尝试尝试聚合
GET / cars / transactions / _search {
"size": 0,
"aggs": {
"popular_colors": {
"terms": {
"field": "color",
"size": 50
},
"aggs": {
"avg_price": {
"avg": {
"field": "price"
}
},
"make": {
"terms": {
"field": "make",
"size": 10
},
"aggs": {
"min_price": {
"min": {
"field": "price"
}
},
"max_price": {
"max": {
"field": "price"
}
}
}
}
}
}
}
}
#
图表图表图表
GET / cars / transactions / _search {
"size": 0,
"aggs": {
"price": {
"histogram": {
"field": "price",
"interval": 20000
},
"aggs": {
"revenue": {
"sum": {
"field": "price"
}
}
}
}
}
}
GET / cars / transactions / _search {
"size": 0,
"aggs": {
"sales": {
"date_histogram": {
"field": "sold",
"interval": "quarter",
"format": "yyyy-MM-dd",
"min_doc_count": 0,
"extended_bounds": {
"min": "2014-01-01",
"max": "2014-12-31"
}
},
"aggs": {
"per_make_sum": {
"terms": {
"field": "make"
},
"aggs": {
"sum_price": {
"sum": {
"field": "price"
}
}
}
},
"total_sum": {
"sum": {
"field": "price"
}
}
}
}
}
}
GET / hs2840 / index / _search {
"size": 0,
"aggs": {
"price_count": {
"terms": {
"size": 300,
"field": "month"
},
"aggs": {
"avg_qty": {
"avg": {
"field": "JSON_qty"
}
},
"country_zh": {
"terms": {
"size": 300,
"field": "country_zh"
},
"aggs": {
"max_qty": {
"min": {
"field": "JSON_qty"
}
},
"min_qty": {
"max": {
"field": "JSON_qty"
}
}
}
},
"sum_qty": {
"sum": {
"field": "JSON_qty"
}
}
}
}
}
}
GET / hs2840 / index / _search {
"query": {
"term": {
"cas": {
"value": "29053200"
}
}
}
}
GET / hs2840 / index / _search {
"query": {
"filtered": {
"query": {
"term": {
"cas": {
"value": "29053200"
}
}
},
"filter": {
"range": {
"exportmonth": {
"gte": "2018-01",
"lte": "2018-12"
}
}
}
}
}
}
#
2
GET / hs2840 / index / _search {
"query": {
"term": {
"country_code": {
"value": "ar"
}
}
}
}
#
月份的max and min
GET / hs2840 / index / _search {
"size": 0,
"aggs": {
"max_month": {
"max": {
"field": "exportmonth",
"format": "yyyy-MM"
}
},
"min_month": {
"min": {
"field": "exportmonth",
"format": "yyyy-MM"
}
}
}
}#
接口2
GET / hs2840 / index / _search {
"size": 10000,
"query": {
"term": {
"cas": {
"value": "29171400"
}
}
},
"aggs": {
"fromdata": {
"filter": {
"and": [{
"range": {
"exportmonth": {
"from": "2018-01",
"to": "2018-12"
}
}
}]
},
"aggs": {
"summonth": {
"date_histogram": {
"field": "exportmonth",
"interval": "month",
"format": "yyyy-MM",
"min_doc_count": 0,
"order": {
"_key": "desc"
}
}
}
}
}
}
}
GET / hs2840 / index / _search {
"query": {
"range": {
"exportmonth": {
"from": "2018-06",
"to": "2018-07"
}
}
}
}
GET / hs2840 / index / _search {
"size": 10000,
"query": {
"bool": {
"must": [{
"term": {
"cas": {
"value": "29053200"
}
}
}],
"filter": {
"range": {
"exportmonth": {
"gte": "2018-01",
"lte": "2018-12"
}
}
}
}
}
}
GET / hs2840 / index / _search {
"size": 5000,
"query": {
"term": {
"cas": {
"value": "31054000"
}
}
},
"aggs": {
"summonth": {
"date_histogram": {
"field": "exportmonth",
"interval": "month",
"format": "yyyy-MM",
"min_doc_count": 0,
"extended_bounds": {
"min": "2018-01",
"max": "2018-10"
},
"order": {
"_key": "desc"
}
},
"aggs": {
"datefrom": {
"filter": {
"range": {
"exportmonth": {
"from": "2018-01",
"to": "2018-12",
"format": "yyyy-MM"
}
}
},
"aggs": {
"sum_qty": {
"sum": {
"field": "JSON_qty"
}
},
"sum_price": {
"sum": {
"field": "JSON_price"
}
}
}
}
}
}
}
}
#
接口3验证
GET / hs2840 / index / _search {
"size": 0,
"aggs": {
"total_qty": {
"sum": {
"field": "JSON_qty"
}
},
"total_price": {
"sum": {
"field": "JSON_price"
}
}
}
}
#
接口3
GET / hs2840 / index / _search {
"size": 0,
"aggs": {
"all": {
"global": {},
"aggs": {
"total_qty": {
"sum": {
"field": "JSON_qty"
}
},
"total_price": {
"sum": {
"field": "JSON_price"
}
}
}
},
"bydate": {
"filter": {
"range": {
"exportmonth": {
"gte": "2018-01",
"lte": "2018-12"
}
}
},
"aggs": {
"bycoutry": {
"terms": {
"field": "country_code",
"size": 10,
"order": {
"sum_qty": "desc"
}
},
"aggs": {
"sum_qty": {
"sum": {
"field": "JSON_qty"
}
},
"sum_price": {
"sum": {
"field": "JSON_price"
}
}
}
}
}
}
}
}
GET / hs2840 / index / _search {
"size": 0,
"aggs": {
"bycountry": {
"terms": {
"field": "country_code",
"size": 300
},
"aggs": {
"bydate": {
"filter": {
"range": {
"exportmonth": {
"gte": "2018-01",
"lte": "2018-12"
}
}
},
"aggs": {
"bymnth": {
"date_histogram": {
"field": "exportmonth",
"interval": "month",
"format": "yyyy-MM",
"min_doc_count": 0,
"extended_bounds": {
"min": "2018-01",
"max": "2018-12"
},
"order": {
"sum_qty": "desc"
}
},
"aggs": {
"sum_qty": {
"sum": {
"field": "JSON_qty"
}
},
"sum_price": {
"sum": {
"field": "JSON_price"
}
}
}
}
}
}
}
}
}
}
GET / hs2840 / index / _search {
"size": 0,
"aggs": {
"bycountry": {
"terms": {
"field": "country_code",
"size": 300,
"order": {
"sum_qyt": "desc"
}
},
"aggs": {
"sum_qyt": {
"sum": {
"field": "JSON_qty"
}
},
"sum_price": {
"sum": {
"field": "JSON_price"
}
}
}
}
}
}
GET / hs2840 / index / _search {
"size": 10000,
"query": {
"term": {
"cas": {
"value": "29173500"
}
}
},
"aggs": {
"bymonth": {
"date_histogram": {
"field": "exportmonth",
"interval": "month",
"format": "yyyy-MM",
"min_doc_count": 0,
"extended_bounds": {
"min": "2019-01",
"max": "2019-06"
},
"order": {
"_key": "desc"
}
},
"aggs": {
"sum_qty": {
"sum": {
"field": "JSON_qty"
}
},
"sum_price": {
"sum": {
"field": "JSON_price"
}
}
}
}
}
}#
hscode 和时间
GET / hs2840 / index / _search {
"size": 10000,
"query": {
"term": {
"cas": "29173500"
},
"filtered": {
"filter": {
"range": {
"exportmonth": {
"gte": "2019-01",
"lte": "2019-12"
}
}
}
}
},
"aggs": {
"bymonth": {
"filter": {
"range": {
"exportmonth": {
"gte": "2019-01",
"lte": "2019-07"
}
}
},
"aggs": {
"datelist": {
"date_histogram": {
"field": "exportmonth",
"interval": "month",
"format": "yyyy-MM",
"min_doc_count": 0,
"extended_bounds": {
"min": "2019-01",
"max": "2019-12"
},
"order": {
"_key": "desc"
}
},
"aggs": {
"sum_qty": {
"sum": {
"field": "JSON_qty"
}
},
"sum_price": {
"sum": {
"field": "JSON_price"
}
}
}
}
}
}
}
}
#
接口1
GET / hs2840 / index / _search {
"size": 0,
"query": {
"term": {
"country_code": {
"value": "ar"
}
}
},
"aggs": {
"summonth": {
"filter": {
"range": {
"exportmonth": {
"gte": "2017-01",
"lte": "2017-12"
}
}
},
"aggs": {
"data_month": {
"date_histogram": {
"field": "exportmonth",
"interval": "month",
"format": "yyyy-MM",
"min_doc_count": 0,
"extended_bounds": {
"min": "2017-01",
"max": "2017-12"
},
"order": {
"_key": "desc"
}
},
"aggs": {
"sum_qty": {
"sum": {
"field": "JSON_qty"
}
},
"sum_price": {
"sum": {
"field": "JSON_price"
}
}
}
}
}
}
}
}
#
3
# Delete the `cars`
index
DELETE / cars
# Index example docs
POST / cars / transactions / _bulk {
"index": {}
} {
"price": 10000,
"color": "red",
"make": "honda",
"sold": "2014-10-28"
} {
"index": {}
} {
"price": 20000,
"color": "red",
"make": "honda",
"sold": "2014-11-05"
} {
"index": {}
} {
"price": 30000,
"color": "green",
"make": "ford",
"sold": "2014-05-18"
} {
"index": {}
} {
"price": 15000,
"color": "blue",
"make": "toyota",
"sold": "2014-07-02"
} {
"index": {}
} {
"price": 12000,
"color": "green",
"make": "toyota",
"sold": "2014-08-19"
} {
"index": {}
} {
"price": 20000,
"color": "red",
"make": "honda",
"sold": "2014-11-05"
} {
"index": {}
} {
"price": 80000,
"color": "red",
"make": "bmw",
"sold": "2014-01-01"
} {
"index": {}
} {
"price": 25000,
"color": "blue",
"make": "ford",
"sold": "2014-02-12"
}
#
Basic aggregation - most popular car colors
GET / cars / transactions / _search {
"size": 0,
"aggs": {
"popular_colors": {
"terms": {
"field": "color"
}
}
}
}
#
Find the average price of each car color
GET / cars / transactions / _search {
"size": 0,
"aggs": {
"colors": {
"terms": {
"field": "color"
},
"aggs": {
"avg_price": {
"avg": {
"field": "price"
}
}
}
}
}
}
#
Nest a second bucket to determine top makes per color
GET / cars / transactions / _search {
"size": 0,
"aggs": {
"colors": {
"terms": {
"field": "color"
},
"aggs": {
"avg_price": {
"avg": {
"field": "price"
}
},
"make": {
"terms": {
"field": "make"
}
}
}
}
}
}
GET / cars / transactions / _search {
"size": 0,
"query": {
"match": {
"make": "ford"
}
},
"aggs": {
"recent_sales": {
"filter": {
"range": {
"sold": {
"from": "now-60M"
}
}
},
"aggs": {
"average_price": {
"avg": {
"field": "price"
}
}
}
}
}
}
#
Finally, add some extra metrics to determine min / max price per - make, per - color
GET / cars / transactions / _search {
"size": 0,
"aggs": {
"colors": {
"terms": {
"field": "color"
},
"aggs": {
"avg_price": {
"avg": {
"field": "price"
}
},
"make": {
"terms": {
"field": "make"
},
"aggs": {
"min_price": {
"min": {
"field": "price"
}
},
"max_price": {
"max": {
"field": "price"
}
}
}
}
}
}
}
}
ES查询语句的更多相关文章
- Func<T,T>应用之Elasticsearch查询语句构造器的开发
前言 之前项目中做Elasticsearch相关开发的时候,虽然借助了第三方的组件PlainElastic.Net,但是由于当时不熟悉用法,而选择了自己拼接查询语句.例如: string queryG ...
- elasticsearch查询语句
1,安装es 安装java环境 # java --versionjava version "1.8.0_65" Java(TM) SE Runtime Environment (b ...
- SpringBoot使用注解的方式构建Elasticsearch查询语句,实现多条件的复杂查询
背景&痛点 通过ES进行查询,如果需要新增查询条件,则每次都需要进行硬编码,然后实现对应的查询功能.这样不仅开发工作量大,而且如果有多个不同的索引对象需要进行同样的查询,则需要开发多次,代码复 ...
- ES 常用的查询语句介绍
elasticsearch定义了两种查询方式: 一.索引(index).type.document 相关语句 1.列出所有索引的状态 GET /_cat/indices?v health status ...
- ES查询之刨根问底
昨天有一个需求,就是想要根据某个网关url做过滤,获取其下面所有的上下文nginx日志:如果直接"query":"https://XXX/YYY/ZZZ"发现有 ...
- ElasticSearch 论坛搜索查询语句
概述 研究论坛搜索如何综合时间和TF/IDF权重. 自定义权重计算的效率问题 数据结构 假设有一个论坛的搜索 字段包括: subject:标题 message:内容 dateline:发布时间 tag ...
- Neo4j:图数据库GraphDB(一)入门和基本查询语句
图数据库的代表:Neo4j 官网: http://neo4j.com/ 引言:为什么使用图数据库 在很多新型项目中,应用图数据库已经是势在必行的趋势了,因为图数据库可以很好的表示各种节点与关系的概念 ...
- mysql查询语句中使用星号真的慢的要死?
前言 之所以写这篇文章,是源于以前看过的关于sql语句优化的帖子,里面明确提到了在sql语句中不要使用 * 来做查询,就像下面的规则中说的 2.尽量避免使用select *,返回无用的字段会降低查询效 ...
- python 配合 es 查询数据
1.python脚本 [root@do1cloud03 ~]# cat python-es.py #!/usr/bin/env python3 from elasticsearch import El ...
随机推荐
- 分JOB实例
*&---------------------------------------------------------------------* *& Form F_SET_JOB * ...
- redis watch 加 事务实现秒杀
<?php //redis watch 加 事务实现秒杀 $redis = new redis(); $result = $redis->connect('10.10.10.119 ...
- jmeter解决乱码
在jmeter.properties 这个文件里面 找到sampleresult.default.encoding=xx 后面xx改成utf-8,然后取消注释 解决jmeterbody里面中文显示不出 ...
- Flutter 轻量级的ToolTip控件
轻提示的效果在应用中是少不了的,其实Flutter已经准备好了轻提示控件,这就是toolTip. 轻量级操作提示 其实Flutter中有很多提示控件,比如Dialog.Snackbar和BottomS ...
- 关于C++的智能指针
一句话概括:当类中有指针成员时,可以使用智能指针实现对象共享:智能指针通过引用计数实现,即对指向同一对象的指针计数:智能指针的使用可以方便/安全地控制对象的生命周期,对指针进行自动销毁. 当类中有指针 ...
- Netty学习篇③--整合springboot
经过前面的netty学习,大概了解了netty各个组件的概念和作用,开始自己瞎鼓捣netty和我们常用的项目的整合(很简单的整合) 项目准备 工具:IDEA2017 jar包导入:maven 项目框架 ...
- git 服务端安装
服务器端创建 git 用户,用来管理 Git 服务,并为 git 用户设置密码 [root@localhost home]# id git id: git:无此用户 [root@localhost h ...
- oracle授予权限
CONNECT角色: --是授予最终用户的典型权利,最基本的 CREATE SESSION --建立会话 RESOURCE角色: --是授予开发人员的 CREATE ...
- 【51nod】2591 最终讨伐
[51nod]2591 最终讨伐 敲51nod是啥评测机啊,好几次都编译超时然后同一份代码莫名奇妙在众多0ms中忽然超时 这道题很简单就是\(M\)名既被诅咒也有石头的人,要么就把石头给没有石头被诅咒 ...
- Python之random.seed()用法
import random # 随机数不一样 random.seed() print('随机数1:',random.random()) random.seed() print('随机数2:',rand ...