在Sublime中,我可以轻松设置一个更复杂的热键,让我按Enter键退出引号和括号.它在下面:
// Move out of single and double quotes with `Enter`
{
"keys": ["enter"],
"command": "move",
"args": {"by": "characters", "forward": true},
"context": [
{ "key": "following_text", "operator": "regex_match", "operand": "(?:\"|').*", "match_all": true },
{ "key": "preceding_text", "operator": "regex_contains", "operand": "(?:\"|')", "match_all": true }
]
},
Run Code Online (Sandbox Code Playgroud)
在VS Code中,有没有办法实现这个目标?这keybindings.json会移动光标,但是当我不想要时它也是活动的.谢谢.
{ "key": "enter", "command": "cursorRight",
"when": "editorTextFocus" }
Run Code Online (Sandbox Code Playgroud) 我的桌子有account_id和device_id.一个account_id可以有多个device_ids,反之亦然.我试图计算每个连接的多对多关系的深度.
例如:
account_id | device_id
1 | 10
1 | 11
1 | 12
2 | 10
3 | 11
3 | 13
3 | 14
4 | 15
5 | 15
6 | 16
Run Code Online (Sandbox Code Playgroud)
如何构建一个知道将1-3帐户组合在一起,4-5组合在一起,并自行离开6的查询?帐户1-3的所有7个条目应该组合在一起,因为它们在某个时刻都触及了相同的account_id或device_id.我试图将它们组合在一起并输出计数.
帐户1在设备10,11,12上使用.这些设备也使用其他帐户,因此我们希望将它们包含在组中.他们使用了额外的帐户2和3.但帐户3被另外2个设备进一步使用,因此我们也将其包括在内.群组的扩展会带来任何其他帐户或设备,这些帐户或设备也"触及"该群组中已有的帐户或设备.
图表如下所示: