file or folder exists
8
Use this utility to grab lines from a file. Arguments are the input file, starting ling number and ending line number.
4
This was an update someone else's snippet...
VBScript is a graceful language and Windows Scripting Host cleans up after itself, so this is a compact version for simple usage - reducing code bloat is what small scripts are for.
Just my $.02...
VBScript is a graceful language and Windows Scripting Host cleans up after itself, so this is a compact version for simple usage - reducing code bloat is what small scripts are for.
Just my $.02...
9
This script demonstrates the user of a procedure that forces the currently executing script to execute under the WScript scripting host. This forces the output from WScript.Echo statements to be displayed message box dialog. This functionality may be useful in situations where the default scripting host is set to cscript.exe and/or the programmer uses a common set of code to program for wscript.exe and cscript.exe.
Typical usage would see the ForceWScript procedure called at the beginning of a script.
Typical usage would see the ForceWScript procedure called at the beginning of a script.
7
This script demonstrates the user of a procedure that forces the currently executing script to execute under the CScript scripting host. This allows the output from WScript.Echo statements to be displayed in a command prompt dialog in a similar way to older style batch files, making this procedure ideal for batch processing.
Typical usage would see the ForceCScript procedure called at the beginning of a script.
Typical usage would see the ForceCScript procedure called at the beginning of a script.
8
This function simply splits a file based on the splitter supplied and returns an array with the values. It's pretty much like the file() function. This script could be helpful in section editings.
4
This is a quick and dirty function for preventing SQL Injection, the function is designed to clean any variable that will be concatenated into an SQL query. Apostrophes and Double-Quotes are changed to entities in order to ensure that encoding does not become an issue when the content is pulled back into a page. I'm looking for criticism here, I want to know if this is secure or not.
-2
Checks whether a node exists or not. Not sure about cross browser compatibility though.
8
Customizable recursive directory scanner.
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
This script demonstrates the use of a function that allows a script to delete itself from disk. The function can be called from anywhere within the script and the script will continue to function normally (assuming the script does not further attempt to access itself on disk). Handy for homebrew uninstallation programs that require the removal of all installation files, including the setup file.









