最新评论

  • zongren 2018/09/15

    android shell遍历两个数组

    array=(
      Vietnam
      Germany
      Argentina
    )
    array2=(
      Asia
      Europe
      America
    )
    
    for index in ${!array[*]}; do 
      echo "${array[$index]} is in ${array2[$index]}"
    done
    

    资料来源:stackoverflow

  • 宗仁 2018/09/15

    Thanks for telling me that,I will take a look at it.

  • Vincent Tam 2018/09/14

    Thanks for great article! Staticman API v3 now adds support for GitLab Pages. You may see my sample page for example.

  • zongren 2018/09/07

    输出换行

    echo -e "this is \n new line"
    sed -i 's/test/new \
    new line/g' test.file
    
  • zongren 2018/09/06

    监听actionbar点击事件

    View actionBar = findViewById(R.id.action_bar);
    if (actionBar != null) {
      actionBar.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {
          if (adapter.getItemCount() > 1) {
            recyclerView.smoothScrollToPosition(0);
          }
        }
      });
    }