Webstorm IDE 8.0.5中未打开灰尘文件(Dust file doesn't open in Webstorm IDE 8.0.5)
我试图在WebStorm中打开一个Dust(.dust)文件,但它不打开。 我还从WebStorm Plugin存储库安装了Dust Plugin,但我仍然无法打开Dust文件。 我正在使用WebStorm 8.0.5。
我也尝试打开粉尘与文件 - >打开选项,但我得到一个错误,说“这种类型的文件不能在WebStorm打开”?
有人可以帮助这个吗?
I am trying to open a Dust (.dust) file in WebStorm but it doesn't open. I also installed Dust Plugin from WebStorm Plugin repository but I still can't open a Dust file. I am using WebStorm 8.0.5.
I also tried to open Dust with File -> Open option but I got an error saying "File of this type can't be opened in WebStorm"?
Can someone please help with this?
原文:https://stackoverflow.com/questions/28186157
最满意答案
Let evalStr = "" For(let element of messageArray){ evalStr += element + " " } eval(evalStr)
您需要切出尾随空格字符。
但是你正在使用message.content然后将每个单词拆分成一个数组。 然后尝试将数组融合在一起,重新添加空格。您应该删除消息的前x个字符。 content其中x是prefix.length + command并且eval结果。
Eval命令非常危险。 在实施这些之前,请确保您知道自己在做什么。
编辑:本指南值得一看和书签。
https://anidiotsguide.gitbooks.io/discord-js-bot-guide/examples/command-with-arguments.html
Let evalStr = "" For(let element of messageArray){ evalStr += element + " " } eval(evalStr)
You'll need to slice out the trailing space character.
But you're taking message.content then splitting each word into an array. Then trying to fuse the array back together adding the spaces back in. You should just delete the first x chars of message. content where x is prefix.length + command and eval the result.
Eval commands are very dangerous. Please make sure you know what you're doing before implementing these.
EDIT: This guide is worth taking a look at and bookmarking.
https://anidiotsguide.gitbooks.io/discord-js-bot-guide/examples/command-with-arguments.html
相关问答
更多-
看来你正在运行Eclipse中的程序,默认情况下零参数已经通过。 如果要传递参数,可以通过run -- >run configuration --> arguments tab. 指南 It seems you are running the program from Eclipse where by default zero arguments got passed. If you want to pass your arguments, you can do it through run -- >run ...
-
在Run配置string_prompt作为Program Argument添加。 ${string_prompt} 如果你想要具体的文件\文件夹,还有一个file_prompt和一个folder_prompt 。 这些可通过“运行配置”对话框的(x)= Arguments选项卡上的“ Variables按钮获得。 Add string_prompt as a Program Argument in the Run configuration. ${string_prompt} There are a ...
-
无论命令的参数如何,在执行命令时运行脚本(Run script when a command is executed irrespective of the command's arguments)[2023-04-10]
不要使用别名; 定义一个函数: rm () { some_script.sh command rm "$@" } 以任何方式修改rm行为时的标准免责声明适用。 不要这样做是some_script.sh旨在成为某种安全网。 您可能会依赖它,如果您在未安装此安全网的计算机上运行rm ,则会感到不快。 Don't use an alias; define a function: rm () { some_script.sh command rm "$@" } The stand ... -
我不确定可以从命令行访问$1 , $2等等。 相反,你可以尝试从一个函数中运行你的行。 你绝对可以将参数传递给函数。 foo() { sed 's/^\(.\{'"$2"'\}\)./\1'"$3"'/' "$1"; } foo out2.fa 2 A 编辑 :正如评论中所建议的那样,我在参数引用周围添加了双引号,以防止空格破坏命令解析(这应该在$2左右不是必需的,因为我们只传递一个整数,但对于$1和$3来说更好。 I'm not sure that $1, $2… and so on can be ac ...
-
考虑使用Getopt库或它的一些修改,它可以让你的生活更轻松。 http://www.boost.org/doc/libs/1_41_0/doc/html/program_options.html consider using the Getopt library or some of its modifications, it can make yout life easier. http://www.boost.org/doc/libs/1_41_0/doc/html/program_options.h ...
-
如何使用命令中有多少个参数的长度来执行命令?(How do I make a command with the length of how many arguments are in the command?)[2022-02-26]
Let evalStr = "" For(let element of messageArray){ evalStr += element + " " } eval(evalStr) 您需要切出尾随空格字符。 但是你正在使用message.content然后将每个单词拆分成一个数组。 然后尝试将数组融合在一起,重新添加空格。您应该删除消息的前x个字符。 content其中x是prefix.length + command并且eval结果。 Eval命令非常危险。 在实施这些之前,请确保您知道自己在做什么。 ... -
正如我在上面的评论中所说,问题不是由于Symfony控制台。 As i said in the comment above, the problem wasn't due to Symfony console.
-
如果没有解释引号的shell的帮助,你想要的实际上很难实现。所以你可以使用shell来运行你的命令。 exec.Command("sh", "-c", "echo '1 2 3'") What you want is actually hard to achieve without help of shell that interprets quotes etc. So you may use shell to run your command. exec.Command("sh", "-c", "ech ...
-
table字面上需要两个相同长度的变量来制表。 这与SAS,SPSS,Stata,Excel等中的类似频率/枢轴/表格功能相同。您需要两列 - 一列显示源(X或Y),另一列显示值(0或1)。 X <- c(1, 0, 1, 0, 1) Y <- c(1, 1, 1) source <- rep(c("X","Y"), c(length(X), length(Y))) value <- c(X,Y) table(source,value) # value #source 0 1 # X ...
-
带有2个参数的静音命令(ArrayIndexOutOfBoundsException)(Mute command with 2 arguments (ArrayIndexOutOfBoundsException))[2022-03-08]
你有 if (args.length == 1) { /* ... */ if (args[0] != null && args[1] != null & // Problem is here ----^ 如果args.length为1 ,则无法尝试访问args[1]因为数组没有。 这就是你得到例外的原因。 args.length == 1测试是错误的,或者你不需要在if块中的任何地方使用args[1] 。 You have if (args.length == ...