我必须在java中以字节数组的形式存储一些常量值(UUID),我想知道初始化这些静态数组的最佳方法是什么.这就是我目前正在做的事情,但我觉得必须有一个更好的方法.
private static final byte[] CDRIVES = new byte[] { (byte)0xe0, 0x4f, (byte)0xd0,
0x20, (byte)0xea, 0x3a, 0x69, 0x10, (byte)0xa2, (byte)0xd8, 0x08, 0x00, 0x2b,
0x30, 0x30, (byte)0x9d };
private static final byte[] CMYDOCS = new byte[] { (byte)0xba, (byte)0x8a, 0x0d,
0x45, 0x25, (byte)0xad, (byte)0xd0, 0x11, (byte)0x98, (byte)0xa8, 0x08, 0x00,
0x36, 0x1b, 0x11, 0x03 };
private static final byte[] IEFRAME = new byte[] { (byte)0x80, 0x53, 0x1c,
(byte)0x87, (byte)0xa0, 0x42, 0x69, 0x10, (byte)0xa2, (byte)0xea, 0x08,
0x00, 0x2b, 0x30, 0x30, (byte)0x9d };
... …
Run Code Online (Sandbox Code Playgroud) 如何在 zsh 的当前行中搜索/导航?例如,如果光标在行尾..
// [] indicates cursor position
user@hostname: vim /etx/apache2/sites-enabled/defaul[t]
Run Code Online (Sandbox Code Playgroud)
在 vi 正常模式下,我想使用向后搜索 ( ?
),键入etx
并让光标移动,如下所示:
// [] indicates cursor position
user@hostname: vim /[e]tx/apache2/sites-enabled/default
Run Code Online (Sandbox Code Playgroud)
但是,/
和?
映射到历史搜索,而不是内联搜索。我知道我可以只输入9b
并到达那里,但我发现搜索和移动到匹配比计算要跳转的单词数更容易。
不确定这是否清楚,如果我需要澄清事情,请告诉我。