• Saisai

    妈妈进去的时候哭着喊妈妈,不要爸爸了。我说,那你去找妈妈吧,你去敲门啊。

  • Saisai 2

    晚上回来骑脖子, 我在下面跳, 他在上面笑的咯咯叫. 放下面就哭,还要上去.

    跳着跳着, 碰下巴了. 嗷嗷哭, 不上去了. 哭着要去找妈妈.

  • Global Mark In Vim

    小写的字母只能在文件内跳转。大写的字母是全局的 Mark,可以全局跳转。

    Using marks

  • 个人意志是不可触碰的底线

    个人意志是不可触碰的底线

  • Grep Command Returns Grep Invalid Option

    报错如下:

    grep: invalid option -- '='
    Usage: grep [OPTION]... PATTERN [FILE]...
    Try grep --help for more information.`
    

    答案:

    In case this isn’t yet fixed, see if there is any file in the directory that starts with a ‘-‘.

    https://askubuntu.com/questions/165320/every-grep-command-returns-grep-invalid-option

  • 李好李焕英

    每天行尸走肉的生活,让我不敢看会流泪的电影,像一根针会扎痛自己,不想不敢扎痛自己,就想着看看爆米花电影打发时间好了。 还好昨天被迫跟着去看了你好李焕英,挺好,又可以不再行尸走肉两天了。

  • Brew Link Certain Version

    brew install postgresql@8.4.4

  • Du Xfs_quota Not Match

    https://unix.stackexchange.com/questions/156897/why-does-du-and-quota-results-not-match

    I believe there may be some files still held open by some processes. You can try to list them using,

    lsof | grep username | grep deleted A more better version would be to use,

    lsof +L1 grep username
  • Make Setting Variables

    If you’d like a variable to be set to a value only if it’s not already set, then you can use the shorthand operator ‘?=’ instead of ‘=’.

  • Veta Kibana

    kibana6.8 中使用的还是 vage-lite-2, 所以要看对应版本的文档, https://vega.github.io/vega-lite-v2/docs/

    主要是使用 calculate

    {
      $schema: https://vega.github.io/schema/vega-lite/v2.json
      title: CodeReview 比例
    
      // Define the data source
      data: {
        url: {
          index: XXX
          body: {
            aggs: {
              organization_name: {
                terms: {size: 100, field: "organization_name", min_doc_count: 0}
                aggs: {
                  cr: {
                    filters: {
                      filters: {
                        CR: {
                          query_string: {query: "is_code_review:true"}
                        }
                        noCR: {
                          query_string: {query: "-is_code_review:true"}
                        }
                      }
                    }
                  }
                }
              }
            }
            size: 0
          }
        }
        format: {property: "aggregations.organization_name.buckets"}
      }
      mark: bar
    
     "transform": [
        {"calculate": "round(datum.cr.buckets.CR.doc_count / datum.doc_count*100)/100", "as": "ratio"},
        {"calculate": "datum.key", "as": "bu"}
      ],
      "encoding": {
        "x": {
          "field": "bu",
          "type": "ordinal",
          "title": "BU",
          "sort": {"op": "mean", "field": "ratio", "order":"descending"}
          },
        "y": {
          "field": "ratio", "type": "quantitative", "title": "CR比例"
        },
        "tooltip": [
          {"field": "bu", "type": "ordinal"},
          {"field": "ratio", "type": "quantitative"}
        ]
      }
    }