如果您远程使用perforce并且希望获得用于跟踪差异的强大git速度,则可以使用以下解决方案:http://kb.perforce.com/article/1417/git-p4
但是,我注意到以下几点:
这是我的问题.git-p4如何使用远程存储库有一个很好的解释吗?热git-p4的整体解释有效吗?
git-p4不适合胆小的人.我知道你真的需要理解git才能很好地使用它.
组织模式有一个很棒的功能来着色源代码块中的文本.但是,它使用emacs主题的当前颜色.我经常使用黑暗的zenburn主题,它将Java的一些部分放在浅色中.当我发布到HTML时,浅色不可读.解决方法是重新启动emacs并重新发布而不加载它们.
有更好的方法吗?
因此,当使用内联块而不是浮动时,我阅读了关于使间距消失的解决方案:显示:内联块额外边距和http://css-tricks.com/fighting-the-space-between-inline-block - 元素/.
因此,如果您正在使用haml并希望将结束标记放在与下一个开始标记相同的行上,那么除了切换到ERB之外还有解决方案吗?
(不,我不想弄乱父容器的css属性,并且必须在所有子元素中覆盖它).
这打破了(锚之间有间距).
因此,尽管建议使用内联块而不是浮点数来进行此类布局,但似乎浮动仍然是要走的路,特别是在使用haml时?
CSS
nav a {
display: inline-block;
padding: 5px;
background: red;
}
Run Code Online (Sandbox Code Playgroud)
HTML
<nav>
<a href="#">One</a>
<a href="#">Two</a>
<a href="#">Three</a>
</nav>
Run Code Online (Sandbox Code Playgroud)
解决方法(css-tricks one):
<ul>
<li>
one</li><li>
two</li><li>
three</li>
</ul>
Run Code Online (Sandbox Code Playgroud)
要么
<ul>
<li>one</li
><li>two</li
><li>three</li>
</ul>
Run Code Online (Sandbox Code Playgroud)
另一个:
<ul>
<li>one</li><!--
--><li>two</li><!--
--><li>three</li>
</ul>
Run Code Online (Sandbox Code Playgroud) 与此问题相关:如何在emacs中禁用x粘贴
这适用于鼠标
(setq mouse-drag-copy-region nil)
Run Code Online (Sandbox Code Playgroud)
如何在emacs中为Evil模式执行相同的操作?
我在Mac OS上运行Emacs 24.2.91.
我有这个部署到heroku的应用程序:
https://github.com/justin808/react-webpack-rails-tutorial
http://react-webpack-rails-tutorial.herokuapp.com/
该技术在此处描述:http://www.railsonmaui.com/blog/2014/10/02/integrating-webpack-and-the-es6-transpiler-into-an-existing-rails-project/
目前,package.json位于项目的根级别.
如何将/package.json和/ node_modules移动到/ webpack目录中?
即,如何告诉节点buildpack在哪里查找package.json?
假设您从ActiveSupport :: Concern的文档中获得了此代码,但是您希望包含的Foo块具有不同的内容,具体取决于包含Foo的模块或类.
在我试图解决的具体问题中,我有一组地址验证,但地址字段将命名为home_zip_code或work_zip_code,我希望包含验证问题以了解zip_code字段的前缀.
require 'active_support/concern'
module Foo
extend ActiveSupport::Concern
included do
# have some_value be accessible
def self.method_injected_by_foo
...
end
end
end
module Bar
extend ActiveSupport::Concern
# set some_value that will used when Foo is included
include Foo
included do
self.method_injected_by_foo
end
end
class Host
include Bar # It works, now Bar takes care of its dependencies
end
Run Code Online (Sandbox Code Playgroud)
我在这里讨论了这个问题:http://forum.railsonmaui.com/t/how-make-a-concern-parameterized/173
以下2个选项有效.我想知道哪个更好.
这是需要"参数化"的问题:
module Addressable
extend ActiveSupport::Concern
included do
zip_field = "#{address_prefix}_zip_code".to_sym
zip_code_regexp = /^\d{5}(?:[-\s]\d{4})?$/
validates zip_field, …
Run Code Online (Sandbox Code Playgroud) 我希望能够向Heroku倾斜一个jruby rails 3.1 app.
Heroku现在支持Java:http://blog.heroku.com/archives/2011/08/25/java/ 据说,应该可以部署JRuby rails应用程序.这里有一个关于普通java的教程:http://devcenter.heroku.com/articles/java和另一个:http://devcenter.heroku.com/articles/spring-mvc-hibernate
这是关于Heroku的JRuby Sinatra应用程序的教程:http://chris.chowie.net/2011/08/28/Sinatra-with-JRuby-on-Heroku/ 为了使这个工作,我使用非运行heroku时的jruby ruby,因为如果rvm使用jruby,heroku会崩溃.
为了运行命令
mvn package
Run Code Online (Sandbox Code Playgroud)
我不得不这样做:
bundle --gemfile=/home/justin/github/sinatra-jruby-heroku/Jemfile install temple
bundle --gemfile=/home/justin/github/sinatra-jruby-heroku/Jemfile update
Run Code Online (Sandbox Code Playgroud)
我创建了应用程序:
heroku create jg1-sinatra --stack cedar
Run Code Online (Sandbox Code Playgroud)
我将文件推送到heroku,但是当应用程序启动时,它崩溃了.:(
有什么建议?我猜不会在Heroku有这方面的教程之前不久.
Heroku的日志文件:
2011-11-21T08:30:40+00:00 heroku[slugc]: Slug compilation started
2011-11-21T08:31:17+00:00 heroku[api]: Deploy 3bccec5 by justin.gordon@gmail.com
2011-11-21T08:31:17+00:00 heroku[api]: Release v7 created by justin.gordon@gmail.com
2011-11-21T08:31:18+00:00 heroku[web.1]: State changed from crashed to created
2011-11-21T08:31:18+00:00 heroku[slugc]: Slug compilation finished
2011-11-21T08:31:20+00:00 heroku[web.1]: Starting process with command …
Run Code Online (Sandbox Code Playgroud) 我试图让livereload使用rails 3.2,我遇到了这个问题,其中有一个参考,没有用.css.scss命名导入的sass部分:
Rails:使用带有Asset Pipeline的livereload
这是正确的,导入的SCSS文件应该命名为file.scss而不是file.css.scss吗?
有关沉默这些capybara-webkit警告的任何建议?
2015-09-06 14:15:38.455 webkit_server [3700:6222738]加载错误/ Users/justin/Library/Internet Plug-Ins/Google Earth Web Plug-in.plugin/Contents/MacOS/libnpgeplugin.dylib:dlopen(/ Users/justin/Library/Internet Plug-Ins/Google Earth Web Plug-in.plugin/Contents/MacOS/libnpgeplugin.dylib,265):找不到合适的图像.找到了:/ Users/justin/Library/Internet Plug-Ins/Google Earth Web Plug-in.plugin/Contents/MacOS/libnpgeplugin.dylib:mach-o,但错误的架构插件,NP_Initialize启动插件,NP_Initialize end插件,NP_GetEntryPoints启动Private_Initialize插件,NP_GetEntryPoints结束2015-09-06 14:15:38.463 webkit_server [3700:6222738]加载错误/ Users/justin/Library/Application Support/Facebook/video/3.1.0.522/FacebookVideoCalling.webplugin/Contents/MacOS/FacebookVideoCalling:dlopen(/ Users/justin/Library/Application Support/Facebook/video/3.1.0.522/FacebookVideoCalling.webplugin/Contents/MacOS/FacebookVideoCalling,262):找不到合适的图像.找到了:/ Users/justin/Library/Application Support/Facebook/video/3.1.0.522/FacebookVideoCalling.webplugin/Contents/MacOS/FacebookVideoCalling:mach-o,但是架构错误2015-09-06 14:15:38.493 webkit_server [ 3700:6222738]无法找到CFBundle 0x7ffd14fcd260的可执行文件(未加载)2015-09-06 14:15:38.495 webkit_server [3700:6222738]加载错误/库/ Internet插件/ QuickTime Plugin.plugin/Contents/MacOS/QuickTime插件:dlopen(/ Library/Internet Plug-Ins/QuickTime Plugin.plugin/Contents/MacOS/QuickTime Plugin,265):找不到合适的图像.找到了:/ Library/Internet Plug-Ins/QuickTime插件.插件/内容/ MacOS/QuickTime插件:mach-o,但错误的架构objc [3700]:类AdobePDFProgressView在/ Library/Internet Plug-Ins/AdobePDFViewer.plugin/Contents/MacOS/AdobePDFViewer和/ Library/Internet Plug中实现-INS/AdobePDFViewerNPAPI.plugin /内容/ MacOS的/ AdobePDFViewerNPAPI.将使用两者之一.哪一个未定义.objc [3700]:类ObjCTimerObject在/ Library/Internet Plug-Ins/AdobePDFViewer.plugin/Contents/MacOS/AdobePDFViewer和/ Library/Internet Plug-Ins/AdobePDFViewerNPAPI.plugin/Contents/MacOS/AdobePDFViewerNPAPI中实现.将使用两者之一.哪一个未定义.objc [3700]:类MacCocoaSocketServerHelperRtc在/ Library/Internet Plug-Ins/o1dbrowserplugin中实现.插件/内容/ MacOS/o1dbrowserplugin和/ Library/Internet Plug-Ins/googletalkbrowserplugin.plugin/Contents/MacOS/googletalkbrowserplugin.将使用两者之一.哪一个未定义.
我正在使用spacemacs:https : //github.com/syl20bnr/spacemacs
我已经尝试了两个用户钩子位置来覆盖cmd-k kill-buffer
而不是delete-window
。但是,当我重新启动时,两者均无效。
(defun dotspacemacs/user-init ()
"Initialization function for user code.
It is called immediately after `dotspacemacs/init'. You are free to put any
user code."
(defun dotspacemacs/user-init ()
(global-set-key (kbd "s-k") 'kill-buffer)
)
)
(defun dotspacemacs/user-config ()
"Configuration function for user code.
This function is called at the very end of Spacemacs initialization after
layers configuration. You are free to put any user code."
(global-set-key (kbd "s-k") 'kill-buffer)
)
Run Code Online (Sandbox Code Playgroud)
调试此问题的最佳方法是什么?