我最近升级到Lion,一切都很好.甚至重启机器几次.然后在周末,Rails走了!我的所有宝石都没了.我发誓我不知道发生了什么.它工作得很好.
仔细观察后,RVM本身就消失了.
所以,我重新安装RVM并尝试安装Ruby 1.9.2并得到此错误日志:
[2011-08-08 14:30:41] ./configure --prefix="/Users/cbmeeks/.rvm/usr"
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... config/install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... no
checking for gcc... /usr/bin/gcc-4.2
checking whether the C compiler works... no
configure: error: in `/Users/cbmeeks/.rvm/src/yaml-0.1.4':
configure: error: C compiler cannot create executables
See `config.log' for …Run Code Online (Sandbox Code Playgroud) 目前我只是在一个使用java字节码的项目中.我经常看到,当创建一个新的类实例并在其上调用一个方法时,字节码将是:
NEW <MyClass>
DUP
INVOKESPECIAL <MyClass.<init>>
Run Code Online (Sandbox Code Playgroud)
这里为什么要做"DUP"?从VM Spec,我得到描述"在操作数堆栈上复制顶部值并将重复的值推送到操作数堆栈".但是为什么在这里需要复制操作数堆栈的最高值呢?谢谢.
所以我有以下内容:
public interface MyService {
@PreAuthorize("hasPermission(T(Name).OBJ, T(Action).GET)")
MyObj getObj(String id);
}
Run Code Online (Sandbox Code Playgroud)
@Service
public class MyServiceImpl implements MyService {
@Override
@Transactional
public MyObj getObj(String id){
return dao.get(id);
}
}
Run Code Online (Sandbox Code Playgroud)
@Controller
public class MyController {
@Resource(name="myServiceImpl")
private MyService service;
public MyObj getObj(String id){
return service.getObj(id);
}
}
Run Code Online (Sandbox Code Playgroud)
getObj(id)调用该方法时,首先将所有内容包装在事务中,然后检查授权.是否可以保留此配置并首先让Spring检查授权,然后在用户获得授权的情况下创建事务?
我花了很多钱寻找答案,找不到任何东西.
function foo(a, opt_b) {
opt_b = opt_b || 1;
...
}
foo(1); // IntelliJ will yell at me, saying "Invalid number of parameters, expected 2"
Run Code Online (Sandbox Code Playgroud)
有没有办法记录foo()IntelliJ不会对我大喊大叫?
我已经创建了spring数据JPA示例项目.我用eclips这个.有两个项目,一个是域对象项目,它只有注释的实体类.其他项目是实际的spring数据jpa项目,它对项目有依赖性.实际上它通过maven依赖获取域项目实体类.
项目1:hrm-domain
实体类:
package com.hrm.ws.data.domain;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;
import javax.persistence.Table;
@Entity(name = "Employee")
@Table(name = "employee")
@Inheritance(strategy = InheritanceType.JOINED)
public class Employee {
protected long id;
protected String firstName;
protected String lastName;
/**
* Gets the value of the id property.
*
*/
@Id
@Column(name = "id", scale = 0)
@GeneratedValue(strategy = GenerationType.AUTO)
public long getId() {
return id;
}
Run Code Online (Sandbox Code Playgroud)
项目2:hrm-ws-service
持久性-的context.xml
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans" …Run Code Online (Sandbox Code Playgroud) 根据此页面在突出显示的用法之间导航:

可以使用F3或Ctrl+ L和Shift+ F3或Ctrl+ Shift+ L键盘快捷键完成,分别导航到下一个和上一个使用.
但是,这些快捷方式默认用于在搜索出现(Ctrl+ F)之间导航,而不是突出显示的用法,实际上这就是它们的工作方式.有没有其他方法可以使用键盘在突出显示的用法之间导航?
我正在运行Aptana Studio 3,版本:3.1.3.201205292243,Win7 64bit,我注意到在上次更新后,Aptana警告我(垂直注释)我应该"修剪空"标签,但这些是正常的脚本标记链接外部js文件,如下所示:
<!-- Replace favicon.ico & apple-touch-icon.png in the root of your domain and delete these references -->
<link rel="shortcut icon" href="/favicon.ico" />
<link rel="apple-touch-icon" href="/apple-touch-icon.png" />
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script src="js/jquery.lightbox-0.5.js"></script>
<script src="js/flickrapi3.js"></script>
<link rel="stylesheet" href="css/jquery.lightbox-0.5.css" />
<link rel="stylesheet" href="css/flickrStyle.css" />
Run Code Online (Sandbox Code Playgroud)
此外,它还警告我链接标记中的rel属性具有"无效值",但这些是HTML5模板Aptana捆绑包中包含的默认值.
我已经检查了首选项>编辑器>文本编辑器,我看到了注释设置,但是我看不出在哪里可以完全解决这些问题.我完全错过了什么吗?这些已知的错误?我该如何纠正这些问题?
我正在使用休眠.它的id列有20个精度,如下所示,但是NUMBER类型.
NUMBER(38,20) - 这是表(id数据库)的id列的大小.
此ID由我们的应用程序生成.在实体中如果我使用Float或Double它不能容纳20个精度.但java.math.BigDecimal可以容纳这些许多精度.但问题是我可以在hbm中使用BigDecimal,如下所示?会有什么问题吗?有时我可能不会发送精确的id.那个时候会休眠生成任何空的精度和插入?
<id name="someId" column="SOME_ID" type="java.math.BigDecimal"/>
Run Code Online (Sandbox Code Playgroud)
请指教!
我是Spring的新手,并且遇到了包含一个Web模块的多个模块的单个项目.Web模块使用Spring MVC,但我想知道我是否可以在项目级别拥有主要的Spring配置来处理整个项目,这样我就可以充分利用Spring框架.
main
-module1
-module2
-web
+spring3.1, spring-security
Run Code Online (Sandbox Code Playgroud)
这种情况的最佳设置是什么?
我想实现任意Seq[T]和返回的方法Seq[T].但是什么时候String提供它也应该返回String.
路过String由于一些隐式转换,从作品String到WrappedString extends IndexedSeq[Char],但我得到Seq[Char]的回报.有可能String回来吗?
val sx: Seq[Int] = firstAndLast(List(1, 2, 3, 4))
val s1: Seq[Char] = firstAndLast("Foo Bar")
val s2: String = firstAndLast("Foo Bar") //incompatible types error
def firstAndLast[T](seq: Seq[T]) = Seq(seq.head, seq.last)
Run Code Online (Sandbox Code Playgroud)
firstAndLast() 实现是无关紧要的,它只是一个例子.
java ×3
spring ×3
aptana ×1
aptana3 ×1
bigdecimal ×1
bytecode ×1
entity ×1
hibernate ×1
javascript ×1
jpa ×1
osx-lion ×1
primary-key ×1
ruby ×1
rvm ×1
scala ×1
spring-mvc ×1