不困的四点

  • 首页

  • 分类

  • 标签

  • 归档

  • 关于

  • 公益 404

  • 搜索

echo多行文字到文本

发表于 2020-02-27 | 分类于 Linux | 阅读次数:
字数统计:467 字 | 阅读时长:2 分钟

echo 多行文字到文本

这篇文章为了记录自己写Dockerfile时踩的坑,分三部分描述echo内容到文件的用法

  1. shell 脚本 echo 单行文字到文本
  2. shell 脚本 echo 多行文字到文本
  3. Dockerfile 中 echo 多行文字到文本
阅读全文 »

Java字符串String相等判断equals和==的区别

发表于 2020-02-01 | 分类于 Java | 阅读次数:
字数统计:461 字 | 阅读时长:2 分钟

简要说明

在C++中,比较两个string字符串相等,通常使用的是 ==,这也是因为string类中,对 == 运算符对应的方法做了重载。

同样的 == ,在Java中,用法可是完全不一样的;今天就说说Java字符串String判断是否相等的equals和 == 的区别。

阅读全文 »

[LeetCode]942. DI String Match

发表于 2019-06-25 | 分类于 LeetCode | 阅读次数:
字数统计:360 字 | 阅读时长:2 分钟

942. DI String Match

Easy

Given a string S that only contains “I” (increase) or “D” (decrease), let N = S.length.

Return any permutation A of [0, 1, ..., N] such that for all i = 0, ..., N-1:

  • If S[i] == "I", then A[i] < A[i+1]
  • If S[i] == "D", then A[i] > A[i+1]

    阅读全文 »

[LeetCode]627. Swap Salary

发表于 2019-06-23 | 分类于 LeetCode | 阅读次数:
字数统计:256 字 | 阅读时长:1 分钟

627. Swap Salary

Easy

SQL Schema

Given a table salary, such as the one below, that has m=male and f=female values. Swap all f and m values (i.e., change all f values to m and vice versa) with a single update statement and no intermediate temp table.

Note that you must write a single update statement, DO NOT write any select statement for this problem.

阅读全文 »

[LeetCode]728. Self Dividing Numbers

发表于 2019-06-18 | 分类于 LeetCode | 阅读次数:
字数统计:492 字 | 阅读时长:3 分钟

728. Self Dividing Numbers

Easy

A self-dividing number is a number that is divisible by every digit it contains.

For example, 128 is a self-dividing number because 128 % 1 == 0, 128 % 2 == 0, and 128 % 8 == 0.

阅读全文 »
12…12
不困

不困

58 日志
19 分类
50 标签
© 2015 – 2020 不困
由 Hexo 强力驱动 v3.8.0
|
主题 – NexT.Gemini v7.0.1
本站总访问量:次 | 本站总访客数:人 |
全站共44.2k字