我通过将 (global-font-lock-mode 1) 放入 .emacs 来打开字体锁定模式。并且,使用字体锁定模式,“您的程序看起来肯定会有所不同”,如《学习 GNU emacs》第 274 页所述。
我发现,在 python 模式或 org 模式下,当我更改该模式的字体时,由于颜色的变化,某些关键字不会显示。我的意思是,某些字符(关键字)变成白色,当背景颜色为白色时,这些关键字就不再可见。
这是更改默认代码的代码。
;;; http://www.emacswiki.org/emacs/AquamacsFAQ
(set-default-font "-apple-dejavu sans mono-medium-r-normal--0-0-0-0-m-0-mac-roman")
Run Code Online (Sandbox Code Playgroud)
我使用以下选项来更改特定模式的字体。 http://a.imageshack.us/img823/2772/fontq.png
顺序如下.假设我要合并a.db和b.db. 在命令行中,我执行以下操作.
它运作良好,但在引用的网站中,提问者询问加速,答案是使用'begin'和'commit'命令.
然后,我想出了以下python代码来完成同样的事情.我用SQLiteDB抽象SQLite函数调用,其中一个方法是runCommand().即使我删除了self.connector.commit(),我也得到了同样的错误.
# run command
def runCommand(self, command):
self.cursor.execute(command)
self.connector.commit() # same error even though I delete this line
db = SQLiteDB('a.db')
cmd = "attach \"%s\" as toMerge" % "b.db"
print cmd
db.runCommand(cmd)
cmd = "begin"
db.runCommand(cmd)
cmd = "insert into benchmark select * from toMerge.benchmark"
db.runCommand(cmd)
cmd = "commit"
db.runCommand(cmd)
cmd = "detach database toMerge"
db.runCommand(cmd)
Run Code Online (Sandbox Code Playgroud)
但是,我收到以下错误.
OperationalError: cannot commit - …Run Code Online (Sandbox Code Playgroud) 该实用Common Lisp的第25页,如下解释了WITH-STANDARD-IO-SYNTAX."它确保将影响PRINT行为的某些变量设置为其标准值".
用法如下.
(with-open-file (...)
(with-standard-io-syntax
(print ...
Run Code Online (Sandbox Code Playgroud)
应该(打印)在这个宏中使用吗?如果没有,会发生什么?
我NUnit在Mac上使用Mono/C#,但我需要Microsoft.VisualStudio.TestTools.UnitTesting用于单元测试.
Microsoft.VisualStudio.TestTools.UnitTesting吗?如果是这样,应该复制哪些文件?Go talk 2009 pdf有一个评论来解释他们为什么想出go语言:
No new major systems language in a decade.
系统语言的含义是什么?
我可以看到C#/ Java是'不是'系统语言,而C/C++是.
使用C++,我可以编写如下代码.
class Terminal {
int uid;
public:
void SetUid(int uid) {self.uid = uid;}
};
Run Code Online (Sandbox Code Playgroud)
我在C#中尝试过类似的东西,但是我收到了一个错误.我试过以下,但它看起来很难看.
class Terminal {
int uid;
public void SetUid(int uid_) {uid = uid_;}
}
Run Code Online (Sandbox Code Playgroud)
当你想在C#中传递一个具有相同名称的类字段变量的参数时,你会使用什么?
我发现xml.etree.ElementTree库非常通用且方便的XML处理器.C++怎么样?我找到了一些C++ XML工具(Xerces-C++,TinyXml),但它更像是一个xml.dom.
使用Python,我通常会检查返回值.并且,如果出现错误,我会sys.exit()与错误消息一起使用.
C#中的等效动作是什么?
我正在尝试从GZipStream类构建一个示例.使用该命令gmcs gzip.cs,我收到了错误消息.gzip.cs与msdn的源代码相同.
似乎我需要在编译时添加引用.少了什么东西?
gzip.cs(57,32): error CS1061: Type `System.IO.FileStream' does not contain a definition for `CopyTo' and no extension method `CopyTo' of type `System.IO.FileStream' could be found (are you missing a using directive or an assembly reference?)
/Library/Frameworks/Mono.framework/Versions/2.10.1/lib/mono/2.0/mscorlib.dll (Location of the symbol related to previous error)
gzip.cs(86,40): error CS1061: Type `System.IO.Compression.GZipStream' does not contain a definition for `CopyTo' and no extension method `CopyTo' of type `System.IO.Compression.GZipStream' could be found (are you missing a using directive or an …Run Code Online (Sandbox Code Playgroud) c# ×3
mono ×2
python ×2
xml ×2
.net ×1
c++ ×1
common-lisp ×1
dom ×1
elementtree ×1
emacs ×1
exception ×1
exit ×1
go ×1
gzip ×1
gzipstream ×1
lisp ×1
merge ×1
sqlite ×1
unit-testing ×1
yaml ×1