Hi have this j2ee web application developed using spring framework. I have a problem with rendering mnessages in nihongo characters from the properties file. I tried converting the file to ascii using ...
I m gonna以实例说明了这一点:
A - B - D
|
C
当代码上到C号时,它发现没有其他过错:v=<-1/code>。 当时的情况是,它清楚了C,回到B。 这非常好。 但是,在B,我们只知道我们来自什么地方(斜体包含<条码>[A,B]条码>)。 现在,它发现第一个未受注意的阴道,但是这又一次。
当你从C到B去时,你需要找到下游。 你们需要按顺序列出所有邻近地区。
int getNextAdjVertex(int currentVertex,int vertexICameFrom) {
return the first vertex adjacent to currentVertex, bigger than vertexICameFrom
or -1 if it does not exist
}
if (v == -1) {
vertexList[lastVisited].wasVisited = false;
System.out.println("Go back to: " + theStack.peek());
//going down in the right direction:
int backTo = theStack.peek();
int newDestination = getNextAdjVertex(backTo,lastVisited);
//now same as the else part, a step downward
vertexList[newDestination].wasVisited = true;
lastVisited = newDestination;
System.out.println("Visited: " + newDestination);
theStack.push(newDestination);
}
只有一个小问题,如果<代码>新版>=-1,你需要再增加一个层次。 你们不得不在一间休息室里这样做,直到有一个没有见的vert。
我认为,问题在于获得NextAdjVertex。
System.out.println("Go back to: " + theStack.peek()+","+lastVisited);
在发现这一问题时,将提供更多有用的信息。 但我认为,这项工作应当做到:
public int getNextAdjVertex(int currentVertex, int vertexICameFrom) {
for (int j = vertexICameFrom+1; j < nVerts; j++) {
if (adjMat[currentVertex][j] == 1 && !vertexList[j].wasVisited) {
return j;
}
}
return -1;
}
Check this, List<String> list = new ArrayList<String>(); for (int i = 0; i < 10000; i++) { String value = (""+UUID.randomUUID().getLeastSignificantBits()).substring(3, ...
I am in the middle of solving a problem where I think it s best suited for a decorator and a state pattern. The high level setting is something like a sandwich maker and dispenser, where I have a set ...
I have been trying to execute a MS SQL Server stored procedure via JDBC today and have been unsuccessful thus far. The stored procedure has 1 input and 1 output parameter. With every combination I ...
I have a system which contains multiple applications connected together using JMS and Spring Integration. Messages get sent along a chain of applications. [App A] -> [App B] -> [App C] We set a ...
If I m given two Java Libraries in Jar format, 1 having no bells and whistles, and the other having lots of them that will mostly go unused.... my question is: How will the larger, mostly unused ...
I have a Class variable that holds a certain type and I need to get a variable that holds the corresponding array class. The best I could come up with is this: Class arrayOfFooClass = java.lang....
I m working on a Java desktop application that reads and writes from/to different files. I think a better solution would be to replace the file system by a SQLite database. How hard is it to migrate ...
- winforms
- combobox
- fogbugz
- java
- date
- internationalization
- asp.net
- iis
- url-rewriting
- urlrewriter
- c#
- enums
- ocaml
- haxe
- algorithm
- string
- viewstate
- .net
- c++
- c
- symbol-table
- mysql
- database
- postgresql
- licensing
- migration
- vb.net
- vb6
- declaration
- vb6-migration
- python
- psycopg2
- backup
- vmware
- virtualization
- gnu-screen
- authentication
- desktop
- excel
- xll
- cultureinfo
- regioninfo
- oracle
- client
- session
- download
- html
- virtual
- constructor
- scenarios
- perl
- full-text-search
- javascript
- ajax
- testing
- oop
- inheritance
- vim
- encapsulation
- information-hiding