| 01/07/2015 Learn a little more about Java World each day, with www.Planet-Source-Code.com's Code of the Day! Current # of subscribers: 10,355 |
Make 9 cents to $300 per game playing Dollar Candy. The better you get, the more you make. Click for more info.
=================================================================
Would you like access to thousands of lines of source code instantly from your desktop? Then check out the Planet Source Code CD...hundreds of amazing programs at your fingertips with no online wait!
Click Here!
Code of the Day: (What is the code of the day? )
1) CsvAllInOne
Submissions Since Yesterday:
2) CsvAllInOne
3) SecureLogin
1)CsvAllInOne
Category: String Manipulation
Level: Beginner
Description: Application Name: CsvAllInOne Implemented By: codebyter Released on: 04/01/2015 Brief Description: A class that allows to parse, analyze and convert text files in tab delimited or csv format. The output can be directed to the screen, to a file or to an Excel-like grid in which the data can be modified and exported again to a file Assumptions: the input could be a .txt file (field separated by tabs) or a .csv file in which the separator could be either the comma or the semicolon. The parseLine that carries over all the stuff assumes that lines containing the separator should be inclused in double quotes("); if the lines contains a double quote, it is quoted and the double quotes inside are repeated twice. The routine can process also records split across several lines in the file providing that the lines are subsequent and the last field in the first split line is quoted. For further info please refer to: http://it.wikipedia.org/wiki/Comma-separated_values Details: 1. Separator is not fixed, but can be set (must be one char only) 2. Output file is created from the input file adding the prefix suffix "_output" The extension is .txt 3. The public method parse convert a .csv file directing the output to the screen, to a file or to the grid (decided with the setOutputType method) 4. The public method analyze check the .csv file directing the output log to the screen, to a file or to the grid (decided with the setOutputType method) 5. The information displayed in the log can be set using the log scope 6. There are method to provide info about the file such as the rows number (including or excluding the record split on several lines), the max # of cols, the cols in the first line etc. 7 I have added a set of routines to perform the converions between different formats i.e. from .txt to .csv and from .txt to a file with a generic separator respecting the assumptions listed above. The same conversions from a .csv file are also possible. 8. In the main method it is included a small test with several sub-menus to fix the parameters and perform the actions
Compatibility: Java (JDK 1.5)
Submitted on 1/6/2015 4:38:42 AM and accessed 20 times.
Back to Top
2)CsvAllInOne
Category: String Manipulation
Level: Beginner
Description: Application Name: CsvAllInOne Implemented By: codebyter Released on: 04/01/2015 Brief Description: A class that allows to parse, analyze and convert text files in tab delimited or csv format. The output can be directed to the screen, to a file or to an Excel-like grid in which the data can be modified and exported again to a file Assumptions: the input could be a .txt file (field separated by tabs) or a .csv file in which the separator could be either the comma or the semicolon. The parseLine that carries over all the stuff assumes that lines containing the separator should be inclused in double quotes("); if the lines contains a double quote, it is quoted and the double quotes inside are repeated twice. The routine can process also records split across several lines in the file providing that the lines are subsequent and the last field in the first split line is quoted. For further info please refer to: http://it.wikipedia.org/wiki/Comma-separated_values Details: 1. Separator is not fixed, but can be set (must be one char only) 2. Output file is created from the input file adding the prefix suffix "_output" The extension is .txt 3. The public method parse convert a .csv file directing the output to the screen, to a file or to the grid (decided with the setOutputType method) 4. The public method analyze check the .csv file directing the output log to the screen, to a file or to the grid (decided with the setOutputType method) 5. The information displayed in the log can be set using the log scope 6. There are method to provide info about the file such as the rows number (including or excluding the record split on several lines), the max # of cols, the cols in the first line etc. 7 I have added a set of routines to perform the converions between different formats i.e. from .txt to .csv and from .txt to a file with a generic separator respecting the assumptions listed above. The same conversions from a .csv file are also possible. 8. In the main method it is included a small test with several sub-menus to fix the parameters and perform the actions
Compatibility: Java (JDK 1.5)
Submitted on 1/6/2015 4:38:42 AM and accessed 20 times.
Back to Top
3)SecureLogin
Category: Databases/ JDBC
Level: Beginner
Description: Application Name: SecureLogin Implemented By: codebyter Released on: 06/01/2015 Brief Description: A form-based application that performs a login to an ACCESS database (accessed via ucanaccess library). The database is formed only by the tables contaning the data needed to validate the credentials specified by the user. The functionalities implemented are below detailed: Details: 1. The frame contains a checkbox to display the password when inputted 2. The user can miss the password only three times as maximum. When reached the limit the user is locked and the login is not allowed any more 3. It is possible to change the password via a pushbutton 4. When the user logs in, the application store this info in the database along with the login date/time 5. It is not allowed to log in when the user appears already logged Regarding point 3: 6. The password must satisfy the following constraints (see PasswordChecker class): - Between 6 and ten 10 chars long - Must contain at least one uppercase letter - Must contain at least one digit - Must not contain a predefinied set of chars 7. The password in the database table is stored in encrypted form (MD5, see the corresponding class) 8. It is reported back the old password in a display-only field 9. The frame contains a checkbox to display the password when inputted (in all the three password fields) 10. It must be specified a password different from the last file passwords ( contained in the passwordhistory database table) 11. If the user presses Cancel the password is not changed and the user stays logged with the old password
Compatibility: Java (JDK 1.5)
Submitted on 1/6/2015 4:52:18 AM and accessed 15 times.
Back to Top