我无法将代码从我的机器推送到github.我已经设置了回购:
git remote add origin git@github.com:hugeeee/demo_app.git
Run Code Online (Sandbox Code Playgroud)
键入命令时出现此错误git push -u origin master:
ssh: Could not resolve hostname github: Name or service not known
fatal: The remote end hung up unexpectedly
Run Code Online (Sandbox Code Playgroud)
有人可以指导我解决问题吗?
我对单元测试非常不满意,但我有一部分代码我真的需要确定它的一致性.我正在尝试使用JSON将数据从对象传输到外部文件,因此我想确保从外部文件中提取数据时它将是相同的.
我正在使用单元测试来断言这种平等,但我遇到了一个问题,我不知道如何处理.这是运行时错误,这是控制台读取的内容.
A fatal error has been detected by the Java Runtime Environment:
Internal Error (classFileParser.cpp:3494), pid=5032, tid=7048
Error: ShouldNotReachHere()
JRE version: 6.0_25-b06
Java VM: Java HotSpot(TM) 64-Bit Server VM (20.0-b11 mixed mode windows-amd64 compressed oops)
An error report file with more information is saved as:
L:\fliphouseWorkspace\Luas\hs_err_pid5032.log
If you would like to submit a bug report, please visit:
http://java.sun.com/webapps/bugreport/crash.jsp
Run Code Online (Sandbox Code Playgroud)
任何帮助将不胜感激.
我正在开发一个Ruby on Rails应用程序并尝试使用Heroku部署它但是我有一些我无法解决的错误.我已经浏览了Heroku日志,可以看到细节,但我不知道有什么问题.我觉得这个问题来自我的_header.html.erb文件,但我不知道为什么.任何帮助将不胜感激.这是日志(长度道歉):
2012-01-25T21:03:09+00:00 heroku[web.1]: State changed from bouncing to created
2012-01-25T21:03:10+00:00 heroku[web.1]: State changed from created to starting
2012-01-25T21:03:10+00:00 heroku[slugc]: Slug compilation finished
2012-01-25T21:03:12+00:00 heroku[web.1]: Starting process with command `thin -p 20848 -e production -R /home/heroku_rack/heroku.ru start`
2012-01-25T21:03:13+00:00 heroku[web.1]: Stopping process with SIGTERM
2012-01-25T21:03:13+00:00 app[web.1]: >> Stopping ...
2012-01-25T21:03:13+00:00 heroku[web.1]: Process exited
2012-01-25T21:03:15+00:00 app[web.1]: >> Thin web server (v1.2.6 codename Crazy Delicious)
2012-01-25T21:03:15+00:00 app[web.1]: >> Maximum connections set to 1024
2012-01-25T21:03:15+00:00 app[web.1]: >> Listening on 0.0.0.0:20848, CTRL+C to stop …Run Code Online (Sandbox Code Playgroud) 我在C中进行了一些矩阵乘法,我正在尝试编译我的程序但是由于原因而无法编译:
没有这样的文件或目录cblas.h
这是我用来编译的命令:
gcc -o BLAS BLAS.c
Run Code Online (Sandbox Code Playgroud)
有人可以帮帮我吗?我正在服务器上编译这个程序.我不确定这是否有所作为.
我正在使用我的Rails应用程序中的数据填充Twitter引导手风琴,我希望能够过滤数据.我找到了一些不错的jQuery插件,但似乎都没有过滤数据.这是因为它不是一个简单的清单吗?编辑:不再使用列表.这是我到目前为止的代码:
<div id="descriptions">
<% unless @subcategories.nil? %>
<form class="filterform" action="#">
<input class="filterinput" type="text">
</form>
<div id="list" class="display-subcategory">
<div class="accordion" id="accordion2">
<% @subcategories.each do |s| %>
<% unless s.description == "No description yet"%>
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle purple-text" data-toggle="collapse" data-parent="#accordion2" href="#collapse<%=s.name.gsub(/\s+/, "")%>">
<h3><%= s.name %> </h3>
</a>
</div>
<div id="collapse<%=s.name.gsub(/\s+/, "")%>" class="accordion-body collapse out">
<div class="accordion-inner">
<%= s.description.html_safe %>
</div>
</div>
</div>
<% end %>
<% end %>
</div>
</div>
<% end %>
</div>
Run Code Online (Sandbox Code Playgroud)
这是我正在使用的插件:http://anthonybush.com/projects/jquery_fast_live_filter/
编辑:我不再使用此插件,我将尝试编写自己的过滤器功能. …
我正在尝试查询使用联接的数据库来查找需要警报的用户.我的查询在为其编写的模型中工作正常,并且当传递的参数是显式时,它也可以在范围内工作.但是,当我将参数作为变量传递时,它不起作用.这是我的代码:
class Alert < ActiveRecord::Base
belongs_to :user
attr_accessible :first_alert, :second_alert, :third_alert, :user_id
def self.find_users_to_alert(time)
where(:third_alert => time)
end
scope :alerter, find_users_to_alert (here is where i want to pass param)
end
class User < ActiveRecord::Base
has_many :alerts
attr_accessor :password
attr_accessible :name, :email, :password, :password_confirmation
scope :alerts_to_be_sent, joins(:alerts) & Alert.alerter
end
Run Code Online (Sandbox Code Playgroud)
我得到的错误是一个NameError未定义的局部变量或方法.但我会想到在rails控制台中传递变量的值如:
User.alerts_to_be_sent(5)
Run Code Online (Sandbox Code Playgroud)
没关系.感谢帮助,谢谢.
activerecord scope ruby-on-rails ruby-on-rails-3 rails-activerecord
activerecord ×1
c ×1
git ×1
github ×1
heroku ×1
java ×1
jquery ×1
jvm ×1
scope ×1
unit-testing ×1