如果我在使用Maven在IntelliJ中构建我的项目时从应用服务器获得PermGen OutOfMemoryError,那么Maven使用的堆应该增加吗?我使用Win7,8GB RAM,当我用maven重建项目时,我从appserver获得了PermGen.
我有这个问题,我得到了很多MSI日志文件(文件名格式是MSIxxxx.LOG,其中xxxx对应于一些随机字符序列,如"MSI974b5.LOG").这些日志文件存储在Windows/Temp目录中.我应该提一下,我几乎不了解MSI日志文件或它们的用途(关于测试.msi安装程序文件的内容?).
我已经尝试过Microsoft支持文章来禁用MSI日志记录,但我仍然在Windows/Temp目录中获取MSI日志文件.我注意到的一件事是,所有MSI文件都在日志文件中的某处提到"Visual Studio 12.0",但除此之外,我不明白生成这些日志文件的内容或如何阻止它们生成.
我不确定这是否相关,但我最近安装了Visual Studio 2013,但我不记得在安装过程中启用任何MSI日志记录.
我知道Hashtable不允许空值,因为它是遗留的,由HashMap修复.由于排序是个问题,因此树中不允许为空.但是为什么我们在ArrayDeque中不允许null?
Java 8将于本周发布.当使用neo4j 1.9和Java 7时,我们看到警告突然出现,只支持6个,但我们从未对1.9/7组合有任何问题.
我知道neo4j 2不能使用比Java 7更少的东西,但是在Java 8上运行neo4j 2有什么限制吗?
我正试图让Spring启动让浏览器缓存静态资源.我的资源位于"静态"下的类路径中.当我查看发回的标头时,我看到修改标头设置正常,但不知何故,标题"Cache-Control:no-store"也被添加.
HTTP/1.1 200
Last-Modified: Wed, 24 Aug 2016 08:50:16 GMT
Cache-Control: no-store
Accept-Ranges: bytes
Content-Type: text/css
Content-Length: 434554
Date: Wed, 24 Aug 2016 09:42:42 GMT
Run Code Online (Sandbox Code Playgroud)
我已经看到了这个答案如何在Spring Boot中启用HTTP响应缓存,但这似乎并不适用于我,因为我没有使用spring-security,它不在类路径上.
我正在使用带有百里香的spring-boot 1.4.0.
那么,如何让spring boot不包含Cache-Control头?
我正在使用ngxs进行角度状态处理,并且尝试将组件作为单位进行测试,因此最好仅使用模拟存储,状态等进行测试。
我们组件中的内容类似于:
export class SelectPlatformComponent {
@Select(PlatformListState) platformList$: Observable<PlatformListStateModel>;
constructor(private store: Store, private fb: FormBuilder) {
this.createForm();
this.selectPlatform();
}
createForm() {
this.selectPlatformForm = this.fb.group({
platform: null,
});
}
selectPlatform() {
const platformControl = this.selectPlatformForm.get('platform');
platformControl.valueChanges.forEach(
(value: Platform) => {
console.log("select platform " + value);
this.store.dispatch(new PlatformSelected(value));
}
);
}
}
Run Code Online (Sandbox Code Playgroud)
我们的灯具设置如下所示,因此我们可以在商店中检查通话:
describe('SelectPlatformComponent', () => {
let component: SelectPlatformComponent;
let fixture: ComponentFixture<SelectPlatformComponent>;
let store: Store;
beforeEach(async(() => {
const storeSpy = jasmine.createSpyObj('Store', ['dispatch']);
TestBed.configureTestingModule({
imports: [ReactiveFormsModule],
declarations: [SelectPlatformComponent],
providers: [{provide: Store, …Run Code Online (Sandbox Code Playgroud) 我是OrientDB的新手,所以我只想插入一个文件来修补它.我检查了一些文档并写了这个:
public static void main(String[] args) {
ODatabaseDocumentTx db = ODatabaseDocumentPool.global().acquire("remote:localhost/petshop", "admin", "admin");
try {
db.begin(OTransaction.TXTYPE.OPTIMISTIC);
ODocument animal = new ODocument("Animal");
animal.field( "name", "Gaudi" );
animal.field( "location", "Madrid" );
animal.save();
db.commit();
} finally {
db.close();
}
}
Run Code Online (Sandbox Code Playgroud)
现在文档被插入,我可以从控制台检查,但是这个程序只挂起在db.commit();
这是它挂起的主题:
"main@1" prio=5 tid=0x1 nid=NA runnable
java.lang.Thread.State: RUNNABLE
at java.net.SocketInputStream.socketRead0(SocketInputStream.java:-1)
at java.net.SocketInputStream.read(SocketInputStream.java:152)
at java.net.SocketInputStream.read(SocketInputStream.java:122)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:235)
at java.io.BufferedInputStream.read(BufferedInputStream.java:254)
- locked <0x4ff> (a java.io.BufferedInputStream)
at java.io.DataInputStream.readInt(DataInputStream.java:387)
at com.orientechnologies.orient.enterprise.channel.binary.OChannelBinary.readInt(OChannelBinary.java:99)
at com.orientechnologies.orient.client.remote.OStorageRemote.readCollectionChanges(OStorageRemote.java:1895)
at com.orientechnologies.orient.client.remote.OStorageRemote.commit(OStorageRemote.java:1099)
at com.orientechnologies.orient.client.remote.OStorageRemoteThread.commit(OStorageRemoteThread.java:456)
at com.orientechnologies.orient.core.tx.OTransactionOptimistic.doCommit(OTransactionOptimistic.java:119)
at com.orientechnologies.orient.core.tx.OTransactionOptimistic.commit(OTransactionOptimistic.java:105)
at com.orientechnologies.orient.core.db.record.ODatabaseRecordTx.commit(ODatabaseRecordTx.java:142)
at com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.commit(ODatabaseDocumentTx.java:504)
at …Run Code Online (Sandbox Code Playgroud) 我的项目我们一直在寻找提高密码查询速度的方法.因此,当neo4j在查询中使用索引时,我们希望利用这一优势.新的neo4j 2.1.2发行说明指出:
"Cypher使用索引来解析使用IN运算符的WHERE子句"
但没有给出进一步的解释.任何人都可以给出这样一个查询的例子吗?
我在这里有一段代码用java中的SQL日期类型来计算某人的年龄.代码工作正常,但是你在这里粘贴的代码中看不到它,但是在我的netbeans环境中,get方法被删除了,但只在这一行:
LocalDate datumDB = LocalDate.of(gbdat.getYear() + 1900, gbdat.getMonth() + 1,
gbdat.getDate());
Run Code Online (Sandbox Code Playgroud)
有人知道为什么?
这条线没有划掉:
int leeftijd = datumVanVandaag.getYear() - datumDB.getYear();
Run Code Online (Sandbox Code Playgroud)
这是我的代码:
private void checkSpelerGeschiktVoorPloeg(Persoon p) {
Date gbdat = p.getGbDatum();
LocalDate datumVanVandaag = LocalDate.now();
LocalDate datumDB = LocalDate.of(gbdat.getYear() + 1900, gbdat.getMonth() + 1, gbdat.getDate());
int leeftijd = datumVanVandaag.getYear() - datumDB.getYear();
}
Run Code Online (Sandbox Code Playgroud) 我想查询具有特定属性的文档.
我尝试了以下方法:
select * from Foo where not bar is null
Run Code Online (Sandbox Code Playgroud)
但即使他们没有这个属性,这也会将文件返回给我.即使它会起作用,如果存在以null作为值的属性,也会产生错误的结果(不知道orientdb是这样工作的).
有没有办法通过sql检查属性的存在?
java ×4
neo4j ×2
orientdb ×2
angular ×1
caching ×1
compilation ×1
gigaspaces ×1
jasmine ×1
logging ×1
maven ×1
ngxs ×1
spring ×1
spring-boot ×1
spring-mvc ×1
sql ×1