编码时我讨厌粗体文字.是否可以在每个文件和emacs的界面中禁用粗体文本(和下划线)?
该网站仅提到缓和选项:
# easing: Name of the easing equation.
Run Code Online (Sandbox Code Playgroud)
但没有例子.
如何使用此功能?
可能重复:将
Scala文件加载到解释器中以使用函数?
我像这样启动sbt控制台:
alex@alex-K43U:~/projects$ sbt console
[info] Set current project to default-8aceda (in build file:/home/alex/projects/)
[info] Starting scala interpreter...
[info]
Welcome to Scala version 2.9.2 (OpenJDK Client VM, Java 1.6.0_24).
Type in expressions to have them evaluated.
Type :help for more information.
scala>
Run Code Online (Sandbox Code Playgroud)
我有一个test.scala(/home/alex/projects/test.scala)文件,如下所示:
def timesTwo(i: Int): Int = {
println("hello world")
i * 2
}
Run Code Online (Sandbox Code Playgroud)
如何做到这一点,我可以在控制台中做这样的事情:
scala> timesTwo
Run Code Online (Sandbox Code Playgroud)
并输出函数的值?
Vim完成了单词和行,CTRL-X P并且CTRL-L.有一个名为Company模式的Emacs插件,但是这个插件会干扰并导致与Emacs中的许多内容发生冲突(使用全局linum和yasnippets).我知道我可以在Emacs中使用CTRL- /来完成单词.但是有可能采用以前写过的行来完成代码吗?
我正在按照本教程使用PHP gettext构建多语言网站http://onlamp.com/pub/a/php/2002/06/13/php.html
直到这部分,我理解教程:
在准备好所有目录之后,是时候创建实际的"pot"文件,因为它通常被称为:messages.po文件.为此,您需要使用gettext()函数的PHP文件来"标记"要翻译的字符串并使用xgettext命令.
$ xgettext -n *.php
Run Code Online (Sandbox Code Playgroud)
我是否必须在命令行中编写它?我执行该命令时必须在哪个文件夹中?这是该命令的Linux版本还是Windows?
(我在我的wamp ini文件中启用了gettext扩展)我是否必须从GNU网页下载gettext utilites才能创建.po文件?
到目前为止,我见过的关于使用gettext而不是数组的唯一两件好事是我不必创建"问候""子数组"(或其所谓的).而且我不必为"默认语言"创建文件夹.
是否有其他使用gettext和php数组用于多语言网站的优点和成本?
使用GETTEXT:
西班牙/ messages.po:
#: test.php:3
msgid "Hello World!"
msgstr "Hola Mundo"
Run Code Online (Sandbox Code Playgroud)
index.php文件:
<?php echo _("Hello World!"); ?>
Run Code Online (Sandbox Code Playgroud)
?的index.php LANG =西班牙语:
<?php echo _("Hello World!"); ?> turns to Hola Mundo
Run Code Online (Sandbox Code Playgroud)
使用PHP ARRAYS:
lang.en.php
<?php
$lang = array(
"greeting" => "Hello World",
);
?>
Run Code Online (Sandbox Code Playgroud)
lang.es.php
<?php
$lang = array(
"greeting" => "Hola Mundo",
);
?>
Run Code Online (Sandbox Code Playgroud)
index.php文件:
<?php echo $lang['greeting']; ?> greeting turns to Hello World
Run Code Online (Sandbox Code Playgroud)
的index.php?LANG =西班牙语
<?php echo $lang['greeting']; ?> greeting turns to Hola Mundo
Run Code Online (Sandbox Code Playgroud)
(我首先使用gettext,但我的共享免费托管Zymic不支持.我不想使用Zend_translate,我发现它对我的简单任务来说太复杂了,所以我最终使用了php define,但后来又有人告诉我应该使用数组)
我刚刚更新到Rails 3.2并在启动WEBrick后出现以下错误:
[DEVISE] devise.registrations.reasons in yml files is deprecated, please use devise.registrations.signed_up_but_REASON instead. The default values are:
en:
devise:
registrations:
signed_up_but_unconfirmed: 'A message with a confirmation link has been sent to your email address. Please open the link to activate your account.'
signed_up_but_inactive: 'You have signed up successfully. However, we could not sign you in because your account is not yet activated.'
signed_up_but_locked: 'You have signed up successfully. However, we could not sign you in because your account is locked.' …Run Code Online (Sandbox Code Playgroud) 我正在尝试安装Flask,但我打赌所有这些警告和错误:
alex@alex-K43U:~/flask$ pip install Flask
Downloading/unpacking Flask
Downloading Flask-0.9.tar.gz (481Kb): 481Kb downloaded
Running setup.py egg_info for package Flask
warning: no files found matching '*' under directory 'tests'
warning: no previously-included files matching '*.pyc' found under directory 'docs'
warning: no previously-included files matching '*.pyo' found under directory 'docs'
warning: no previously-included files matching '*.pyc' found under directory 'tests'
warning: no previously-included files matching '*.pyo' found under directory 'tests'
warning: no previously-included files matching '*.pyc' found under directory 'examples'
warning: …Run Code Online (Sandbox Code Playgroud) 我有以下失败:
Run Code Online (Sandbox Code Playgroud)Failures: 1) RelationshipsController creating a relationship with Ajax should increment the Relationship count Failure/Error: xhr :post, :create, relationship: { followed_id: other_user.id } NoMethodError: undefined method `authenticate!' for nil:NilClass # ./spec/controllers/relationships_controller_spec.rb:14:in `block (4 levels) in <top (required)>' # ./spec/controllers/relationships_controller_spec.rb:13:in `block (3 levels) in <top (required)>'
但是很奇怪,如果我访问该网站,事情就会起作用(followers如果我点击" 关注"按钮,计数器会增加:

而最奇怪的是,没有任何认证!relationship_controller_spec.rb中的方法:
require 'spec_helper'
describe RelationshipsController do
let(:user) { FactoryGirl.create(:user) }
let(:other_user) { FactoryGirl.create(:user) }
before { sign_in user }
describe "creating a relationship with Ajax" do
it "should …Run Code Online (Sandbox Code Playgroud) 当我开始时,sbt console我得到了这个:
alex @ alex-K43U:〜$ sbt console [warn]替代项目目录.sbt(/home/alex/.sbt)自sbt 0.12.0以来已被弃用.[warn]
请使用标准位置:/ home/alex/project [info]从/home/alex/.sbt加载项目定义[info]将当前项目设置为default-22b2b7(在构建文件中:/ home/alex /)
我刚开始使用scala和sbt,所以我不确定警告意味着什么.这意味着我必须将所有内容/home/alex/.sbt移至/home/alex/project?
(我也有这个文件夹:/home/alex/sbt它有一个bin文件夹和一个jansi-license.txt文件.我认为这是我安装sbt的方式).