我不小心删掉了詹金斯的一份工作......有没有办法恢复它?我有磁盘上的文件,但我不记得配置,尽管尝试重新配置,我宁愿尝试恢复它,如果我能...
我是Ruby on Rails的新手,我试图从互联网上做一些例子.但是当我尝试生成设计安装时,我有一个错误.我通过添加gem devise修改了Gemfile .然后运行:
bundle install
Run Code Online (Sandbox Code Playgroud)
但是当我跑
rails generate devise:install
Run Code Online (Sandbox Code Playgroud)
我有下一个错误:
/usr/local/lib/ruby/gems/0.9.1/gems/devise-1.1.3/lib/devise.rb:193:in `mailer=': undefined method `ref' for ActiveSupport::Dependencies:Module (NoMethodError)
from /usr/local/lib/ruby/gems/1.9.1/gems/devise-1.1.3/lib/devise.rb:195:in `<module:Devise>'
from /usr/local/lib/ruby/gems/1.9.1/gems/devise-1.1.3/lib/devise.rb:4:in `<top (required)>'
from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `require'
from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `block (2 levels) in require'
from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in `each'
from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in `block in require'
from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `each'
from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `require'
from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.3.5/lib/bundler.rb:132:in `require'
from /home/mihai/Desktop/blog/config/application.rb:7:in `<top (required)>'
from /usr/local/lib/ruby/gems/1.9.1/gems/railties-3.2.13/lib/rails/commands.rb:24:in `require'
from /usr/local/lib/ruby/gems/1.9.1/gems/railties-3.2.13/lib/rails/commands.rb:24:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
Run Code Online (Sandbox Code Playgroud)
请帮我!
以下代码打印数字的二进制表示有什么问题?
int a = 65;
for (int i = 0; i < 8; i++) {
cout << ((a >> i) & 1);
}
Run Code Online (Sandbox Code Playgroud) 当我尝试使用Maven运行JUnit测试时,我遇到了问题.对于Jenkins插件,我写了一个测试类.例如:我在文件夹src/main/javaConsoleParser中包含com.jenkins_plugin包中的类.JUnit测试用例是在包com.jenkins_plugin在文件夹中的src /测试.为了运行JUnit测试,我在pom中添加了依赖项:ConsoleParserTest
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
</dependency>
</dependencies>
Run Code Online (Sandbox Code Playgroud)
然后我在cmd中运行了下一个命令: mvn -Dtest=ConsoleParserTest test
问题是我遇到以下错误:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.
12:test (default-test) on project swatt_jenkins: No tests were executed! (Set -
DfailIfNoTests=false to ignore this error.) -> [Help 1]
Run Code Online (Sandbox Code Playgroud)
完整的pom.xml是:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<build>
<finalName>Jenkins_Plugin</finalName>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.12</version>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>emma-maven-plugin</artifactId>
<version>1.0-alpha-3</version>
<inherited>true</inherited>
<executions> …Run Code Online (Sandbox Code Playgroud) 我正在学习Haskell,我试图根据我在Internet上找到的资源实现一些量子门.目前,我成功实现了Z门,X门,H门,但我在实现旋转门时遇到了问题.
U = [[cos t -sin t]
[sin t cos t ]]
Run Code Online (Sandbox Code Playgroud)
我写的代码:
type Vector a = [a]
type Matrix a = [Vector a]
vectorToComplex :: Integral a => Vector a -> Vector (Complex Double)
vectorToComplex = map (\i -> fromIntegral i:+0.0)
matrixToComplex :: Integral a => Matrix a -> Matrix (Complex Double)
matrixToComplex = map vectorToComplex
--Z Gate
gateZ :: Matrix (Complex Double)
gateZ = matrixToComplex [[1,0],[0,-1]]
Run Code Online (Sandbox Code Playgroud)
我尝试以与实现Z-gate相同的方式实现gateR(旋转门):
gateR :: Integral t => t -> Matrix (Complex Double)
gateR …Run Code Online (Sandbox Code Playgroud)