在我的应用程序中我使用以下方法读取文件,
public void readFIleData(String path) {
BufferedReader br = null;
try {
String sCurrentLine;
br = new BufferedReader(new FileReader(path));
while ((sCurrentLine = br.readLine()) != null) {
System.out.println("Data : "+sCurrentLine);
}
} catch (IOException e) {
e.printStackTrace();
} finally {
try {
if (br != null)br.close();
} catch (IOException ex) {
ex.printStackTrace();
}
}
}
Run Code Online (Sandbox Code Playgroud)
我还使用以下方法获取文件的上次访问时间和上次修改时间,
public void getFIleInfo(String path) {
Path file = Paths.get(path);
try {
BasicFileAttributes attrs = Files.readAttributes(file, BasicFileAttributes.class);
FileTime accessTime = attrs.lastAccessTime();
System.out.println("accessTime : "+accessTime.toMillis());
FileTime modifiedTime …Run Code Online (Sandbox Code Playgroud) 我想如何找到无关的属性,虽然我读了许多我无法理解的文章.他们中的许多人给出了无关属性的定义.我从Abraham Silberschatz,Henry F. Korth,S的书籍数据库系统概念中找到了两个例子.苏达.
但我无法理解这两个因为他们没有给出任何解释.任何人都可以解释如何找到无关的属性吗?
我的Neo4j DB中有一个像节点结构的树。删除特定节点时,我要删除所有子节点以及与该节点相关的关系。考虑以下查询生成的节点结构,
merge (p1:Person{nic:'22222v'})-[r1:R1]->(p2:Person{nic:'33333v'})
merge(p1)-[r2:R2]->(p3:Person{nic:'44444v'})
merge(p2)-[r3:R3]->(p3)
merge (p3)-[r4:R4]->(p4:Person{nic:'55555v'})
merge(p4)-[r5:R5]->(p5:Person{nic:'66666v'})
return r1,r2,r3,r4,r5
Run Code Online (Sandbox Code Playgroud)
如果我输入节点(nic:44444v),则应删除节点(nic:44444v),节点(nic:55555v),节点(nic:66666v),关系(r2),关系(r3),关系(r4)和关系( r5)