小编Tha*_*tas的帖子

如何按 Ctrl+Shift+?/? 在 VSCode 集成终端上选择上一个或下一个单词?

如何在 VSCode 集成终端上启用Ctrl+ Shift+ \xe2\x86\x90/选择(突出显示)上一个或下一个单词?\xe2\x86\x92

\n

Ctrl+ \xe2\x86\x90/\xe2\x86\x92可以将光标移动一个单词,但Ctrl+ Shift+ \xe2\x86\x90/\xe2\x86\x92会输出 D 和 C 。

\n

我在 keybindings.json 中尝试了这些(右侧相同):

\n
    {\n        "key": "ctrl+shift+left",\n        "command": "-cursorWordStartLeftSelect",\n        "when": "textInputFocus"\n    },\n    {\n        "key": "ctrl+shift+left",\n        "command": "-workbench.action.terminal.resizePaneLeft",\n        "when": "terminalFocus"\n    },\n    {\n        "key": "ctrl+shift+left",\n        "command": "cursorWordStartLeftSelect",\n        "when": "textInputFocus || terminalFocus"\n    },\n
Run Code Online (Sandbox Code Playgroud)\n

\n
    {\n        "key": "ctrl+shift+left",\n        "command": "-workbench.action.terminal.resizePaneLeft",\n        "when": "terminalFocus"\n    },\n    {\n        "key": "ctrl+shift+left",\n        "command": "cursorWordStartLeftSelect",\n        "when": "terminalFocus"\n    },\n
Run Code Online (Sandbox Code Playgroud)\n …

terminal shortcut key-bindings visual-studio-code

6
推荐指数
0
解决办法
775
查看次数

如何检查字符串是否包含 case 语句中的单词 - SQLite

这是我的代码:

SELECT 
CASE your_text
  WHEN contains('hate') THEN 'hater'
  WHEN contains('love') THEN 'lover'
  ELSE 'other'
END haterOrLover,
count(*) AS total_count
FROM a_table
GROUP BY haterOrLover
Run Code Online (Sandbox Code Playgroud)

如果只有 contains() 存在就好了!

我想计算有多少个仇恨者、爱好者,结果是这样的:

+--------------+-------------+  
| haterOrLover | total_count |  
+--------------+-------------+  
| hater        | 1           |  
+--------------+-------------+  
| lover        | 2           |  
+--------------+-------------+  
| other        | 1           |  
+--------------+-------------+
Run Code Online (Sandbox Code Playgroud)

尝试过:

+--------------+-------------+  
| haterOrLover | total_count |  
+--------------+-------------+  
| hater        | 1           |  
+--------------+-------------+  
| lover        | 2           |  
+--------------+-------------+  
| other        | 1           |  
+--------------+-------------+
Run Code Online (Sandbox Code Playgroud)
WHEN …
Run Code Online (Sandbox Code Playgroud)

sql sqlite string substring case

4
推荐指数
1
解决办法
1万
查看次数