Web.xml to Freemind conversion
10
Java properties files can yield undesirable results at runtime, if there happen to be spaces at the end of some lines.
Requires a win32 port for the GNU utilities grep and sed - e.g. http://unxutils.sourceforge.net/.
Requires a win32 port for the GNU utilities grep and sed - e.g. http://unxutils.sourceforge.net/.
10
Format Bytes
9
This is a very convenient way to remove all doubles from a List in Java. The only prerequisite is that the elements in the list have proper equals and hashCode methods.
It work by using the constructor of a Set that takes a Collection as an argument.
I poured the snippet in a little program so can run it straight away.
It work by using the constructor of a Set that takes a Collection as an argument.
I poured the snippet in a little program so can run it straight away.
9
Log4J is a really nice Library that aims to facilitate outputting debugging information, but also relevant data, in Java applications. It is highly configurable, using both Categories and Class-Based rules, so that developers can narrow down the problems very well when debugging applications.
9
Do you find yourself implementing toString on your objects all the time, and wondering why (the debugger seems to do a pretty good job of it all by itself)...well, here's a bit of introspection applied to the problem. This is for all those quick debug sessions where you just want to do System.out.println(myComplexObject).
Instead, just do System.out.println(DebugPrint.toString(myComplexObject));
Instead, just do System.out.println(DebugPrint.toString(myComplexObject));
9
With Java Web Start 1.5.0 all of a sudden new proxy properties were introduced (deployment.proxy.http.host, deployment.proxy.http.port and deployment.proxy.bypass.list) valid only for the webstart environment - and if that was not enough yet, it does not support the existing proxy properties, neither the standard, nor the deprecated ones from old Java releases. To topple even that, for the bypass-list the delimiters were changed to semicolon (http.nonProxyHosts has the pipe char as delimiter) ...
standard networking properties
the workaround here makes sure, that if any one of these proxy properties (deprecated, standard or webstart-5 ones) are set, that all the others get the same settings - this pays off, if you're using different third-party components relying on one specific set of these proxy properties (especially if it's beyond your power, in what kind of environment the software will be executed respectively integrated...)
standard networking properties
the workaround here makes sure, that if any one of these proxy properties (deprecated, standard or webstart-5 ones) are set, that all the others get the same settings - this pays off, if you're using different third-party components relying on one specific set of these proxy properties (especially if it's beyond your power, in what kind of environment the software will be executed respectively integrated...)
9
What is Dijkstra Algorithm? click on the link above and first understand what the algorithm is all about. in short it calculates the shortest path from A to F or vise versa. This code i can guarantee is the simplest and easiest code to understand. just search on google and try to compare this code and other dijkstra code and you will see what i am talking about. i spent alot of time myself and my instructor to guide me on the rite path.
http://en.wikipedia.org/wiki/Dijkstra%27s_algorithm(Description)
to see how the algorithm really works go on this website it tells you step by step how to update the cost and which path to choose.
http://renaud.waldura.com/doc/java/dijkstra/
Please give some time to understand the algorithm first and then you can see my code. if you done understand the algorithm it is very useless. i know alot of people need Dijkstra algorithm in java for their HW assignment or Test. i am giving you the solution step by step. anyone who wants to understand please go to the url i have posted above and once you have understand then run the code and for those people who just want to copy so that they can get 90% in their test No Problem Here it is
.
First open a notepad and name that file anything like data.txt or datas.txt and make sure the file looks something like this and in this format.
0 3 100 5 100 100 (100 represents infinity)
3 0 6 7 7 100
100 6 0 5 5 3
5 7 5 0 1 100
100 7 5 1 0 2
100 100 3 100 2 0
i name this file as a data.txt file. i have 6 nodes. and A is always the starting node which has the cost of 0 so by looking at the first line i
know that A to A have distance 0, A to B is 3, A to c is Infinity, A to D is 5, A to E is Infinity(means no edge connected with A), A to F is Infinity.
for second line(B to A is 3, and then vise versa) and for the 3rd line it starts for C and etc..
save the txt file by any name and then copy the code which i have posted and then to run type this:
javac routing.java
java routing data.txt
you will get the output. i will say this one more time understand how the algorithm works or ......................
http://en.wikipedia.org/wiki/Dijkstra%27s_algorithm(Description)
to see how the algorithm really works go on this website it tells you step by step how to update the cost and which path to choose.
http://renaud.waldura.com/doc/java/dijkstra/
Please give some time to understand the algorithm first and then you can see my code. if you done understand the algorithm it is very useless. i know alot of people need Dijkstra algorithm in java for their HW assignment or Test. i am giving you the solution step by step. anyone who wants to understand please go to the url i have posted above and once you have understand then run the code and for those people who just want to copy so that they can get 90% in their test No Problem Here it is
.First open a notepad and name that file anything like data.txt or datas.txt and make sure the file looks something like this and in this format.
0 3 100 5 100 100 (100 represents infinity)
3 0 6 7 7 100
100 6 0 5 5 3
5 7 5 0 1 100
100 7 5 1 0 2
100 100 3 100 2 0
i name this file as a data.txt file. i have 6 nodes. and A is always the starting node which has the cost of 0 so by looking at the first line i
know that A to A have distance 0, A to B is 3, A to c is Infinity, A to D is 5, A to E is Infinity(means no edge connected with A), A to F is Infinity.
for second line(B to A is 3, and then vise versa) and for the 3rd line it starts for C and etc..
save the txt file by any name and then copy the code which i have posted and then to run type this:
javac routing.java
java routing data.txt
you will get the output. i will say this one more time understand how the algorithm works or ......................
9
A utility class that gets the MD5 hash of an input stream. Also includes a method for converting byte array to hex-formatted string.
9
Copy a file to a new location, optionally marking the file as a temporary file (to be deleted on application exit).
Note there are issues for temporary files - not all the parent directories that might be created are guaranteed to be deleted - only the immediate parent directory will be deleted on exit if created. Other higher-level directories will not be deleted, even if the file is marked as temporary.
Note there are issues for temporary files - not all the parent directories that might be created are guaranteed to be deleted - only the immediate parent directory will be deleted on exit if created. Other higher-level directories will not be deleted, even if the file is marked as temporary.
9
Fixed the regular expression to check for more strict requirements.









