public class Test {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
StringBuffer sb = new StringBuffer();
sb.insert(0, "/leaf4");
sb.insert(0, "/leaf3");
sb.insert(0, "/leaf2");
sb.insert(0, "/leaf1");
sb.insert(0, "/root");
System.out.println(sb) ;
System.out.println(new Test().getResourcePath("10010101"));
}
public String getResourcePath(String resourceid){
// Dto dto = new BaseDto();
String _resourceid = null ;
StringBuffer path = new StringBuffer() ;
_resourceid = resourceid ;
int testid = 1 ;
while(_resourceid!="01"){
// dto = (BaseDto) g4Dao.queryForObject("Rms.queryEaResourceByResourceID", _resourceid );
// _resourceid = dto.getAsString("resourceid") ;
_resourceid = getResource(testid) ;
if(path!=null && path.length()!=0)
path = path.insert(0,"/").insert(0, _resourceid);
testid++ ;
}
return path.insert(0,"/").toString() ;
}
public String getResource(int resourceid){
switch(resourceid){
case 1:
return "10010101" ;
case 2:
return "100101" ;
case 3:
return "1001" ;
case 4:
return "01" ;
}
return "01" ;
}
}
分享到:
相关推荐
// Work out the offset of the drag point from the TreePath bounding // rectangle origin Rectangle raPath = getPathBounds(path); Point ptDragOrigin = e.getDragOrigin(); ptOffset.setLocation...
setget 出口 const 信号 文字 @“ NodePath / StringName” $ node和$“ ../ node” 经营者 是 如 关键字陈述 断点 可变属性 现成的 这些可以在“导出”之后或在“ var”之前 远程[同步] 主[同步] ...
可以解决多个数据集重名问题,规范化数据集内的文件名。 YOLO数据集VOC数据集用UUID重命名图片和xml文件,包含... root = tree.getroot() # print(root) # 2、读取节点内容 Events_object = root.find("folder")
$zip->addTree( "$get_name/$j", "$j", sub { /.*/ } ); my $status = $zip->writeToFileNamed("$get_name/$j.zip"); if ( $status == AZ_OK ) { copy( "$get_name/$j.zip", "$topath/$j.zip" ); if ( -e "$to...
前言 我们在日常开发中,经常会遇到一些关于文件的操作,例如,实现查看目录内容的功能。类似Linux下的tree命令。统计目录下指定后缀文件的行数。... Get file list under path. Like 'tree' :param path Root dir :p
获取列表项路径 ... 使用 克隆并要求 getListItemPath = require('getListItemPath');... var firstPathString = getListItemPath(tree, $(selected).first(), undefined, joinPathBy)); var allPathsString = ge
$ npm i get-all-files 用法 import getAllFiles from 'get-all-files' // Get array of filenames synchronously console . log ( getAllFiles . sync . array ( `path/to/dir/or/file` ) ) // Lazily iterate...
TREE get_from_queue(); //将离目的地估计最近的方案出队列 void freetree();//释放申请过的所有节点 int judge(int x,int y);//估价函数,估价x,y到目的地的距离,估计值必须保证比实际值小 int trytile...
directed graphs, spanning tree, and shortest path Explore algorithm efficiency and see how to measure it In Detail Apple’s Swift language has expressive features that are familiar to those working ...
function Get_node_path(node: TTreeNode): string; function ExtractTreeViewFileName(RootPath: string; TreeView: TTreeView): string; /// /// Node.Selected := true; Node.Focused := true; /// /// /// ...
Get to know about the data structures used in graphs and how to implement graphs such as depth-first search, breadth-first search, directed graphs, spanning tree, and shortest path Explore algorithm ...
Path to Get All Keys 深度优先搜索 996. Number of Squareful Arrays 拓扑排序 269. Alien Dictionary 单调栈 42. Trapping Rain Water 85. Maximal Rectangle Monotonic stack for 2d array 239. Sliding Window ...
1、Splitting path 20 2、Ask message box 20 3、unicode 文件读写 21 4、进程启动与停止 22 5、stlstring与cstring之间的转换 31 6、成员函数和成员变量指针 32 三、宏: 33 1、Debug 33 2、Macro 35 3、宏的用法 ...
We can search this tree to get the solution for this problem. 2.Experimental Purpose (1)Understand the Tree Search algorithm. (2)Learn the solution expression of some problems by A Tree data ...
match super::parse_json(json) { Ok(tree) => { // // Get value at path // let res = tree.value_at(&[PathType::Object("a")]); // [Entry { key: Some(0), range: Range { start: Position { line: 0, char: 7,...
RecordName,IP,Port,User,Password,Domain,ColorDepth,Updates,UnlockDesktop,Fullscreen,Nofullkbcontrol,Monitor,Sendrequest,Pbpath,Proxy,AsProxyBy,Memory,TreePath sample01,192.168.0.6,4899,user01,,,,,,,...
RecordName,IP,Port,User,Password,Domain,ColorDepth,Updates,UnlockDesktop,Fullscreen,Nofullkbcontrol,Monitor,Sendrequest,Pbpath,Proxy,AsProxyBy,Memory,TreePath sample01,192.168.0.6,4899,user01,,,,,,,...
Also, you can always get necessary help information by F1 or using special Help control. Internal free ...
Also, you can always get necessary help information by F1 or using special Help control. Internal free ...