- 博客(9)
- 问答 (1)
- 收藏
- 关注
原创 使用vim浏览和编辑文件时实现文本上下移动,而光标行不动
如果把scrolloff选项设置成一个很大的值,超过屏幕所能显示总行数的一半,光标所在行将始终停留在窗口的中间。当你上下移动光标时,文本会向相反的方向移动。
2022-07-22 16:56:40 1543 1
原创 【无标题】
Being stuck at "loading initial ramdisk" solved by unchecking the option of "Save session for future logins" on the Log out dialog卡在这里的原因很多吧,解决的方法也会各有不同。
2022-05-28 15:47:19 98
原创 如何将 Bash 命令的输出赋值给 Bash 变量
有时需要将 Bash 命令的输出保存以作他用。Bash 提供了两种将 Bash 命令的输出赋值给 Bash 变量的方法。
2022-04-28 12:04:39 1939
原创 Variable-length argument tuples
write a function called sum_all that takes any number of arguments andreturns their sum.def sum_all(*nu): cnt = 0.0 for i in nu: cnt += i return cntprint(sum_all(1, 3, 5.5))print(sum_all(2.2, 3.3, 9, 555))
2020-12-21 12:51:28 72
原创 20201213nested_sum
Exercise 10.1. Write a function called nested_sum that takes a list of lists of integers and adds upthe elements from all of the nested lists. For example:>>> t = [[1, 2], [3], [4, 5, 6]]>>> nested_sum(t)21def lsum(ls): ...
2020-12-13 00:18:32 296 1
原创 2020-12-11-Wordplay
Exercise 9.6. Write a function called is_abecedarian that returns True if the letters in a wordappear in alphabetical order (double letters are ok). How many abecedarian words are there?def isa(word): nw = word.casefold() count = 0 pos =...
2020-12-11 16:38:38 173 1
空空如也
在 vim 的 substitute 操作中,用什么符号表示end-of-line?
2022-05-16
TA创建的收藏夹 TA关注的收藏夹
TA关注的人