Dart Primer 004 : 操作符与流程控制

Dart 语言整体上与 C++、Java 类似, 当然也有一些细节需要注意区分。 操作符 取整 操作符 ~/ 应该是很少见的一种写法: int a = 3; int b = 2; print(a ~/ b); // 输出 1 级联 当你要对同一个对象进行一系列操作调用时, 使用 .. 操作符连接: class Person { String name; String country; void setCountry(String country) { this.country = country; } String toString() ...

Dart Primer 005 : 类

Dart 是一门使用类单继承的语言, 所有对象都是类的实例, 且所有类都是 Object 类的子类。 定义类 类的定义使用 class 关键字。 class Point { num x; num y; num z; } 实例化 我们可以通过 new 关键字和构造函数进行类的实例化操作。一个类如果没有显式定义构造函数, 将会有默认的空构造函数。 var point = new Point(); print(point.hasCode); 构造函数 如果只是进行简单的参数传递赋值, 有两种简单的方式: class Point { num x; num y; num ...

谁能想到,在这个平静的夜晚,一位叫李二狗的网友,毫无倦意,兀自觉得整个世界都很可爱,对着谁都笑,收不住喜悦。

VIM commands cheat sheet

全局 :h[elp] 关键字 - 打开关键字帮助 :sav[eas] 文件名 - 另存为 :clo[se] - 关闭当前窗口 :ter[minal] - 打开一个shell窗口 K - 打开光标所在单词的man页面 Tip 在终端中运行 vimtutor 以学习最基础的 Vim 命令。 移动光标 h - 左移光标 j - 下移光标 k - 上移光标 l - 右移光标 gj - 下移光标(折行文本) gk - 上移光标(折行文本) H - 移动到当前页面顶部 M - 移动到当前页面中间 L - 移动到当前页面底部 w - 移动到下个单词开头 ...

Bash echo color cheat sheet

You can make your BASH script more pretty, by colorizing its output. Use ANSI escape sequences to set text properties like foreground and background colors. Colorizing Shell Use the following template for writing colored text: echo -e "\e[COLORmSample Text\e[0m" Option Description -...

安装 Manjaro

前言 本文只适用于启动方式为UEFI+GPT Manjaro 是一款基于Arch Linux的、用户友好的发行版, 虽然 Manjaro is not Arch, 但它依然能够从 AUR(Arch User Repository) 中提取软件包, 且有自己的独立库。 它有且不仅有如下特性: Pre-installed (在你还没正式安装时, 你便可从启动盘直接流畅体验它的桌面系统) 快、强、高效 滚动发布, 无需定期更新系统版本 …… 准备工作 查看电脑的启动方式 目前主流的两种启动系统的方式: Legacy 启动 + MBR 分区表 UEFI 启动 + GPT 分区表 我们需要查看自...

7 THINGS TO ALWAYS REMEMBER

the past can’t be changed you only fail if you quit sometimes “no” means “not right now” their opinions don’t define your reality happiness is found within doors close so better ones can open be yourself unapologetically ...

xargs vs exec

There is a bit of a debate in some circles about using xargs vs. the -exec {} option that’s built into find itself. To me, however, it’s not much of a debate; -exec isn’t nearly as good as xargs for what I use find for. I tend to use it to perform tasks involving many files. &ldquo...

find exec vs find xargs

If you want to search files by a pattern and then apply something to the results you have at least two choices. You can use find. -exec or you can pipe the results to xargs. There are also two different choices for find -exec and find | xargs that will have a dramatic impact on performance. So what ...

Xargs Examples

What is the xargs command in UNIX? The xargs command in UNIX is a command line utility for building an execution pipeline from standard input. Whilst tools like grep can accept standard input as a parameter, many other tools cannot. Using xargs allows tools like echo and rm and mkdir to accept stan...

Sed Examples

We use sed to work with text files like log files, configuration files, and other text files. In this post, we are going to focus on the sed Linux command, which is used for text manipulation, which is an essential step in our bash scripting journey. Linux system provides some tools for text proce...

Awk Examples

Sometimes you need something powerful, giving you more control to process data. This is where awk command comes in. The awk command or GNU awk in specific provides a scripting language for text processing. With awk scripting language, you can make the following: Define variables. Use string and...

What's this?

The Night-City version of Hotodogo inspired by Cyberpunk 2077. Not finished yet.

Pinned Message

The Founder and CEO of Infeca Technology.

Developer, Designer, Blogger.

Big fan of Apple, Love of colour.

Feel free to contact me.

反曲点科技创始人和首席执行官。

开发、设计与写作皆为所长。

热爱苹果、钟情色彩。

随时恭候 垂询

Outer Square Inner Square