小编Joh*_*alt的帖子

我非常简单的Greasemonkey脚本没有运行?

我遇到了这个非常基本的Greasemonkey脚本的问题,很可能是元数据配置.

这是基本文件的完整源代码

// ==UserScript==
// @name        Google Hello
// @namespace   https://google.com
// @description Basic Google Hello
// @include     *
// @version     1
// ==/UserScript==

alert("hi google!");
Run Code Online (Sandbox Code Playgroud)

我应该在访问Google.com时运行此脚本,但警报不会弹出.有什么问题?

我试图用Firefox在Ubuntu上运行这个脚本.

javascript debugging firefox greasemonkey

14
推荐指数
1
解决办法
8938
查看次数

如何在Racket中返回命令行结果?

我可以使用Racket发出bash命令(system "some command"),但该函数返回#t而不是命令行的结果输出,它只打印.如何通过该函数获取返回命令的结果?

scheme command-line racket

5
推荐指数
1
解决办法
129
查看次数

Eval不能处理多行字符串

我在使用python eval函数/执行多行字符串时遇到问题

code = ''' 

def main():
  print "this is a test"

main()

'''

eval(code)

Traceback (most recent call last):
  File "<pyshell#12>", line 1, in <module>
    eval(code)
  File "<string>", line 3
    def main():
      ^
SyntaxError: invalid syntax
Run Code Online (Sandbox Code Playgroud)

python eval

3
推荐指数
1
解决办法
2952
查看次数