我收到了分段错误.应该which ruby返回/ usr/local/bin吗?
maletor$ rails generate mailer ContactMailer
/Users/maletor/.rvm/gems/ruby-1.9.2-p0/gems/mysql2-0.2.4/lib/mysql2/mysql2.bundle: [BUG] **Segmentation fault**
ruby 1.8.7 (2009-06-12 patchlevel 174) [universal-darwin10.0]
Abort trap
maletor$ which rails
/usr/bin/rails
maletor$ gem env
RubyGems Environment:
- RUBYGEMS VERSION: 1.3.7
- RUBY VERSION: 1.9.2 (2010-08-18 patchlevel 0) [x86_64-darwin10.4.0]
- INSTALLATION DIRECTORY: /Users/maletor/.rvm/gems/ruby-1.9.2-p0
- RUBY EXECUTABLE: /Users/maletor/.rvm/rubies/ruby-1.9.2-p0/bin/ruby
- EXECUTABLE DIRECTORY: /Users/maletor/.rvm/gems/ruby-1.9.2-p0/bin
- RUBYGEMS PLATFORMS:
- ruby
- x86_64-darwin-10
- GEM PATHS:
- /Users/maletor/.rvm/gems/ruby-1.9.2-p0
- /Users/maletor/.rvm/gems/ruby-1.9.2-p0@global
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => false …Run Code Online (Sandbox Code Playgroud) 我已经实现了一个小的viewDidLoad()来显示具有自动调整功能的图片,但它不起作用,可以请某人帮助我并说出这行代码在第3行和第4行中的错误是什么?
imageView = [[UIImageView alloc] initWithImage:img];
imageView.frame = self.view.frame;
imageView.autoresizingMask = UIViewAutoresizingFlexibleHeight;
imageView.autoresizingMask = UIViewAutoresizingFlexibleWidth;
Run Code Online (Sandbox Code Playgroud)
我希望有人可以帮助我?
在php中,我必须查找目录是否存在.如果它不存在问题(我将使用dirname显示该超链接)
这是我需要帮助的示例.
dir_name是目录名称
$url = system(~'ls -d /home/myapps/rel/".$dir_name"');
echo $url;(this does not work)
if(preg_match("/No such/",$url)) {
echo'Ther is no match'
}
else{
}
Run Code Online (Sandbox Code Playgroud)
在我的代码中,永远不会执行if块.(如果目录不存在,它应该执行);(
我实现了懒人加载图像ListView.我使用a AsyncTask从Internet下载图像并将其绑定到UIThread中的ImageView.
它的工作原理除外,当我ListView快速滚动变化时,下载的图像有时被绑定到列表中的错误项目中.
我想这个问题是从重用convertView的BaseAdapter.有什么想法可以解决吗?
非常感谢.
编辑:我发布的答案如下:
public void setBitmap(int position, Bitmap image) {
View itemView = mListView.getChildAt(position - mListView.getFirstVisiblePosition());
if (itemView != null) {
ImageView itemImageView = (ImageView) itemView.findViewById(R.id.item_imageview);
itemImageView.setImageBitmap(image);
}
}
Run Code Online (Sandbox Code Playgroud) 我正在开发一个基于Spring(MVC),Hibernate,PostgreSQL(使用Maven)的Web项目.现在我正在尝试让一个新客户在应用程序的几个部分中需要一些差异.我已经阅读了Sonatype的Maven权威指南来了解多模块Maven项目,但我最重要的问题之一还没有得到解答:如何在几个模块/项目上共享通用视图组件并根据它们进行集成对我想建立的客户?服务层非常清楚但我无法弄清楚如何共享jsp/jspf文件并在构建特定客户模块时将它们与自定义文件合并(然后依赖于通用模块).
您将如何避免仅仅克隆常用代码?
我目前正在使用带有此标记的javascript
<body onload="javascript:Mine();">
Run Code Online (Sandbox Code Playgroud)
现在我注意到打开页面后加载此功能需要一些时间.所以还有其他方法可以减少这种延迟吗?
谢谢
如何检查VB 6.0中的对象类型我们必须修改现有代码以使用'typeof'方法,是否有任何方法,如将光标移动到对象变量或快速监视,我可以看到它的类型.
我知道以下方法,但我不想使用它 -
Set fs = New Scripting.FileSystemObject
If TypeOf fs Is Scripting.FileSystemObject Then
Debug.Print "Is a FileSystemObject"
End If
Run Code Online (Sandbox Code Playgroud) 我在android中有一个EditText,我希望用户输入文本并检查条件"BYE"
代码示例:
EditText text = (EditText)findViewById(R.id.EditText01);
String abc= text .getText().toString();
while( !(abc).equals("bye")){
abc = text.getText().toString();//user should enter the text from keyboard and the while loop should go and chech the condition.but not able to enter the text
//do some operation with abc
}
Run Code Online (Sandbox Code Playgroud)
如何让用户输入文本?UI应该等待输入文本(类似于我们在java应用程序中有InputStreamReader).
我正在寻找一个我们可以在循环中使用的函数来执行此操作:
<% for rink in @rinks_in_region %>
<%= rink.city #Show Only if city (n-1) != n %>
<%= link_to_rink(rink.name+" Ice Rink",rink) %>
<br>
<% end -%>
Run Code Online (Sandbox Code Playgroud)
基本上只有当它与前一个城市不同时才显示该城市.
合理?谢谢你的帮助!
Alextoul
android ×2
for-loop ×1
gem ×1
granularity ×1
html ×1
iphone ×1
java ×1
javascript ×1
lazy-loading ×1
loops ×1
maven-2 ×1
php ×1
ruby ×1
rvm ×1
spring ×1
terminology ×1
vb6 ×1
viewdidload ×1